From 8ca399d64023fd13bd17bc38132610ccb2ccc598 Mon Sep 17 00:00:00 2001 From: ywenc Date: Wed, 26 Jul 2023 10:38:59 -0400 Subject: Implement `opt_aref_with` instruction (#8118) Implement gen_opt_aref_with Vm opt_aref_with is available Test opt_aref_with Stats for opt_aref_with Co-authored-by: jhawthorn --- test/ruby/test_yjit.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_yjit.rb b/test/ruby/test_yjit.rb index 6e8070199d..61f86b7178 100644 --- a/test/ruby/test_yjit.rb +++ b/test/ruby/test_yjit.rb @@ -1289,6 +1289,14 @@ class TestYJIT < Test::Unit::TestCase RUBY end + def test_opt_aref_with + assert_compiles(<<~RUBY, insns: %i[opt_aref_with], result: "bar") + h = {"foo" => "bar"} + + h["foo"] + RUBY + end + private def code_gc_helpers -- cgit v1.2.3