From c0b23d50e56abf1b9baa6be22cec61556bfaed2e Mon Sep 17 00:00:00 2001 From: TopchetoEU <36534413+TopchetoEU@users.noreply.github.com> Date: Sun, 12 Jan 2025 04:31:32 +0200 Subject: [PATCH] make common project classes hierarchy flat --- .../j2s/common/{environment => }/Environment.java | 2 +- .../j2s/common/{mapping => }/FunctionMap.java | 4 +--- .../main/java/me/topchetoeu/j2s/common/Key.java | 3 +++ .../me/topchetoeu/j2s/common/environment/Key.java | 3 --- .../java/me/topchetoeu/j2s/TestHelloWorld.java | 14 -------------- .../topchetoeu/j2s/compilation/CompileResult.java | 8 ++++---- .../topchetoeu/j2s/compilation/FunctionNode.java | 2 +- .../me/topchetoeu/j2s/compilation/JavaScript.java | 4 ++-- .../topchetoeu/j2s/compilation/LabelContext.java | 4 ++-- .../topchetoeu/j2s/compilation/parsing/Source.java | 2 +- .../me/topchetoeu/j2s/compilation/TestSource.java | 2 +- .../java/me/topchetoeu/j2s/repl/JSONConverter.java | 2 +- .../java/me/topchetoeu/j2s/repl/SimpleRepl.java | 4 ++-- .../me/topchetoeu/j2s/repl/debug/ScopeObject.java | 2 +- .../topchetoeu/j2s/repl/debug/SimpleDebugger.java | 4 ++-- .../me/topchetoeu/j2s/repl/debug/StackObject.java | 2 +- .../topchetoeu/j2s/repl/mapping/NativeMapper.java | 2 +- .../java/me/topchetoeu/j2s/runtime/Compiler.java | 4 ++-- .../java/me/topchetoeu/j2s/runtime/EventLoop.java | 4 ++-- .../main/java/me/topchetoeu/j2s/runtime/Frame.java | 4 ++-- .../topchetoeu/j2s/runtime/InstructionRunner.java | 2 +- .../topchetoeu/j2s/runtime/debug/DebugContext.java | 6 +++--- .../topchetoeu/j2s/runtime/debug/DebugHandler.java | 4 ++-- .../j2s/runtime/exceptions/EngineException.java | 2 +- .../me/topchetoeu/j2s/runtime/values/KeyCache.java | 2 +- .../me/topchetoeu/j2s/runtime/values/Member.java | 2 +- .../me/topchetoeu/j2s/runtime/values/Value.java | 4 ++-- .../j2s/runtime/values/functions/Arguments.java | 2 +- .../j2s/runtime/values/functions/CodeFunction.java | 2 +- .../runtime/values/functions/FunctionValue.java | 2 +- .../runtime/values/functions/NativeFunction.java | 2 +- .../j2s/runtime/values/objects/ArrayLikeValue.java | 2 +- .../j2s/runtime/values/objects/ArrayValue.java | 2 +- .../j2s/runtime/values/objects/ObjectValue.java | 4 ++-- .../values/objects/buffers/TypedArrayValue.java | 2 +- .../j2s/runtime/values/primitives/BoolValue.java | 2 +- .../runtime/values/primitives/PrimitiveValue.java | 2 +- .../j2s/runtime/values/primitives/StringValue.java | 2 +- .../j2s/runtime/values/primitives/SymbolValue.java | 2 +- .../j2s/runtime/values/primitives/UserValue.java | 2 +- .../j2s/runtime/values/primitives/VoidValue.java | 2 +- .../values/primitives/numbers/IntValue.java | 2 +- .../values/primitives/numbers/NumberValue.java | 2 +- 43 files changed, 58 insertions(+), 74 deletions(-) rename common/src/main/java/me/topchetoeu/j2s/common/{environment => }/Environment.java (98%) rename common/src/main/java/me/topchetoeu/j2s/common/{mapping => }/FunctionMap.java (97%) create mode 100644 common/src/main/java/me/topchetoeu/j2s/common/Key.java delete mode 100644 common/src/main/java/me/topchetoeu/j2s/common/environment/Key.java delete mode 100644 common/src/main/test/java/me/topchetoeu/j2s/TestHelloWorld.java diff --git a/common/src/main/java/me/topchetoeu/j2s/common/environment/Environment.java b/common/src/main/java/me/topchetoeu/j2s/common/Environment.java similarity index 98% rename from common/src/main/java/me/topchetoeu/j2s/common/environment/Environment.java rename to common/src/main/java/me/topchetoeu/j2s/common/Environment.java index 5e4a941..3163873 100644 --- a/common/src/main/java/me/topchetoeu/j2s/common/environment/Environment.java +++ b/common/src/main/java/me/topchetoeu/j2s/common/Environment.java @@ -1,4 +1,4 @@ -package me.topchetoeu.j2s.common.environment; +package me.topchetoeu.j2s.common; import java.util.HashMap; import java.util.HashSet; diff --git a/common/src/main/java/me/topchetoeu/j2s/common/mapping/FunctionMap.java b/common/src/main/java/me/topchetoeu/j2s/common/FunctionMap.java similarity index 97% rename from common/src/main/java/me/topchetoeu/j2s/common/mapping/FunctionMap.java rename to common/src/main/java/me/topchetoeu/j2s/common/FunctionMap.java index 26bfec9..2e8cd02 100644 --- a/common/src/main/java/me/topchetoeu/j2s/common/mapping/FunctionMap.java +++ b/common/src/main/java/me/topchetoeu/j2s/common/FunctionMap.java @@ -1,4 +1,4 @@ -package me.topchetoeu.j2s.common.mapping; +package me.topchetoeu.j2s.common; import java.util.ArrayList; import java.util.Arrays; @@ -13,8 +13,6 @@ import java.util.function.Function; import java.util.regex.Pattern; import java.util.stream.Collectors; -import me.topchetoeu.j2s.common.Filename; -import me.topchetoeu.j2s.common.Location; import me.topchetoeu.j2s.common.Instruction.BreakpointType; public class FunctionMap { diff --git a/common/src/main/java/me/topchetoeu/j2s/common/Key.java b/common/src/main/java/me/topchetoeu/j2s/common/Key.java new file mode 100644 index 0000000..2aeb707 --- /dev/null +++ b/common/src/main/java/me/topchetoeu/j2s/common/Key.java @@ -0,0 +1,3 @@ +package me.topchetoeu.j2s.common; + +public final class Key { } diff --git a/common/src/main/java/me/topchetoeu/j2s/common/environment/Key.java b/common/src/main/java/me/topchetoeu/j2s/common/environment/Key.java deleted file mode 100644 index a09adde..0000000 --- a/common/src/main/java/me/topchetoeu/j2s/common/environment/Key.java +++ /dev/null @@ -1,3 +0,0 @@ -package me.topchetoeu.j2s.common.environment; - -public final class Key { } diff --git a/common/src/main/test/java/me/topchetoeu/j2s/TestHelloWorld.java b/common/src/main/test/java/me/topchetoeu/j2s/TestHelloWorld.java deleted file mode 100644 index 638e19d..0000000 --- a/common/src/main/test/java/me/topchetoeu/j2s/TestHelloWorld.java +++ /dev/null @@ -1,14 +0,0 @@ -package me.topchetoeu.j2s; - -import org.junit.jupiter.api.Test; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -public class TestHelloWorld { - - @Test - public void testHelloWorld() { - final String message = "Hello World!"; - assertEquals("Hello World!", message); - } -} diff --git a/compilation/src/main/java/me/topchetoeu/j2s/compilation/CompileResult.java b/compilation/src/main/java/me/topchetoeu/j2s/compilation/CompileResult.java index f57466a..e1f8c7c 100644 --- a/compilation/src/main/java/me/topchetoeu/j2s/compilation/CompileResult.java +++ b/compilation/src/main/java/me/topchetoeu/j2s/compilation/CompileResult.java @@ -5,14 +5,14 @@ import java.util.Map; import java.util.Stack; import java.util.function.Function; +import me.topchetoeu.j2s.common.Environment; import me.topchetoeu.j2s.common.FunctionBody; +import me.topchetoeu.j2s.common.FunctionMap; import me.topchetoeu.j2s.common.Instruction; +import me.topchetoeu.j2s.common.Key; import me.topchetoeu.j2s.common.Location; +import me.topchetoeu.j2s.common.FunctionMap.FunctionMapBuilder; import me.topchetoeu.j2s.common.Instruction.BreakpointType; -import me.topchetoeu.j2s.common.environment.Environment; -import me.topchetoeu.j2s.common.environment.Key; -import me.topchetoeu.j2s.common.mapping.FunctionMap; -import me.topchetoeu.j2s.common.mapping.FunctionMap.FunctionMapBuilder; import me.topchetoeu.j2s.compilation.control.TryNode; import me.topchetoeu.j2s.compilation.scope.FunctionScope; import me.topchetoeu.j2s.compilation.scope.Variable; diff --git a/compilation/src/main/java/me/topchetoeu/j2s/compilation/FunctionNode.java b/compilation/src/main/java/me/topchetoeu/j2s/compilation/FunctionNode.java index 25d3e4e..1e2a361 100644 --- a/compilation/src/main/java/me/topchetoeu/j2s/compilation/FunctionNode.java +++ b/compilation/src/main/java/me/topchetoeu/j2s/compilation/FunctionNode.java @@ -2,10 +2,10 @@ package me.topchetoeu.j2s.compilation; import java.util.List; +import me.topchetoeu.j2s.common.Environment; import me.topchetoeu.j2s.common.Instruction; import me.topchetoeu.j2s.common.Location; import me.topchetoeu.j2s.common.Instruction.BreakpointType; -import me.topchetoeu.j2s.common.environment.Environment; import me.topchetoeu.j2s.compilation.parsing.ParseRes; import me.topchetoeu.j2s.compilation.parsing.Parsing; import me.topchetoeu.j2s.compilation.parsing.Source; diff --git a/compilation/src/main/java/me/topchetoeu/j2s/compilation/JavaScript.java b/compilation/src/main/java/me/topchetoeu/j2s/compilation/JavaScript.java index 7f88133..ef320cb 100644 --- a/compilation/src/main/java/me/topchetoeu/j2s/compilation/JavaScript.java +++ b/compilation/src/main/java/me/topchetoeu/j2s/compilation/JavaScript.java @@ -6,10 +6,10 @@ import java.util.HashSet; import java.util.List; import java.util.Set; +import me.topchetoeu.j2s.common.Environment; import me.topchetoeu.j2s.common.Filename; +import me.topchetoeu.j2s.common.Key; import me.topchetoeu.j2s.common.SyntaxException; -import me.topchetoeu.j2s.common.environment.Environment; -import me.topchetoeu.j2s.common.environment.Key; import me.topchetoeu.j2s.compilation.control.BreakNode; import me.topchetoeu.j2s.compilation.control.ContinueNode; import me.topchetoeu.j2s.compilation.control.DebugNode; diff --git a/compilation/src/main/java/me/topchetoeu/j2s/compilation/LabelContext.java b/compilation/src/main/java/me/topchetoeu/j2s/compilation/LabelContext.java index 7ba8a7d..e225070 100644 --- a/compilation/src/main/java/me/topchetoeu/j2s/compilation/LabelContext.java +++ b/compilation/src/main/java/me/topchetoeu/j2s/compilation/LabelContext.java @@ -5,11 +5,11 @@ import java.util.HashMap; import java.util.LinkedList; import java.util.function.IntSupplier; +import me.topchetoeu.j2s.common.Environment; import me.topchetoeu.j2s.common.Instruction; +import me.topchetoeu.j2s.common.Key; import me.topchetoeu.j2s.common.Location; import me.topchetoeu.j2s.common.SyntaxException; -import me.topchetoeu.j2s.common.environment.Environment; -import me.topchetoeu.j2s.common.environment.Key; public class LabelContext { public static final Key BREAK_CTX = new Key<>(); diff --git a/compilation/src/main/java/me/topchetoeu/j2s/compilation/parsing/Source.java b/compilation/src/main/java/me/topchetoeu/j2s/compilation/parsing/Source.java index a49ee21..a994fb9 100644 --- a/compilation/src/main/java/me/topchetoeu/j2s/compilation/parsing/Source.java +++ b/compilation/src/main/java/me/topchetoeu/j2s/compilation/parsing/Source.java @@ -2,9 +2,9 @@ package me.topchetoeu.j2s.compilation.parsing; import java.util.function.Predicate; +import me.topchetoeu.j2s.common.Environment; import me.topchetoeu.j2s.common.Filename; import me.topchetoeu.j2s.common.Location; -import me.topchetoeu.j2s.common.environment.Environment; public class Source { public final Environment env; diff --git a/compilation/src/test/java/me/topchetoeu/j2s/compilation/TestSource.java b/compilation/src/test/java/me/topchetoeu/j2s/compilation/TestSource.java index af2df3c..ce15cf5 100644 --- a/compilation/src/test/java/me/topchetoeu/j2s/compilation/TestSource.java +++ b/compilation/src/test/java/me/topchetoeu/j2s/compilation/TestSource.java @@ -5,9 +5,9 @@ import static org.junit.jupiter.api.Assertions.assertThrows; import org.junit.jupiter.api.Test; +import me.topchetoeu.j2s.common.Environment; import me.topchetoeu.j2s.common.Filename; import me.topchetoeu.j2s.common.Location; -import me.topchetoeu.j2s.common.environment.Environment; import me.topchetoeu.j2s.compilation.parsing.Source; public class TestSource { diff --git a/repl/src/main/java/me/topchetoeu/j2s/repl/JSONConverter.java b/repl/src/main/java/me/topchetoeu/j2s/repl/JSONConverter.java index 2b41004..221e5f4 100644 --- a/repl/src/main/java/me/topchetoeu/j2s/repl/JSONConverter.java +++ b/repl/src/main/java/me/topchetoeu/j2s/repl/JSONConverter.java @@ -3,7 +3,7 @@ package me.topchetoeu.j2s.repl; import java.util.HashSet; import java.util.stream.Collectors; -import me.topchetoeu.j2s.common.environment.Environment; +import me.topchetoeu.j2s.common.Environment; import me.topchetoeu.j2s.compilation.json.JSONElement; import me.topchetoeu.j2s.compilation.json.JSONList; import me.topchetoeu.j2s.compilation.json.JSONMap; diff --git a/repl/src/main/java/me/topchetoeu/j2s/repl/SimpleRepl.java b/repl/src/main/java/me/topchetoeu/j2s/repl/SimpleRepl.java index 72cada8..8266776 100644 --- a/repl/src/main/java/me/topchetoeu/j2s/repl/SimpleRepl.java +++ b/repl/src/main/java/me/topchetoeu/j2s/repl/SimpleRepl.java @@ -16,12 +16,12 @@ import java.util.concurrent.ExecutionException; import java.util.regex.Pattern; import java.util.regex.PatternSyntaxException; +import me.topchetoeu.j2s.common.Environment; import me.topchetoeu.j2s.common.Filename; +import me.topchetoeu.j2s.common.Key; import me.topchetoeu.j2s.common.Metadata; import me.topchetoeu.j2s.common.Reading; import me.topchetoeu.j2s.common.SyntaxException; -import me.topchetoeu.j2s.common.environment.Environment; -import me.topchetoeu.j2s.common.environment.Key; import me.topchetoeu.j2s.compilation.JavaScript; import me.topchetoeu.j2s.compilation.json.JSON; import me.topchetoeu.j2s.compilation.parsing.Parsing; diff --git a/repl/src/main/java/me/topchetoeu/j2s/repl/debug/ScopeObject.java b/repl/src/main/java/me/topchetoeu/j2s/repl/debug/ScopeObject.java index c7ffb37..7b5200b 100644 --- a/repl/src/main/java/me/topchetoeu/j2s/repl/debug/ScopeObject.java +++ b/repl/src/main/java/me/topchetoeu/j2s/repl/debug/ScopeObject.java @@ -7,7 +7,7 @@ import java.util.Optional; import java.util.Set; import java.util.function.IntUnaryOperator; -import me.topchetoeu.j2s.common.environment.Environment; +import me.topchetoeu.j2s.common.Environment; import me.topchetoeu.j2s.runtime.Frame; import me.topchetoeu.j2s.runtime.exceptions.EngineException; import me.topchetoeu.j2s.runtime.values.KeyCache; diff --git a/repl/src/main/java/me/topchetoeu/j2s/repl/debug/SimpleDebugger.java b/repl/src/main/java/me/topchetoeu/j2s/repl/debug/SimpleDebugger.java index 596c7f9..d32e7c1 100644 --- a/repl/src/main/java/me/topchetoeu/j2s/repl/debug/SimpleDebugger.java +++ b/repl/src/main/java/me/topchetoeu/j2s/repl/debug/SimpleDebugger.java @@ -11,15 +11,15 @@ import java.util.concurrent.ExecutionException; import java.util.regex.Pattern; import java.util.stream.Collectors; +import me.topchetoeu.j2s.common.Environment; import me.topchetoeu.j2s.common.Filename; import me.topchetoeu.j2s.common.FunctionBody; +import me.topchetoeu.j2s.common.FunctionMap; import me.topchetoeu.j2s.common.Instruction; import me.topchetoeu.j2s.common.Location; import me.topchetoeu.j2s.common.Metadata; import me.topchetoeu.j2s.common.Instruction.BreakpointType; import me.topchetoeu.j2s.common.Instruction.Type; -import me.topchetoeu.j2s.common.environment.Environment; -import me.topchetoeu.j2s.common.mapping.FunctionMap; import me.topchetoeu.j2s.compilation.json.JSON; import me.topchetoeu.j2s.compilation.json.JSONElement; import me.topchetoeu.j2s.compilation.json.JSONList; diff --git a/repl/src/main/java/me/topchetoeu/j2s/repl/debug/StackObject.java b/repl/src/main/java/me/topchetoeu/j2s/repl/debug/StackObject.java index 0dd88fa..e061240 100644 --- a/repl/src/main/java/me/topchetoeu/j2s/repl/debug/StackObject.java +++ b/repl/src/main/java/me/topchetoeu/j2s/repl/debug/StackObject.java @@ -1,6 +1,6 @@ package me.topchetoeu.j2s.repl.debug; -import me.topchetoeu.j2s.common.environment.Environment; +import me.topchetoeu.j2s.common.Environment; import me.topchetoeu.j2s.runtime.Frame; import me.topchetoeu.j2s.runtime.values.Value; import me.topchetoeu.j2s.runtime.values.objects.ArrayLikeValue; diff --git a/repl/src/main/java/me/topchetoeu/j2s/repl/mapping/NativeMapper.java b/repl/src/main/java/me/topchetoeu/j2s/repl/mapping/NativeMapper.java index d2f2ee6..eae9b50 100644 --- a/repl/src/main/java/me/topchetoeu/j2s/repl/mapping/NativeMapper.java +++ b/repl/src/main/java/me/topchetoeu/j2s/repl/mapping/NativeMapper.java @@ -2,9 +2,9 @@ package me.topchetoeu.j2s.repl.mapping; import java.util.function.Function; +import me.topchetoeu.j2s.common.Environment; import me.topchetoeu.j2s.common.Filename; import me.topchetoeu.j2s.common.Location; -import me.topchetoeu.j2s.common.environment.Environment; import me.topchetoeu.j2s.runtime.exceptions.EngineException; import me.topchetoeu.j2s.runtime.values.Value; import me.topchetoeu.j2s.runtime.values.functions.FunctionValue; diff --git a/runtime/src/main/java/me/topchetoeu/j2s/runtime/Compiler.java b/runtime/src/main/java/me/topchetoeu/j2s/runtime/Compiler.java index 1219706..dfb665f 100644 --- a/runtime/src/main/java/me/topchetoeu/j2s/runtime/Compiler.java +++ b/runtime/src/main/java/me/topchetoeu/j2s/runtime/Compiler.java @@ -2,10 +2,10 @@ package me.topchetoeu.j2s.runtime; import java.util.function.Function; +import me.topchetoeu.j2s.common.Environment; import me.topchetoeu.j2s.common.Filename; +import me.topchetoeu.j2s.common.Key; import me.topchetoeu.j2s.common.Location; -import me.topchetoeu.j2s.common.environment.Environment; -import me.topchetoeu.j2s.common.environment.Key; import me.topchetoeu.j2s.runtime.exceptions.EngineException; import me.topchetoeu.j2s.runtime.values.functions.FunctionValue; diff --git a/runtime/src/main/java/me/topchetoeu/j2s/runtime/EventLoop.java b/runtime/src/main/java/me/topchetoeu/j2s/runtime/EventLoop.java index 401dceb..3a5337a 100644 --- a/runtime/src/main/java/me/topchetoeu/j2s/runtime/EventLoop.java +++ b/runtime/src/main/java/me/topchetoeu/j2s/runtime/EventLoop.java @@ -3,9 +3,9 @@ package me.topchetoeu.j2s.runtime; import java.util.concurrent.Future; import java.util.function.Supplier; +import me.topchetoeu.j2s.common.Environment; import me.topchetoeu.j2s.common.Filename; -import me.topchetoeu.j2s.common.environment.Environment; -import me.topchetoeu.j2s.common.environment.Key; +import me.topchetoeu.j2s.common.Key; import me.topchetoeu.j2s.runtime.exceptions.EngineException; import me.topchetoeu.j2s.runtime.values.Value; import me.topchetoeu.j2s.runtime.values.functions.FunctionValue; diff --git a/runtime/src/main/java/me/topchetoeu/j2s/runtime/Frame.java b/runtime/src/main/java/me/topchetoeu/j2s/runtime/Frame.java index bee4949..62ba300 100644 --- a/runtime/src/main/java/me/topchetoeu/j2s/runtime/Frame.java +++ b/runtime/src/main/java/me/topchetoeu/j2s/runtime/Frame.java @@ -4,9 +4,9 @@ import java.util.Arrays; import java.util.Stack; import java.util.concurrent.CancellationException; +import me.topchetoeu.j2s.common.Environment; import me.topchetoeu.j2s.common.Instruction; -import me.topchetoeu.j2s.common.environment.Environment; -import me.topchetoeu.j2s.common.environment.Key; +import me.topchetoeu.j2s.common.Key; import me.topchetoeu.j2s.runtime.debug.DebugContext; import me.topchetoeu.j2s.runtime.exceptions.EngineException; import me.topchetoeu.j2s.runtime.values.Value; diff --git a/runtime/src/main/java/me/topchetoeu/j2s/runtime/InstructionRunner.java b/runtime/src/main/java/me/topchetoeu/j2s/runtime/InstructionRunner.java index 651fad4..d9f6621 100644 --- a/runtime/src/main/java/me/topchetoeu/j2s/runtime/InstructionRunner.java +++ b/runtime/src/main/java/me/topchetoeu/j2s/runtime/InstructionRunner.java @@ -4,9 +4,9 @@ import java.util.ArrayList; import java.util.Collections; import java.util.Optional; +import me.topchetoeu.j2s.common.Environment; import me.topchetoeu.j2s.common.Instruction; import me.topchetoeu.j2s.common.Operation; -import me.topchetoeu.j2s.common.environment.Environment; import me.topchetoeu.j2s.runtime.exceptions.EngineException; import me.topchetoeu.j2s.runtime.values.Value; import me.topchetoeu.j2s.runtime.values.functions.CodeFunction; diff --git a/runtime/src/main/java/me/topchetoeu/j2s/runtime/debug/DebugContext.java b/runtime/src/main/java/me/topchetoeu/j2s/runtime/debug/DebugContext.java index f7fe040..1996e1e 100644 --- a/runtime/src/main/java/me/topchetoeu/j2s/runtime/debug/DebugContext.java +++ b/runtime/src/main/java/me/topchetoeu/j2s/runtime/debug/DebugContext.java @@ -3,12 +3,12 @@ package me.topchetoeu.j2s.runtime.debug; import java.util.HashMap; import java.util.WeakHashMap; +import me.topchetoeu.j2s.common.Environment; import me.topchetoeu.j2s.common.Filename; import me.topchetoeu.j2s.common.FunctionBody; +import me.topchetoeu.j2s.common.FunctionMap; import me.topchetoeu.j2s.common.Instruction; -import me.topchetoeu.j2s.common.environment.Environment; -import me.topchetoeu.j2s.common.environment.Key; -import me.topchetoeu.j2s.common.mapping.FunctionMap; +import me.topchetoeu.j2s.common.Key; import me.topchetoeu.j2s.runtime.Frame; import me.topchetoeu.j2s.runtime.exceptions.EngineException; import me.topchetoeu.j2s.runtime.values.Value; diff --git a/runtime/src/main/java/me/topchetoeu/j2s/runtime/debug/DebugHandler.java b/runtime/src/main/java/me/topchetoeu/j2s/runtime/debug/DebugHandler.java index f625cea..e68fdd0 100644 --- a/runtime/src/main/java/me/topchetoeu/j2s/runtime/debug/DebugHandler.java +++ b/runtime/src/main/java/me/topchetoeu/j2s/runtime/debug/DebugHandler.java @@ -1,10 +1,10 @@ package me.topchetoeu.j2s.runtime.debug; +import me.topchetoeu.j2s.common.Environment; import me.topchetoeu.j2s.common.Filename; import me.topchetoeu.j2s.common.FunctionBody; +import me.topchetoeu.j2s.common.FunctionMap; import me.topchetoeu.j2s.common.Instruction; -import me.topchetoeu.j2s.common.environment.Environment; -import me.topchetoeu.j2s.common.mapping.FunctionMap; import me.topchetoeu.j2s.runtime.Frame; import me.topchetoeu.j2s.runtime.exceptions.EngineException; import me.topchetoeu.j2s.runtime.values.Value; diff --git a/runtime/src/main/java/me/topchetoeu/j2s/runtime/exceptions/EngineException.java b/runtime/src/main/java/me/topchetoeu/j2s/runtime/exceptions/EngineException.java index a39185c..978ed9e 100644 --- a/runtime/src/main/java/me/topchetoeu/j2s/runtime/exceptions/EngineException.java +++ b/runtime/src/main/java/me/topchetoeu/j2s/runtime/exceptions/EngineException.java @@ -3,8 +3,8 @@ package me.topchetoeu.j2s.runtime.exceptions; import java.util.ArrayList; import java.util.List; +import me.topchetoeu.j2s.common.Environment; import me.topchetoeu.j2s.common.Location; -import me.topchetoeu.j2s.common.environment.Environment; import me.topchetoeu.j2s.runtime.values.Value; import me.topchetoeu.j2s.runtime.values.objects.ObjectValue; import me.topchetoeu.j2s.runtime.values.objects.ObjectValue.PrototypeProvider; diff --git a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/KeyCache.java b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/KeyCache.java index 77edb60..456042b 100644 --- a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/KeyCache.java +++ b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/KeyCache.java @@ -1,6 +1,6 @@ package me.topchetoeu.j2s.runtime.values; -import me.topchetoeu.j2s.common.environment.Environment; +import me.topchetoeu.j2s.common.Environment; import me.topchetoeu.j2s.runtime.values.primitives.StringValue; import me.topchetoeu.j2s.runtime.values.primitives.SymbolValue; import me.topchetoeu.j2s.runtime.values.primitives.numbers.NumberValue; diff --git a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/Member.java b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/Member.java index b58e78a..8af0c02 100644 --- a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/Member.java +++ b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/Member.java @@ -2,7 +2,7 @@ package me.topchetoeu.j2s.runtime.values; import java.util.Optional; -import me.topchetoeu.j2s.common.environment.Environment; +import me.topchetoeu.j2s.common.Environment; import me.topchetoeu.j2s.runtime.values.functions.FunctionValue; import me.topchetoeu.j2s.runtime.values.objects.ObjectValue; import me.topchetoeu.j2s.runtime.values.primitives.BoolValue; diff --git a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/Value.java b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/Value.java index bc85332..ed5da41 100644 --- a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/Value.java +++ b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/Value.java @@ -14,9 +14,9 @@ import java.util.Map; import java.util.Optional; import java.util.Set; +import me.topchetoeu.j2s.common.Environment; +import me.topchetoeu.j2s.common.Key; import me.topchetoeu.j2s.common.SyntaxException; -import me.topchetoeu.j2s.common.environment.Environment; -import me.topchetoeu.j2s.common.environment.Key; import me.topchetoeu.j2s.runtime.EventLoop; import me.topchetoeu.j2s.runtime.exceptions.EngineException; import me.topchetoeu.j2s.runtime.values.Member.PropertyMember; diff --git a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/functions/Arguments.java b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/functions/Arguments.java index 18f59a4..f14ddb0 100644 --- a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/functions/Arguments.java +++ b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/functions/Arguments.java @@ -1,7 +1,7 @@ package me.topchetoeu.j2s.runtime.values.functions; -import me.topchetoeu.j2s.common.environment.Environment; +import me.topchetoeu.j2s.common.Environment; import me.topchetoeu.j2s.runtime.values.Value; import me.topchetoeu.j2s.runtime.values.objects.ObjectValue; import me.topchetoeu.j2s.runtime.values.primitives.UserValue; diff --git a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/functions/CodeFunction.java b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/functions/CodeFunction.java index 935e182..57e3ccf 100644 --- a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/functions/CodeFunction.java +++ b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/functions/CodeFunction.java @@ -1,7 +1,7 @@ package me.topchetoeu.j2s.runtime.values.functions; +import me.topchetoeu.j2s.common.Environment; import me.topchetoeu.j2s.common.FunctionBody; -import me.topchetoeu.j2s.common.environment.Environment; import me.topchetoeu.j2s.runtime.Frame; import me.topchetoeu.j2s.runtime.values.Value; import me.topchetoeu.j2s.runtime.values.objects.ObjectValue; diff --git a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/functions/FunctionValue.java b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/functions/FunctionValue.java index 33c7be7..8ed0ee6 100644 --- a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/functions/FunctionValue.java +++ b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/functions/FunctionValue.java @@ -5,7 +5,7 @@ import java.util.HashSet; import java.util.LinkedList; import java.util.List; -import me.topchetoeu.j2s.common.environment.Environment; +import me.topchetoeu.j2s.common.Environment; import me.topchetoeu.j2s.runtime.debug.DebugContext; import me.topchetoeu.j2s.runtime.exceptions.EngineException; import me.topchetoeu.j2s.runtime.values.KeyCache; diff --git a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/functions/NativeFunction.java b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/functions/NativeFunction.java index d083405..9ce68d7 100644 --- a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/functions/NativeFunction.java +++ b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/functions/NativeFunction.java @@ -1,6 +1,6 @@ package me.topchetoeu.j2s.runtime.values.functions; -import me.topchetoeu.j2s.common.environment.Environment; +import me.topchetoeu.j2s.common.Environment; import me.topchetoeu.j2s.runtime.values.Value; public final class NativeFunction extends FunctionValue { diff --git a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/objects/ArrayLikeValue.java b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/objects/ArrayLikeValue.java index caea5b0..78d8192 100644 --- a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/objects/ArrayLikeValue.java +++ b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/objects/ArrayLikeValue.java @@ -7,7 +7,7 @@ import java.util.LinkedList; import java.util.List; import java.util.Set; -import me.topchetoeu.j2s.common.environment.Environment; +import me.topchetoeu.j2s.common.Environment; import me.topchetoeu.j2s.runtime.exceptions.EngineException; import me.topchetoeu.j2s.runtime.values.KeyCache; import me.topchetoeu.j2s.runtime.values.Member; diff --git a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/objects/ArrayValue.java b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/objects/ArrayValue.java index f8af406..f8a954e 100644 --- a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/objects/ArrayValue.java +++ b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/objects/ArrayValue.java @@ -6,7 +6,7 @@ import java.util.Comparator; import java.util.Iterator; import java.util.stream.Stream; -import me.topchetoeu.j2s.common.environment.Environment; +import me.topchetoeu.j2s.common.Environment; import me.topchetoeu.j2s.runtime.values.Value; import me.topchetoeu.j2s.runtime.values.primitives.VoidValue; diff --git a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/objects/ObjectValue.java b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/objects/ObjectValue.java index d9ef238..47064f2 100644 --- a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/objects/ObjectValue.java +++ b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/objects/ObjectValue.java @@ -10,8 +10,8 @@ import java.util.List; import java.util.Optional; import java.util.Set; -import me.topchetoeu.j2s.common.environment.Environment; -import me.topchetoeu.j2s.common.environment.Key; +import me.topchetoeu.j2s.common.Environment; +import me.topchetoeu.j2s.common.Key; import me.topchetoeu.j2s.runtime.exceptions.EngineException; import me.topchetoeu.j2s.runtime.values.KeyCache; import me.topchetoeu.j2s.runtime.values.Member; diff --git a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/objects/buffers/TypedArrayValue.java b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/objects/buffers/TypedArrayValue.java index a26ce9e..dadc35a 100644 --- a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/objects/buffers/TypedArrayValue.java +++ b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/objects/buffers/TypedArrayValue.java @@ -2,7 +2,7 @@ package me.topchetoeu.j2s.runtime.values.objects.buffers; import java.util.WeakHashMap; -import me.topchetoeu.j2s.common.environment.Environment; +import me.topchetoeu.j2s.common.Environment; import me.topchetoeu.j2s.runtime.values.Value; import me.topchetoeu.j2s.runtime.values.objects.ArrayLikeValue; import me.topchetoeu.j2s.runtime.values.objects.ObjectValue; diff --git a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/primitives/BoolValue.java b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/primitives/BoolValue.java index a0c0ad2..2b34083 100644 --- a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/primitives/BoolValue.java +++ b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/primitives/BoolValue.java @@ -1,6 +1,6 @@ package me.topchetoeu.j2s.runtime.values.primitives; -import me.topchetoeu.j2s.common.environment.Environment; +import me.topchetoeu.j2s.common.Environment; import me.topchetoeu.j2s.runtime.values.objects.ObjectValue; import me.topchetoeu.j2s.runtime.values.primitives.numbers.NumberValue; diff --git a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/primitives/PrimitiveValue.java b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/primitives/PrimitiveValue.java index af17408..a08ad05 100644 --- a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/primitives/PrimitiveValue.java +++ b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/primitives/PrimitiveValue.java @@ -4,7 +4,7 @@ import java.util.HashSet; import java.util.Optional; import java.util.Set; -import me.topchetoeu.j2s.common.environment.Environment; +import me.topchetoeu.j2s.common.Environment; import me.topchetoeu.j2s.runtime.values.KeyCache; import me.topchetoeu.j2s.runtime.values.Member; import me.topchetoeu.j2s.runtime.values.Value; diff --git a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/primitives/StringValue.java b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/primitives/StringValue.java index 71ec9d6..b035dc1 100644 --- a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/primitives/StringValue.java +++ b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/primitives/StringValue.java @@ -7,8 +7,8 @@ import java.util.List; import java.util.Set; import java.util.WeakHashMap; +import me.topchetoeu.j2s.common.Environment; import me.topchetoeu.j2s.common.StringifyUtils; -import me.topchetoeu.j2s.common.environment.Environment; import me.topchetoeu.j2s.runtime.values.KeyCache; import me.topchetoeu.j2s.runtime.values.Member; import me.topchetoeu.j2s.runtime.values.Member.FieldMember; diff --git a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/primitives/SymbolValue.java b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/primitives/SymbolValue.java index c84ece9..f0119c1 100644 --- a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/primitives/SymbolValue.java +++ b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/primitives/SymbolValue.java @@ -5,7 +5,7 @@ import java.util.HashMap; import java.util.HashSet; import java.util.List; -import me.topchetoeu.j2s.common.environment.Environment; +import me.topchetoeu.j2s.common.Environment; import me.topchetoeu.j2s.runtime.exceptions.EngineException; import me.topchetoeu.j2s.runtime.values.Value; import me.topchetoeu.j2s.runtime.values.objects.ObjectValue; diff --git a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/primitives/UserValue.java b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/primitives/UserValue.java index 925702e..4829dd4 100644 --- a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/primitives/UserValue.java +++ b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/primitives/UserValue.java @@ -7,7 +7,7 @@ import java.util.Objects; import java.util.Optional; import java.util.Set; -import me.topchetoeu.j2s.common.environment.Environment; +import me.topchetoeu.j2s.common.Environment; import me.topchetoeu.j2s.runtime.values.KeyCache; import me.topchetoeu.j2s.runtime.values.Member; import me.topchetoeu.j2s.runtime.values.Value; diff --git a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/primitives/VoidValue.java b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/primitives/VoidValue.java index d2be58e..0741749 100644 --- a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/primitives/VoidValue.java +++ b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/primitives/VoidValue.java @@ -4,7 +4,7 @@ import java.util.Arrays; import java.util.HashSet; import java.util.List; -import me.topchetoeu.j2s.common.environment.Environment; +import me.topchetoeu.j2s.common.Environment; import me.topchetoeu.j2s.runtime.exceptions.EngineException; import me.topchetoeu.j2s.runtime.values.KeyCache; import me.topchetoeu.j2s.runtime.values.Member; diff --git a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/primitives/numbers/IntValue.java b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/primitives/numbers/IntValue.java index 43eae12..3ed1791 100644 --- a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/primitives/numbers/IntValue.java +++ b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/primitives/numbers/IntValue.java @@ -4,7 +4,7 @@ import java.util.Arrays; import java.util.HashSet; import java.util.List; -import me.topchetoeu.j2s.common.environment.Environment; +import me.topchetoeu.j2s.common.Environment; import me.topchetoeu.j2s.runtime.values.objects.ObjectValue; public final class IntValue extends NumberValue { diff --git a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/primitives/numbers/NumberValue.java b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/primitives/numbers/NumberValue.java index 69476f1..338f689 100644 --- a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/primitives/numbers/NumberValue.java +++ b/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/primitives/numbers/NumberValue.java @@ -1,6 +1,6 @@ package me.topchetoeu.j2s.runtime.values.primitives.numbers; -import me.topchetoeu.j2s.common.environment.Environment; +import me.topchetoeu.j2s.common.Environment; import me.topchetoeu.j2s.runtime.values.objects.ObjectValue; import me.topchetoeu.j2s.runtime.values.primitives.PrimitiveValue; import me.topchetoeu.j2s.runtime.values.primitives.StringValue;