bug fix for prefetch analysis
case FKind.FlatNew:
case FKind.FlatCastNode:
case FKind.FlatTagDeclaration:
+ case FKind.FlatInstanceOfNode:
processDefaultCase(curr,child_prefetch_set_copy);
break;
return PI;
}
+ public static int abs(int x) {
+ if (x < 0) {
+ return -x;
+ } else {
+ return x;
+ }
+ }
+
public static double fabs(double x) {
if (x < 0) {
return -x;
}
}
+ public static int max(int a, int b) {
+ if(a == b)
+ return a;
+ if(a > b) {
+ return a;
+ } else {
+ return b;
+ }
+ }
+
public static int imax(int a, int b) {
if(a == b)
return a;
array[index] = obj;
}
+ public void remove(Object o) {
+ int getIndex;
+ for(int i=0; i<size; i++) {
+ if (o.equals(array[i]))
+ getIndex = i;
+ }
+ for(int i=getIndex; i<(size-1); i++) {
+ array[i]=array[i+1];
+ }
+ size--;
+ }
+
+
public void removeElementAt(int index) {
if (index<0||index>=size) {
System.printString("Illegal Vector.removeElementAt\n");
removeElementAt(0);
}
}
+
+ public boolean contains(Object o) {
+ for(int i = 0; i < size; i++) {
+ if(o.equals(array[i]))
+ return true;
+ }
+ return false;
+ }
}