/** * Returns a deep clone of this {@link AStartStmIR} node. * @return a deep clone of this {@link AStartStmIR} node */ public AStartStmIR clone() { return new AStartStmIR( _sourceNode, _tag, _metaData, cloneNode(_exp), cloneNode(_type) ); }
/** * Creates a new tree field only constructor {@code AStartStmIR TAG=start} 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 exp_ the {@link SExpIR} node for the {@code exp} child of this {@link AStartStmIR} node * @param type_ the {@link STypeIR} node for the {@code type} child of this {@link AStartStmIR} node */ public AStartStmIR(SExpIR exp_, STypeIR type_) { super(null,null,null); this.setExp(exp_); this.setType(type_); }
/** * Essentially this.toString().equals(o.toString()). **/ @Override public boolean equals(Object o) { if (o != null && o instanceof AStartStmIR) { return toString().equals(o.toString()); } return false; }
/** * Called by the {@link AStartStmIR} node from {@link AStartStmIR#apply(IAnalysis)}. * @param node the calling {@link AStartStmIR} node */ public void caseAStartStmIR(AStartStmIR node) throws AnalysisException { _visitedNodes.add(node); inAStartStmIR(node); if(node.getExp() != null && !_visitedNodes.contains(node.getExp())) { node.getExp().apply(this); } if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this); } outAStartStmIR(node); }
SExpIR expIR = exp.apply(question.getExpVisitor(), question); AStartStmIR thread = new AStartStmIR(); thread.setType(typeIR); thread.setExp(expIR);
/** * Called by the {@link AStartStmIR} node from {@link AStartStmIR#apply(IAnalysis)}. * @param node the calling {@link AStartStmIR} node */ public void caseAStartStmIR(AStartStmIR node, Q question) throws AnalysisException { _visitedNodes.add(node); inAStartStmIR(node, question); if(node.getExp() != null && !_visitedNodes.contains(node.getExp())) { node.getExp().apply(this, question); } if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this, question); } outAStartStmIR(node, question); }
/** * Called by the {@link AStartStmIR} node from {@link AStartStmIR#apply(IIsaAnalysis)}. * @param node the calling {@link AStartStmIR} node */ public void caseAStartStmIR(AStartStmIR node) throws AnalysisException { _visitedNodes.add(node); inAStartStmIR(node); if(node.getExp() != null && !_visitedNodes.contains(node.getExp())) { node.getExp().apply(this); } if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this); } outAStartStmIR(node); }
/** * Creates a new complete constructor {@code AStartStmIR} 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 exp_ the {@link SExpIR} node for the {@code exp} child of this {@link AStartStmIR} node * @param type_ the {@link STypeIR} node for the {@code type} child of this {@link AStartStmIR} node */ public AStartStmIR(SourceNode sourceNode_, Object tag_, List<? extends ClonableString> metaData_, SExpIR exp_, STypeIR type_) { super(sourceNode_,tag_,metaData_); this.setExp(exp_); this.setType(type_); }
/** * Creates a deep clone of this {@link AStartStmIR} 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 AStartStmIR} node */ public AStartStmIR clone(Map<INode,INode> oldToNewMap) { AStartStmIR node = new AStartStmIR( _sourceNode, _tag, _metaData, cloneNode(_exp, oldToNewMap), cloneNode(_type, oldToNewMap) ); oldToNewMap.put(this, node); return node; }
/** * Called by the {@link AStartStmIR} node from {@link AStartStmIR#apply(IAnalysis)}. * @param node the calling {@link AStartStmIR} node */ public A caseAStartStmIR(AStartStmIR node) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node); mergeReturns(retVal,inAStartStmIR(node)); if(node.getExp() != null && !_visitedNodes.contains(node.getExp())) { mergeReturns(retVal,node.getExp().apply(this)); } if(node.getType() != null && !_visitedNodes.contains(node.getType())) { mergeReturns(retVal,node.getType().apply(this)); } mergeReturns(retVal,outAStartStmIR(node)); return retVal; }
/** * Called by the {@link AStartStmIR} node from {@link AStartStmIR#apply(IAnalysis)}. * @param node the calling {@link AStartStmIR} node */ public A caseAStartStmIR(AStartStmIR node, Q question) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node, question); mergeReturns(retVal,inAStartStmIR(node, question)); if(node.getExp() != null && !_visitedNodes.contains(node.getExp())) { mergeReturns(retVal,node.getExp().apply(this, question)); } if(node.getType() != null && !_visitedNodes.contains(node.getType())) { mergeReturns(retVal,node.getType().apply(this, question)); } mergeReturns(retVal,outAStartStmIR(node, question)); return retVal; }