deep

a Cross Development Platform for Java

User Tools

Site Tools


dev:rts:start

Runtime System (RTS)

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.

Content of the RTS

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.

classmodificationimplements marker interface
java/lang/ArrayIndexOutOfBoundsException+ operator for strings deletedyes
java/lang/Booleanconstant TYPE deleted, method toString replaced, method parseBoolean replaced, method to read system properties deletedyes
java/lang/Byte+ operator for strings deleted, constant TYPE deleted, method toHexString deleted, no cacheyes
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 cacheyes
java/lang/Classa simple stubyes
java/lang/Doubleown implementation with focus on low level routines and effciencyyes
java/lang/Enum+ operator for strings deleted, inner class removed, method clone removed, method compareTo replaced, method getDeclaringClass removed, method valueOf replacedyes
java/lang/Floatown implementation with focus on low level routines and effciencyyes
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 cacheyes
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 cacheyes
java/lang/Mathown implementation with focus on low level routines and effciency, some methods still missingyes
java/lang/Objectown implementation, some methods still missingno
java/lang/Short+ operator for strings deleted, constant TYPE deleted, no cacheyes
java/lang/Stringown implementation with focus on effciency, some methods still missingyes
java/lang/Systemown implementationyes
java/lang/Throwableown implementation, no stack traceyes
java/io/InputStreammethod read(buffer, off, count) changed, method skip removedyes
java/io/OutputStreammethod write(buffer, off, count) changed yes
java/io/PrintStreamown implementation (no string allocation) yes
java/util/Random+ operator for strings deleted, seed altered, use Math instead of StrictMathyes

Next Step

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.

dev/rts/start.txt · Last modified: 2022/12/20 11:27 by ursgraf