ES6 Object and assignment destructors + object stuff #28

Merged
TopchetoEU merged 15 commits from TopchetoEU/destructing into master 2024-09-14 12:38:02 +00:00
Showing only changes of commit b9268518f6 - Show all commits

View File

@ -18,11 +18,10 @@ public class ArrayNode extends Node {
@Override public void compile(CompileResult target, boolean pollute) {
target.add(Instruction.loadArr(statements.length));
if (statements.length > 0) target.add(Instruction.dup(statements.length));
for (var i = 0; i < statements.length; i++) {
var el = statements[i];
if (el != null) {
target.add(Instruction.dup());
el.compile(target, true);
target.add(Instruction.storeMember(i));
}