public Operand buildMultipleAsgn19(MultipleAsgnNode multipleAsgnNode) { Node valueNode = multipleAsgnNode.getValueNode(); Operand values = build(valueNode); Variable ret = getValueInTemporaryVariable(values); if (valueNode instanceof ArrayNode) { buildMultipleAsgn19Assignment(multipleAsgnNode, null, ret); } else { Variable tmp = createTemporaryVariable(); addInstr(new ToAryInstr(tmp, ret)); buildMultipleAsgn19Assignment(multipleAsgnNode, null, tmp); } return ret; }
public Operand buildMultipleAsgn19(MultipleAsgnNode multipleAsgnNode) { Node valueNode = multipleAsgnNode.getValueNode(); Operand values = build(valueNode); Variable ret = getValueInTemporaryVariable(values); if (valueNode instanceof ArrayNode) { buildMultipleAsgn19Assignment(multipleAsgnNode, null, ret); } else { Variable tmp = createTemporaryVariable(); addInstr(new ToAryInstr(tmp, ret)); buildMultipleAsgn19Assignment(multipleAsgnNode, null, tmp); } return ret; }
public void receiveRequiredArg(Node node, int argIndex, Signature signature) { switch (node.getNodeType()) { case ARGUMENTNODE: { RubySymbol argName = ((ArgumentNode)node).getName(); if (scope instanceof IRMethod) addArgumentDescription(ArgumentType.req, argName); addArgReceiveInstr(argumentResult(argName), argIndex, signature); break; } case MULTIPLEASGNNODE: { MultipleAsgnNode childNode = (MultipleAsgnNode) node; Variable v = createTemporaryVariable(); addArgReceiveInstr(v, argIndex, signature); if (scope instanceof IRMethod) addArgumentDescription(ArgumentType.anonreq, null); Variable tmp = createTemporaryVariable(); addInstr(new ToAryInstr(tmp, v)); buildMultipleAsgn19Assignment(childNode, tmp, null); break; } default: throw new NotCompilableException("Can't build assignment node: " + node); } }
public void receiveRequiredArg(Node node, int argIndex, Signature signature) { switch (node.getNodeType()) { case ARGUMENTNODE: { RubySymbol argName = ((ArgumentNode)node).getName(); if (scope instanceof IRMethod) addArgumentDescription(ArgumentType.req, argName); addArgReceiveInstr(argumentResult(argName), argIndex, signature); break; } case MULTIPLEASGNNODE: { MultipleAsgnNode childNode = (MultipleAsgnNode) node; Variable v = createTemporaryVariable(); addArgReceiveInstr(v, argIndex, signature); if (scope instanceof IRMethod) addArgumentDescription(ArgumentType.anonreq, null); Variable tmp = createTemporaryVariable(); addInstr(new ToAryInstr(tmp, v)); buildMultipleAsgn19Assignment(childNode, tmp, null); break; } default: throw new NotCompilableException("Can't build assignment node: " + node); } }
buildMultipleAsgn19Assignment(childNode, argsArray, null); break;
buildMultipleAsgn19Assignment(childNode, argsArray, null); break;
Variable tmp = createTemporaryVariable(); addInstr(new ToAryInstr(tmp, rhsVal)); buildMultipleAsgn19Assignment((MultipleAsgnNode)node, null, tmp); break;
Variable tmp = createTemporaryVariable(); addInstr(new ToAryInstr(tmp, rhsVal)); buildMultipleAsgn19Assignment((MultipleAsgnNode)node, null, tmp); break;