refactor: rename code to runtime
This commit is contained in:
parent
0fb336373a
commit
47b4dd3c15
@ -5,7 +5,7 @@ import java.io.DataOutputStream;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.core.exceptions.SyntaxException;
|
import me.topchetoeu.jscript.runtime.exceptions.SyntaxException;
|
||||||
|
|
||||||
public class Instruction {
|
public class Instruction {
|
||||||
public static enum Type {
|
public static enum Type {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package me.topchetoeu.jscript.common.events;
|
package me.topchetoeu.jscript.common.events;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.core.exceptions.InterruptException;
|
import me.topchetoeu.jscript.runtime.exceptions.InterruptException;
|
||||||
|
|
||||||
public class Notifier {
|
public class Notifier {
|
||||||
private boolean ok = false;
|
private boolean ok = false;
|
||||||
|
@ -9,12 +9,12 @@ import me.topchetoeu.jscript.compilation.parsing.Operator;
|
|||||||
import me.topchetoeu.jscript.compilation.parsing.ParseRes;
|
import me.topchetoeu.jscript.compilation.parsing.ParseRes;
|
||||||
import me.topchetoeu.jscript.compilation.parsing.Parsing;
|
import me.topchetoeu.jscript.compilation.parsing.Parsing;
|
||||||
import me.topchetoeu.jscript.compilation.parsing.Token;
|
import me.topchetoeu.jscript.compilation.parsing.Token;
|
||||||
import me.topchetoeu.jscript.core.Context;
|
import me.topchetoeu.jscript.runtime.Context;
|
||||||
import me.topchetoeu.jscript.core.values.ArrayValue;
|
import me.topchetoeu.jscript.runtime.exceptions.EngineException;
|
||||||
import me.topchetoeu.jscript.core.values.ObjectValue;
|
import me.topchetoeu.jscript.runtime.exceptions.SyntaxException;
|
||||||
import me.topchetoeu.jscript.core.values.Values;
|
import me.topchetoeu.jscript.runtime.values.ArrayValue;
|
||||||
import me.topchetoeu.jscript.core.exceptions.EngineException;
|
import me.topchetoeu.jscript.runtime.values.ObjectValue;
|
||||||
import me.topchetoeu.jscript.core.exceptions.SyntaxException;
|
import me.topchetoeu.jscript.runtime.values.Values;
|
||||||
|
|
||||||
public class JSON {
|
public class JSON {
|
||||||
public static Object toJs(JSONElement val) {
|
public static Object toJs(JSONElement val) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package me.topchetoeu.jscript.compilation;
|
package me.topchetoeu.jscript.compilation;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.common.Instruction;
|
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 class ThrowSyntaxStatement extends Statement {
|
||||||
public final String name;
|
public final String name;
|
||||||
|
@ -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.parsing.ParseRes.State;
|
||||||
import me.topchetoeu.jscript.compilation.scope.LocalScopeRecord;
|
import me.topchetoeu.jscript.compilation.scope.LocalScopeRecord;
|
||||||
import me.topchetoeu.jscript.compilation.values.*;
|
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
|
// TODO: this has to be rewritten
|
||||||
public class Parsing {
|
public class Parsing {
|
||||||
|
@ -7,7 +7,7 @@ import me.topchetoeu.jscript.common.Instruction.Type;
|
|||||||
import me.topchetoeu.jscript.compilation.CompileResult;
|
import me.topchetoeu.jscript.compilation.CompileResult;
|
||||||
import me.topchetoeu.jscript.compilation.CompoundStatement;
|
import me.topchetoeu.jscript.compilation.CompoundStatement;
|
||||||
import me.topchetoeu.jscript.compilation.Statement;
|
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 class FunctionStatement extends Statement {
|
||||||
public final CompoundStatement body;
|
public final CompoundStatement body;
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
package me.topchetoeu.jscript.core;
|
|
||||||
|
|
||||||
public class Key<T> {
|
|
||||||
|
|
||||||
}
|
|
@ -3,11 +3,11 @@ package me.topchetoeu.jscript.lib;
|
|||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Stack;
|
import java.util.Stack;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.core.values.ArrayValue;
|
import me.topchetoeu.jscript.runtime.values.ArrayValue;
|
||||||
import me.topchetoeu.jscript.core.values.FunctionValue;
|
import me.topchetoeu.jscript.runtime.values.FunctionValue;
|
||||||
import me.topchetoeu.jscript.core.values.NativeFunction;
|
import me.topchetoeu.jscript.runtime.values.NativeFunction;
|
||||||
import me.topchetoeu.jscript.core.values.ObjectValue;
|
import me.topchetoeu.jscript.runtime.values.ObjectValue;
|
||||||
import me.topchetoeu.jscript.core.values.Values;
|
import me.topchetoeu.jscript.runtime.values.Values;
|
||||||
import me.topchetoeu.jscript.utils.interop.Arguments;
|
import me.topchetoeu.jscript.utils.interop.Arguments;
|
||||||
import me.topchetoeu.jscript.utils.interop.Expose;
|
import me.topchetoeu.jscript.utils.interop.Expose;
|
||||||
import me.topchetoeu.jscript.utils.interop.ExposeConstructor;
|
import me.topchetoeu.jscript.utils.interop.ExposeConstructor;
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
package me.topchetoeu.jscript.lib;
|
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.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.Arguments;
|
||||||
import me.topchetoeu.jscript.utils.interop.WrapperName;
|
import me.topchetoeu.jscript.utils.interop.WrapperName;
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
package me.topchetoeu.jscript.lib;
|
package me.topchetoeu.jscript.lib;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.core.Context;
|
import me.topchetoeu.jscript.runtime.Context;
|
||||||
import me.topchetoeu.jscript.core.Frame;
|
import me.topchetoeu.jscript.runtime.Frame;
|
||||||
import me.topchetoeu.jscript.core.values.CodeFunction;
|
import me.topchetoeu.jscript.runtime.exceptions.EngineException;
|
||||||
import me.topchetoeu.jscript.core.values.FunctionValue;
|
import me.topchetoeu.jscript.runtime.values.CodeFunction;
|
||||||
import me.topchetoeu.jscript.core.values.NativeFunction;
|
import me.topchetoeu.jscript.runtime.values.FunctionValue;
|
||||||
import me.topchetoeu.jscript.core.exceptions.EngineException;
|
import me.topchetoeu.jscript.runtime.values.NativeFunction;
|
||||||
import me.topchetoeu.jscript.utils.interop.WrapperName;
|
import me.topchetoeu.jscript.utils.interop.WrapperName;
|
||||||
|
|
||||||
@WrapperName("AsyncGeneratorFunction")
|
@WrapperName("AsyncGeneratorFunction")
|
||||||
|
@ -2,12 +2,12 @@ package me.topchetoeu.jscript.lib;
|
|||||||
|
|
||||||
import java.util.Map;
|
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.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.Arguments;
|
||||||
import me.topchetoeu.jscript.utils.interop.Expose;
|
import me.topchetoeu.jscript.utils.interop.Expose;
|
||||||
import me.topchetoeu.jscript.utils.interop.WrapperName;
|
import me.topchetoeu.jscript.utils.interop.WrapperName;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package me.topchetoeu.jscript.lib;
|
package me.topchetoeu.jscript.lib;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.core.values.ObjectValue;
|
import me.topchetoeu.jscript.runtime.values.ObjectValue;
|
||||||
import me.topchetoeu.jscript.core.values.Values;
|
import me.topchetoeu.jscript.runtime.values.Values;
|
||||||
import me.topchetoeu.jscript.utils.interop.Arguments;
|
import me.topchetoeu.jscript.utils.interop.Arguments;
|
||||||
import me.topchetoeu.jscript.utils.interop.Expose;
|
import me.topchetoeu.jscript.utils.interop.Expose;
|
||||||
import me.topchetoeu.jscript.utils.interop.ExposeConstructor;
|
import me.topchetoeu.jscript.utils.interop.ExposeConstructor;
|
||||||
|
@ -2,7 +2,7 @@ package me.topchetoeu.jscript.lib;
|
|||||||
|
|
||||||
import java.io.IOException;
|
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.filesystem.File;
|
||||||
import me.topchetoeu.jscript.utils.interop.Arguments;
|
import me.topchetoeu.jscript.utils.interop.Arguments;
|
||||||
import me.topchetoeu.jscript.utils.interop.Expose;
|
import me.topchetoeu.jscript.utils.interop.Expose;
|
||||||
|
@ -4,9 +4,9 @@ import java.util.ArrayList;
|
|||||||
|
|
||||||
import me.topchetoeu.jscript.common.Buffer;
|
import me.topchetoeu.jscript.common.Buffer;
|
||||||
import me.topchetoeu.jscript.compilation.parsing.Parsing;
|
import me.topchetoeu.jscript.compilation.parsing.Parsing;
|
||||||
import me.topchetoeu.jscript.core.values.ArrayValue;
|
import me.topchetoeu.jscript.runtime.exceptions.EngineException;
|
||||||
import me.topchetoeu.jscript.core.values.Values;
|
import me.topchetoeu.jscript.runtime.values.ArrayValue;
|
||||||
import me.topchetoeu.jscript.core.exceptions.EngineException;
|
import me.topchetoeu.jscript.runtime.values.Values;
|
||||||
import me.topchetoeu.jscript.utils.interop.Arguments;
|
import me.topchetoeu.jscript.utils.interop.Arguments;
|
||||||
import me.topchetoeu.jscript.utils.interop.Expose;
|
import me.topchetoeu.jscript.utils.interop.Expose;
|
||||||
import me.topchetoeu.jscript.utils.interop.ExposeTarget;
|
import me.topchetoeu.jscript.utils.interop.ExposeTarget;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package me.topchetoeu.jscript.lib;
|
package me.topchetoeu.jscript.lib;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.core.Context;
|
import me.topchetoeu.jscript.runtime.Context;
|
||||||
import me.topchetoeu.jscript.core.values.ObjectValue;
|
import me.topchetoeu.jscript.runtime.exceptions.ConvertException;
|
||||||
import me.topchetoeu.jscript.core.values.Values;
|
import me.topchetoeu.jscript.runtime.values.ObjectValue;
|
||||||
import me.topchetoeu.jscript.core.values.ObjectValue.PlaceholderProto;
|
import me.topchetoeu.jscript.runtime.values.Values;
|
||||||
import me.topchetoeu.jscript.core.exceptions.ConvertException;
|
import me.topchetoeu.jscript.runtime.values.ObjectValue.PlaceholderProto;
|
||||||
import me.topchetoeu.jscript.utils.interop.Arguments;
|
import me.topchetoeu.jscript.utils.interop.Arguments;
|
||||||
import me.topchetoeu.jscript.utils.interop.Expose;
|
import me.topchetoeu.jscript.utils.interop.Expose;
|
||||||
import me.topchetoeu.jscript.utils.interop.ExposeConstructor;
|
import me.topchetoeu.jscript.utils.interop.ExposeConstructor;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package me.topchetoeu.jscript.lib;
|
package me.topchetoeu.jscript.lib;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.core.values.ArrayValue;
|
import me.topchetoeu.jscript.runtime.values.ArrayValue;
|
||||||
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.filesystem.File;
|
||||||
import me.topchetoeu.jscript.utils.filesystem.FilesystemException;
|
import me.topchetoeu.jscript.utils.filesystem.FilesystemException;
|
||||||
import me.topchetoeu.jscript.utils.interop.Arguments;
|
import me.topchetoeu.jscript.utils.interop.Arguments;
|
||||||
|
@ -4,10 +4,10 @@ import java.io.IOException;
|
|||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Stack;
|
import java.util.Stack;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.core.Context;
|
import me.topchetoeu.jscript.runtime.Context;
|
||||||
import me.topchetoeu.jscript.core.values.ObjectValue;
|
import me.topchetoeu.jscript.runtime.exceptions.EngineException;
|
||||||
import me.topchetoeu.jscript.core.values.Values;
|
import me.topchetoeu.jscript.runtime.values.ObjectValue;
|
||||||
import me.topchetoeu.jscript.core.exceptions.EngineException;
|
import me.topchetoeu.jscript.runtime.values.Values;
|
||||||
import me.topchetoeu.jscript.utils.filesystem.ActionType;
|
import me.topchetoeu.jscript.utils.filesystem.ActionType;
|
||||||
import me.topchetoeu.jscript.utils.filesystem.EntryType;
|
import me.topchetoeu.jscript.utils.filesystem.EntryType;
|
||||||
import me.topchetoeu.jscript.utils.filesystem.ErrorReason;
|
import me.topchetoeu.jscript.utils.filesystem.ErrorReason;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package me.topchetoeu.jscript.lib;
|
package me.topchetoeu.jscript.lib;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.core.values.ArrayValue;
|
import me.topchetoeu.jscript.runtime.values.ArrayValue;
|
||||||
import me.topchetoeu.jscript.core.values.CodeFunction;
|
import me.topchetoeu.jscript.runtime.values.CodeFunction;
|
||||||
import me.topchetoeu.jscript.core.values.FunctionValue;
|
import me.topchetoeu.jscript.runtime.values.FunctionValue;
|
||||||
import me.topchetoeu.jscript.core.values.NativeFunction;
|
import me.topchetoeu.jscript.runtime.values.NativeFunction;
|
||||||
import me.topchetoeu.jscript.utils.interop.Arguments;
|
import me.topchetoeu.jscript.utils.interop.Arguments;
|
||||||
import me.topchetoeu.jscript.utils.interop.Expose;
|
import me.topchetoeu.jscript.utils.interop.Expose;
|
||||||
import me.topchetoeu.jscript.utils.interop.ExposeTarget;
|
import me.topchetoeu.jscript.utils.interop.ExposeTarget;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
package me.topchetoeu.jscript.lib;
|
package me.topchetoeu.jscript.lib;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.core.Context;
|
import me.topchetoeu.jscript.runtime.Context;
|
||||||
import me.topchetoeu.jscript.core.Frame;
|
import me.topchetoeu.jscript.runtime.Frame;
|
||||||
import me.topchetoeu.jscript.core.values.CodeFunction;
|
import me.topchetoeu.jscript.runtime.exceptions.EngineException;
|
||||||
import me.topchetoeu.jscript.core.values.FunctionValue;
|
import me.topchetoeu.jscript.runtime.values.CodeFunction;
|
||||||
import me.topchetoeu.jscript.core.values.NativeFunction;
|
import me.topchetoeu.jscript.runtime.values.FunctionValue;
|
||||||
import me.topchetoeu.jscript.core.exceptions.EngineException;
|
import me.topchetoeu.jscript.runtime.values.NativeFunction;
|
||||||
import me.topchetoeu.jscript.utils.interop.WrapperName;
|
import me.topchetoeu.jscript.utils.interop.WrapperName;
|
||||||
|
|
||||||
@WrapperName("GeneratorFunction")
|
@WrapperName("GeneratorFunction")
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package me.topchetoeu.jscript.lib;
|
package me.topchetoeu.jscript.lib;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.core.Context;
|
import me.topchetoeu.jscript.runtime.Context;
|
||||||
import me.topchetoeu.jscript.core.Frame;
|
import me.topchetoeu.jscript.runtime.Frame;
|
||||||
import me.topchetoeu.jscript.core.values.ObjectValue;
|
import me.topchetoeu.jscript.runtime.exceptions.EngineException;
|
||||||
import me.topchetoeu.jscript.core.values.Values;
|
import me.topchetoeu.jscript.runtime.values.ObjectValue;
|
||||||
import me.topchetoeu.jscript.core.exceptions.EngineException;
|
import me.topchetoeu.jscript.runtime.values.Values;
|
||||||
import me.topchetoeu.jscript.utils.interop.Arguments;
|
import me.topchetoeu.jscript.utils.interop.Arguments;
|
||||||
import me.topchetoeu.jscript.utils.interop.Expose;
|
import me.topchetoeu.jscript.utils.interop.Expose;
|
||||||
import me.topchetoeu.jscript.utils.interop.WrapperName;
|
import me.topchetoeu.jscript.utils.interop.WrapperName;
|
||||||
|
@ -2,14 +2,14 @@ package me.topchetoeu.jscript.lib;
|
|||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.core.Context;
|
import me.topchetoeu.jscript.runtime.Context;
|
||||||
import me.topchetoeu.jscript.core.Environment;
|
import me.topchetoeu.jscript.runtime.Environment;
|
||||||
import me.topchetoeu.jscript.core.EventLoop;
|
import me.topchetoeu.jscript.runtime.EventLoop;
|
||||||
import me.topchetoeu.jscript.core.Key;
|
import me.topchetoeu.jscript.runtime.Key;
|
||||||
import me.topchetoeu.jscript.core.scope.GlobalScope;
|
import me.topchetoeu.jscript.runtime.exceptions.EngineException;
|
||||||
import me.topchetoeu.jscript.core.values.FunctionValue;
|
import me.topchetoeu.jscript.runtime.scope.GlobalScope;
|
||||||
import me.topchetoeu.jscript.core.values.Values;
|
import me.topchetoeu.jscript.runtime.values.FunctionValue;
|
||||||
import me.topchetoeu.jscript.core.exceptions.EngineException;
|
import me.topchetoeu.jscript.runtime.values.Values;
|
||||||
import me.topchetoeu.jscript.utils.filesystem.Filesystem;
|
import me.topchetoeu.jscript.utils.filesystem.Filesystem;
|
||||||
import me.topchetoeu.jscript.utils.filesystem.Mode;
|
import me.topchetoeu.jscript.utils.filesystem.Mode;
|
||||||
import me.topchetoeu.jscript.utils.interop.Arguments;
|
import me.topchetoeu.jscript.utils.interop.Arguments;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package me.topchetoeu.jscript.lib;
|
package me.topchetoeu.jscript.lib;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.common.json.JSON;
|
import me.topchetoeu.jscript.common.json.JSON;
|
||||||
import me.topchetoeu.jscript.core.exceptions.EngineException;
|
import me.topchetoeu.jscript.runtime.exceptions.EngineException;
|
||||||
import me.topchetoeu.jscript.core.exceptions.SyntaxException;
|
import me.topchetoeu.jscript.runtime.exceptions.SyntaxException;
|
||||||
import me.topchetoeu.jscript.utils.interop.Arguments;
|
import me.topchetoeu.jscript.utils.interop.Arguments;
|
||||||
import me.topchetoeu.jscript.utils.interop.Expose;
|
import me.topchetoeu.jscript.utils.interop.Expose;
|
||||||
import me.topchetoeu.jscript.utils.interop.ExposeTarget;
|
import me.topchetoeu.jscript.utils.interop.ExposeTarget;
|
||||||
|
@ -4,10 +4,10 @@ import java.util.ArrayList;
|
|||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.core.Context;
|
import me.topchetoeu.jscript.runtime.Context;
|
||||||
import me.topchetoeu.jscript.core.values.ArrayValue;
|
import me.topchetoeu.jscript.runtime.values.ArrayValue;
|
||||||
import me.topchetoeu.jscript.core.values.ObjectValue;
|
import me.topchetoeu.jscript.runtime.values.ObjectValue;
|
||||||
import me.topchetoeu.jscript.core.values.Values;
|
import me.topchetoeu.jscript.runtime.values.Values;
|
||||||
import me.topchetoeu.jscript.utils.interop.Arguments;
|
import me.topchetoeu.jscript.utils.interop.Arguments;
|
||||||
import me.topchetoeu.jscript.utils.interop.Expose;
|
import me.topchetoeu.jscript.utils.interop.Expose;
|
||||||
import me.topchetoeu.jscript.utils.interop.ExposeConstructor;
|
import me.topchetoeu.jscript.utils.interop.ExposeConstructor;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package me.topchetoeu.jscript.lib;
|
package me.topchetoeu.jscript.lib;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.core.values.ObjectValue;
|
import me.topchetoeu.jscript.runtime.values.ObjectValue;
|
||||||
import me.topchetoeu.jscript.core.values.Values;
|
import me.topchetoeu.jscript.runtime.values.Values;
|
||||||
import me.topchetoeu.jscript.utils.interop.Arguments;
|
import me.topchetoeu.jscript.utils.interop.Arguments;
|
||||||
import me.topchetoeu.jscript.utils.interop.Expose;
|
import me.topchetoeu.jscript.utils.interop.Expose;
|
||||||
import me.topchetoeu.jscript.utils.interop.ExposeConstructor;
|
import me.topchetoeu.jscript.utils.interop.ExposeConstructor;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
package me.topchetoeu.jscript.lib;
|
package me.topchetoeu.jscript.lib;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.core.values.ArrayValue;
|
import me.topchetoeu.jscript.runtime.exceptions.EngineException;
|
||||||
import me.topchetoeu.jscript.core.values.FunctionValue;
|
import me.topchetoeu.jscript.runtime.values.ArrayValue;
|
||||||
import me.topchetoeu.jscript.core.values.ObjectValue;
|
import me.topchetoeu.jscript.runtime.values.FunctionValue;
|
||||||
import me.topchetoeu.jscript.core.values.Symbol;
|
import me.topchetoeu.jscript.runtime.values.ObjectValue;
|
||||||
import me.topchetoeu.jscript.core.values.Values;
|
import me.topchetoeu.jscript.runtime.values.Symbol;
|
||||||
import me.topchetoeu.jscript.core.exceptions.EngineException;
|
import me.topchetoeu.jscript.runtime.values.Values;
|
||||||
import me.topchetoeu.jscript.utils.interop.Arguments;
|
import me.topchetoeu.jscript.utils.interop.Arguments;
|
||||||
import me.topchetoeu.jscript.utils.interop.Expose;
|
import me.topchetoeu.jscript.utils.interop.Expose;
|
||||||
import me.topchetoeu.jscript.utils.interop.ExposeConstructor;
|
import me.topchetoeu.jscript.utils.interop.ExposeConstructor;
|
||||||
|
@ -4,16 +4,16 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.common.ResultRunnable;
|
import me.topchetoeu.jscript.common.ResultRunnable;
|
||||||
import me.topchetoeu.jscript.core.Context;
|
import me.topchetoeu.jscript.runtime.Context;
|
||||||
import me.topchetoeu.jscript.core.EventLoop;
|
import me.topchetoeu.jscript.runtime.EventLoop;
|
||||||
import me.topchetoeu.jscript.core.Extensions;
|
import me.topchetoeu.jscript.runtime.Extensions;
|
||||||
import me.topchetoeu.jscript.core.values.ArrayValue;
|
import me.topchetoeu.jscript.runtime.exceptions.EngineException;
|
||||||
import me.topchetoeu.jscript.core.values.FunctionValue;
|
import me.topchetoeu.jscript.runtime.exceptions.InterruptException;
|
||||||
import me.topchetoeu.jscript.core.values.NativeFunction;
|
import me.topchetoeu.jscript.runtime.values.ArrayValue;
|
||||||
import me.topchetoeu.jscript.core.values.ObjectValue;
|
import me.topchetoeu.jscript.runtime.values.FunctionValue;
|
||||||
import me.topchetoeu.jscript.core.values.Values;
|
import me.topchetoeu.jscript.runtime.values.NativeFunction;
|
||||||
import me.topchetoeu.jscript.core.exceptions.EngineException;
|
import me.topchetoeu.jscript.runtime.values.ObjectValue;
|
||||||
import me.topchetoeu.jscript.core.exceptions.InterruptException;
|
import me.topchetoeu.jscript.runtime.values.Values;
|
||||||
import me.topchetoeu.jscript.utils.interop.Arguments;
|
import me.topchetoeu.jscript.utils.interop.Arguments;
|
||||||
import me.topchetoeu.jscript.utils.interop.Expose;
|
import me.topchetoeu.jscript.utils.interop.Expose;
|
||||||
import me.topchetoeu.jscript.utils.interop.ExposeConstructor;
|
import me.topchetoeu.jscript.utils.interop.ExposeConstructor;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package me.topchetoeu.jscript.lib;
|
package me.topchetoeu.jscript.lib;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.core.values.ObjectValue;
|
import me.topchetoeu.jscript.runtime.values.ObjectValue;
|
||||||
import me.topchetoeu.jscript.core.values.ObjectValue.PlaceholderProto;
|
import me.topchetoeu.jscript.runtime.values.ObjectValue.PlaceholderProto;
|
||||||
import me.topchetoeu.jscript.utils.interop.Arguments;
|
import me.topchetoeu.jscript.utils.interop.Arguments;
|
||||||
import me.topchetoeu.jscript.utils.interop.ExposeConstructor;
|
import me.topchetoeu.jscript.utils.interop.ExposeConstructor;
|
||||||
import me.topchetoeu.jscript.utils.interop.ExposeField;
|
import me.topchetoeu.jscript.utils.interop.ExposeField;
|
||||||
|
@ -4,12 +4,12 @@ import java.util.ArrayList;
|
|||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.core.Context;
|
import me.topchetoeu.jscript.runtime.Context;
|
||||||
import me.topchetoeu.jscript.core.values.ArrayValue;
|
import me.topchetoeu.jscript.runtime.values.ArrayValue;
|
||||||
import me.topchetoeu.jscript.core.values.FunctionValue;
|
import me.topchetoeu.jscript.runtime.values.FunctionValue;
|
||||||
import me.topchetoeu.jscript.core.values.NativeWrapper;
|
import me.topchetoeu.jscript.runtime.values.NativeWrapper;
|
||||||
import me.topchetoeu.jscript.core.values.ObjectValue;
|
import me.topchetoeu.jscript.runtime.values.ObjectValue;
|
||||||
import me.topchetoeu.jscript.core.values.Values;
|
import me.topchetoeu.jscript.runtime.values.Values;
|
||||||
import me.topchetoeu.jscript.utils.interop.Arguments;
|
import me.topchetoeu.jscript.utils.interop.Arguments;
|
||||||
import me.topchetoeu.jscript.utils.interop.Expose;
|
import me.topchetoeu.jscript.utils.interop.Expose;
|
||||||
import me.topchetoeu.jscript.utils.interop.ExposeConstructor;
|
import me.topchetoeu.jscript.utils.interop.ExposeConstructor;
|
||||||
|
@ -4,10 +4,10 @@ import java.util.ArrayList;
|
|||||||
import java.util.LinkedHashSet;
|
import java.util.LinkedHashSet;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.core.Context;
|
import me.topchetoeu.jscript.runtime.Context;
|
||||||
import me.topchetoeu.jscript.core.values.ArrayValue;
|
import me.topchetoeu.jscript.runtime.values.ArrayValue;
|
||||||
import me.topchetoeu.jscript.core.values.ObjectValue;
|
import me.topchetoeu.jscript.runtime.values.ObjectValue;
|
||||||
import me.topchetoeu.jscript.core.values.Values;
|
import me.topchetoeu.jscript.runtime.values.Values;
|
||||||
import me.topchetoeu.jscript.utils.interop.Arguments;
|
import me.topchetoeu.jscript.utils.interop.Arguments;
|
||||||
import me.topchetoeu.jscript.utils.interop.Expose;
|
import me.topchetoeu.jscript.utils.interop.Expose;
|
||||||
import me.topchetoeu.jscript.utils.interop.ExposeConstructor;
|
import me.topchetoeu.jscript.utils.interop.ExposeConstructor;
|
||||||
|
@ -2,13 +2,13 @@ package me.topchetoeu.jscript.lib;
|
|||||||
|
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.core.Environment;
|
import me.topchetoeu.jscript.runtime.Environment;
|
||||||
import me.topchetoeu.jscript.core.values.ArrayValue;
|
import me.topchetoeu.jscript.runtime.exceptions.EngineException;
|
||||||
import me.topchetoeu.jscript.core.values.FunctionValue;
|
import me.topchetoeu.jscript.runtime.values.ArrayValue;
|
||||||
import me.topchetoeu.jscript.core.values.ObjectValue;
|
import me.topchetoeu.jscript.runtime.values.FunctionValue;
|
||||||
import me.topchetoeu.jscript.core.values.Symbol;
|
import me.topchetoeu.jscript.runtime.values.ObjectValue;
|
||||||
import me.topchetoeu.jscript.core.values.Values;
|
import me.topchetoeu.jscript.runtime.values.Symbol;
|
||||||
import me.topchetoeu.jscript.core.exceptions.EngineException;
|
import me.topchetoeu.jscript.runtime.values.Values;
|
||||||
import me.topchetoeu.jscript.utils.interop.Arguments;
|
import me.topchetoeu.jscript.utils.interop.Arguments;
|
||||||
import me.topchetoeu.jscript.utils.interop.Expose;
|
import me.topchetoeu.jscript.utils.interop.Expose;
|
||||||
import me.topchetoeu.jscript.utils.interop.ExposeConstructor;
|
import me.topchetoeu.jscript.utils.interop.ExposeConstructor;
|
||||||
|
@ -3,10 +3,10 @@ package me.topchetoeu.jscript.lib;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.core.values.ObjectValue;
|
import me.topchetoeu.jscript.runtime.exceptions.EngineException;
|
||||||
import me.topchetoeu.jscript.core.values.Symbol;
|
import me.topchetoeu.jscript.runtime.values.ObjectValue;
|
||||||
import me.topchetoeu.jscript.core.values.Values;
|
import me.topchetoeu.jscript.runtime.values.Symbol;
|
||||||
import me.topchetoeu.jscript.core.exceptions.EngineException;
|
import me.topchetoeu.jscript.runtime.values.Values;
|
||||||
import me.topchetoeu.jscript.utils.interop.Arguments;
|
import me.topchetoeu.jscript.utils.interop.Arguments;
|
||||||
import me.topchetoeu.jscript.utils.interop.Expose;
|
import me.topchetoeu.jscript.utils.interop.Expose;
|
||||||
import me.topchetoeu.jscript.utils.interop.ExposeConstructor;
|
import me.topchetoeu.jscript.utils.interop.ExposeConstructor;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package me.topchetoeu.jscript.lib;
|
package me.topchetoeu.jscript.lib;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.core.values.ObjectValue;
|
import me.topchetoeu.jscript.runtime.values.ObjectValue;
|
||||||
import me.topchetoeu.jscript.core.values.ObjectValue.PlaceholderProto;
|
import me.topchetoeu.jscript.runtime.values.ObjectValue.PlaceholderProto;
|
||||||
import me.topchetoeu.jscript.utils.interop.Arguments;
|
import me.topchetoeu.jscript.utils.interop.Arguments;
|
||||||
import me.topchetoeu.jscript.utils.interop.ExposeConstructor;
|
import me.topchetoeu.jscript.utils.interop.ExposeConstructor;
|
||||||
import me.topchetoeu.jscript.utils.interop.ExposeField;
|
import me.topchetoeu.jscript.utils.interop.ExposeField;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package me.topchetoeu.jscript.lib;
|
package me.topchetoeu.jscript.lib;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.core.values.ObjectValue;
|
import me.topchetoeu.jscript.runtime.values.ObjectValue;
|
||||||
import me.topchetoeu.jscript.core.values.ObjectValue.PlaceholderProto;
|
import me.topchetoeu.jscript.runtime.values.ObjectValue.PlaceholderProto;
|
||||||
import me.topchetoeu.jscript.utils.interop.Arguments;
|
import me.topchetoeu.jscript.utils.interop.Arguments;
|
||||||
import me.topchetoeu.jscript.utils.interop.ExposeConstructor;
|
import me.topchetoeu.jscript.utils.interop.ExposeConstructor;
|
||||||
import me.topchetoeu.jscript.utils.interop.ExposeField;
|
import me.topchetoeu.jscript.utils.interop.ExposeField;
|
||||||
|
@ -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.Filename;
|
||||||
import me.topchetoeu.jscript.common.FunctionBody;
|
import me.topchetoeu.jscript.common.FunctionBody;
|
||||||
import me.topchetoeu.jscript.core.exceptions.EngineException;
|
import me.topchetoeu.jscript.runtime.exceptions.EngineException;
|
||||||
import me.topchetoeu.jscript.core.scope.ValueVariable;
|
import me.topchetoeu.jscript.runtime.scope.ValueVariable;
|
||||||
import me.topchetoeu.jscript.core.values.CodeFunction;
|
import me.topchetoeu.jscript.runtime.values.CodeFunction;
|
||||||
|
|
||||||
public interface Compiler {
|
public interface Compiler {
|
||||||
public Key<Compiler> KEY = new Key<>();
|
public Key<Compiler> KEY = new Key<>();
|
@ -1,14 +1,14 @@
|
|||||||
package me.topchetoeu.jscript.core;
|
package me.topchetoeu.jscript.runtime;
|
||||||
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.common.Filename;
|
import me.topchetoeu.jscript.common.Filename;
|
||||||
import me.topchetoeu.jscript.core.debug.DebugContext;
|
import me.topchetoeu.jscript.runtime.debug.DebugContext;
|
||||||
import me.topchetoeu.jscript.core.values.CodeFunction;
|
import me.topchetoeu.jscript.runtime.exceptions.EngineException;
|
||||||
import me.topchetoeu.jscript.core.values.FunctionValue;
|
import me.topchetoeu.jscript.runtime.scope.ValueVariable;
|
||||||
import me.topchetoeu.jscript.core.exceptions.EngineException;
|
import me.topchetoeu.jscript.runtime.values.CodeFunction;
|
||||||
import me.topchetoeu.jscript.core.scope.ValueVariable;
|
import me.topchetoeu.jscript.runtime.values.FunctionValue;
|
||||||
|
|
||||||
public class Context implements Extensions {
|
public class Context implements Extensions {
|
||||||
public static final Context NULL = new Context();
|
public static final Context NULL = new Context();
|
@ -1,12 +1,12 @@
|
|||||||
package me.topchetoeu.jscript.core;
|
package me.topchetoeu.jscript.runtime;
|
||||||
|
|
||||||
import java.util.concurrent.PriorityBlockingQueue;
|
import java.util.concurrent.PriorityBlockingQueue;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.common.Filename;
|
import me.topchetoeu.jscript.common.Filename;
|
||||||
import me.topchetoeu.jscript.common.ResultRunnable;
|
import me.topchetoeu.jscript.common.ResultRunnable;
|
||||||
import me.topchetoeu.jscript.common.events.DataNotifier;
|
import me.topchetoeu.jscript.common.events.DataNotifier;
|
||||||
import me.topchetoeu.jscript.core.exceptions.InterruptException;
|
import me.topchetoeu.jscript.runtime.exceptions.InterruptException;
|
||||||
import me.topchetoeu.jscript.core.values.FunctionValue;
|
import me.topchetoeu.jscript.runtime.values.FunctionValue;
|
||||||
|
|
||||||
public class Engine implements EventLoop {
|
public class Engine implements EventLoop {
|
||||||
private static class Task<T> implements Comparable<Task<?>> {
|
private static class Task<T> implements Comparable<Task<?>> {
|
@ -1,12 +1,12 @@
|
|||||||
package me.topchetoeu.jscript.core;
|
package me.topchetoeu.jscript.runtime;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.core.scope.GlobalScope;
|
import me.topchetoeu.jscript.runtime.exceptions.EngineException;
|
||||||
import me.topchetoeu.jscript.core.values.FunctionValue;
|
import me.topchetoeu.jscript.runtime.scope.GlobalScope;
|
||||||
import me.topchetoeu.jscript.core.values.NativeFunction;
|
import me.topchetoeu.jscript.runtime.values.FunctionValue;
|
||||||
import me.topchetoeu.jscript.core.values.ObjectValue;
|
import me.topchetoeu.jscript.runtime.values.NativeFunction;
|
||||||
import me.topchetoeu.jscript.core.exceptions.EngineException;
|
import me.topchetoeu.jscript.runtime.values.ObjectValue;
|
||||||
import me.topchetoeu.jscript.utils.interop.NativeWrapperProvider;
|
import me.topchetoeu.jscript.utils.interop.NativeWrapperProvider;
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
@ -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.ResultRunnable;
|
||||||
import me.topchetoeu.jscript.common.events.DataNotifier;
|
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 interface EventLoop {
|
||||||
public static final Key<EventLoop> KEY = new Key<>();
|
public static final Key<EventLoop> KEY = new Key<>();
|
@ -1,4 +1,4 @@
|
|||||||
package me.topchetoeu.jscript.core;
|
package me.topchetoeu.jscript.runtime;
|
||||||
|
|
||||||
public interface Extensions {
|
public interface Extensions {
|
||||||
<T> T get(Key<T> key);
|
<T> T get(Key<T> key);
|
@ -1,19 +1,19 @@
|
|||||||
package me.topchetoeu.jscript.core;
|
package me.topchetoeu.jscript.runtime;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Stack;
|
import java.util.Stack;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.common.Instruction;
|
import me.topchetoeu.jscript.common.Instruction;
|
||||||
import me.topchetoeu.jscript.core.debug.DebugContext;
|
import me.topchetoeu.jscript.runtime.debug.DebugContext;
|
||||||
import me.topchetoeu.jscript.core.scope.LocalScope;
|
import me.topchetoeu.jscript.runtime.exceptions.EngineException;
|
||||||
import me.topchetoeu.jscript.core.scope.ValueVariable;
|
import me.topchetoeu.jscript.runtime.exceptions.InterruptException;
|
||||||
import me.topchetoeu.jscript.core.values.ArrayValue;
|
import me.topchetoeu.jscript.runtime.scope.LocalScope;
|
||||||
import me.topchetoeu.jscript.core.values.CodeFunction;
|
import me.topchetoeu.jscript.runtime.scope.ValueVariable;
|
||||||
import me.topchetoeu.jscript.core.values.ObjectValue;
|
import me.topchetoeu.jscript.runtime.values.ArrayValue;
|
||||||
import me.topchetoeu.jscript.core.values.ScopeValue;
|
import me.topchetoeu.jscript.runtime.values.CodeFunction;
|
||||||
import me.topchetoeu.jscript.core.values.Values;
|
import me.topchetoeu.jscript.runtime.values.ObjectValue;
|
||||||
import me.topchetoeu.jscript.core.exceptions.EngineException;
|
import me.topchetoeu.jscript.runtime.values.ScopeValue;
|
||||||
import me.topchetoeu.jscript.core.exceptions.InterruptException;
|
import me.topchetoeu.jscript.runtime.values.Values;
|
||||||
|
|
||||||
public class Frame {
|
public class Frame {
|
||||||
public static enum TryState {
|
public static enum TryState {
|
@ -1,17 +1,17 @@
|
|||||||
package me.topchetoeu.jscript.core;
|
package me.topchetoeu.jscript.runtime;
|
||||||
|
|
||||||
import java.util.Collections;
|
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.Instruction;
|
||||||
import me.topchetoeu.jscript.common.Operation;
|
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 {
|
public class InstructionRunner {
|
||||||
private static Object execReturn(Context ctx, Instruction instr, Frame frame) {
|
private static Object execReturn(Context ctx, Instruction instr, Frame frame) {
|
5
src/java/me/topchetoeu/jscript/runtime/Key.java
Normal file
5
src/java/me/topchetoeu/jscript/runtime/Key.java
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
package me.topchetoeu.jscript.runtime;
|
||||||
|
|
||||||
|
public class Key<T> {
|
||||||
|
|
||||||
|
}
|
@ -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.runtime.values.FunctionValue;
|
||||||
import me.topchetoeu.jscript.core.values.ObjectValue;
|
import me.topchetoeu.jscript.runtime.values.ObjectValue;
|
||||||
|
|
||||||
public interface WrapperProvider {
|
public interface WrapperProvider {
|
||||||
public ObjectValue getProto(Class<?> obj);
|
public ObjectValue getProto(Class<?> obj);
|
@ -1,4 +1,4 @@
|
|||||||
package me.topchetoeu.jscript.core.debug;
|
package me.topchetoeu.jscript.runtime.debug;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
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.Instruction;
|
||||||
import me.topchetoeu.jscript.common.Location;
|
import me.topchetoeu.jscript.common.Location;
|
||||||
import me.topchetoeu.jscript.common.mapping.FunctionMap;
|
import me.topchetoeu.jscript.common.mapping.FunctionMap;
|
||||||
import me.topchetoeu.jscript.core.Context;
|
import me.topchetoeu.jscript.runtime.Context;
|
||||||
import me.topchetoeu.jscript.core.Extensions;
|
import me.topchetoeu.jscript.runtime.Extensions;
|
||||||
import me.topchetoeu.jscript.core.Frame;
|
import me.topchetoeu.jscript.runtime.Frame;
|
||||||
import me.topchetoeu.jscript.core.Key;
|
import me.topchetoeu.jscript.runtime.Key;
|
||||||
import me.topchetoeu.jscript.core.values.CodeFunction;
|
import me.topchetoeu.jscript.runtime.exceptions.EngineException;
|
||||||
import me.topchetoeu.jscript.core.values.FunctionValue;
|
import me.topchetoeu.jscript.runtime.values.CodeFunction;
|
||||||
import me.topchetoeu.jscript.core.exceptions.EngineException;
|
import me.topchetoeu.jscript.runtime.values.FunctionValue;
|
||||||
|
|
||||||
public class DebugContext {
|
public class DebugContext {
|
||||||
public static final Key<DebugContext> KEY = new Key<>();
|
public static final Key<DebugContext> KEY = new Key<>();
|
@ -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.Filename;
|
||||||
import me.topchetoeu.jscript.common.FunctionBody;
|
import me.topchetoeu.jscript.common.FunctionBody;
|
||||||
import me.topchetoeu.jscript.common.Instruction;
|
import me.topchetoeu.jscript.common.Instruction;
|
||||||
import me.topchetoeu.jscript.common.mapping.FunctionMap;
|
import me.topchetoeu.jscript.common.mapping.FunctionMap;
|
||||||
import me.topchetoeu.jscript.core.Context;
|
import me.topchetoeu.jscript.runtime.Context;
|
||||||
import me.topchetoeu.jscript.core.Frame;
|
import me.topchetoeu.jscript.runtime.Frame;
|
||||||
import me.topchetoeu.jscript.core.exceptions.EngineException;
|
import me.topchetoeu.jscript.runtime.exceptions.EngineException;
|
||||||
|
|
||||||
public interface DebugHandler {
|
public interface DebugHandler {
|
||||||
/**
|
/**
|
@ -1,4 +1,4 @@
|
|||||||
package me.topchetoeu.jscript.core.exceptions;
|
package me.topchetoeu.jscript.runtime.exceptions;
|
||||||
|
|
||||||
public class ConvertException extends RuntimeException {
|
public class ConvertException extends RuntimeException {
|
||||||
public final String source, target;
|
public final String source, target;
|
@ -1,14 +1,14 @@
|
|||||||
package me.topchetoeu.jscript.core.exceptions;
|
package me.topchetoeu.jscript.runtime.exceptions;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.common.Location;
|
import me.topchetoeu.jscript.common.Location;
|
||||||
import me.topchetoeu.jscript.core.Context;
|
import me.topchetoeu.jscript.runtime.Context;
|
||||||
import me.topchetoeu.jscript.core.Environment;
|
import me.topchetoeu.jscript.runtime.Environment;
|
||||||
import me.topchetoeu.jscript.core.values.ObjectValue;
|
import me.topchetoeu.jscript.runtime.values.ObjectValue;
|
||||||
import me.topchetoeu.jscript.core.values.Values;
|
import me.topchetoeu.jscript.runtime.values.Values;
|
||||||
import me.topchetoeu.jscript.core.values.ObjectValue.PlaceholderProto;
|
import me.topchetoeu.jscript.runtime.values.ObjectValue.PlaceholderProto;
|
||||||
|
|
||||||
public class EngineException extends RuntimeException {
|
public class EngineException extends RuntimeException {
|
||||||
public static class StackElement {
|
public static class StackElement {
|
@ -1,4 +1,4 @@
|
|||||||
package me.topchetoeu.jscript.core.exceptions;
|
package me.topchetoeu.jscript.runtime.exceptions;
|
||||||
|
|
||||||
public class InterruptException extends RuntimeException {
|
public class InterruptException extends RuntimeException {
|
||||||
public InterruptException() { }
|
public InterruptException() { }
|
@ -1,4 +1,4 @@
|
|||||||
package me.topchetoeu.jscript.core.exceptions;
|
package me.topchetoeu.jscript.runtime.exceptions;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.common.Location;
|
import me.topchetoeu.jscript.common.Location;
|
||||||
|
|
@ -1,14 +1,14 @@
|
|||||||
package me.topchetoeu.jscript.core.scope;
|
package me.topchetoeu.jscript.runtime.scope;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.core.Context;
|
import me.topchetoeu.jscript.runtime.Context;
|
||||||
import me.topchetoeu.jscript.core.values.FunctionValue;
|
import me.topchetoeu.jscript.runtime.exceptions.EngineException;
|
||||||
import me.topchetoeu.jscript.core.values.NativeFunction;
|
import me.topchetoeu.jscript.runtime.values.FunctionValue;
|
||||||
import me.topchetoeu.jscript.core.values.ObjectValue;
|
import me.topchetoeu.jscript.runtime.values.NativeFunction;
|
||||||
import me.topchetoeu.jscript.core.values.Values;
|
import me.topchetoeu.jscript.runtime.values.ObjectValue;
|
||||||
import me.topchetoeu.jscript.core.exceptions.EngineException;
|
import me.topchetoeu.jscript.runtime.values.Values;
|
||||||
|
|
||||||
public class GlobalScope {
|
public class GlobalScope {
|
||||||
public final ObjectValue obj;
|
public final ObjectValue obj;
|
@ -1,4 +1,4 @@
|
|||||||
package me.topchetoeu.jscript.core.scope;
|
package me.topchetoeu.jscript.runtime.scope;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
@ -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.runtime.Context;
|
||||||
import me.topchetoeu.jscript.core.values.Values;
|
import me.topchetoeu.jscript.runtime.values.Values;
|
||||||
|
|
||||||
public class ValueVariable implements Variable {
|
public class ValueVariable implements Variable {
|
||||||
public boolean readonly;
|
public boolean readonly;
|
@ -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 {
|
public interface Variable {
|
||||||
Object get(Context ctx);
|
Object get(Context ctx);
|
@ -1,4 +1,4 @@
|
|||||||
package me.topchetoeu.jscript.core.values;
|
package me.topchetoeu.jscript.runtime.values;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
@ -6,7 +6,7 @@ import java.util.Comparator;
|
|||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.core.Context;
|
import me.topchetoeu.jscript.runtime.Context;
|
||||||
|
|
||||||
// TODO: Make methods generic
|
// TODO: Make methods generic
|
||||||
public class ArrayValue extends ObjectValue implements Iterable<Object> {
|
public class ArrayValue extends ObjectValue implements Iterable<Object> {
|
@ -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.common.FunctionBody;
|
||||||
import me.topchetoeu.jscript.core.Context;
|
import me.topchetoeu.jscript.runtime.Context;
|
||||||
import me.topchetoeu.jscript.core.Environment;
|
import me.topchetoeu.jscript.runtime.Environment;
|
||||||
import me.topchetoeu.jscript.core.Frame;
|
import me.topchetoeu.jscript.runtime.Frame;
|
||||||
import me.topchetoeu.jscript.core.scope.ValueVariable;
|
import me.topchetoeu.jscript.runtime.scope.ValueVariable;
|
||||||
|
|
||||||
public class CodeFunction extends FunctionValue {
|
public class CodeFunction extends FunctionValue {
|
||||||
public final FunctionBody body;
|
public final FunctionBody body;
|
@ -1,4 +1,4 @@
|
|||||||
package me.topchetoeu.jscript.core.values;
|
package me.topchetoeu.jscript.runtime.values;
|
||||||
|
|
||||||
public enum ConvertHint {
|
public enum ConvertHint {
|
||||||
TOSTRING,
|
TOSTRING,
|
@ -1,8 +1,8 @@
|
|||||||
package me.topchetoeu.jscript.core.values;
|
package me.topchetoeu.jscript.runtime.values;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.core.Context;
|
import me.topchetoeu.jscript.runtime.Context;
|
||||||
|
|
||||||
public abstract class FunctionValue extends ObjectValue {
|
public abstract class FunctionValue extends ObjectValue {
|
||||||
public String name = "";
|
public String name = "";
|
@ -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;
|
import me.topchetoeu.jscript.utils.interop.Arguments;
|
||||||
|
|
||||||
public class NativeFunction extends FunctionValue {
|
public class NativeFunction extends FunctionValue {
|
@ -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 {
|
public class NativeWrapper extends ObjectValue {
|
||||||
private static final Object NATIVE_PROTO = new Object();
|
private static final Object NATIVE_PROTO = new Object();
|
@ -1,4 +1,4 @@
|
|||||||
package me.topchetoeu.jscript.core.values;
|
package me.topchetoeu.jscript.runtime.values;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
@ -6,8 +6,8 @@ import java.util.LinkedHashSet;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.core.Context;
|
import me.topchetoeu.jscript.runtime.Context;
|
||||||
import me.topchetoeu.jscript.core.Environment;
|
import me.topchetoeu.jscript.runtime.Environment;
|
||||||
|
|
||||||
public class ObjectValue {
|
public class ObjectValue {
|
||||||
public static enum PlaceholderProto {
|
public static enum PlaceholderProto {
|
@ -1,10 +1,10 @@
|
|||||||
package me.topchetoeu.jscript.core.values;
|
package me.topchetoeu.jscript.runtime.values;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.core.Context;
|
import me.topchetoeu.jscript.runtime.Context;
|
||||||
import me.topchetoeu.jscript.core.scope.ValueVariable;
|
import me.topchetoeu.jscript.runtime.scope.ValueVariable;
|
||||||
|
|
||||||
public class ScopeValue extends ObjectValue {
|
public class ScopeValue extends ObjectValue {
|
||||||
public final ValueVariable[] variables;
|
public final ValueVariable[] variables;
|
@ -1,4 +1,4 @@
|
|||||||
package me.topchetoeu.jscript.core.values;
|
package me.topchetoeu.jscript.runtime.values;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package me.topchetoeu.jscript.core.values;
|
package me.topchetoeu.jscript.runtime.values;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.PrintStream;
|
import java.io.PrintStream;
|
||||||
@ -13,13 +13,13 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.common.Operation;
|
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.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 class Values {
|
||||||
public static enum CompareResult {
|
public static enum CompareResult {
|
@ -4,9 +4,9 @@ import me.topchetoeu.jscript.common.Filename;
|
|||||||
import me.topchetoeu.jscript.common.FunctionBody;
|
import me.topchetoeu.jscript.common.FunctionBody;
|
||||||
import me.topchetoeu.jscript.compilation.CompileResult;
|
import me.topchetoeu.jscript.compilation.CompileResult;
|
||||||
import me.topchetoeu.jscript.compilation.parsing.Parsing;
|
import me.topchetoeu.jscript.compilation.parsing.Parsing;
|
||||||
import me.topchetoeu.jscript.core.Compiler;
|
import me.topchetoeu.jscript.runtime.Compiler;
|
||||||
import me.topchetoeu.jscript.core.Extensions;
|
import me.topchetoeu.jscript.runtime.Extensions;
|
||||||
import me.topchetoeu.jscript.core.debug.DebugContext;
|
import me.topchetoeu.jscript.runtime.debug.DebugContext;
|
||||||
|
|
||||||
public class JSCompiler implements Compiler {
|
public class JSCompiler implements Compiler {
|
||||||
public final Extensions ext;
|
public final Extensions ext;
|
||||||
|
@ -8,18 +8,18 @@ import java.nio.file.Path;
|
|||||||
import me.topchetoeu.jscript.common.Filename;
|
import me.topchetoeu.jscript.common.Filename;
|
||||||
import me.topchetoeu.jscript.common.Metadata;
|
import me.topchetoeu.jscript.common.Metadata;
|
||||||
import me.topchetoeu.jscript.common.Reading;
|
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.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.DebugServer;
|
||||||
import me.topchetoeu.jscript.utils.debug.SimpleDebugger;
|
import me.topchetoeu.jscript.utils.debug.SimpleDebugger;
|
||||||
import me.topchetoeu.jscript.utils.filesystem.Filesystem;
|
import me.topchetoeu.jscript.utils.filesystem.Filesystem;
|
||||||
|
@ -15,8 +15,8 @@ import me.topchetoeu.jscript.common.events.Notifier;
|
|||||||
import me.topchetoeu.jscript.common.json.JSON;
|
import me.topchetoeu.jscript.common.json.JSON;
|
||||||
import me.topchetoeu.jscript.common.json.JSONList;
|
import me.topchetoeu.jscript.common.json.JSONList;
|
||||||
import me.topchetoeu.jscript.common.json.JSONMap;
|
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.utils.debug.WebSocketMessage.Type;
|
||||||
import me.topchetoeu.jscript.core.exceptions.SyntaxException;
|
|
||||||
|
|
||||||
public class DebugServer {
|
public class DebugServer {
|
||||||
public static String browserDisplayName = Metadata.name() + "/" + Metadata.version();
|
public static String browserDisplayName = Metadata.name() + "/" + Metadata.version();
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
package me.topchetoeu.jscript.utils.debug;
|
package me.topchetoeu.jscript.utils.debug;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.core.debug.DebugHandler;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import me.topchetoeu.jscript.runtime.debug.DebugHandler;
|
||||||
|
|
||||||
public interface Debugger extends DebugHandler {
|
public interface Debugger extends DebugHandler {
|
||||||
void close();
|
void close();
|
||||||
|
|
||||||
|
@ -23,19 +23,19 @@ import me.topchetoeu.jscript.common.json.JSONList;
|
|||||||
import me.topchetoeu.jscript.common.json.JSONMap;
|
import me.topchetoeu.jscript.common.json.JSONMap;
|
||||||
import me.topchetoeu.jscript.common.mapping.FunctionMap;
|
import me.topchetoeu.jscript.common.mapping.FunctionMap;
|
||||||
import me.topchetoeu.jscript.compilation.parsing.Parsing;
|
import me.topchetoeu.jscript.compilation.parsing.Parsing;
|
||||||
import me.topchetoeu.jscript.core.Context;
|
import me.topchetoeu.jscript.runtime.Context;
|
||||||
import me.topchetoeu.jscript.core.Engine;
|
import me.topchetoeu.jscript.runtime.Engine;
|
||||||
import me.topchetoeu.jscript.core.Environment;
|
import me.topchetoeu.jscript.runtime.Environment;
|
||||||
import me.topchetoeu.jscript.core.EventLoop;
|
import me.topchetoeu.jscript.runtime.EventLoop;
|
||||||
import me.topchetoeu.jscript.core.Frame;
|
import me.topchetoeu.jscript.runtime.Frame;
|
||||||
import me.topchetoeu.jscript.core.debug.DebugContext;
|
import me.topchetoeu.jscript.runtime.debug.DebugContext;
|
||||||
import me.topchetoeu.jscript.core.scope.GlobalScope;
|
import me.topchetoeu.jscript.runtime.exceptions.EngineException;
|
||||||
import me.topchetoeu.jscript.core.values.ArrayValue;
|
import me.topchetoeu.jscript.runtime.scope.GlobalScope;
|
||||||
import me.topchetoeu.jscript.core.values.FunctionValue;
|
import me.topchetoeu.jscript.runtime.values.ArrayValue;
|
||||||
import me.topchetoeu.jscript.core.values.ObjectValue;
|
import me.topchetoeu.jscript.runtime.values.FunctionValue;
|
||||||
import me.topchetoeu.jscript.core.values.Symbol;
|
import me.topchetoeu.jscript.runtime.values.ObjectValue;
|
||||||
import me.topchetoeu.jscript.core.values.Values;
|
import me.topchetoeu.jscript.runtime.values.Symbol;
|
||||||
import me.topchetoeu.jscript.core.exceptions.EngineException;
|
import me.topchetoeu.jscript.runtime.values.Values;
|
||||||
|
|
||||||
// very simple indeed
|
// very simple indeed
|
||||||
public class SimpleDebugger implements Debugger {
|
public class SimpleDebugger implements Debugger {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package me.topchetoeu.jscript.utils.filesystem;
|
package me.topchetoeu.jscript.utils.filesystem;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.core.Extensions;
|
import me.topchetoeu.jscript.runtime.Extensions;
|
||||||
import me.topchetoeu.jscript.core.Key;
|
import me.topchetoeu.jscript.runtime.Key;
|
||||||
|
|
||||||
public interface Filesystem {
|
public interface Filesystem {
|
||||||
public static final Key<Filesystem> KEY = new Key<>();
|
public static final Key<Filesystem> KEY = new Key<>();
|
||||||
|
@ -2,8 +2,8 @@ package me.topchetoeu.jscript.utils.filesystem;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.core.values.Values;
|
import me.topchetoeu.jscript.runtime.exceptions.EngineException;
|
||||||
import me.topchetoeu.jscript.core.exceptions.EngineException;
|
import me.topchetoeu.jscript.runtime.values.Values;
|
||||||
|
|
||||||
public class FilesystemException extends RuntimeException {
|
public class FilesystemException extends RuntimeException {
|
||||||
public final ErrorReason reason;
|
public final ErrorReason reason;
|
||||||
|
@ -2,9 +2,9 @@ package me.topchetoeu.jscript.utils.interop;
|
|||||||
|
|
||||||
import java.lang.reflect.Array;
|
import java.lang.reflect.Array;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.core.Context;
|
import me.topchetoeu.jscript.runtime.Context;
|
||||||
import me.topchetoeu.jscript.core.values.NativeWrapper;
|
import me.topchetoeu.jscript.runtime.values.NativeWrapper;
|
||||||
import me.topchetoeu.jscript.core.values.Values;
|
import me.topchetoeu.jscript.runtime.values.Values;
|
||||||
|
|
||||||
public class Arguments {
|
public class Arguments {
|
||||||
public final Object self;
|
public final Object self;
|
||||||
|
@ -10,16 +10,16 @@ import java.util.HashSet;
|
|||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.common.Location;
|
import me.topchetoeu.jscript.common.Location;
|
||||||
import me.topchetoeu.jscript.core.Context;
|
import me.topchetoeu.jscript.runtime.Context;
|
||||||
import me.topchetoeu.jscript.core.Environment;
|
import me.topchetoeu.jscript.runtime.Environment;
|
||||||
import me.topchetoeu.jscript.core.WrapperProvider;
|
import me.topchetoeu.jscript.runtime.WrapperProvider;
|
||||||
import me.topchetoeu.jscript.core.values.FunctionValue;
|
import me.topchetoeu.jscript.runtime.exceptions.EngineException;
|
||||||
import me.topchetoeu.jscript.core.values.NativeFunction;
|
import me.topchetoeu.jscript.runtime.exceptions.InterruptException;
|
||||||
import me.topchetoeu.jscript.core.values.ObjectValue;
|
import me.topchetoeu.jscript.runtime.values.FunctionValue;
|
||||||
import me.topchetoeu.jscript.core.values.Symbol;
|
import me.topchetoeu.jscript.runtime.values.NativeFunction;
|
||||||
import me.topchetoeu.jscript.core.values.Values;
|
import me.topchetoeu.jscript.runtime.values.ObjectValue;
|
||||||
import me.topchetoeu.jscript.core.exceptions.EngineException;
|
import me.topchetoeu.jscript.runtime.values.Symbol;
|
||||||
import me.topchetoeu.jscript.core.exceptions.InterruptException;
|
import me.topchetoeu.jscript.runtime.values.Values;
|
||||||
|
|
||||||
public class NativeWrapperProvider implements WrapperProvider {
|
public class NativeWrapperProvider implements WrapperProvider {
|
||||||
private final HashMap<Class<?>, FunctionValue> constructors = new HashMap<>();
|
private final HashMap<Class<?>, FunctionValue> constructors = new HashMap<>();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package me.topchetoeu.jscript.utils.modules;
|
package me.topchetoeu.jscript.utils.modules;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.core.Context;
|
import me.topchetoeu.jscript.runtime.Context;
|
||||||
|
|
||||||
public abstract class Module {
|
public abstract class Module {
|
||||||
private Object value;
|
private Object value;
|
||||||
|
@ -3,9 +3,9 @@ package me.topchetoeu.jscript.utils.modules;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.common.Filename;
|
import me.topchetoeu.jscript.common.Filename;
|
||||||
import me.topchetoeu.jscript.core.Context;
|
import me.topchetoeu.jscript.runtime.Context;
|
||||||
import me.topchetoeu.jscript.core.Extensions;
|
import me.topchetoeu.jscript.runtime.Extensions;
|
||||||
import me.topchetoeu.jscript.core.Key;
|
import me.topchetoeu.jscript.runtime.Key;
|
||||||
import me.topchetoeu.jscript.utils.filesystem.Filesystem;
|
import me.topchetoeu.jscript.utils.filesystem.Filesystem;
|
||||||
import me.topchetoeu.jscript.utils.filesystem.Mode;
|
import me.topchetoeu.jscript.utils.filesystem.Mode;
|
||||||
|
|
||||||
|
@ -2,8 +2,8 @@ package me.topchetoeu.jscript.utils.modules;
|
|||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.core.Context;
|
import me.topchetoeu.jscript.runtime.Context;
|
||||||
import me.topchetoeu.jscript.core.exceptions.EngineException;
|
import me.topchetoeu.jscript.runtime.exceptions.EngineException;
|
||||||
|
|
||||||
public class RootModuleRepo implements ModuleRepo {
|
public class RootModuleRepo implements ModuleRepo {
|
||||||
public final HashMap<String, ModuleRepo> repos = new HashMap<>();
|
public final HashMap<String, ModuleRepo> repos = new HashMap<>();
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package me.topchetoeu.jscript.utils.modules;
|
package me.topchetoeu.jscript.utils.modules;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.common.Filename;
|
import me.topchetoeu.jscript.common.Filename;
|
||||||
import me.topchetoeu.jscript.core.Context;
|
import me.topchetoeu.jscript.runtime.Context;
|
||||||
import me.topchetoeu.jscript.core.Environment;
|
import me.topchetoeu.jscript.runtime.Environment;
|
||||||
|
|
||||||
public class SourceModule extends Module {
|
public class SourceModule extends Module {
|
||||||
public final Filename filename;
|
public final Filename filename;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package me.topchetoeu.jscript.utils.permissions;
|
package me.topchetoeu.jscript.utils.permissions;
|
||||||
|
|
||||||
import me.topchetoeu.jscript.core.Extensions;
|
import me.topchetoeu.jscript.runtime.Extensions;
|
||||||
import me.topchetoeu.jscript.core.Key;
|
import me.topchetoeu.jscript.runtime.Key;
|
||||||
|
|
||||||
public interface PermissionsProvider {
|
public interface PermissionsProvider {
|
||||||
public static final Key<PermissionsProvider> KEY = new Key<>();
|
public static final Key<PermissionsProvider> KEY = new Key<>();
|
||||||
|
Loading…
Reference in New Issue
Block a user