X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=Robust%2Fsrc%2FClassLibrary%2FSystem.java;h=df5fd33b75e7be7e18f6e753d7c4cbbd4ec6d924;hb=898e8009969e162939128b41ec2014d72ff25377;hp=00f129a153b2ccda3f642fe94c75dbd680908ab7;hpb=4a9f8ad0f03a075a27f19abf1c01ffcdff53e34f;p=IRC.git diff --git a/Robust/src/ClassLibrary/System.java b/Robust/src/ClassLibrary/System.java index 00f129a1..df5fd33b 100644 --- a/Robust/src/ClassLibrary/System.java +++ b/Robust/src/ClassLibrary/System.java @@ -1,20 +1,91 @@ public class System { - public static void printInt(int x) { - String s=String.valueOf(x); - printString(s); - } + public static void printInt(int x) { + String s=String.valueOf(x); + printString(s); + } - public static native long currentTimeMillis(); + public static native void gc(); - public static native void printString(String s); + public static native long currentTimeMillis(); - public static void error() { - System.printString("Error (Use Breakpoint on ___System______error method for more information!)\n"); - } + public static native long microTimes(); - public static native void exit(int status); - - public static native void printI(int status); + public static native long getticks(); - public static native void clearPrefetchCache(); + public static native void printString(String s); + + public static void println(String s) { + System.printString(s+"\n"); + } + + public static void println(Object o) { + System.printString(""+o+"\n"); + } + + public static void println(int o) { + System.printString(""+o+"\n"); + } + + public static void println(double o) { + System.printString(""+o+"\n"); + } + + public static void println(long o) { + System.printString(""+o+"\n"); + } + + public static void println() { + System.printString("\n"); + } + + public static void print(String s) { + System.printString(s); + } + + public static void print(Object o) { + System.printString(""+o); + } + + public static void print(int o) { + System.printString(""+o); + } + + public static void print(double o) { + System.printString(""+o); + } + + public static void print(long o) { + System.printString(""+o); + } + + public static void error() { + System.printString("Error (Use Breakpoint on ___System______error method for more information!)\n"); + } + + public static native void exit(int status); + + public static native void printI(int status); + + public static native void clearPrefetchCache(); + + public static native void rangePrefetch(Object o, short[] offsets); + + public static native void deepArrayCopy(Object dst, Object src); + + public static native void Assert(boolean status); + + /* Only used for microbenchmark testing of SingleTM version */ + public static native void logevent(int event); + public static native void logevent(); + + /* Only used for microbenchmark testing of SingleTM version */ + public static native void initLog(); + + public static native void flushToFile(int threadid); + /* Only used for microbenchmark testing of SingleTM version */ + + public static native void arraycopy(Object src, int srcPos, Object dst, int destPos, int length); + + // for disjoint reachability analysis + public static void genReach(); }