Project

General

Profile

Bug #10368 » 0002-use-rb_vm_make_binding-instead-of-rb_binding_new_with_cfp.patch

ktsj (Kazuki Tsujimoto), 10/11/2014 10:56 AM

View differences:

proc.c
}
VALUE
rb_binding_new_with_cfp(rb_thread_t *th, const rb_control_frame_t *src_cfp)
{
return rb_vm_make_binding(th, src_cfp);
}
VALUE
rb_binding_new(void)
{
rb_thread_t *th = GET_THREAD();
return rb_binding_new_with_cfp(th, th->cfp);
return rb_vm_make_binding(th, th->cfp);
}
/*
vm_backtrace.c
if (!NIL_P(cfp_val)) {
rb_control_frame_t *cfp = GC_GUARDED_PTR_REF(cfp_val);
rb_ary_store(entry, CALLER_BINDING_BINDING, rb_binding_new_with_cfp(th, cfp));
rb_ary_store(entry, CALLER_BINDING_BINDING, rb_vm_make_binding(th, cfp));
}
}
vm_core.h
VALUE rb_vm_make_binding(rb_thread_t *th, const rb_control_frame_t *src_cfp);
VALUE rb_vm_make_env_object(rb_thread_t *th, rb_control_frame_t *cfp);
VALUE rb_vm_env_local_variables(VALUE envval);
VALUE rb_binding_new_with_cfp(rb_thread_t *th, const rb_control_frame_t *src_cfp);
VALUE *rb_binding_add_dynavars(rb_binding_t *bind, int dyncount, const ID *dynvars);
void rb_vm_inc_const_missing_count(void);
void rb_vm_gvl_destroy(rb_vm_t *vm);
vm_trace.c
cfp = rb_vm_get_binding_creatable_next_cfp(trace_arg->th, trace_arg->cfp);
if (cfp) {
return rb_binding_new_with_cfp(trace_arg->th, cfp);
return rb_vm_make_binding(trace_arg->th, cfp);
}
else {
return Qnil;
(2-2/2)