small fixes
Some checks failed
tagged-release / Tagged Release (push) Has been cancelled

This commit is contained in:
2025-01-24 22:46:51 +02:00
parent e14d85e7a8
commit 1548938537
5 changed files with 57 additions and 21 deletions

View File

@@ -209,7 +209,7 @@ public final class Frame {
returnValue = InstructionRunner.exec(env, instr, this);
}
catch (EngineException e) {
error = e.add(env, function.name, dbg.getMapOrEmpty(env, function).toLocation(codePtr));
error = e.add(env, function.name, dbg.getMapOrEmpty(env, function).toLocation(codePtr, true));
}
}
}

View File

@@ -26,7 +26,7 @@ public final class CodeFunction extends FunctionValue {
}
@Override protected Value onApply(Environment env, Value self, Value... args) {
var frame = new Frame(env, false, null, self, args, this);
var frame = new Frame(this.env, false, null, self, args, this);
var res = onCall(frame);
return res;
}
@@ -37,7 +37,7 @@ public final class CodeFunction extends FunctionValue {
if (proto instanceof ObjectValue) self.setPrototype(env, (ObjectValue)proto);
else if (proto == Value.NULL) self.setPrototype(env, null);
var frame = new Frame(env, true, target, self, args, this);
var frame = new Frame(this.env, true, target, self, args, this);
var ret = onCall(frame);