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

ruby-changes:33617

From: nobu <ko1@a...>
Date: Thu, 24 Apr 2014 11:04:39 +0900 (JST)
Subject: [ruby-changes:33617] nobu:r45698 (trunk): parse.y: resurrect before pindown

nobu	2014-04-24 11:04:33 +0900 (Thu, 24 Apr 2014)

  New Revision: 45698

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

  Log:
    parse.y: resurrect before pindown
    
    * parse.y (rb_pin_dynamic_symbol): resurrect the dynamic symbol
      which may be unmarked already and swept at next time, before
      pindown.
    
    * parse.y (dsym_node_gen): now rb_intern_str() resurrects dynamic
      symbols, via lookup_sym_id() and rb_pin_dynamic_symbol().

  Modified files:
    trunk/parse.y
Index: parse.y
===================================================================
--- parse.y	(revision 45697)
+++ parse.y	(revision 45698)
@@ -9571,9 +9571,6 @@ dsym_node_gen(struct parser_params *pars https://github.com/ruby/ruby/blob/trunk/parse.y#L9571
       case NODE_STR:
 	lit = node->nd_lit;
 	node->nd_lit = ID2SYM(rb_intern_str(lit));
-	if (!STATIC_SYM_P(node->nd_lit)) {
-	    rb_gc_resurrect(node->nd_lit);
-	}
 	nd_set_type(node, NODE_LIT);
 	break;
       default:
@@ -10469,6 +10466,7 @@ setup_fake_str(struct RString *fake_str, https://github.com/ruby/ruby/blob/trunk/parse.y#L10466
 ID
 rb_pin_dynamic_symbol(VALUE sym)
 {
+    rb_gc_resurrect(sym);
     /* stick dynamic symbol */
     if (!st_insert(global_symbols.pinned_dsym, sym, (st_data_t)sym)) {
 	global_symbols.pinned_dsym_minor_marked = 0;

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

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