aboutsummaryrefslogtreecommitdiffstats
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-27 05:18:58 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-27 05:18:58 +0000
commit5321c9d70b2f370431b75ad323c8f36e8a78cad4 (patch)
tree02c4881e6be2eee7dd133932d502e6a02c9c04ba /vm_insnhelper.c
parent430b2430c7178054c6c10f91b92b1bea58b2dbcd (diff)
downloadruby-5321c9d70b2f370431b75ad323c8f36e8a78cad4.tar.gz
vm_get_ev_const() accepts `ec` instead of `th`.
* vm_insnhelper.c (vm_get_ev_const): accepts `ec` instead of `th`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 7226560d2a..3821babe1b 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -808,14 +808,14 @@ vm_get_iclass(rb_control_frame_t *cfp, VALUE klass)
}
static inline VALUE
-vm_get_ev_const(rb_thread_t *th, VALUE orig_klass, ID id, int is_defined)
+vm_get_ev_const(rb_execution_context_t *ec, VALUE orig_klass, ID id, int is_defined)
{
void rb_const_warn_if_deprecated(const rb_const_entry_t *ce, VALUE klass, ID id);
VALUE val;
if (orig_klass == Qnil) {
/* in current lexical scope */
- const rb_cref_t *root_cref = rb_vm_get_cref(th->ec->cfp->ep);
+ const rb_cref_t *root_cref = rb_vm_get_cref(ec->cfp->ep);
const rb_cref_t *cref;
VALUE klass = Qnil;
@@ -861,10 +861,10 @@ vm_get_ev_const(rb_thread_t *th, VALUE orig_klass, ID id, int is_defined)
/* search self */
if (root_cref && !NIL_P(CREF_CLASS(root_cref))) {
- klass = vm_get_iclass(th->ec->cfp, CREF_CLASS(root_cref));
+ klass = vm_get_iclass(ec->cfp, CREF_CLASS(root_cref));
}
else {
- klass = CLASS_OF(th->ec->cfp->self);
+ klass = CLASS_OF(ec->cfp->self);
}
if (is_defined) {
@@ -2849,7 +2849,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, klass, SYM2ID(obj), 1)) {
+ if (vm_get_ev_const(th->ec, klass, SYM2ID(obj), 1)) {
expr_type = DEFINED_CONST;
}
break;