From dd2c58bfcf48c74e45184bf5378187f8419e7455 Mon Sep 17 00:00:00 2001 From: Erin Date: Mon, 19 Sep 2022 20:27:16 +0200 Subject: [PATCH] rename --- src/interpreter/bytecode.rs | 4 ++-- src/interpreter/context.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/interpreter/bytecode.rs b/src/interpreter/bytecode.rs index 1dd3063..253972c 100644 --- a/src/interpreter/bytecode.rs +++ b/src/interpreter/bytecode.rs @@ -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, diff --git a/src/interpreter/context.rs b/src/interpreter/context.rs index ee75b08..8e97d47 100644 --- a/src/interpreter/context.rs +++ b/src/interpreter/context.rs @@ -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 => {