compiler: do not use voidCalls when calculating stack size

This was probably a part of some earlier logic.
This commit is contained in:
Evgenii Stratonikov 2020-08-24 18:58:19 +03:00
parent d8badd9a8d
commit f70cb4f34a

View file

@ -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.