diff options
| author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-07-10 08:04:52 +0000 |
|---|---|---|
| committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-07-10 08:04:52 +0000 |
| commit | 3db23a0effe27b9d5b68fd687a29d3dc4a93f865 (patch) | |
| tree | 7f16e466dd79c5750c740d3aac7a4704b924885e /compile.c | |
| parent | 706d72a1d5301ca4f83ad00a0ebb464ada4e33d6 (diff) | |
| download | ruby-3db23a0effe27b9d5b68fd687a29d3dc4a93f865.tar.gz ruby-3db23a0effe27b9d5b68fd687a29d3dc4a93f865.tar.xz ruby-3db23a0effe27b9d5b68fd687a29d3dc4a93f865.zip | |
* vm.c, insnhelper.ci: fix svar interface.
* compile.c (iseq_compile_each), yarvcore.h: fix to use new
svar interface for flip flop.
* eval.c: ditto.
* insns.def: ditto.
* include/ruby/intern.h: remove "rb_svar()" declaration.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
| -rw-r--r-- | compile.c | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -4172,9 +4172,12 @@ 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)); + VALUE key = rb_sprintf("flipflag/%s-%p-%d", + RSTRING_PTR(iseq->name), iseq, + iseq->compile_data->flip_cnt++); - ADD_INSN2(ret, nd_line(node), getspecial, INT2FIX(node->nd_cnt), - INT2FIX(0)); + iseq_add_mark_object_compile_time(iseq, key); + ADD_INSN2(ret, nd_line(node), getspecial, key, INT2FIX(0)); ADD_INSNL(ret, nd_line(node), branchif, lend); /* *flip == 0 */ @@ -4183,11 +4186,11 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped) ADD_INSNL(ret, nd_line(node), branchunless, lfin); if (nd_type(node) == NODE_FLIP3) { ADD_INSN(ret, nd_line(node), dup); - ADD_INSN1(ret, nd_line(node), setspecial, INT2FIX(node->nd_cnt)); + ADD_INSN1(ret, nd_line(node), setspecial, key); ADD_INSNL(ret, nd_line(node), jump, lfin); } else { - ADD_INSN1(ret, nd_line(node), setspecial, INT2FIX(node->nd_cnt)); + ADD_INSN1(ret, nd_line(node), setspecial, key); } /* *flip == 1 */ @@ -4195,7 +4198,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped) COMPILE(ret, "flip2 end", node->nd_end); ADD_INSNL(ret, nd_line(node), branchunless, ltrue); ADD_INSN1(ret, nd_line(node), putobject, Qfalse); - ADD_INSN1(ret, nd_line(node), setspecial, INT2FIX(node->nd_cnt)); + ADD_INSN1(ret, nd_line(node), setspecial, key); ADD_LABEL(ret, ltrue); ADD_INSN1(ret, nd_line(node), putobject, Qtrue); |
