compiler: count auxiliary locals introduced by inlining
During initialization of globals no function scope is present thus locals number is not saved anywere. Save it in `codegen` directly.
This commit is contained in:
parent
87a69b13f1
commit
60a3e0d778
4 changed files with 13 additions and 3 deletions
|
@ -61,6 +61,9 @@ type codegen struct {
|
|||
// inlineLabelOffsets contains size of labelList at the start of inline call processing.
|
||||
// For such calls we need to drop only newly created part of stack.
|
||||
inlineLabelOffsets []int
|
||||
// globalInlineCount contains amount of auxiliary variables introduced by
|
||||
// function inlining during global variables initialization.
|
||||
globalInlineCount int
|
||||
|
||||
// A label for the for-loop being currently visited.
|
||||
currentFor string
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue