feat(env): move env out of vm,
This commit is contained in:
@@ -5,9 +5,10 @@ use inkwell::module::Module;
|
||||
use inkwell::types::{FloatType, FunctionType, IntType, PointerType, StructType};
|
||||
use inkwell::values::{BasicValueEnum, FunctionValue};
|
||||
|
||||
use crate::env::VmEnv;
|
||||
use crate::jit::JITValueData;
|
||||
use crate::ty::internal::{Thunk, Value};
|
||||
use crate::vm::{VM, VmEnv};
|
||||
use crate::vm::VM;
|
||||
|
||||
use super::{JITValue, ValueTag};
|
||||
|
||||
@@ -91,11 +92,7 @@ impl<'ctx> Helpers<'ctx> {
|
||||
let call = module.add_function(
|
||||
"call",
|
||||
value_type.fn_type(
|
||||
&[
|
||||
value_type.into(),
|
||||
value_type.into(),
|
||||
ptr_type.into(),
|
||||
],
|
||||
&[value_type.into(), value_type.into(), ptr_type.into()],
|
||||
false,
|
||||
),
|
||||
None,
|
||||
@@ -311,11 +308,7 @@ extern "C" fn helper_or(lhs: JITValue, rhs: JITValue) -> JITValue {
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" fn helper_call<'jit>(
|
||||
func: JITValue,
|
||||
arg: JITValue,
|
||||
vm: *const VM<'jit>,
|
||||
) -> JITValue {
|
||||
extern "C" fn helper_call<'jit>(func: JITValue, arg: JITValue, vm: *const VM<'jit>) -> JITValue {
|
||||
use ValueTag::*;
|
||||
match func.tag {
|
||||
Function => {
|
||||
|
||||
Reference in New Issue
Block a user