diff --git a/repl/src/main/java/me/topchetoeu/j2s/repl/SimpleRepl.java b/repl/src/main/java/me/topchetoeu/j2s/repl/SimpleRepl.java index 8266776..680426f 100644 --- a/repl/src/main/java/me/topchetoeu/j2s/repl/SimpleRepl.java +++ b/repl/src/main/java/me/topchetoeu/j2s/repl/SimpleRepl.java @@ -26,6 +26,10 @@ import me.topchetoeu.j2s.compilation.JavaScript; import me.topchetoeu.j2s.compilation.json.JSON; import me.topchetoeu.j2s.compilation.parsing.Parsing; import me.topchetoeu.j2s.compilation.parsing.Source; +import me.topchetoeu.j2s.repl.buffers.Int32ArrayValue; +import me.topchetoeu.j2s.repl.buffers.Int8ArrayValue; +import me.topchetoeu.j2s.repl.buffers.TypedArrayValue; +import me.topchetoeu.j2s.repl.buffers.Uint8ArrayValue; import me.topchetoeu.j2s.repl.debug.DebugServer; import me.topchetoeu.j2s.repl.debug.Debugger; import me.topchetoeu.j2s.repl.debug.SimpleDebugger; @@ -44,10 +48,6 @@ import me.topchetoeu.j2s.runtime.values.functions.NativeFunction; import me.topchetoeu.j2s.runtime.values.objects.ArrayLikeValue; import me.topchetoeu.j2s.runtime.values.objects.ArrayValue; import me.topchetoeu.j2s.runtime.values.objects.ObjectValue; -import me.topchetoeu.j2s.runtime.values.objects.buffers.Int32ArrayValue; -import me.topchetoeu.j2s.runtime.values.objects.buffers.Int8ArrayValue; -import me.topchetoeu.j2s.runtime.values.objects.buffers.TypedArrayValue; -import me.topchetoeu.j2s.runtime.values.objects.buffers.Uint8ArrayValue; import me.topchetoeu.j2s.runtime.values.primitives.BoolValue; import me.topchetoeu.j2s.runtime.values.primitives.StringValue; import me.topchetoeu.j2s.runtime.values.primitives.SymbolValue; @@ -701,7 +701,7 @@ public class SimpleRepl { res.defineOwnField(env, "invoke", new NativeFunction(args -> { var func = (FunctionValue)args.get(0); var self = args.get(1); - var funcArgs = (ArrayValue)args.get(2); + var funcArgs = (ArrayLikeValue)args.get(2); return func.apply(env, self, funcArgs.toArray()); })); diff --git a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/objects/buffers/Int32ArrayValue.java b/repl/src/main/java/me/topchetoeu/j2s/repl/buffers/Int32ArrayValue.java similarity index 92% rename from runtime/src/main/java/me/topchetoeu/j2s/runtime/values/objects/buffers/Int32ArrayValue.java rename to repl/src/main/java/me/topchetoeu/j2s/repl/buffers/Int32ArrayValue.java index f09aa47..aea022f 100644 --- a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/objects/buffers/Int32ArrayValue.java +++ b/repl/src/main/java/me/topchetoeu/j2s/repl/buffers/Int32ArrayValue.java @@ -1,4 +1,4 @@ -package me.topchetoeu.j2s.runtime.values.objects.buffers; +package me.topchetoeu.j2s.repl.buffers; public final class Int32ArrayValue extends TypedArrayValue { @Override protected int onGet(int i) { diff --git a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/objects/buffers/Int8ArrayValue.java b/repl/src/main/java/me/topchetoeu/j2s/repl/buffers/Int8ArrayValue.java similarity index 85% rename from runtime/src/main/java/me/topchetoeu/j2s/runtime/values/objects/buffers/Int8ArrayValue.java rename to repl/src/main/java/me/topchetoeu/j2s/repl/buffers/Int8ArrayValue.java index cb46163..d3a8fa5 100644 --- a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/objects/buffers/Int8ArrayValue.java +++ b/repl/src/main/java/me/topchetoeu/j2s/repl/buffers/Int8ArrayValue.java @@ -1,4 +1,4 @@ -package me.topchetoeu.j2s.runtime.values.objects.buffers; +package me.topchetoeu.j2s.repl.buffers; public final class Int8ArrayValue extends TypedArrayValue { @Override protected int onGet(int i) { diff --git a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/objects/buffers/TypedArrayValue.java b/repl/src/main/java/me/topchetoeu/j2s/repl/buffers/TypedArrayValue.java similarity index 96% rename from runtime/src/main/java/me/topchetoeu/j2s/runtime/values/objects/buffers/TypedArrayValue.java rename to repl/src/main/java/me/topchetoeu/j2s/repl/buffers/TypedArrayValue.java index dadc35a..db1d6d5 100644 --- a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/objects/buffers/TypedArrayValue.java +++ b/repl/src/main/java/me/topchetoeu/j2s/repl/buffers/TypedArrayValue.java @@ -1,4 +1,4 @@ -package me.topchetoeu.j2s.runtime.values.objects.buffers; +package me.topchetoeu.j2s.repl.buffers; import java.util.WeakHashMap; diff --git a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/objects/buffers/Uint8ArrayValue.java b/repl/src/main/java/me/topchetoeu/j2s/repl/buffers/Uint8ArrayValue.java similarity index 88% rename from runtime/src/main/java/me/topchetoeu/j2s/runtime/values/objects/buffers/Uint8ArrayValue.java rename to repl/src/main/java/me/topchetoeu/j2s/repl/buffers/Uint8ArrayValue.java index 2d51cf5..dd2590a 100644 --- a/runtime/src/main/java/me/topchetoeu/j2s/runtime/values/objects/buffers/Uint8ArrayValue.java +++ b/repl/src/main/java/me/topchetoeu/j2s/repl/buffers/Uint8ArrayValue.java @@ -1,4 +1,4 @@ -package me.topchetoeu.j2s.runtime.values.objects.buffers; +package me.topchetoeu.j2s.repl.buffers; public final class Uint8ArrayValue extends TypedArrayValue { @Override protected int onGet(int i) {