Stable compile, seg fault in MLP mode.
authorjjenista <jjenista>
Tue, 26 May 2009 20:55:08 +0000 (20:55 +0000)
committerjjenista <jjenista>
Tue, 26 May 2009 20:55:08 +0000 (20:55 +0000)
Robust/src/IR/Flat/BuildCode.java
Robust/src/Tests/mlp/tinyTest/makefile

index a58b3622bc33ce13f472cbcf814a36bfa221f55e..93b2228fd099dc3b179838ff322d66f1e0213ea2 100644 (file)
@@ -1777,6 +1777,7 @@ public class BuildCode {
        FlatNode nextnode;
        if (state.MLP && current_node.kind()==FKind.FlatSESEEnterNode) {
          FlatSESEEnterNode fsen = (FlatSESEEnterNode)current_node;
+         generateFlatNode(fm, lb, current_node, output);
          nextnode=fsen.getFlatExit().getNext(0);
        } else {
          output.print("   ");
@@ -1886,9 +1887,11 @@ public class BuildCode {
       return;
 
     case FKind.FlatSESEEnterNode:
+      generateFlatSESEEnterNode(fm, lb, (FlatSESEEnterNode)fn, output);
       return;
 
     case FKind.FlatSESEExitNode:
+      generateFlatSESEExitNode(fm, lb, (FlatSESEExitNode)fn, output);
       return;
 
     case FKind.FlatGlobalConvNode:
@@ -2265,10 +2268,25 @@ public class BuildCode {
     output.println("}");
   }
 
-  public void generateFlatSESEEnterNode(FlatMethod fm,  LocalityBinding lb, FlatSESEEnterNode faen, PrintWriter output) {
+  public void generateFlatSESEEnterNode(FlatMethod fm,  LocalityBinding lb, FlatSESEEnterNode fsen, PrintWriter output) {
+    if( !state.MLP ) {
+      // SESE nodes can be parsed for normal compilation, just skip over them
+      return;
+    }
+    
+    output.println("  invokeSESEmethod("+
+                   fsen.getIdentifier()+", "+
+                   "malloc( sizeof( struct SESErecord ) ), "+
+                   "NULL"+
+                   ");"
+                   );
   }
 
-  public void generateFlatSESEExitNode(FlatMethod fm,  LocalityBinding lb, FlatSESEExitNode faen, PrintWriter output) {
+  public void generateFlatSESEExitNode(FlatMethod fm,  LocalityBinding lb, FlatSESEExitNode fsen, PrintWriter output) {
+    if( !state.MLP ) {
+      // SESE nodes can be parsed for normal compilation, just skip over them
+      return;
+    }
   }
 
   private void generateFlatCheckNode(FlatMethod fm,  LocalityBinding lb, FlatCheckNode fcn, PrintWriter output) {
index 4c4a7a8c408f888f5b940df5b9e0e1f56ef8911f..88d02d0ed140ec45059b72aaebf01f32db6be0cd 100644 (file)
@@ -3,8 +3,8 @@ PROGRAM=test
 SOURCE_FILES=$(PROGRAM).java
 
 BUILDSCRIPT=~/research/Robust/src/buildscript
-BSFLAGS= -mlpdebug  -mainclass Test -ownership -ownallocdepth 1 -ownwritedots final -enable-assertions -flatirusermethods -ownaliasfile aliases.txt
-#BSFLAGS= -mainclass Test -ownership -ownallocdepth 1 -ownwritedots final -enable-assertions -flatirusermethods -ownaliasfile aliases.txt
+#BSFLAGS= -mlpdebug  -mainclass Test -ownership -ownallocdepth 1 -ownwritedots final -enable-assertions -flatirusermethods -ownaliasfile aliases.txt
+BSFLAGS= -mainclass Test -ownership -ownallocdepth 1 -ownwritedots final -enable-assertions -flatirusermethods -ownaliasfile aliases.txt
 
 
 all: $(PROGRAM).bin