Re: [9] RFR (M): 8050877: Improve code for pairwise argument conversions and value boxing/unboxing

2014-07-18 Thread Vladimir Ivanov

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
___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev


Re: [9] RFR (M): 8050884: Intrinsify ValueConversions.identity() functions

2014-07-18 Thread Vladimir Ivanov

Thanks for review, Paul.


Looks good.

Same question as in previous email on @Stable for MethodHandles.IDENTITY_MHS.

FWIW for MethodHandles.IDENTITY_MHS the Wrapper.ordinal() is used as an index 
rather than using an EnumMap.
Yes, caching logic is inconsistent across java.lang.invoke. I'll try to 
unify it.


Best regards,
Vladimir Ivanov
___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev