if (opt > 0) {
ListNode optArgs = argsNode.getOptArgs();
for (int j = 0; j < opt; j++, argIndex++) {
// Jump to 'l' if this arg is not null. If null, fall through and build the default value!
Label l = s.getNewLabel();
OptArgNode n = (OptArgNode)optArgs.get(j);
String argName = n.getName();
Variable av = s.getNewLocalVariable(argName, 0);
if (s instanceof IRMethod) ((IRMethod)s).addArgDesc("opt", argName);
// You need at least required+j+1 incoming args for this opt arg to get an arg at all
s.addInstr(new ReceiveOptArgInstr19(av, argIndex, required+j+1));
s.addInstr(BNEInstr.create(av, UndefinedValue.UNDEFINED, l)); // if 'av' is not undefined, go to default
build(n.getValue(), s);
s.addInstr(new LabelInstr(l));
}
}
// Rest arg