Java is arguably the most commonly used programming language and resides on an increasingly diverse number of platforms. This exacerbates the problem of running targeted compiler tests in an efficient manner. The new Java platform includes a tool that automates the runtime compiler tests.
This new tool starts by generating a random set of Java source code and/or bytecode. The generated code will have three key characteristics:
- It will be syntactically correct
- It will be semantically correct
- It will use a random seed that permits reusing the same randomly generated code
The source code that is randomly generated will be saved in the following directory:
hotspot/test/testlibrary/jit-tester
These test cases will be stored for later reuse. They can be run from the j-treg directory or from the tool's makefile. One of the benefits...