diff options
author | Alan Wu <[email protected]> | 2021-04-22 22:11:44 -0400 |
---|---|---|
committer | Alan Wu <[email protected]> | 2021-10-20 18:19:34 -0400 |
commit | 4c7afa64b49d792da586709b2bbc1aa2f04b5712 (patch) | |
tree | eb90b56fce74055ff24ca056ac17eefcd48c1316 /yjit_codegen.c | |
parent | eaf039af982b19a854ad705cd441144ae648b791 (diff) |
Make gen_opt_aref() delegate to gen_opt_send_without_block() (#9)
Basically mirroring the interpreter for the general case.
Diffstat (limited to 'yjit_codegen.c')
-rw-r--r-- | yjit_codegen.c | 8 |
1 files 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 |