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