ruby-changes:69088
From: Alan <ko1@a...>
Date: Thu, 21 Oct 2021 08:20:47 +0900 (JST)
Subject: [ruby-changes:69088] 5b4305f71c (master): Simpler fix for -DUSE_EMBED_CI=0
https://git.ruby-lang.org/ruby.git/commit/?id=5b4305f71c From 5b4305f71c90d498c91d7b5038758e3557938802 Mon Sep 17 00:00:00 2001 From: Alan Wu <XrXr@u...> Date: Mon, 26 Jul 2021 20:19:01 -0400 Subject: Simpler fix for -DUSE_EMBED_CI=0 Nobu pointed out that saving the old ci to a local is enough to keep it reachable. --- compile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compile.c b/compile.c index ecc123f0a2..810f74073a 100644 --- a/compile.c +++ b/compile.c @@ -3456,11 +3456,11 @@ insn_set_specialized_instruction(rb_iseq_t *iseq, INSN *iobj, int insn_id) https://github.com/ruby/ruby/blob/trunk/compile.c#L3456 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; -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/