More class library support for SPECjbb
[IRC.git] / Robust / src / ClassLibrary / System.java
1 import java.util.Properties;
2
3 public class System {
4   PrintStream out;
5   
6   public System() {
7     out = new PrintStream("System.out");
8   }
9   
10   public static void printInt(int x) {
11     String s=String.valueOf(x);
12     printString(s);
13   }
14
15   public static native long currentTimeMillis();
16   
17   public static native long microTimes();
18
19   public static native long getticks();
20
21   public static native void printString(String s);
22
23   public static void println(String s) {
24     System.printString(s+"\n");
25   }
26
27   public static void println(Object o) {
28     System.printString(""+o+"\n");
29   }
30
31   public static void println(int o) {
32     System.printString(""+o+"\n");
33   }
34
35   public static void println(double o) {
36     System.printString(""+o+"\n");
37   }
38
39   public static void println(long o) {
40     System.printString(""+o+"\n");
41   }
42   
43   public static void println() {
44     System.printString("\n");
45   }
46
47   public static void print(String s) {
48     System.printString(s);
49   }
50
51   public static void print(Object o) {
52     System.printString(""+o);
53   }
54
55   public static void print(int o) {
56     System.printString(""+o);
57   }
58
59   public static void print(double o) {
60     System.printString(""+o);
61   }
62
63   public static void print(long o) {
64     System.printString(""+o);
65   }
66
67   public static void error() {
68     System.printString("Error (Use Breakpoint on ___System______error method for more information!)\n");
69   }
70
71   public static native void exit(int status);
72
73   public static native void printI(int status);
74
75   public static native void clearPrefetchCache();
76
77   public static native void rangePrefetch(Object o, short[] offsets);
78
79   public static native void deepArrayCopy(Object dst, Object src);
80
81   public static native void Assert(boolean status);
82
83   /* Only used for microbenchmark testing of SingleTM version */
84   public static native void logevent(int event);
85   public static native void logevent();
86
87   /* Only used for microbenchmark testing of SingleTM version */
88   public static native void initLog();
89
90   public static native void flushToFile(int threadid);
91   /* Only used for microbenchmark testing of SingleTM version */
92
93   public static native void arraycopy(Object src, int srcPos, Object dst, int destPos, int length);
94
95   // for disjoint reachability analysis
96   public static void genReach();
97   
98   private static Properties props;
99   private static native Properties initProperties(Properties props);
100   
101   public static Properties getProperties() {
102     return props;
103   }
104 }