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

ruby-changes:34750

From: ko1 <ko1@a...>
Date: Wed, 16 Jul 2014 18:09:53 +0900 (JST)
Subject: [ruby-changes:34750] ko1:r46833 (trunk): * iseq.c (rb_iseq_defined_string): use rb_gc_mark_object() instead of

ko1	2014-07-16 18:09:40 +0900 (Wed, 16 Jul 2014)

  New Revision: 46833

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

  Log:
    * iseq.c (rb_iseq_defined_string): use rb_gc_mark_object() instead of
      marking from vm_mark().
    * vm.c (rb_vm_mark): ditto.

  Modified files:
    trunk/ChangeLog
    trunk/iseq.c
    trunk/vm.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 46832)
+++ ChangeLog	(revision 46833)
@@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Jul 16 18:08:47 2014  Koichi Sasada  <ko1@a...>
+
+	* iseq.c (rb_iseq_defined_string): use rb_gc_mark_object() instead of
+	  marking from vm_mark().
+
+	* vm.c (rb_vm_mark): ditto.
+
 Wed Jul 16 18:03:50 2014  Koichi Sasada  <ko1@a...>
 
 	* gc.c (gc_mark_roots): call rb_vm_mark directly.
Index: iseq.c
===================================================================
--- iseq.c	(revision 46832)
+++ iseq.c	(revision 46833)
@@ -2069,6 +2069,7 @@ rb_iseq_defined_string(enum defined_type https://github.com/ruby/ruby/blob/trunk/iseq.c#L2069
 	str = rb_str_new_cstr(estr);;
 	OBJ_FREEZE(str);
 	defs[type-1] = str;
+	rb_gc_register_mark_object(str);
     }
     return str;
 }
Index: vm.c
===================================================================
--- vm.c	(revision 46832)
+++ vm.c	(revision 46833)
@@ -1771,9 +1771,6 @@ rb_vm_mark(void *ptr) https://github.com/ruby/ruby/blob/trunk/vm.c#L1771
 	    if (vm->trap_list[i].cmd)
 		rb_gc_mark(vm->trap_list[i].cmd);
 	}
-	if (vm->defined_strings) {
-	    rb_gc_mark_locations(vm->defined_strings, vm->defined_strings + DEFINED_EXPR);
-	}
     }
 
     RUBY_MARK_LEAVE("vm");

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

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