YJIT: Bump SEND_MAX_DEPTH to 20 (#7469)

* YJIT: Bump SEND_MAX_DEPTH to 20

* Fix a test failure
This commit is contained in:
Takashi Kokubun 2023-03-10 14:14:38 -08:00 committed by GitHub
parent 76808b1ee4
commit 83f6eee76c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
Notes: git 2023-03-10 22:15:00 +00:00
Merged-By: maximecb <maximecb@ruby-lang.org>
2 changed files with 5 additions and 3 deletions

View File

@ -353,9 +353,10 @@ fn verify_ctx(jit: &JITState, ctx: &Context) {
// If the actual type differs from the learned type
if val_type.diff(learned_type) == TypeDiff::Incompatible {
panic!(
"verify_ctx: ctx type ({:?}) incompatible with actual value on stack: {}",
"verify_ctx: ctx type ({:?}) incompatible with actual value on stack: {} ({:?})",
learned_type,
obj_info_str(stack_val)
obj_info_str(stack_val),
val_type,
);
}
}
@ -1884,7 +1885,7 @@ pub const SET_IVAR_MAX_DEPTH: i32 = 10;
pub const OPT_AREF_MAX_CHAIN_DEPTH: i32 = 2;
// up to 10 different classes
pub const SEND_MAX_DEPTH: i32 = 10;
pub const SEND_MAX_DEPTH: i32 = 20;
// up to 20 different methods for send
pub const SEND_MAX_CHAIN_DEPTH: i32 = 20;

View File

@ -141,6 +141,7 @@ impl Type {
Type::HeapSymbol => true,
Type::TString => true,
Type::CString => true,
Type::BlockParamProxy => true,
_ => false,
}
}