#[repr(u8)]pub enum Instruction {
Show 227 variants
Cache = 0,
BinarySlice = 1,
BuildTemplate = 2,
BinaryOpInplaceAddUnicode = 3,
CallFunctionEx = 4,
CheckEgMatch = 5,
CheckExcMatch = 6,
CleanupThrow = 7,
DeleteSubscr = 8,
EndFor = 9,
EndSend = 10,
ExitInitCheck = 11,
FormatSimple = 12,
FormatWithSpec = 13,
GetAiter = 14,
GetAnext = 15,
GetIter = 16,
Reserved = 17,
GetLen = 18,
GetYieldFromIter = 19,
InterpreterExit = 20,
LoadBuildClass = 21,
LoadLocals = 22,
MakeFunction = 23,
MatchKeys = 24,
MatchMapping = 25,
MatchSequence = 26,
Nop = 27,
NotTaken = 28,
PopExcept = 29,
PopIter = 30,
PopTop = 31,
PushExcInfo = 32,
PushNull = 33,
ReturnGenerator = 34,
ReturnValue = 35,
SetupAnnotations = 36,
StoreSlice = 37,
StoreSubscr = 38,
ToBool = 39,
UnaryInvert = 40,
UnaryNegative = 41,
UnaryNot = 42,
WithExceptStart = 43,
BinaryOp {
op: Arg<BinaryOperator>,
},
BuildInterpolation {
format: Arg<u32>,
},
BuildList {
count: Arg<u32>,
},
BuildMap {
count: Arg<u32>,
},
BuildSet {
count: Arg<u32>,
},
BuildSlice {
argc: Arg<BuildSliceArgCount>,
},
BuildString {
count: Arg<u32>,
},
BuildTuple {
count: Arg<u32>,
},
Call {
argc: Arg<u32>,
},
CallIntrinsic1 {
func: Arg<IntrinsicFunction1>,
},
CallIntrinsic2 {
func: Arg<IntrinsicFunction2>,
},
CallKw {
argc: Arg<u32>,
},
CompareOp {
opname: Arg<ComparisonOperator>,
},
ContainsOp {
invert: Arg<Invert>,
},
ConvertValue {
oparg: Arg<ConvertValueOparg>,
},
Copy {
i: Arg<u32>,
},
CopyFreeVars {
n: Arg<u32>,
},
DeleteAttr {
namei: Arg<u32>,
},
DeleteDeref {
i: Arg<VarNum>,
},
DeleteFast {
var_num: Arg<VarNum>,
},
DeleteGlobal {
namei: Arg<u32>,
},
DeleteName {
namei: Arg<u32>,
},
DictMerge {
i: Arg<u32>,
},
DictUpdate {
i: Arg<u32>,
},
EndAsyncFor = 68,
ExtendedArg = 69,
ForIter {
delta: Arg<Label>,
},
GetAwaitable {
where: Arg<u32>,
},
ImportFrom {
namei: Arg<u32>,
},
ImportName {
namei: Arg<u32>,
},
IsOp {
invert: Arg<Invert>,
},
JumpBackward {
delta: Arg<Label>,
},
JumpBackwardNoInterrupt {
delta: Arg<Label>,
},
JumpForward {
delta: Arg<Label>,
},
ListAppend {
i: Arg<u32>,
},
ListExtend {
i: Arg<u32>,
},
LoadAttr {
namei: Arg<LoadAttr>,
},
LoadCommonConstant {
idx: Arg<CommonConstant>,
},
LoadConst {
consti: Arg<ConstIdx>,
},
LoadDeref {
i: Arg<VarNum>,
},
LoadFast {
var_num: Arg<VarNum>,
},
LoadFastAndClear {
var_num: Arg<VarNum>,
},
LoadFastBorrow {
var_num: Arg<VarNum>,
},
LoadFastBorrowLoadFastBorrow {
var_nums: Arg<VarNums>,
},
LoadFastCheck {
var_num: Arg<VarNum>,
},
LoadFastLoadFast {
var_nums: Arg<VarNums>,
},
LoadFromDictOrDeref {
i: Arg<VarNum>,
},
LoadFromDictOrGlobals {
i: Arg<u32>,
},
LoadGlobal {
namei: Arg<u32>,
},
LoadName {
namei: Arg<u32>,
},
LoadSmallInt {
i: Arg<u32>,
},
LoadSpecial {
method: Arg<SpecialMethod>,
},
LoadSuperAttr {
namei: Arg<LoadSuperAttr>,
},
MakeCell {
i: Arg<VarNum>,
},
MapAdd {
i: Arg<u32>,
},
MatchClass {
count: Arg<u32>,
},
PopJumpIfFalse {
delta: Arg<Label>,
},
PopJumpIfNone {
delta: Arg<Label>,
},
PopJumpIfNotNone {
delta: Arg<Label>,
},
PopJumpIfTrue {
delta: Arg<Label>,
},
RaiseVarargs {
argc: Arg<RaiseKind>,
},
Reraise {
depth: Arg<u32>,
},
Send {
delta: Arg<Label>,
},
SetAdd {
i: Arg<u32>,
},
SetFunctionAttribute {
flag: Arg<MakeFunctionFlag>,
},
SetUpdate {
i: Arg<u32>,
},
StoreAttr {
namei: Arg<u32>,
},
StoreDeref {
i: Arg<VarNum>,
},
StoreFast {
var_num: Arg<VarNum>,
},
StoreFastLoadFast {
var_nums: Arg<VarNums>,
},
StoreFastStoreFast {
var_nums: Arg<VarNums>,
},
StoreGlobal {
namei: Arg<u32>,
},
StoreName {
namei: Arg<u32>,
},
Swap {
i: Arg<u32>,
},
UnpackEx {
counts: Arg<UnpackExArgs>,
},
UnpackSequence {
count: Arg<u32>,
},
YieldValue {
arg: Arg<u32>,
},
Resume {
context: Arg<ResumeContext>,
},
BinaryOpAddFloat = 129,
BinaryOpAddInt = 130,
BinaryOpAddUnicode = 131,
BinaryOpExtend = 132,
BinaryOpMultiplyFloat = 133,
BinaryOpMultiplyInt = 134,
BinaryOpSubscrDict = 135,
BinaryOpSubscrGetitem = 136,
BinaryOpSubscrListInt = 137,
BinaryOpSubscrListSlice = 138,
BinaryOpSubscrStrInt = 139,
BinaryOpSubscrTupleInt = 140,
BinaryOpSubtractFloat = 141,
BinaryOpSubtractInt = 142,
CallAllocAndEnterInit = 143,
CallBoundMethodExactArgs = 144,
CallBoundMethodGeneral = 145,
CallBuiltinClass = 146,
CallBuiltinFast = 147,
CallBuiltinFastWithKeywords = 148,
CallBuiltinO = 149,
CallIsinstance = 150,
CallKwBoundMethod = 151,
CallKwNonPy = 152,
CallKwPy = 153,
CallLen = 154,
CallListAppend = 155,
CallMethodDescriptorFast = 156,
CallMethodDescriptorFastWithKeywords = 157,
CallMethodDescriptorNoargs = 158,
CallMethodDescriptorO = 159,
CallNonPyGeneral = 160,
CallPyExactArgs = 161,
CallPyGeneral = 162,
CallStr1 = 163,
CallTuple1 = 164,
CallType1 = 165,
CompareOpFloat = 166,
CompareOpInt = 167,
CompareOpStr = 168,
ContainsOpDict = 169,
ContainsOpSet = 170,
ForIterGen = 171,
ForIterList = 172,
ForIterRange = 173,
ForIterTuple = 174,
JumpBackwardJit = 175,
JumpBackwardNoJit = 176,
LoadAttrClass = 177,
LoadAttrClassWithMetaclassCheck = 178,
LoadAttrGetattributeOverridden = 179,
LoadAttrInstanceValue = 180,
LoadAttrMethodLazyDict = 181,
LoadAttrMethodNoDict = 182,
LoadAttrMethodWithValues = 183,
LoadAttrModule = 184,
LoadAttrNondescriptorNoDict = 185,
LoadAttrNondescriptorWithValues = 186,
LoadAttrProperty = 187,
LoadAttrSlot = 188,
LoadAttrWithHint = 189,
LoadConstImmortal = 190,
LoadConstMortal = 191,
LoadGlobalBuiltin = 192,
LoadGlobalModule = 193,
LoadSuperAttrAttr = 194,
LoadSuperAttrMethod = 195,
ResumeCheck = 196,
SendGen = 197,
StoreAttrInstanceValue = 198,
StoreAttrSlot = 199,
StoreAttrWithHint = 200,
StoreSubscrDict = 201,
StoreSubscrListInt = 202,
ToBoolAlwaysTrue = 203,
ToBoolBool = 204,
ToBoolInt = 205,
ToBoolList = 206,
ToBoolNone = 207,
ToBoolStr = 208,
UnpackSequenceList = 209,
UnpackSequenceTuple = 210,
UnpackSequenceTwoTuple = 211,
InstrumentedEndFor = 234,
InstrumentedPopIter = 235,
InstrumentedEndSend = 236,
InstrumentedForIter = 237,
InstrumentedInstruction = 238,
InstrumentedJumpForward = 239,
InstrumentedNotTaken = 240,
InstrumentedPopJumpIfTrue = 241,
InstrumentedPopJumpIfFalse = 242,
InstrumentedPopJumpIfNone = 243,
InstrumentedPopJumpIfNotNone = 244,
InstrumentedResume = 245,
InstrumentedReturnValue = 246,
InstrumentedYieldValue = 247,
InstrumentedEndAsyncFor = 248,
InstrumentedLoadSuperAttr = 249,
InstrumentedCall = 250,
InstrumentedCallKw = 251,
InstrumentedCallFunctionEx = 252,
InstrumentedJumpBackward = 253,
InstrumentedLine = 254,
EnterExecutor = 255,
}Variants§
Cache = 0
BinarySlice = 1
BuildTemplate = 2
BinaryOpInplaceAddUnicode = 3
CallFunctionEx = 4
CheckEgMatch = 5
CheckExcMatch = 6
CleanupThrow = 7
DeleteSubscr = 8
EndFor = 9
EndSend = 10
ExitInitCheck = 11
FormatSimple = 12
FormatWithSpec = 13
GetAiter = 14
GetAnext = 15
GetIter = 16
Reserved = 17
GetLen = 18
GetYieldFromIter = 19
InterpreterExit = 20
LoadBuildClass = 21
LoadLocals = 22
MakeFunction = 23
MatchKeys = 24
MatchMapping = 25
MatchSequence = 26
Nop = 27
NotTaken = 28
PopExcept = 29
PopIter = 30
PopTop = 31
PushExcInfo = 32
PushNull = 33
ReturnGenerator = 34
ReturnValue = 35
SetupAnnotations = 36
StoreSlice = 37
StoreSubscr = 38
ToBool = 39
UnaryInvert = 40
UnaryNegative = 41
UnaryNot = 42
WithExceptStart = 43
BinaryOp
Fields
§
op: Arg<BinaryOperator>BuildInterpolation
BuildList
BuildMap
BuildSet
BuildSlice
Fields
§
argc: Arg<BuildSliceArgCount>BuildString
BuildTuple
Call
CallIntrinsic1
Fields
§
func: Arg<IntrinsicFunction1>CallIntrinsic2
Fields
§
func: Arg<IntrinsicFunction2>CallKw
CompareOp
Fields
§
opname: Arg<ComparisonOperator>ContainsOp
ConvertValue
Fields
§
oparg: Arg<ConvertValueOparg>Copy
CopyFreeVars
DeleteAttr
DeleteDeref
DeleteFast
DeleteGlobal
DeleteName
DictMerge
DictUpdate
EndAsyncFor = 68
ExtendedArg = 69
ForIter
GetAwaitable
ImportFrom
ImportName
IsOp
JumpBackward
JumpBackwardNoInterrupt
JumpForward
ListAppend
ListExtend
LoadAttr
LoadCommonConstant
Fields
§
idx: Arg<CommonConstant>LoadConst
LoadDeref
LoadFast
LoadFastAndClear
LoadFastBorrow
LoadFastBorrowLoadFastBorrow
LoadFastCheck
LoadFastLoadFast
LoadFromDictOrDeref
LoadFromDictOrGlobals
LoadGlobal
LoadName
LoadSmallInt
LoadSpecial
Fields
§
method: Arg<SpecialMethod>LoadSuperAttr
Fields
§
namei: Arg<LoadSuperAttr>MakeCell
MapAdd
MatchClass
PopJumpIfFalse
PopJumpIfNone
PopJumpIfNotNone
PopJumpIfTrue
RaiseVarargs
Reraise
Send
SetAdd
SetFunctionAttribute
Fields
§
flag: Arg<MakeFunctionFlag>SetUpdate
StoreAttr
StoreDeref
StoreFast
StoreFastLoadFast
StoreFastStoreFast
StoreGlobal
StoreName
Swap
UnpackEx
Fields
§
counts: Arg<UnpackExArgs>UnpackSequence
YieldValue
Resume
Fields
§
context: Arg<ResumeContext>BinaryOpAddFloat = 129
BinaryOpAddInt = 130
BinaryOpAddUnicode = 131
BinaryOpExtend = 132
BinaryOpMultiplyFloat = 133
BinaryOpMultiplyInt = 134
BinaryOpSubscrDict = 135
BinaryOpSubscrGetitem = 136
BinaryOpSubscrListInt = 137
BinaryOpSubscrListSlice = 138
BinaryOpSubscrStrInt = 139
BinaryOpSubscrTupleInt = 140
BinaryOpSubtractFloat = 141
BinaryOpSubtractInt = 142
CallAllocAndEnterInit = 143
CallBoundMethodExactArgs = 144
CallBoundMethodGeneral = 145
CallBuiltinClass = 146
CallBuiltinFast = 147
CallBuiltinFastWithKeywords = 148
CallBuiltinO = 149
CallIsinstance = 150
CallKwBoundMethod = 151
CallKwNonPy = 152
CallKwPy = 153
CallLen = 154
CallListAppend = 155
CallMethodDescriptorFast = 156
CallMethodDescriptorFastWithKeywords = 157
CallMethodDescriptorNoargs = 158
CallMethodDescriptorO = 159
CallNonPyGeneral = 160
CallPyExactArgs = 161
CallPyGeneral = 162
CallStr1 = 163
CallTuple1 = 164
CallType1 = 165
CompareOpFloat = 166
CompareOpInt = 167
CompareOpStr = 168
ContainsOpDict = 169
ContainsOpSet = 170
ForIterGen = 171
ForIterList = 172
ForIterRange = 173
ForIterTuple = 174
JumpBackwardJit = 175
JumpBackwardNoJit = 176
LoadAttrClass = 177
LoadAttrClassWithMetaclassCheck = 178
LoadAttrGetattributeOverridden = 179
LoadAttrInstanceValue = 180
LoadAttrMethodLazyDict = 181
LoadAttrMethodNoDict = 182
LoadAttrMethodWithValues = 183
LoadAttrModule = 184
LoadAttrNondescriptorNoDict = 185
LoadAttrNondescriptorWithValues = 186
LoadAttrProperty = 187
LoadAttrSlot = 188
LoadAttrWithHint = 189
LoadConstImmortal = 190
LoadConstMortal = 191
LoadGlobalBuiltin = 192
LoadGlobalModule = 193
LoadSuperAttrAttr = 194
LoadSuperAttrMethod = 195
ResumeCheck = 196
SendGen = 197
StoreAttrInstanceValue = 198
StoreAttrSlot = 199
StoreAttrWithHint = 200
StoreSubscrDict = 201
StoreSubscrListInt = 202
ToBoolAlwaysTrue = 203
ToBoolBool = 204
ToBoolInt = 205
ToBoolList = 206
ToBoolNone = 207
ToBoolStr = 208
UnpackSequenceList = 209
UnpackSequenceTuple = 210
UnpackSequenceTwoTuple = 211
InstrumentedEndFor = 234
InstrumentedPopIter = 235
InstrumentedEndSend = 236
InstrumentedForIter = 237
InstrumentedInstruction = 238
InstrumentedJumpForward = 239
InstrumentedNotTaken = 240
InstrumentedPopJumpIfTrue = 241
InstrumentedPopJumpIfFalse = 242
InstrumentedPopJumpIfNone = 243
InstrumentedPopJumpIfNotNone = 244
InstrumentedResume = 245
InstrumentedReturnValue = 246
InstrumentedYieldValue = 247
InstrumentedEndAsyncFor = 248
InstrumentedLoadSuperAttr = 249
InstrumentedCall = 250
InstrumentedCallKw = 251
InstrumentedCallFunctionEx = 252
InstrumentedJumpBackward = 253
InstrumentedLine = 254
EnterExecutor = 255
Implementations§
Source§impl Instruction
impl Instruction
pub const fn label_arg(&self) -> Option<Arg<Label>>
pub const fn to_base(self) -> Option<Instruction>
pub const fn to_instrumented(self) -> Option<Instruction>
Sourcepub const fn is_instrumented(&self) -> bool
pub const fn is_instrumented(&self) -> bool
Returns true if this is any instrumented opcode.
pub const fn is_unconditional_jump(&self) -> bool
pub const fn is_block_push(&self) -> bool
pub const fn is_scope_exit(&self) -> bool
pub const fn is_terminator(&self) -> bool
pub const fn is_no_fallthrough(&self) -> bool
pub const fn has_target(&self) -> bool
pub const fn has_jump(&self) -> bool
pub const fn has_arg(&self) -> bool
pub const fn has_const(&self) -> bool
pub const fn has_eval_break(&self) -> bool
pub const fn is_assembler(&self) -> bool
pub const fn cache_entries(&self) -> usize
Sourcepub const fn deoptimize(&self) -> Instruction
pub const fn deoptimize(&self) -> Instruction
Map a specialized or instrumented opcode back to its adaptive (base) variant.
pub fn stack_effect_jump(&self, oparg: u32) -> i32
pub fn stack_effect_info(&self, oparg: u32) -> StackEffect
pub fn stack_effect(&self, oparg: u32) -> i32
Trait Implementations§
Source§impl Clone for Instruction
impl Clone for Instruction
Source§fn clone(&self) -> Instruction
fn clone(&self) -> Instruction
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 Instruction
Source§impl Debug for Instruction
impl Debug for Instruction
Source§impl From<Instruction> for Opcode
impl From<Instruction> for Opcode
Source§fn from(instr: Instruction) -> Opcode
fn from(instr: Instruction) -> Opcode
Converts to this type from the input type.
Source§impl From<Instruction> for AnyInstruction
impl From<Instruction> for AnyInstruction
Source§fn from(value: Instruction) -> AnyInstruction
fn from(value: Instruction) -> AnyInstruction
Converts to this type from the input type.
Source§impl From<Opcode> for Instruction
impl From<Opcode> for Instruction
Source§fn from(opcode: Opcode) -> Instruction
fn from(opcode: Opcode) -> Instruction
Converts to this type from the input type.
Source§impl TryFrom<u8> for Instruction
impl TryFrom<u8> for Instruction
Source§type Error = MarshalError
type Error = MarshalError
The type returned in the event of a conversion error.
Source§fn try_from(
value: u8,
) -> Result<Instruction, <Instruction as TryFrom<u8>>::Error>
fn try_from( value: u8, ) -> Result<Instruction, <Instruction as TryFrom<u8>>::Error>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for Instruction
impl RefUnwindSafe for Instruction
impl Send for Instruction
impl Sync for Instruction
impl Unpin for Instruction
impl UnsafeUnpin for Instruction
impl UnwindSafe for Instruction
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,
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