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:
Stan Lo 2025-08-13 21:04:01 +01:00 committed by GitHub
parent 2b16f27a35
commit 549a326f86
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 45 additions and 7 deletions

View file

@ -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