Skip to main content

ClrOpcode

Enum ClrOpcode 

Source
pub enum ClrOpcode {
Show 76 variants Nop, LdcI4M1, LdcI40, LdcI41, LdcI42, LdcI43, LdcI44, LdcI45, LdcI46, LdcI47, LdcI48, LdcI4S, LdcI4, LdcI8, LdcR4, LdcR8, Ldnull, Ldstr, Ldarg0, Ldarg1, Ldarg2, Ldarg3, Ldloc0, Ldloc1, Ldloc2, Ldloc3, Stloc0, Stloc1, Stloc2, Stloc3, Call, Callvirt, Ret, Newobj, Pop, Dup, Add, Sub, Mul, Div, Ceq, Cgt, Clt, And, Or, Br, Brtrue, Brfalse, Ldloc, Stloc, Ldarg, Starg, Ldloca, Ldfld, Stfld, Ldelem, Stelem, Ldlen, Newarr, Box, Unbox, ConvI4, ConvI8, ConvR4, ConvR8, LdindI4, LdindI8, LdindR4, LdindR8, LdindRef, StindI4, StindI8, StindR4, StindR8, StindRef, Throw,
}
Expand description

CLR opcode enumeration representing all Common Language Runtime instructions.

Variants§

§

Nop

No operation.

§

LdcI4M1

Load constant integer -1 onto the stack.

§

LdcI40

Load constant integer 0 onto the stack.

§

LdcI41

Load constant integer 1 onto the stack.

§

LdcI42

Load constant integer 2 onto the stack.

§

LdcI43

Load constant integer 3 onto the stack.

§

LdcI44

Load constant integer 4 onto the stack.

§

LdcI45

Load constant integer 5 onto the stack.

§

LdcI46

Load constant integer 6 onto the stack.

§

LdcI47

Load constant integer 7 onto the stack.

§

LdcI48

Load constant integer 8 onto the stack.

§

LdcI4S

Load constant integer (signed byte) onto the stack.

§

LdcI4

Load constant int32 onto the stack.

§

LdcI8

Load constant int64 onto the stack.

§

LdcR4

Load constant float32 onto the stack.

§

LdcR8

Load constant float64 onto the stack.

§

Ldnull

Load null reference onto the stack.

§

Ldstr

Load a string literal onto the stack.

§

Ldarg0

Load argument 0 onto the stack.

§

Ldarg1

Load argument 1 onto the stack.

§

Ldarg2

Load argument 2 onto the stack.

§

Ldarg3

Load argument 3 onto the stack.

§

Ldloc0

Load local variable 0 onto the stack.

§

Ldloc1

Load local variable 1 onto the stack.

§

Ldloc2

Load local variable 2

§

Ldloc3

Load local variable 3

§

Stloc0

Store local variable 0

§

Stloc1

Store local variable 1

§

Stloc2

Store local variable 2

§

Stloc3

Store local variable 3

§

Call

Call method

§

Callvirt

Call virtual method

§

Ret

Return

§

Newobj

Create new object

§

Pop

Pop from stack

§

Dup

Duplicate top of stack

§

Add

Add

§

Sub

Subtract

§

Mul

Multiply

§

Div

Divide

§

Ceq

Compare equal

§

Cgt

Compare greater than

§

Clt

Compare less than

§

And

Logical AND

§

Or

Logical OR

§

Br

Branch

§

Brtrue

Branch if true

§

Brfalse

Branch if false

§

Ldloc

Load local variable

§

Stloc

Store local variable

§

Ldarg

Load argument

§

Starg

Store argument

§

Ldloca

Load local address

§

Ldfld

Load field

§

Stfld

Store field

§

Ldelem

Load element

§

Stelem

Store element

§

Ldlen

Load array length

§

Newarr

Create new array

§

Box

Box value type

§

Unbox

Unbox value type

§

ConvI4

Convert to int32

§

ConvI8

Convert to int64

§

ConvR4

Convert to float32

§

ConvR8

Convert to float64

§

LdindI4

Load indirect int32

§

LdindI8

Load indirect int64

§

LdindR4

Load indirect float32

§

LdindR8

Load indirect float64

§

LdindRef

Load indirect reference

§

StindI4

Store indirect int32

§

StindI8

Store indirect int64

§

StindR4

Store indirect float32

§

StindR8

Store indirect float64

§

StindRef

Store indirect reference

§

Throw

Throw exception

Implementations§

Source§

impl ClrOpcode

Source

pub fn to_byte(&self) -> u8

将操作码转换为字节

Source

pub fn from_str(s: &str) -> Option<Self>

从字符串解析操作码

Source

pub fn as_str(&self) -> &'static str

将操作码转换为字符串

Trait Implementations§

Source§

impl Clone for ClrOpcode

Source§

fn clone(&self) -> ClrOpcode

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for ClrOpcode

Source§

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

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

impl Hash for ClrOpcode

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 ClrOpcode

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · 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 Copy for ClrOpcode

Source§

impl Eq for ClrOpcode

Source§

impl StructuralPartialEq for ClrOpcode

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