Skip to content

Commit 9d9e49f

Browse files
committed
Reset current stack size for each method
1 parent a412922 commit 9d9e49f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/pt/up/fe/comp2023/jasmin/JasminUtils.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ public static String createConstructMethod(String superClassName) {
198198
public static String createMethodDirective(Method method) {
199199
JVMInstructionUtils.numLocals = 0;
200200
JVMInstructionUtils.stackSize = 0;
201+
JVMInstructionUtils.currStackSize = 0;
201202
String instructions = handleMethodStatements(method);
202203
if (method.isStaticMethod() && method.getParams().size() > 0)
203204
JVMInstructionUtils.numLocals++;

0 commit comments

Comments
 (0)