popping the inlined function arguments

This commit is contained in:
mlokr 2024-09-02 03:56:22 +02:00
parent 97c62e424a
commit 75dca64648
No known key found for this signature in database
GPG key ID: DEA147DDEE644993
4 changed files with 9 additions and 2 deletions

View file

@ -1545,6 +1545,10 @@ impl Codegen {
self.ci.file = prev_file; self.ci.file = prev_file;
self.ci.ret = prev_ret; self.ci.ret = prev_ret;
for var in self.ci.vars.drain(scope..).collect::<Vec<_>>() {
self.ci.free_loc(var.value.loc);
}
if let Some(last_ret) = self.ci.ret_relocs.last() if let Some(last_ret) = self.ci.ret_relocs.last()
&& last_ret.offset as usize + self.ci.snap.code == self.output.code.len() - 5 && last_ret.offset as usize + self.ci.snap.code == self.output.code.len() - 5
{ {

View file

@ -1,4 +1,4 @@
ev: Ecall ev: Ecall
code size: 239 code size: 234
ret: 0 ret: 0
status: Ok(()) status: Ok(())

View file

@ -1,3 +1,3 @@
code size: 124 code size: 116
ret: 0 ret: 0
status: Ok(()) status: Ok(())

View file

@ -0,0 +1,3 @@
code size: 1043
ret: 0
status: Ok(())