/** * Returns a deep clone of this {@link AAtomicStmIR} node. * @return a deep clone of this {@link AAtomicStmIR} node */ public AAtomicStmIR clone() { return new AAtomicStmIR( _sourceNode, _tag, _metaData, cloneList(_statements) ); }
/** * Creates a deep clone of this {@link AAtomicStmIR} 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 AAtomicStmIR} node */ public AAtomicStmIR clone(Map<INode,INode> oldToNewMap) { AAtomicStmIR node = new AAtomicStmIR( _sourceNode, _tag, _metaData, cloneList(_statements, oldToNewMap) ); oldToNewMap.put(this, node); return node; }
@Override public SStmIR caseAAtomicStm(AAtomicStm node, IRInfo question) throws AnalysisException { AAtomicStmIR atomicBlock = new AAtomicStmIR(); for (AAssignmentStm assignment : node.getAssignments()) { SStmIR stmCg = assignment.apply(question.getStmVisitor(), question); if (stmCg != null) { atomicBlock.getStatements().add(stmCg); } else { return null; } } return atomicBlock; }