diff options
author | Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com> | 2021-08-25 16:51:41 -0400 |
---|---|---|
committer | Alan Wu <XrXr@users.noreply.github.com> | 2021-10-20 18:19:39 -0400 |
commit | 0562459473f44c270784074a09a33ea30d68e457 (patch) | |
tree | 045928b692ac99e6431f4eb3282fc00020519e8b | |
parent | b3e993a64bb10e20280a7a5c604f9f0fe3939a4b (diff) |
Redo the ivtable lookp once the ivar is set
-rw-r--r-- | yjit_codegen.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/yjit_codegen.c b/yjit_codegen.c index aaac15b1cb..abb6e6d3dd 100644 --- a/yjit_codegen.c +++ b/yjit_codegen.c @@ -1446,7 +1446,9 @@ gen_get_ivar(jitstate_t *jit, ctx_t *ctx, const int max_chain_depth, VALUE compt if (!iv_index_tbl || !rb_iv_index_tbl_lookup(iv_index_tbl, id, &ent)) { rb_ivar_set(comptime_receiver, id, Qundef); iv_index_tbl = ROBJECT_IV_INDEX_TBL(comptime_receiver); - RUBY_ASSERT(iv_index_tbl && rb_iv_index_tbl_lookup(iv_index_tbl, id, &ent)); + RUBY_ASSERT(iv_index_tbl); + // Redo the lookup + RUBY_ASSERT_ALWAYS(rb_iv_index_tbl_lookup(iv_index_tbl, id, &ent)); } uint32_t ivar_index = ent->index; |