Make gen_opt_aref() delegate to gen_opt_send_without_block() (#9)

Basically mirroring the interpreter for the general case.
This commit is contained in:
Alan Wu 2021-04-22 22:11:44 -04:00
parent eaf039af98
commit 4c7afa64b4
1 changed files with 6 additions and 2 deletions

View File

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