mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
remove mrb_define_method_vm() function
It isn't needed as it's very similar to mrb_define_method_raw() and also there's only one place where mrb_proc_ptr() actually has to be called. Inspired by @furunkel's method cache patch (#2764).
This commit is contained in:
@@ -2303,8 +2303,9 @@ RETRY_TRY_BLOCK:
|
||||
/* A B R(A).newmethod(Syms(B),R(A+1)) */
|
||||
int a = GETARG_A(i);
|
||||
struct RClass *c = mrb_class_ptr(regs[a]);
|
||||
struct RProc *p = mrb_proc_ptr(regs[a+1]);
|
||||
|
||||
mrb_define_method_vm(mrb, c, syms[GETARG_B(i)], regs[a+1]);
|
||||
mrb_define_method_raw(mrb, c, syms[GETARG_B(i)], p);
|
||||
ARENA_RESTORE(mrb, ai);
|
||||
NEXT;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user