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
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.
Evaluate(CilExecutionContext, CilInstruction, StackSlot)
Evaluates the unary operation on an argument.
protected abstract CilDispatchResult Evaluate(CilExecutionContext context, CilInstruction instruction, StackSlot argument)
Parameters
contextCilExecutionContextThe context to evaluate the instruction in.
instructionCilInstructionThe instruction to dispatch and evaluate.
argumentStackSlotThe argument that also receives the output.
Returns
- CilDispatchResult
A value indicating whether the dispatch was successful or caused an error.