Skip to content

Commit

Permalink
Removed support for rebinding methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
shin1m committed Feb 16, 2024
1 parent 43437e4 commit fc5827c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 16 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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")
Expand Down
11 changes: 0 additions & 11 deletions include/xemmai/method.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ class t_method
{
}
~t_method() = default;

public:
t_object* f_function() const
{
return v_function;
}
};

template<>
Expand All @@ -43,11 +37,6 @@ struct t_type_of<t_method> : t_uninstantiatable<t_holds<t_method>>
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<t_method>(a_this->f_as<t_method>().v_function, a_stack[2]);
return -1;
}
};

}
Expand Down
5 changes: 1 addition & 4 deletions src/code.cc
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,7 @@ size_t t_code::f_loop(t_context* a_context)
++pc;
auto p = static_cast<t_object*>(stack[0]);
if (reinterpret_cast<uintptr_t>(p) < e_tag__OBJECT) goto label__THROW_NOT_SUPPORTED;
if (p->f_type() == f_global()->f_type<t_method>())
stack[0] = p->f_as<t_method>().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)
Expand Down

0 comments on commit fc5827c

Please sign in to comment.