TopchetoEU/revert-ES5 #31

Merged
TopchetoEU merged 41 commits from TopchetoEU/revert-ES5 into master 2024-12-09 21:39:57 +00:00
2 changed files with 3 additions and 3 deletions
Showing only changes of commit 5c2fd00bfb - Show all commits

View File

@ -19,8 +19,8 @@ public class FunctionStatementNode extends FunctionNode {
@Override public void compile(CompileResult target, boolean pollute, String name, BreakpointType bp) {
var id = target.addChild(compileBody(target, name, null));
target.add(Instruction.loadFunc(id, name, captures(id, target)));
target.add(VariableNode.toInit(target, end, this.name));
target.add(Instruction.loadFunc(id, name, captures(id, target))).setLocation(loc());;
target.add(VariableNode.toSet(target, end, this.name, false, true));
if (pollute) target.add(Instruction.pushUndefined());
}

View File

@ -14,7 +14,7 @@ public class FunctionValueNode extends FunctionNode {
@Override public void compile(CompileResult target, boolean pollute, String name, BreakpointType bp) {
var id = target.addChild(compileBody(target, name, name));
target.add(Instruction.loadFunc(id, name, captures(id, target)));
target.add(Instruction.loadFunc(id, name, captures(id, target))).setLocation(loc());
}
public FunctionValueNode(Location loc, Location end, List<VariableNode> params, CompoundNode body, String name) {