[9] RFR (M): 8050877: Improve code for pairwise argument conversions and value boxing/unboxing
Vladimir Ivanov
vladimir.x.ivanov at oracle.com
Fri Jul 18 11:02:04 UTC 2014
Thanks for review, Paul.
>
> MethodHandleImpl
>
> Merge the the 'if' into an 'else if':
> 365 } else {
> 366 if (dst.isPrimitive()) {
Done.
> ValueConversions
>
> I can see why an EnumMap is used for convenience mapping the Wrapper to MH. IIUC it means the MH ref values are not @Stable? I guess it would be easy to unpack into an explicit array and index from the wrapper ordinal, plus then no additional runtime type checks on the key will be performed for get/put. Dunno how important that is.
>
> Can UNBOX_CONVERSIONS be marked as @Stable? does that make any difference? Same for BOX_CONVERSIONS etc.
All 4 caches in ValueConversions can be marked as @Stable. But it's not
performance critical, because they are used only during MethodHandle
instantiation, which is expected to be expensive. Performance-wise it
make sense to reuse MethodHandles.
Best regards,
Vladimir Ivanov
More information about the mlvm-dev
mailing list