/** * Returns a deep clone of this {@link ACyclesStmIR} node. * @return a deep clone of this {@link ACyclesStmIR} node */ public ACyclesStmIR clone() { return new ACyclesStmIR( _sourceNode, _tag, _metaData, cloneNode(_cycles), cloneNode(_stm) ); }
/** * Creates a new complete constructor {@code ACyclesStmIR} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param cycles_ the {@link SExpIR} node for the {@code cycles} child of this {@link ACyclesStmIR} node * @param stm_ the {@link SStmIR} node for the {@code stm} child of this {@link ACyclesStmIR} node */ public ACyclesStmIR(SourceNode sourceNode_, Object tag_, List<? extends ClonableString> metaData_, SExpIR cycles_, SStmIR stm_) { super(sourceNode_,tag_,metaData_); this.setCycles(cycles_); this.setStm(stm_); }
/** * Essentially this.toString().equals(o.toString()). **/ @Override public boolean equals(Object o) { if (o != null && o instanceof ACyclesStmIR) { return toString().equals(o.toString()); } return false; }
/** * Called by the {@link ACyclesStmIR} node from {@link ACyclesStmIR#apply(IAnalysis)}. * @param node the calling {@link ACyclesStmIR} node */ public void caseACyclesStmIR(ACyclesStmIR node, Q question) throws AnalysisException { _visitedNodes.add(node); inACyclesStmIR(node, question); if(node.getCycles() != null && !_visitedNodes.contains(node.getCycles())) { node.getCycles().apply(this, question); } if(node.getStm() != null && !_visitedNodes.contains(node.getStm())) { node.getStm().apply(this, question); } outACyclesStmIR(node, question); }
@Override public SStmIR caseACyclesStm(ACyclesStm node, IRInfo question) throws AnalysisException { PExp cycles = node.getCycles(); PStm stm = node.getStatement(); SExpIR cyclesCg = cycles.apply(question.getExpVisitor(), question); SStmIR stmCg = stm.apply(question.getStmVisitor(), question); ACyclesStmIR cycStm = new ACyclesStmIR(); cycStm.setCycles(cyclesCg); cycStm.setStm(stmCg); return cycStm; }
/** * Called by the {@link ACyclesStmIR} node from {@link ACyclesStmIR#apply(IIsaAnalysis)}. * @param node the calling {@link ACyclesStmIR} node */ public void caseACyclesStmIR(ACyclesStmIR node) throws AnalysisException { _visitedNodes.add(node); inACyclesStmIR(node); if(node.getCycles() != null && !_visitedNodes.contains(node.getCycles())) { node.getCycles().apply(this); } if(node.getStm() != null && !_visitedNodes.contains(node.getStm())) { node.getStm().apply(this); } outACyclesStmIR(node); }
/** * Called by the {@link ACyclesStmIR} node from {@link ACyclesStmIR#apply(IAnalysis)}. * @param node the calling {@link ACyclesStmIR} node */ public void caseACyclesStmIR(ACyclesStmIR node) throws AnalysisException { _visitedNodes.add(node); inACyclesStmIR(node); if(node.getCycles() != null && !_visitedNodes.contains(node.getCycles())) { node.getCycles().apply(this); } if(node.getStm() != null && !_visitedNodes.contains(node.getStm())) { node.getStm().apply(this); } outACyclesStmIR(node); }
/** * Creates a new tree field only constructor {@code ACyclesStmIR TAG=cycles} node with the given nodes as children. * @deprecated This method should not be used, use AstFactory instead. * The basic child nodes are removed from their previous parents. * @param cycles_ the {@link SExpIR} node for the {@code cycles} child of this {@link ACyclesStmIR} node * @param stm_ the {@link SStmIR} node for the {@code stm} child of this {@link ACyclesStmIR} node */ public ACyclesStmIR(SExpIR cycles_, SStmIR stm_) { super(null,null,null); this.setCycles(cycles_); this.setStm(stm_); }
/** * Creates a deep clone of this {@link ACyclesStmIR} node while putting all * old node-new node relations in the map {@code oldToNewMap}. * @param oldToNewMap the map filled with the old node-new node relation * @return a deep clone of this {@link ACyclesStmIR} node */ public ACyclesStmIR clone(Map<INode,INode> oldToNewMap) { ACyclesStmIR node = new ACyclesStmIR( _sourceNode, _tag, _metaData, cloneNode(_cycles, oldToNewMap), cloneNode(_stm, oldToNewMap) ); oldToNewMap.put(this, node); return node; }
/** * Called by the {@link ACyclesStmIR} node from {@link ACyclesStmIR#apply(IAnalysis)}. * @param node the calling {@link ACyclesStmIR} node */ public A caseACyclesStmIR(ACyclesStmIR node) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node); mergeReturns(retVal,inACyclesStmIR(node)); if(node.getCycles() != null && !_visitedNodes.contains(node.getCycles())) { mergeReturns(retVal,node.getCycles().apply(this)); } if(node.getStm() != null && !_visitedNodes.contains(node.getStm())) { mergeReturns(retVal,node.getStm().apply(this)); } mergeReturns(retVal,outACyclesStmIR(node)); return retVal; }
/** * Called by the {@link ACyclesStmIR} node from {@link ACyclesStmIR#apply(IAnalysis)}. * @param node the calling {@link ACyclesStmIR} node */ public A caseACyclesStmIR(ACyclesStmIR node, Q question) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node, question); mergeReturns(retVal,inACyclesStmIR(node, question)); if(node.getCycles() != null && !_visitedNodes.contains(node.getCycles())) { mergeReturns(retVal,node.getCycles().apply(this, question)); } if(node.getStm() != null && !_visitedNodes.contains(node.getStm())) { mergeReturns(retVal,node.getStm().apply(this, question)); } mergeReturns(retVal,outACyclesStmIR(node, question)); return retVal; }