From f492e3b4e5ed30f6a592a3b644228bd335af7284 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Mon, 24 Apr 2023 12:20:52 -0700 Subject: [PATCH] YJIT: Use general definedivar at the end of chains (#7756) --- yjit/src/codegen.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yjit/src/codegen.rs b/yjit/src/codegen.rs index 280b4e2c4c..c6f766f0fa 100644 --- a/yjit/src/codegen.rs +++ b/yjit/src/codegen.rs @@ -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