mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Add another test for frame omitted inlining
This commit is contained in:
parent
a5f9306065
commit
e6a0a954c9
1 changed files with 16 additions and 0 deletions
|
@ -859,6 +859,22 @@ class TestJIT < Test::Unit::TestCase
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_frame_omitted_inlining
|
||||||
|
assert_eval_with_jit("#{<<~"begin;"}\n#{<<~"end;"}", stdout: "true\ntrue\ntrue\n", success_count: 1, min_calls: 2)
|
||||||
|
begin;
|
||||||
|
class Numeric
|
||||||
|
remove_method :zero?
|
||||||
|
def zero?
|
||||||
|
self == 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
3.times do
|
||||||
|
p 0.zero?
|
||||||
|
end
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
|
||||||
def test_block_handler_with_possible_frame_omitted_inlining
|
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)
|
assert_eval_with_jit("#{<<~"begin;"}\n#{<<~"end;"}", stdout: "70.0\n70.0\n70.0\n", success_count: 2, min_calls: 2)
|
||||||
begin;
|
begin;
|
||||||
|
|
Loading…
Reference in a new issue