Add first test #23

Merged
marregui merged 25 commits from ma/add-first-tests into master 2024-09-04 12:29:17 +00:00
6 changed files with 6 additions and 9 deletions
Showing only changes of commit acfdf23586 - Show all commits

View File

@ -7,7 +7,7 @@ import java.util.function.Supplier;
import me.topchetoeu.jscript.runtime.exceptions.InterruptException;
public class Engine implements EventLoop {
public final class Engine implements EventLoop {
private static class Task<T> implements Comparable<Task<?>> {
public final Supplier<?> runnable;
public final CompletableFuture<T> notifier = new CompletableFuture<T>();
@ -74,7 +74,4 @@ public class Engine implements EventLoop {
public boolean isRunning() {
return this.thread != null;
}
public Engine() {
}
}

View File

@ -21,7 +21,7 @@ import me.topchetoeu.jscript.runtime.values.functions.CodeFunction;
import me.topchetoeu.jscript.runtime.values.objects.ObjectValue;
import me.topchetoeu.jscript.runtime.values.objects.ScopeValue;
public class Frame {
public final class Frame {
public static final Key<Frame> KEY = Key.of();
public static enum TryState {

View File

@ -5,7 +5,7 @@ import me.topchetoeu.jscript.runtime.values.primitives.NumberValue;
import me.topchetoeu.jscript.runtime.values.primitives.StringValue;
import me.topchetoeu.jscript.runtime.values.primitives.SymbolValue;
public class KeyCache {
public final class KeyCache {
public final Value value;
private Integer intCache;
private Double doubleCache;

View File

@ -5,7 +5,7 @@ import me.topchetoeu.jscript.common.environment.Environment;
import me.topchetoeu.jscript.runtime.Frame;
import me.topchetoeu.jscript.runtime.values.Value;
public class CodeFunction extends FunctionValue {
public final class CodeFunction extends FunctionValue {
public final FunctionBody body;
public final Value[][] captures;
public Environment env;

View File

@ -3,7 +3,7 @@ package me.topchetoeu.jscript.runtime.values.functions;
import me.topchetoeu.jscript.common.environment.Environment;
import me.topchetoeu.jscript.runtime.values.Value;
public class NativeFunction extends FunctionValue {
public final class NativeFunction extends FunctionValue {
public static interface NativeFunctionRunner {
Value run(Arguments args);
}

View File

@ -4,7 +4,7 @@ import me.topchetoeu.jscript.common.environment.Environment;
import me.topchetoeu.jscript.runtime.values.Value;
import me.topchetoeu.jscript.runtime.values.Member.FieldMember;
public class ScopeValue extends ObjectValue {
public final class ScopeValue extends ObjectValue {
private class VariableField extends FieldMember {
private int i;