Create a new virtual machine with the given stack.
(stack_size: usize)
| 38 | |
| 39 | /// Create a new virtual machine with the given stack. |
| 40 | pub fn with_stack(stack_size: usize) -> Result<Self, OutOfMemory> { |
| 41 | Ok(Self { |
| 42 | state: MachineState::with_stack(stack_size)?, |
| 43 | executing_pc: ExecutingPc::default(), |
| 44 | }) |
| 45 | } |
| 46 | |
| 47 | /// Get a shared reference to this VM's machine state. |
| 48 | pub fn state(&self) -> &MachineState { |