From 30b1947df2da2192f7fcc812ac88dc1884715322 Mon Sep 17 00:00:00 2001 From: ko1 Date: Tue, 20 Aug 2013 17:41:13 +0000 Subject: * insns.def: fix regexp's once option behavior. fix [ruby-trunk - Bug #6701] * insns.def: remove `onceinlinecache' and introduce `once' instruction. `once' doesn't use `setinlinecache' insn any more. * vm_core.h: `union iseq_inline_storage_entry' to store once data. * compile.c: catch up above changes. * iseq.c: ditto. * vm.c, vm_insnhelper.c: ditto. fix `m_core_set_postexe()' which is depend on `onceinlinecache' insn. * test/ruby/test_regexp.rb: add tests. * iseq.c: ISEQ_MINOR_VERSION to 1 (should increment major?) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_core.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'vm_core.h') diff --git a/vm_core.h b/vm_core.h index bba13168dc..fd0fa0bf3b 100644 --- a/vm_core.h +++ b/vm_core.h @@ -125,15 +125,25 @@ struct iseq_compile_data_ensure_node_stack; typedef struct rb_compile_option_struct rb_compile_option_t; + struct iseq_inline_cache_entry { VALUE ic_vmstat; VALUE ic_class; union { + size_t index; VALUE value; - long index; } ic_value; }; +union iseq_inline_storage_entry { + struct { + struct rb_thread_struct *running_thread; + VALUE value; + VALUE done; + } once; + struct iseq_inline_cache_entry cache; +}; + /* to avoid warning */ struct rb_thread_struct; struct rb_control_frame_struct; @@ -224,8 +234,8 @@ struct rb_iseq_struct { /* sizeof(vars) + 1 */ int local_size; - struct iseq_inline_cache_entry *ic_entries; - int ic_size; + union iseq_inline_storage_entry *is_entries; + int is_size; rb_call_info_t *callinfo_entries; int callinfo_size; -- cgit v1.2.3