ruby-changes:48359
From: ko1 <ko1@a...>
Date: Fri, 27 Oct 2017 14:30:10 +0900 (JST)
Subject: [ruby-changes:48359] ko1:r60473 (trunk): vm_defined() accepts `ec` instead of `th`.
ko1 2017-10-27 14:30:05 +0900 (Fri, 27 Oct 2017) New Revision: 60473 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60473 Log: vm_defined() accepts `ec` instead of `th`. * vm_insnhelper.c (vm_defined): accepts `ec` instead of `th`. Modified files: trunk/insns.def trunk/vm_insnhelper.c Index: vm_insnhelper.c =================================================================== --- vm_insnhelper.c (revision 60472) +++ vm_insnhelper.c (revision 60473) @@ -2796,7 +2796,7 @@ check_respond_to_missing(VALUE obj, VALU https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L2796 } static VALUE -vm_defined(rb_thread_t *th, rb_control_frame_t *reg_cfp, rb_num_t op_type, VALUE obj, VALUE needstr, VALUE v) +vm_defined(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, rb_num_t op_type, VALUE obj, VALUE needstr, VALUE v) { VALUE klass; enum defined_type expr_type = 0; @@ -2826,7 +2826,7 @@ vm_defined(rb_thread_t *th, rb_control_f https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L2826 } case DEFINED_CONST: klass = v; - if (vm_get_ev_const(th->ec, klass, SYM2ID(obj), 1)) { + if (vm_get_ev_const(ec, klass, SYM2ID(obj), 1)) { expr_type = DEFINED_CONST; } break; @@ -2883,7 +2883,7 @@ vm_defined(rb_thread_t *th, rb_control_f https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L2883 } break; case DEFINED_REF:{ - if (vm_getspecial(th->ec, GET_LEP(), Qfalse, FIX2INT(obj)) != Qnil) { + if (vm_getspecial(ec, GET_LEP(), Qfalse, FIX2INT(obj)) != Qnil) { expr_type = DEFINED_GVAR; } break; Index: insns.def =================================================================== --- insns.def (revision 60472) +++ insns.def (revision 60473) @@ -740,7 +740,7 @@ defined https://github.com/ruby/ruby/blob/trunk/insns.def#L740 (VALUE v) (VALUE val) { - val = vm_defined(th, GET_CFP(), op_type, obj, needstr, v); + val = vm_defined(th->ec, GET_CFP(), op_type, obj, needstr, v); } /** -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/