diff options
author | Alan Wu <XrXr@users.noreply.github.com> | 2021-12-07 15:37:32 -0500 |
---|---|---|
committer | Alan Wu <XrXr@users.noreply.github.com> | 2021-12-07 17:20:34 -0500 |
commit | 286c07f0dcd7999bfb9cb4889125ebce59dca4cc (patch) | |
tree | 7226c03d1e822ee1824a291588681c46fe977e0a /bootstraptest | |
parent | e51d0d2853126322e8463508aabadc661f45fbe5 (diff) |
YJIT: Remove guard_self_is_heap()
It's superseded by functionality added to jit_guard_known_klass().
In weird situations such as the ones in the included test,
guard_self_is_heap() triggered assertions.
Co-authored-by: Jemma Issroff <jemmaissroff@gmail.com>
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5225
Diffstat (limited to 'bootstraptest')
-rw-r--r-- | bootstraptest/test_yjit.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bootstraptest/test_yjit.rb b/bootstraptest/test_yjit.rb index 140365ee0c..e50d78a9dc 100644 --- a/bootstraptest/test_yjit.rb +++ b/bootstraptest/test_yjit.rb @@ -1,3 +1,14 @@ +assert_equal '[nil, nil, nil, nil, nil, nil]', %q{ + [NilClass, TrueClass, FalseClass, Integer, Float, Symbol].each do |klass| + klass.class_eval("def foo = @foo") + end + + [nil, true, false, 0xFABCAFE, 0.42, :cake].map do |instance| + instance.foo + instance.foo + end +} + assert_equal '0', %q{ # This is a regression test for incomplete invalidation from # opt_setinlinecache. This test might be brittle, so |