summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-28 10:01:54 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-28 10:01:54 +0000
commitf8a9d044f416e04e0c340fe77bf5c603fc753ff2 (patch)
treedf3d94237a6d12d099e235ba62bb743549b5b1b4 /vm_insnhelper.c
parente6f133b66aa705d1022dcb8dbe48cf93acec519b (diff)
move fields from `th` to `ec`.
* vm_core.h: move rb_thread_t::passed_block_handler to rb_execution_context_t::passed_block_handler. Also move rb_thread_t::passed_bmethod_me to rb_execution_context_t::passed_bmethod_me. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index c532640348..e7371c82df 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -1962,7 +1962,7 @@ vm_call_bmethod_body(rb_execution_context_t *ec, struct rb_calling_info *calling
VALUE val;
/* control block frame */
- rb_ec_thread_ptr(ec)->passed_bmethod_me = cc->me;
+ ec->passed_bmethod_me = cc->me;
GetProcPtr(cc->me->def->body.proc, proc);
val = vm_invoke_bmethod(ec, proc, calling->recv, calling->argc, argv, calling->block_handler);
@@ -2503,12 +2503,11 @@ vm_yield_with_cfunc(rb_execution_context_t *ec,
const struct rb_captured_block *captured,
VALUE self, int argc, const VALUE *argv, VALUE block_handler)
{
- rb_thread_t *th = rb_ec_thread_ptr(ec);
int is_lambda = FALSE; /* TODO */
VALUE val, arg, blockarg;
const struct vm_ifunc *ifunc = captured->code.ifunc;
- const rb_callable_method_entry_t *me = th->passed_bmethod_me;
- th->passed_bmethod_me = NULL;
+ const rb_callable_method_entry_t *me = ec->passed_bmethod_me;
+ ec->passed_bmethod_me = NULL;
if (is_lambda) {
arg = rb_ary_new4(argc, argv);