#[repr(u16)]pub enum PseudoOpcode {
AnnotationsPlaceholder = 256,
Jump = 257,
JumpIfFalse = 258,
JumpIfTrue = 259,
JumpNoInterrupt = 260,
LoadClosure = 261,
PopBlock = 262,
SetupCleanup = 263,
SetupFinally = 264,
SetupWith = 265,
StoreFastMaybeNull = 266,
}Variants§
AnnotationsPlaceholder = 256
Jump = 257
JumpIfFalse = 258
JumpIfTrue = 259
JumpNoInterrupt = 260
LoadClosure = 261
PopBlock = 262
SetupCleanup = 263
SetupFinally = 264
SetupWith = 265
StoreFastMaybeNull = 266
Implementations§
Source§impl PseudoOpcode
impl PseudoOpcode
Sourcepub const fn as_instruction(&self) -> PseudoInstruction
pub const fn as_instruction(&self) -> PseudoInstruction
Converts this opcode to PseudoInstruction.
Sourcepub const fn deoptimize(self) -> PseudoOpcode
pub const fn deoptimize(self) -> PseudoOpcode
Map a specialized or instrumented opcode back to its adaptive (base) variant.
Source§impl PseudoOpcode
impl PseudoOpcode
pub const fn is_block_push(&self) -> bool
pub const fn is_scope_exit(&self) -> bool
pub const fn is_unconditional_jump(&self) -> bool
pub const fn is_assembler(&self) -> bool
Sourcepub const fn is_terminator(&self) -> bool
pub const fn is_terminator(&self) -> bool
CPython’s IS_TERMINATOR_OPCODE.
Sourcepub const fn is_no_fallthrough(&self) -> bool
pub const fn is_no_fallthrough(&self) -> bool
CPython’s IS_SCOPE_EXIT_OPCODE || IS_UNCONDITIONAL_JUMP_OPCODE.
Sourcepub const fn has_target(&self) -> bool
pub const fn has_target(&self) -> bool
CPython’s HAS_TARGET.
Sourcepub fn stack_effect(&self, oparg: u32) -> i32
pub fn stack_effect(&self, oparg: u32) -> i32
flowgraph.c get_stack_effects block-push non-jump case.
Sourcepub fn stack_effect_jump(&self, oparg: u32) -> i32
pub fn stack_effect_jump(&self, oparg: u32) -> i32
Handler entry effect for SETUP_* pseudo ops.
Fallthrough effect is 0 (NOPs), but when the branch is taken the handler block starts with extra values on the stack: SETUP_FINALLY: +1 (exc) SETUP_CLEANUP: +2 (lasti + exc) SETUP_WITH: +1 (pops enter result, pushes lasti + exc)
Source§impl PseudoOpcode
impl PseudoOpcode
pub const fn cache_entries(self) -> usize
pub const fn deopt(self) -> Option<PseudoOpcode>
Sourcepub const fn has_eval_break(self) -> bool
pub const fn has_eval_break(self) -> bool
Does this opcode have ‘HAS_EVAL_BREAK_FLAG’ set.
pub const fn is_instrumented(self) -> bool
pub fn stack_effect_info(&self, _oparg: u32) -> StackEffect
pub const fn to_base(self) -> Option<PseudoOpcode>
pub const fn to_instrumented(self) -> Option<PseudoOpcode>
pub const fn try_from_u16(value: u16) -> Result<PseudoOpcode, MarshalError>
Trait Implementations§
Source§impl Clone for PseudoOpcode
impl Clone for PseudoOpcode
Source§fn clone(&self) -> PseudoOpcode
fn clone(&self) -> PseudoOpcode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PseudoOpcode
Source§impl Debug for PseudoOpcode
impl Debug for PseudoOpcode
impl Eq for PseudoOpcode
Source§impl From<PseudoInstruction> for PseudoOpcode
impl From<PseudoInstruction> for PseudoOpcode
Source§fn from(instr: PseudoInstruction) -> PseudoOpcode
fn from(instr: PseudoInstruction) -> PseudoOpcode
Converts to this type from the input type.
Source§impl From<PseudoOpcode> for PseudoInstruction
impl From<PseudoOpcode> for PseudoInstruction
Source§fn from(opcode: PseudoOpcode) -> PseudoInstruction
fn from(opcode: PseudoOpcode) -> PseudoInstruction
Converts to this type from the input type.
Source§impl From<PseudoOpcode> for AnyInstruction
impl From<PseudoOpcode> for AnyInstruction
Source§fn from(value: PseudoOpcode) -> AnyInstruction
fn from(value: PseudoOpcode) -> AnyInstruction
Converts to this type from the input type.
Source§impl From<PseudoOpcode> for AnyOpcode
impl From<PseudoOpcode> for AnyOpcode
Source§fn from(value: PseudoOpcode) -> AnyOpcode
fn from(value: PseudoOpcode) -> AnyOpcode
Converts to this type from the input type.
Source§impl PartialEq for PseudoOpcode
impl PartialEq for PseudoOpcode
impl StructuralPartialEq for PseudoOpcode
Source§impl TryFrom<u16> for PseudoOpcode
impl TryFrom<u16> for PseudoOpcode
Source§type Error = MarshalError
type Error = MarshalError
The type returned in the event of a conversion error.
Source§fn try_from(
value: u16,
) -> Result<PseudoOpcode, <PseudoOpcode as TryFrom<u16>>::Error>
fn try_from( value: u16, ) -> Result<PseudoOpcode, <PseudoOpcode as TryFrom<u16>>::Error>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for PseudoOpcode
impl RefUnwindSafe for PseudoOpcode
impl Send for PseudoOpcode
impl Sync for PseudoOpcode
impl Unpin for PseudoOpcode
impl UnsafeUnpin for PseudoOpcode
impl UnwindSafe for PseudoOpcode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> Helper for T
Source§impl<T, U> ImaginaryInto<U> for Twhere
U: ImaginaryFrom<T>,
impl<T, U> ImaginaryInto<U> for Twhere
U: ImaginaryFrom<T>,
fn imaginary_into(self) -> U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more