On Feb 25, 2014, at 4:16 PM, Vladimir Ivanov
wrote:
> As an interim fix, I moved castReference method into
> java.lang.invoke.MethodHandleImpl class and added new entry point
> ValueConversions::cast which accepts a method handle to a method which
> should be used for casting.
P.S. Reviewed
On Feb 25, 2014, at 5:17 PM, Christian Thalinger
wrote:
> While touching the code some time ago John and I were playing around with the
> idea to call Class.cast in the failing case:
>
> + static T castReference(Class t, U x) {
> + // inlined Class.cast because we can't ForceInlin
Looks good.
While touching the code some time ago John and I were playing around with the
idea to call Class.cast in the failing case:
+ static T castReference(Class t, U x) {
+ // inlined Class.cast because we can't ForceInline it
+ if (x != null && !t.isInstance(x))
+
http://cr.openjdk.java.net/~vlivanov/8033666/webrev.01/
https://bugs.openjdk.java.net/browse/JDK-8033666
ValueConversions::castReference was introduced to workaround a problem
with unreliable inlining of Class::cast method. Unfortunately, since
ValueConversions class is located in sun.invoke.uti
Hi,
I know, this is too late, but I want to share my suggestion:
public T reflectAs(Class expected, MethodHandles.Lookup lookup)
Member mr = reflectAs(Member.class, MethodHandles.lookup());
AnnotatedElement ae = reflectAs(AnnotatedElement.class,
MethodHandles.lookup());
AnnotatedElement am =
John,
Thanks for review!
Updated webrev:
http://cr.openjdk.java.net/~vlivanov/8027827/final/webrev.02/
See my comments inline.
Also, integrated some pending cleanups (e.g. improved selectAlternative
detection).
Best regards,
Vladimir Ivanov
On 2/24/14 9:46 PM, John Rose wrote:
> On Feb 20, 2