Skip to content

Commit eafbf6e

Browse files
committed
ZJIT: Fix IsA effect
1 parent 44fe95e commit eafbf6e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

zjit/src/hir.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1165,7 +1165,8 @@ impl Insn {
11651165
Insn::GetConstantPath { .. } => effects::Any,
11661166
Insn::IsBlockGiven { .. } => Effect::read_write(abstract_heaps::Other, abstract_heaps::Empty),
11671167
Insn::FixnumBitCheck { .. } => effects::Empty,
1168-
Insn::IsA { .. } => effects::Empty,
1168+
// IsA needs to read the class of the value and traverse the class hierarchy, which we model as reading from Memory.
1169+
Insn::IsA { .. } => Effect::read_write(abstract_heaps::Memory, abstract_heaps::Empty),
11691170
Insn::GetGlobal { .. } => effects::Any,
11701171
Insn::SetGlobal { .. } => effects::Any,
11711172
Insn::GetIvar { .. } => effects::Any,

0 commit comments

Comments
 (0)