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

ruby-changes:34749

From: ko1 <ko1@a...>
Date: Wed, 16 Jul 2014 18:07:05 +0900 (JST)
Subject: [ruby-changes:34749] ko1:r46832 (trunk): * gc.c (gc_mark_roots): call rb_vm_mark directly.

ko1	2014-07-16 18:06:52 +0900 (Wed, 16 Jul 2014)

  New Revision: 46832

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

  Log:
    * gc.c (gc_mark_roots): call rb_vm_mark directly.
    * vm.c: remove mark function for RubyVM object because
      RubyVM object marked manually.

  Modified files:
    trunk/ChangeLog
    trunk/gc.c
    trunk/vm.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 46831)
+++ ChangeLog	(revision 46832)
@@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Jul 16 18:03:50 2014  Koichi Sasada  <ko1@a...>
+
+	* gc.c (gc_mark_roots): call rb_vm_mark directly.
+
+	* vm.c: remove mark function for RubyVM object because
+	  RubyVM object marked manually.
+
 Wed Jul 16 12:25:39 2014  NARUSE, Yui  <naruse@r...>
 
 	* regcomp.c: Merge Onigmo 5.14.1 25a8a69fc05ae3b56a09.
Index: gc.c
===================================================================
--- gc.c	(revision 46831)
+++ gc.c	(revision 46832)
@@ -4222,7 +4222,8 @@ gc_mark_roots(rb_objspace_t *objspace, i https://github.com/ruby/ruby/blob/trunk/gc.c#L4222
 
     MARK_CHECKPOINT("vm");
     SET_STACK_END;
-    th->vm->self ? rb_gc_mark(th->vm->self) : rb_vm_mark(th->vm);
+    rb_vm_mark(th->vm);
+    if (th->vm->self) gc_mark_ptr(objspace, th->vm->self);
 
     MARK_CHECKPOINT("finalizers");
     mark_tbl(objspace, finalizer_table);
Index: vm.c
===================================================================
--- vm.c	(revision 46831)
+++ vm.c	(revision 46832)
@@ -1790,8 +1790,6 @@ rb_vm_add_root_module(ID id, VALUE modul https://github.com/ruby/ruby/blob/trunk/vm.c#L1790
     return TRUE;
 }
 
-#define vm_free 0
-
 int
 ruby_vm_destruct(rb_vm_t *vm)
 {
@@ -1844,7 +1842,7 @@ vm_memsize(const void *ptr) https://github.com/ruby/ruby/blob/trunk/vm.c#L1842
 
 static const rb_data_type_t vm_data_type = {
     "VM",
-    {rb_vm_mark, vm_free, vm_memsize,},
+    {NULL, NULL, vm_memsize,},
     NULL, NULL, RUBY_TYPED_FREE_IMMEDIATELY
 };
 

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

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