RFR: typed bytecodes - first push

frederic parain frederic.parain at oracle.com
Mon Dec 12 17:58:29 UTC 2016


Here's what the typed bytecodes look like today:

http://cr.openjdk.java.net/~fparain/typed-bytecodes/webrev.00/

Summary:
   - the framework to declare and implement typed bytecodes is
     in place
   - typed bytecodes can be implemented either by aliasing an
     existing bytecode or by providing a template to generate
     the interpreter Codelet (re-using existing templates is
     possible)
   - the 'typed' opcode currently takes an UTF8 argument
     (will be changed in the future)
   - the two arguments currently recognized by the 'typed'
     opcode are 'I' and 'F', respectively for int and float
   - the list of bytecodes supporting the 'typed' prefix is:
     aload, aload_0, aload_1, aload_2, aload_3, astore,
     astore_0, astore_1, astore_2, astore_3, aaload, aastore,
     areturn, anewarray, aconst_null
   - the unit tests are using the bytecodes API

Limitations:
   - no JIT support

The last missing part is the comparison opcodes, if_acmp<cond>.
The problem is the non-orthogonality of comparisons opcodes
between references, integers values and floating point values.
Maurizio has a patch ready to generate typed if_acmp<cond>
sequences, the support in the JVM should be added soon.

Thanks,

Fred



More information about the valhalla-dev mailing list