Re: RFR(M): 8156915: introduce MethodHandle factory for array length

2016-05-23 Thread Michael Haupt
... thank you so much, Uwe - it's up for review now. Best, Michael > Am 20.05.2016 um 09:42 schrieb Uwe Schindler : > > Hi, > > I just noticed that there is the @since missing in javadocs: > http://hg.openjdk.java.net/jdk9/dev/jdk/rev/fd39cefc5c8f#l3.13 > arrayConstructor has @since 9, but ar

RE: RFR(M): 8156915: introduce MethodHandle factory for array length

2016-05-20 Thread Uwe Schindler
://lucene.apache.org/ > -Original Message- > From: core-libs-dev [mailto:core-libs-dev-boun...@openjdk.java.net] On > Behalf Of Michael Haupt > Sent: Wednesday, May 18, 2016 9:53 AM > To: Core-Libs-Dev > Subject: RFR(M): 8156915: introduce MethodHandle factory for array le

Re: RFR(M): 8156915: introduce MethodHandle factory for array length

2016-05-18 Thread Vladimir Ivanov
Thanks Vladimir! This is how I understood it, but I did not see the place in code where the actual switch between those "modes" is done, as I have seen they are compiled-up-front. The decision is made in LambdaForm.prepare() and LF.checkInvocationCounter(). MethodHandleStatics.COMPILE_THRE

RE: RFR(M): 8156915: introduce MethodHandle factory for array length

2016-05-18 Thread Uwe Schindler
Hi, > > P.S.: I am not so familiar with the intrinsic stuff, so here is my > > question: The > intrinsic for the array accesses is always created before caching the MH; so > why do we need the static implementation methods at all? I had the same > question also about the old element getters and s

Re: RFR(M): 8156915: introduce MethodHandle factory for array length

2016-05-18 Thread Michael Haupt
Hi Stanislav, yes please, file and assign to me. Best, Michael > Am 18.05.2016 um 12:52 schrieb stanislav lukyanov > : > > Hi Michael, > > I've noticed that neither the new method nor its friends, arrayElementGetter > and arrayElementSetter, > discuss the invocation-time behavior. > It seem

Re: RFR(M): 8156915: introduce MethodHandle factory for array length

2016-05-18 Thread Vladimir Ivanov
Subject: RFR(M): 8156915: introduce MethodHandle factory for array length Dear all, please review this change. RFE: https://bugs.openjdk.java.net/browse/JDK-8156915 Webrev: http://cr.openjdk.java.net/~mhaupt/8156915/webrev.00/ Thanks, Michael -- <http://www.oracle.com/> Dr. Michael Haupt | Princ

Re: RFR(M): 8156915: introduce MethodHandle factory for array length

2016-05-18 Thread stanislav lukyanov
Hi Michael, I've noticed that neither the new method nor its friends, arrayElementGetter and arrayElementSetter, discuss the invocation-time behavior. It seems important since there are exceptions to be documented. I think the best way would be to make a connection between the methods and cor

RE: RFR(M): 8156915: introduce MethodHandle factory for array length

2016-05-18 Thread Uwe Schindler
re-libs-dev-boun...@openjdk.java.net] On > Behalf Of Michael Haupt > Sent: Wednesday, May 18, 2016 9:53 AM > To: Core-Libs-Dev > Subject: RFR(M): 8156915: introduce MethodHandle factory for array length > > Dear all, > > please review this change. > RFE: https://bugs.openjdk

Re: RFR(M): 8156915: introduce MethodHandle factory for array length

2016-05-18 Thread Michael Haupt
Hi Vladimir, pushed already. I'll piggyback this on a future change. Best, Michael > Am 18.05.2016 um 11:47 schrieb Vladimir Ivanov : > > src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java > +throw new AssertionError(); > > +throw new IllegalStateExcept

RE: RFR(M): 8156915: introduce MethodHandle factory for array length

2016-05-18 Thread Uwe Schindler
bs-dev-boun...@openjdk.java.net] On > Behalf Of Sundararajan Athijegannathan > Sent: Wednesday, May 18, 2016 10:07 AM > To: core-libs-dev@openjdk.java.net > Subject: Re: RFR(M): 8156915: introduce MethodHandle factory for array > length > > +1 > > Minor comment: > > File

Re: RFR(M): 8156915: introduce MethodHandle factory for array length

2016-05-18 Thread Vladimir Ivanov
src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java +throw new AssertionError(); +throw new IllegalStateException("should not reach here"); Please, use InternalError to signal about error conditions (there's MHS.newInternalError(String)) and put a message

Re: RFR(M): 8156915: introduce MethodHandle factory for array length

2016-05-18 Thread Sundararajan Athijegannathan
+1 Minor comment: File: MethodHandleImpl.java If "checks" can be inside the assert. + if (access == ArrayAccess.SET) assert(mh.type().parameterType(2) == Object.class); + if (access == ArrayAccess.GET) { + assert(mh.type().returnType() == Object.class); + assert(correctType.parameterType(0).getC

RFR(M): 8156915: introduce MethodHandle factory for array length

2016-05-18 Thread Michael Haupt
Dear all, please review this change. RFE: https://bugs.openjdk.java.net/browse/JDK-8156915 Webrev: http://cr.openjdk.java.net/~mhaupt/8156915/webrev.00/ Thanks, Michael -- Dr. Michael Haupt | Principal Member of Technical Staff Phone: +49 331 200 7277 | Fax: +49 331