pub enum InstKind {
Show 23 variants
Declare {
local: ValueId,
},
Unary {
op: UnOp,
value: ValueId,
},
Binary {
op: BinOp,
lhs: ValueId,
rhs: ValueId,
},
Cast {
kind: CastKind,
value: ValueId,
to: TypeId,
},
AggregateConstruct {
ty: TypeId,
args: Vec<ValueId>,
},
Bind {
src: ValueId,
},
MemCopy {
src: ValueId,
},
Load {
src: ValueId,
},
AggregateAccess {
value: ValueId,
indices: Vec<ValueId>,
},
MapAccess {
key: ValueId,
value: ValueId,
},
Call {
func: FunctionId,
args: Vec<ValueId>,
call_type: CallType,
},
Jump {
dest: BasicBlockId,
},
Branch {
cond: ValueId,
then: BasicBlockId,
else_: BasicBlockId,
},
Switch {
disc: ValueId,
table: SwitchTable,
default: Option<BasicBlockId>,
},
Revert {
arg: Option<ValueId>,
},
Emit {
arg: ValueId,
},
Return {
arg: Option<ValueId>,
},
Keccak256 {
arg: ValueId,
},
AbiEncode {
arg: ValueId,
},
Nop,
Create {
value: ValueId,
contract: ContractId,
},
Create2 {
value: ValueId,
salt: ValueId,
contract: ContractId,
},
YulIntrinsic {
op: YulIntrinsicOp,
args: Vec<ValueId>,
},
}
Variants§
Declare
This is not a real instruction, just used to tag a position where a local is declared.
Unary
Unary instruction.
Binary
Binary instruction.
Cast
AggregateConstruct
Constructs aggregate value, i.e. struct, tuple and array.
Bind
MemCopy
Load
Load a primitive value from a ptr
AggregateAccess
Access to aggregate fields or elements.
§Example
struct Foo:
x: i32
y: Array<i32, 8>
foo.y
is lowered into `AggregateAccess(foo, [1])’ for example.
MapAccess
Call
Jump
Unconditional jump instruction.
Fields
§
dest: BasicBlockId
Branch
Conditional branching instruction.
Switch
Revert
Emit
Return
Keccak256
AbiEncode
Nop
Create
Create2
YulIntrinsic
Trait Implementations§
impl Eq for InstKind
impl StructuralPartialEq for InstKind
Auto Trait Implementations§
impl Freeze for InstKind
impl RefUnwindSafe for InstKind
impl Send for InstKind
impl Sync for InstKind
impl Unpin for InstKind
impl UnwindSafe for InstKind
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.