refactor: fix some bad code >:(

This commit is contained in:
TopchetoEU 2023-11-05 19:43:28 +02:00
parent d57044acb7
commit f885d4349f
Signed by: topchetoeu
GPG Key ID: 6531B8583E5F6ED4
2 changed files with 3 additions and 2 deletions

View File

@ -40,7 +40,7 @@ public class Context {
else source = Values.toString(this, transpiled);
var breakpoints = new TreeSet<Location>();
FunctionValue res = Parsing.compile(engine.functions, breakpoints, environment(), filename, source);
FunctionValue res = Parsing.compile(Engine.functions, breakpoints, environment(), filename, source);
engine.onSource(filename, source, breakpoints);
if (runner != null) res = (FunctionValue)runner.call(this, null, res);

View File

@ -4,6 +4,7 @@ import java.util.Collections;
import me.topchetoeu.jscript.compilation.Instruction;
import me.topchetoeu.jscript.engine.Context;
import me.topchetoeu.jscript.engine.Engine;
import me.topchetoeu.jscript.engine.Operation;
import me.topchetoeu.jscript.engine.scope.ValueVariable;
import me.topchetoeu.jscript.engine.values.ArrayValue;
@ -186,7 +187,7 @@ public class Runners {
captures[i - 3] = frame.scope.get(instr.get(i));
}
var body = ctx.engine.functions.get(id);
var body = Engine.functions.get(id);
var func = new CodeFunction(ctx.environment(), "", localsN, len, captures, body);
frame.push(ctx, func);