chore: cargo fmt

This commit is contained in:
2025-05-19 19:40:26 +08:00
parent 9e172bf013
commit b4db46d48a
4 changed files with 44 additions and 33 deletions

View File

@@ -76,14 +76,14 @@ impl From<Value<'_, '_>> for JITValue {
Value::Func(func) => JITValue {
tag: ValueTag::Function,
data: JITValueData {
ptr: Rc::into_raw(func) as *const _
}
ptr: Rc::into_raw(func) as *const _,
},
},
Value::Thunk(thunk) => JITValue {
tag: ValueTag::Thunk,
data: JITValueData {
ptr: Rc::into_raw(thunk) as *const _
}
ptr: Rc::into_raw(thunk) as *const _,
},
},
_ => todo!(),
}
@@ -371,13 +371,23 @@ impl<'vm, 'ctx: 'vm> JITContext<'ctx> {
for _ in 0..arity {
args.insert(0, stack.pop());
}
let func = self.builder
.build_direct_call(self.helpers.force, &[stack.pop().into(), self.new_ptr(vm).into()], "force")?
let func = self
.builder
.build_direct_call(
self.helpers.force,
&[stack.pop().into(), self.new_ptr(vm).into()],
"force",
)?
.try_as_basic_value()
.left()
.unwrap();
let ret = self.builder
.build_direct_call(self.helpers.call, &[func.into(), args[0].into(), self.new_ptr(vm).into()], "call")?
let ret = self
.builder
.build_direct_call(
self.helpers.call,
&[func.into(), args[0].into(), self.new_ptr(vm).into()],
"call",
)?
.try_as_basic_value()
.left()
.unwrap();