Skip to main content

Opcode

Enum Opcode 

Source
pub enum Opcode {
Show 154 variants STOP = 0, ADD = 1, MUL = 2, SUB = 3, DIV = 4, SDIV = 5, MOD = 6, SMOD = 7, ADDMOD = 8, MULMOD = 9, EXP = 10, SIGNEXTEND = 11, LT = 16, GT = 17, SLT = 18, SGT = 19, EQ = 20, ISZERO = 21, AND = 22, OR = 23, XOR = 24, NOT = 25, BYTE = 26, SHL = 27, SHR = 28, SAR = 29, CLZ = 30, KECCAK256 = 32, ADDRESS = 48, BALANCE = 49, ORIGIN = 50, CALLER = 51, CALLVALUE = 52, CALLDATALOAD = 53, CALLDATASIZE = 54, CALLDATACOPY = 55, CODESIZE = 56, CODECOPY = 57, GASPRICE = 58, EXTCODESIZE = 59, EXTCODECOPY = 60, RETURNDATASIZE = 61, RETURNDATACOPY = 62, EXTCODEHASH = 63, BLOCKHASH = 64, COINBASE = 65, TIMESTAMP = 66, NUMBER = 67, PREVRANDAO = 68, GASLIMIT = 69, CHAINID = 70, SELFBALANCE = 71, BASEFEE = 72, BLOBHASH = 73, BLOBBASEFEE = 74, SLOTNUM = 75, POP = 80, MLOAD = 81, MSTORE = 82, MSTORE8 = 83, SLOAD = 84, SSTORE = 85, JUMP = 86, JUMPI = 87, PC = 88, MSIZE = 89, GAS = 90, JUMPDEST = 91, TLOAD = 92, TSTORE = 93, MCOPY = 94, PUSH0 = 95, PUSH1 = 96, PUSH2 = 97, PUSH3 = 98, PUSH4 = 99, PUSH5 = 100, PUSH6 = 101, PUSH7 = 102, PUSH8 = 103, PUSH9 = 104, PUSH10 = 105, PUSH11 = 106, PUSH12 = 107, PUSH13 = 108, PUSH14 = 109, PUSH15 = 110, PUSH16 = 111, PUSH17 = 112, PUSH18 = 113, PUSH19 = 114, PUSH20 = 115, PUSH21 = 116, PUSH22 = 117, PUSH23 = 118, PUSH24 = 119, PUSH25 = 120, PUSH26 = 121, PUSH27 = 122, PUSH28 = 123, PUSH29 = 124, PUSH30 = 125, PUSH31 = 126, PUSH32 = 127, DUP1 = 128, DUP2 = 129, DUP3 = 130, DUP4 = 131, DUP5 = 132, DUP6 = 133, DUP7 = 134, DUP8 = 135, DUP9 = 136, DUP10 = 137, DUP11 = 138, DUP12 = 139, DUP13 = 140, DUP14 = 141, DUP15 = 142, DUP16 = 143, SWAP1 = 144, SWAP2 = 145, SWAP3 = 146, SWAP4 = 147, SWAP5 = 148, SWAP6 = 149, SWAP7 = 150, SWAP8 = 151, SWAP9 = 152, SWAP10 = 153, SWAP11 = 154, SWAP12 = 155, SWAP13 = 156, SWAP14 = 157, SWAP15 = 158, SWAP16 = 159, LOG0 = 160, LOG1 = 161, LOG2 = 162, LOG3 = 163, LOG4 = 164, DUPN = 230, SWAPN = 231, EXCHANGE = 232, CREATE = 240, CALL = 241, CALLCODE = 242, RETURN = 243, DELEGATECALL = 244, CREATE2 = 245, STATICCALL = 250, REVERT = 253, INVALID = 254, SELFDESTRUCT = 255,
}

Variants§

§

STOP = 0

§

ADD = 1

§

MUL = 2

§

SUB = 3

§

DIV = 4

§

SDIV = 5

§

MOD = 6

§

SMOD = 7

§

ADDMOD = 8

§

MULMOD = 9

§

EXP = 10

§

SIGNEXTEND = 11

§

LT = 16

§

GT = 17

§

SLT = 18

§

SGT = 19

§

EQ = 20

§

ISZERO = 21

§

AND = 22

§

OR = 23

§

XOR = 24

§

NOT = 25

§

BYTE = 26

§

SHL = 27

§

SHR = 28

§

SAR = 29

§

CLZ = 30

§

KECCAK256 = 32

§

ADDRESS = 48

§

BALANCE = 49

§

ORIGIN = 50

§

CALLER = 51

§

CALLVALUE = 52

§

CALLDATALOAD = 53

§

CALLDATASIZE = 54

§

CALLDATACOPY = 55

§

CODESIZE = 56

§

CODECOPY = 57

§

GASPRICE = 58

§

EXTCODESIZE = 59

§

EXTCODECOPY = 60

§

RETURNDATASIZE = 61

§

RETURNDATACOPY = 62

§

EXTCODEHASH = 63

§

BLOCKHASH = 64

§

COINBASE = 65

§

TIMESTAMP = 66

§

NUMBER = 67

§

PREVRANDAO = 68

§

GASLIMIT = 69

§

CHAINID = 70

§

SELFBALANCE = 71

§

BASEFEE = 72

§

BLOBHASH = 73

§

BLOBBASEFEE = 74

§

SLOTNUM = 75

§

POP = 80

§

MLOAD = 81

§

MSTORE = 82

§

MSTORE8 = 83

§

SLOAD = 84

§

SSTORE = 85

§

JUMP = 86

§

JUMPI = 87

§

PC = 88

§

MSIZE = 89

§

GAS = 90

§

JUMPDEST = 91

§

TLOAD = 92

§

TSTORE = 93

§

MCOPY = 94

§

PUSH0 = 95

§

PUSH1 = 96

§

PUSH2 = 97

§

PUSH3 = 98

§

PUSH4 = 99

§

PUSH5 = 100

§

PUSH6 = 101

§

PUSH7 = 102

§

PUSH8 = 103

§

PUSH9 = 104

§

PUSH10 = 105

§

PUSH11 = 106

§

PUSH12 = 107

§

PUSH13 = 108

§

PUSH14 = 109

§

PUSH15 = 110

§

PUSH16 = 111

§

PUSH17 = 112

§

PUSH18 = 113

§

PUSH19 = 114

§

PUSH20 = 115

§

PUSH21 = 116

§

PUSH22 = 117

§

PUSH23 = 118

§

PUSH24 = 119

§

PUSH25 = 120

§

PUSH26 = 121

§

PUSH27 = 122

§

PUSH28 = 123

§

PUSH29 = 124

§

PUSH30 = 125

§

PUSH31 = 126

§

PUSH32 = 127

§

DUP1 = 128

§

DUP2 = 129

§

DUP3 = 130

§

DUP4 = 131

§

DUP5 = 132

§

DUP6 = 133

§

DUP7 = 134

§

DUP8 = 135

§

DUP9 = 136

§

DUP10 = 137

§

DUP11 = 138

§

DUP12 = 139

§

DUP13 = 140

§

DUP14 = 141

§

DUP15 = 142

§

DUP16 = 143

§

SWAP1 = 144

§

SWAP2 = 145

§

SWAP3 = 146

§

SWAP4 = 147

§

SWAP5 = 148

§

SWAP6 = 149

§

SWAP7 = 150

§

SWAP8 = 151

§

SWAP9 = 152

§

SWAP10 = 153

§

SWAP11 = 154

§

SWAP12 = 155

§

SWAP13 = 156

§

SWAP14 = 157

§

SWAP15 = 158

§

SWAP16 = 159

§

LOG0 = 160

§

LOG1 = 161

§

LOG2 = 162

§

LOG3 = 163

§

LOG4 = 164

§

DUPN = 230

§

SWAPN = 231

§

EXCHANGE = 232

§

CREATE = 240

§

CALL = 241

§

CALLCODE = 242

§

RETURN = 243

§

DELEGATECALL = 244

§

CREATE2 = 245

§

STATICCALL = 250

§

REVERT = 253

§

INVALID = 254

§

SELFDESTRUCT = 255

Trait Implementations§

Source§

impl Clone for Opcode

Source§

fn clone(&self) -> Opcode

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Opcode

Source§

impl Debug for Opcode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Opcode

Source§

impl From<Opcode> for u8

Source§

fn from(opcode: Opcode) -> Self

Converts to this type from the input type.
Source§

impl From<Opcode> for usize

Source§

fn from(opcode: Opcode) -> Self

Converts to this type from the input type.
Source§

impl From<u8> for Opcode

Source§

fn from(byte: u8) -> Self

Converts to this type from the input type.
Source§

impl FromStr for Opcode

Source§

type Err = ParseError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Opcode, <Self as FromStr>::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for Opcode

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Opcode

Source§

fn eq(&self, other: &Opcode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Opcode

Source§

fn partial_cmp(&self, other: &Opcode) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl StructuralPartialEq for Opcode

Source§

impl TryFrom<&str> for Opcode

Source§

type Error = ParseError

The type returned in the event of a conversion error.
Source§

fn try_from(s: &str) -> Result<Opcode, <Self as TryFrom<&str>>::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> ArchivePointee for T

Source§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
Source§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
Source§

impl<T> AsOut<T> for T
where T: Copy,

Source§

fn as_out(&mut self) -> Out<'_, T>

Returns an out reference to self.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T, U> ExactFrom<T> for U
where U: TryFrom<T>,

Source§

fn exact_from(value: T) -> U

Source§

impl<T, U> ExactInto<U> for T
where U: ExactFrom<T>,

Source§

fn exact_into(self) -> U

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> LayoutRaw for T

Source§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Returns the layout of the type.
Source§

impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
where T: SharedNiching<N1, N2>, N1: Niching<T>, N2: Niching<T>,

Source§

unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool

Returns whether the given value has been niched. Read more
Source§

fn resolve_niched(out: Place<NichedOption<T, N1>>)

Writes data to out indicating that a T is niched.
Source§

impl<T, U> OverflowingInto<U> for T
where U: OverflowingFrom<T>,

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Pointee for T

Source§

type Metadata = ()

The metadata type for pointers and references to this type.
Source§

impl<T, U> RoundingInto<U> for T
where U: RoundingFrom<T>,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> SaturatingInto<U> for T
where U: SaturatingFrom<T>,

Source§

impl<T> ToDebugString for T
where T: Debug,

Source§

fn to_debug_string(&self) -> String

Returns the String produced by Ts Debug implementation.

§Examples
use malachite_base::strings::ToDebugString;

assert_eq!([1, 2, 3].to_debug_string(), "[1, 2, 3]");
assert_eq!(
    [vec![2, 3], vec![], vec![4]].to_debug_string(),
    "[[2, 3], [], [4]]"
);
assert_eq!(Some(5).to_debug_string(), "Some(5)");
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T, U> WrappingInto<U> for T
where U: WrappingFrom<T>,

Source§

fn wrapping_into(self) -> U