diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-01-08 05:41:44 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-01-08 05:41:44 +0000 |
commit | 69b716111f04a5a692578638a16fc55a75a9dd1d (patch) | |
tree | c347b8f115c98bb87505a8d3a713ebcf711d253f /compile.c | |
parent | bdb18e5ffad55f326c0fc3ea659fbe254f15b909 (diff) | |
download | ruby-69b716111f04a5a692578638a16fc55a75a9dd1d.tar.gz |
vm_core.h: flip_cnt in rb_iseq_t
* vm_core.h (rb_iseq_t): move flip_cnt from struct iseq_compile_data,
because it has same life span as enclosing iseq. [Bug #7671]
[ruby-core:51296]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -5051,12 +5051,11 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped) LABEL *lend = NEW_LABEL(nd_line(node)); LABEL *lfin = NEW_LABEL(nd_line(node)); LABEL *ltrue = NEW_LABEL(nd_line(node)); - struct iseq_compile_data *data = iseq->local_iseq->compile_data; + rb_iseq_t *local_iseq = iseq->local_iseq; rb_num_t cnt; VALUE key; - if (!data) data = iseq->compile_data; - cnt = data->flip_cnt++ + DEFAULT_SPECIAL_VAR_COUNT; + cnt = local_iseq->flip_cnt++ + DEFAULT_SPECIAL_VAR_COUNT; key = INT2FIX(cnt); ADD_INSN2(ret, nd_line(node), getspecial, key, INT2FIX(0)); |