Enum OpCode
- Namespace
- ICSharpCode.Decompiler.IL
- Assembly
- ICSharpCode.Decompiler.dll
Enum representing the type of an ILInstruction.
public enum OpCode : byte
Fields
AddressOf = 35
Stores the value into an anonymous temporary variable, and returns the address of that variable.
AnyNode = 98
Matches any node
Arglist = 12
Retrieves the RuntimeArgumentHandle.
Await = 95
C# await operator.
BinaryNumericInstruction = 7
Common instruction for add, sub, mul, div, rem, bit.and, bit.or, bit.xor, shl and shr.
BitNot = 11
Bitwise NOT
Block = 5
A block of IL instructions.
BlockContainer = 4
A container of IL blocks.
Box = 63
Boxes a value.
Branch = 13
Unconditional branch.
goto target;
Call = 27
Non-virtual method call.
CallIndirect = 29
Unsafe function pointer call.
CallVirt = 28
Virtual method call.
CastClass = 59
Casts an object to a class.
Ckfinite = 30
Checks that the input float is not NaN or infinite.
Comp = 26
Comparison. The inputs must be both integers; or both floats; or both object references. Object references can only be compared for equality or inequality. Floating-point comparisons evaluate to 0 (false) when an input is NaN, except for 'NaN != NaN' which evaluates to 1 (true).
Conv = 31
Numeric cast.
Cpblk = 55
memcpy(destAddress, sourceAddress, size);
DebugBreak = 25
Breakpoint instruction
DeconstructInstruction = 96
Deconstruction statement
DeconstructResultInstruction = 97
Represents a deconstructed value
DefaultValue = 68
Returns the default value for a type.
DynamicBinaryOperatorInstruction = 79
ILAst representation of a binary operator inside a dynamic expression (maps to Binder.BinaryOperation).
DynamicCompoundAssign = 10
Common instruction for dynamic compound assignments.
DynamicConvertInstruction = 81
ILAst representation of a cast inside a dynamic expression (maps to Binder.Convert).
DynamicGetIndexInstruction = 84
ILAst representation of an indexer get method call inside a dynamic expression (maps to Binder.GetIndex).
DynamicGetMemberInstruction = 82
ILAst representation of a property get method call inside a dynamic expression (maps to Binder.GetMember).
DynamicInvokeConstructorInstruction = 87
ILAst representation of a constuctor invocation inside a dynamic expression (maps to Binder.InvokeConstructor).
DynamicInvokeInstruction = 88
ILAst representation of a delegate invocation inside a dynamic expression (maps to Binder.Invoke).
DynamicInvokeMemberInstruction = 86
ILAst representation of a method call inside a dynamic expression (maps to Binder.InvokeMember).
DynamicIsEventInstruction = 89
ILAst representation of a call to the Binder.IsEvent method inside a dynamic expression.
DynamicLogicOperatorInstruction = 78
ILAst representation of a short-circuiting binary operator inside a dynamic expression.
DynamicSetIndexInstruction = 85
ILAst representation of an indexer set method call inside a dynamic expression (maps to Binder.SetIndex).
DynamicSetMemberInstruction = 83
ILAst representation of a property set method call inside a dynamic expression (maps to Binder.SetMember).
DynamicUnaryOperatorInstruction = 80
ILAst representation of a unary operator inside a dynamic expression (maps to Binder.UnaryOperation).
ExpressionTreeCast = 76
ILAst representation of Expression.Convert.
GetPinnableReference = 74
Retrieves a pinnable reference for the input object. The input must be an object reference (O). If the input is an array/string, evaluates to a reference to the first element/character, or to a null reference if the array is null or empty. Otherwise, uses the GetPinnableReference method to get the reference, or evaluates to a null reference if the input is null.
ILFunction = 3
A container of IL blocks.
IfInstruction = 15
If statement / conditional expression.
if (condition) trueExpr else falseExpr
Initblk = 56
memset(address, value, size)
InvalidBranch = 0
Represents invalid IL. Semantically, this instruction is considered to throw some kind of exception.
InvalidExpression = 1
Represents invalid IL. Semantically, this instruction is considered to produce some kind of value.
IsInst = 60
Test if object is instance of class or interface.
LdElema = 73
Load address of array element.
LdFlda = 57
Load address of instance field
LdFtn = 48
Load method pointer
LdLen = 72
Returns the length of an array as 'native unsigned int'.
LdLoc = 32
Loads the value of a local variable. (ldarg/ldloc)
LdLoca = 33
Loads the address of a local variable. (ldarga/ldloca)
LdMemberToken = 52
Loads runtime representation of metadata token
LdNull = 47
Loads the null reference.
LdObj = 61
Indirect load (ref/pointer dereference).
LdStr = 40
Loads a constant string.
LdStrUtf8 = 41
Loads a constant byte string (as ReadOnlySpan<byte>).
LdTypeToken = 51
Loads runtime representation of metadata token
LdVirtDelegate = 50
Virtual delegate construction
LdVirtFtn = 49
Load method pointer
LdcDecimal = 46
Loads a constant decimal.
LdcF4 = 44
Loads a constant 32-bit floating-point number.
LdcF8 = 45
Loads a constant 64-bit floating-point number.
LdcI4 = 42
Loads a constant 32-bit integer.
LdcI8 = 43
Loads a constant 64-bit integer.
LdsFlda = 58
Load static field address
Leave = 14
Unconditional branch to end of block container. Return is represented using IsLeavingFunction and an (optional) return value. The block container evaluates to the value produced by the argument of the leave instruction.
LocAlloc = 53
Allocates space in the stack frame
LocAllocSpan = 54
Allocates space in the stack frame and wraps it in a Span
LockInstruction = 23
Lock statement
MakeRefAny = 91
Push a typed reference of type class onto the stack.
MatchInstruction = 90
ILAst representation of C# patterns
NewArr = 67
Creates an array instance.
NewObj = 66
Creates an object instance and calls the constructor.
Nop = 2
No operation. Takes 0 arguments and returns void.
NullCoalescingInstruction = 16
Null coalescing operator expression.
if.notnull(valueInst, fallbackInst)
NullableRewrap = 39
Serves as jump target for the nullable.unwrap instruction. If the input evaluates normally, evaluates to the input value (wrapped in Nullable<T> if the input is a non-nullable value type).If a nullable.unwrap instruction encounters a null input and jumps to the (endpoint of the) nullable.rewrap instruction,the nullable.rewrap instruction evaluates to null.
NullableUnwrap = 38
The input operand must be one of: 1. a nullable value type 2. a reference type 3. a managed reference to a type parameter. If the input is non-null, evaluates to the (unwrapped) input. If the input is null, jumps to the innermost nullable.rewrap instruction that contains this instruction. In case 3 (managed reference), the dereferenced value is the input being tested, and the nullable.unwrap instruction returns the managed reference unmodified (if the value is non-null).
NumericCompoundAssign = 8
Common instruction for numeric compound assignments.
PinnedRegion = 6
A region where a pinned variable is used (initial representation of future fixed statement).
RefAnyType = 92
Push the type token stored in a typed reference.
RefAnyValue = 93
Push the address stored in a typed reference.
Rethrow = 70
Rethrows the current exception.
SizeOf = 71
Gets the size of a type in bytes.
StLoc = 34
Stores a value into a local variable. (IL: starg/stloc) Evaluates to the value that was stored (for byte/short variables: evaluates to the truncated value, sign/zero extended back to I4 based on variable.Type.GetSign())
StObj = 62
Indirect store (store to ref/pointer). Evaluates to the value that was stored (when using type byte/short: evaluates to the truncated value, sign/zero extended back to I4 based on type.GetSign())
StringToInt = 75
Maps a string value to an integer. This is used in switch(string).
SwitchInstruction = 17
Switch statement
SwitchSection = 18
Switch section within a switch statement
ThreeValuedBoolAnd = 36
Three valued logic and. Inputs are of type bool? or I4, output is of type bool?. Unlike logic.and(), does not have short-circuiting behavior.
ThreeValuedBoolOr = 37
Three valued logic or. Inputs are of type bool? or I4, output is of type bool?. Unlike logic.or(), does not have short-circuiting behavior.
Throw = 69
Throws an exception.
TryCatch = 19
Try-catch statement.
TryCatchHandler = 20
Catch handler within a try-catch statement.
TryFault = 22
Try-fault statement
TryFinally = 21
Try-finally statement
Unbox = 64
Compute address inside box.
UnboxAny = 65
Unbox a value.
UserDefinedCompoundAssign = 9
Common instruction for user-defined compound assignments.
UserDefinedLogicOperator = 77
Use of user-defined && or || operator.
UsingInstruction = 24
Using statement
YieldReturn = 94
Yield an element from an iterator.