Just disable inlining with local varaible for now

This partially reverts commit 712a66b074.

The previous fix made CI strange like:
http://ci.rvm.jp/results/trunk-vm-asserts@silicon-docker/2124178

Let me just downgrade the behavior for now and deal with it later.

[Bug #15971]
This commit is contained in:
Takashi Kokubun 2019-07-03 10:00:50 +09:00
Родитель 07e9a1d998
Коммит 10cc6bc4d9
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 6FFC433B12EE23DD
2 изменённых файлов: 27 добавлений и 0 удалений

Просмотреть файл

@ -331,6 +331,19 @@ inlinable_iseq_p(const struct rb_iseq_constant_body *body)
// * Do not read any `cfp->pc`
if (insn != BIN(leave) && insn_may_depend_on_sp_or_pc(insn, body->iseq_encoded + (pos + 1)))
return false;
// At this moment, `cfp->ep` in an inlined method is not working.
switch (insn) {
case BIN(getlocal):
case BIN(getlocal_WC_0):
case BIN(getlocal_WC_1):
case BIN(setlocal):
case BIN(setlocal_WC_0):
case BIN(setlocal_WC_1):
case BIN(getblockparam):
case BIN(getblockparamproxy):
case BIN(setblockparam):
return false;
}
pos += insn_len(insn);
}
return true;

Просмотреть файл

@ -11,6 +11,7 @@ class TestJIT < Test::Unit::TestCase
IGNORABLE_PATTERNS = [
/\AJIT recompile: .+\n\z/,
/\AJIT inline: .+\n\z/,
/\ASuccessful MJIT finish\n\z/,
]
@ -841,6 +842,19 @@ class TestJIT < Test::Unit::TestCase
end;
end
def test_block_handler_with_possible_frame_omitted_inlining
assert_eval_with_jit("#{<<~"begin;"}\n#{<<~"end;"}", stdout: "70.0\n70.0\n70.0\n", success_count: 2, min_calls: 2)
begin;
def multiply(a, b)
a *= b
end
3.times do
p multiply(7.0, 10.0)
end
end;
end
def test_program_counter_with_regexpmatch
assert_eval_with_jit("#{<<~"begin;"}\n#{<<~"end;"}", stdout: "aa", success_count: 1)
begin;