Table of Contents

Class BinaryOperatorHandlerBase

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

Provides a base for binary operator instruction handlers.

public abstract class BinaryOperatorHandlerBase : FallThroughOpCodeHandler, ICilOpCodeHandler
Inheritance
BinaryOperatorHandlerBase
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, StackSlot)

Evaluates the binary operation on two arguments.

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

Parameters

context CilExecutionContext

The context to evaluate the instruction in.

instruction CilInstruction

The instruction to dispatch and evaluate.

argument1 StackSlot

The first argument that also receives the output.

argument2 StackSlot

The second argument.

Returns

CilDispatchResult

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

Force32BitResult(CilInstruction)

Gets a value indicating whether the instruction always pushes a 32-bit value.

protected abstract bool Force32BitResult(CilInstruction instruction)

Parameters

instruction CilInstruction

The instruction to classify.

Returns

bool

true if a 32-bit value is always pushed, false otherwise.

IsSignedOperation(CilInstruction)

Gets a value indicating whether the instruction is a signed operation or not.

protected abstract bool IsSignedOperation(CilInstruction instruction)

Parameters

instruction CilInstruction

The instruction to classify.

Returns

bool

true if signed, false otherwise.