feat: builtins env (WIP)
This commit is contained in:
@@ -4,7 +4,6 @@ use std::rc::Rc;
|
||||
use hashbrown::{HashMap, HashSet};
|
||||
use inkwell::context::Context;
|
||||
|
||||
use crate::builtins::vm_env;
|
||||
use crate::bytecode::{BinOp, Func as F, OpCode, OpCodes, Program, UnOp};
|
||||
use crate::env::VmEnv;
|
||||
use crate::error::*;
|
||||
@@ -40,7 +39,7 @@ pub fn run(mut prog: Program) -> Result<p::Value> {
|
||||
jit: JITContext::new(&jit),
|
||||
};
|
||||
prog.top_level.reverse();
|
||||
Ok(eval(prog.top_level, &vm, vm_env(&vm))?.to_public(&vm, &mut HashSet::new()))
|
||||
Ok(eval(prog.top_level, &vm, VmEnv::new(vec![]))?.to_public(&vm, &mut HashSet::new()))
|
||||
}
|
||||
|
||||
pub fn eval<'gc>(opcodes: Box<[OpCode]>, vm: &VM<'gc>, env: Rc<VmEnv<'gc>>) -> Result<Value<'gc>> {
|
||||
|
||||
Reference in New Issue
Block a user