Skip to content

Commit 44fe95e

Browse files
committed
ZJIT: Fix HasType effect
1 parent d5cca09 commit 44fe95e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

zjit/src/hir.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1258,7 +1258,11 @@ impl Insn {
12581258
Insn::CheckInterrupts { .. } => Effect::read_write(abstract_heaps::InterruptFlag, abstract_heaps::Control),
12591259
Insn::InvokeProc { .. } => effects::Any,
12601260
Insn::RefineType { .. } => effects::Empty,
1261-
Insn::HasType { .. } => effects::Empty,
1261+
Insn::HasType { expected, .. }
1262+
=> Effect::read_write(
1263+
if expected.is_subtype(types::Immediate) { abstract_heaps::Empty } else { abstract_heaps::Memory },
1264+
abstract_heaps::Control
1265+
),
12621266
Insn::Entries { .. } => effects::Any,
12631267
}
12641268
}

0 commit comments

Comments
 (0)