diff options
author | Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com> | 2021-03-05 15:45:44 -0500 |
---|---|---|
committer | Alan Wu <XrXr@users.noreply.github.com> | 2021-10-20 18:19:31 -0400 |
commit | 7f4000b1f430c22fd35c50201271d0abd4fff358 (patch) | |
tree | 19df66a7015d924311d8587e58785cf62a1bff8c /bootstraptest | |
parent | f8b4082be4e63876b6bf7d1aa66eaaa9bcb5d4ca (diff) | |
download | ruby-7f4000b1f430c22fd35c50201271d0abd4fff358.tar.gz |
Machinery to implement deferred compilation
Diffstat (limited to 'bootstraptest')
-rw-r--r-- | bootstraptest/test_yjit.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/bootstraptest/test_yjit.rb b/bootstraptest/test_yjit.rb index 0f67c6ebbb..cf79ccd101 100644 --- a/bootstraptest/test_yjit.rb +++ b/bootstraptest/test_yjit.rb @@ -190,6 +190,28 @@ assert_normal_exit %q{ end } +# Test getinstancevariable and inline caches +assert_equal '6', %q{ + class Foo + def initialize + @x1 = 1 + @x2 = 1 + @x2 = 1 + @x3 = 1 + @x4 = 3 + end + + def bar + x = 1 + @x4 + @x4 + end + end + + f = Foo.new + f.bar + f.bar +} + # Test that getinstancevariable codegen checks for extended table size assert_equal "nil\n", %q{ class A |