[前][次][番号順一覧][スレッド一覧]

ruby-changes:28480

From: nobu <ko1@a...>
Date: Wed, 1 May 2013 11:40:52 +0900 (JST)
Subject: [ruby-changes:28480] nobu:r40532 (trunk): eval.c: use predefined IDs

nobu	2013-05-01 11:40:41 +0900 (Wed, 01 May 2013)

  New Revision: 40532

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40532

  Log:
    eval.c: use predefined IDs
    
    * eval.c (frame_func_id): use predefined IDs.
    * vm.c (rb_vm_control_frame_id_and_class): ditto.

  Modified files:
    trunk/ChangeLog
    trunk/eval.c
    trunk/vm.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 40531)
+++ ChangeLog	(revision 40532)
@@ -1,9 +1,13 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
-Wed May  1 11:38:37 2013  Nobuyoshi Nakada  <nobu@r...>
+Wed May  1 11:40:25 2013  Nobuyoshi Nakada  <nobu@r...>
 
 	* defs/id.def (predefined): add "idProc".
 
+	* eval.c (frame_func_id): use predefined IDs.
+
 	* proc.c (mnew, mproc, mlambda): use predefined IDs.
 
+	* vm.c (rb_vm_control_frame_id_and_class): ditto.
+
 	* vm.c (Init_VM): ditto.
 
 Tue Apr 30 23:18:00 2013  Zachary Scott  <zachary@z...>
Index: eval.c
===================================================================
--- eval.c	(revision 40531)
+++ eval.c	(revision 40532)
@@ -860,7 +860,7 @@ frame_func_id(rb_control_frame_t *cfp) https://github.com/ruby/ruby/blob/trunk/eval.c#L860
 	if (RUBY_VM_IFUNC_P(iseq)) {
 	    NODE *ifunc = (NODE *)iseq;
 	    if (ifunc->nd_aid) return ifunc->nd_aid;
-	    return rb_intern("<ifunc>");
+	    return idIFUNC;
 	}
 	me_local = method_entry_of_iseq(cfp, iseq);
 	if (me_local) {
@@ -890,7 +890,7 @@ frame_called_id(rb_control_frame_t *cfp) https://github.com/ruby/ruby/blob/trunk/eval.c#L890
 	if (RUBY_VM_IFUNC_P(iseq)) {
 	    NODE *ifunc = (NODE *)iseq;
 	    if (ifunc->nd_aid) return ifunc->nd_aid;
-	    return rb_intern("<ifunc>");
+	    return idIFUNC;
 	}
 	me_local = method_entry_of_iseq(cfp, iseq);
 	if (me_local) {
Index: vm.c
===================================================================
--- vm.c	(revision 40531)
+++ vm.c	(revision 40532)
@@ -1460,7 +1460,7 @@ rb_vm_control_frame_id_and_class(const r https://github.com/ruby/ruby/blob/trunk/vm.c#L1460
     }
     while (iseq) {
 	if (RUBY_VM_IFUNC_P(iseq)) {
-	    if (idp) CONST_ID(*idp, "<ifunc>");
+	    if (idp) *idp = idIFUNC;
 	    if (klassp) *klassp = 0;
 	    return 1;
 	}

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]