Re: MethodHandle for array length

2016-05-18 Thread Michael Haupt
ommitter > Bremen, Germany > http://lucene.apache.org/ > >> -Original Message- >> From: Uwe Schindler [mailto:uschind...@apache.org] >> Sent: Friday, May 13, 2016 11:55 AM >> To: 'Remi Forax' >> Cc: 'Michael Haupt' ; 'Core-Libs-Dev

Re: MethodHandle for array length

2016-05-18 Thread Michael Haupt
To: Uwe Schindler >> Cc: Michael Haupt ; Core-Libs-Dev > d...@openjdk.java.net> >> Subject: Re: MethodHandle for array length >> >> Hi Uwe, >> I was planning to add a bug for this feature but it seems that Michael was >> faster than me, >> https://b

RE: MethodHandle for array length

2016-05-13 Thread Uwe Schindler
el Haupt' ; 'Core-Libs-Dev' d...@openjdk.java.net> > Subject: RE: MethodHandle for array length > > Hi, > > OK, thanks for creating an issue! > > Uwe > > - > Uwe Schindler > uschind...@apache.org > ASF Member, Apache Lucene PMC / Committer > Breme

RE: MethodHandle for array length

2016-05-13 Thread Uwe Schindler
> To: Uwe Schindler > Cc: Michael Haupt ; Core-Libs-Dev d...@openjdk.java.net> > Subject: Re: MethodHandle for array length > > Hi Uwe, > I was planning to add a bug for this feature but it seems that Michael was > faster than me, > https://bugs.openjdk.java.net/bro

Re: MethodHandle for array length

2016-05-13 Thread Remi Forax
; > Envoyé: Jeudi 12 Mai 2016 14:34:34 > Objet: RE: MethodHandle for array length > > Hi Michael, > > > > Am 11.05.2016 um 21:35 schrieb Uwe Schindler : > > > With Java 9 this gets a bit worse: There is no "easy way" with the > > Metho

RE: MethodHandle for array length

2016-05-12 Thread Uwe Schindler
Hi Michael, > > Am 11.05.2016 um 21:35 schrieb Uwe Schindler : > > With Java 9 this gets a bit worse: There is no "easy way" with the > MethodHanldes class to generate a MethodHandles.countedLoop() on all > elements of an array: > > > > public static MethodHandle countedLoop(MethodHandle iteratio

RE: MethodHandle for array length

2016-05-12 Thread Uwe Schindler
- Uwe Schindler uschind...@apache.org ASF Member, Apache Lucene PMC / Committer Bremen, Germany http://lucene.apache.org/ From: Attila Szegedi [mailto:szege...@gmail.com] Sent: Thursday, May 12, 2016 11:37 AM To: Uwe Schindler Cc: Core-Libs-Dev Subject: Re: MethodHandle for array

Re: MethodHandle for array length

2016-05-12 Thread Michael Haupt
Hi Uwe, > Am 11.05.2016 um 21:35 schrieb Uwe Schindler : > With Java 9 this gets a bit worse: There is no "easy way" with the > MethodHanldes class to generate a MethodHandles.countedLoop() on all elements > of an array: > > public static MethodHandle countedLoop(MethodHandle iterations, Method

Re: MethodHandle for array length

2016-05-12 Thread Attila Szegedi
Hi Uwe, If you’re targetting JDK 9 only, you could also consider basing your language’s dynamic operations on Dynalink; it’s integrated into JDK 9 and is specifically meant as a way to ease implementation of languages that have dynamic types. It happens to have a predefined GET_LENGTH[1] operat

RE: MethodHandle for array length

2016-05-12 Thread Uwe Schindler
Hi Remi, > > while working and trying the new JDK9 MethodHandles features like > > MethodHandles#countedLoop, I recognized a API inconsistency problem > with it. > > > > We also found this while implementing the "Painless" scripting language for > > Elasticsearch (see https://goo.gl/DbOzjC)! Painl

Re: MethodHandle for array length

2016-05-11 Thread Remi Forax
- Mail original - > De: "Uwe Schindler" > À: "Core-Libs-Dev" > Envoyé: Mercredi 11 Mai 2016 21:35:32 > Objet: MethodHandle for array length > > Hi, > Hi Uwe, > while working and trying the new JDK9 MethodHandles features like >

MethodHandle for array length

2016-05-11 Thread Uwe Schindler
Hi, while working and trying the new JDK9 MethodHandles features like MethodHandles#countedLoop, I recognized a API inconsistency problem with it. We also found this while implementing the "Painless" scripting language for Elasticsearch (see https://goo.gl/DbOzjC)! Painless is a very limited sc