RFR 8187742 Minimal set of bootstrap methods for dynamic constants
John Rose
john.r.rose at oracle.com
Thu Nov 9 00:01:20 UTC 2017
On Nov 7, 2017, at 12:59 PM, John Rose <john.r.rose at oracle.com> wrote:
>
> For condy, having the BSM validate types is a code smell
> for the reason you mention. Also, when primitives (and value
> types) are in the mix, people usually code the validation
> incorrectly, since Class.isInstance is the wrong tool, and
> the right tool is non-obvious (MHs.identity.asType).
For the record, here is a method that performs the correct conversions:
https://bugs.openjdk.java.net/browse/JDK-8190982
The bug suggests that it be called Class::convert.
The code itself is simple enough to cut-n-paste into your own BSMs.
— John
More information about the hotspot-dev
mailing list