diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-08-20 17:41:13 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-08-20 17:41:13 +0000 |
commit | 30b1947df2da2192f7fcc812ac88dc1884715322 (patch) | |
tree | f5f2969d24420e851e1b580f6a0696e0c944617c /iseq.c | |
parent | a8fbb064a7beb29bf34e532ba49c1bdf59cf0f99 (diff) | |
download | ruby-30b1947df2da2192f7fcc812ac88dc1884715322.tar.gz |
* 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 'iseq.c')
-rw-r--r-- | iseq.c | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -22,7 +22,7 @@ #include "insns_info.inc" #define ISEQ_MAJOR_VERSION 2 -#define ISEQ_MINOR_VERSION 0 +#define ISEQ_MINOR_VERSION 1 VALUE rb_cISeq; @@ -81,7 +81,7 @@ iseq_free(void *ptr) RUBY_FREE_UNLESS_NULL(iseq->iseq); RUBY_FREE_UNLESS_NULL(iseq->line_info_table); RUBY_FREE_UNLESS_NULL(iseq->local_table); - RUBY_FREE_UNLESS_NULL(iseq->ic_entries); + RUBY_FREE_UNLESS_NULL(iseq->is_entries); RUBY_FREE_UNLESS_NULL(iseq->callinfo_entries); RUBY_FREE_UNLESS_NULL(iseq->catch_table); RUBY_FREE_UNLESS_NULL(iseq->arg_opt_table); @@ -142,7 +142,7 @@ iseq_memsize(const void *ptr) size += iseq->local_table_size * sizeof(ID); size += iseq->catch_table_size * sizeof(struct iseq_catch_table_entry); size += iseq->arg_opts * sizeof(VALUE); - size += iseq->ic_size * sizeof(struct iseq_inline_cache_entry); + size += iseq->is_size * sizeof(union iseq_inline_storage_entry); size += iseq->callinfo_size * sizeof(rb_call_info_t); if (iseq->compile_data) { @@ -1200,7 +1200,7 @@ rb_insn_operand_intern(rb_iseq_t *iseq, break; case TS_IC: - ret = rb_sprintf("<ic:%"PRIdPTRDIFF">", (struct iseq_inline_cache_entry *)op - iseq->ic_entries); + ret = rb_sprintf("<is:%"PRIdPTRDIFF">", (union iseq_inline_storage_entry *)op - iseq->is_entries); break; case TS_CALLINFO: @@ -1773,10 +1773,11 @@ iseq_data_to_ary(rb_iseq_t *iseq) rb_ary_push(ary, ID2SYM(entry->id)); } break; - case TS_IC: { - struct iseq_inline_cache_entry *ic = (struct iseq_inline_cache_entry *)*seq; - rb_ary_push(ary, INT2FIX(ic - iseq->ic_entries)); - } + case TS_IC: + { + union iseq_inline_storage_entry *is = (union iseq_inline_storage_entry *)*seq; + rb_ary_push(ary, INT2FIX(is - iseq->is_entries)); + } break; case TS_CALLINFO: { |