Skip to content

Commit 02da3b3

Browse files
cosminbascatomasstupka
authored andcommitted
CodeUnit: compute the max stack size
1 parent 72e509a commit 02da3b3

File tree

1 file changed

+1
-1
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/compiler

1 file changed

+1
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/compiler/CodeUnit.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public CodeUnit(String name, String qualname,
108108
this.argCount = argCount;
109109
this.kwOnlyArgCount = kwOnlyArgCount;
110110
this.positionalOnlyArgCount = positionalOnlyArgCount;
111-
this.stacksize = stacksize;
111+
this.stacksize = stacksize + varnames.length + cellvars.length + freevars.length;
112112
this.code = code;
113113
this.srcOffsetTable = linetable;
114114
this.flags = flags;

0 commit comments

Comments
 (0)