The Java standard library is very powerful and rich. However, as our target compiler puts its focus on efficiency we do not want to support the full library. Some of the base classes, notably java/lang/String, is implemented much more efficient than the standard library. This leads to a very small memory footprint.
The RTS for users is described in Runtime Library. Below you can find details for developers.
We use the Java library from the Android project. It stands under the Apache Licence 2.0 and we can alter any class with ease as we also release the target library under the same licence. Some classes can be taken directly, several classes must be simplified or modified. These classes are marked by implementing a special marker interface (org.deepjava.marker.Modified).
Currently, the class path of a deep project must include the target library with the runtime system. This allows the java compiler to find and resolve its classes when translating into Bytecode. Further, the deep project file must include the path to the class files of the runtime system in order to translate from Bytecode into machine code.
|class||modification||implements marker interface|
|java/lang/ArrayIndexOutOfBoundsException||+ operator for strings deleted||yes|
|java/lang/Boolean||constant TYPE deleted, method toString replaced, method parseBoolean replaced, method to read system properties deleted||yes|
|java/lang/Byte||+ operator for strings deleted, constant TYPE deleted, method toHexString deleted, no cache||yes|
|java/lang/Character||+ operator for strings deleted, constant TYPE deleted, inner class UnicodeBlock deleted, all native methods deleted and calls to them replaced, calls to Array.checkOffsetAndCount deleted, no cache||yes|
|java/lang/Class||a simple stub||yes|
|java/lang/Double||own implementation with focus on low level routines and effciency||yes|
|java/lang/Enum||+ operator for strings deleted, inner class removed, method clone removed, method compareTo replaced, method getDeclaringClass removed, method valueOf replaced||yes|
|java/lang/Float||own implementation with focus on low level routines and effciency||yes|
|java/lang/Integer||+ operator for strings deleted, constant TYPE deleted, method toString replaced, method toCharArray added, method toHexString replaced, method toOctalString deleted, method toBinaryString replaced, all methods to read system properties deleted, no cache||yes|
|java/lang/Long||+ operator for strings deleted, constant TYPE deleted, method toString replaced, method toHexString replaced, method toOctalString deleted, method toBinaryString replaced, all methods to read system properties deleted, no cache||yes|
|java/lang/Math||own implementation with focus on low level routines and effciency, some methods still missing||yes|
|java/lang/Object||own implementation, some methods still missing||no|
|java/lang/Short||+ operator for strings deleted, constant TYPE deleted, no cache||yes|
|java/lang/String||own implementation with focus on effciency, some methods still missing||yes|
|java/lang/Throwable||own implementation, no stack trace||yes|
|java/io/InputStream||method read(buffer, off, count) changed, method skip removed||yes|
|java/io/OutputStream||method write(buffer, off, count) changed||yes|
|java/io/PrintStream||own implementation (no string allocation)||yes|
|java/util/Random||+ operator for strings deleted, seed altered, use Math instead of StrictMath||yes|
We plan to use many more classes of the standard library. For this purpose we will have to include the target library together with the standard library in the classpath. Also, the deep project file will specify the path of the target library together with the standard library. The order of import will define the precedence of classes with the same name in both locations.