Value Types Bytecodes - "Level 0" prototype
David Simms
david.simms at oracle.com
Tue Jun 28 11:57:45 UTC 2016
Recently pushed some basic "value type" prototype code to Valhalla
repository.
Usual caveats apply *this is a prototype*, things will change, the
format of the bytecodes or whether we go ahead with said bytecodes at
all. From bytecodes.hpp (mostly correspond to aref bytecodes):
// value-type bytecodes
_vload = 203, // 0xcb
_vstore = 204, // 0xcc
_vaload = 205, // 0xcd
_vastore = 206, // 0xce
_vnew = 207, // 0xcf
_vnewarray = 208, // 0xd0
_multivnewarray = 209, // 0xd1
_vreturn = 210, // 0xd2
_vgetfield = 211, // 0xd3
_typed = 212, // 0xd4
_invokedirect = 213, // 0xd5
"Level 0" Prototype: Currently value types are simply modelled with oops
and heap allocated for simplicity (class derives from instanceKlass).
The semantics of value types are mostly there, but there is currently no
stack or thread local allocation, work for the future. There is initial
support for flattened compositions of values and array elements.
The prototype "value types" have no JIT or verifier support, so code
that wants to play with value types:
* x86_64, Linux and Mac only.
* "-noverify -Xint", no verify or JIT support
* GC should be fine, not that we have extensively tested all GC
configurations
* invokedirect can execute values methods, that's about it
o the type system isn't anywhere near being completely defined
(e.g. should value types implement interfaces, and if so, how)
Folks that don't use value types shouldn't notice any restrictions using
the JIT etc.
Cheers
/David Simms
More information about the valhalla-dev
mailing list