@Override public void caseAMethodDeclIR(AMethodDeclIR node) throws AnalysisException { handleMethodOrFunc(node.getBody(), node.getPreCond(), node.getPostCond()); }
@Override public void caseADefaultClassDeclIR(ADefaultClassDeclIR node) throws AnalysisException { if (isBridgeClass(node)) { for (AMethodDeclIR m : node.getMethods()) { if (isDelegateCall(m.getBody())) { log.debug("Updating " + node.getName() + "." + m.getName() + " to use delegate method " + getFullDelegateName(node) + "." + m.getName()); assist.replaceNodeWith(m.getBody(), consDelegateCall(node.getName(), m)); } } } }
node.getBody().apply(this);
SStmIR body = node.getBody();
@Override public SDeclIR caseAImplicitOperationDefinition( AImplicitOperationDefinition node, IRInfo question) throws AnalysisException { AMethodDeclIR method = question.getDeclAssistant().initMethod(node, question); if (method == null) { question.addUnsupportedNode(node, "Expected method type for explicit operation. Got: " + node.getType()); return null; } // The curent IR construction does not include: // // Name of result and its type: // APatternTypePair res = node.getResult(); // Ext clauses (read and write): // LinkedList<AExternalClause> externals = node.getExternals(); // Exceptions thrown: // LinkedList<AErrorCase> errors = node.getErrors(); if(method.getBody() == null) { method.setBody(new ANotImplementedStmIR()); } method.setFormalParams(question.getDeclAssistant().consFormalParams(node.getParameterPatterns(), question)); return method; }
SStmIR body = node.getBody(); getTransAssist().replaceNodeWith(body, replBody); replBody.getStatements().add(body);
ensureStoreLookups(meetsPredMethod.getBody());
SStmIR body = method.getBody();