Skip to content

Commit

Permalink
Minor updated to the include transformation
Browse files Browse the repository at this point in the history
  • Loading branch information
miranha committed Dec 26, 2016
1 parent 60790e3 commit 6f50661
Showing 1 changed file with 39 additions and 36 deletions.
Expand Up @@ -41,52 +41,55 @@ public AddIncludesTrans(TransAssistantIR transformationAssistant)
{
}

@Override
public void caseAClassHeaderDeclIR(AClassHeaderDeclIR node)
throws AnalysisException
{
System.out.println();


List<CGenClonableString> includes = (List<CGenClonableString>) node.getIncludes();

CGenClonableString std_arge = new CGenClonableString("distCall");
includes.add(std_arge);
// node.getIncludes().add(std_arge);



// includes.add(std_arge);

// node.setin

}
// @Override
// public void caseAClassHeaderDeclIR(AClassHeaderDeclIR node)
// throws AnalysisException
// {
// System.out.println();
//
//
// List<CGenClonableString> includes = (List<CGenClonableString>) node.getIncludes();
//
// CGenClonableString std_arge = new CGenClonableString("distCall");
// includes.add(std_arge);
//// node.getIncludes().add(std_arge);
//
//
//
//// includes.add(std_arge);
//
//// node.setin
//
// }

@Override
public void caseADefaultClassDeclIR(ADefaultClassDeclIR node)
throws AnalysisException
{
ADefaultClassDeclIR cl = node;

// System.out.println("Dist transformation, method name: " + node.getName());
//if(node.getTag()!=null){

//String cpu = cl.getTag().toString();

if(node.getTag()!=null){
AClassHeaderDeclIR header = node.getAncestor(AClassHeaderDeclIR.class);

String cpu = cl.getTag().toString();

AClassHeaderDeclIR header = node.getAncestor(AClassHeaderDeclIR.class);

List<CGenClonableString> includes = (List<CGenClonableString>) header.getIncludes();

CGenClonableString std_arge = new CGenClonableString("distCall");
includes.add(std_arge);

header.setIncludes(includes);

//header.getIncludes()
List<CGenClonableString> includes = (List<CGenClonableString>) header.getIncludes();


CGenClonableString std_arge = new CGenClonableString("distCall");
includes.add(std_arge);

if(!cl.getName().equals(SystemArchitectureAnalysis.systemName)){
CGenClonableString sysName = new CGenClonableString(SystemArchitectureAnalysis.systemName);
includes.add(sysName);
}

header.setIncludes(includes);

//header.getIncludes()


//}
}


Expand Down

0 comments on commit 6f50661

Please sign in to comment.