Table of Contents

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

context CilExecutionContext

The execution context the instruction is evaluated in.

method IMethodDescriptor

The method that is being devirtualized.

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

context CilExecutionContext

The context to evaluate the instruction in.

instruction CilInstruction

The 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

method IMethodDescriptor

The method to test.

Returns

bool

true if the instance object should be popped, false otherwise.