diff options
author | Alan Wu <[email protected]> | 2025-04-07 13:34:44 -0400 |
---|---|---|
committer | Takashi Kokubun <[email protected]> | 2025-04-18 21:53:01 +0900 |
commit | 3e57c4dceba54b23e0c186591da98d045a8d4be1 (patch) | |
tree | 56d0a2c172c26c5910b28f957751e640f3b25fbe /test/ruby | |
parent | 97ba8d9c4dbfd8d277b0214aa1306356db586e77 (diff) |
Strength reduce to `CCall` for sends landing in simple C methods
A new optimization pass. Also:
- Printing for `Insn::CCall`
- Wrap `ID` and add convenience method for printing, replacing calls to rb_id2name()
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_zjit.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_zjit.rb b/test/ruby/test_zjit.rb index 494d474107..444df8e044 100644 --- a/test/ruby/test_zjit.rb +++ b/test/ruby/test_zjit.rb @@ -9,6 +9,14 @@ require_relative '../lib/jit_support' return unless JITSupport.zjit_supported? class TestZJIT < Test::Unit::TestCase + def test_call_itself + assert_compiles '42', <<~RUBY, call_threshold: 2 + def test = 42.itself + test + test + RUBY + end + def test_nil assert_compiles 'nil', %q{ def test = nil |