summaryrefslogtreecommitdiff
path: root/vm_core.h
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-20 17:41:13 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-20 17:41:13 +0000
commit30b1947df2da2192f7fcc812ac88dc1884715322 (patch)
treef5f2969d24420e851e1b580f6a0696e0c944617c /vm_core.h
parenta8fbb064a7beb29bf34e532ba49c1bdf59cf0f99 (diff)
* 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
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h16
1 files changed, 13 insertions, 3 deletions
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;