Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion bootstraptest/test_yjit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ def test(name, args)

# regression test for GC marking stubs in invalidated code
assert_normal_exit %q{
skip true unless defined?(GC.compact)
garbage = Array.new(10_000) { [] } # create garbage to cause iseq movement
eval(<<~RUBY)
def foo(n, garbage)
Expand Down Expand Up @@ -157,7 +158,7 @@ def call_foo = foo(0, 1, 2, 3, &->{})

# regression test for invokeblock iseq guard
assert_equal 'ok', %q{
return :ok unless defined?(GC.compact)
skip :ok unless defined?(GC.compact)
def foo = yield
10.times do |i|
ret = eval("foo { #{i} }")
Expand Down Expand Up @@ -1229,6 +1230,7 @@ def special.[](idx)

# Test that object references in generated code get marked and moved
assert_equal "good", %q{
skip :good unless defined?(GC.compact)
def bar
"good"
end
Expand Down Expand Up @@ -2321,6 +2323,7 @@ def foo(obj)

# Test EP == BP invalidation with moving ISEQs
assert_equal 'ok', %q{
skip :ok unless defined?(GC.compact)
def entry
ok = proc { :ok } # set #entry as an EP-escaping ISEQ
[nil].reverse_each do # avoid exiting the JIT frame on the constant
Expand Down