Skip to content

Commit 52f8441

Browse files
committed
Make gen_opt_aref() delegate to gen_opt_send_without_block() (#9)
Basically mirroring the interpreter for the general case.
1 parent 9ced24d commit 52f8441

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

yjit_codegen.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,6 +1125,8 @@ gen_opt_gt(jitstate_t* jit, ctx_t* ctx)
11251125
return gen_fixnum_cmp(jit, ctx, cmovg);
11261126
}
11271127

1128+
static codegen_status_t gen_opt_send_without_block(jitstate_t *jit, ctx_t *ctx);
1129+
11281130
static codegen_status_t
11291131
gen_opt_aref(jitstate_t *jit, ctx_t *ctx)
11301132
{
@@ -1266,8 +1268,10 @@ gen_opt_aref(jitstate_t *jit, ctx_t *ctx)
12661268
jit_jump_to_next_insn(jit, ctx);
12671269
return YJIT_END_BLOCK;
12681270
}
1269-
1270-
return YJIT_CANT_COMPILE;
1271+
else {
1272+
// General case. Call the [] method.
1273+
return gen_opt_send_without_block(jit, ctx);
1274+
}
12711275
}
12721276

12731277
static codegen_status_t

0 commit comments

Comments
 (0)