Value Types Bytecodes - "Level 0" prototype

Paul Benedict pbenedict at apache.org
Tue Jun 28 15:27:12 UTC 2016


Do the value byte codes work only on the "flat" representation of the type?
I don't think Valhalla has gotten to the point of boxing the type (has
it?), but I am curious if these also operate on the boxed representation?

Cheers,
Paul

On Tue, Jun 28, 2016 at 6:57 AM, David Simms <david.simms at oracle.com> wrote:

>
> 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