From a31c632299b72cd9e4ff53cec6d7b56f1f8a54f7 Mon Sep 17 00:00:00 2001
From: ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Date: Tue, 8 Sep 2009 02:57:39 +0000
Subject: * iseq.c (iseq_mark): no need to mark inline cache entries. *
 insns.def (onceinlinecache, setinlinecache): save a value   to mark cached
 value.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
---
 insns.def | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'insns.def')

diff --git a/insns.def b/insns.def
index 426f101632..4acbcef1cb 100644
--- a/insns.def
+++ b/insns.def
@@ -1200,6 +1200,7 @@ onceinlinecache
     }
     else {
 	/* none */
+	ic->ic_value = Qundef;
 	val = Qnil;
     }
 }
@@ -1217,6 +1218,9 @@ setinlinecache
 {
     IC ic = GET_CONST_INLINE_CACHE(dst);
 
+    if (ic->ic_value == Qundef) {
+	rb_ary_push(GET_ISEQ()->mark_ary, val);
+    }
     ic->ic_value = val;
     ic->ic_vmstat = GET_VM_STATE_VERSION() - ruby_vm_const_missing_count;
     ruby_vm_const_missing_count = 0;
-- 
cgit v1.2.3

