diff --git a/src/java/me/topchetoeu/jscript/common/Instruction.java b/src/java/me/topchetoeu/jscript/common/Instruction.java index 949dfa5..9460c39 100644 --- a/src/java/me/topchetoeu/jscript/common/Instruction.java +++ b/src/java/me/topchetoeu/jscript/common/Instruction.java @@ -5,7 +5,7 @@ import java.io.DataOutputStream; import java.io.IOException; import java.util.HashMap; -import me.topchetoeu.jscript.core.exceptions.SyntaxException; +import me.topchetoeu.jscript.runtime.exceptions.SyntaxException; public class Instruction { public static enum Type { diff --git a/src/java/me/topchetoeu/jscript/common/events/Notifier.java b/src/java/me/topchetoeu/jscript/common/events/Notifier.java index 07cfe63..eb6ad4d 100644 --- a/src/java/me/topchetoeu/jscript/common/events/Notifier.java +++ b/src/java/me/topchetoeu/jscript/common/events/Notifier.java @@ -1,6 +1,6 @@ package me.topchetoeu.jscript.common.events; -import me.topchetoeu.jscript.core.exceptions.InterruptException; +import me.topchetoeu.jscript.runtime.exceptions.InterruptException; public class Notifier { private boolean ok = false; diff --git a/src/java/me/topchetoeu/jscript/common/json/JSON.java b/src/java/me/topchetoeu/jscript/common/json/JSON.java index e4078a1..0b639f0 100644 --- a/src/java/me/topchetoeu/jscript/common/json/JSON.java +++ b/src/java/me/topchetoeu/jscript/common/json/JSON.java @@ -9,12 +9,12 @@ import me.topchetoeu.jscript.compilation.parsing.Operator; import me.topchetoeu.jscript.compilation.parsing.ParseRes; import me.topchetoeu.jscript.compilation.parsing.Parsing; import me.topchetoeu.jscript.compilation.parsing.Token; -import me.topchetoeu.jscript.core.Context; -import me.topchetoeu.jscript.core.values.ArrayValue; -import me.topchetoeu.jscript.core.values.ObjectValue; -import me.topchetoeu.jscript.core.values.Values; -import me.topchetoeu.jscript.core.exceptions.EngineException; -import me.topchetoeu.jscript.core.exceptions.SyntaxException; +import me.topchetoeu.jscript.runtime.Context; +import me.topchetoeu.jscript.runtime.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.exceptions.SyntaxException; +import me.topchetoeu.jscript.runtime.values.ArrayValue; +import me.topchetoeu.jscript.runtime.values.ObjectValue; +import me.topchetoeu.jscript.runtime.values.Values; public class JSON { public static Object toJs(JSONElement val) { diff --git a/src/java/me/topchetoeu/jscript/compilation/ThrowSyntaxStatement.java b/src/java/me/topchetoeu/jscript/compilation/ThrowSyntaxStatement.java index b03b8a8..523e10a 100644 --- a/src/java/me/topchetoeu/jscript/compilation/ThrowSyntaxStatement.java +++ b/src/java/me/topchetoeu/jscript/compilation/ThrowSyntaxStatement.java @@ -1,7 +1,7 @@ package me.topchetoeu.jscript.compilation; import me.topchetoeu.jscript.common.Instruction; -import me.topchetoeu.jscript.core.exceptions.SyntaxException; +import me.topchetoeu.jscript.runtime.exceptions.SyntaxException; public class ThrowSyntaxStatement extends Statement { public final String name; diff --git a/src/java/me/topchetoeu/jscript/compilation/parsing/Parsing.java b/src/java/me/topchetoeu/jscript/compilation/parsing/Parsing.java index 8f1de9b..9efde1b 100644 --- a/src/java/me/topchetoeu/jscript/compilation/parsing/Parsing.java +++ b/src/java/me/topchetoeu/jscript/compilation/parsing/Parsing.java @@ -18,7 +18,7 @@ import me.topchetoeu.jscript.compilation.control.SwitchStatement.SwitchCase; import me.topchetoeu.jscript.compilation.parsing.ParseRes.State; import me.topchetoeu.jscript.compilation.scope.LocalScopeRecord; import me.topchetoeu.jscript.compilation.values.*; -import me.topchetoeu.jscript.core.exceptions.SyntaxException; +import me.topchetoeu.jscript.runtime.exceptions.SyntaxException; // TODO: this has to be rewritten public class Parsing { diff --git a/src/java/me/topchetoeu/jscript/compilation/values/FunctionStatement.java b/src/java/me/topchetoeu/jscript/compilation/values/FunctionStatement.java index e714d73..db7e331 100644 --- a/src/java/me/topchetoeu/jscript/compilation/values/FunctionStatement.java +++ b/src/java/me/topchetoeu/jscript/compilation/values/FunctionStatement.java @@ -7,7 +7,7 @@ import me.topchetoeu.jscript.common.Instruction.Type; import me.topchetoeu.jscript.compilation.CompileResult; import me.topchetoeu.jscript.compilation.CompoundStatement; import me.topchetoeu.jscript.compilation.Statement; -import me.topchetoeu.jscript.core.exceptions.SyntaxException; +import me.topchetoeu.jscript.runtime.exceptions.SyntaxException; public class FunctionStatement extends Statement { public final CompoundStatement body; diff --git a/src/java/me/topchetoeu/jscript/core/Key.java b/src/java/me/topchetoeu/jscript/core/Key.java deleted file mode 100644 index 14ed55a..0000000 --- a/src/java/me/topchetoeu/jscript/core/Key.java +++ /dev/null @@ -1,5 +0,0 @@ -package me.topchetoeu.jscript.core; - -public class Key { - -} diff --git a/src/java/me/topchetoeu/jscript/lib/ArrayLib.java b/src/java/me/topchetoeu/jscript/lib/ArrayLib.java index e0d8c7a..cfe9708 100644 --- a/src/java/me/topchetoeu/jscript/lib/ArrayLib.java +++ b/src/java/me/topchetoeu/jscript/lib/ArrayLib.java @@ -3,11 +3,11 @@ package me.topchetoeu.jscript.lib; import java.util.Iterator; import java.util.Stack; -import me.topchetoeu.jscript.core.values.ArrayValue; -import me.topchetoeu.jscript.core.values.FunctionValue; -import me.topchetoeu.jscript.core.values.NativeFunction; -import me.topchetoeu.jscript.core.values.ObjectValue; -import me.topchetoeu.jscript.core.values.Values; +import me.topchetoeu.jscript.runtime.values.ArrayValue; +import me.topchetoeu.jscript.runtime.values.FunctionValue; +import me.topchetoeu.jscript.runtime.values.NativeFunction; +import me.topchetoeu.jscript.runtime.values.ObjectValue; +import me.topchetoeu.jscript.runtime.values.Values; import me.topchetoeu.jscript.utils.interop.Arguments; import me.topchetoeu.jscript.utils.interop.Expose; import me.topchetoeu.jscript.utils.interop.ExposeConstructor; diff --git a/src/java/me/topchetoeu/jscript/lib/AsyncFunctionLib.java b/src/java/me/topchetoeu/jscript/lib/AsyncFunctionLib.java index 05a3d3f..48571a9 100644 --- a/src/java/me/topchetoeu/jscript/lib/AsyncFunctionLib.java +++ b/src/java/me/topchetoeu/jscript/lib/AsyncFunctionLib.java @@ -1,13 +1,13 @@ package me.topchetoeu.jscript.lib; -import me.topchetoeu.jscript.core.Context; -import me.topchetoeu.jscript.core.Frame; -import me.topchetoeu.jscript.core.values.CodeFunction; -import me.topchetoeu.jscript.core.values.FunctionValue; -import me.topchetoeu.jscript.core.values.NativeFunction; -import me.topchetoeu.jscript.core.values.Values; -import me.topchetoeu.jscript.core.exceptions.EngineException; import me.topchetoeu.jscript.lib.PromiseLib.Handle; +import me.topchetoeu.jscript.runtime.Context; +import me.topchetoeu.jscript.runtime.Frame; +import me.topchetoeu.jscript.runtime.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.values.CodeFunction; +import me.topchetoeu.jscript.runtime.values.FunctionValue; +import me.topchetoeu.jscript.runtime.values.NativeFunction; +import me.topchetoeu.jscript.runtime.values.Values; import me.topchetoeu.jscript.utils.interop.Arguments; import me.topchetoeu.jscript.utils.interop.WrapperName; diff --git a/src/java/me/topchetoeu/jscript/lib/AsyncGeneratorFunctionLib.java b/src/java/me/topchetoeu/jscript/lib/AsyncGeneratorFunctionLib.java index 6102b79..61fa95f 100644 --- a/src/java/me/topchetoeu/jscript/lib/AsyncGeneratorFunctionLib.java +++ b/src/java/me/topchetoeu/jscript/lib/AsyncGeneratorFunctionLib.java @@ -1,11 +1,11 @@ package me.topchetoeu.jscript.lib; -import me.topchetoeu.jscript.core.Context; -import me.topchetoeu.jscript.core.Frame; -import me.topchetoeu.jscript.core.values.CodeFunction; -import me.topchetoeu.jscript.core.values.FunctionValue; -import me.topchetoeu.jscript.core.values.NativeFunction; -import me.topchetoeu.jscript.core.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.Context; +import me.topchetoeu.jscript.runtime.Frame; +import me.topchetoeu.jscript.runtime.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.values.CodeFunction; +import me.topchetoeu.jscript.runtime.values.FunctionValue; +import me.topchetoeu.jscript.runtime.values.NativeFunction; import me.topchetoeu.jscript.utils.interop.WrapperName; @WrapperName("AsyncGeneratorFunction") diff --git a/src/java/me/topchetoeu/jscript/lib/AsyncGeneratorLib.java b/src/java/me/topchetoeu/jscript/lib/AsyncGeneratorLib.java index c96431c..d913edb 100644 --- a/src/java/me/topchetoeu/jscript/lib/AsyncGeneratorLib.java +++ b/src/java/me/topchetoeu/jscript/lib/AsyncGeneratorLib.java @@ -2,12 +2,12 @@ package me.topchetoeu.jscript.lib; import java.util.Map; -import me.topchetoeu.jscript.core.Context; -import me.topchetoeu.jscript.core.Frame; -import me.topchetoeu.jscript.core.values.ObjectValue; -import me.topchetoeu.jscript.core.values.Values; -import me.topchetoeu.jscript.core.exceptions.EngineException; import me.topchetoeu.jscript.lib.PromiseLib.Handle; +import me.topchetoeu.jscript.runtime.Context; +import me.topchetoeu.jscript.runtime.Frame; +import me.topchetoeu.jscript.runtime.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.values.ObjectValue; +import me.topchetoeu.jscript.runtime.values.Values; import me.topchetoeu.jscript.utils.interop.Arguments; import me.topchetoeu.jscript.utils.interop.Expose; import me.topchetoeu.jscript.utils.interop.WrapperName; diff --git a/src/java/me/topchetoeu/jscript/lib/BooleanLib.java b/src/java/me/topchetoeu/jscript/lib/BooleanLib.java index 79f9b55..019a061 100644 --- a/src/java/me/topchetoeu/jscript/lib/BooleanLib.java +++ b/src/java/me/topchetoeu/jscript/lib/BooleanLib.java @@ -1,7 +1,7 @@ package me.topchetoeu.jscript.lib; -import me.topchetoeu.jscript.core.values.ObjectValue; -import me.topchetoeu.jscript.core.values.Values; +import me.topchetoeu.jscript.runtime.values.ObjectValue; +import me.topchetoeu.jscript.runtime.values.Values; import me.topchetoeu.jscript.utils.interop.Arguments; import me.topchetoeu.jscript.utils.interop.Expose; import me.topchetoeu.jscript.utils.interop.ExposeConstructor; diff --git a/src/java/me/topchetoeu/jscript/lib/ConsoleLib.java b/src/java/me/topchetoeu/jscript/lib/ConsoleLib.java index 0627c55..2a7c205 100644 --- a/src/java/me/topchetoeu/jscript/lib/ConsoleLib.java +++ b/src/java/me/topchetoeu/jscript/lib/ConsoleLib.java @@ -2,7 +2,7 @@ package me.topchetoeu.jscript.lib; import java.io.IOException; -import me.topchetoeu.jscript.core.values.Values; +import me.topchetoeu.jscript.runtime.values.Values; import me.topchetoeu.jscript.utils.filesystem.File; import me.topchetoeu.jscript.utils.interop.Arguments; import me.topchetoeu.jscript.utils.interop.Expose; diff --git a/src/java/me/topchetoeu/jscript/lib/EncodingLib.java b/src/java/me/topchetoeu/jscript/lib/EncodingLib.java index b212c10..04ec153 100644 --- a/src/java/me/topchetoeu/jscript/lib/EncodingLib.java +++ b/src/java/me/topchetoeu/jscript/lib/EncodingLib.java @@ -4,9 +4,9 @@ import java.util.ArrayList; import me.topchetoeu.jscript.common.Buffer; import me.topchetoeu.jscript.compilation.parsing.Parsing; -import me.topchetoeu.jscript.core.values.ArrayValue; -import me.topchetoeu.jscript.core.values.Values; -import me.topchetoeu.jscript.core.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.values.ArrayValue; +import me.topchetoeu.jscript.runtime.values.Values; import me.topchetoeu.jscript.utils.interop.Arguments; import me.topchetoeu.jscript.utils.interop.Expose; import me.topchetoeu.jscript.utils.interop.ExposeTarget; diff --git a/src/java/me/topchetoeu/jscript/lib/ErrorLib.java b/src/java/me/topchetoeu/jscript/lib/ErrorLib.java index dd52e07..abda9c3 100644 --- a/src/java/me/topchetoeu/jscript/lib/ErrorLib.java +++ b/src/java/me/topchetoeu/jscript/lib/ErrorLib.java @@ -1,10 +1,10 @@ package me.topchetoeu.jscript.lib; -import me.topchetoeu.jscript.core.Context; -import me.topchetoeu.jscript.core.values.ObjectValue; -import me.topchetoeu.jscript.core.values.Values; -import me.topchetoeu.jscript.core.values.ObjectValue.PlaceholderProto; -import me.topchetoeu.jscript.core.exceptions.ConvertException; +import me.topchetoeu.jscript.runtime.Context; +import me.topchetoeu.jscript.runtime.exceptions.ConvertException; +import me.topchetoeu.jscript.runtime.values.ObjectValue; +import me.topchetoeu.jscript.runtime.values.Values; +import me.topchetoeu.jscript.runtime.values.ObjectValue.PlaceholderProto; import me.topchetoeu.jscript.utils.interop.Arguments; import me.topchetoeu.jscript.utils.interop.Expose; import me.topchetoeu.jscript.utils.interop.ExposeConstructor; diff --git a/src/java/me/topchetoeu/jscript/lib/FileLib.java b/src/java/me/topchetoeu/jscript/lib/FileLib.java index bb1ef88..95b7baa 100644 --- a/src/java/me/topchetoeu/jscript/lib/FileLib.java +++ b/src/java/me/topchetoeu/jscript/lib/FileLib.java @@ -1,7 +1,7 @@ package me.topchetoeu.jscript.lib; -import me.topchetoeu.jscript.core.values.ArrayValue; -import me.topchetoeu.jscript.core.values.Values; +import me.topchetoeu.jscript.runtime.values.ArrayValue; +import me.topchetoeu.jscript.runtime.values.Values; import me.topchetoeu.jscript.utils.filesystem.File; import me.topchetoeu.jscript.utils.filesystem.FilesystemException; import me.topchetoeu.jscript.utils.interop.Arguments; diff --git a/src/java/me/topchetoeu/jscript/lib/FilesystemLib.java b/src/java/me/topchetoeu/jscript/lib/FilesystemLib.java index 3938c12..b8e5479 100644 --- a/src/java/me/topchetoeu/jscript/lib/FilesystemLib.java +++ b/src/java/me/topchetoeu/jscript/lib/FilesystemLib.java @@ -4,10 +4,10 @@ import java.io.IOException; import java.util.Iterator; import java.util.Stack; -import me.topchetoeu.jscript.core.Context; -import me.topchetoeu.jscript.core.values.ObjectValue; -import me.topchetoeu.jscript.core.values.Values; -import me.topchetoeu.jscript.core.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.Context; +import me.topchetoeu.jscript.runtime.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.values.ObjectValue; +import me.topchetoeu.jscript.runtime.values.Values; import me.topchetoeu.jscript.utils.filesystem.ActionType; import me.topchetoeu.jscript.utils.filesystem.EntryType; import me.topchetoeu.jscript.utils.filesystem.ErrorReason; diff --git a/src/java/me/topchetoeu/jscript/lib/FunctionLib.java b/src/java/me/topchetoeu/jscript/lib/FunctionLib.java index 3d16d5e..f3da839 100644 --- a/src/java/me/topchetoeu/jscript/lib/FunctionLib.java +++ b/src/java/me/topchetoeu/jscript/lib/FunctionLib.java @@ -1,9 +1,9 @@ package me.topchetoeu.jscript.lib; -import me.topchetoeu.jscript.core.values.ArrayValue; -import me.topchetoeu.jscript.core.values.CodeFunction; -import me.topchetoeu.jscript.core.values.FunctionValue; -import me.topchetoeu.jscript.core.values.NativeFunction; +import me.topchetoeu.jscript.runtime.values.ArrayValue; +import me.topchetoeu.jscript.runtime.values.CodeFunction; +import me.topchetoeu.jscript.runtime.values.FunctionValue; +import me.topchetoeu.jscript.runtime.values.NativeFunction; import me.topchetoeu.jscript.utils.interop.Arguments; import me.topchetoeu.jscript.utils.interop.Expose; import me.topchetoeu.jscript.utils.interop.ExposeTarget; diff --git a/src/java/me/topchetoeu/jscript/lib/GeneratorFunctionLib.java b/src/java/me/topchetoeu/jscript/lib/GeneratorFunctionLib.java index 36cdc65..7d95ef6 100644 --- a/src/java/me/topchetoeu/jscript/lib/GeneratorFunctionLib.java +++ b/src/java/me/topchetoeu/jscript/lib/GeneratorFunctionLib.java @@ -1,11 +1,11 @@ package me.topchetoeu.jscript.lib; -import me.topchetoeu.jscript.core.Context; -import me.topchetoeu.jscript.core.Frame; -import me.topchetoeu.jscript.core.values.CodeFunction; -import me.topchetoeu.jscript.core.values.FunctionValue; -import me.topchetoeu.jscript.core.values.NativeFunction; -import me.topchetoeu.jscript.core.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.Context; +import me.topchetoeu.jscript.runtime.Frame; +import me.topchetoeu.jscript.runtime.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.values.CodeFunction; +import me.topchetoeu.jscript.runtime.values.FunctionValue; +import me.topchetoeu.jscript.runtime.values.NativeFunction; import me.topchetoeu.jscript.utils.interop.WrapperName; @WrapperName("GeneratorFunction") diff --git a/src/java/me/topchetoeu/jscript/lib/GeneratorLib.java b/src/java/me/topchetoeu/jscript/lib/GeneratorLib.java index 827c5ce..19d93ae 100644 --- a/src/java/me/topchetoeu/jscript/lib/GeneratorLib.java +++ b/src/java/me/topchetoeu/jscript/lib/GeneratorLib.java @@ -1,10 +1,10 @@ package me.topchetoeu.jscript.lib; -import me.topchetoeu.jscript.core.Context; -import me.topchetoeu.jscript.core.Frame; -import me.topchetoeu.jscript.core.values.ObjectValue; -import me.topchetoeu.jscript.core.values.Values; -import me.topchetoeu.jscript.core.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.Context; +import me.topchetoeu.jscript.runtime.Frame; +import me.topchetoeu.jscript.runtime.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.values.ObjectValue; +import me.topchetoeu.jscript.runtime.values.Values; import me.topchetoeu.jscript.utils.interop.Arguments; import me.topchetoeu.jscript.utils.interop.Expose; import me.topchetoeu.jscript.utils.interop.WrapperName; diff --git a/src/java/me/topchetoeu/jscript/lib/Internals.java b/src/java/me/topchetoeu/jscript/lib/Internals.java index b648681..8c276c8 100644 --- a/src/java/me/topchetoeu/jscript/lib/Internals.java +++ b/src/java/me/topchetoeu/jscript/lib/Internals.java @@ -2,14 +2,14 @@ package me.topchetoeu.jscript.lib; import java.util.HashMap; -import me.topchetoeu.jscript.core.Context; -import me.topchetoeu.jscript.core.Environment; -import me.topchetoeu.jscript.core.EventLoop; -import me.topchetoeu.jscript.core.Key; -import me.topchetoeu.jscript.core.scope.GlobalScope; -import me.topchetoeu.jscript.core.values.FunctionValue; -import me.topchetoeu.jscript.core.values.Values; -import me.topchetoeu.jscript.core.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.Context; +import me.topchetoeu.jscript.runtime.Environment; +import me.topchetoeu.jscript.runtime.EventLoop; +import me.topchetoeu.jscript.runtime.Key; +import me.topchetoeu.jscript.runtime.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.scope.GlobalScope; +import me.topchetoeu.jscript.runtime.values.FunctionValue; +import me.topchetoeu.jscript.runtime.values.Values; import me.topchetoeu.jscript.utils.filesystem.Filesystem; import me.topchetoeu.jscript.utils.filesystem.Mode; import me.topchetoeu.jscript.utils.interop.Arguments; diff --git a/src/java/me/topchetoeu/jscript/lib/JSONLib.java b/src/java/me/topchetoeu/jscript/lib/JSONLib.java index d6abb60..31a1e11 100644 --- a/src/java/me/topchetoeu/jscript/lib/JSONLib.java +++ b/src/java/me/topchetoeu/jscript/lib/JSONLib.java @@ -1,8 +1,8 @@ package me.topchetoeu.jscript.lib; import me.topchetoeu.jscript.common.json.JSON; -import me.topchetoeu.jscript.core.exceptions.EngineException; -import me.topchetoeu.jscript.core.exceptions.SyntaxException; +import me.topchetoeu.jscript.runtime.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.exceptions.SyntaxException; import me.topchetoeu.jscript.utils.interop.Arguments; import me.topchetoeu.jscript.utils.interop.Expose; import me.topchetoeu.jscript.utils.interop.ExposeTarget; diff --git a/src/java/me/topchetoeu/jscript/lib/MapLib.java b/src/java/me/topchetoeu/jscript/lib/MapLib.java index dfe4c02..849bf00 100644 --- a/src/java/me/topchetoeu/jscript/lib/MapLib.java +++ b/src/java/me/topchetoeu/jscript/lib/MapLib.java @@ -4,10 +4,10 @@ import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.stream.Collectors; -import me.topchetoeu.jscript.core.Context; -import me.topchetoeu.jscript.core.values.ArrayValue; -import me.topchetoeu.jscript.core.values.ObjectValue; -import me.topchetoeu.jscript.core.values.Values; +import me.topchetoeu.jscript.runtime.Context; +import me.topchetoeu.jscript.runtime.values.ArrayValue; +import me.topchetoeu.jscript.runtime.values.ObjectValue; +import me.topchetoeu.jscript.runtime.values.Values; import me.topchetoeu.jscript.utils.interop.Arguments; import me.topchetoeu.jscript.utils.interop.Expose; import me.topchetoeu.jscript.utils.interop.ExposeConstructor; diff --git a/src/java/me/topchetoeu/jscript/lib/NumberLib.java b/src/java/me/topchetoeu/jscript/lib/NumberLib.java index 694a0eb..71e4215 100644 --- a/src/java/me/topchetoeu/jscript/lib/NumberLib.java +++ b/src/java/me/topchetoeu/jscript/lib/NumberLib.java @@ -1,7 +1,7 @@ package me.topchetoeu.jscript.lib; -import me.topchetoeu.jscript.core.values.ObjectValue; -import me.topchetoeu.jscript.core.values.Values; +import me.topchetoeu.jscript.runtime.values.ObjectValue; +import me.topchetoeu.jscript.runtime.values.Values; import me.topchetoeu.jscript.utils.interop.Arguments; import me.topchetoeu.jscript.utils.interop.Expose; import me.topchetoeu.jscript.utils.interop.ExposeConstructor; diff --git a/src/java/me/topchetoeu/jscript/lib/ObjectLib.java b/src/java/me/topchetoeu/jscript/lib/ObjectLib.java index a73ace6..c9b2964 100644 --- a/src/java/me/topchetoeu/jscript/lib/ObjectLib.java +++ b/src/java/me/topchetoeu/jscript/lib/ObjectLib.java @@ -1,11 +1,11 @@ package me.topchetoeu.jscript.lib; -import me.topchetoeu.jscript.core.values.ArrayValue; -import me.topchetoeu.jscript.core.values.FunctionValue; -import me.topchetoeu.jscript.core.values.ObjectValue; -import me.topchetoeu.jscript.core.values.Symbol; -import me.topchetoeu.jscript.core.values.Values; -import me.topchetoeu.jscript.core.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.values.ArrayValue; +import me.topchetoeu.jscript.runtime.values.FunctionValue; +import me.topchetoeu.jscript.runtime.values.ObjectValue; +import me.topchetoeu.jscript.runtime.values.Symbol; +import me.topchetoeu.jscript.runtime.values.Values; import me.topchetoeu.jscript.utils.interop.Arguments; import me.topchetoeu.jscript.utils.interop.Expose; import me.topchetoeu.jscript.utils.interop.ExposeConstructor; diff --git a/src/java/me/topchetoeu/jscript/lib/PromiseLib.java b/src/java/me/topchetoeu/jscript/lib/PromiseLib.java index 5d75368..2691e10 100644 --- a/src/java/me/topchetoeu/jscript/lib/PromiseLib.java +++ b/src/java/me/topchetoeu/jscript/lib/PromiseLib.java @@ -4,16 +4,16 @@ import java.util.ArrayList; import java.util.List; import me.topchetoeu.jscript.common.ResultRunnable; -import me.topchetoeu.jscript.core.Context; -import me.topchetoeu.jscript.core.EventLoop; -import me.topchetoeu.jscript.core.Extensions; -import me.topchetoeu.jscript.core.values.ArrayValue; -import me.topchetoeu.jscript.core.values.FunctionValue; -import me.topchetoeu.jscript.core.values.NativeFunction; -import me.topchetoeu.jscript.core.values.ObjectValue; -import me.topchetoeu.jscript.core.values.Values; -import me.topchetoeu.jscript.core.exceptions.EngineException; -import me.topchetoeu.jscript.core.exceptions.InterruptException; +import me.topchetoeu.jscript.runtime.Context; +import me.topchetoeu.jscript.runtime.EventLoop; +import me.topchetoeu.jscript.runtime.Extensions; +import me.topchetoeu.jscript.runtime.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.exceptions.InterruptException; +import me.topchetoeu.jscript.runtime.values.ArrayValue; +import me.topchetoeu.jscript.runtime.values.FunctionValue; +import me.topchetoeu.jscript.runtime.values.NativeFunction; +import me.topchetoeu.jscript.runtime.values.ObjectValue; +import me.topchetoeu.jscript.runtime.values.Values; import me.topchetoeu.jscript.utils.interop.Arguments; import me.topchetoeu.jscript.utils.interop.Expose; import me.topchetoeu.jscript.utils.interop.ExposeConstructor; diff --git a/src/java/me/topchetoeu/jscript/lib/RangeErrorLib.java b/src/java/me/topchetoeu/jscript/lib/RangeErrorLib.java index eacc4b3..78877ce 100644 --- a/src/java/me/topchetoeu/jscript/lib/RangeErrorLib.java +++ b/src/java/me/topchetoeu/jscript/lib/RangeErrorLib.java @@ -1,7 +1,7 @@ package me.topchetoeu.jscript.lib; -import me.topchetoeu.jscript.core.values.ObjectValue; -import me.topchetoeu.jscript.core.values.ObjectValue.PlaceholderProto; +import me.topchetoeu.jscript.runtime.values.ObjectValue; +import me.topchetoeu.jscript.runtime.values.ObjectValue.PlaceholderProto; import me.topchetoeu.jscript.utils.interop.Arguments; import me.topchetoeu.jscript.utils.interop.ExposeConstructor; import me.topchetoeu.jscript.utils.interop.ExposeField; diff --git a/src/java/me/topchetoeu/jscript/lib/RegExpLib.java b/src/java/me/topchetoeu/jscript/lib/RegExpLib.java index 587700a..47c8b92 100644 --- a/src/java/me/topchetoeu/jscript/lib/RegExpLib.java +++ b/src/java/me/topchetoeu/jscript/lib/RegExpLib.java @@ -4,12 +4,12 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.regex.Pattern; -import me.topchetoeu.jscript.core.Context; -import me.topchetoeu.jscript.core.values.ArrayValue; -import me.topchetoeu.jscript.core.values.FunctionValue; -import me.topchetoeu.jscript.core.values.NativeWrapper; -import me.topchetoeu.jscript.core.values.ObjectValue; -import me.topchetoeu.jscript.core.values.Values; +import me.topchetoeu.jscript.runtime.Context; +import me.topchetoeu.jscript.runtime.values.ArrayValue; +import me.topchetoeu.jscript.runtime.values.FunctionValue; +import me.topchetoeu.jscript.runtime.values.NativeWrapper; +import me.topchetoeu.jscript.runtime.values.ObjectValue; +import me.topchetoeu.jscript.runtime.values.Values; import me.topchetoeu.jscript.utils.interop.Arguments; import me.topchetoeu.jscript.utils.interop.Expose; import me.topchetoeu.jscript.utils.interop.ExposeConstructor; diff --git a/src/java/me/topchetoeu/jscript/lib/SetLib.java b/src/java/me/topchetoeu/jscript/lib/SetLib.java index 9a0582b..273a27c 100644 --- a/src/java/me/topchetoeu/jscript/lib/SetLib.java +++ b/src/java/me/topchetoeu/jscript/lib/SetLib.java @@ -4,10 +4,10 @@ import java.util.ArrayList; import java.util.LinkedHashSet; import java.util.stream.Collectors; -import me.topchetoeu.jscript.core.Context; -import me.topchetoeu.jscript.core.values.ArrayValue; -import me.topchetoeu.jscript.core.values.ObjectValue; -import me.topchetoeu.jscript.core.values.Values; +import me.topchetoeu.jscript.runtime.Context; +import me.topchetoeu.jscript.runtime.values.ArrayValue; +import me.topchetoeu.jscript.runtime.values.ObjectValue; +import me.topchetoeu.jscript.runtime.values.Values; import me.topchetoeu.jscript.utils.interop.Arguments; import me.topchetoeu.jscript.utils.interop.Expose; import me.topchetoeu.jscript.utils.interop.ExposeConstructor; diff --git a/src/java/me/topchetoeu/jscript/lib/StringLib.java b/src/java/me/topchetoeu/jscript/lib/StringLib.java index 8078ef5..93317a3 100644 --- a/src/java/me/topchetoeu/jscript/lib/StringLib.java +++ b/src/java/me/topchetoeu/jscript/lib/StringLib.java @@ -2,13 +2,13 @@ package me.topchetoeu.jscript.lib; import java.util.regex.Pattern; -import me.topchetoeu.jscript.core.Environment; -import me.topchetoeu.jscript.core.values.ArrayValue; -import me.topchetoeu.jscript.core.values.FunctionValue; -import me.topchetoeu.jscript.core.values.ObjectValue; -import me.topchetoeu.jscript.core.values.Symbol; -import me.topchetoeu.jscript.core.values.Values; -import me.topchetoeu.jscript.core.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.Environment; +import me.topchetoeu.jscript.runtime.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.values.ArrayValue; +import me.topchetoeu.jscript.runtime.values.FunctionValue; +import me.topchetoeu.jscript.runtime.values.ObjectValue; +import me.topchetoeu.jscript.runtime.values.Symbol; +import me.topchetoeu.jscript.runtime.values.Values; import me.topchetoeu.jscript.utils.interop.Arguments; import me.topchetoeu.jscript.utils.interop.Expose; import me.topchetoeu.jscript.utils.interop.ExposeConstructor; diff --git a/src/java/me/topchetoeu/jscript/lib/SymbolLib.java b/src/java/me/topchetoeu/jscript/lib/SymbolLib.java index b121bec..9de6a74 100644 --- a/src/java/me/topchetoeu/jscript/lib/SymbolLib.java +++ b/src/java/me/topchetoeu/jscript/lib/SymbolLib.java @@ -3,10 +3,10 @@ package me.topchetoeu.jscript.lib; import java.util.HashMap; import java.util.Map; -import me.topchetoeu.jscript.core.values.ObjectValue; -import me.topchetoeu.jscript.core.values.Symbol; -import me.topchetoeu.jscript.core.values.Values; -import me.topchetoeu.jscript.core.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.values.ObjectValue; +import me.topchetoeu.jscript.runtime.values.Symbol; +import me.topchetoeu.jscript.runtime.values.Values; import me.topchetoeu.jscript.utils.interop.Arguments; import me.topchetoeu.jscript.utils.interop.Expose; import me.topchetoeu.jscript.utils.interop.ExposeConstructor; diff --git a/src/java/me/topchetoeu/jscript/lib/SyntaxErrorLib.java b/src/java/me/topchetoeu/jscript/lib/SyntaxErrorLib.java index 177e98d..1557729 100644 --- a/src/java/me/topchetoeu/jscript/lib/SyntaxErrorLib.java +++ b/src/java/me/topchetoeu/jscript/lib/SyntaxErrorLib.java @@ -1,7 +1,7 @@ package me.topchetoeu.jscript.lib; -import me.topchetoeu.jscript.core.values.ObjectValue; -import me.topchetoeu.jscript.core.values.ObjectValue.PlaceholderProto; +import me.topchetoeu.jscript.runtime.values.ObjectValue; +import me.topchetoeu.jscript.runtime.values.ObjectValue.PlaceholderProto; import me.topchetoeu.jscript.utils.interop.Arguments; import me.topchetoeu.jscript.utils.interop.ExposeConstructor; import me.topchetoeu.jscript.utils.interop.ExposeField; diff --git a/src/java/me/topchetoeu/jscript/lib/TypeErrorLib.java b/src/java/me/topchetoeu/jscript/lib/TypeErrorLib.java index 74f9b31..98107ae 100644 --- a/src/java/me/topchetoeu/jscript/lib/TypeErrorLib.java +++ b/src/java/me/topchetoeu/jscript/lib/TypeErrorLib.java @@ -1,7 +1,7 @@ package me.topchetoeu.jscript.lib; -import me.topchetoeu.jscript.core.values.ObjectValue; -import me.topchetoeu.jscript.core.values.ObjectValue.PlaceholderProto; +import me.topchetoeu.jscript.runtime.values.ObjectValue; +import me.topchetoeu.jscript.runtime.values.ObjectValue.PlaceholderProto; import me.topchetoeu.jscript.utils.interop.Arguments; import me.topchetoeu.jscript.utils.interop.ExposeConstructor; import me.topchetoeu.jscript.utils.interop.ExposeField; diff --git a/src/java/me/topchetoeu/jscript/core/Compiler.java b/src/java/me/topchetoeu/jscript/runtime/Compiler.java similarity index 74% rename from src/java/me/topchetoeu/jscript/core/Compiler.java rename to src/java/me/topchetoeu/jscript/runtime/Compiler.java index 0b710ed..d332da5 100644 --- a/src/java/me/topchetoeu/jscript/core/Compiler.java +++ b/src/java/me/topchetoeu/jscript/runtime/Compiler.java @@ -1,10 +1,10 @@ -package me.topchetoeu.jscript.core; +package me.topchetoeu.jscript.runtime; import me.topchetoeu.jscript.common.Filename; import me.topchetoeu.jscript.common.FunctionBody; -import me.topchetoeu.jscript.core.exceptions.EngineException; -import me.topchetoeu.jscript.core.scope.ValueVariable; -import me.topchetoeu.jscript.core.values.CodeFunction; +import me.topchetoeu.jscript.runtime.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.scope.ValueVariable; +import me.topchetoeu.jscript.runtime.values.CodeFunction; public interface Compiler { public Key KEY = new Key<>(); diff --git a/src/java/me/topchetoeu/jscript/core/Context.java b/src/java/me/topchetoeu/jscript/runtime/Context.java similarity index 90% rename from src/java/me/topchetoeu/jscript/core/Context.java rename to src/java/me/topchetoeu/jscript/runtime/Context.java index 07f7a02..0f93e4b 100644 --- a/src/java/me/topchetoeu/jscript/core/Context.java +++ b/src/java/me/topchetoeu/jscript/runtime/Context.java @@ -1,14 +1,14 @@ -package me.topchetoeu.jscript.core; +package me.topchetoeu.jscript.runtime; import java.util.Iterator; import java.util.List; import me.topchetoeu.jscript.common.Filename; -import me.topchetoeu.jscript.core.debug.DebugContext; -import me.topchetoeu.jscript.core.values.CodeFunction; -import me.topchetoeu.jscript.core.values.FunctionValue; -import me.topchetoeu.jscript.core.exceptions.EngineException; -import me.topchetoeu.jscript.core.scope.ValueVariable; +import me.topchetoeu.jscript.runtime.debug.DebugContext; +import me.topchetoeu.jscript.runtime.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.scope.ValueVariable; +import me.topchetoeu.jscript.runtime.values.CodeFunction; +import me.topchetoeu.jscript.runtime.values.FunctionValue; public class Context implements Extensions { public static final Context NULL = new Context(); diff --git a/src/java/me/topchetoeu/jscript/core/Engine.java b/src/java/me/topchetoeu/jscript/runtime/Engine.java similarity index 94% rename from src/java/me/topchetoeu/jscript/core/Engine.java rename to src/java/me/topchetoeu/jscript/runtime/Engine.java index 5ca38c7..2a13a58 100644 --- a/src/java/me/topchetoeu/jscript/core/Engine.java +++ b/src/java/me/topchetoeu/jscript/runtime/Engine.java @@ -1,12 +1,12 @@ -package me.topchetoeu.jscript.core; +package me.topchetoeu.jscript.runtime; import java.util.concurrent.PriorityBlockingQueue; import me.topchetoeu.jscript.common.Filename; import me.topchetoeu.jscript.common.ResultRunnable; import me.topchetoeu.jscript.common.events.DataNotifier; -import me.topchetoeu.jscript.core.exceptions.InterruptException; -import me.topchetoeu.jscript.core.values.FunctionValue; +import me.topchetoeu.jscript.runtime.exceptions.InterruptException; +import me.topchetoeu.jscript.runtime.values.FunctionValue; public class Engine implements EventLoop { private static class Task implements Comparable> { diff --git a/src/java/me/topchetoeu/jscript/core/Environment.java b/src/java/me/topchetoeu/jscript/runtime/Environment.java similarity index 89% rename from src/java/me/topchetoeu/jscript/core/Environment.java rename to src/java/me/topchetoeu/jscript/runtime/Environment.java index f848a53..4ed3b44 100644 --- a/src/java/me/topchetoeu/jscript/core/Environment.java +++ b/src/java/me/topchetoeu/jscript/runtime/Environment.java @@ -1,12 +1,12 @@ -package me.topchetoeu.jscript.core; +package me.topchetoeu.jscript.runtime; import java.util.HashMap; -import me.topchetoeu.jscript.core.scope.GlobalScope; -import me.topchetoeu.jscript.core.values.FunctionValue; -import me.topchetoeu.jscript.core.values.NativeFunction; -import me.topchetoeu.jscript.core.values.ObjectValue; -import me.topchetoeu.jscript.core.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.scope.GlobalScope; +import me.topchetoeu.jscript.runtime.values.FunctionValue; +import me.topchetoeu.jscript.runtime.values.NativeFunction; +import me.topchetoeu.jscript.runtime.values.ObjectValue; import me.topchetoeu.jscript.utils.interop.NativeWrapperProvider; @SuppressWarnings("unchecked") diff --git a/src/java/me/topchetoeu/jscript/core/EventLoop.java b/src/java/me/topchetoeu/jscript/runtime/EventLoop.java similarity index 88% rename from src/java/me/topchetoeu/jscript/core/EventLoop.java rename to src/java/me/topchetoeu/jscript/runtime/EventLoop.java index 4bb22e4..f3f013d 100644 --- a/src/java/me/topchetoeu/jscript/core/EventLoop.java +++ b/src/java/me/topchetoeu/jscript/runtime/EventLoop.java @@ -1,8 +1,8 @@ -package me.topchetoeu.jscript.core; +package me.topchetoeu.jscript.runtime; import me.topchetoeu.jscript.common.ResultRunnable; import me.topchetoeu.jscript.common.events.DataNotifier; -import me.topchetoeu.jscript.core.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.exceptions.EngineException; public interface EventLoop { public static final Key KEY = new Key<>(); diff --git a/src/java/me/topchetoeu/jscript/core/Extensions.java b/src/java/me/topchetoeu/jscript/runtime/Extensions.java similarity index 95% rename from src/java/me/topchetoeu/jscript/core/Extensions.java rename to src/java/me/topchetoeu/jscript/runtime/Extensions.java index 9d8a4f8..c89dd71 100644 --- a/src/java/me/topchetoeu/jscript/core/Extensions.java +++ b/src/java/me/topchetoeu/jscript/runtime/Extensions.java @@ -1,4 +1,4 @@ -package me.topchetoeu.jscript.core; +package me.topchetoeu.jscript.runtime; public interface Extensions { T get(Key key); diff --git a/src/java/me/topchetoeu/jscript/core/Frame.java b/src/java/me/topchetoeu/jscript/runtime/Frame.java similarity index 95% rename from src/java/me/topchetoeu/jscript/core/Frame.java rename to src/java/me/topchetoeu/jscript/runtime/Frame.java index b767961..d952596 100644 --- a/src/java/me/topchetoeu/jscript/core/Frame.java +++ b/src/java/me/topchetoeu/jscript/runtime/Frame.java @@ -1,19 +1,19 @@ -package me.topchetoeu.jscript.core; +package me.topchetoeu.jscript.runtime; import java.util.List; import java.util.Stack; import me.topchetoeu.jscript.common.Instruction; -import me.topchetoeu.jscript.core.debug.DebugContext; -import me.topchetoeu.jscript.core.scope.LocalScope; -import me.topchetoeu.jscript.core.scope.ValueVariable; -import me.topchetoeu.jscript.core.values.ArrayValue; -import me.topchetoeu.jscript.core.values.CodeFunction; -import me.topchetoeu.jscript.core.values.ObjectValue; -import me.topchetoeu.jscript.core.values.ScopeValue; -import me.topchetoeu.jscript.core.values.Values; -import me.topchetoeu.jscript.core.exceptions.EngineException; -import me.topchetoeu.jscript.core.exceptions.InterruptException; +import me.topchetoeu.jscript.runtime.debug.DebugContext; +import me.topchetoeu.jscript.runtime.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.exceptions.InterruptException; +import me.topchetoeu.jscript.runtime.scope.LocalScope; +import me.topchetoeu.jscript.runtime.scope.ValueVariable; +import me.topchetoeu.jscript.runtime.values.ArrayValue; +import me.topchetoeu.jscript.runtime.values.CodeFunction; +import me.topchetoeu.jscript.runtime.values.ObjectValue; +import me.topchetoeu.jscript.runtime.values.ScopeValue; +import me.topchetoeu.jscript.runtime.values.Values; public class Frame { public static enum TryState { diff --git a/src/java/me/topchetoeu/jscript/core/InstructionRunner.java b/src/java/me/topchetoeu/jscript/runtime/InstructionRunner.java similarity index 96% rename from src/java/me/topchetoeu/jscript/core/InstructionRunner.java rename to src/java/me/topchetoeu/jscript/runtime/InstructionRunner.java index 9017585..2b94aa1 100644 --- a/src/java/me/topchetoeu/jscript/core/InstructionRunner.java +++ b/src/java/me/topchetoeu/jscript/runtime/InstructionRunner.java @@ -1,17 +1,17 @@ -package me.topchetoeu.jscript.core; +package me.topchetoeu.jscript.runtime; import java.util.Collections; -import me.topchetoeu.jscript.core.scope.ValueVariable; -import me.topchetoeu.jscript.core.values.ArrayValue; -import me.topchetoeu.jscript.core.values.CodeFunction; -import me.topchetoeu.jscript.core.values.FunctionValue; -import me.topchetoeu.jscript.core.values.ObjectValue; -import me.topchetoeu.jscript.core.values.Symbol; -import me.topchetoeu.jscript.core.values.Values; import me.topchetoeu.jscript.common.Instruction; import me.topchetoeu.jscript.common.Operation; -import me.topchetoeu.jscript.core.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.scope.ValueVariable; +import me.topchetoeu.jscript.runtime.values.ArrayValue; +import me.topchetoeu.jscript.runtime.values.CodeFunction; +import me.topchetoeu.jscript.runtime.values.FunctionValue; +import me.topchetoeu.jscript.runtime.values.ObjectValue; +import me.topchetoeu.jscript.runtime.values.Symbol; +import me.topchetoeu.jscript.runtime.values.Values; public class InstructionRunner { private static Object execReturn(Context ctx, Instruction instr, Frame frame) { diff --git a/src/java/me/topchetoeu/jscript/runtime/Key.java b/src/java/me/topchetoeu/jscript/runtime/Key.java new file mode 100644 index 0000000..656efc8 --- /dev/null +++ b/src/java/me/topchetoeu/jscript/runtime/Key.java @@ -0,0 +1,5 @@ +package me.topchetoeu.jscript.runtime; + +public class Key { + +} diff --git a/src/java/me/topchetoeu/jscript/core/WrapperProvider.java b/src/java/me/topchetoeu/jscript/runtime/WrapperProvider.java similarity index 60% rename from src/java/me/topchetoeu/jscript/core/WrapperProvider.java rename to src/java/me/topchetoeu/jscript/runtime/WrapperProvider.java index f777bbd..8665625 100644 --- a/src/java/me/topchetoeu/jscript/core/WrapperProvider.java +++ b/src/java/me/topchetoeu/jscript/runtime/WrapperProvider.java @@ -1,7 +1,7 @@ -package me.topchetoeu.jscript.core; +package me.topchetoeu.jscript.runtime; -import me.topchetoeu.jscript.core.values.FunctionValue; -import me.topchetoeu.jscript.core.values.ObjectValue; +import me.topchetoeu.jscript.runtime.values.FunctionValue; +import me.topchetoeu.jscript.runtime.values.ObjectValue; public interface WrapperProvider { public ObjectValue getProto(Class obj); diff --git a/src/java/me/topchetoeu/jscript/core/debug/DebugContext.java b/src/java/me/topchetoeu/jscript/runtime/debug/DebugContext.java similarity index 91% rename from src/java/me/topchetoeu/jscript/core/debug/DebugContext.java rename to src/java/me/topchetoeu/jscript/runtime/debug/DebugContext.java index 3f89b02..2b38b84 100644 --- a/src/java/me/topchetoeu/jscript/core/debug/DebugContext.java +++ b/src/java/me/topchetoeu/jscript/runtime/debug/DebugContext.java @@ -1,4 +1,4 @@ -package me.topchetoeu.jscript.core.debug; +package me.topchetoeu.jscript.runtime.debug; import java.util.ArrayList; import java.util.HashMap; @@ -10,13 +10,13 @@ import me.topchetoeu.jscript.common.FunctionBody; import me.topchetoeu.jscript.common.Instruction; import me.topchetoeu.jscript.common.Location; import me.topchetoeu.jscript.common.mapping.FunctionMap; -import me.topchetoeu.jscript.core.Context; -import me.topchetoeu.jscript.core.Extensions; -import me.topchetoeu.jscript.core.Frame; -import me.topchetoeu.jscript.core.Key; -import me.topchetoeu.jscript.core.values.CodeFunction; -import me.topchetoeu.jscript.core.values.FunctionValue; -import me.topchetoeu.jscript.core.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.Context; +import me.topchetoeu.jscript.runtime.Extensions; +import me.topchetoeu.jscript.runtime.Frame; +import me.topchetoeu.jscript.runtime.Key; +import me.topchetoeu.jscript.runtime.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.values.CodeFunction; +import me.topchetoeu.jscript.runtime.values.FunctionValue; public class DebugContext { public static final Key KEY = new Key<>(); diff --git a/src/java/me/topchetoeu/jscript/core/debug/DebugHandler.java b/src/java/me/topchetoeu/jscript/runtime/debug/DebugHandler.java similarity index 93% rename from src/java/me/topchetoeu/jscript/core/debug/DebugHandler.java rename to src/java/me/topchetoeu/jscript/runtime/debug/DebugHandler.java index 3e9ec4a..cb4b786 100644 --- a/src/java/me/topchetoeu/jscript/core/debug/DebugHandler.java +++ b/src/java/me/topchetoeu/jscript/runtime/debug/DebugHandler.java @@ -1,12 +1,12 @@ -package me.topchetoeu.jscript.core.debug; +package me.topchetoeu.jscript.runtime.debug; import me.topchetoeu.jscript.common.Filename; import me.topchetoeu.jscript.common.FunctionBody; import me.topchetoeu.jscript.common.Instruction; import me.topchetoeu.jscript.common.mapping.FunctionMap; -import me.topchetoeu.jscript.core.Context; -import me.topchetoeu.jscript.core.Frame; -import me.topchetoeu.jscript.core.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.Context; +import me.topchetoeu.jscript.runtime.Frame; +import me.topchetoeu.jscript.runtime.exceptions.EngineException; public interface DebugHandler { /** diff --git a/src/java/me/topchetoeu/jscript/core/exceptions/ConvertException.java b/src/java/me/topchetoeu/jscript/runtime/exceptions/ConvertException.java similarity index 85% rename from src/java/me/topchetoeu/jscript/core/exceptions/ConvertException.java rename to src/java/me/topchetoeu/jscript/runtime/exceptions/ConvertException.java index c640fe3..72cb63a 100644 --- a/src/java/me/topchetoeu/jscript/core/exceptions/ConvertException.java +++ b/src/java/me/topchetoeu/jscript/runtime/exceptions/ConvertException.java @@ -1,4 +1,4 @@ -package me.topchetoeu.jscript.core.exceptions; +package me.topchetoeu.jscript.runtime.exceptions; public class ConvertException extends RuntimeException { public final String source, target; diff --git a/src/java/me/topchetoeu/jscript/core/exceptions/EngineException.java b/src/java/me/topchetoeu/jscript/runtime/exceptions/EngineException.java similarity index 91% rename from src/java/me/topchetoeu/jscript/core/exceptions/EngineException.java rename to src/java/me/topchetoeu/jscript/runtime/exceptions/EngineException.java index f478e5c..787dbee 100644 --- a/src/java/me/topchetoeu/jscript/core/exceptions/EngineException.java +++ b/src/java/me/topchetoeu/jscript/runtime/exceptions/EngineException.java @@ -1,14 +1,14 @@ -package me.topchetoeu.jscript.core.exceptions; +package me.topchetoeu.jscript.runtime.exceptions; import java.util.ArrayList; import java.util.List; import me.topchetoeu.jscript.common.Location; -import me.topchetoeu.jscript.core.Context; -import me.topchetoeu.jscript.core.Environment; -import me.topchetoeu.jscript.core.values.ObjectValue; -import me.topchetoeu.jscript.core.values.Values; -import me.topchetoeu.jscript.core.values.ObjectValue.PlaceholderProto; +import me.topchetoeu.jscript.runtime.Context; +import me.topchetoeu.jscript.runtime.Environment; +import me.topchetoeu.jscript.runtime.values.ObjectValue; +import me.topchetoeu.jscript.runtime.values.Values; +import me.topchetoeu.jscript.runtime.values.ObjectValue.PlaceholderProto; public class EngineException extends RuntimeException { public static class StackElement { diff --git a/src/java/me/topchetoeu/jscript/core/exceptions/InterruptException.java b/src/java/me/topchetoeu/jscript/runtime/exceptions/InterruptException.java similarity index 76% rename from src/java/me/topchetoeu/jscript/core/exceptions/InterruptException.java rename to src/java/me/topchetoeu/jscript/runtime/exceptions/InterruptException.java index b1000b5..ac7dc0e 100644 --- a/src/java/me/topchetoeu/jscript/core/exceptions/InterruptException.java +++ b/src/java/me/topchetoeu/jscript/runtime/exceptions/InterruptException.java @@ -1,4 +1,4 @@ -package me.topchetoeu.jscript.core.exceptions; +package me.topchetoeu.jscript.runtime.exceptions; public class InterruptException extends RuntimeException { public InterruptException() { } diff --git a/src/java/me/topchetoeu/jscript/core/exceptions/SyntaxException.java b/src/java/me/topchetoeu/jscript/runtime/exceptions/SyntaxException.java similarity index 87% rename from src/java/me/topchetoeu/jscript/core/exceptions/SyntaxException.java rename to src/java/me/topchetoeu/jscript/runtime/exceptions/SyntaxException.java index d3e2717..23bd206 100644 --- a/src/java/me/topchetoeu/jscript/core/exceptions/SyntaxException.java +++ b/src/java/me/topchetoeu/jscript/runtime/exceptions/SyntaxException.java @@ -1,4 +1,4 @@ -package me.topchetoeu.jscript.core.exceptions; +package me.topchetoeu.jscript.runtime.exceptions; import me.topchetoeu.jscript.common.Location; diff --git a/src/java/me/topchetoeu/jscript/core/scope/GlobalScope.java b/src/java/me/topchetoeu/jscript/runtime/scope/GlobalScope.java similarity index 85% rename from src/java/me/topchetoeu/jscript/core/scope/GlobalScope.java rename to src/java/me/topchetoeu/jscript/runtime/scope/GlobalScope.java index 83c3c66..161a802 100644 --- a/src/java/me/topchetoeu/jscript/core/scope/GlobalScope.java +++ b/src/java/me/topchetoeu/jscript/runtime/scope/GlobalScope.java @@ -1,14 +1,14 @@ -package me.topchetoeu.jscript.core.scope; +package me.topchetoeu.jscript.runtime.scope; import java.util.HashSet; import java.util.Set; -import me.topchetoeu.jscript.core.Context; -import me.topchetoeu.jscript.core.values.FunctionValue; -import me.topchetoeu.jscript.core.values.NativeFunction; -import me.topchetoeu.jscript.core.values.ObjectValue; -import me.topchetoeu.jscript.core.values.Values; -import me.topchetoeu.jscript.core.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.Context; +import me.topchetoeu.jscript.runtime.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.values.FunctionValue; +import me.topchetoeu.jscript.runtime.values.NativeFunction; +import me.topchetoeu.jscript.runtime.values.ObjectValue; +import me.topchetoeu.jscript.runtime.values.Values; public class GlobalScope { public final ObjectValue obj; diff --git a/src/java/me/topchetoeu/jscript/core/scope/LocalScope.java b/src/java/me/topchetoeu/jscript/runtime/scope/LocalScope.java similarity index 94% rename from src/java/me/topchetoeu/jscript/core/scope/LocalScope.java rename to src/java/me/topchetoeu/jscript/runtime/scope/LocalScope.java index 0716041..6adce80 100644 --- a/src/java/me/topchetoeu/jscript/core/scope/LocalScope.java +++ b/src/java/me/topchetoeu/jscript/runtime/scope/LocalScope.java @@ -1,4 +1,4 @@ -package me.topchetoeu.jscript.core.scope; +package me.topchetoeu.jscript.runtime.scope; import java.util.ArrayList; diff --git a/src/java/me/topchetoeu/jscript/core/scope/ValueVariable.java b/src/java/me/topchetoeu/jscript/runtime/scope/ValueVariable.java similarity index 78% rename from src/java/me/topchetoeu/jscript/core/scope/ValueVariable.java rename to src/java/me/topchetoeu/jscript/runtime/scope/ValueVariable.java index 21ffada..892e01e 100644 --- a/src/java/me/topchetoeu/jscript/core/scope/ValueVariable.java +++ b/src/java/me/topchetoeu/jscript/runtime/scope/ValueVariable.java @@ -1,7 +1,7 @@ -package me.topchetoeu.jscript.core.scope; +package me.topchetoeu.jscript.runtime.scope; -import me.topchetoeu.jscript.core.Context; -import me.topchetoeu.jscript.core.values.Values; +import me.topchetoeu.jscript.runtime.Context; +import me.topchetoeu.jscript.runtime.values.Values; public class ValueVariable implements Variable { public boolean readonly; diff --git a/src/java/me/topchetoeu/jscript/core/scope/Variable.java b/src/java/me/topchetoeu/jscript/runtime/scope/Variable.java similarity index 63% rename from src/java/me/topchetoeu/jscript/core/scope/Variable.java rename to src/java/me/topchetoeu/jscript/runtime/scope/Variable.java index 731259c..ed99895 100644 --- a/src/java/me/topchetoeu/jscript/core/scope/Variable.java +++ b/src/java/me/topchetoeu/jscript/runtime/scope/Variable.java @@ -1,6 +1,6 @@ -package me.topchetoeu.jscript.core.scope; +package me.topchetoeu.jscript.runtime.scope; -import me.topchetoeu.jscript.core.Context; +import me.topchetoeu.jscript.runtime.Context; public interface Variable { Object get(Context ctx); diff --git a/src/java/me/topchetoeu/jscript/core/values/ArrayValue.java b/src/java/me/topchetoeu/jscript/runtime/values/ArrayValue.java similarity index 98% rename from src/java/me/topchetoeu/jscript/core/values/ArrayValue.java rename to src/java/me/topchetoeu/jscript/runtime/values/ArrayValue.java index 180567a..02c7947 100644 --- a/src/java/me/topchetoeu/jscript/core/values/ArrayValue.java +++ b/src/java/me/topchetoeu/jscript/runtime/values/ArrayValue.java @@ -1,4 +1,4 @@ -package me.topchetoeu.jscript.core.values; +package me.topchetoeu.jscript.runtime.values; import java.util.Arrays; import java.util.Collection; @@ -6,7 +6,7 @@ import java.util.Comparator; import java.util.Iterator; import java.util.List; -import me.topchetoeu.jscript.core.Context; +import me.topchetoeu.jscript.runtime.Context; // TODO: Make methods generic public class ArrayValue extends ObjectValue implements Iterable { diff --git a/src/java/me/topchetoeu/jscript/core/values/CodeFunction.java b/src/java/me/topchetoeu/jscript/runtime/values/CodeFunction.java similarity index 84% rename from src/java/me/topchetoeu/jscript/core/values/CodeFunction.java rename to src/java/me/topchetoeu/jscript/runtime/values/CodeFunction.java index 61336a3..0843c8f 100644 --- a/src/java/me/topchetoeu/jscript/core/values/CodeFunction.java +++ b/src/java/me/topchetoeu/jscript/runtime/values/CodeFunction.java @@ -1,10 +1,10 @@ -package me.topchetoeu.jscript.core.values; +package me.topchetoeu.jscript.runtime.values; import me.topchetoeu.jscript.common.FunctionBody; -import me.topchetoeu.jscript.core.Context; -import me.topchetoeu.jscript.core.Environment; -import me.topchetoeu.jscript.core.Frame; -import me.topchetoeu.jscript.core.scope.ValueVariable; +import me.topchetoeu.jscript.runtime.Context; +import me.topchetoeu.jscript.runtime.Environment; +import me.topchetoeu.jscript.runtime.Frame; +import me.topchetoeu.jscript.runtime.scope.ValueVariable; public class CodeFunction extends FunctionValue { public final FunctionBody body; diff --git a/src/java/me/topchetoeu/jscript/core/values/ConvertHint.java b/src/java/me/topchetoeu/jscript/runtime/values/ConvertHint.java similarity index 54% rename from src/java/me/topchetoeu/jscript/core/values/ConvertHint.java rename to src/java/me/topchetoeu/jscript/runtime/values/ConvertHint.java index 536eb28..1717f40 100644 --- a/src/java/me/topchetoeu/jscript/core/values/ConvertHint.java +++ b/src/java/me/topchetoeu/jscript/runtime/values/ConvertHint.java @@ -1,4 +1,4 @@ -package me.topchetoeu.jscript.core.values; +package me.topchetoeu.jscript.runtime.values; public enum ConvertHint { TOSTRING, diff --git a/src/java/me/topchetoeu/jscript/core/values/FunctionValue.java b/src/java/me/topchetoeu/jscript/runtime/values/FunctionValue.java similarity index 95% rename from src/java/me/topchetoeu/jscript/core/values/FunctionValue.java rename to src/java/me/topchetoeu/jscript/runtime/values/FunctionValue.java index e4556f5..9b54aaa 100644 --- a/src/java/me/topchetoeu/jscript/core/values/FunctionValue.java +++ b/src/java/me/topchetoeu/jscript/runtime/values/FunctionValue.java @@ -1,8 +1,8 @@ -package me.topchetoeu.jscript.core.values; +package me.topchetoeu.jscript.runtime.values; import java.util.List; -import me.topchetoeu.jscript.core.Context; +import me.topchetoeu.jscript.runtime.Context; public abstract class FunctionValue extends ObjectValue { public String name = ""; diff --git a/src/java/me/topchetoeu/jscript/core/values/NativeFunction.java b/src/java/me/topchetoeu/jscript/runtime/values/NativeFunction.java similarity index 87% rename from src/java/me/topchetoeu/jscript/core/values/NativeFunction.java rename to src/java/me/topchetoeu/jscript/runtime/values/NativeFunction.java index 3b21256..cbc3f58 100644 --- a/src/java/me/topchetoeu/jscript/core/values/NativeFunction.java +++ b/src/java/me/topchetoeu/jscript/runtime/values/NativeFunction.java @@ -1,6 +1,6 @@ -package me.topchetoeu.jscript.core.values; +package me.topchetoeu.jscript.runtime.values; -import me.topchetoeu.jscript.core.Context; +import me.topchetoeu.jscript.runtime.Context; import me.topchetoeu.jscript.utils.interop.Arguments; public class NativeFunction extends FunctionValue { diff --git a/src/java/me/topchetoeu/jscript/core/values/NativeWrapper.java b/src/java/me/topchetoeu/jscript/runtime/values/NativeWrapper.java similarity index 89% rename from src/java/me/topchetoeu/jscript/core/values/NativeWrapper.java rename to src/java/me/topchetoeu/jscript/runtime/values/NativeWrapper.java index ecf985a..432a64c 100644 --- a/src/java/me/topchetoeu/jscript/core/values/NativeWrapper.java +++ b/src/java/me/topchetoeu/jscript/runtime/values/NativeWrapper.java @@ -1,6 +1,6 @@ -package me.topchetoeu.jscript.core.values; +package me.topchetoeu.jscript.runtime.values; -import me.topchetoeu.jscript.core.Context; +import me.topchetoeu.jscript.runtime.Context; public class NativeWrapper extends ObjectValue { private static final Object NATIVE_PROTO = new Object(); diff --git a/src/java/me/topchetoeu/jscript/core/values/ObjectValue.java b/src/java/me/topchetoeu/jscript/runtime/values/ObjectValue.java similarity index 98% rename from src/java/me/topchetoeu/jscript/core/values/ObjectValue.java rename to src/java/me/topchetoeu/jscript/runtime/values/ObjectValue.java index 81efb39..f1ff323 100644 --- a/src/java/me/topchetoeu/jscript/core/values/ObjectValue.java +++ b/src/java/me/topchetoeu/jscript/runtime/values/ObjectValue.java @@ -1,4 +1,4 @@ -package me.topchetoeu.jscript.core.values; +package me.topchetoeu.jscript.runtime.values; import java.util.ArrayList; import java.util.LinkedHashMap; @@ -6,8 +6,8 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Map; -import me.topchetoeu.jscript.core.Context; -import me.topchetoeu.jscript.core.Environment; +import me.topchetoeu.jscript.runtime.Context; +import me.topchetoeu.jscript.runtime.Environment; public class ObjectValue { public static enum PlaceholderProto { diff --git a/src/java/me/topchetoeu/jscript/core/values/ScopeValue.java b/src/java/me/topchetoeu/jscript/runtime/values/ScopeValue.java similarity index 91% rename from src/java/me/topchetoeu/jscript/core/values/ScopeValue.java rename to src/java/me/topchetoeu/jscript/runtime/values/ScopeValue.java index a5b145c..099ab96 100644 --- a/src/java/me/topchetoeu/jscript/core/values/ScopeValue.java +++ b/src/java/me/topchetoeu/jscript/runtime/values/ScopeValue.java @@ -1,10 +1,10 @@ -package me.topchetoeu.jscript.core.values; +package me.topchetoeu.jscript.runtime.values; import java.util.HashMap; import java.util.List; -import me.topchetoeu.jscript.core.Context; -import me.topchetoeu.jscript.core.scope.ValueVariable; +import me.topchetoeu.jscript.runtime.Context; +import me.topchetoeu.jscript.runtime.scope.ValueVariable; public class ScopeValue extends ObjectValue { public final ValueVariable[] variables; diff --git a/src/java/me/topchetoeu/jscript/core/values/Symbol.java b/src/java/me/topchetoeu/jscript/runtime/values/Symbol.java similarity index 92% rename from src/java/me/topchetoeu/jscript/core/values/Symbol.java rename to src/java/me/topchetoeu/jscript/runtime/values/Symbol.java index 312ab3e..efb8f32 100644 --- a/src/java/me/topchetoeu/jscript/core/values/Symbol.java +++ b/src/java/me/topchetoeu/jscript/runtime/values/Symbol.java @@ -1,4 +1,4 @@ -package me.topchetoeu.jscript.core.values; +package me.topchetoeu.jscript.runtime.values; import java.util.HashMap; diff --git a/src/java/me/topchetoeu/jscript/core/values/Values.java b/src/java/me/topchetoeu/jscript/runtime/values/Values.java similarity index 98% rename from src/java/me/topchetoeu/jscript/core/values/Values.java rename to src/java/me/topchetoeu/jscript/runtime/values/Values.java index 2dca2b8..b08a45f 100644 --- a/src/java/me/topchetoeu/jscript/core/values/Values.java +++ b/src/java/me/topchetoeu/jscript/runtime/values/Values.java @@ -1,4 +1,4 @@ -package me.topchetoeu.jscript.core.values; +package me.topchetoeu.jscript.runtime.values; import java.io.ByteArrayOutputStream; import java.io.PrintStream; @@ -13,13 +13,13 @@ import java.util.List; import java.util.Map; import me.topchetoeu.jscript.common.Operation; -import me.topchetoeu.jscript.core.Context; -import me.topchetoeu.jscript.core.Environment; -import me.topchetoeu.jscript.core.debug.DebugContext; -import me.topchetoeu.jscript.core.exceptions.ConvertException; -import me.topchetoeu.jscript.core.exceptions.EngineException; -import me.topchetoeu.jscript.core.exceptions.SyntaxException; import me.topchetoeu.jscript.lib.PromiseLib; +import me.topchetoeu.jscript.runtime.Context; +import me.topchetoeu.jscript.runtime.Environment; +import me.topchetoeu.jscript.runtime.debug.DebugContext; +import me.topchetoeu.jscript.runtime.exceptions.ConvertException; +import me.topchetoeu.jscript.runtime.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.exceptions.SyntaxException; public class Values { public static enum CompareResult { diff --git a/src/java/me/topchetoeu/jscript/utils/JSCompiler.java b/src/java/me/topchetoeu/jscript/utils/JSCompiler.java index c4e4c35..81e2c5a 100644 --- a/src/java/me/topchetoeu/jscript/utils/JSCompiler.java +++ b/src/java/me/topchetoeu/jscript/utils/JSCompiler.java @@ -4,9 +4,9 @@ import me.topchetoeu.jscript.common.Filename; import me.topchetoeu.jscript.common.FunctionBody; import me.topchetoeu.jscript.compilation.CompileResult; import me.topchetoeu.jscript.compilation.parsing.Parsing; -import me.topchetoeu.jscript.core.Compiler; -import me.topchetoeu.jscript.core.Extensions; -import me.topchetoeu.jscript.core.debug.DebugContext; +import me.topchetoeu.jscript.runtime.Compiler; +import me.topchetoeu.jscript.runtime.Extensions; +import me.topchetoeu.jscript.runtime.debug.DebugContext; public class JSCompiler implements Compiler { public final Extensions ext; diff --git a/src/java/me/topchetoeu/jscript/utils/JScriptRepl.java b/src/java/me/topchetoeu/jscript/utils/JScriptRepl.java index 5cdd34b..6aad1a9 100644 --- a/src/java/me/topchetoeu/jscript/utils/JScriptRepl.java +++ b/src/java/me/topchetoeu/jscript/utils/JScriptRepl.java @@ -8,18 +8,18 @@ import java.nio.file.Path; import me.topchetoeu.jscript.common.Filename; import me.topchetoeu.jscript.common.Metadata; import me.topchetoeu.jscript.common.Reading; -import me.topchetoeu.jscript.core.Compiler; -import me.topchetoeu.jscript.core.Context; -import me.topchetoeu.jscript.core.Engine; -import me.topchetoeu.jscript.core.Environment; -import me.topchetoeu.jscript.core.EventLoop; -import me.topchetoeu.jscript.core.debug.DebugContext; -import me.topchetoeu.jscript.core.values.NativeFunction; -import me.topchetoeu.jscript.core.values.Values; -import me.topchetoeu.jscript.core.exceptions.EngineException; -import me.topchetoeu.jscript.core.exceptions.InterruptException; -import me.topchetoeu.jscript.core.exceptions.SyntaxException; import me.topchetoeu.jscript.lib.Internals; +import me.topchetoeu.jscript.runtime.Compiler; +import me.topchetoeu.jscript.runtime.Context; +import me.topchetoeu.jscript.runtime.Engine; +import me.topchetoeu.jscript.runtime.Environment; +import me.topchetoeu.jscript.runtime.EventLoop; +import me.topchetoeu.jscript.runtime.debug.DebugContext; +import me.topchetoeu.jscript.runtime.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.exceptions.InterruptException; +import me.topchetoeu.jscript.runtime.exceptions.SyntaxException; +import me.topchetoeu.jscript.runtime.values.NativeFunction; +import me.topchetoeu.jscript.runtime.values.Values; import me.topchetoeu.jscript.utils.debug.DebugServer; import me.topchetoeu.jscript.utils.debug.SimpleDebugger; import me.topchetoeu.jscript.utils.filesystem.Filesystem; diff --git a/src/java/me/topchetoeu/jscript/utils/debug/DebugServer.java b/src/java/me/topchetoeu/jscript/utils/debug/DebugServer.java index d27a039..07c76fa 100644 --- a/src/java/me/topchetoeu/jscript/utils/debug/DebugServer.java +++ b/src/java/me/topchetoeu/jscript/utils/debug/DebugServer.java @@ -15,8 +15,8 @@ import me.topchetoeu.jscript.common.events.Notifier; import me.topchetoeu.jscript.common.json.JSON; import me.topchetoeu.jscript.common.json.JSONList; import me.topchetoeu.jscript.common.json.JSONMap; +import me.topchetoeu.jscript.runtime.exceptions.SyntaxException; import me.topchetoeu.jscript.utils.debug.WebSocketMessage.Type; -import me.topchetoeu.jscript.core.exceptions.SyntaxException; public class DebugServer { public static String browserDisplayName = Metadata.name() + "/" + Metadata.version(); diff --git a/src/java/me/topchetoeu/jscript/utils/debug/Debugger.java b/src/java/me/topchetoeu/jscript/utils/debug/Debugger.java index 202014b..bc64a2e 100644 --- a/src/java/me/topchetoeu/jscript/utils/debug/Debugger.java +++ b/src/java/me/topchetoeu/jscript/utils/debug/Debugger.java @@ -1,8 +1,9 @@ package me.topchetoeu.jscript.utils.debug; -import me.topchetoeu.jscript.core.debug.DebugHandler; import java.io.IOException; +import me.topchetoeu.jscript.runtime.debug.DebugHandler; + public interface Debugger extends DebugHandler { void close(); diff --git a/src/java/me/topchetoeu/jscript/utils/debug/SimpleDebugger.java b/src/java/me/topchetoeu/jscript/utils/debug/SimpleDebugger.java index 58ab504..7602dda 100644 --- a/src/java/me/topchetoeu/jscript/utils/debug/SimpleDebugger.java +++ b/src/java/me/topchetoeu/jscript/utils/debug/SimpleDebugger.java @@ -23,19 +23,19 @@ import me.topchetoeu.jscript.common.json.JSONList; import me.topchetoeu.jscript.common.json.JSONMap; import me.topchetoeu.jscript.common.mapping.FunctionMap; import me.topchetoeu.jscript.compilation.parsing.Parsing; -import me.topchetoeu.jscript.core.Context; -import me.topchetoeu.jscript.core.Engine; -import me.topchetoeu.jscript.core.Environment; -import me.topchetoeu.jscript.core.EventLoop; -import me.topchetoeu.jscript.core.Frame; -import me.topchetoeu.jscript.core.debug.DebugContext; -import me.topchetoeu.jscript.core.scope.GlobalScope; -import me.topchetoeu.jscript.core.values.ArrayValue; -import me.topchetoeu.jscript.core.values.FunctionValue; -import me.topchetoeu.jscript.core.values.ObjectValue; -import me.topchetoeu.jscript.core.values.Symbol; -import me.topchetoeu.jscript.core.values.Values; -import me.topchetoeu.jscript.core.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.Context; +import me.topchetoeu.jscript.runtime.Engine; +import me.topchetoeu.jscript.runtime.Environment; +import me.topchetoeu.jscript.runtime.EventLoop; +import me.topchetoeu.jscript.runtime.Frame; +import me.topchetoeu.jscript.runtime.debug.DebugContext; +import me.topchetoeu.jscript.runtime.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.scope.GlobalScope; +import me.topchetoeu.jscript.runtime.values.ArrayValue; +import me.topchetoeu.jscript.runtime.values.FunctionValue; +import me.topchetoeu.jscript.runtime.values.ObjectValue; +import me.topchetoeu.jscript.runtime.values.Symbol; +import me.topchetoeu.jscript.runtime.values.Values; // very simple indeed public class SimpleDebugger implements Debugger { diff --git a/src/java/me/topchetoeu/jscript/utils/filesystem/Filesystem.java b/src/java/me/topchetoeu/jscript/utils/filesystem/Filesystem.java index ab68a33..6f477cb 100644 --- a/src/java/me/topchetoeu/jscript/utils/filesystem/Filesystem.java +++ b/src/java/me/topchetoeu/jscript/utils/filesystem/Filesystem.java @@ -1,7 +1,7 @@ package me.topchetoeu.jscript.utils.filesystem; -import me.topchetoeu.jscript.core.Extensions; -import me.topchetoeu.jscript.core.Key; +import me.topchetoeu.jscript.runtime.Extensions; +import me.topchetoeu.jscript.runtime.Key; public interface Filesystem { public static final Key KEY = new Key<>(); diff --git a/src/java/me/topchetoeu/jscript/utils/filesystem/FilesystemException.java b/src/java/me/topchetoeu/jscript/utils/filesystem/FilesystemException.java index 486b6c9..cfb434a 100644 --- a/src/java/me/topchetoeu/jscript/utils/filesystem/FilesystemException.java +++ b/src/java/me/topchetoeu/jscript/utils/filesystem/FilesystemException.java @@ -2,8 +2,8 @@ package me.topchetoeu.jscript.utils.filesystem; import java.util.ArrayList; -import me.topchetoeu.jscript.core.values.Values; -import me.topchetoeu.jscript.core.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.values.Values; public class FilesystemException extends RuntimeException { public final ErrorReason reason; diff --git a/src/java/me/topchetoeu/jscript/utils/interop/Arguments.java b/src/java/me/topchetoeu/jscript/utils/interop/Arguments.java index 8e8a606..78d729f 100644 --- a/src/java/me/topchetoeu/jscript/utils/interop/Arguments.java +++ b/src/java/me/topchetoeu/jscript/utils/interop/Arguments.java @@ -2,9 +2,9 @@ package me.topchetoeu.jscript.utils.interop; import java.lang.reflect.Array; -import me.topchetoeu.jscript.core.Context; -import me.topchetoeu.jscript.core.values.NativeWrapper; -import me.topchetoeu.jscript.core.values.Values; +import me.topchetoeu.jscript.runtime.Context; +import me.topchetoeu.jscript.runtime.values.NativeWrapper; +import me.topchetoeu.jscript.runtime.values.Values; public class Arguments { public final Object self; diff --git a/src/java/me/topchetoeu/jscript/utils/interop/NativeWrapperProvider.java b/src/java/me/topchetoeu/jscript/utils/interop/NativeWrapperProvider.java index f4567fc..b8f8001 100644 --- a/src/java/me/topchetoeu/jscript/utils/interop/NativeWrapperProvider.java +++ b/src/java/me/topchetoeu/jscript/utils/interop/NativeWrapperProvider.java @@ -10,16 +10,16 @@ import java.util.HashSet; import java.util.stream.Collectors; import me.topchetoeu.jscript.common.Location; -import me.topchetoeu.jscript.core.Context; -import me.topchetoeu.jscript.core.Environment; -import me.topchetoeu.jscript.core.WrapperProvider; -import me.topchetoeu.jscript.core.values.FunctionValue; -import me.topchetoeu.jscript.core.values.NativeFunction; -import me.topchetoeu.jscript.core.values.ObjectValue; -import me.topchetoeu.jscript.core.values.Symbol; -import me.topchetoeu.jscript.core.values.Values; -import me.topchetoeu.jscript.core.exceptions.EngineException; -import me.topchetoeu.jscript.core.exceptions.InterruptException; +import me.topchetoeu.jscript.runtime.Context; +import me.topchetoeu.jscript.runtime.Environment; +import me.topchetoeu.jscript.runtime.WrapperProvider; +import me.topchetoeu.jscript.runtime.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.exceptions.InterruptException; +import me.topchetoeu.jscript.runtime.values.FunctionValue; +import me.topchetoeu.jscript.runtime.values.NativeFunction; +import me.topchetoeu.jscript.runtime.values.ObjectValue; +import me.topchetoeu.jscript.runtime.values.Symbol; +import me.topchetoeu.jscript.runtime.values.Values; public class NativeWrapperProvider implements WrapperProvider { private final HashMap, FunctionValue> constructors = new HashMap<>(); diff --git a/src/java/me/topchetoeu/jscript/utils/modules/Module.java b/src/java/me/topchetoeu/jscript/utils/modules/Module.java index 71bfb0a..ad84d6c 100644 --- a/src/java/me/topchetoeu/jscript/utils/modules/Module.java +++ b/src/java/me/topchetoeu/jscript/utils/modules/Module.java @@ -1,6 +1,6 @@ package me.topchetoeu.jscript.utils.modules; -import me.topchetoeu.jscript.core.Context; +import me.topchetoeu.jscript.runtime.Context; public abstract class Module { private Object value; diff --git a/src/java/me/topchetoeu/jscript/utils/modules/ModuleRepo.java b/src/java/me/topchetoeu/jscript/utils/modules/ModuleRepo.java index 9cdc899..b02af45 100644 --- a/src/java/me/topchetoeu/jscript/utils/modules/ModuleRepo.java +++ b/src/java/me/topchetoeu/jscript/utils/modules/ModuleRepo.java @@ -3,9 +3,9 @@ package me.topchetoeu.jscript.utils.modules; import java.util.HashMap; import me.topchetoeu.jscript.common.Filename; -import me.topchetoeu.jscript.core.Context; -import me.topchetoeu.jscript.core.Extensions; -import me.topchetoeu.jscript.core.Key; +import me.topchetoeu.jscript.runtime.Context; +import me.topchetoeu.jscript.runtime.Extensions; +import me.topchetoeu.jscript.runtime.Key; import me.topchetoeu.jscript.utils.filesystem.Filesystem; import me.topchetoeu.jscript.utils.filesystem.Mode; diff --git a/src/java/me/topchetoeu/jscript/utils/modules/RootModuleRepo.java b/src/java/me/topchetoeu/jscript/utils/modules/RootModuleRepo.java index 0647154..6e9ca40 100644 --- a/src/java/me/topchetoeu/jscript/utils/modules/RootModuleRepo.java +++ b/src/java/me/topchetoeu/jscript/utils/modules/RootModuleRepo.java @@ -2,8 +2,8 @@ package me.topchetoeu.jscript.utils.modules; import java.util.HashMap; -import me.topchetoeu.jscript.core.Context; -import me.topchetoeu.jscript.core.exceptions.EngineException; +import me.topchetoeu.jscript.runtime.Context; +import me.topchetoeu.jscript.runtime.exceptions.EngineException; public class RootModuleRepo implements ModuleRepo { public final HashMap repos = new HashMap<>(); diff --git a/src/java/me/topchetoeu/jscript/utils/modules/SourceModule.java b/src/java/me/topchetoeu/jscript/utils/modules/SourceModule.java index ddcac1d..993952d 100644 --- a/src/java/me/topchetoeu/jscript/utils/modules/SourceModule.java +++ b/src/java/me/topchetoeu/jscript/utils/modules/SourceModule.java @@ -1,8 +1,8 @@ package me.topchetoeu.jscript.utils.modules; import me.topchetoeu.jscript.common.Filename; -import me.topchetoeu.jscript.core.Context; -import me.topchetoeu.jscript.core.Environment; +import me.topchetoeu.jscript.runtime.Context; +import me.topchetoeu.jscript.runtime.Environment; public class SourceModule extends Module { public final Filename filename; diff --git a/src/java/me/topchetoeu/jscript/utils/permissions/PermissionsProvider.java b/src/java/me/topchetoeu/jscript/utils/permissions/PermissionsProvider.java index 78489ac..53112b3 100644 --- a/src/java/me/topchetoeu/jscript/utils/permissions/PermissionsProvider.java +++ b/src/java/me/topchetoeu/jscript/utils/permissions/PermissionsProvider.java @@ -1,7 +1,7 @@ package me.topchetoeu.jscript.utils.permissions; -import me.topchetoeu.jscript.core.Extensions; -import me.topchetoeu.jscript.core.Key; +import me.topchetoeu.jscript.runtime.Extensions; +import me.topchetoeu.jscript.runtime.Key; public interface PermissionsProvider { public static final Key KEY = new Key<>();