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
factoryValueFactoryThe 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
targetTypeTypeSignatureThe 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
valueBitVectorThe value to push.
originalTypeTypeSignatureThe 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
valueBitVectorThe value to push.
originalTypeTypeSignatureThe type of the value to push.
releaseBitVectorbooltrueifvalueshould be returned to the bit vector pool,falseif 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
valueBitVectorSpanThe value to push.
originalTypeTypeSignatureThe 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
valueObjectHandleThe handle to push.