[][src]Enum rustpython_bytecode::bytecode::Instruction

pub enum Instruction {
    Import {
        name: String,
        symbols: Vec<String>,
        level: usize,
    },
    ImportStar {
        name: String,
        level: usize,
    },
    LoadName {
        name: String,
        scope: NameScope,
    },
    StoreName {
        name: String,
        scope: NameScope,
    },
    DeleteName {
        name: String,
    },
    StoreSubscript,
    DeleteSubscript,
    StoreAttr {
        name: String,
    },
    DeleteAttr {
        name: String,
    },
    LoadConst {
        value: Constant,
    },
    UnaryOperation {
        op: UnaryOperator,
    },
    BinaryOperation {
        op: BinaryOperator,
        inplace: bool,
    },
    LoadAttr {
        name: String,
    },
    CompareOperation {
        op: ComparisonOperator,
    },
    Pop,
    Rotate {
        amount: usize,
    },
    Duplicate,
    GetIter,
    Pass,
    Continue,
    Break,
    Jump {
        target: Label,
    },
    JumpIf {
        target: Label,
    },
    JumpIfFalse {
        target: Label,
    },
    MakeFunction {
        flags: FunctionOpArg,
    },
    CallFunction {
        typ: CallType,
    },
    ForIter {
        target: Label,
    },
    ReturnValue,
    YieldValue,
    YieldFrom,
    SetupLoop {
        start: Label,
        end: Label,
    },
    SetupExcept {
        handler: Label,
    },
    SetupWith {
        end: Label,
    },
    CleanupWith {
        end: Label,
    },
    PopBlock,
    Raise {
        argc: usize,
    },
    BuildString {
        size: usize,
    },
    BuildTuple {
        size: usize,
        unpack: bool,
    },
    BuildList {
        size: usize,
        unpack: bool,
    },
    BuildSet {
        size: usize,
        unpack: bool,
    },
    BuildMap {
        size: usize,
        unpack: bool,
    },
    BuildSlice {
        size: usize,
    },
    ListAppend {
        i: usize,
    },
    SetAdd {
        i: usize,
    },
    MapAdd {
        i: usize,
    },
    PrintExpr,
    LoadBuildClass,
    UnpackSequence {
        size: usize,
    },
    UnpackEx {
        before: usize,
        after: usize,
    },
    Unpack,
    FormatValue {
        conversion: Option<ConversionFlag>,
        spec: String,
    },
    PopException,
}

A Single bytecode instruction.

Variants

Import

Fields of Import

name: Stringsymbols: Vec<String>level: usize
ImportStar

Fields of ImportStar

name: Stringlevel: usize
LoadName

Fields of LoadName

name: Stringscope: NameScope
StoreName

Fields of StoreName

name: Stringscope: NameScope
DeleteName

Fields of DeleteName

name: String
StoreSubscriptDeleteSubscriptStoreAttr

Fields of StoreAttr

name: String
DeleteAttr

Fields of DeleteAttr

name: String
LoadConst

Fields of LoadConst

value: Constant
UnaryOperation

Fields of UnaryOperation

op: UnaryOperator
BinaryOperation

Fields of BinaryOperation

op: BinaryOperatorinplace: bool
LoadAttr

Fields of LoadAttr

name: String
CompareOperation

Fields of CompareOperation

op: ComparisonOperator
PopRotate

Fields of Rotate

amount: usize
DuplicateGetIterPassContinueBreakJump

Fields of Jump

target: Label
JumpIf

Fields of JumpIf

target: Label
JumpIfFalse

Fields of JumpIfFalse

target: Label
MakeFunction

Fields of MakeFunction

flags: FunctionOpArg
CallFunction

Fields of CallFunction

typ: CallType
ForIter

Fields of ForIter

target: Label
ReturnValueYieldValueYieldFromSetupLoop

Fields of SetupLoop

start: Labelend: Label
SetupExcept

Fields of SetupExcept

handler: Label
SetupWith

Fields of SetupWith

end: Label
CleanupWith

Fields of CleanupWith

end: Label
PopBlockRaise

Fields of Raise

argc: usize
BuildString

Fields of BuildString

size: usize
BuildTuple

Fields of BuildTuple

size: usizeunpack: bool
BuildList

Fields of BuildList

size: usizeunpack: bool
BuildSet

Fields of BuildSet

size: usizeunpack: bool
BuildMap

Fields of BuildMap

size: usizeunpack: bool
BuildSlice

Fields of BuildSlice

size: usize
ListAppend

Fields of ListAppend

i: usize
SetAdd

Fields of SetAdd

i: usize
MapAdd

Fields of MapAdd

i: usize
PrintExprLoadBuildClassUnpackSequence

Fields of UnpackSequence

size: usize
UnpackEx

Fields of UnpackEx

before: usizeafter: usize
UnpackFormatValue

Fields of FormatValue

conversion: Option<ConversionFlag>spec: String
PopException

Trait Implementations

impl Clone for Instruction[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl PartialEq<Instruction> for Instruction[src]

impl Debug for Instruction[src]

impl Serialize for Instruction[src]

impl<'de> Deserialize<'de> for Instruction[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]