diff --git a/CMakeLists.txt b/CMakeLists.txt index fbec8ca..577e341 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.12) -project(xemmai VERSION 202310) +project(xemmai VERSION 202402) find_package(Iconv REQUIRED) find_package(Threads REQUIRED) set(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib") diff --git a/include/xemmai/method.h b/include/xemmai/method.h index 7c1f06d..7d12ea0 100644 --- a/include/xemmai/method.h +++ b/include/xemmai/method.h @@ -19,12 +19,6 @@ class t_method { } ~t_method() = default; - -public: - t_object* f_function() const - { - return v_function; - } }; template<> @@ -43,11 +37,6 @@ struct t_type_of : t_uninstantiatable> a_stack[1] = p.v_self; return p.v_function->f_call_without_loop(a_stack, a_n); } - static size_t f_do_get_at(t_object* a_this, t_pvalue* a_stack) - { - a_stack[0] = a_this->f_type()->f_new(a_this->f_as().v_function, a_stack[2]); - return -1; - } }; } diff --git a/src/code.cc b/src/code.cc index aea4109..fb58a80 100644 --- a/src/code.cc +++ b/src/code.cc @@ -319,10 +319,7 @@ size_t t_code::f_loop(t_context* a_context) ++pc; auto p = static_cast(stack[0]); if (reinterpret_cast(p) < e_tag__OBJECT) goto label__THROW_NOT_SUPPORTED; - if (p->f_type() == f_global()->f_type()) - stack[0] = p->f_as().f_function(); - else if (!f_is_bindable(p)) - f_method_bind(stack); + if (!p->f_type()->v_bindable) f_method_bind(stack); } XEMMAI__CODE__BREAK XEMMAI__CODE__CASE(GLOBAL_GET)