diff --git a/pom.xml b/pom.xml
index 00c6274b6..1e430b183 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,17 +22,19 @@
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
- 2.5.1
-
-
- 1.7
-
-
-
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 2.5.1
+
+
+ 1.7
+
+
+
+
diff --git a/teavm-core/src/main/java/org/teavm/dependency/DependencyChecker.java b/teavm-core/src/main/java/org/teavm/dependency/DependencyChecker.java
index 30f02cb30..6feabed98 100644
--- a/teavm-core/src/main/java/org/teavm/dependency/DependencyChecker.java
+++ b/teavm-core/src/main/java/org/teavm/dependency/DependencyChecker.java
@@ -355,24 +355,19 @@ public class DependencyChecker implements DependencyInformation {
if (missingClasses.isEmpty() && missingMethods.isEmpty() && missingFields.isEmpty()) {
return;
}
+ List items = new ArrayList<>();
+ items.addAll(missingClasses);
+ for (MethodReference method : missingMethods) {
+ items.add(method.toString());
+ }
+ for (FieldReference field : missingFields) {
+ items.add(field.toString());
+ }
+ Collections.sort(items);
StringBuilder sb = new StringBuilder();
- if (!missingClasses.isEmpty()) {
- sb.append("Missing classes:\n");
- for (String cls : missingClasses) {
- sb.append(" ").append(cls).append("\n");
- }
- }
- if (!missingMethods.isEmpty()) {
- sb.append("Missing methods:\n");
- for (MethodReference method : missingMethods) {
- sb.append(" ").append(method).append("\n");
- }
- }
- if (!missingMethods.isEmpty()) {
- sb.append("Missing fields:\n");
- for (FieldReference field : missingFields) {
- sb.append(" ").append(field).append("\n");
- }
+ sb.append("Can't compile due to the following items missing:\n");
+ for (String item : items) {
+ sb.append(" ").append(item).append("\n");
}
throw new IllegalStateException(sb.toString());
}
diff --git a/teavm-core/src/main/java/org/teavm/model/FieldReference.java b/teavm-core/src/main/java/org/teavm/model/FieldReference.java
index 93ba84e29..42e476131 100644
--- a/teavm-core/src/main/java/org/teavm/model/FieldReference.java
+++ b/teavm-core/src/main/java/org/teavm/model/FieldReference.java
@@ -52,4 +52,9 @@ public class FieldReference {
FieldReference other = (FieldReference)obj;
return className.equals(other.className) && fieldName.equals(other.fieldName);
}
+
+ @Override
+ public String toString() {
+ return className + "." + fieldName;
+ }
}
diff --git a/teavm-core/src/main/java/org/teavm/parsing/ProgramParser.java b/teavm-core/src/main/java/org/teavm/parsing/ProgramParser.java
index 18bc8ae6e..bcfe257d7 100644
--- a/teavm-core/src/main/java/org/teavm/parsing/ProgramParser.java
+++ b/teavm-core/src/main/java/org/teavm/parsing/ProgramParser.java
@@ -30,9 +30,13 @@ import org.teavm.model.util.InstructionTransitionExtractor;
* @author Alexey Andreev
*/
public class ProgramParser {
- private int[] depthsBefore;
- private int[] depthsAfter;
- private int currentDepth;
+ static final byte ROOT = 0;
+ static final byte SINGLE = 1;
+ static final byte DOUBLE_FIRST_HALF = 2;
+ static final byte DOUBLE_SECOND_HALF = 3;
+ private StackFrame[] stackBefore;
+ private StackFrame[] stackAfter;
+ private StackFrame stack;
private int index;
private int[] nextIndexes;
private Map