diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2023-11-07 07:54:33 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-07 10:54:33 -0500 |
commit | 9877f3ada8019f559dc0f86911ef4bbddddb5677 (patch) | |
tree | 5b5debc885378002423dd95fa9a30b293447c03a /bootstraptest | |
parent | a294bb844c697799d8ba766aa2e5ba5449d05448 (diff) | |
download | ruby-9877f3ada8019f559dc0f86911ef4bbddddb5677.tar.gz |
YJIT: Inline basic Ruby methods (#8855)
* YJIT: Inline basic Ruby methods
* YJIT: Fix "InsnOut operand made it past register allocation"
checktype should not generate a useless instruction.
Diffstat (limited to 'bootstraptest')
-rw-r--r-- | bootstraptest/test_yjit.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/bootstraptest/test_yjit.rb b/bootstraptest/test_yjit.rb index be99d580c1..a2a05c45d7 100644 --- a/bootstraptest/test_yjit.rb +++ b/bootstraptest/test_yjit.rb @@ -4196,3 +4196,24 @@ assert_equal '[6, -6, 9671406556917033397649408, -9671406556917033397649408, 212 # Integer multiplication and overflow (minimized regression test from test-basic) assert_equal '8515157028618240000', %q{2128789257154560000 * 4} + +# Inlined method calls +assert_equal 'nil', %q{ + def putnil = nil + def entry = putnil + entry.inspect +} +assert_equal '1', %q{ + def putobject_1 = 1 + def entry = putobject_1 + entry +} +assert_equal 'false', %q{ + def putobject(_unused_arg1) = false + def entry = putobject(nil) + entry +} +assert_equal 'true', %q{ + def entry = yield + entry { true } +} |