From 2b5bb8a0875b75f18e628c8b2df22760536bdad9 Mon Sep 17 00:00:00 2001 From: ko1 Date: Fri, 5 Apr 2019 08:15:11 +0000 Subject: add definemethod/definesmethod insn. * insns.def: add definemethod and definesmethod (singleton method) instructions. Old YARV contains these instructions, but it is moved to methods of FrozenCore class because remove number of instructions can improve performance for some techniques (static stack caching and so on). However, we don't employ these technique and it is hard to optimize/analysis definition sequence. So I decide to introduce them (and remove definition methods). `putiseq` insn is also removed. * vm_method.c (rb_scope_visibility_get): renamed to `vm_scope_visibility_get()` and make it accept `ec`. Same for `vm_scope_module_func_check()`. These fixes are result of refactoring `vm_define_method`. * vm_insnhelper.c (rb_vm_get_cref): renamed to `vm_get_cref` because of consistency with other functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vm_eval.c') diff --git a/vm_eval.c b/vm_eval.c index a4d5835720..55cd3ca3fc 100644 --- a/vm_eval.c +++ b/vm_eval.c @@ -1322,7 +1322,7 @@ eval_string_with_cref(VALUE self, VALUE src, rb_cref_t *cref, VALUE file, int li /* TODO: what the code checking? */ if (!cref && block.as.captured.code.val) { - rb_cref_t *orig_cref = rb_vm_get_cref(vm_block_ep(&block)); + rb_cref_t *orig_cref = vm_get_cref(vm_block_ep(&block)); cref = vm_cref_dup(orig_cref); } vm_set_eval_stack(ec, iseq, cref, &block); -- cgit v1.2.3