bug fix
authorbdemsky <bdemsky>
Thu, 21 Aug 2008 00:15:01 +0000 (00:15 +0000)
committerbdemsky <bdemsky>
Thu, 21 Aug 2008 00:15:01 +0000 (00:15 +0000)
Robust/src/IR/Flat/BuildCode.java
Robust/src/Runtime/DSTM/interface/dstm.h

index 6e1641fd63cabd88ffc85e6f1acf8723755c6bf0..89e549f19e4833f3d9b34f436293cd8102ec1f6a 100644 (file)
@@ -1987,7 +1987,7 @@ public class BuildCode {
       String dst=generateTemp(fm,fsfn.getDst(),lb);
       if (srcglobal) {
        output.println("{");
-       output.println("int srcoid="+src+"!=NULL?((int)"+src+"->"+oidstr+"):0);");
+       output.println("int srcoid=("+src+"!=NULL?((int)"+src+"->"+oidstr+"):0);");
       }
       if (statusdst.equals(LocalityAnalysis.GLOBAL)) {
        String glbdst=dst;
@@ -2119,7 +2119,7 @@ public class BuildCode {
       if (srcglobal) {
        output.println("{");
        String src=generateTemp(fm, fsen.getSrc(), lb);
-       output.println("int srcoid="+src+"!=NULL?((int)"+src+"->"+oidstr+"):0);");
+       output.println("int srcoid=("+src+"!=NULL?((int)"+src+"->"+oidstr+"):0);");
        output.println("((int*)(((char *) &("+ generateTemp(fm,fsen.getDst(),lb)+"->___length___))+sizeof(int)))["+generateTemp(fm, fsen.getIndex(),lb)+"]=srcoid;");
        output.println("}");
       } else {
index fab894a86c6655e2213e1713d89551837578aa2f..d4091a228d2ae9ed4da83ecef03f9a4d5068d42e 100644 (file)
@@ -105,7 +105,7 @@ typedef struct objheader {
   (*((unsigned int *)&((struct ___Object___ *)((unsigned int) x + sizeof(objheader_t)))->___nextobject___))
 
 #define COMPOID(x) \
-  ((void*)(((void *) x )!=NULL)?(*((unsigned int *)&((struct ___Object___ *) x)->___nextobject___))):0
+  ((void*)((((void *) x )!=NULL)?(*((unsigned int *)&((struct ___Object___ *) x)->___nextobject___)):0))
 
 #define STATUS(x) \
   *((unsigned int *) &(((struct ___Object___ *)((unsigned int) x + sizeof(objheader_t)))->___localcopy___))