summaryrefslogtreecommitdiff
path: root/yjit_codegen.c
diff options
context:
space:
mode:
authorJohn Hawthorn <[email protected]>2021-09-17 08:38:14 -0700
committerAlan Wu <[email protected]>2021-10-20 18:19:41 -0400
commit2ff26b9ec28c9a4e0ae7a4a009da99fd200cc5e0 (patch)
treeb9525ffdda4eb0ef3524d32cc4a7e97c7a30dc7e /yjit_codegen.c
parenta6cf515e6acdc4c308e8fe8f284fd381b0a0285c (diff)
Fix opt_aset comptime_key check
Diffstat (limited to 'yjit_codegen.c')
-rw-r--r--yjit_codegen.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/yjit_codegen.c b/yjit_codegen.c
index 0aabbec403..5c5fba3627 100644
--- a/yjit_codegen.c
+++ b/yjit_codegen.c
@@ -2187,14 +2187,13 @@ gen_opt_aset(jitstate_t *jit, ctx_t *ctx)
VALUE comptime_recv = jit_peek_at_stack(jit, ctx, 2);
VALUE comptime_key = jit_peek_at_stack(jit, ctx, 1);
- VALUE comptime_val = jit_peek_at_stack(jit, ctx, 0);
// Get the operands from the stack
x86opnd_t recv = ctx_stack_opnd(ctx, 2);
x86opnd_t key = ctx_stack_opnd(ctx, 1);
x86opnd_t val = ctx_stack_opnd(ctx, 0);
- if (CLASS_OF(comptime_recv) == rb_cArray && FIXNUM_P(comptime_val)) {
+ if (CLASS_OF(comptime_recv) == rb_cArray && FIXNUM_P(comptime_key)) {
uint8_t* side_exit = yjit_side_exit(jit, ctx);
// Guard receiver is an Array