From 854ed8a6425edaa214fd1178f96495d07a123e07 Mon Sep 17 00:00:00 2001 From: TheCPP Date: Tue, 27 Aug 2024 12:13:05 +0200 Subject: [PATCH] [FIX] more fixing for #8 --- src/Target/x64/compilation/call.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Target/x64/compilation/call.rs b/src/Target/x64/compilation/call.rs index 716ff7b1..ef42d7bc 100644 --- a/src/Target/x64/compilation/call.rs +++ b/src/Target/x64/compilation/call.rs @@ -125,6 +125,12 @@ pub(crate) fn CompileCall(call: &Call, Var>, registry: &mut T asm.push( Instr::with2(Mnemonic::Mov, Operand::Reg(reg), Operand::Mem(x64Reg::Rbp - (off as u32))) ); } + for arg in &call.inner2 { + if !block.isVarUsedAfterNode(&boxed, arg) { + registry.backend.drop(arg); + } + } + asm.push(Instr::with0(Mnemonic::StartOptimization)); asm