Enum evmil::Instruction

source ·
pub enum Instruction {
Show 79 variants STOP, ADD, MUL, SUB, DIV, SDIV, MOD, SMOD, ADDMOD, MULMOD, EXP, SIGNEXTEND, LT, GT, SLT, SGT, EQ, ISZERO, AND, OR, XOR, NOT, BYTE, SHL, SHR, SAR, KECCAK256, ADDRESS, BALANCE, ORIGIN, CALLER, CALLVALUE, CALLDATALOAD, CALLDATASIZE, CALLDATACOPY, CODESIZE, CODECOPY, GASPRICE, EXTCODESIZE, EXTCODECOPY, RETURNDATASIZE, RETURNDATACOPY, EXTCODEHASH, BLOCKHASH, COINBASE, TIMESTAMP, NUMBER, DIFFICULTY, GASLIMIT, CHAINID, SELFBALANCE, POP, MLOAD, MSTORE, MSTORE8, SLOAD, SSTORE, JUMP, JUMPI, PC, MSIZE, GAS, JUMPDEST(usize), PUSH(Vec<u8>), PUSHL(usize), DUP(u8), SWAP(u8), LOG(u8), CREATE, CALL, CALLCODE, RETURN, DELEGATECALL, CREATE2, STATICCALL, REVERT, INVALID, SELFDESTRUCT, DATA(Vec<u8>),
}

Variants§

§

STOP

§

ADD

§

MUL

§

SUB

§

DIV

§

SDIV

§

MOD

§

SMOD

§

ADDMOD

§

MULMOD

§

EXP

§

SIGNEXTEND

§

LT

§

GT

§

SLT

§

SGT

§

EQ

§

ISZERO

§

AND

§

OR

§

XOR

§

NOT

§

BYTE

§

SHL

§

SHR

§

SAR

§

KECCAK256

§

ADDRESS

§

BALANCE

§

ORIGIN

§

CALLER

§

CALLVALUE

§

CALLDATALOAD

§

CALLDATASIZE

§

CALLDATACOPY

§

CODESIZE

§

CODECOPY

§

GASPRICE

§

EXTCODESIZE

§

EXTCODECOPY

§

RETURNDATASIZE

§

RETURNDATACOPY

§

EXTCODEHASH

§

BLOCKHASH

§

COINBASE

§

TIMESTAMP

§

NUMBER

§

DIFFICULTY

§

GASLIMIT

§

CHAINID

§

SELFBALANCE

§

POP

§

MLOAD

§

MSTORE

§

MSTORE8

§

SLOAD

§

SSTORE

§

JUMP

§

JUMPI

§

PC

§

MSIZE

§

GAS

§

JUMPDEST(usize)

§

PUSH(Vec<u8>)

§

PUSHL(usize)

§

DUP(u8)

§

SWAP(u8)

§

LOG(u8)

§

CREATE

§

CALL

§

CALLCODE

§

RETURN

§

DELEGATECALL

§

CREATE2

§

STATICCALL

§

REVERT

§

INVALID

§

SELFDESTRUCT

§

DATA(Vec<u8>)

Implementations§

Determine whether or not control can continue to the next instruction.

Determine whether or not this instruction can branch. That is, whether or not it is a JUMP or JUMPI instruction.

Encode an instruction into a byte sequence, assuming a given set of label offsets.

Determine the length of this instruction (in bytes) assuming a given set of label offsets.

Determine the opcode for a given instruction. In many cases, this is a straightforward mapping. However, in other cases, its slightly more involved as a calculation involving the operands is required.

Decode the next instruction in a given sequence of bytes. Observe that this never returns a PUSHL instruction. This is because it cannot determine whether a given operand will be used as a jump destination. A separate analysis is required to “lift” PUSH instructions to PUSHL instructions.

Trait Implementations§

Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.