Skip to content

Commit a02cb2e

Browse files
need to look up the ivar on the new shape..........
Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
1 parent 4d52ee0 commit a02cb2e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

zjit/src/hir.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2950,6 +2950,8 @@ impl Function {
29502950
// We're only looking at T_OBJECT so ignore all of the imemo stuff.
29512951
assert!(recv_type.flags().is_t_object());
29522952
let next_shape_id = unsafe { rb_class_shape_transition_add_ivar_no_warnings(class, current_shape_id.0, id) };
2953+
let ivar_result = unsafe { rb_shape_get_iv_index(next_shape_id, id, &mut ivar_index) };
2954+
assert!(ivar_result, "New shape must have the ivar index");
29532955
// If the VM ran out of shapes, or this class generated too many leaf,
29542956
// it may be de-optimized into OBJ_TOO_COMPLEX_SHAPE (hash-table).
29552957
let new_shape_too_complex = unsafe { rb_jit_shape_too_complex_p(next_shape_id) };

0 commit comments

Comments
 (0)