@Override public void buildVersionSpecificAssignment(Node node, IRScope s, Variable v) { switch (node.getNodeType()) { case MULTIPLEASGN19NODE: { s.addInstr(new ToAryInstr(v, v, manager.getFalse())); buildMultipleAsgn19Assignment((MultipleAsgn19Node)node, s, null, v); break; } default: throw new NotCompilableException("Can't build assignment node: " + node); } }
@Override public void buildVersionSpecificAssignment(Node node, IRScope s, Variable v) { switch (node.getNodeType()) { case MULTIPLEASGN19NODE: { s.addInstr(new ToAryInstr(v, v, manager.getFalse())); buildMultipleAsgn19Assignment((MultipleAsgn19Node)node, s, null, v); break; } default: throw new NotCompilableException("Can't build assignment node: " + node); } }
public Operand buildMultipleAsgn19(MultipleAsgn19Node multipleAsgnNode, IRScope s) { Operand values = build(multipleAsgnNode.getValueNode(), s); Variable ret = getValueInTemporaryVariable(s, values); s.addInstr(new ToAryInstr(ret, ret, manager.getFalse())); buildMultipleAsgn19Assignment(multipleAsgnNode, s, null, ret); return ret; }
public Operand buildMultipleAsgn19(MultipleAsgn19Node multipleAsgnNode, IRScope s) { Operand values = build(multipleAsgnNode.getValueNode(), s); Variable ret = getValueInTemporaryVariable(s, values); s.addInstr(new ToAryInstr(ret, ret, manager.getFalse())); buildMultipleAsgn19Assignment(multipleAsgnNode, s, null, ret); return ret; }
public void receiveRequiredArg(Node node, IRScope s, int argIndex, boolean post, int numPreReqd, int numPostRead) { switch (node.getNodeType()) { case ARGUMENTNODE: { ArgumentNode a = (ArgumentNode)node; String argName = a.getName(); if (s instanceof IRMethod) ((IRMethod)s).addArgDesc("req", argName); addArgReceiveInstr(s, s.getNewLocalVariable(argName, 0), argIndex, post, numPreReqd, numPostRead); break; } case MULTIPLEASGN19NODE: { MultipleAsgn19Node childNode = (MultipleAsgn19Node) node; Variable v = s.getNewTemporaryVariable(); addArgReceiveInstr(s, v, argIndex, post, numPreReqd, numPostRead); if (s instanceof IRMethod) ((IRMethod)s).addArgDesc("rest", ""); s.addInstr(new ToAryInstr(v, v, manager.getFalse())); buildMultipleAsgn19Assignment(childNode, s, v, null); break; } default: throw new NotCompilableException("Can't build assignment node: " + node); } }
public void receiveRequiredArg(Node node, IRScope s, int argIndex, boolean post, int numPreReqd, int numPostRead) { switch (node.getNodeType()) { case ARGUMENTNODE: { ArgumentNode a = (ArgumentNode)node; String argName = a.getName(); if (s instanceof IRMethod) ((IRMethod)s).addArgDesc("req", argName); addArgReceiveInstr(s, s.getNewLocalVariable(argName, 0), argIndex, post, numPreReqd, numPostRead); break; } case MULTIPLEASGN19NODE: { MultipleAsgn19Node childNode = (MultipleAsgn19Node) node; Variable v = s.getNewTemporaryVariable(); addArgReceiveInstr(s, v, argIndex, post, numPreReqd, numPostRead); if (s instanceof IRMethod) ((IRMethod)s).addArgDesc("rest", ""); s.addInstr(new ToAryInstr(v, v, manager.getFalse())); buildMultipleAsgn19Assignment(childNode, s, v, null); break; } default: throw new NotCompilableException("Can't build assignment node: " + node); } }
buildMultipleAsgn19Assignment(childNode, s, argsArray, null); break;
buildMultipleAsgn19Assignment(childNode, s, argsArray, null); break;