[][src]Module dark_vm::utils

The Utils module, which contains common utilities such as the stack and frames.

Modules

frames

The frames module, which contains the frame struct. Frames are used when the VM jumps to a label. The Frame strut maintains information about the current frame. This includes caller position, parameters, and local variables.

stack

The stack module, which contains the stack and different functions to control the stack. The Stack struct is the backbone for the VM. It maintains all of the values that are operated on. The methods on the stack allow the stack to be changed and modified. The owner of the stack is the VM. These methods should not be accessed outside of the VM struct as it could cause unexpected behavior.

store

The store module, which provides a nice wrapper around a HashMap for maintaining variables. The Store struct is a basic wrapper around a HashMap. It is useful for maintaining variables and available functions.