Skip to content

Commit 2954b60

Browse files
committed
Improve specialization guards and fix mark_stacks
- CONTAINS_OP_SET: add frozenset support in handler and specialize - TO_BOOL_ALWAYS_TRUE: cache type version instead of checking slots - LOAD_GLOBAL_BUILTIN: cache builtins dict version alongside globals - mark_stacks: deoptimize specialized opcodes for correct reachability
1 parent acd4a9b commit 2954b60

File tree

2 files changed

+196
-95
lines changed

2 files changed

+196
-95
lines changed

crates/vm/src/builtins/frame.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@ pub(crate) mod stack_analysis {
182182
}
183183
oparg = (oparg << 8) | u32::from(u8::from(instructions[i].arg));
184184

185-
// De-instrument: get the underlying real instruction
186-
let opcode = opcode.to_base().unwrap_or(opcode);
185+
// De-instrument and de-specialize: get the underlying base instruction
186+
let opcode = opcode.to_base().unwrap_or(opcode).deoptimize();
187187

188188
let caches = opcode.cache_entries();
189189
let next_i = i + 1 + caches;

0 commit comments

Comments
 (0)