Re: RFR 8157819: TypeError when a java.util.Comparator object is invoked as a function

2016-05-25 Thread Attila Szegedi
+1

On Wed, May 25, 2016 at 2:29 PM, Sundararajan Athijegannathan <
sundararajan.athijegannat...@oracle.com> wrote:

> Using Method.getParameterCount() per Rémi's suggestion.
>
> Updated: http://cr.openjdk.java.net/~sundar/8157819/webrev.02/
>
> Thanks,
>
> -Sundar
>
>
> On 5/25/2016 5:39 PM, Remi Forax wrote:
> > - Mail original -
> >> De: "Michael Haupt" 
> >> À: "Sundararajan Athijegannathan" <
> sundararajan.athijegannat...@oracle.com>
> >> Cc: nashorn-dev@openjdk.java.net
> >> Envoyé: Mercredi 25 Mai 2016 13:49:39
> >> Objet: Re: RFR 8157819: TypeError when a java.util.Comparator object
> is  invoked as a function
> >>
> >
> > Hi Sundar, Hi Mickael,
> >
> >> Hi Sundar,
> >>
> >> lower-case thumbs up, with remarks.
> >>
> >> * "is this a overridable" -> "... an overridable"
> >>
> >> * My feeling: the name isOverridableObjectMethod would describe the
> method's
> >> intent more clearly.
> > yes
> >
> >> * How about comparing the method types to statically initialised
> MethodType
> >> instances obtained from the methods in question?
> > you need to go to the route that create a MethodType from a Method,
> which require an allocation.
> >
> > Sundar, i think you can use Method.getParamaterCount() [1] instead of
> m.getParameterTypes().length, because m.getParameterTypes() clones the
> returning array.
> >
> >> Best,
> >>
> >> Michael
> > cheers,
> >
> > Rémi
> >
> > [1]
> https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html#getParameterCount--
> >
> >>> Am 25.05.2016 um 12:49 schrieb Sundararajan Athijegannathan
> >>> :
> >>>
> >>> Please review http://cr.openjdk.java.net/~sundar/8157819/webrev.00 for
> >>> https://bugs.openjdk.java.net/browse/JDK-8157819
> >>>
> >>> Thanks,
> >>>
> >>> -Sundar
> >>>
> >> --
> >>
> >>  
> >> Dr. Michael Haupt | Principal Member of Technical Staff
> >> Phone: +49 331 200 7277 | Fax: +49 331 200 7561
> >> Oracle Java Platform Group | LangTools Team | Nashorn
> >> Oracle Deutschland B.V. & Co. KG | Schiffbauergasse 14 | 14467 Potsdam,
> >> Germany
> >>
> >> ORACLE Deutschland B.V. & Co. KG | Hauptverwaltung: Riesstraße 25,
> D-80992
> >> München
> >> Registergericht: Amtsgericht München, HRA 95603
> >>
> >> Komplementärin: ORACLE Deutschland Verwaltung B.V. | Hertogswetering
> 163/167,
> >> 3543 AS Utrecht, Niederlande
> >> Handelsregister der Handelskammer Midden-Nederland, Nr. 30143697
> >> Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher
> >>    Oracle is committed to developing
> >>  practices and products that help protect the environment
> >>
> >>
>
>


Re: [8u] approval request for 8157680: Callback parameter of any JS builtin implementation should accept any Callable

2016-05-25 Thread Seán Coffey

Approved.

Regards,
Sean.

On 25/05/16 15:16, Hannes Wallnoefer wrote:

Hi Sundar,

the backport looks good.

Hannes

Am 2016-05-25 um 16:04 schrieb Sundararajan Athijegannathan:

Please approve.

Bug: https://bugs.openjdk.java.net/browse/JDK-8157680

jdk9 review thread:
http://mail.openjdk.java.net/pipermail/nashorn-dev/2016-May/006225.html

jdk8u webrev: http://cr.openjdk.java.net/~sundar/8157680/8u/webrev.00/

The patch would not apply "as is" because there are few 8u specific
calls from Bootstrap.java. CC'ing nashorn-dev team for backport review.

Thanks,

-Sundar







Re: [8u] approval request for 8157680: Callback parameter of any JS builtin implementation should accept any Callable

2016-05-25 Thread Hannes Wallnoefer

Hi Sundar,

the backport looks good.

Hannes

Am 2016-05-25 um 16:04 schrieb Sundararajan Athijegannathan:

Please approve.

Bug: https://bugs.openjdk.java.net/browse/JDK-8157680

jdk9 review thread:
http://mail.openjdk.java.net/pipermail/nashorn-dev/2016-May/006225.html

jdk8u webrev: http://cr.openjdk.java.net/~sundar/8157680/8u/webrev.00/

The patch would not apply "as is" because there are few 8u specific
calls from Bootstrap.java. CC'ing nashorn-dev team for backport review.

Thanks,

-Sundar





[8u] approval request for 8157680: Callback parameter of any JS builtin implementation should accept any Callable

2016-05-25 Thread Sundararajan Athijegannathan
Please approve.

Bug: https://bugs.openjdk.java.net/browse/JDK-8157680

jdk9 review thread:
http://mail.openjdk.java.net/pipermail/nashorn-dev/2016-May/006225.html

jdk8u webrev: http://cr.openjdk.java.net/~sundar/8157680/8u/webrev.00/

The patch would not apply "as is" because there are few 8u specific
calls from Bootstrap.java. CC'ing nashorn-dev team for backport review.

Thanks,

-Sundar



Re: RFR 8157819: TypeError when a java.util.Comparator object is invoked as a function

2016-05-25 Thread Hannes Wallnoefer

Looks good!

Am 2016-05-25 um 14:29 schrieb Sundararajan Athijegannathan:

Using Method.getParameterCount() per Rémi's suggestion.

Updated: http://cr.openjdk.java.net/~sundar/8157819/webrev.02/

Thanks,

-Sundar


On 5/25/2016 5:39 PM, Remi Forax wrote:

- Mail original -

De: "Michael Haupt" 
À: "Sundararajan Athijegannathan" 
Cc: nashorn-dev@openjdk.java.net
Envoyé: Mercredi 25 Mai 2016 13:49:39
Objet: Re: RFR 8157819: TypeError when a java.util.Comparator object is invoked 
as a function


Hi Sundar, Hi Mickael,


Hi Sundar,

lower-case thumbs up, with remarks.

* "is this a overridable" -> "... an overridable"

* My feeling: the name isOverridableObjectMethod would describe the method's
intent more clearly.

yes


* How about comparing the method types to statically initialised MethodType
instances obtained from the methods in question?

you need to go to the route that create a MethodType from a Method, which 
require an allocation.

Sundar, i think you can use Method.getParamaterCount() [1] instead of 
m.getParameterTypes().length, because m.getParameterTypes() clones the 
returning array.


Best,

Michael

cheers,

Rémi

[1] 
https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html#getParameterCount--


Am 25.05.2016 um 12:49 schrieb Sundararajan Athijegannathan
:

Please review http://cr.openjdk.java.net/~sundar/8157819/webrev.00 for
https://bugs.openjdk.java.net/browse/JDK-8157819

Thanks,

-Sundar


--

  
Dr. Michael Haupt | Principal Member of Technical Staff
Phone: +49 331 200 7277 | Fax: +49 331 200 7561
Oracle Java Platform Group | LangTools Team | Nashorn
Oracle Deutschland B.V. & Co. KG | Schiffbauergasse 14 | 14467 Potsdam,
Germany

ORACLE Deutschland B.V. & Co. KG | Hauptverwaltung: Riesstraße 25, D-80992
München
Registergericht: Amtsgericht München, HRA 95603

Komplementärin: ORACLE Deutschland Verwaltung B.V. | Hertogswetering 163/167,
3543 AS Utrecht, Niederlande
Handelsregister der Handelskammer Midden-Nederland, Nr. 30143697
Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher
    Oracle is committed to developing
  practices and products that help protect the environment






Re: RFR 8157819: TypeError when a java.util.Comparator object is invoked as a function

2016-05-25 Thread Sundararajan Athijegannathan
Using Method.getParameterCount() per Rémi's suggestion.

Updated: http://cr.openjdk.java.net/~sundar/8157819/webrev.02/

Thanks,

-Sundar


On 5/25/2016 5:39 PM, Remi Forax wrote:
> - Mail original -
>> De: "Michael Haupt" 
>> À: "Sundararajan Athijegannathan" 
>> Cc: nashorn-dev@openjdk.java.net
>> Envoyé: Mercredi 25 Mai 2016 13:49:39
>> Objet: Re: RFR 8157819: TypeError when a java.util.Comparator object is  
>> invoked as a function
>>
>
> Hi Sundar, Hi Mickael,
>
>> Hi Sundar,
>>
>> lower-case thumbs up, with remarks.
>>
>> * "is this a overridable" -> "... an overridable"
>>
>> * My feeling: the name isOverridableObjectMethod would describe the method's
>> intent more clearly.
> yes
>
>> * How about comparing the method types to statically initialised MethodType
>> instances obtained from the methods in question?
> you need to go to the route that create a MethodType from a Method, which 
> require an allocation.
>
> Sundar, i think you can use Method.getParamaterCount() [1] instead of 
> m.getParameterTypes().length, because m.getParameterTypes() clones the 
> returning array.
>
>> Best,
>>
>> Michael
> cheers,
>
> Rémi
>
> [1] 
> https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html#getParameterCount--
>  
>
>>> Am 25.05.2016 um 12:49 schrieb Sundararajan Athijegannathan
>>> :
>>>
>>> Please review http://cr.openjdk.java.net/~sundar/8157819/webrev.00 for
>>> https://bugs.openjdk.java.net/browse/JDK-8157819
>>>
>>> Thanks,
>>>
>>> -Sundar
>>>
>> --
>>
>>  
>> Dr. Michael Haupt | Principal Member of Technical Staff
>> Phone: +49 331 200 7277 | Fax: +49 331 200 7561
>> Oracle Java Platform Group | LangTools Team | Nashorn
>> Oracle Deutschland B.V. & Co. KG | Schiffbauergasse 14 | 14467 Potsdam,
>> Germany
>>
>> ORACLE Deutschland B.V. & Co. KG | Hauptverwaltung: Riesstraße 25, D-80992
>> München
>> Registergericht: Amtsgericht München, HRA 95603
>>
>> Komplementärin: ORACLE Deutschland Verwaltung B.V. | Hertogswetering 163/167,
>> 3543 AS Utrecht, Niederlande
>> Handelsregister der Handelskammer Midden-Nederland, Nr. 30143697
>> Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher
>>    Oracle is committed to developing
>>  practices and products that help protect the environment
>>
>>



Re: RFR 8157819: TypeError when a java.util.Comparator object is invoked as a function

2016-05-25 Thread Remi Forax
- Mail original -
> De: "Michael Haupt" 
> À: "Sundararajan Athijegannathan" 
> Cc: nashorn-dev@openjdk.java.net
> Envoyé: Mercredi 25 Mai 2016 13:49:39
> Objet: Re: RFR 8157819: TypeError when a java.util.Comparator object is   
> invoked as a function
> 


Hi Sundar, Hi Mickael,

> Hi Sundar,
> 
> lower-case thumbs up, with remarks.
> 
> * "is this a overridable" -> "... an overridable"
> 
> * My feeling: the name isOverridableObjectMethod would describe the method's
> intent more clearly.

yes

> 
> * How about comparing the method types to statically initialised MethodType
> instances obtained from the methods in question?

you need to go to the route that create a MethodType from a Method, which 
require an allocation.

Sundar, i think you can use Method.getParamaterCount() [1] instead of 
m.getParameterTypes().length, because m.getParameterTypes() clones the 
returning array.

> 
> Best,
> 
> Michael

cheers,

Rémi

[1] 
https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Method.html#getParameterCount--
 

> 
> > Am 25.05.2016 um 12:49 schrieb Sundararajan Athijegannathan
> > :
> > 
> > Please review http://cr.openjdk.java.net/~sundar/8157819/webrev.00 for
> > https://bugs.openjdk.java.net/browse/JDK-8157819
> > 
> > Thanks,
> > 
> > -Sundar
> > 
> 
> --
> 
>  
> Dr. Michael Haupt | Principal Member of Technical Staff
> Phone: +49 331 200 7277 | Fax: +49 331 200 7561
> Oracle Java Platform Group | LangTools Team | Nashorn
> Oracle Deutschland B.V. & Co. KG | Schiffbauergasse 14 | 14467 Potsdam,
> Germany
> 
> ORACLE Deutschland B.V. & Co. KG | Hauptverwaltung: Riesstraße 25, D-80992
> München
> Registergericht: Amtsgericht München, HRA 95603
> 
> Komplementärin: ORACLE Deutschland Verwaltung B.V. | Hertogswetering 163/167,
> 3543 AS Utrecht, Niederlande
> Handelsregister der Handelskammer Midden-Nederland, Nr. 30143697
> Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher
>     Oracle is committed to developing
>  practices and products that help protect the environment
> 
> 


Re: RFR 8157819: TypeError when a java.util.Comparator object is invoked as a function

2016-05-25 Thread Sundararajan Athijegannathan
Hi,

Thanks for the review.

Updated : http://cr.openjdk.java.net/~sundar/8157819/webrev.01/

Renamed that method and fixed the article. Leaving MethodType
suggestion, as that'd mean unreflect with publicLookup + caching
methodTypes of known Object methods..

Thanks,
-Sundar

On 5/25/2016 5:19 PM, Michael Haupt wrote:
> Hi Sundar,
>
> lower-case thumbs up, with remarks.
>
> * "is this a overridable" -> "... an overridable"
>
> * My feeling: the name isOverridableObjectMethod would describe the
> method's intent more clearly.
>
> * How about comparing the method types to statically initialised
> MethodType instances obtained from the methods in question?
>
> Best,
>
> Michael
>
>> Am 25.05.2016 um 12:49 schrieb Sundararajan Athijegannathan
>> > >:
>>
>> Please review http://cr.openjdk.java.net/~sundar/8157819/webrev.00
>>  for
>> https://bugs.openjdk.java.net/browse/JDK-8157819
>>
>> Thanks,
>>
>> -Sundar
>>
>
> -- 
>
> Oracle 
> Dr. Michael Haupt | Principal Member of Technical Staff
> Phone: +49 331 200 7277 | Fax: +49 331 200 7561
> Oracle Java Platform Group | LangTools Team | Nashorn
> Oracle Deutschland B.V. & Co. KG | Schiffbauergasse 14 | 14467
> Potsdam, Germany
>
> ORACLE Deutschland B.V. & Co. KG | Hauptverwaltung: Riesstraße 25,
> D-80992 München
> Registergericht: Amtsgericht München, HRA 95603
>
> Komplementärin: ORACLE Deutschland Verwaltung B.V. | Hertogswetering
> 163/167, 3543 AS Utrecht, Niederlande
> Handelsregister der Handelskammer Midden-Nederland, Nr. 30143697
> Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher
> Green Oracle    Oracle is committed
> to developing practices and products that help protect the environment
>
>



Re: RFR 8157819: TypeError when a java.util.Comparator object is invoked as a function

2016-05-25 Thread Michael Haupt
Hi Sundar,

lower-case thumbs up, with remarks.

* "is this a overridable" -> "... an overridable"

* My feeling: the name isOverridableObjectMethod would describe the method's 
intent more clearly.

* How about comparing the method types to statically initialised MethodType 
instances obtained from the methods in question?

Best,

Michael

> Am 25.05.2016 um 12:49 schrieb Sundararajan Athijegannathan 
> :
> 
> Please review http://cr.openjdk.java.net/~sundar/8157819/webrev.00 for
> https://bugs.openjdk.java.net/browse/JDK-8157819
> 
> Thanks,
> 
> -Sundar
> 

-- 

 
Dr. Michael Haupt | Principal Member of Technical Staff
Phone: +49 331 200 7277 | Fax: +49 331 200 7561
Oracle Java Platform Group | LangTools Team | Nashorn
Oracle Deutschland B.V. & Co. KG | Schiffbauergasse 14 | 14467 Potsdam, Germany

ORACLE Deutschland B.V. & Co. KG | Hauptverwaltung: Riesstraße 25, D-80992 
München
Registergericht: Amtsgericht München, HRA 95603

Komplementärin: ORACLE Deutschland Verwaltung B.V. | Hertogswetering 163/167, 
3543 AS Utrecht, Niederlande
Handelsregister der Handelskammer Midden-Nederland, Nr. 30143697
Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher
  Oracle is committed to developing 
practices and products that help protect the environment



RFR 8157819: TypeError when a java.util.Comparator object is invoked as a function

2016-05-25 Thread Sundararajan Athijegannathan
Please review http://cr.openjdk.java.net/~sundar/8157819/webrev.00 for
https://bugs.openjdk.java.net/browse/JDK-8157819

Thanks,

-Sundar



Re: RFR 8157680: Callback parameter of any JS builtin implementation should accept any Callable

2016-05-25 Thread Michael Haupt
Hi Sundar,

lower-case thumbs up.

Best,

Michael

> Am 24.05.2016 um 15:52 schrieb Sundararajan Athijegannathan 
> :
> 
> Please review http://cr.openjdk.java.net/~sundar/8157680/webrev.00/ for
> https://bugs.openjdk.java.net/browse/JDK-8157680
> 
> Thanks,
> 
> -Sundar
> 

-- 

 
Dr. Michael Haupt | Principal Member of Technical Staff
Phone: +49 331 200 7277 | Fax: +49 331 200 7561
Oracle Java Platform Group | LangTools Team | Nashorn
Oracle Deutschland B.V. & Co. KG | Schiffbauergasse 14 | 14467 Potsdam, Germany

ORACLE Deutschland B.V. & Co. KG | Hauptverwaltung: Riesstraße 25, D-80992 
München
Registergericht: Amtsgericht München, HRA 95603

Komplementärin: ORACLE Deutschland Verwaltung B.V. | Hertogswetering 163/167, 
3543 AS Utrecht, Niederlande
Handelsregister der Handelskammer Midden-Nederland, Nr. 30143697
Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher
  Oracle is committed to developing 
practices and products that help protect the environment