Table of Contents

Class EvaluationStack

Namespace
Echo.Platforms.AsmResolver.Emulation.Stack
Assembly
Echo.Platforms.AsmResolver.dll

Represents an evaluation stack during the execution of a managed method body.

public class EvaluationStack : IndexableStack<StackSlot>, IReadOnlyList<StackSlot>, IReadOnlyCollection<StackSlot>, IEnumerable<StackSlot>, IEnumerable
Inheritance
EvaluationStack
Implements
Inherited Members

Constructors

EvaluationStack(ValueFactory)

Creates a new evaluation stack.

public EvaluationStack(ValueFactory factory)

Parameters

factory ValueFactory

The value factory to use.

Methods

Clear()

Removes all elements from the stack.

public override void Clear()

Pop(TypeSignature)

Pops the top-most value from the stack, and reinterprets it according to the provided target type.

public BitVector Pop(TypeSignature targetType)

Parameters

targetType TypeSignature

The type of the value to pop.

Returns

BitVector

The popped and marshalled value.

Push(BitVector, TypeSignature)

Marshals the provided bitvector into a stack slot, and pushes it onto the stack.

public void Push(BitVector value, TypeSignature originalType)

Parameters

value BitVector

The value to push.

originalType TypeSignature

The type of the value to push.

Push(BitVector, TypeSignature, bool)

Marshals the provided bitvector into a stack slot, and pushes it onto the stack.

public void Push(BitVector value, TypeSignature originalType, bool releaseBitVector)

Parameters

value BitVector

The value to push.

originalType TypeSignature

The type of the value to push.

releaseBitVector bool

true if value should be returned to the bit vector pool, false if the caller should remain the owner of the bit vector.

Push(BitVectorSpan, TypeSignature)

Marshals the provided bitvector into a stack slot, and pushes it onto the stack.

public void Push(BitVectorSpan value, TypeSignature originalType)

Parameters

value BitVectorSpan

The value to push.

originalType TypeSignature

The type of the value to push.

Push(ObjectHandle)

Puts the address of the provided object handle into a pointer-sized bit vector, and pushes it onto the stack.

public void Push(ObjectHandle value)

Parameters

value ObjectHandle

The handle to push.