summaryrefslogtreecommitdiff
path: root/bootstraptest
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2022-08-08 08:27:54 -0700
committerTakashi Kokubun <takashikkbn@gmail.com>2022-08-29 08:47:08 -0700
commit726a4519550fd9191833e482122e3c7bf9a468be (patch)
tree72aa7b378f2a4c5f4a8649c1a44f035ede02d7fb /bootstraptest
parent46822ee13f4fb8d590c3bd6c66aab71566d68dfe (diff)
downloadruby-726a4519550fd9191833e482122e3c7bf9a468be.tar.gz
Port invokebuiltin* insns to the new backend IR (https://github.com/Shopify/ruby/pull/375)
* Port invokebuiltin* insns to the new backend IR * Fix the C_ARG_OPNDS check boundary
Diffstat (limited to 'bootstraptest')
-rw-r--r--bootstraptest/test_yjit.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/bootstraptest/test_yjit.rb b/bootstraptest/test_yjit.rb
index 826e0066fa..0f9150e388 100644
--- a/bootstraptest/test_yjit.rb
+++ b/bootstraptest/test_yjit.rb
@@ -3143,3 +3143,25 @@ assert_equal '["a", "b"]', %q{
end
foo
}
+
+# invokebuiltin
+assert_equal '123', %q{
+ def foo(obj)
+ obj.foo = 123
+ end
+
+ struct = Struct.new(:foo)
+ obj = struct.new
+ foo(obj)
+}
+
+# invokebuiltin_delegate
+assert_equal '.', %q{
+ def foo(path)
+ Dir.open(path).path
+ end
+ foo(".")
+}
+
+# opt_invokebuiltin_delegate_leave
+assert_equal '[0]', %q{"\x00".unpack("c")}