ruby-changes:35921
From: ktsj <ko1@a...>
Date: Sat, 18 Oct 2014 20:47:01 +0900 (JST)
Subject: [ruby-changes:35921] ktsj:r48001 (trunk): * vm_core.h, proc.c, vm_backtrace.c, vm_trace.c:
ktsj 2014-10-18 20:46:41 +0900 (Sat, 18 Oct 2014) New Revision: 48001 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48001 Log: * vm_core.h, proc.c, vm_backtrace.c, vm_trace.c: remove rb_binding_new_with_cfp, and use rb_vm_make_binding instead. Modified files: trunk/ChangeLog trunk/proc.c trunk/vm_backtrace.c trunk/vm_core.h trunk/vm_trace.c Index: ChangeLog =================================================================== --- ChangeLog (revision 48000) +++ ChangeLog (revision 48001) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sat Oct 18 20:40:52 2014 Kazuki Tsujimoto <kazuki@c...> + + * vm_core.h, proc.c, vm_backtrace.c, vm_trace.c: + remove rb_binding_new_with_cfp, and use rb_vm_make_binding instead. + Sat Oct 18 20:38:48 2014 Kazuki Tsujimoto <kazuki@c...> * vm_core.h, vm.c, proc.c: fix GC mark miss on bindings. Index: vm_core.h =================================================================== --- vm_core.h (revision 48000) +++ vm_core.h (revision 48001) @@ -913,7 +913,6 @@ VALUE rb_vm_make_proc(rb_thread_t *th, c https://github.com/ruby/ruby/blob/trunk/vm_core.h#L913 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); Index: proc.c =================================================================== --- proc.c (revision 48000) +++ proc.c (revision 48001) @@ -302,16 +302,10 @@ binding_clone(VALUE self) https://github.com/ruby/ruby/blob/trunk/proc.c#L302 } 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); } /* Index: vm_backtrace.c =================================================================== --- vm_backtrace.c (revision 48000) +++ vm_backtrace.c (revision 48001) @@ -1159,7 +1159,7 @@ collect_caller_bindings(rb_thread_t *th) https://github.com/ruby/ruby/blob/trunk/vm_backtrace.c#L1159 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)); } } Index: vm_trace.c =================================================================== --- vm_trace.c (revision 48000) +++ vm_trace.c (revision 48001) @@ -811,7 +811,7 @@ rb_tracearg_binding(rb_trace_arg_t *trac https://github.com/ruby/ruby/blob/trunk/vm_trace.c#L811 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; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/