optimize(value): less clone

This commit is contained in:
2025-05-22 21:24:19 +08:00
parent b0b73439fd
commit f380e5fd70
6 changed files with 105 additions and 106 deletions

View File

@@ -289,7 +289,7 @@ impl<'vm, 'ctx: 'vm> JITContext<'ctx> {
.new_thunk(Rc::into_raw(Rc::new(Thunk::new(vm.get_thunk(idx))))),
)?,
OpCode::CaptureEnv => {
let thunk = *stack.tos()?;
let thunk = *stack.tos();
self.builder.build_direct_call(
self.helpers.capture_env,
&[thunk.into(), env.into()],