mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
th
-> ec
for rb_vm_make_binding().
* vm.c (rb_vm_make_binding): accepts (const) `ec` instead of `th`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2317b5da2a
commit
4cd402ae1f
5 changed files with 10 additions and 10 deletions
4
proc.c
4
proc.c
|
@ -332,8 +332,8 @@ binding_clone(VALUE self)
|
|||
VALUE
|
||||
rb_binding_new(void)
|
||||
{
|
||||
rb_thread_t *th = GET_THREAD();
|
||||
return rb_vm_make_binding(th, th->ec->cfp);
|
||||
rb_execution_context_t *ec = GET_EC();
|
||||
return rb_vm_make_binding(ec, ec->cfp);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
10
vm.c
10
vm.c
|
@ -893,10 +893,10 @@ rb_vm_make_proc_lambda(const rb_execution_context_t *ec, const struct rb_capture
|
|||
/* Binding */
|
||||
|
||||
VALUE
|
||||
rb_vm_make_binding(rb_thread_t *th, const rb_control_frame_t *src_cfp)
|
||||
rb_vm_make_binding(const rb_execution_context_t *ec, const rb_control_frame_t *src_cfp)
|
||||
{
|
||||
rb_control_frame_t *cfp = rb_vm_get_binding_creatable_next_cfp(th->ec, src_cfp);
|
||||
rb_control_frame_t *ruby_level_cfp = rb_vm_get_ruby_level_next_cfp(th->ec, src_cfp);
|
||||
rb_control_frame_t *cfp = rb_vm_get_binding_creatable_next_cfp(ec, src_cfp);
|
||||
rb_control_frame_t *ruby_level_cfp = rb_vm_get_ruby_level_next_cfp(ec, src_cfp);
|
||||
VALUE bindval, envval;
|
||||
rb_binding_t *bind;
|
||||
|
||||
|
@ -905,11 +905,11 @@ rb_vm_make_binding(rb_thread_t *th, const rb_control_frame_t *src_cfp)
|
|||
}
|
||||
|
||||
while (1) {
|
||||
envval = vm_make_env_object(th->ec, cfp);
|
||||
envval = vm_make_env_object(ec, cfp);
|
||||
if (cfp == ruby_level_cfp) {
|
||||
break;
|
||||
}
|
||||
cfp = rb_vm_get_binding_creatable_next_cfp(th->ec, RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp));
|
||||
cfp = rb_vm_get_binding_creatable_next_cfp(ec, RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp));
|
||||
}
|
||||
|
||||
bindval = rb_binding_alloc(rb_cBinding);
|
||||
|
|
|
@ -1156,7 +1156,7 @@ collect_caller_bindings(rb_thread_t *th)
|
|||
|
||||
if (!NIL_P(cfp_val)) {
|
||||
rb_control_frame_t *cfp = GC_GUARDED_PTR_REF(cfp_val);
|
||||
rb_ary_store(entry, CALLER_BINDING_BINDING, rb_vm_make_binding(th, cfp));
|
||||
rb_ary_store(entry, CALLER_BINDING_BINDING, rb_vm_make_binding(th->ec, cfp));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1502,7 +1502,7 @@ int rb_ec_frame_method_id_and_class(const rb_execution_context_t *ec, ID *idp, I
|
|||
VALUE rb_vm_invoke_proc(rb_execution_context_t *ec, rb_proc_t *proc, int argc, const VALUE *argv, VALUE block_handler);
|
||||
VALUE rb_vm_make_proc_lambda(const rb_execution_context_t *ec, const struct rb_captured_block *captured, VALUE klass, int8_t is_lambda);
|
||||
VALUE rb_vm_make_proc(const rb_execution_context_t *ec, const struct rb_captured_block *captured, VALUE klass);
|
||||
VALUE rb_vm_make_binding(rb_thread_t *th, const rb_control_frame_t *src_cfp);
|
||||
VALUE rb_vm_make_binding(const rb_execution_context_t *th, const rb_control_frame_t *src_cfp);
|
||||
VALUE rb_vm_env_local_variables(const rb_env_t *env);
|
||||
const rb_env_t *rb_vm_env_prev_env(const rb_env_t *env);
|
||||
const VALUE *rb_binding_add_dynavars(VALUE bindval, rb_binding_t *bind, int dyncount, const ID *dynvars);
|
||||
|
|
|
@ -810,7 +810,7 @@ rb_tracearg_binding(rb_trace_arg_t *trace_arg)
|
|||
cfp = rb_vm_get_binding_creatable_next_cfp(trace_arg->th->ec, trace_arg->cfp);
|
||||
|
||||
if (cfp) {
|
||||
return rb_vm_make_binding(trace_arg->th, cfp);
|
||||
return rb_vm_make_binding(trace_arg->th->ec, cfp);
|
||||
}
|
||||
else {
|
||||
return Qnil;
|
||||
|
|
Loading…
Reference in a new issue