feat: stash
This commit is contained in:
@@ -3,8 +3,8 @@ use itertools::Itertools;
|
||||
use rpds::HashTrieMap;
|
||||
|
||||
use crate::bytecode::OpCodes;
|
||||
use crate::error::Result;
|
||||
use crate::ty::internal::{Thunk, Value};
|
||||
|
||||
use crate::vm::{CapturedEnv, VM};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
@@ -33,7 +33,7 @@ impl Func {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn call(self, vm: &VM, arg: Value) -> Value {
|
||||
pub fn call(self, vm: &VM, arg: Value) -> Result<Value> {
|
||||
use Param::*;
|
||||
|
||||
let env = self.env.released();
|
||||
@@ -71,7 +71,7 @@ impl Func {
|
||||
}
|
||||
}
|
||||
|
||||
vm.eval(self.opcodes, env).unwrap()
|
||||
vm.eval(self.opcodes, env)
|
||||
}
|
||||
|
||||
pub fn push_ident_param(&mut self, param: EcoString) {
|
||||
|
||||
Reference in New Issue
Block a user