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

ruby-changes:40266

From: ko1 <ko1@a...>
Date: Thu, 29 Oct 2015 16:44:07 +0900 (JST)
Subject: [ruby-changes:40266] ko1:r52347 (trunk): * gc.c (rb_imemo_new): should not pass FL_WB_PROTECTED flag.

ko1	2015-10-29 16:43:48 +0900 (Thu, 29 Oct 2015)

  New Revision: 52347

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

  Log:
    * gc.c (rb_imemo_new): should not pass FL_WB_PROTECTED flag.
    
    * gc.c (rb_wb_protected_newobj_of): add more assertions.
    
    * gc.c (rb_wb_unprotected_newobj_of): ditto.

  Modified files:
    trunk/ChangeLog
    trunk/gc.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 52346)
+++ ChangeLog	(revision 52347)
@@ -1,3 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Oct 29 16:42:19 2015  Koichi Sasada  <ko1@a...>
+
+	* gc.c (rb_imemo_new): should not pass FL_WB_PROTECTED flag.
+
+	* gc.c (rb_wb_protected_newobj_of): add more assertions.
+
+	* gc.c (rb_wb_unprotected_newobj_of): ditto.
+
 Thu Oct 29 16:20:26 2015  Koichi Sasada  <ko1@a...>
 
 	* gc.c: introduce rb_wb_unprotected_newobj_of() and
Index: gc.c
===================================================================
--- gc.c	(revision 52346)
+++ gc.c	(revision 52347)
@@ -1850,12 +1850,14 @@ rb_newobj(void) https://github.com/ruby/ruby/blob/trunk/gc.c#L1850
 VALUE
 rb_wb_unprotected_newobj_of(VALUE klass, VALUE flags)
 {
+    if (RGENGC_CHECK_MODE > 0) assert((flags & FL_WB_PROTECTED) == 0);
     return newobj_of(klass, flags, 0, 0, 0, FALSE);
 }
 
 VALUE
 rb_wb_protected_newobj_of(VALUE klass, VALUE flags)
 {
+    if (RGENGC_CHECK_MODE > 0) assert((flags & FL_WB_PROTECTED) == 0);
     return newobj_of(klass, flags, 0, 0, 0, TRUE);
 }
 
@@ -1878,7 +1880,7 @@ rb_node_newnode(enum node_type type, VAL https://github.com/ruby/ruby/blob/trunk/gc.c#L1880
 VALUE
 rb_imemo_new(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0)
 {
-    VALUE flags = T_IMEMO | (type << FL_USHIFT) | FL_WB_PROTECTED;
+    VALUE flags = T_IMEMO | (type << FL_USHIFT);
     return newobj_of(v0, flags, v1, v2, v3, TRUE);
 }
 

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

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