[fine] Methods!
This commit is contained in:
parent
2839b43f6d
commit
0c69758b11
5 changed files with 352 additions and 95 deletions
|
|
@ -102,6 +102,18 @@ impl Frame {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn func(&self) -> Rc<Function> {
|
||||
self.func.clone()
|
||||
}
|
||||
|
||||
pub fn args(&self) -> &[StackValue] {
|
||||
&self.args
|
||||
}
|
||||
|
||||
pub fn pc(&self) -> usize {
|
||||
self.pc
|
||||
}
|
||||
|
||||
fn pop_value(&mut self) -> Result<StackValue> {
|
||||
self.stack.pop().ok_or_else(|| VMErrorCode::StackUnderflow)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue