[MVT] value type and getClass()

John Rose john.r.rose at oracle.com
Sat Aug 5 19:28:03 UTC 2017

On Aug 5, 2017, at 12:55 AM, forax at univ-mlv.fr wrote:
> I want to use __Value as carrier type (between invokedynamic and the switch) in a possible alternative translation of a pattern matching.

Ultimately that is what we think we will use for C, as part of a general
upward move from L-Object to U-Object.  You are noticing that __Value
is an early version of U-Object.  It's not in the center of the MVT design,
but it is something we are giving limited support for, so we can write
our own polymorphic code (LFs).

As a top-type for values, __Value can be dynamically checked and casted.
(Or else the system is unsafe.)  The details for how to do this are subject
to change.  In the end I expect to see bytecodes like instanceof and checkcast
which operate on Q/U carriers, plus (when we get proper value classes)
a method like or identical to getClass.

— John

More information about the valhalla-dev mailing list