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

ruby-changes:55289

From: nobu <ko1@a...>
Date: Wed, 10 Apr 2019 16:18:30 +0900 (JST)
Subject: [ruby-changes:55289] nobu:r67496 (trunk): compile.c: name a hidden local variable as a predefined ID

nobu	2019-04-10 16:18:25 +0900 (Wed, 10 Apr 2019)

  New Revision: 67496

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=67496

  Log:
    compile.c: name a hidden local variable as a predefined ID

  Modified files:
    trunk/compile.c
    trunk/defs/id.def
Index: compile.c
===================================================================
--- compile.c	(revision 67495)
+++ compile.c	(revision 67496)
@@ -1366,12 +1366,10 @@ iseq_set_exception_local_table(rb_iseq_t https://github.com/ruby/ruby/blob/trunk/compile.c#L1366
     /* TODO: every id table is same -> share it.
      * Current problem is iseq_free().
      */
-    ID id_dollar_bang;
     ID *ids = (ID *)ALLOC_N(ID, 1);
 
-    CONST_ID(id_dollar_bang, "#$!");
     iseq->body->local_table_size = 1;
-    ids[0] = id_dollar_bang;
+    ids[0] = idERROR_INFO;
     iseq->body->local_table = ids;
     return COMPILE_OK;
 }
Index: defs/id.def
===================================================================
--- defs/id.def	(revision 67495)
+++ defs/id.def	(revision 67496)
@@ -70,6 +70,7 @@ firstline, predefined = __LINE__+1, %[\ https://github.com/ruby/ruby/blob/trunk/defs/id.def#L70
 
   $_                                                    LASTLINE
   $~                                                    BACKREF
+  $!                                                    ERROR_INFO
 ]
 
 # VM ID         OP      Parser Token

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

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