feat(env): move env out of vm,

This commit is contained in:
2025-05-23 19:19:20 +08:00
parent 5291e49313
commit b41fd38bcc
10 changed files with 62 additions and 41 deletions

View File

@@ -8,11 +8,12 @@ use inkwell::module::Module;
use inkwell::values::{BasicValueEnum, FunctionValue, PointerValue};
use crate::bytecode::{Func, OpCode, UnOp};
use crate::env::VmEnv;
use crate::error::*;
use crate::stack::Stack;
use crate::ty::common::Const;
use crate::ty::internal::{Thunk, Value};
use crate::vm::{VM, VmEnv};
use crate::vm::VM;
mod helpers;
@@ -408,11 +409,7 @@ impl<'vm, 'ctx: 'vm> JITContext<'ctx> {
.builder
.build_direct_call(
self.helpers.call,
&[
func.into(),
arg.into(),
self.new_ptr(vm).into(),
],
&[func.into(), arg.into(), self.new_ptr(vm).into()],
"call",
)?
.try_as_basic_value()