MCPcopy Index your code
hub / github.com/RustPython/RustPython / deoptimize

Method deoptimize

crates/compiler-core/src/bytecode/instruction.rs:686–697  ·  view source on GitHub ↗

Map a specialized or instrumented opcode back to its adaptive (base) variant.

(self)

Source from the content-addressed store, hash-verified

684
685 /// Map a specialized or instrumented opcode back to its adaptive (base) variant.
686 pub const fn deoptimize(self) -> Self {
687 match self.deopt() {
688 Some(v) => v,
689 None => {
690 // Instrumented opcodes map back to their base
691 match self.to_base() {
692 Some(v) => v,
693 None => self,
694 }
695 }
696 }
697 }
698
699 /// Number of CACHE code units that follow this instruction.
700 /// _PyOpcode_Caches

Callers 3

instrument_codeFunction · 0.80
mark_stacksFunction · 0.80
original_bytesMethod · 0.80

Calls 2

deoptMethod · 0.80
to_baseMethod · 0.45

Tested by

no test coverage detected