5.2 Stack ¶
The stack shoud be implemented as a contiguous array of bytes with the
following characteristics:
- Data type: Array of bytes
- Element size: 8 bytes per element (64-bit signed integers)
- Alignment: All operations push/pop exactly 8 bytes
- Stack size: Always a multiple of 8 bytes
- Stack Management
To perform function calls, the VM must maintains the stack pointer. It
points to the start of the current stack local context. it is modified
by the instructions call and ret.