From cb5da39f20a17bd73e791dca1e7e1832f0adbc53 Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Wed, 19 Jun 2019 18:47:15 +1200 Subject: Use shared implementation of `rb_ec_initialize_vm_stack`. --- thread.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'thread.c') diff --git a/thread.c b/thread.c index cf418da0e4..df6ca01c9d 100644 --- a/thread.c +++ b/thread.c @@ -728,16 +728,7 @@ thread_start_func_2(rb_thread_t *th, VALUE *stack_start, VALUE *register_stack_s } vm_stack = alloca(size * sizeof(VALUE)); - rb_ec_set_vm_stack(th->ec, vm_stack, size); - th->ec->cfp = (void *)(th->ec->vm_stack + th->ec->vm_stack_size); - - rb_vm_push_frame(th->ec, - 0 /* dummy iseq */, - VM_FRAME_MAGIC_DUMMY | VM_ENV_FLAG_LOCAL | VM_FRAME_FLAG_FINISH | VM_FRAME_FLAG_CFRAME /* dummy frame */, - Qnil /* dummy self */, VM_BLOCK_HANDLER_NONE /* dummy block ptr */, - 0 /* dummy cref/me */, - 0 /* dummy pc */, th->ec->vm_stack, 0, 0 - ); + rb_ec_initialize_vm_stack(th->ec, vm_stack, size); ruby_thread_set_native(th); -- cgit v1.2.3