fix: wrong arguments when compilling function bodies
This commit is contained in:
parent
b6a90b108b
commit
e509edc459
@ -16,7 +16,7 @@ public class FunctionStatementNode extends FunctionNode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override public void compile(CompileResult target, boolean pollute, String name, BreakpointType bp) {
|
@Override public void compile(CompileResult target, boolean pollute, String name, BreakpointType bp) {
|
||||||
var id = target.addChild(compileBody(target, false, name, null));
|
var id = target.addChild(compileBody(target, true, name, null));
|
||||||
target.add(_i -> Instruction.loadFunc(id, true, true, false, name, captures(id, target)));
|
target.add(_i -> Instruction.loadFunc(id, true, true, false, name, captures(id, target)));
|
||||||
target.add(VariableNode.toSet(target, end, this.name, pollute, true));
|
target.add(VariableNode.toSet(target, end, this.name, pollute, true));
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ public class FunctionValueNode extends FunctionNode {
|
|||||||
@Override public String name() { return name; }
|
@Override public String name() { return name; }
|
||||||
|
|
||||||
@Override public void compile(CompileResult target, boolean pollute, String name, BreakpointType bp) {
|
@Override public void compile(CompileResult target, boolean pollute, String name, BreakpointType bp) {
|
||||||
var id = target.addChild(compileBody(target, false, name, null));
|
var id = target.addChild(compileBody(target, true, name, null));
|
||||||
target.add(_i -> Instruction.loadFunc(id, true, true, false, name, captures(id, target)));
|
target.add(_i -> Instruction.loadFunc(id, true, true, false, name, captures(id, target)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user