From 2d79da7b1bb989b7272f6088d2249ddab17ddf33 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Fri, 15 Apr 2016 23:07:30 +0300 Subject: [PATCH] Fix compilation of pop2 instruction when top two entries are values of type 1 --- core/src/main/java/org/teavm/parsing/ProgramParser.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/teavm/parsing/ProgramParser.java b/core/src/main/java/org/teavm/parsing/ProgramParser.java index 1bb5f1e4f..3addd6f11 100644 --- a/core/src/main/java/org/teavm/parsing/ProgramParser.java +++ b/core/src/main/java/org/teavm/parsing/ProgramParser.java @@ -148,11 +148,11 @@ public class ProgramParser implements VariableDebugInformation { private int popDouble() { if (stack == null || stack.type != DOUBLE_SECOND_HALF) { - throw new AssertionError("Illegal stack state at " + index); + throw new AssertionError("***Illegal stack state at " + index); } stack = stack.next; if (stack == null || stack.type != DOUBLE_FIRST_HALF) { - throw new AssertionError("Illegal stack state at " + index); + throw new AssertionError("***Illegal stack state at " + index); } int depth = stack.depth; stack = stack.next; @@ -1047,6 +1047,7 @@ public class ProgramParser implements VariableDebugInformation { case Opcodes.POP2: if (stack.type == SINGLE) { popSingle(); + popSingle(); } else { popDouble(); }