Re: RFR (S): 8033666: Make sure @ForceInline is everywhere it needs to be in sun.misc and java.lang.invoke

2014-02-25 Thread John Rose
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

Re: RFR (S): 8033666: Make sure @ForceInline is everywhere it needs to be in sun.misc and java.lang.invoke

2014-02-25 Thread John Rose
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

Re: RFR (S): 8033666: Make sure @ForceInline is everywhere it needs to be in sun.misc and java.lang.invoke

2014-02-25 Thread Christian Thalinger
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)) +

RFR (S): 8033666: Make sure @ForceInline is everywhere it needs to be in sun.misc and java.lang.invoke

2014-02-25 Thread Vladimir Ivanov
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

Re: Signature of MethodHandleInfo.reflectAs is not specific enough

2014-02-25 Thread Ali Ebrahimi
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 =

Re: [9] RFR (M): 8027827: Improve performance of catchException combinator

2014-02-25 Thread Vladimir Ivanov
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