From 4c7afa64b49d792da586709b2bbc1aa2f04b5712 Mon Sep 17 00:00:00 2001 From: Alan Wu Date: Thu, 22 Apr 2021 22:11:44 -0400 Subject: [PATCH] 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) 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) 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