Namespace ICSharpCode.Decompiler.IL
Classes
- AddressOf
Stores the value into an anonymous temporary variable, and returns the address of that variable.
- Arglist
Retrieves the RuntimeArgumentHandle.
- Await
C# await operator.
- BinaryInstruction
Instruction with two arguments: Left and Right
- BinaryNumericInstruction
Common instruction for add, sub, mul, div, rem, bit.and, bit.or, bit.xor, shl and shr.
- BitNot
Bitwise NOT
- Block
A block of IL instructions.
- BlockContainer
A container of IL blocks.
- Box
Boxes a value.
- Branch
Unconditional branch.
goto target;
- Call
Non-virtual method call.
- CallIndirect
Unsafe function pointer call.
- CallInstruction
Instruction with a list of arguments.
- CallVirt
Virtual method call.
- CastClass
Casts an object to a class.
- Ckfinite
Checks that the input float is not NaN or infinite.
- Comp
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).
- CompoundAssignmentInstruction
Common instruction for compound assignments.
- Conv
Numeric cast.
- Cpblk
memcpy(destAddress, sourceAddress, size);
- DebugBreak
Breakpoint instruction
- DeconstructInstruction
Deconstruction statement
- DeconstructResultInstruction
Represents a deconstructed value
- DefaultValue
Returns the default value for a type.
- DynamicBinaryOperatorInstruction
ILAst representation of a binary operator inside a dynamic expression (maps to Binder.BinaryOperation).
- DynamicCompoundAssign
Common instruction for dynamic compound assignments.
- DynamicConvertInstruction
ILAst representation of a cast inside a dynamic expression (maps to Binder.Convert).
- DynamicGetIndexInstruction
ILAst representation of an indexer get method call inside a dynamic expression (maps to Binder.GetIndex).
- DynamicGetMemberInstruction
ILAst representation of a property get method call inside a dynamic expression (maps to Binder.GetMember).
- DynamicInstruction
Instruction representing a dynamic call site.
- DynamicInvokeConstructorInstruction
ILAst representation of a constuctor invocation inside a dynamic expression (maps to Binder.InvokeConstructor).
- DynamicInvokeInstruction
ILAst representation of a delegate invocation inside a dynamic expression (maps to Binder.Invoke).
- DynamicInvokeMemberInstruction
ILAst representation of a method call inside a dynamic expression (maps to Binder.InvokeMember).
- DynamicIsEventInstruction
ILAst representation of a call to the Binder.IsEvent method inside a dynamic expression.
- DynamicLogicOperatorInstruction
ILAst representation of a short-circuiting binary operator inside a dynamic expression.
- DynamicSetIndexInstruction
ILAst representation of an indexer set method call inside a dynamic expression (maps to Binder.SetIndex).
- DynamicSetMemberInstruction
ILAst representation of a property set method call inside a dynamic expression (maps to Binder.SetMember).
- DynamicUnaryOperatorInstruction
ILAst representation of a unary operator inside a dynamic expression (maps to Binder.UnaryOperation).
- ExpressionTreeCast
ILAst representation of Expression.Convert.
- GetPinnableReference
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
A container of IL blocks.
- ILInstruction
Represents a decoded IL instruction
- ILReader
Reads IL bytecodes and converts them into ILAst instructions.
- ILVariableCollection
The collection of variables in a
ILFunction
.
- ILVisitor
Base class for visitor pattern.
- ILVisitor<T>
Base class for visitor pattern.
- ILVisitor<C, T>
Base class for visitor pattern.
- IfInstruction
If statement / conditional expression.
if (condition) trueExpr else falseExpr
- Initblk
memset(address, value, size)
- InvalidBranch
Represents invalid IL. Semantically, this instruction is considered to throw some kind of exception.
- InvalidExpression
Represents invalid IL. Semantically, this instruction is considered to produce some kind of value.
- IsInst
Test if object is instance of class or interface.
- LdElema
Load address of array element.
- LdFlda
Load address of instance field
- LdFtn
Load method pointer
- LdLen
Returns the length of an array as 'native unsigned int'.
- LdLoc
Loads the value of a local variable. (ldarg/ldloc)
- LdLoca
Loads the address of a local variable. (ldarga/ldloca)
- LdMemberToken
Loads runtime representation of metadata token
- LdNull
Loads the null reference.
- LdObj
Indirect load (ref/pointer dereference).
- LdStr
Loads a constant string.
- LdStrUtf8
Loads a constant byte string (as ReadOnlySpan<byte>).
- LdTypeToken
Loads runtime representation of metadata token
- LdVirtDelegate
Virtual delegate construction
- LdVirtFtn
Load method pointer
- LdcDecimal
Loads a constant decimal.
- LdcF4
Loads a constant 32-bit floating-point number.
- LdcF8
Loads a constant 64-bit floating-point number.
- LdcI4
Loads a constant 32-bit integer.
- LdcI8
Loads a constant 64-bit integer.
- LdsFlda
Load static field address
- Leave
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
Allocates space in the stack frame
- LocAllocSpan
Allocates space in the stack frame and wraps it in a Span
- LockInstruction
Lock statement
- MakeRefAny
Push a typed reference of type class onto the stack.
- MatchInstruction
ILAst representation of C# patterns
- NewArr
Creates an array instance.
- NewObj
Creates an object instance and calls the constructor.
- Nop
No operation. Takes 0 arguments and returns void.
- NullCoalescingInstruction
Null coalescing operator expression.
if.notnull(valueInst, fallbackInst)
- NullableRewrap
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
For a nullable input, gets the underlying value.
There are three possible input types:
- reference type: if input!=null, evaluates to the input
- nullable value type: if input.Has_Value, evaluates to input.GetValueOrDefault()
- generic type: behavior depends on the type at runtime. If non-nullable value type, unconditionally evaluates to the input.
If the input is null, control-flow is tranferred to the nearest surrounding nullable.rewrap instruction.
- NumericCompoundAssign
Common instruction for numeric compound assignments.
- PinnedRegion
A region where a pinned variable is used (initial representation of future fixed statement).
- ReduceNestingTransform
Improves code quality by duplicating keyword exits to reduce nesting and restoring IL order.
- RefAnyType
Push the type token stored in a typed reference.
- RefAnyValue
Push the address stored in a typed reference.
- Rethrow
Rethrows the current exception.
- SimpleInstruction
Instruction without any arguments
- SizeOf
Gets the size of a type in bytes.
- SlotInfo
Holds information about the role of an instruction within its parent instruction.
- StLoc
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
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
Maps a string value to an integer. This is used in switch(string).
- SwitchInstruction
Switch statement
- SwitchSection
Switch section within a switch statement
- ThreeValuedBoolAnd
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
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
Throws an exception.
- TryCatch
Try-catch statement.
- TryCatchHandler
Catch handler within a try-catch statement.
- TryFault
Try-fault statement
- TryFinally
Try-finally statement
- UnaryInstruction
Instruction with a single argument
- Unbox
Compute address inside box.
- UnboxAny
Unbox a value.
- UserDefinedCompoundAssign
Common instruction for user-defined compound assignments.
- UserDefinedLogicOperator
Use of user-defined && or || operator.
- UsingInstruction
IL using instruction. Equivalent to:
stloc v(resourceExpression) try { body } finally { v?.Dispose(); }
- YieldReturn
Yield an element from an iterator.
Structs
- ILInstruction.ChildrenEnumerator
Enumerator over the children of an ILInstruction. Warning: even though this is a struct, it is invalid to copy: the number of constructor calls must match the number of dispose calls.
- InstructionCollection<T>.Enumerator
Custom enumerator for InstructionCollection. Unlike List{T}.Enumerator, this enumerator allows replacing an item during the enumeration. Adding/removing items from the collection still is invalid (however, such invalid actions are only detected in debug builds).
Warning: even though this is a struct, it is invalid to copy: the number of constructor calls must match the number of dispose calls.
Interfaces
Enums
- ConversionKind
Semantic meaning of a
Conv
instruction.
- NullCoalescingKind
Kind of null-coalescing operator. ILAst:
if.notnull(valueInst, fallbackInst)
C#:value ?? fallback
- OpCode
Enum representing the type of an ILInstruction.
- StackType
A type for the purpose of stack analysis.