ruby-changes:68917
From: Alan <ko1@a...>
Date: Thu, 21 Oct 2021 08:16:35 +0900 (JST)
Subject: [ruby-changes:68917] 4c7afa64b4 (master): Make gen_opt_aref() delegate to gen_opt_send_without_block() (#9)
https://git.ruby-lang.org/ruby.git/commit/?id=4c7afa64b4 From 4c7afa64b49d792da586709b2bbc1aa2f04b5712 Mon Sep 17 00:00:00 2001 From: Alan Wu <XrXr@u...> Date: Thu, 22 Apr 2021 22:11:44 -0400 Subject: Make gen_opt_aref() delegate to gen_opt_send_without_block() (#9) Basically mirroring the interpreter for the general case. --- yjit_codegen.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/yjit_codegen.c b/yjit_codegen.c index 1808522f57..9fd8476e3d 100644 --- a/yjit_codegen.c +++ b/yjit_codegen.c @@ -1125,6 +1125,8 @@ gen_opt_gt(jitstate_t* jit, ctx_t* ctx) https://github.com/ruby/ruby/blob/trunk/yjit_codegen.c#L1125 return gen_fixnum_cmp(jit, ctx, cmovg); } +static codegen_status_t gen_opt_send_without_block(jitstate_t *jit, ctx_t *ctx); + static codegen_status_t gen_opt_aref(jitstate_t *jit, ctx_t *ctx) { @@ -1266,8 +1268,10 @@ gen_opt_aref(jitstate_t *jit, ctx_t *ctx) https://github.com/ruby/ruby/blob/trunk/yjit_codegen.c#L1268 jit_jump_to_next_insn(jit, ctx); return YJIT_END_BLOCK; } - - return YJIT_CANT_COMPILE; + else { + // General case. Call the [] method. + return gen_opt_send_without_block(jit, ctx); + } } static codegen_status_t -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/