/** * Creates a deep clone of this {@link AAssignmentStmIR} 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 AAssignmentStmIR} node */ public AAssignmentStmIR clone(Map<INode,INode> oldToNewMap) { AAssignmentStmIR node = new AAssignmentStmIR( _sourceNode, _tag, _metaData, cloneNode(_target, oldToNewMap), cloneNode(_exp, oldToNewMap) ); oldToNewMap.put(this, node); return node; }
/** * Returns a deep clone of this {@link AAssignmentStmIR} node. * @return a deep clone of this {@link AAssignmentStmIR} node */ public AAssignmentStmIR clone() { return new AAssignmentStmIR( _sourceNode, _tag, _metaData, cloneNode(_target), cloneNode(_exp) ); }
@Override public SStmIR caseAAssignmentStm(AAssignmentStm node, IRInfo question) throws AnalysisException { PStateDesignator target = node.getTarget(); PExp exp = node.getExp(); SStateDesignatorIR targetCg = target.apply(question.getStateDesignatorVisitor(), question); SExpIR expCg = exp.apply(question.getExpVisitor(), question); AAssignmentStmIR assignment = new AAssignmentStmIR(); assignment.setTarget(targetCg); assignment.setExp(expCg); return assignment; }