Runtime operand stack for the MXVM interpreter.
More...
#include <icode.hpp>
|
| | Stack ()=default |
| void | push (const StackValue &value) |
| | Push a value onto the stack.
|
| StackValue | pop () |
| | Pop and return the top value.
|
| bool | empty () const |
| | Check whether the stack is empty.
|
| size_t | size () const |
| | Return the number of elements on the stack.
|
| StackValue & | operator[] (size_t index) |
| | Random access into the stack.
|
Runtime operand stack for the MXVM interpreter.
Definition at line 23 of file icode.hpp.
◆ Stack()
◆ empty()
| bool mxvm::Stack::empty |
( |
| ) |
const |
|
inlinenodiscard |
Check whether the stack is empty.
Definition at line 47 of file icode.hpp.
References data.
◆ operator[]()
| StackValue & mxvm::Stack::operator[] |
( |
size_t | index | ) |
|
|
inline |
Random access into the stack.
- Parameters
-
| index | Zero-based index from the bottom |
- Returns
- Reference to the stack element
- Exceptions
-
Definition at line 57 of file icode.hpp.
References data.
◆ pop()
Pop and return the top value.
- Returns
- The top stack value
- Exceptions
-
Definition at line 38 of file icode.hpp.
References data.
◆ push()
| void mxvm::Stack::push |
( |
const StackValue & | value | ) |
|
|
inline |
Push a value onto the stack.
- Parameters
-
| value | Integer or pointer value to push |
Definition at line 30 of file icode.hpp.
References data.
◆ size()
| size_t mxvm::Stack::size |
( |
| ) |
const |
|
inlinenodiscard |
Return the number of elements on the stack.
Definition at line 50 of file icode.hpp.
References data.
◆ data
The documentation for this class was generated from the following file: