summaryrefslogtreecommitdiff
path: root/vm_eval.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-29 14:55:19 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-29 14:55:19 +0000
commit881ac0a5655a20272e3b23de42131a7be180e8df (patch)
tree78b7b5fb1587f1a138a81642617700fa9a8745dd /vm_eval.c
parentcf28dbc5431900bdc9a8d11e8f9f68b421c83dfd (diff)
`th` -> `ec` for `rb_iterate0`.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_eval.c')
-rw-r--r--vm_eval.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/vm_eval.c b/vm_eval.c
index 2a3211d..2cd58d8 100644
--- a/vm_eval.c
+++ b/vm_eval.c
@@ -1110,13 +1110,13 @@ vm_frametype_name(const rb_control_frame_t *cfp);
static VALUE
rb_iterate0(VALUE (* it_proc) (VALUE), VALUE data1,
const struct vm_ifunc *const ifunc,
- rb_thread_t *const th)
+ rb_execution_context_t *ec)
{
enum ruby_tag_type state;
volatile VALUE retval = Qnil;
- rb_control_frame_t *const cfp = th->ec->cfp;
+ rb_control_frame_t *const cfp = ec->cfp;
- EC_PUSH_TAG(th->ec);
+ EC_PUSH_TAG(ec);
state = EC_EXEC_TAG();
if (state == 0) {
iter_retry:
@@ -1131,20 +1131,20 @@ rb_iterate0(VALUE (* it_proc) (VALUE), VALUE data1,
else {
block_handler = VM_CF_BLOCK_HANDLER(cfp);
}
- vm_passed_block_handler_set(th->ec, block_handler);
+ vm_passed_block_handler_set(ec, block_handler);
}
retval = (*it_proc) (data1);
}
else if (state == TAG_BREAK || state == TAG_RETRY) {
- const struct vm_throw_data *const err = (struct vm_throw_data *)th->ec->errinfo;
+ const struct vm_throw_data *const err = (struct vm_throw_data *)ec->errinfo;
const rb_control_frame_t *const escape_cfp = THROW_DATA_CATCH_FRAME(err);
if (cfp == escape_cfp) {
- rb_vm_rewind_cfp(th->ec, cfp);
+ rb_vm_rewind_cfp(ec, cfp);
state = 0;
- th->ec->tag->state = TAG_NONE;
- th->ec->errinfo = Qnil;
+ ec->tag->state = TAG_NONE;
+ ec->errinfo = Qnil;
if (state == TAG_RETRY) goto iter_retry;
retval = THROW_DATA_VAL(err);
@@ -1156,7 +1156,7 @@ rb_iterate0(VALUE (* it_proc) (VALUE), VALUE data1,
EC_POP_TAG();
if (state) {
- EC_JUMP_TAG(th->ec, state);
+ EC_JUMP_TAG(ec, state);
}
return retval;
}
@@ -1167,7 +1167,7 @@ rb_iterate(VALUE (* it_proc)(VALUE), VALUE data1,
{
return rb_iterate0(it_proc, data1,
bl_proc ? rb_vm_ifunc_proc_new(bl_proc, (void *)data2) : 0,
- GET_THREAD());
+ GET_EC());
}
struct iter_method_arg {
@@ -1213,7 +1213,7 @@ rb_lambda_call(VALUE obj, ID mid, int argc, const VALUE *argv,
arg.argc = argc;
arg.argv = argv;
block = rb_vm_ifunc_new(bl_proc, (void *)data2, min_argc, max_argc);
- return rb_iterate0(iterate_method, (VALUE)&arg, block, GET_THREAD());
+ return rb_iterate0(iterate_method, (VALUE)&arg, block, GET_EC());
}
static VALUE