ES6 Support Groundwork + Fixes #26
@ -25,6 +25,7 @@ public class ForNode extends Node {
|
||||
}
|
||||
@Override public void compile(CompileResult target, boolean pollute) {
|
||||
var subtarget = target.subtarget();
|
||||
subtarget.scope.singleEntry = false;
|
||||
subtarget.add(i -> Instruction.stackAlloc(subtarget.scope.allocCount()));
|
||||
|
||||
declaration.compile(subtarget, false, BreakpointType.STEP_OVER);
|
||||
@ -39,8 +40,11 @@ public class ForNode extends Node {
|
||||
CompoundNode.compileMultiEntry(body, subtarget, false, BreakpointType.STEP_OVER);
|
||||
LabelContext.popLoop(subtarget.env, label);
|
||||
|
||||
subtarget.add(_i -> Instruction.stackRealloc(subtarget.scope.allocCount()));
|
||||
|
||||
CompoundNode.compileMultiEntry(assignment, subtarget, false, BreakpointType.STEP_OVER);
|
||||
int endI = subtarget.size();
|
||||
|
||||
end.set(endI);
|
||||
|
||||
subtarget.add(Instruction.jmp(start - endI));
|
||||
|
Loading…
Reference in New Issue
Block a user