chore: cargo fmt

This commit is contained in:
2025-05-20 18:30:24 +08:00
parent b4249ccd11
commit 736402dc53
7 changed files with 35 additions and 23 deletions

View File

@@ -93,7 +93,12 @@ impl<'ctx> Helpers<'ctx> {
let call = module.add_function(
"call",
value_type.fn_type(
&[value_type.into(), ptr_type.into(), ptr_int_type.into(), ptr_type.into()],
&[
value_type.into(),
ptr_type.into(),
ptr_int_type.into(),
ptr_type.into(),
],
false,
),
None,
@@ -207,9 +212,7 @@ extern "C" fn helper_debug(value: JITValue) {
#[unsafe(no_mangle)]
extern "C" fn helper_capture_env(thunk: JITValue, env: *const LetEnv) {
let thunk: &Thunk = unsafe { std::mem::transmute(thunk.data.ptr.as_ref().unwrap()) };
let env = unsafe {
Rc::from_raw(env)
};
let env = unsafe { Rc::from_raw(env) };
thunk.capture(env.clone());
std::mem::forget(env);
}
@@ -328,7 +331,10 @@ extern "C" fn helper_call<'jit, 'vm>(
vm: *const VM<'jit>,
) -> JITValue {
use ValueTag::*;
let args = unsafe { Vec::from_raw_parts(args, arity, arity) }.into_iter().map(Value::from).collect();
let args = unsafe { Vec::from_raw_parts(args, arity, arity) }
.into_iter()
.map(Value::from)
.collect();
match func.tag {
Function => {
let func: Value = func.into();