basic-interpreter
ondra05 2022-09-19 20:27:16 +02:00
parent 966f610040
commit a0cd6879eb
2 changed files with 3 additions and 3 deletions

View File

@ -20,8 +20,8 @@ pub enum Instruction {
/// Store a value to locals table
StLocal(usize),
/// Pop a value from stack
Pop,
/// Drop a value from stack
Drop,
/// Duplicate value on stack
Dup,

View File

@ -105,7 +105,7 @@ impl<'s> Context<'s> {
StLocal(i) => {
*self.locals.get_mut(i).ok_or(IndexOutOfBoundsError::Local)? = self.stack_pop()?;
}
Pop => {
Drop => {
self.stack_pop()?;
}
Dup => {