Get rid of VM stack storage

This commit is contained in:
Brian Carroll 2023-10-28 12:12:36 +01:00
parent 8afb88f5a4
commit 5719384ed9
No known key found for this signature in database
GPG key ID: 5C7B2EC4101703C0
6 changed files with 67 additions and 252 deletions

View file

@ -152,6 +152,11 @@ impl<'a> CodeBuilder<'a> {
***********************************************************/
pub fn stack_is_empty(&self) -> bool {
let block = self.vm_block_stack.last().unwrap();
block.value_stack.is_empty()
}
fn current_stack(&self) -> &Vec<'a, Symbol> {
let block = self.vm_block_stack.last().unwrap();
&block.value_stack