/** * Called by the {@link AApplyExpIR} node from {@link AApplyExpIR#apply(IAnalysis)}. * @param node the calling {@link AApplyExpIR} node */ public void caseAApplyExpIR(AApplyExpIR node, Q question) throws AnalysisException { _visitedNodes.add(node); inAApplyExpIR(node, question); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this, question); } if(node.getRoot() != null && !_visitedNodes.contains(node.getRoot())) { node.getRoot().apply(this, question); } { List<SExpIR> copy = new ArrayList<SExpIR>(node.getArgs()); for( SExpIR e : copy) { if(!_visitedNodes.contains(e)) { e.apply(this, question); } } } outAApplyExpIR(node, question); }
/** * Called by the {@link AApplyExpIR} node from {@link AApplyExpIR#apply(IAnalysis)}. * @param node the calling {@link AApplyExpIR} node */ public void caseAApplyExpIR(AApplyExpIR node) throws AnalysisException { _visitedNodes.add(node); inAApplyExpIR(node); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this); } if(node.getRoot() != null && !_visitedNodes.contains(node.getRoot())) { node.getRoot().apply(this); } { List<SExpIR> copy = new ArrayList<SExpIR>(node.getArgs()); for( SExpIR e : copy) { if(!_visitedNodes.contains(e)) { e.apply(this); } } } outAApplyExpIR(node); }
/** * Called by the {@link AApplyExpIR} node from {@link AApplyExpIR#apply(IIsaAnalysis)}. * @param node the calling {@link AApplyExpIR} node */ public void caseAApplyExpIR(AApplyExpIR node) throws AnalysisException { _visitedNodes.add(node); inAApplyExpIR(node); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { node.getType().apply(this); } if(node.getRoot() != null && !_visitedNodes.contains(node.getRoot())) { node.getRoot().apply(this); } { List<SExpIR> copy = new ArrayList<SExpIR>(node.getArgs()); for( SExpIR e : copy) { if(!_visitedNodes.contains(e)) { e.apply(this); } } } outAApplyExpIR(node); }
/** * Called by the {@link AApplyExpIR} node from {@link AApplyExpIR#apply(IAnalysis)}. * @param node the calling {@link AApplyExpIR} node */ public A caseAApplyExpIR(AApplyExpIR node, Q question) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node, question); mergeReturns(retVal,inAApplyExpIR(node, question)); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { mergeReturns(retVal,node.getType().apply(this, question)); } if(node.getRoot() != null && !_visitedNodes.contains(node.getRoot())) { mergeReturns(retVal,node.getRoot().apply(this, question)); } { List<SExpIR> copy = new ArrayList<SExpIR>(node.getArgs()); for( SExpIR e : copy) { if(!_visitedNodes.contains(e)) { mergeReturns(retVal,e.apply(this, question)); } } } mergeReturns(retVal,outAApplyExpIR(node, question)); return retVal; }
/** * Called by the {@link AApplyExpIR} node from {@link AApplyExpIR#apply(IAnalysis)}. * @param node the calling {@link AApplyExpIR} node */ public A caseAApplyExpIR(AApplyExpIR node) throws AnalysisException { _visitedNodes.add(node); A retVal = createNewReturnValue(node); mergeReturns(retVal,inAApplyExpIR(node)); if(node.getType() != null && !_visitedNodes.contains(node.getType())) { mergeReturns(retVal,node.getType().apply(this)); } if(node.getRoot() != null && !_visitedNodes.contains(node.getRoot())) { mergeReturns(retVal,node.getRoot().apply(this)); } { List<SExpIR> copy = new ArrayList<SExpIR>(node.getArgs()); for( SExpIR e : copy) { if(!_visitedNodes.contains(e)) { mergeReturns(retVal,e.apply(this)); } } } mergeReturns(retVal,outAApplyExpIR(node)); return retVal; }
public AApplyExpIR consUtilCopyCall() { ATemplateTypeIR copyType = new ATemplateTypeIR(); copyType.setName("T"); AApplyExpIR copyCall = consUtilCall(copyType, COPY); SExpIR member = copyCall.getRoot(); if (member instanceof AExplicitVarExpIR && ((AExplicitVarExpIR) member).getType() instanceof AMethodTypeIR) { AMethodTypeIR methodType = (AMethodTypeIR) member.getType(); methodType.getParams().add(member.getType().clone()); } else { log.error("Expected type of call expression to be a method type at this point. Got: " + copyCall.getType()); } return copyCall; }