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

ruby-changes:63296

From: Aaron <ko1@a...>
Date: Thu, 8 Oct 2020 09:01:33 +0900 (JST)
Subject: [ruby-changes:63296] d528254095 (master): Add missing WB for iseq

https://git.ruby-lang.org/ruby.git/commit/?id=d528254095

From d5282540953a04401303d540e6f8b388e75500ff Mon Sep 17 00:00:00 2001
From: Aaron Patterson <tenderlove@r...>
Date: Wed, 7 Oct 2020 15:20:43 -0700
Subject: Add missing WB for iseq

The write barrier wasn't being called for this object, so add the
missing WB.  Automatic compaction moved the reference because it didn't
know about the relationship (that's how I found the missing WB).

diff --git a/compile.c b/compile.c
index 2672b3b..6aca123 100644
--- a/compile.c
+++ b/compile.c
@@ -8334,6 +8334,7 @@ iseq_compile_each0(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, in https://github.com/ruby/ruby/blob/trunk/compile.c#L8334
 	debugp_param("lit", node->nd_lit);
 	if (!popped) {
 	    ADD_INSN1(ret, line, putobject, node->nd_lit);
+            RB_OBJ_WRITTEN(iseq, Qundef, node->nd_lit);
 	}
 	break;
       }
-- 
cgit v0.10.2


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

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