feat: generalize env

This commit is contained in:
2025-05-21 09:33:43 +08:00
parent 36f29a9cac
commit 177acfabcf
8 changed files with 77 additions and 70 deletions

View File

@@ -12,7 +12,7 @@ use crate::error::*;
use crate::stack::Stack;
use crate::ty::common::Const;
use crate::ty::internal::{Thunk, Value};
use crate::vm::{LetEnv, VM};
use crate::vm::{VmEnv, VM};
mod helpers;
@@ -92,7 +92,7 @@ impl From<Value<'_, '_>> for JITValue {
}
pub type JITFunc<'jit, 'vm> =
unsafe extern "C" fn(*const VM<'jit>, *const LetEnv<'jit, 'vm>) -> JITValue;
unsafe extern "C" fn(*const VM<'jit>, *const VmEnv<'jit, 'vm>) -> JITValue;
pub struct JITContext<'ctx> {
context: &'ctx Context,