Show / Hide Table of Contents

Class CallStack

Represents the call stack for managing function calls and returns.

Inheritance
object
CallStack
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: VM.Core.Instructions
Assembly: VM.dll
Syntax
public class CallStack

Properties

Count

Gets the number of return addresses on stack

Declaration
public int Count { get; }
Property Value
Type Description
int

IsEmpty

Indicates whether the stack is empty

Declaration
public bool IsEmpty { get; }
Property Value
Type Description
bool

Methods

Clear()

Clears all return addresses from the stack

Declaration
public void Clear()

Peek()

Peeks at the top return address without removing it

Declaration
public int Peek()
Returns
Type Description
int
Exceptions
Type Condition
VmStackException

Thrown when stack is empty

Pop()

Pops a return address from the stack

Declaration
public int Pop()
Returns
Type Description
int
Exceptions
Type Condition
VmStackException

Thrown when stack is empty

Push(int)

Pushes a return address onto the stack

Declaration
public void Push(int value)
Parameters
Type Name Description
int value

ToString()

Returns string representation of call stack

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
object.ToString()
In this article
Back to top Generated by DocFX