ruby-changes:13040
From: ko1 <ko1@a...>
Date: Tue, 8 Sep 2009 12:00:16 +0900 (JST)
Subject: [ruby-changes:13040] Ruby:r24786 (trunk): * iseq.c (iseq_mark): no need to mark inline cache entries.
ko1 2009-09-08 11:57:39 +0900 (Tue, 08 Sep 2009) New Revision: 24786 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=24786 Log: * iseq.c (iseq_mark): no need to mark inline cache entries. * insns.def (onceinlinecache, setinlinecache): save a value to mark cached value. Modified files: trunk/ChangeLog trunk/insns.def trunk/iseq.c Index: ChangeLog =================================================================== --- ChangeLog (revision 24785) +++ ChangeLog (revision 24786) @@ -1,3 +1,10 @@ +Tue Sep 8 11:53:58 2009 Koichi Sasada <ko1@a...> + + * iseq.c (iseq_mark): no need to mark inline cache entries. + + * insns.def (onceinlinecache, setinlinecache): save a value + to mark cached value. + Tue Sep 8 08:32:30 2009 Nobuyoshi Nakada <nobu@r...> * test/dl/test_{cfunc,ptr}.rb: added tests from Aaron Patterson. Index: insns.def =================================================================== --- insns.def (revision 24785) +++ insns.def (revision 24786) @@ -1200,6 +1200,7 @@ } else { /* none */ + ic->ic_value = Qundef; val = Qnil; } } @@ -1217,6 +1218,9 @@ { 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; Index: iseq.c =================================================================== --- iseq.c (revision 24785) +++ iseq.c (revision 24786) @@ -90,7 +90,6 @@ RUBY_MARK_ENTER("iseq"); if (ptr) { - int i; rb_iseq_t *iseq = ptr; RUBY_GC_INFO("%s @ %s\n", RSTRING_PTR(iseq->name), RSTRING_PTR(iseq->filename)); @@ -104,16 +103,6 @@ /* RUBY_MARK_UNLESS_NULL(iseq->cached_special_block); */ RUBY_MARK_UNLESS_NULL(iseq->orig); - for (i=0; i<iseq->ic_size; i++) { - struct iseq_inline_cache_entry *const ic = &iseq->ic_entries[i]; - RUBY_MARK_UNLESS_NULL(ic->ic_class); - RUBY_MARK_UNLESS_NULL(ic->ic_value); - if (ic->ic_vmstat != GET_VM_STATE_VERSION()) continue; - if (ic->ic_method) { - rb_gc_mark_method_entry(ic->ic_method); - } - } - if (iseq->compile_data != 0) { struct iseq_compile_data *const compile_data = iseq->compile_data; RUBY_MARK_UNLESS_NULL(compile_data->mark_ary); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/