diff --git a/core/src/main/java/org/teavm/javascript/ast/AssignmentStatement.java b/core/src/main/java/org/teavm/ast/AssignmentStatement.java similarity index 96% rename from core/src/main/java/org/teavm/javascript/ast/AssignmentStatement.java rename to core/src/main/java/org/teavm/ast/AssignmentStatement.java index adbf79fa6..0923a8f83 100644 --- a/core/src/main/java/org/teavm/javascript/ast/AssignmentStatement.java +++ b/core/src/main/java/org/teavm/ast/AssignmentStatement.java @@ -1,5 +1,5 @@ /* - * Copyright 2011 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; import java.util.HashSet; import java.util.Set; diff --git a/core/src/main/java/org/teavm/javascript/ast/AsyncMethodNode.java b/core/src/main/java/org/teavm/ast/AsyncMethodNode.java similarity index 95% rename from core/src/main/java/org/teavm/javascript/ast/AsyncMethodNode.java rename to core/src/main/java/org/teavm/ast/AsyncMethodNode.java index d15b2a2e6..fbf44613f 100644 --- a/core/src/main/java/org/teavm/javascript/ast/AsyncMethodNode.java +++ b/core/src/main/java/org/teavm/ast/AsyncMethodNode.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; import java.util.ArrayList; import java.util.List; diff --git a/core/src/main/java/org/teavm/javascript/ast/AsyncMethodPart.java b/core/src/main/java/org/teavm/ast/AsyncMethodPart.java similarity index 92% rename from core/src/main/java/org/teavm/javascript/ast/AsyncMethodPart.java rename to core/src/main/java/org/teavm/ast/AsyncMethodPart.java index d55e653b8..f3aa8dac1 100644 --- a/core/src/main/java/org/teavm/javascript/ast/AsyncMethodPart.java +++ b/core/src/main/java/org/teavm/ast/AsyncMethodPart.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; /** * diff --git a/core/src/main/java/org/teavm/javascript/ast/BinaryExpr.java b/core/src/main/java/org/teavm/ast/BinaryExpr.java similarity index 96% rename from core/src/main/java/org/teavm/javascript/ast/BinaryExpr.java rename to core/src/main/java/org/teavm/ast/BinaryExpr.java index c3342d380..0dea9bbd1 100644 --- a/core/src/main/java/org/teavm/javascript/ast/BinaryExpr.java +++ b/core/src/main/java/org/teavm/ast/BinaryExpr.java @@ -1,5 +1,5 @@ /* - * Copyright 2011 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; import java.util.Map; diff --git a/core/src/main/java/org/teavm/javascript/ast/BinaryOperation.java b/core/src/main/java/org/teavm/ast/BinaryOperation.java similarity index 94% rename from core/src/main/java/org/teavm/javascript/ast/BinaryOperation.java rename to core/src/main/java/org/teavm/ast/BinaryOperation.java index 2c57aac6f..8856e323b 100644 --- a/core/src/main/java/org/teavm/javascript/ast/BinaryOperation.java +++ b/core/src/main/java/org/teavm/ast/BinaryOperation.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; /** * diff --git a/core/src/main/java/org/teavm/javascript/ast/BlockStatement.java b/core/src/main/java/org/teavm/ast/BlockStatement.java similarity index 93% rename from core/src/main/java/org/teavm/javascript/ast/BlockStatement.java rename to core/src/main/java/org/teavm/ast/BlockStatement.java index 6c09aebb0..7b15ecb53 100644 --- a/core/src/main/java/org/teavm/javascript/ast/BlockStatement.java +++ b/core/src/main/java/org/teavm/ast/BlockStatement.java @@ -1,5 +1,5 @@ /* - * Copyright 2011 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; import java.util.ArrayList; import java.util.List; diff --git a/core/src/main/java/org/teavm/javascript/ast/BreakStatement.java b/core/src/main/java/org/teavm/ast/BreakStatement.java similarity index 94% rename from core/src/main/java/org/teavm/javascript/ast/BreakStatement.java rename to core/src/main/java/org/teavm/ast/BreakStatement.java index d4f77ae8c..9b745251f 100644 --- a/core/src/main/java/org/teavm/javascript/ast/BreakStatement.java +++ b/core/src/main/java/org/teavm/ast/BreakStatement.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; /** * diff --git a/core/src/main/java/org/teavm/javascript/ast/ClassNode.java b/core/src/main/java/org/teavm/ast/ClassNode.java similarity index 95% rename from core/src/main/java/org/teavm/javascript/ast/ClassNode.java rename to core/src/main/java/org/teavm/ast/ClassNode.java index 030750496..65f2ed466 100644 --- a/core/src/main/java/org/teavm/javascript/ast/ClassNode.java +++ b/core/src/main/java/org/teavm/ast/ClassNode.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; import java.util.ArrayList; import java.util.EnumSet; diff --git a/core/src/main/java/org/teavm/javascript/ast/ConditionalExpr.java b/core/src/main/java/org/teavm/ast/ConditionalExpr.java similarity index 96% rename from core/src/main/java/org/teavm/javascript/ast/ConditionalExpr.java rename to core/src/main/java/org/teavm/ast/ConditionalExpr.java index e32d2276a..c58632287 100644 --- a/core/src/main/java/org/teavm/javascript/ast/ConditionalExpr.java +++ b/core/src/main/java/org/teavm/ast/ConditionalExpr.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; import java.util.Map; diff --git a/core/src/main/java/org/teavm/javascript/ast/ConditionalStatement.java b/core/src/main/java/org/teavm/ast/ConditionalStatement.java similarity index 94% rename from core/src/main/java/org/teavm/javascript/ast/ConditionalStatement.java rename to core/src/main/java/org/teavm/ast/ConditionalStatement.java index c2fee2ffa..fb9fe3366 100644 --- a/core/src/main/java/org/teavm/javascript/ast/ConditionalStatement.java +++ b/core/src/main/java/org/teavm/ast/ConditionalStatement.java @@ -1,5 +1,5 @@ /* - * Copyright 2011 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; import java.util.ArrayList; import java.util.List; diff --git a/core/src/main/java/org/teavm/javascript/ast/ConstantExpr.java b/core/src/main/java/org/teavm/ast/ConstantExpr.java similarity index 94% rename from core/src/main/java/org/teavm/javascript/ast/ConstantExpr.java rename to core/src/main/java/org/teavm/ast/ConstantExpr.java index 6959df868..4745195f2 100644 --- a/core/src/main/java/org/teavm/javascript/ast/ConstantExpr.java +++ b/core/src/main/java/org/teavm/ast/ConstantExpr.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; import java.util.Map; diff --git a/core/src/main/java/org/teavm/javascript/ast/ContinueStatement.java b/core/src/main/java/org/teavm/ast/ContinueStatement.java similarity index 94% rename from core/src/main/java/org/teavm/javascript/ast/ContinueStatement.java rename to core/src/main/java/org/teavm/ast/ContinueStatement.java index e2c3e6636..212f04248 100644 --- a/core/src/main/java/org/teavm/javascript/ast/ContinueStatement.java +++ b/core/src/main/java/org/teavm/ast/ContinueStatement.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; /** * diff --git a/core/src/main/java/org/teavm/javascript/ast/Expr.java b/core/src/main/java/org/teavm/ast/Expr.java similarity index 98% rename from core/src/main/java/org/teavm/javascript/ast/Expr.java rename to core/src/main/java/org/teavm/ast/Expr.java index 43b6ec783..50f163935 100644 --- a/core/src/main/java/org/teavm/javascript/ast/Expr.java +++ b/core/src/main/java/org/teavm/ast/Expr.java @@ -1,5 +1,5 @@ /* - * Copyright 2011 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; import java.util.Arrays; import java.util.HashMap; diff --git a/core/src/main/java/org/teavm/javascript/ast/ExprVisitor.java b/core/src/main/java/org/teavm/ast/ExprVisitor.java similarity index 94% rename from core/src/main/java/org/teavm/javascript/ast/ExprVisitor.java rename to core/src/main/java/org/teavm/ast/ExprVisitor.java index 54dcb619d..c7ead73ba 100644 --- a/core/src/main/java/org/teavm/javascript/ast/ExprVisitor.java +++ b/core/src/main/java/org/teavm/ast/ExprVisitor.java @@ -1,5 +1,5 @@ /* - * Copyright 2011 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; public interface ExprVisitor { void visit(BinaryExpr expr); diff --git a/core/src/main/java/org/teavm/javascript/ast/FieldNode.java b/core/src/main/java/org/teavm/ast/FieldNode.java similarity index 95% rename from core/src/main/java/org/teavm/javascript/ast/FieldNode.java rename to core/src/main/java/org/teavm/ast/FieldNode.java index 3253d193f..2d833f478 100644 --- a/core/src/main/java/org/teavm/javascript/ast/FieldNode.java +++ b/core/src/main/java/org/teavm/ast/FieldNode.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; import java.util.EnumSet; import java.util.Set; diff --git a/core/src/main/java/org/teavm/javascript/ast/GotoPartStatement.java b/core/src/main/java/org/teavm/ast/GotoPartStatement.java similarity index 93% rename from core/src/main/java/org/teavm/javascript/ast/GotoPartStatement.java rename to core/src/main/java/org/teavm/ast/GotoPartStatement.java index 9ccdb7ca5..8315ed0fd 100644 --- a/core/src/main/java/org/teavm/javascript/ast/GotoPartStatement.java +++ b/core/src/main/java/org/teavm/ast/GotoPartStatement.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; /** * diff --git a/core/src/main/java/org/teavm/javascript/ast/IdentifiedStatement.java b/core/src/main/java/org/teavm/ast/IdentifiedStatement.java similarity index 92% rename from core/src/main/java/org/teavm/javascript/ast/IdentifiedStatement.java rename to core/src/main/java/org/teavm/ast/IdentifiedStatement.java index 39fcbdb4a..505323894 100644 --- a/core/src/main/java/org/teavm/javascript/ast/IdentifiedStatement.java +++ b/core/src/main/java/org/teavm/ast/IdentifiedStatement.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; /** * diff --git a/core/src/main/java/org/teavm/javascript/ast/InitClassStatement.java b/core/src/main/java/org/teavm/ast/InitClassStatement.java similarity index 94% rename from core/src/main/java/org/teavm/javascript/ast/InitClassStatement.java rename to core/src/main/java/org/teavm/ast/InitClassStatement.java index 07657952a..08a6f4fe4 100644 --- a/core/src/main/java/org/teavm/javascript/ast/InitClassStatement.java +++ b/core/src/main/java/org/teavm/ast/InitClassStatement.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; /** * diff --git a/core/src/main/java/org/teavm/javascript/ast/InstanceOfExpr.java b/core/src/main/java/org/teavm/ast/InstanceOfExpr.java similarity index 95% rename from core/src/main/java/org/teavm/javascript/ast/InstanceOfExpr.java rename to core/src/main/java/org/teavm/ast/InstanceOfExpr.java index 885a7de5e..178124ac1 100644 --- a/core/src/main/java/org/teavm/javascript/ast/InstanceOfExpr.java +++ b/core/src/main/java/org/teavm/ast/InstanceOfExpr.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; import java.util.Map; import org.teavm.model.ValueType; diff --git a/core/src/main/java/org/teavm/javascript/ast/InvocationExpr.java b/core/src/main/java/org/teavm/ast/InvocationExpr.java similarity index 96% rename from core/src/main/java/org/teavm/javascript/ast/InvocationExpr.java rename to core/src/main/java/org/teavm/ast/InvocationExpr.java index 2d462bb85..07fe3f237 100644 --- a/core/src/main/java/org/teavm/javascript/ast/InvocationExpr.java +++ b/core/src/main/java/org/teavm/ast/InvocationExpr.java @@ -1,5 +1,5 @@ /* - * Copyright 2011 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; import java.util.ArrayList; import java.util.List; diff --git a/core/src/main/java/org/teavm/javascript/ast/InvocationType.java b/core/src/main/java/org/teavm/ast/InvocationType.java similarity index 91% rename from core/src/main/java/org/teavm/javascript/ast/InvocationType.java rename to core/src/main/java/org/teavm/ast/InvocationType.java index af47bb018..c6512e350 100644 --- a/core/src/main/java/org/teavm/javascript/ast/InvocationType.java +++ b/core/src/main/java/org/teavm/ast/InvocationType.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; /** * diff --git a/core/src/main/java/org/teavm/javascript/ast/MethodNode.java b/core/src/main/java/org/teavm/ast/MethodNode.java similarity index 95% rename from core/src/main/java/org/teavm/javascript/ast/MethodNode.java rename to core/src/main/java/org/teavm/ast/MethodNode.java index 7186fdbe4..020c671ce 100644 --- a/core/src/main/java/org/teavm/javascript/ast/MethodNode.java +++ b/core/src/main/java/org/teavm/ast/MethodNode.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; import java.util.EnumSet; import java.util.List; diff --git a/core/src/main/java/org/teavm/javascript/ast/MethodNodeVisitor.java b/core/src/main/java/org/teavm/ast/MethodNodeVisitor.java similarity index 91% rename from core/src/main/java/org/teavm/javascript/ast/MethodNodeVisitor.java rename to core/src/main/java/org/teavm/ast/MethodNodeVisitor.java index 7ae0762ca..0c7344c55 100644 --- a/core/src/main/java/org/teavm/javascript/ast/MethodNodeVisitor.java +++ b/core/src/main/java/org/teavm/ast/MethodNodeVisitor.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; /** * diff --git a/core/src/main/java/org/teavm/javascript/ast/MonitorEnterStatement.java b/core/src/main/java/org/teavm/ast/MonitorEnterStatement.java similarity index 94% rename from core/src/main/java/org/teavm/javascript/ast/MonitorEnterStatement.java rename to core/src/main/java/org/teavm/ast/MonitorEnterStatement.java index a7479337f..2f6ec53b0 100644 --- a/core/src/main/java/org/teavm/javascript/ast/MonitorEnterStatement.java +++ b/core/src/main/java/org/teavm/ast/MonitorEnterStatement.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; /** * diff --git a/core/src/main/java/org/teavm/javascript/ast/MonitorExitStatement.java b/core/src/main/java/org/teavm/ast/MonitorExitStatement.java similarity index 94% rename from core/src/main/java/org/teavm/javascript/ast/MonitorExitStatement.java rename to core/src/main/java/org/teavm/ast/MonitorExitStatement.java index 643485096..f749345f3 100644 --- a/core/src/main/java/org/teavm/javascript/ast/MonitorExitStatement.java +++ b/core/src/main/java/org/teavm/ast/MonitorExitStatement.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; /** * diff --git a/core/src/main/java/org/teavm/javascript/ast/NativeMethodNode.java b/core/src/main/java/org/teavm/ast/NativeMethodNode.java similarity index 95% rename from core/src/main/java/org/teavm/javascript/ast/NativeMethodNode.java rename to core/src/main/java/org/teavm/ast/NativeMethodNode.java index f973e7b2c..c672da3e7 100644 --- a/core/src/main/java/org/teavm/javascript/ast/NativeMethodNode.java +++ b/core/src/main/java/org/teavm/ast/NativeMethodNode.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; import java.util.Collections; import java.util.List; diff --git a/core/src/main/java/org/teavm/javascript/ast/NewArrayExpr.java b/core/src/main/java/org/teavm/ast/NewArrayExpr.java similarity index 95% rename from core/src/main/java/org/teavm/javascript/ast/NewArrayExpr.java rename to core/src/main/java/org/teavm/ast/NewArrayExpr.java index 8b4e2bb34..221965e8a 100644 --- a/core/src/main/java/org/teavm/javascript/ast/NewArrayExpr.java +++ b/core/src/main/java/org/teavm/ast/NewArrayExpr.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; import java.util.Map; import org.teavm.model.ValueType; diff --git a/core/src/main/java/org/teavm/javascript/ast/NewExpr.java b/core/src/main/java/org/teavm/ast/NewExpr.java similarity index 95% rename from core/src/main/java/org/teavm/javascript/ast/NewExpr.java rename to core/src/main/java/org/teavm/ast/NewExpr.java index 215690519..31a44354e 100644 --- a/core/src/main/java/org/teavm/javascript/ast/NewExpr.java +++ b/core/src/main/java/org/teavm/ast/NewExpr.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; import java.util.Map; diff --git a/core/src/main/java/org/teavm/javascript/ast/NewMultiArrayExpr.java b/core/src/main/java/org/teavm/ast/NewMultiArrayExpr.java similarity index 95% rename from core/src/main/java/org/teavm/javascript/ast/NewMultiArrayExpr.java rename to core/src/main/java/org/teavm/ast/NewMultiArrayExpr.java index b03e75ed5..6ba7983a4 100644 --- a/core/src/main/java/org/teavm/javascript/ast/NewMultiArrayExpr.java +++ b/core/src/main/java/org/teavm/ast/NewMultiArrayExpr.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; import java.util.ArrayList; import java.util.List; diff --git a/core/src/main/java/org/teavm/javascript/ast/NodeLocation.java b/core/src/main/java/org/teavm/ast/NodeLocation.java similarity index 93% rename from core/src/main/java/org/teavm/javascript/ast/NodeLocation.java rename to core/src/main/java/org/teavm/ast/NodeLocation.java index 3a2356bc6..741e305f4 100644 --- a/core/src/main/java/org/teavm/javascript/ast/NodeLocation.java +++ b/core/src/main/java/org/teavm/ast/NodeLocation.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; /** * diff --git a/core/src/main/java/org/teavm/javascript/ast/NodeModifier.java b/core/src/main/java/org/teavm/ast/NodeModifier.java similarity index 90% rename from core/src/main/java/org/teavm/javascript/ast/NodeModifier.java rename to core/src/main/java/org/teavm/ast/NodeModifier.java index 70312473c..22b342862 100644 --- a/core/src/main/java/org/teavm/javascript/ast/NodeModifier.java +++ b/core/src/main/java/org/teavm/ast/NodeModifier.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; /** * diff --git a/core/src/main/java/org/teavm/javascript/ast/PrimitiveExpr.java b/core/src/main/java/org/teavm/ast/PrimitiveExpr.java similarity index 90% rename from core/src/main/java/org/teavm/javascript/ast/PrimitiveExpr.java rename to core/src/main/java/org/teavm/ast/PrimitiveExpr.java index e9174225f..384969b2f 100644 --- a/core/src/main/java/org/teavm/javascript/ast/PrimitiveExpr.java +++ b/core/src/main/java/org/teavm/ast/PrimitiveExpr.java @@ -1,19 +1,19 @@ /* - * Copyright 2011 Alexey Andreev. - * + * Copyright 2016 Alexey Andreev. + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; /** * diff --git a/core/src/main/java/org/teavm/javascript/ast/QualificationExpr.java b/core/src/main/java/org/teavm/ast/QualificationExpr.java similarity index 95% rename from core/src/main/java/org/teavm/javascript/ast/QualificationExpr.java rename to core/src/main/java/org/teavm/ast/QualificationExpr.java index 1fb64edef..e635dd0b4 100644 --- a/core/src/main/java/org/teavm/javascript/ast/QualificationExpr.java +++ b/core/src/main/java/org/teavm/ast/QualificationExpr.java @@ -1,5 +1,5 @@ /* - * Copyright 2011 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; import java.util.Map; import org.teavm.model.FieldReference; diff --git a/core/src/main/java/org/teavm/javascript/ast/RegularMethodNode.java b/core/src/main/java/org/teavm/ast/RegularMethodNode.java similarity index 95% rename from core/src/main/java/org/teavm/javascript/ast/RegularMethodNode.java rename to core/src/main/java/org/teavm/ast/RegularMethodNode.java index 2bc132ac4..e149f5c9a 100644 --- a/core/src/main/java/org/teavm/javascript/ast/RegularMethodNode.java +++ b/core/src/main/java/org/teavm/ast/RegularMethodNode.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; import java.util.ArrayList; import java.util.List; diff --git a/core/src/main/java/org/teavm/javascript/ast/ReturnStatement.java b/core/src/main/java/org/teavm/ast/ReturnStatement.java similarity index 94% rename from core/src/main/java/org/teavm/javascript/ast/ReturnStatement.java rename to core/src/main/java/org/teavm/ast/ReturnStatement.java index 02de6557c..e0a37a5bc 100644 --- a/core/src/main/java/org/teavm/javascript/ast/ReturnStatement.java +++ b/core/src/main/java/org/teavm/ast/ReturnStatement.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; /** * diff --git a/core/src/main/java/org/teavm/javascript/ast/SequentialStatement.java b/core/src/main/java/org/teavm/ast/SequentialStatement.java similarity index 93% rename from core/src/main/java/org/teavm/javascript/ast/SequentialStatement.java rename to core/src/main/java/org/teavm/ast/SequentialStatement.java index 72cd09692..2eb41e753 100644 --- a/core/src/main/java/org/teavm/javascript/ast/SequentialStatement.java +++ b/core/src/main/java/org/teavm/ast/SequentialStatement.java @@ -1,5 +1,5 @@ /* - * Copyright 2011 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; import java.util.ArrayList; import java.util.List; diff --git a/core/src/main/java/org/teavm/javascript/ast/Statement.java b/core/src/main/java/org/teavm/ast/Statement.java similarity index 96% rename from core/src/main/java/org/teavm/javascript/ast/Statement.java rename to core/src/main/java/org/teavm/ast/Statement.java index 672651c6b..0839be8e7 100644 --- a/core/src/main/java/org/teavm/javascript/ast/Statement.java +++ b/core/src/main/java/org/teavm/ast/Statement.java @@ -1,5 +1,5 @@ /* - * Copyright 2011 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; import java.util.Collections; import java.util.List; diff --git a/core/src/main/java/org/teavm/javascript/ast/StatementVisitor.java b/core/src/main/java/org/teavm/ast/StatementVisitor.java similarity index 95% rename from core/src/main/java/org/teavm/javascript/ast/StatementVisitor.java rename to core/src/main/java/org/teavm/ast/StatementVisitor.java index 7194cdb4e..bfb8bb22a 100644 --- a/core/src/main/java/org/teavm/javascript/ast/StatementVisitor.java +++ b/core/src/main/java/org/teavm/ast/StatementVisitor.java @@ -1,5 +1,5 @@ /* - * Copyright 2011 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; /** * diff --git a/core/src/main/java/org/teavm/javascript/ast/SubscriptExpr.java b/core/src/main/java/org/teavm/ast/SubscriptExpr.java similarity index 95% rename from core/src/main/java/org/teavm/javascript/ast/SubscriptExpr.java rename to core/src/main/java/org/teavm/ast/SubscriptExpr.java index ea6817812..49be6bf71 100644 --- a/core/src/main/java/org/teavm/javascript/ast/SubscriptExpr.java +++ b/core/src/main/java/org/teavm/ast/SubscriptExpr.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; import java.util.Map; diff --git a/core/src/main/java/org/teavm/javascript/ast/SwitchClause.java b/core/src/main/java/org/teavm/ast/SwitchClause.java similarity index 94% rename from core/src/main/java/org/teavm/javascript/ast/SwitchClause.java rename to core/src/main/java/org/teavm/ast/SwitchClause.java index bbdf1da4b..2ed829bb6 100644 --- a/core/src/main/java/org/teavm/javascript/ast/SwitchClause.java +++ b/core/src/main/java/org/teavm/ast/SwitchClause.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; import java.util.ArrayList; import java.util.Arrays; diff --git a/core/src/main/java/org/teavm/javascript/ast/SwitchStatement.java b/core/src/main/java/org/teavm/ast/SwitchStatement.java similarity index 94% rename from core/src/main/java/org/teavm/javascript/ast/SwitchStatement.java rename to core/src/main/java/org/teavm/ast/SwitchStatement.java index 63eec964f..edeaea142 100644 --- a/core/src/main/java/org/teavm/javascript/ast/SwitchStatement.java +++ b/core/src/main/java/org/teavm/ast/SwitchStatement.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; import java.util.ArrayList; import java.util.List; diff --git a/core/src/main/java/org/teavm/javascript/ast/ThrowStatement.java b/core/src/main/java/org/teavm/ast/ThrowStatement.java similarity index 94% rename from core/src/main/java/org/teavm/javascript/ast/ThrowStatement.java rename to core/src/main/java/org/teavm/ast/ThrowStatement.java index 1e2712dac..c1565cdea 100644 --- a/core/src/main/java/org/teavm/javascript/ast/ThrowStatement.java +++ b/core/src/main/java/org/teavm/ast/ThrowStatement.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; /** * diff --git a/core/src/main/java/org/teavm/javascript/ast/TryCatchStatement.java b/core/src/main/java/org/teavm/ast/TryCatchStatement.java similarity index 96% rename from core/src/main/java/org/teavm/javascript/ast/TryCatchStatement.java rename to core/src/main/java/org/teavm/ast/TryCatchStatement.java index 863cea302..fe3a19d9f 100644 --- a/core/src/main/java/org/teavm/javascript/ast/TryCatchStatement.java +++ b/core/src/main/java/org/teavm/ast/TryCatchStatement.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; import java.util.ArrayList; import java.util.List; diff --git a/core/src/main/java/org/teavm/javascript/ast/UnaryExpr.java b/core/src/main/java/org/teavm/ast/UnaryExpr.java similarity index 95% rename from core/src/main/java/org/teavm/javascript/ast/UnaryExpr.java rename to core/src/main/java/org/teavm/ast/UnaryExpr.java index 904bb2386..828d37f6a 100644 --- a/core/src/main/java/org/teavm/javascript/ast/UnaryExpr.java +++ b/core/src/main/java/org/teavm/ast/UnaryExpr.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; import java.util.Map; diff --git a/core/src/main/java/org/teavm/javascript/ast/UnaryOperation.java b/core/src/main/java/org/teavm/ast/UnaryOperation.java similarity index 92% rename from core/src/main/java/org/teavm/javascript/ast/UnaryOperation.java rename to core/src/main/java/org/teavm/ast/UnaryOperation.java index 03c9ad303..601a4283e 100644 --- a/core/src/main/java/org/teavm/javascript/ast/UnaryOperation.java +++ b/core/src/main/java/org/teavm/ast/UnaryOperation.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; /** * diff --git a/core/src/main/java/org/teavm/javascript/ast/UnwrapArrayExpr.java b/core/src/main/java/org/teavm/ast/UnwrapArrayExpr.java similarity index 95% rename from core/src/main/java/org/teavm/javascript/ast/UnwrapArrayExpr.java rename to core/src/main/java/org/teavm/ast/UnwrapArrayExpr.java index 80a755427..dfea48a3f 100644 --- a/core/src/main/java/org/teavm/javascript/ast/UnwrapArrayExpr.java +++ b/core/src/main/java/org/teavm/ast/UnwrapArrayExpr.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; import java.util.Map; import org.teavm.model.instructions.ArrayElementType; diff --git a/core/src/main/java/org/teavm/javascript/ast/VariableExpr.java b/core/src/main/java/org/teavm/ast/VariableExpr.java similarity index 94% rename from core/src/main/java/org/teavm/javascript/ast/VariableExpr.java rename to core/src/main/java/org/teavm/ast/VariableExpr.java index 2f4d08884..6dc5e481c 100644 --- a/core/src/main/java/org/teavm/javascript/ast/VariableExpr.java +++ b/core/src/main/java/org/teavm/ast/VariableExpr.java @@ -1,5 +1,5 @@ /* - * Copyright 2011 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; import java.util.Map; diff --git a/core/src/main/java/org/teavm/javascript/ast/WhileStatement.java b/core/src/main/java/org/teavm/ast/WhileStatement.java similarity index 94% rename from core/src/main/java/org/teavm/javascript/ast/WhileStatement.java rename to core/src/main/java/org/teavm/ast/WhileStatement.java index 87ea53356..fb99de7eb 100644 --- a/core/src/main/java/org/teavm/javascript/ast/WhileStatement.java +++ b/core/src/main/java/org/teavm/ast/WhileStatement.java @@ -1,5 +1,5 @@ /* - * Copyright 2011 Alexey Andreev. + * Copyright 2016 Alexey Andreev. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.teavm.javascript.ast; +package org.teavm.ast; import java.util.ArrayList; import java.util.List; diff --git a/core/src/main/java/org/teavm/cache/AstIO.java b/core/src/main/java/org/teavm/cache/AstIO.java index 908b74d61..cce2a850f 100644 --- a/core/src/main/java/org/teavm/cache/AstIO.java +++ b/core/src/main/java/org/teavm/cache/AstIO.java @@ -18,8 +18,55 @@ package org.teavm.cache; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; -import java.util.*; -import org.teavm.javascript.ast.*; +import java.util.EnumSet; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import org.teavm.ast.AssignmentStatement; +import org.teavm.ast.AsyncMethodNode; +import org.teavm.ast.AsyncMethodPart; +import org.teavm.ast.BinaryExpr; +import org.teavm.ast.BinaryOperation; +import org.teavm.ast.BlockStatement; +import org.teavm.ast.BreakStatement; +import org.teavm.ast.ConditionalExpr; +import org.teavm.ast.ConditionalStatement; +import org.teavm.ast.ConstantExpr; +import org.teavm.ast.ContinueStatement; +import org.teavm.ast.Expr; +import org.teavm.ast.ExprVisitor; +import org.teavm.ast.GotoPartStatement; +import org.teavm.ast.IdentifiedStatement; +import org.teavm.ast.InitClassStatement; +import org.teavm.ast.InstanceOfExpr; +import org.teavm.ast.InvocationExpr; +import org.teavm.ast.InvocationType; +import org.teavm.ast.MethodNode; +import org.teavm.ast.MonitorEnterStatement; +import org.teavm.ast.MonitorExitStatement; +import org.teavm.ast.NewArrayExpr; +import org.teavm.ast.NewExpr; +import org.teavm.ast.NewMultiArrayExpr; +import org.teavm.ast.NodeLocation; +import org.teavm.ast.NodeModifier; +import org.teavm.ast.QualificationExpr; +import org.teavm.ast.RegularMethodNode; +import org.teavm.ast.ReturnStatement; +import org.teavm.ast.SequentialStatement; +import org.teavm.ast.Statement; +import org.teavm.ast.StatementVisitor; +import org.teavm.ast.SubscriptExpr; +import org.teavm.ast.SwitchClause; +import org.teavm.ast.SwitchStatement; +import org.teavm.ast.ThrowStatement; +import org.teavm.ast.TryCatchStatement; +import org.teavm.ast.UnaryExpr; +import org.teavm.ast.UnaryOperation; +import org.teavm.ast.UnwrapArrayExpr; +import org.teavm.ast.VariableExpr; +import org.teavm.ast.WhileStatement; import org.teavm.model.FieldReference; import org.teavm.model.MethodDescriptor; import org.teavm.model.MethodReference; diff --git a/core/src/main/java/org/teavm/cache/DiskRegularMethodNodeCache.java b/core/src/main/java/org/teavm/cache/DiskRegularMethodNodeCache.java index f23f4cd0a..79c1fc8d9 100644 --- a/core/src/main/java/org/teavm/cache/DiskRegularMethodNodeCache.java +++ b/core/src/main/java/org/teavm/cache/DiskRegularMethodNodeCache.java @@ -15,10 +15,59 @@ */ package org.teavm.cache; -import java.io.*; -import java.util.*; +import java.io.BufferedInputStream; +import java.io.BufferedOutputStream; +import java.io.DataInput; +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import org.teavm.ast.AssignmentStatement; +import org.teavm.ast.AsyncMethodNode; +import org.teavm.ast.AsyncMethodPart; +import org.teavm.ast.BinaryExpr; +import org.teavm.ast.BlockStatement; +import org.teavm.ast.BreakStatement; +import org.teavm.ast.ConditionalExpr; +import org.teavm.ast.ConditionalStatement; +import org.teavm.ast.ConstantExpr; +import org.teavm.ast.ContinueStatement; +import org.teavm.ast.Expr; +import org.teavm.ast.ExprVisitor; +import org.teavm.ast.GotoPartStatement; +import org.teavm.ast.InitClassStatement; +import org.teavm.ast.InstanceOfExpr; +import org.teavm.ast.InvocationExpr; +import org.teavm.ast.MonitorEnterStatement; +import org.teavm.ast.MonitorExitStatement; +import org.teavm.ast.NewArrayExpr; +import org.teavm.ast.NewExpr; +import org.teavm.ast.NewMultiArrayExpr; +import org.teavm.ast.QualificationExpr; +import org.teavm.ast.RegularMethodNode; +import org.teavm.ast.ReturnStatement; +import org.teavm.ast.SequentialStatement; +import org.teavm.ast.Statement; +import org.teavm.ast.StatementVisitor; +import org.teavm.ast.SubscriptExpr; +import org.teavm.ast.SwitchClause; +import org.teavm.ast.SwitchStatement; +import org.teavm.ast.ThrowStatement; +import org.teavm.ast.TryCatchStatement; +import org.teavm.ast.UnaryExpr; +import org.teavm.ast.UnwrapArrayExpr; +import org.teavm.ast.VariableExpr; +import org.teavm.ast.WhileStatement; import org.teavm.javascript.MethodNodeCache; -import org.teavm.javascript.ast.*; import org.teavm.model.MethodReference; import org.teavm.parsing.ClassDateProvider; diff --git a/core/src/main/java/org/teavm/javascript/AllBlocksCountVisitor.java b/core/src/main/java/org/teavm/javascript/AllBlocksCountVisitor.java index 6b4536197..fb24c59f1 100644 --- a/core/src/main/java/org/teavm/javascript/AllBlocksCountVisitor.java +++ b/core/src/main/java/org/teavm/javascript/AllBlocksCountVisitor.java @@ -18,7 +18,25 @@ package org.teavm.javascript; import java.util.HashMap; import java.util.List; import java.util.Map; -import org.teavm.javascript.ast.*; +import org.teavm.ast.AssignmentStatement; +import org.teavm.ast.BlockStatement; +import org.teavm.ast.BreakStatement; +import org.teavm.ast.ConditionalStatement; +import org.teavm.ast.ContinueStatement; +import org.teavm.ast.GotoPartStatement; +import org.teavm.ast.IdentifiedStatement; +import org.teavm.ast.InitClassStatement; +import org.teavm.ast.MonitorEnterStatement; +import org.teavm.ast.MonitorExitStatement; +import org.teavm.ast.ReturnStatement; +import org.teavm.ast.SequentialStatement; +import org.teavm.ast.Statement; +import org.teavm.ast.StatementVisitor; +import org.teavm.ast.SwitchClause; +import org.teavm.ast.SwitchStatement; +import org.teavm.ast.ThrowStatement; +import org.teavm.ast.TryCatchStatement; +import org.teavm.ast.WhileStatement; /** * diff --git a/core/src/main/java/org/teavm/javascript/AsyncCallsFinder.java b/core/src/main/java/org/teavm/javascript/AsyncCallsFinder.java index c0fbb1e5d..9ffff3df3 100644 --- a/core/src/main/java/org/teavm/javascript/AsyncCallsFinder.java +++ b/core/src/main/java/org/teavm/javascript/AsyncCallsFinder.java @@ -18,7 +18,39 @@ package org.teavm.javascript; import java.util.HashSet; import java.util.List; import java.util.Set; -import org.teavm.javascript.ast.*; +import org.teavm.ast.AssignmentStatement; +import org.teavm.ast.BinaryExpr; +import org.teavm.ast.BlockStatement; +import org.teavm.ast.BreakStatement; +import org.teavm.ast.ConditionalExpr; +import org.teavm.ast.ConditionalStatement; +import org.teavm.ast.ConstantExpr; +import org.teavm.ast.ContinueStatement; +import org.teavm.ast.Expr; +import org.teavm.ast.ExprVisitor; +import org.teavm.ast.GotoPartStatement; +import org.teavm.ast.InitClassStatement; +import org.teavm.ast.InstanceOfExpr; +import org.teavm.ast.InvocationExpr; +import org.teavm.ast.MonitorEnterStatement; +import org.teavm.ast.MonitorExitStatement; +import org.teavm.ast.NewArrayExpr; +import org.teavm.ast.NewExpr; +import org.teavm.ast.NewMultiArrayExpr; +import org.teavm.ast.QualificationExpr; +import org.teavm.ast.ReturnStatement; +import org.teavm.ast.SequentialStatement; +import org.teavm.ast.Statement; +import org.teavm.ast.StatementVisitor; +import org.teavm.ast.SubscriptExpr; +import org.teavm.ast.SwitchClause; +import org.teavm.ast.SwitchStatement; +import org.teavm.ast.ThrowStatement; +import org.teavm.ast.TryCatchStatement; +import org.teavm.ast.UnaryExpr; +import org.teavm.ast.UnwrapArrayExpr; +import org.teavm.ast.VariableExpr; +import org.teavm.ast.WhileStatement; import org.teavm.model.MethodReference; /** diff --git a/core/src/main/java/org/teavm/javascript/BlockCountVisitor.java b/core/src/main/java/org/teavm/javascript/BlockCountVisitor.java index 39354bcbf..20647168e 100644 --- a/core/src/main/java/org/teavm/javascript/BlockCountVisitor.java +++ b/core/src/main/java/org/teavm/javascript/BlockCountVisitor.java @@ -16,7 +16,24 @@ package org.teavm.javascript; import java.util.List; -import org.teavm.javascript.ast.*; +import org.teavm.ast.AssignmentStatement; +import org.teavm.ast.BlockStatement; +import org.teavm.ast.BreakStatement; +import org.teavm.ast.ConditionalStatement; +import org.teavm.ast.ContinueStatement; +import org.teavm.ast.GotoPartStatement; +import org.teavm.ast.InitClassStatement; +import org.teavm.ast.MonitorEnterStatement; +import org.teavm.ast.MonitorExitStatement; +import org.teavm.ast.ReturnStatement; +import org.teavm.ast.SequentialStatement; +import org.teavm.ast.Statement; +import org.teavm.ast.StatementVisitor; +import org.teavm.ast.SwitchClause; +import org.teavm.ast.SwitchStatement; +import org.teavm.ast.ThrowStatement; +import org.teavm.ast.TryCatchStatement; +import org.teavm.ast.WhileStatement; /** * diff --git a/core/src/main/java/org/teavm/javascript/BreakEliminator.java b/core/src/main/java/org/teavm/javascript/BreakEliminator.java index db0420473..60bc7a7ad 100644 --- a/core/src/main/java/org/teavm/javascript/BreakEliminator.java +++ b/core/src/main/java/org/teavm/javascript/BreakEliminator.java @@ -15,8 +15,30 @@ */ package org.teavm.javascript; -import java.util.*; -import org.teavm.javascript.ast.*; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import org.teavm.ast.AssignmentStatement; +import org.teavm.ast.BlockStatement; +import org.teavm.ast.BreakStatement; +import org.teavm.ast.ConditionalStatement; +import org.teavm.ast.ContinueStatement; +import org.teavm.ast.GotoPartStatement; +import org.teavm.ast.IdentifiedStatement; +import org.teavm.ast.InitClassStatement; +import org.teavm.ast.MonitorEnterStatement; +import org.teavm.ast.MonitorExitStatement; +import org.teavm.ast.ReturnStatement; +import org.teavm.ast.SequentialStatement; +import org.teavm.ast.Statement; +import org.teavm.ast.StatementVisitor; +import org.teavm.ast.SwitchClause; +import org.teavm.ast.SwitchStatement; +import org.teavm.ast.ThrowStatement; +import org.teavm.ast.TryCatchStatement; +import org.teavm.ast.WhileStatement; /** * diff --git a/core/src/main/java/org/teavm/javascript/BreakToContinueReplacer.java b/core/src/main/java/org/teavm/javascript/BreakToContinueReplacer.java index f80c3f981..869f89ae2 100644 --- a/core/src/main/java/org/teavm/javascript/BreakToContinueReplacer.java +++ b/core/src/main/java/org/teavm/javascript/BreakToContinueReplacer.java @@ -16,7 +16,25 @@ package org.teavm.javascript; import java.util.List; -import org.teavm.javascript.ast.*; +import org.teavm.ast.AssignmentStatement; +import org.teavm.ast.BlockStatement; +import org.teavm.ast.BreakStatement; +import org.teavm.ast.ConditionalStatement; +import org.teavm.ast.ContinueStatement; +import org.teavm.ast.GotoPartStatement; +import org.teavm.ast.IdentifiedStatement; +import org.teavm.ast.InitClassStatement; +import org.teavm.ast.MonitorEnterStatement; +import org.teavm.ast.MonitorExitStatement; +import org.teavm.ast.ReturnStatement; +import org.teavm.ast.SequentialStatement; +import org.teavm.ast.Statement; +import org.teavm.ast.StatementVisitor; +import org.teavm.ast.SwitchClause; +import org.teavm.ast.SwitchStatement; +import org.teavm.ast.ThrowStatement; +import org.teavm.ast.TryCatchStatement; +import org.teavm.ast.WhileStatement; /** * diff --git a/core/src/main/java/org/teavm/javascript/Decompiler.java b/core/src/main/java/org/teavm/javascript/Decompiler.java index bcfdcdb03..2dcef0a85 100644 --- a/core/src/main/java/org/teavm/javascript/Decompiler.java +++ b/core/src/main/java/org/teavm/javascript/Decompiler.java @@ -28,28 +28,28 @@ import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Set; +import org.teavm.ast.AsyncMethodNode; +import org.teavm.ast.AsyncMethodPart; +import org.teavm.ast.BlockStatement; +import org.teavm.ast.ClassNode; +import org.teavm.ast.FieldNode; +import org.teavm.ast.GotoPartStatement; +import org.teavm.ast.IdentifiedStatement; +import org.teavm.ast.MethodNode; +import org.teavm.ast.NativeMethodNode; +import org.teavm.ast.NodeLocation; +import org.teavm.ast.NodeModifier; +import org.teavm.ast.RegularMethodNode; +import org.teavm.ast.SequentialStatement; +import org.teavm.ast.Statement; +import org.teavm.ast.TryCatchStatement; +import org.teavm.ast.WhileStatement; import org.teavm.cache.NoCache; import org.teavm.common.Graph; import org.teavm.common.GraphIndexer; import org.teavm.common.Loop; import org.teavm.common.LoopGraph; import org.teavm.common.RangeTree; -import org.teavm.javascript.ast.AsyncMethodNode; -import org.teavm.javascript.ast.AsyncMethodPart; -import org.teavm.javascript.ast.BlockStatement; -import org.teavm.javascript.ast.ClassNode; -import org.teavm.javascript.ast.FieldNode; -import org.teavm.javascript.ast.GotoPartStatement; -import org.teavm.javascript.ast.IdentifiedStatement; -import org.teavm.javascript.ast.MethodNode; -import org.teavm.javascript.ast.NativeMethodNode; -import org.teavm.javascript.ast.NodeLocation; -import org.teavm.javascript.ast.NodeModifier; -import org.teavm.javascript.ast.RegularMethodNode; -import org.teavm.javascript.ast.SequentialStatement; -import org.teavm.javascript.ast.Statement; -import org.teavm.javascript.ast.TryCatchStatement; -import org.teavm.javascript.ast.WhileStatement; import org.teavm.javascript.spi.GeneratedBy; import org.teavm.javascript.spi.Generator; import org.teavm.javascript.spi.InjectedBy; diff --git a/core/src/main/java/org/teavm/javascript/EmptyRegularMethodNodeCache.java b/core/src/main/java/org/teavm/javascript/EmptyRegularMethodNodeCache.java index 8e5ca68f7..31fd84396 100644 --- a/core/src/main/java/org/teavm/javascript/EmptyRegularMethodNodeCache.java +++ b/core/src/main/java/org/teavm/javascript/EmptyRegularMethodNodeCache.java @@ -15,8 +15,8 @@ */ package org.teavm.javascript; -import org.teavm.javascript.ast.AsyncMethodNode; -import org.teavm.javascript.ast.RegularMethodNode; +import org.teavm.ast.AsyncMethodNode; +import org.teavm.ast.RegularMethodNode; import org.teavm.model.MethodReference; /** diff --git a/core/src/main/java/org/teavm/javascript/EscapingStatementFinder.java b/core/src/main/java/org/teavm/javascript/EscapingStatementFinder.java index 8525d3c29..f894139a6 100644 --- a/core/src/main/java/org/teavm/javascript/EscapingStatementFinder.java +++ b/core/src/main/java/org/teavm/javascript/EscapingStatementFinder.java @@ -16,7 +16,24 @@ package org.teavm.javascript; import java.util.List; -import org.teavm.javascript.ast.*; +import org.teavm.ast.AssignmentStatement; +import org.teavm.ast.BlockStatement; +import org.teavm.ast.BreakStatement; +import org.teavm.ast.ConditionalStatement; +import org.teavm.ast.ContinueStatement; +import org.teavm.ast.GotoPartStatement; +import org.teavm.ast.InitClassStatement; +import org.teavm.ast.MonitorEnterStatement; +import org.teavm.ast.MonitorExitStatement; +import org.teavm.ast.ReturnStatement; +import org.teavm.ast.SequentialStatement; +import org.teavm.ast.Statement; +import org.teavm.ast.StatementVisitor; +import org.teavm.ast.SwitchClause; +import org.teavm.ast.SwitchStatement; +import org.teavm.ast.ThrowStatement; +import org.teavm.ast.TryCatchStatement; +import org.teavm.ast.WhileStatement; /** * diff --git a/core/src/main/java/org/teavm/javascript/ExprOptimizer.java b/core/src/main/java/org/teavm/javascript/ExprOptimizer.java index d98646976..a819f418c 100644 --- a/core/src/main/java/org/teavm/javascript/ExprOptimizer.java +++ b/core/src/main/java/org/teavm/javascript/ExprOptimizer.java @@ -15,7 +15,11 @@ */ package org.teavm.javascript; -import org.teavm.javascript.ast.*; +import org.teavm.ast.BinaryExpr; +import org.teavm.ast.BinaryOperation; +import org.teavm.ast.Expr; +import org.teavm.ast.UnaryExpr; +import org.teavm.ast.UnaryOperation; /** * diff --git a/core/src/main/java/org/teavm/javascript/ExpressionSideEffectDecomposer.java b/core/src/main/java/org/teavm/javascript/ExpressionSideEffectDecomposer.java index 5ed8c2061..344e42a9a 100644 --- a/core/src/main/java/org/teavm/javascript/ExpressionSideEffectDecomposer.java +++ b/core/src/main/java/org/teavm/javascript/ExpressionSideEffectDecomposer.java @@ -16,23 +16,23 @@ package org.teavm.javascript; import java.util.List; -import org.teavm.javascript.ast.BinaryExpr; -import org.teavm.javascript.ast.ConditionalExpr; -import org.teavm.javascript.ast.ConditionalStatement; -import org.teavm.javascript.ast.ConstantExpr; -import org.teavm.javascript.ast.Expr; -import org.teavm.javascript.ast.ExprVisitor; -import org.teavm.javascript.ast.InstanceOfExpr; -import org.teavm.javascript.ast.InvocationExpr; -import org.teavm.javascript.ast.NewArrayExpr; -import org.teavm.javascript.ast.NewExpr; -import org.teavm.javascript.ast.NewMultiArrayExpr; -import org.teavm.javascript.ast.QualificationExpr; -import org.teavm.javascript.ast.Statement; -import org.teavm.javascript.ast.SubscriptExpr; -import org.teavm.javascript.ast.UnaryExpr; -import org.teavm.javascript.ast.UnwrapArrayExpr; -import org.teavm.javascript.ast.VariableExpr; +import org.teavm.ast.BinaryExpr; +import org.teavm.ast.ConditionalExpr; +import org.teavm.ast.ConditionalStatement; +import org.teavm.ast.ConstantExpr; +import org.teavm.ast.Expr; +import org.teavm.ast.ExprVisitor; +import org.teavm.ast.InstanceOfExpr; +import org.teavm.ast.InvocationExpr; +import org.teavm.ast.NewArrayExpr; +import org.teavm.ast.NewExpr; +import org.teavm.ast.NewMultiArrayExpr; +import org.teavm.ast.QualificationExpr; +import org.teavm.ast.Statement; +import org.teavm.ast.SubscriptExpr; +import org.teavm.ast.UnaryExpr; +import org.teavm.ast.UnwrapArrayExpr; +import org.teavm.ast.VariableExpr; public class ExpressionSideEffectDecomposer implements ExprVisitor { private List target; diff --git a/core/src/main/java/org/teavm/javascript/InMemoryRegularMethodNodeCache.java b/core/src/main/java/org/teavm/javascript/InMemoryRegularMethodNodeCache.java index 2bc43b1bc..83dc70976 100644 --- a/core/src/main/java/org/teavm/javascript/InMemoryRegularMethodNodeCache.java +++ b/core/src/main/java/org/teavm/javascript/InMemoryRegularMethodNodeCache.java @@ -17,8 +17,8 @@ package org.teavm.javascript; import java.util.HashMap; import java.util.Map; -import org.teavm.javascript.ast.AsyncMethodNode; -import org.teavm.javascript.ast.RegularMethodNode; +import org.teavm.ast.AsyncMethodNode; +import org.teavm.ast.RegularMethodNode; import org.teavm.model.MethodReference; /** diff --git a/core/src/main/java/org/teavm/javascript/MethodNodeCache.java b/core/src/main/java/org/teavm/javascript/MethodNodeCache.java index f66d2c860..118140ca7 100644 --- a/core/src/main/java/org/teavm/javascript/MethodNodeCache.java +++ b/core/src/main/java/org/teavm/javascript/MethodNodeCache.java @@ -15,8 +15,8 @@ */ package org.teavm.javascript; -import org.teavm.javascript.ast.AsyncMethodNode; -import org.teavm.javascript.ast.RegularMethodNode; +import org.teavm.ast.AsyncMethodNode; +import org.teavm.ast.RegularMethodNode; import org.teavm.model.MethodReference; /** diff --git a/core/src/main/java/org/teavm/javascript/NameFrequencyEstimator.java b/core/src/main/java/org/teavm/javascript/NameFrequencyEstimator.java index fdc21ba6a..d3aee4882 100644 --- a/core/src/main/java/org/teavm/javascript/NameFrequencyEstimator.java +++ b/core/src/main/java/org/teavm/javascript/NameFrequencyEstimator.java @@ -17,9 +17,57 @@ package org.teavm.javascript; import java.util.List; import java.util.Set; +import org.teavm.ast.AssignmentStatement; +import org.teavm.ast.AsyncMethodNode; +import org.teavm.ast.AsyncMethodPart; +import org.teavm.ast.BinaryExpr; +import org.teavm.ast.BlockStatement; +import org.teavm.ast.BreakStatement; +import org.teavm.ast.ClassNode; +import org.teavm.ast.ConditionalExpr; +import org.teavm.ast.ConditionalStatement; +import org.teavm.ast.ConstantExpr; +import org.teavm.ast.ContinueStatement; +import org.teavm.ast.Expr; +import org.teavm.ast.ExprVisitor; +import org.teavm.ast.FieldNode; +import org.teavm.ast.GotoPartStatement; +import org.teavm.ast.InitClassStatement; +import org.teavm.ast.InstanceOfExpr; +import org.teavm.ast.InvocationExpr; +import org.teavm.ast.MethodNode; +import org.teavm.ast.MethodNodeVisitor; +import org.teavm.ast.MonitorEnterStatement; +import org.teavm.ast.MonitorExitStatement; +import org.teavm.ast.NativeMethodNode; +import org.teavm.ast.NewArrayExpr; +import org.teavm.ast.NewExpr; +import org.teavm.ast.NewMultiArrayExpr; +import org.teavm.ast.NodeModifier; +import org.teavm.ast.QualificationExpr; +import org.teavm.ast.RegularMethodNode; +import org.teavm.ast.ReturnStatement; +import org.teavm.ast.SequentialStatement; +import org.teavm.ast.Statement; +import org.teavm.ast.StatementVisitor; +import org.teavm.ast.SubscriptExpr; +import org.teavm.ast.SwitchClause; +import org.teavm.ast.SwitchStatement; +import org.teavm.ast.ThrowStatement; +import org.teavm.ast.TryCatchStatement; +import org.teavm.ast.UnaryExpr; +import org.teavm.ast.UnwrapArrayExpr; +import org.teavm.ast.VariableExpr; +import org.teavm.ast.WhileStatement; import org.teavm.codegen.NameFrequencyConsumer; -import org.teavm.javascript.ast.*; -import org.teavm.model.*; +import org.teavm.model.ClassReader; +import org.teavm.model.ClassReaderSource; +import org.teavm.model.ElementModifier; +import org.teavm.model.FieldReference; +import org.teavm.model.MethodDescriptor; +import org.teavm.model.MethodReader; +import org.teavm.model.MethodReference; +import org.teavm.model.ValueType; class NameFrequencyEstimator implements StatementVisitor, ExprVisitor, MethodNodeVisitor { private final NameFrequencyConsumer consumer; diff --git a/core/src/main/java/org/teavm/javascript/Optimizer.java b/core/src/main/java/org/teavm/javascript/Optimizer.java index 6dc31ebd9..a624c273b 100644 --- a/core/src/main/java/org/teavm/javascript/Optimizer.java +++ b/core/src/main/java/org/teavm/javascript/Optimizer.java @@ -17,10 +17,10 @@ package org.teavm.javascript; import java.util.BitSet; import java.util.List; +import org.teavm.ast.AsyncMethodNode; +import org.teavm.ast.AsyncMethodPart; +import org.teavm.ast.RegularMethodNode; import org.teavm.common.Graph; -import org.teavm.javascript.ast.AsyncMethodNode; -import org.teavm.javascript.ast.AsyncMethodPart; -import org.teavm.javascript.ast.RegularMethodNode; import org.teavm.model.Instruction; import org.teavm.model.Program; import org.teavm.model.Variable; diff --git a/core/src/main/java/org/teavm/javascript/OptimizingVisitor.java b/core/src/main/java/org/teavm/javascript/OptimizingVisitor.java index 814ff9d06..3480c5439 100644 --- a/core/src/main/java/org/teavm/javascript/OptimizingVisitor.java +++ b/core/src/main/java/org/teavm/javascript/OptimizingVisitor.java @@ -15,9 +15,47 @@ */ package org.teavm.javascript; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Objects; import java.util.stream.Collectors; -import org.teavm.javascript.ast.*; +import org.teavm.ast.AssignmentStatement; +import org.teavm.ast.BinaryExpr; +import org.teavm.ast.BinaryOperation; +import org.teavm.ast.BlockStatement; +import org.teavm.ast.BreakStatement; +import org.teavm.ast.ConditionalExpr; +import org.teavm.ast.ConditionalStatement; +import org.teavm.ast.ConstantExpr; +import org.teavm.ast.ContinueStatement; +import org.teavm.ast.Expr; +import org.teavm.ast.ExprVisitor; +import org.teavm.ast.GotoPartStatement; +import org.teavm.ast.IdentifiedStatement; +import org.teavm.ast.InitClassStatement; +import org.teavm.ast.InstanceOfExpr; +import org.teavm.ast.InvocationExpr; +import org.teavm.ast.MonitorEnterStatement; +import org.teavm.ast.MonitorExitStatement; +import org.teavm.ast.NewArrayExpr; +import org.teavm.ast.NewExpr; +import org.teavm.ast.NewMultiArrayExpr; +import org.teavm.ast.QualificationExpr; +import org.teavm.ast.ReturnStatement; +import org.teavm.ast.SequentialStatement; +import org.teavm.ast.Statement; +import org.teavm.ast.StatementVisitor; +import org.teavm.ast.SubscriptExpr; +import org.teavm.ast.SwitchClause; +import org.teavm.ast.SwitchStatement; +import org.teavm.ast.ThrowStatement; +import org.teavm.ast.TryCatchStatement; +import org.teavm.ast.UnaryExpr; +import org.teavm.ast.UnaryOperation; +import org.teavm.ast.UnwrapArrayExpr; +import org.teavm.ast.VariableExpr; +import org.teavm.ast.WhileStatement; class OptimizingVisitor implements StatementVisitor, ExprVisitor { private Expr resultExpr; diff --git a/core/src/main/java/org/teavm/javascript/RedundantLabelEliminator.java b/core/src/main/java/org/teavm/javascript/RedundantLabelEliminator.java index c0d240ebd..e516e6f8b 100644 --- a/core/src/main/java/org/teavm/javascript/RedundantLabelEliminator.java +++ b/core/src/main/java/org/teavm/javascript/RedundantLabelEliminator.java @@ -18,7 +18,25 @@ package org.teavm.javascript; import java.util.HashSet; import java.util.List; import java.util.Set; -import org.teavm.javascript.ast.*; +import org.teavm.ast.AssignmentStatement; +import org.teavm.ast.BlockStatement; +import org.teavm.ast.BreakStatement; +import org.teavm.ast.ConditionalStatement; +import org.teavm.ast.ContinueStatement; +import org.teavm.ast.GotoPartStatement; +import org.teavm.ast.IdentifiedStatement; +import org.teavm.ast.InitClassStatement; +import org.teavm.ast.MonitorEnterStatement; +import org.teavm.ast.MonitorExitStatement; +import org.teavm.ast.ReturnStatement; +import org.teavm.ast.SequentialStatement; +import org.teavm.ast.Statement; +import org.teavm.ast.StatementVisitor; +import org.teavm.ast.SwitchClause; +import org.teavm.ast.SwitchStatement; +import org.teavm.ast.ThrowStatement; +import org.teavm.ast.TryCatchStatement; +import org.teavm.ast.WhileStatement; /** * diff --git a/core/src/main/java/org/teavm/javascript/ReferenceCountingVisitor.java b/core/src/main/java/org/teavm/javascript/ReferenceCountingVisitor.java index 031ca7d2a..89be1604a 100644 --- a/core/src/main/java/org/teavm/javascript/ReferenceCountingVisitor.java +++ b/core/src/main/java/org/teavm/javascript/ReferenceCountingVisitor.java @@ -15,7 +15,25 @@ */ package org.teavm.javascript; -import org.teavm.javascript.ast.*; +import org.teavm.ast.AssignmentStatement; +import org.teavm.ast.BlockStatement; +import org.teavm.ast.BreakStatement; +import org.teavm.ast.ConditionalStatement; +import org.teavm.ast.ContinueStatement; +import org.teavm.ast.GotoPartStatement; +import org.teavm.ast.IdentifiedStatement; +import org.teavm.ast.InitClassStatement; +import org.teavm.ast.MonitorEnterStatement; +import org.teavm.ast.MonitorExitStatement; +import org.teavm.ast.ReturnStatement; +import org.teavm.ast.SequentialStatement; +import org.teavm.ast.Statement; +import org.teavm.ast.StatementVisitor; +import org.teavm.ast.SwitchClause; +import org.teavm.ast.SwitchStatement; +import org.teavm.ast.ThrowStatement; +import org.teavm.ast.TryCatchStatement; +import org.teavm.ast.WhileStatement; /** * diff --git a/core/src/main/java/org/teavm/javascript/Renderer.java b/core/src/main/java/org/teavm/javascript/Renderer.java index 6b76d2bfe..97cdc30f1 100644 --- a/core/src/main/java/org/teavm/javascript/Renderer.java +++ b/core/src/main/java/org/teavm/javascript/Renderer.java @@ -28,6 +28,51 @@ import java.util.List; import java.util.Map; import java.util.Properties; import java.util.Set; +import org.teavm.ast.AssignmentStatement; +import org.teavm.ast.AsyncMethodNode; +import org.teavm.ast.AsyncMethodPart; +import org.teavm.ast.BinaryExpr; +import org.teavm.ast.BinaryOperation; +import org.teavm.ast.BlockStatement; +import org.teavm.ast.BreakStatement; +import org.teavm.ast.ClassNode; +import org.teavm.ast.ConditionalExpr; +import org.teavm.ast.ConditionalStatement; +import org.teavm.ast.ConstantExpr; +import org.teavm.ast.ContinueStatement; +import org.teavm.ast.Expr; +import org.teavm.ast.ExprVisitor; +import org.teavm.ast.FieldNode; +import org.teavm.ast.GotoPartStatement; +import org.teavm.ast.InitClassStatement; +import org.teavm.ast.InstanceOfExpr; +import org.teavm.ast.InvocationExpr; +import org.teavm.ast.InvocationType; +import org.teavm.ast.MethodNode; +import org.teavm.ast.MethodNodeVisitor; +import org.teavm.ast.MonitorEnterStatement; +import org.teavm.ast.MonitorExitStatement; +import org.teavm.ast.NativeMethodNode; +import org.teavm.ast.NewArrayExpr; +import org.teavm.ast.NewExpr; +import org.teavm.ast.NewMultiArrayExpr; +import org.teavm.ast.NodeLocation; +import org.teavm.ast.NodeModifier; +import org.teavm.ast.QualificationExpr; +import org.teavm.ast.RegularMethodNode; +import org.teavm.ast.ReturnStatement; +import org.teavm.ast.SequentialStatement; +import org.teavm.ast.Statement; +import org.teavm.ast.StatementVisitor; +import org.teavm.ast.SubscriptExpr; +import org.teavm.ast.SwitchClause; +import org.teavm.ast.SwitchStatement; +import org.teavm.ast.ThrowStatement; +import org.teavm.ast.TryCatchStatement; +import org.teavm.ast.UnaryExpr; +import org.teavm.ast.UnwrapArrayExpr; +import org.teavm.ast.VariableExpr; +import org.teavm.ast.WhileStatement; import org.teavm.codegen.NamingException; import org.teavm.codegen.NamingOrderer; import org.teavm.codegen.NamingStrategy; @@ -37,51 +82,6 @@ import org.teavm.debugging.information.DebugInformationEmitter; import org.teavm.debugging.information.DeferredCallSite; import org.teavm.debugging.information.DummyDebugInformationEmitter; import org.teavm.diagnostics.Diagnostics; -import org.teavm.javascript.ast.AssignmentStatement; -import org.teavm.javascript.ast.AsyncMethodNode; -import org.teavm.javascript.ast.AsyncMethodPart; -import org.teavm.javascript.ast.BinaryExpr; -import org.teavm.javascript.ast.BinaryOperation; -import org.teavm.javascript.ast.BlockStatement; -import org.teavm.javascript.ast.BreakStatement; -import org.teavm.javascript.ast.ClassNode; -import org.teavm.javascript.ast.ConditionalExpr; -import org.teavm.javascript.ast.ConditionalStatement; -import org.teavm.javascript.ast.ConstantExpr; -import org.teavm.javascript.ast.ContinueStatement; -import org.teavm.javascript.ast.Expr; -import org.teavm.javascript.ast.ExprVisitor; -import org.teavm.javascript.ast.FieldNode; -import org.teavm.javascript.ast.GotoPartStatement; -import org.teavm.javascript.ast.InitClassStatement; -import org.teavm.javascript.ast.InstanceOfExpr; -import org.teavm.javascript.ast.InvocationExpr; -import org.teavm.javascript.ast.InvocationType; -import org.teavm.javascript.ast.MethodNode; -import org.teavm.javascript.ast.MethodNodeVisitor; -import org.teavm.javascript.ast.MonitorEnterStatement; -import org.teavm.javascript.ast.MonitorExitStatement; -import org.teavm.javascript.ast.NativeMethodNode; -import org.teavm.javascript.ast.NewArrayExpr; -import org.teavm.javascript.ast.NewExpr; -import org.teavm.javascript.ast.NewMultiArrayExpr; -import org.teavm.javascript.ast.NodeLocation; -import org.teavm.javascript.ast.NodeModifier; -import org.teavm.javascript.ast.QualificationExpr; -import org.teavm.javascript.ast.RegularMethodNode; -import org.teavm.javascript.ast.ReturnStatement; -import org.teavm.javascript.ast.SequentialStatement; -import org.teavm.javascript.ast.Statement; -import org.teavm.javascript.ast.StatementVisitor; -import org.teavm.javascript.ast.SubscriptExpr; -import org.teavm.javascript.ast.SwitchClause; -import org.teavm.javascript.ast.SwitchStatement; -import org.teavm.javascript.ast.ThrowStatement; -import org.teavm.javascript.ast.TryCatchStatement; -import org.teavm.javascript.ast.UnaryExpr; -import org.teavm.javascript.ast.UnwrapArrayExpr; -import org.teavm.javascript.ast.VariableExpr; -import org.teavm.javascript.ast.WhileStatement; import org.teavm.javascript.spi.GeneratorContext; import org.teavm.javascript.spi.InjectedBy; import org.teavm.javascript.spi.Injector; diff --git a/core/src/main/java/org/teavm/javascript/StatementGenerator.java b/core/src/main/java/org/teavm/javascript/StatementGenerator.java index 7dcb4c314..c90ed2305 100644 --- a/core/src/main/java/org/teavm/javascript/StatementGenerator.java +++ b/core/src/main/java/org/teavm/javascript/StatementGenerator.java @@ -15,13 +15,78 @@ */ package org.teavm.javascript; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.teavm.ast.AssignmentStatement; +import org.teavm.ast.BinaryOperation; +import org.teavm.ast.BreakStatement; +import org.teavm.ast.ContinueStatement; +import org.teavm.ast.Expr; +import org.teavm.ast.InitClassStatement; +import org.teavm.ast.InvocationExpr; +import org.teavm.ast.MonitorEnterStatement; +import org.teavm.ast.MonitorExitStatement; +import org.teavm.ast.NodeLocation; +import org.teavm.ast.ReturnStatement; +import org.teavm.ast.Statement; +import org.teavm.ast.SwitchClause; +import org.teavm.ast.SwitchStatement; +import org.teavm.ast.ThrowStatement; +import org.teavm.ast.UnaryOperation; +import org.teavm.ast.UnwrapArrayExpr; import org.teavm.common.GraphIndexer; -import org.teavm.javascript.ast.*; -import org.teavm.javascript.ast.BinaryOperation; -import org.teavm.model.*; -import org.teavm.model.instructions.*; +import org.teavm.model.BasicBlock; +import org.teavm.model.ClassHolderSource; +import org.teavm.model.InvokeDynamicInstruction; +import org.teavm.model.MethodDescriptor; +import org.teavm.model.MethodReference; +import org.teavm.model.Program; +import org.teavm.model.ValueType; +import org.teavm.model.Variable; +import org.teavm.model.instructions.ArrayLengthInstruction; +import org.teavm.model.instructions.AssignInstruction; +import org.teavm.model.instructions.BinaryBranchingInstruction; +import org.teavm.model.instructions.BinaryInstruction; +import org.teavm.model.instructions.BranchingInstruction; +import org.teavm.model.instructions.CastInstruction; +import org.teavm.model.instructions.CastIntegerInstruction; +import org.teavm.model.instructions.CastNumberInstruction; +import org.teavm.model.instructions.ClassConstantInstruction; +import org.teavm.model.instructions.CloneArrayInstruction; +import org.teavm.model.instructions.ConstructArrayInstruction; +import org.teavm.model.instructions.ConstructInstruction; +import org.teavm.model.instructions.ConstructMultiArrayInstruction; +import org.teavm.model.instructions.DoubleConstantInstruction; +import org.teavm.model.instructions.EmptyInstruction; +import org.teavm.model.instructions.ExitInstruction; +import org.teavm.model.instructions.FloatConstantInstruction; +import org.teavm.model.instructions.GetElementInstruction; +import org.teavm.model.instructions.GetFieldInstruction; +import org.teavm.model.instructions.InitClassInstruction; +import org.teavm.model.instructions.InstructionVisitor; +import org.teavm.model.instructions.IntegerConstantInstruction; import org.teavm.model.instructions.InvocationType; +import org.teavm.model.instructions.InvokeInstruction; +import org.teavm.model.instructions.IsInstanceInstruction; +import org.teavm.model.instructions.JumpInstruction; +import org.teavm.model.instructions.LongConstantInstruction; +import org.teavm.model.instructions.MonitorEnterInstruction; +import org.teavm.model.instructions.MonitorExitInstruction; +import org.teavm.model.instructions.NegateInstruction; +import org.teavm.model.instructions.NullCheckInstruction; +import org.teavm.model.instructions.NullConstantInstruction; +import org.teavm.model.instructions.NumericOperandType; +import org.teavm.model.instructions.PutElementInstruction; +import org.teavm.model.instructions.PutFieldInstruction; +import org.teavm.model.instructions.RaiseInstruction; +import org.teavm.model.instructions.StringConstantInstruction; +import org.teavm.model.instructions.SwitchInstruction; +import org.teavm.model.instructions.SwitchTableEntry; +import org.teavm.model.instructions.UnwrapArrayInstruction; class StatementGenerator implements InstructionVisitor { private int lastSwitchId; diff --git a/core/src/main/java/org/teavm/javascript/TryCatchFinder.java b/core/src/main/java/org/teavm/javascript/TryCatchFinder.java index 6bc07c4f0..9b19cd443 100644 --- a/core/src/main/java/org/teavm/javascript/TryCatchFinder.java +++ b/core/src/main/java/org/teavm/javascript/TryCatchFinder.java @@ -16,7 +16,24 @@ package org.teavm.javascript; import java.util.List; -import org.teavm.javascript.ast.*; +import org.teavm.ast.AssignmentStatement; +import org.teavm.ast.BlockStatement; +import org.teavm.ast.BreakStatement; +import org.teavm.ast.ConditionalStatement; +import org.teavm.ast.ContinueStatement; +import org.teavm.ast.GotoPartStatement; +import org.teavm.ast.InitClassStatement; +import org.teavm.ast.MonitorEnterStatement; +import org.teavm.ast.MonitorExitStatement; +import org.teavm.ast.ReturnStatement; +import org.teavm.ast.SequentialStatement; +import org.teavm.ast.Statement; +import org.teavm.ast.StatementVisitor; +import org.teavm.ast.SwitchClause; +import org.teavm.ast.SwitchStatement; +import org.teavm.ast.ThrowStatement; +import org.teavm.ast.TryCatchStatement; +import org.teavm.ast.WhileStatement; /** * diff --git a/core/src/main/java/org/teavm/javascript/UnusedVariableEliminator.java b/core/src/main/java/org/teavm/javascript/UnusedVariableEliminator.java index 2d6aa5e6f..7a3bd2adb 100644 --- a/core/src/main/java/org/teavm/javascript/UnusedVariableEliminator.java +++ b/core/src/main/java/org/teavm/javascript/UnusedVariableEliminator.java @@ -17,7 +17,39 @@ package org.teavm.javascript; import java.util.Arrays; import java.util.List; -import org.teavm.javascript.ast.*; +import org.teavm.ast.AssignmentStatement; +import org.teavm.ast.BinaryExpr; +import org.teavm.ast.BlockStatement; +import org.teavm.ast.BreakStatement; +import org.teavm.ast.ConditionalExpr; +import org.teavm.ast.ConditionalStatement; +import org.teavm.ast.ConstantExpr; +import org.teavm.ast.ContinueStatement; +import org.teavm.ast.Expr; +import org.teavm.ast.ExprVisitor; +import org.teavm.ast.GotoPartStatement; +import org.teavm.ast.InitClassStatement; +import org.teavm.ast.InstanceOfExpr; +import org.teavm.ast.InvocationExpr; +import org.teavm.ast.MonitorEnterStatement; +import org.teavm.ast.MonitorExitStatement; +import org.teavm.ast.NewArrayExpr; +import org.teavm.ast.NewExpr; +import org.teavm.ast.NewMultiArrayExpr; +import org.teavm.ast.QualificationExpr; +import org.teavm.ast.ReturnStatement; +import org.teavm.ast.SequentialStatement; +import org.teavm.ast.Statement; +import org.teavm.ast.StatementVisitor; +import org.teavm.ast.SubscriptExpr; +import org.teavm.ast.SwitchClause; +import org.teavm.ast.SwitchStatement; +import org.teavm.ast.ThrowStatement; +import org.teavm.ast.TryCatchStatement; +import org.teavm.ast.UnaryExpr; +import org.teavm.ast.UnwrapArrayExpr; +import org.teavm.ast.VariableExpr; +import org.teavm.ast.WhileStatement; class UnusedVariableEliminator implements ExprVisitor, StatementVisitor { private final int[] variables; diff --git a/core/src/main/java/org/teavm/javascript/spi/InjectorContext.java b/core/src/main/java/org/teavm/javascript/spi/InjectorContext.java index 361f36c95..a525354e6 100644 --- a/core/src/main/java/org/teavm/javascript/spi/InjectorContext.java +++ b/core/src/main/java/org/teavm/javascript/spi/InjectorContext.java @@ -17,10 +17,10 @@ package org.teavm.javascript.spi; import java.io.IOException; import java.util.Properties; +import org.teavm.ast.Expr; import org.teavm.codegen.SourceWriter; import org.teavm.common.ServiceRepository; import org.teavm.javascript.Precedence; -import org.teavm.javascript.ast.Expr; import org.teavm.model.ListableClassReaderSource; import org.teavm.model.ValueType; diff --git a/jso/impl/src/main/java/org/teavm/jso/impl/JSNativeGenerator.java b/jso/impl/src/main/java/org/teavm/jso/impl/JSNativeGenerator.java index 863131465..8e8386a20 100644 --- a/jso/impl/src/main/java/org/teavm/jso/impl/JSNativeGenerator.java +++ b/jso/impl/src/main/java/org/teavm/jso/impl/JSNativeGenerator.java @@ -16,15 +16,15 @@ package org.teavm.jso.impl; import java.io.IOException; +import org.teavm.ast.ConstantExpr; +import org.teavm.ast.Expr; +import org.teavm.ast.InvocationExpr; import org.teavm.codegen.SourceWriter; import org.teavm.dependency.DependencyAgent; import org.teavm.dependency.DependencyPlugin; import org.teavm.dependency.MethodDependency; import org.teavm.javascript.Precedence; import org.teavm.javascript.Renderer; -import org.teavm.javascript.ast.ConstantExpr; -import org.teavm.javascript.ast.Expr; -import org.teavm.javascript.ast.InvocationExpr; import org.teavm.javascript.spi.Generator; import org.teavm.javascript.spi.GeneratorContext; import org.teavm.javascript.spi.Injector; diff --git a/platform/src/main/java/org/teavm/platform/plugin/ResourceAccessorInjector.java b/platform/src/main/java/org/teavm/platform/plugin/ResourceAccessorInjector.java index 5bee5d121..85ab10e7e 100644 --- a/platform/src/main/java/org/teavm/platform/plugin/ResourceAccessorInjector.java +++ b/platform/src/main/java/org/teavm/platform/plugin/ResourceAccessorInjector.java @@ -16,8 +16,8 @@ package org.teavm.platform.plugin; import java.io.IOException; -import org.teavm.javascript.ast.ConstantExpr; -import org.teavm.javascript.ast.Expr; +import org.teavm.ast.ConstantExpr; +import org.teavm.ast.Expr; import org.teavm.javascript.spi.Injector; import org.teavm.javascript.spi.InjectorContext; import org.teavm.model.MethodReference;