mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
ZJIT: Implement StringIntern
codegen (#14207)
* ZJIT: Add test and implement display for StringIntern HIR Co-authored-by: Emily Samp <emily.samp@shopify.com> * ZJIT: Implement StringIntern codegen Co-authored-by: Emily Samp <emily.samp@shopify.com> * ZJIT: Fix StringIntern's return type --------- Co-authored-by: Emily Samp <emily.samp@shopify.com>
This commit is contained in:
parent
2b16f27a35
commit
549a326f86
3 changed files with 45 additions and 7 deletions
|
@ -72,6 +72,16 @@ class TestZJIT < Test::Unit::TestCase
|
|||
}, insns: [:setglobal]
|
||||
end
|
||||
|
||||
def test_string_intern
|
||||
assert_compiles ':foo123', %q{
|
||||
def test
|
||||
:"foo#{123}"
|
||||
end
|
||||
|
||||
test
|
||||
}, insns: [:intern]
|
||||
end
|
||||
|
||||
def test_setglobal_with_trace_var_exception
|
||||
assert_compiles '"rescued"', %q{
|
||||
def test
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue