path: root/compile.c
diff options
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-04-21 10:52:52 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-04-21 10:52:52 (GMT)
commita3fe1034c41008df798be2e7fcf19ff5d977bc56 (patch)
tree1c38fd12acbc0a3cb55bb6d0bc89970c3438d86a /compile.c
parentc458aeffd1b4339fed8b31c229b0d007c1b9e052 (diff)
insns.def: checktype
* insns.def (checktype): split branchiftype to checktype and branchif, to make branch condition negation possible. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
1 files changed, 2 insertions, 2 deletions
diff --git a/compile.c b/compile.c
index 9305d4f..af9e136 100644
--- a/compile.c
+++ b/compile.c
@@ -5622,8 +5622,8 @@ compile_evstr(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, i
const unsigned int flag = VM_CALL_FCALL;
LABEL *isstr = NEW_LABEL(line);
ADD_INSN(ret, line, dup);
- ADD_INSN2(ret, line, branchiftype, INT2FIX(T_STRING), isstr);
- LABEL_REF(isstr);
+ ADD_INSN1(ret, line, checktype, INT2FIX(T_STRING));
+ ADD_INSNL(ret, line, branchif, isstr);
ADD_INSN(ret, line, dup);
ADD_SEND_R(ret, line, idTo_s, INT2FIX(0), NULL, INT2FIX(flag), NULL);
ADD_INSN(ret, line, tostring);