YJIT: Use general definedivar at the end of chains (#7756)

This commit is contained in:
Takashi Kokubun 2023-04-24 12:20:52 -07:00 committed by GitHub
parent f84d94b803
commit f492e3b4e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
Notes: git 2023-04-24 19:21:13 +00:00
Merged-By: k0kubun <takashikkbn@gmail.com>

View File

@ -2417,7 +2417,7 @@ fn gen_definedivar(
// Specialize base on compile time values
let comptime_receiver = jit.peek_at_self();
if comptime_receiver.shape_too_complex() {
if comptime_receiver.shape_too_complex() || asm.ctx.get_chain_depth() as i32 >= GET_IVAR_MAX_DEPTH {
// Fall back to calling rb_ivar_defined
// Save the PC and SP because the callee may allocate