Delete verify_stack_match

This commit is contained in:
Brian Carroll 2023-11-05 22:21:14 +00:00
parent a76c4420fa
commit 664de9b285
No known key found for this signature in database
GPG key ID: 5C7B2EC4101703C0
2 changed files with 5 additions and 25 deletions

View file

@ -187,24 +187,6 @@ impl<'a> CodeBuilder<'a> {
VmSymbolState::Pushed { pushed_at }
}
/// Verify if a sequence of symbols is at the top of the stack
pub fn verify_stack_match(&self, symbols: &[Symbol]) -> bool {
let current_stack = self.current_stack();
let n_symbols = symbols.len();
let stack_depth = current_stack.len();
if n_symbols > stack_depth {
return false;
}
let offset = stack_depth - n_symbols;
for (i, sym) in symbols.iter().enumerate() {
if current_stack[offset + i] != *sym {
return false;
}
}
true
}
/**********************************************************
FUNCTION HEADER