Table of Contents

Class UnaryOperatorHandlerBase

Namespace
Echo.Platforms.AsmResolver.Emulation.Dispatch.Arithmetic
Assembly
Echo.Platforms.AsmResolver.dll

Provides a base for unary operator instruction handlers.

public abstract class UnaryOperatorHandlerBase : FallThroughOpCodeHandler, ICilOpCodeHandler
Inheritance
UnaryOperatorHandlerBase
Implements
Derived
Inherited Members

Methods

DispatchInternal(CilExecutionContext, CilInstruction)

Evaluates a CIL instruction in the provided execution context, without increasing the program counter.

protected override CilDispatchResult DispatchInternal(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.

Evaluate(CilExecutionContext, CilInstruction, StackSlot)

Evaluates the unary operation on an argument.

protected abstract CilDispatchResult Evaluate(CilExecutionContext context, CilInstruction instruction, StackSlot argument)

Parameters

context CilExecutionContext

The context to evaluate the instruction in.

instruction CilInstruction

The instruction to dispatch and evaluate.

argument StackSlot

The argument that also receives the output.

Returns

CilDispatchResult

A value indicating whether the dispatch was successful or caused an error.