/** * Returns a deep clone of this {@link ATypeBindIR} node. * @return a deep clone of this {@link ATypeBindIR} node */ public ATypeBindIR clone() { return new ATypeBindIR( _sourceNode, _tag, _metaData, cloneNode(_pattern), cloneNode(_type) ); }
/** * Creates a new complete constructor {@code ATypeBindIR} 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 type_ the {@link STypeIR} node for the {@code type} child of this {@link ATypeBindIR} node */ public ATypeBindIR(SourceNode sourceNode_, Object tag_, List<? extends ClonableString> metaData_, SPatternIR pattern_, STypeIR type_) { super(sourceNode_,tag_,metaData_,pattern_); this.setType(type_); }
/** * Essentially this.toString().equals(o.toString()). **/ @Override public boolean equals(Object o) { if (o != null && o instanceof ATypeBindIR) { return toString().equals(o.toString()); } return false; }
/** * Called by the {@link ATypeBindIR} node from {@link ATypeBindIR#apply(IAnalysis)}. * @param node the calling {@link ATypeBindIR} node */ public void caseATypeBindIR(ATypeBindIR node) throws AnalysisException { _visitedNodes.add(node); inATypeBindIR(node); if(node.getPattern() != null && !_visitedNodes.contains(node.getPattern())) { node.getPattern().apply(this); } if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this); } outATypeBindIR(node); }
@Override public SBindIR caseATypeBind(ATypeBind node, IRInfo question) throws AnalysisException { PPattern pattern = node.getPattern(); SPatternIR patternCg = pattern.apply(question.getPatternVisitor(), question); PType boundType = node.getType(); STypeIR boundTypeCg = boundType.apply(question.getTypeVisitor(), question); ATypeBindIR setBind = new ATypeBindIR(); setBind.setPattern(patternCg); setBind.setType(boundTypeCg); return setBind; }
multipleTypeBind.setType(typeBind.getType());
/** * Called by the {@link ATypeBindIR} node from {@link ATypeBindIR#apply(IIsaAnalysis)}. * @param node the calling {@link ATypeBindIR} node */ public void caseATypeBindIR(ATypeBindIR node) throws AnalysisException { _visitedNodes.add(node); inATypeBindIR(node); if(node.getPattern() != null && !_visitedNodes.contains(node.getPattern())) { node.getPattern().apply(this); } if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this); } outATypeBindIR(node); }
/** * Called by the {@link ATypeBindIR} node from {@link ATypeBindIR#apply(IAnalysis)}. * @param node the calling {@link ATypeBindIR} node */ public void caseATypeBindIR(ATypeBindIR node, Q question) throws AnalysisException { _visitedNodes.add(node); inATypeBindIR(node, question); if(node.getPattern() != null && !_visitedNodes.contains(node.getPattern())) { node.getPattern().apply(this, question); } if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this, question); } outATypeBindIR(node, question); }
/** * Creates a deep clone of this {@link ATypeBindIR} 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 ATypeBindIR} node */ public ATypeBindIR clone(Map<INode,INode> oldToNewMap) { ATypeBindIR node = new ATypeBindIR( _sourceNode, _tag, _metaData, cloneNode(_pattern, oldToNewMap), cloneNode(_type, oldToNewMap) ); oldToNewMap.put(this, node); return node; }
/** * Creates a new tree field only constructor {@code ATypeBindIR TAG=type} 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 type_ the {@link STypeIR} node for the {@code type} child of this {@link ATypeBindIR} node */ public ATypeBindIR(SPatternIR pattern_, STypeIR type_) { super(null,null,null,pattern_); this.setType(type_); }
/** * Called by the {@link ATypeBindIR} node from {@link ATypeBindIR#apply(IAnalysis)}. * @param node the calling {@link ATypeBindIR} node */ public A caseATypeBindIR(ATypeBindIR node, Q question) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node, question); mergeReturns(retVal,inATypeBindIR(node, question)); if(node.getPattern() != null && !_visitedNodes.contains(node.getPattern())) { mergeReturns(retVal,node.getPattern().apply(this, question)); } if(node.getType() != null && !_visitedNodes.contains(node.getType())) { mergeReturns(retVal,node.getType().apply(this, question)); } mergeReturns(retVal,outATypeBindIR(node, question)); return retVal; }
/** * Called by the {@link ATypeBindIR} node from {@link ATypeBindIR#apply(IAnalysis)}. * @param node the calling {@link ATypeBindIR} node */ public A caseATypeBindIR(ATypeBindIR node) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node); mergeReturns(retVal,inATypeBindIR(node)); if(node.getPattern() != null && !_visitedNodes.contains(node.getPattern())) { mergeReturns(retVal,node.getPattern().apply(this)); } if(node.getType() != null && !_visitedNodes.contains(node.getType())) { mergeReturns(retVal,node.getType().apply(this)); } mergeReturns(retVal,outATypeBindIR(node)); return retVal; }