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

ruby-changes:57957

From: Aaron <ko1@a...>
Date: Fri, 27 Sep 2019 06:07:51 +0900 (JST)
Subject: [ruby-changes:57957] e197d9ca71 (master): Execute write barrier instead of adding to array

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

From e197d9ca71570c980274ddd2cb6a32af6c00d95e Mon Sep 17 00:00:00 2001
From: Aaron Patterson <tenderlove@r...>
Date: Wed, 25 Sep 2019 14:08:11 -0700
Subject: Execute write barrier instead of adding to array

We can mark everything via the instruction objects, so just execute the
write barrier instead of appending to the array

diff --git a/compile.c b/compile.c
index d7c05b2..004d386 100644
--- a/compile.c
+++ b/compile.c
@@ -579,7 +579,7 @@ static int https://github.com/ruby/ruby/blob/trunk/compile.c#L579
 iseq_add_mark_object_compile_time(const rb_iseq_t *iseq, VALUE v)
 {
     if (!SPECIAL_CONST_P(v)) {
-	rb_ary_push(ISEQ_COMPILE_DATA(iseq)->mark_ary, v);
+        RB_OBJ_WRITTEN(iseq, Qundef, v);
     }
     return COMPILE_OK;
 }
-- 
cgit v0.10.2


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

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