Class NewObjHandler
- Namespace
- Echo.Platforms.AsmResolver.Emulation.Dispatch.ObjectModel
- Assembly
- Echo.Platforms.AsmResolver.dll
Implements a CIL instruction handler for newobj operations.
[DispatcherTableEntry(new CilCode[] { CilCode.Newobj })]
public class NewObjHandler : CallHandlerBase, ICilOpCodeHandler
- Inheritance
-
NewObjHandler
- Implements
- Inherited Members
Methods
DevirtualizeMethodInternal(CilExecutionContext, IMethodDescriptor, IList<BitVector>)
Devirtualizes and resolves the method that is referenced by the provided instruction.
protected override MethodDevirtualizationResult DevirtualizeMethodInternal(CilExecutionContext context, IMethodDescriptor method, IList<BitVector> arguments)
Parameters
contextCilExecutionContextThe execution context the instruction is evaluated in.
methodIMethodDescriptorThe method that is being devirtualized.
argumentsIList<BitVector>The arguments pushed onto the stack.
Returns
- MethodDevirtualizationResult
The result of the devirtualization.
Dispatch(CilExecutionContext, CilInstruction)
Evaluates a CIL instruction in the provided execution context.
public override CilDispatchResult Dispatch(CilExecutionContext context, CilInstruction instruction)
Parameters
contextCilExecutionContextThe context to evaluate the instruction in.
instructionCilInstructionThe instruction to dispatch and evaluate.
Returns
- CilDispatchResult
A value indicating whether the dispatch was successful or caused an error.
ShouldPopInstanceObject(IMethodDescriptor)
Determines whether the instance object should be popped from the stack for the provided method.
protected override bool ShouldPopInstanceObject(IMethodDescriptor method)
Parameters
methodIMethodDescriptorThe method to test.
Returns
- bool
trueif the instance object should be popped,falseotherwise.