From f70cb4f34a447bd344862a1dbfa40d372f78319a Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Mon, 24 Aug 2020 18:58:19 +0300 Subject: [PATCH] compiler: do not use `voidCalls` when calculating stack size This was probably a part of some earlier logic. --- pkg/compiler/func_scope.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/compiler/func_scope.go b/pkg/compiler/func_scope.go index 01ed1d175..8119dc764 100644 --- a/pkg/compiler/func_scope.go +++ b/pkg/compiler/func_scope.go @@ -141,7 +141,7 @@ func (c *funcScope) countArgs() int { func (c *funcScope) stackSize() int64 { size := c.countLocals() numArgs := c.countArgs() - return int64(size + numArgs + len(c.voidCalls)) + return int64(size + numArgs) } // newVariable creates a new local variable or argument in the scope of the function.