summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-27 05:30:05 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-27 05:30:05 +0000
commit7267a79a7f702f785e88952bafe1eeb5176460b8 (patch)
tree4a8404778a4eb146189ea1448119dbadd281a269
parent4c961b38618beaff222dbb7bae0dce1c64a5d0c3 (diff)
vm_defined() accepts `ec` instead of `th`.
* vm_insnhelper.c (vm_defined): accepts `ec` instead of `th`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--insns.def2
-rw-r--r--vm_insnhelper.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/insns.def b/insns.def
index df30e55d6e..3044ccd71f 100644
--- a/insns.def
+++ b/insns.def
@@ -740,7 +740,7 @@ defined
(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);
}
/**
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index d1ba91b93c..6c841bf55a 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -2796,7 +2796,7 @@ check_respond_to_missing(VALUE obj, VALUE v)
}
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_frame_t *reg_cfp, rb_num_t op_type, VALUE
}
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_frame_t *reg_cfp, rb_num_t op_type, VALUE
}
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;