case FKind.FlatFlagActionNode:
case FKind.FlatGlobalConvNode:
case FKind.FlatNop:
+ case FKind.FlatExit:
case FKind.FlatNew:
case FKind.FlatCastNode:
case FKind.FlatTagDeclaration:
-FLAGSLOCK=-mainclass ${MAINCLASS} -thread -optimize -abcclose -64bit -debug -joptimize
-FLAGSLOCKNOJ=-mainclass ${MAINCLASS} -thread -optimize -abcclose -64bit -debug
-FLAGSSTMNOJ=-mainclass ${MAINCLASS} -singleTM -optimize -64bit -debug -abcclose -transstats
-FLAGSSTM=-mainclass ${MAINCLASS} -singleTM -optimize -joptimize -64bit -debug -abcclose -transstats
-FLAGSOPTSTM=-mainclass ${MAINCLASS} -singleTM -optimize -joptimize -64bit -debug -abcclose -dcopts -transstats
-FLAGSFISSION=-mainclass ${MAINCLASS} -singleTM -delaycomp -optimize -joptimize -abcclose -64bit -debug -transstats -inlineatomic 2 -minimize
\ No newline at end of file
+FLAGSLOCK=-mainclass ${MAINCLASS} -thread -optimize -abcclose -64bit -debug -joptimize -arraypad
+FLAGSLOCKNOJ=-mainclass ${MAINCLASS} -thread -optimize -abcclose -64bit -debug -arraypad
+FLAGSSTMNOJ=-mainclass ${MAINCLASS} -singleTM -optimize -64bit -debug -abcclose -transstats -arraypad
+FLAGSSTM=-mainclass ${MAINCLASS} -singleTM -optimize -joptimize -64bit -debug -abcclose -transstats -arraypad
+FLAGSOPTSTM=-mainclass ${MAINCLASS} -singleTM -optimize -joptimize -64bit -debug -abcclose -dcopts -transstats -arraypad
+FLAGSFISSION=-mainclass ${MAINCLASS} -singleTM -delaycomp -optimize -joptimize -abcclose -64bit -debug -transstats -inlineatomic 2 -minimize -readset -arraypad
}
public int posrandom_generate() {
- int r=genrand_int32();
- if (r>0)
- return r;
- else
- return -r;
+ return 0x7fffffff&genrand_int32();
}
public int genrand_int32() {
Modifiers modifiers;
SymbolTable fields;
+ Vector fieldvec;
SymbolTable flags;
SymbolTable methods;
superclass=null;
flags=new SymbolTable();
fields=new SymbolTable();
+ fieldvec=new Vector();
methods=new SymbolTable();
classid=UIDCount++;
this.packagename=packagename;
return fields;
}
+ public Vector getFieldVec() {
+ return fieldvec;
+ }
+
public SymbolTable getFlagTable() {
return flags;
}
if (fields.contains(fd.getSymbol()))
throw new Error(fd.getSymbol()+" already defined");
fields.add(fd);
+ fieldvec.add(fd);
}
public void addMethod(MethodDescriptor md) {
}
printClassStruct(typeutil.getClass(TypeUtil.ObjectClass), outclassdefs);
+ if (state.ARRAYPAD)
+ outclassdefs.println(" int paddingforarray;");
+
outclassdefs.println(" int ___length___;");
outclassdefs.println("};\n");
outclassdefs.println("extern int classsize[];");
if (!fieldorder.containsKey(cn)) {
Vector fields=new Vector();
fieldorder.put(cn,fields);
- if (sp==null&&!state.TASK) {
- fields.add(cn.getFieldTable().get("cachedCode"));
- }
- Iterator fieldit=cn.getFields();
- while(fieldit.hasNext()) {
- FieldDescriptor fd=(FieldDescriptor)fieldit.next();
- if ((sp==null||!sp.getFieldTable().contains(fd.getSymbol()))&&!fd.getType().isPtr()&&
- (!fd.getSymbol().equals("cachedCode")||state.TASK))
- fields.add(fd);
- }
- fieldit=cn.getFields();
- while(fieldit.hasNext()) {
- FieldDescriptor fd=(FieldDescriptor)fieldit.next();
- if ((sp==null||!sp.getFieldTable().contains(fd.getSymbol()))&&fd.getType().isPtr()&&
- (!fd.getSymbol().equals("cachedCode")||state.TASK))
+ Vector fieldvec=cn.getFieldVec();
+ for(int i=0;i<fieldvec.size();i++) {
+ FieldDescriptor fd=(FieldDescriptor)fieldvec.get(i);
+ if ((sp==null||!sp.getFieldTable().contains(fd.getSymbol())))
fields.add(fd);
}
}
public boolean OPTIONAL=false;
public boolean ARRAYBOUNDARYCHECK=true;
public boolean RAW=false;
+ public boolean ARRAYPAD=false;
public boolean SCHEDULING=false;
public boolean USEPROFILE=false;
public boolean THREAD=false;
state.OPTIMIZE=true;
else if (option.equals("-dcopts"))
state.DCOPTS=true;
+ else if (option.equals("-arraypad"))
+ state.ARRAYPAD=true;
else if (option.equals("-delaycomp"))
state.DELAYCOMP=true;
else if (option.equals("-raw"))
then
JAVAOPTS="$JAVAOPTS -excprefetch $2"
shift
+elif [[ $1 = '-arraypad' ]]
+then
+JAVAOPTS="$JAVAOPTS -arraypad"
elif [[ $1 = '-dsm' ]]
then
JAVAOPTS="$JAVAOPTS -dsm"