RFR JDK-8182678: add javac and method handle support for mangled value class names in CONSTANT_ClassInfo
maurizio.cimadamore at oracle.com
Thu Jun 22 14:31:45 UTC 2017
I've uploaded new webrevs; the first fixes an issue with ClassReader -
which should return a symbol, not a type, when reading a value type
signature inside a ClassInfo:
The second does a little tweak to the bytecode API to add stackmap support
I did a bit of tests with stackmaps and Qtypes and it looks ok. The fact
that values are encoded as 'weird' ClassInfo simplifies things
considerably, as most of the infrastructure just works.
On 22/06/17 12:35, Maurizio Cimadamore wrote:
> On 22/06/17 02:22, Paul Sandoz wrote:
>> Looks good, although it would be nice if the javac and java
>> properties were the same name as it’s hard to remember the plethora
>> of such properties that are available.
> Sure - note that I tried to use the same name - but the javac
> convention is not to use any qualified name for options, while it
> seems like all the MVT-related options in the JDK starts off with
> 'valhalla.' - which is why I landed there, as the option name is kind
> of the same (mangleClassInfo is contained in both), and the scheme is
> consistent with both javac and jdk unwritten rules.
> That said, if you think it's too confusing, I can change it no problem.
>>> On 21 Jun 2017, at 17:12, Maurizio Cimadamore
>>> <maurizio.cimadamore at oracle.com> wrote:
>>> the following two patches:
>>> Add support for mangled value class names in ClassInfo for both
>>> javac and the bytecode API (used for MH spinning).
>>> The support is enabled with these two options:
>>> javac: -XDmangleClassInfo
>>> jdk: -Dvalhalla.mangleClassInfo=true
>>> I also added class reading support to javac - and that's always
>>> I verified that javap works as expected - since a ClassInfo is just
>>> a string, javap doesn't complain if there's an extra ';' prefix in
>>> there, so things looks good already.
More information about the valhalla-dev