[9] RFR (S) 8050173: Generalize BMH.copyWith API to all method handles (original) (raw)
Vladimir Ivanov vladimir.x.ivanov at oracle.com
Mon Jul 14 14:37:47 UTC 2014
- Previous message: [9] RFR (M): 8050166: Get rid of some package-private methods on arguments in j.l.i.MethodHandle
- Next message: [9] RFR (S) 8050173: Generalize BMH.copyWith API to all method handles
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
http://cr.openjdk.java.net/~vlivanov/8050173/webrev.00/ https://bugs.openjdk.java.net/browse/JDK-8050173
Added j.l.i.MethodHandle.copyWith(MethodType, LambdaForm) and provided implementation for all subclasses.
Also, some cleanups:
- rewrote MH.viewAsType on top of MH.copyWith;
- extended MH.viewAsType to do strict checks w/ assertions turned on (new parameter: boolean strict);
- extended MT.isViewableAs to accept both interface preserving and interface erasing conversions (new parameter: boolean keepInterfaces).
Testing: jdk/java/lang/invoke, jdk/java/util/streams, nashorn, octane w/ "-ea -esa" and COMPILE_THRESHOLD={0,30}.
Reviewed-by: vlivanov, ? Contributed-by: john.r.rose at oracle.com
Thanks!
Best regards, Vladimir Ivanov
- Previous message: [9] RFR (M): 8050166: Get rid of some package-private methods on arguments in j.l.i.MethodHandle
- Next message: [9] RFR (S) 8050173: Generalize BMH.copyWith API to all method handles
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]