YJIT: handle out of shape situation in gen_setinstancevariable (#8857)
If the VM ran out of shape, `rb_shape_transition_shape_capa` might return `OBJ_TOO_COMPLEX_SHAPE`. Co-authored-by: Jean Boussier <byroot@ruby-lang.org>
This commit is contained in:
parent
96557bc276
commit
a294bb844c
@ -2473,7 +2473,11 @@ fn gen_setinstancevariable(
|
|||||||
};
|
};
|
||||||
|
|
||||||
let dest_shape = if let Some(capa_shape) = capa_shape {
|
let dest_shape = if let Some(capa_shape) = capa_shape {
|
||||||
unsafe { rb_shape_get_next(capa_shape, comptime_receiver, ivar_name) }
|
if OBJ_TOO_COMPLEX_SHAPE_ID == unsafe { rb_shape_id(capa_shape) } {
|
||||||
|
capa_shape
|
||||||
|
} else {
|
||||||
|
unsafe { rb_shape_get_next(capa_shape, comptime_receiver, ivar_name) }
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
unsafe { rb_shape_get_next(shape, comptime_receiver, ivar_name) }
|
unsafe { rb_shape_get_next(shape, comptime_receiver, ivar_name) }
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user