chore: cargo fmt
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
use std::cell::{Cell, OnceCell};
|
||||
|
||||
use derive_more::Constructor;
|
||||
use inkwell::execution_engine::JitFunction;
|
||||
use itertools::Itertools;
|
||||
use derive_more::Constructor;
|
||||
|
||||
use crate::bytecode::Func as BFunc;
|
||||
use crate::error::Result;
|
||||
@@ -46,7 +46,7 @@ pub struct Func<'jit: 'vm, 'vm> {
|
||||
pub func: &'vm BFunc,
|
||||
pub env: Env<'jit, 'vm>,
|
||||
pub compiled: OnceCell<JitFunction<'jit, JITFunc<'jit, 'vm>>>,
|
||||
pub count: Cell<usize>
|
||||
pub count: Cell<usize>,
|
||||
}
|
||||
|
||||
impl<'vm, 'jit: 'vm> Func<'jit, 'vm> {
|
||||
@@ -94,7 +94,7 @@ impl<'vm, 'jit: 'vm> Func<'jit, 'vm> {
|
||||
if count >= 1 {
|
||||
let compiled = self.compiled.get_or_init(|| vm.compile_func(self.func));
|
||||
let ret = unsafe { compiled.call(vm as *const VM, &env as *const Env) };
|
||||
return Ok(ret.into())
|
||||
return Ok(ret.into());
|
||||
}
|
||||
vm.eval(self.func.opcodes.iter().copied(), env)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user