1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Simpler fix for -DUSE_EMBED_CI=0

Nobu pointed out that saving the old ci to a local is enough to keep it
reachable.
This commit is contained in:
Alan Wu 2021-07-26 20:19:01 -04:00
parent 8cf01dd25c
commit 5b4305f71c

View file

@ -3456,11 +3456,11 @@ insn_set_specialized_instruction(rb_iseq_t *iseq, INSN *iobj, int insn_id)
iobj->operand_size = insn_len(insn_id) - 1;
if (insn_id == BIN(opt_neq)) {
VALUE *old_operands = iobj->operands;
VALUE original_ci = iobj->operands[0];
iobj->operand_size = 2;
iobj->operands = compile_data_calloc2(iseq, iobj->operand_size, sizeof(VALUE));
iobj->operands[0] = (VALUE)new_callinfo(iseq, idEq, 1, 0, NULL, FALSE);
iobj->operands[1] = old_operands[0];
iobj->operands[1] = original_ci;
}
return COMPILE_OK;