/** * Creates a deep clone of this {@link ACallObjectExpStmIR} 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 ACallObjectExpStmIR} node */ public ACallObjectExpStmIR clone(Map<INode,INode> oldToNewMap) { ACallObjectExpStmIR node = new ACallObjectExpStmIR( _sourceNode, _tag, _metaData, cloneNode(_type, oldToNewMap), cloneNode(_obj, oldToNewMap), _fieldName, cloneList(_args, oldToNewMap) ); oldToNewMap.put(this, node); return node; }
/** * Returns a deep clone of this {@link ACallObjectExpStmIR} node. * @return a deep clone of this {@link ACallObjectExpStmIR} node */ public ACallObjectExpStmIR clone() { return new ACallObjectExpStmIR( _sourceNode, _tag, _metaData, cloneNode(_type), cloneNode(_obj), _fieldName, cloneList(_args) ); }
public ACallObjectExpStmIR consInstanceCallStm(STypeIR instanceType, String instanceName, String memberName, SExpIR... args) { AIdentifierVarExpIR instance = new AIdentifierVarExpIR(); instance.setName(instanceName); instance.setType(instanceType.clone()); instance.setIsLocal(true); ACallObjectExpStmIR call = new ACallObjectExpStmIR(); call.setType(new AVoidTypeIR()); call.setFieldName(memberName); call.setObj(instance); for (SExpIR arg : args) { call.getArgs().add(arg); } return call; }
@Override public void caseACallObjectStmIR(ACallObjectStmIR node) throws AnalysisException { ACallObjectExpStmIR callObjExpStm = new ACallObjectExpStmIR(); callObjExpStm.setArgs(node.getArgs()); callObjExpStm.setObj(node.getDesignator().apply(converter)); callObjExpStm.setFieldName(node.getFieldName()); callObjExpStm.setSourceNode(node.getSourceNode()); callObjExpStm.setTag(node.getTag()); callObjExpStm.setType(node.getType()); if (node.parent() != null) { node.parent().replaceChild(node, callObjExpStm); } else { log.error("Could not find parent of " + node); } } }
sentinelVar.setType(fieldType); ACallObjectExpStmIR callSentinel = new ACallObjectExpStmIR(); callSentinel.setObj(sentinelVar); callSentinel.setFieldName(concPrefixes.stateChangedMethodName());
ACallObjectExpStmIR setCall = new ACallObjectExpStmIR(); setCall.setFieldName(consSetCallName(target.getMemberName())); setCall.getArgs().add(node.getExp().clone());
ACallObjectExpStmIR paramExp = new ACallObjectExpStmIR(); paramExp.setObj(cast);
SourceNode sourceNode = node.getSourceNode(); ACallObjectExpStmIR call = new ACallObjectExpStmIR(); call.setObj(objExp); call.setType(type.clone());