[9] RFR (S) 8057654: Extract checks performed during MethodHandle construction into separate methods

2014-09-05 Thread Vladimir Ivanov
http://cr.openjdk.java.net/~vlivanov/8057654/webrev.00/ https://bugs.openjdk.java.net/browse/JDK-8057654 The idea is to separate construction logic and different checks performed before/during method handle construction. For example: move checks from MHs.foldArguments into

Re: test paths in repo

2014-09-05 Thread Paul Sandoz
On Sep 4, 2014, at 9:55 PM, John Rose john.r.r...@oracle.com wrote: David Chase and I just noticed files like this in the JDK: http://hg.openjdk.java.net/jdk9/jdk9/jdk/file/tip/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ The package for the test code is

[9] RFR (S): 8057657: Annotate LambdaForm parameters with types

2014-09-05 Thread Vladimir Ivanov
http://cr.openjdk.java.net/~vlivanov/8057657/webrev.00/ https://bugs.openjdk.java.net/browse/JDK-8057657 Add ability to annotate LambdaForm parameters with their types. Type info could be useful during LambdaForm compilation to produce better bytecode. Testing: jdk/java/lang/invoke,

Re: RFR: JDK-8057556: JDP should better handle non-active interfaces

2014-09-05 Thread Yasumasa Suenaga
Hi Peter, I fixed it and created new webrev. http://cr.openjdk.java.net/~ysuenaga/JDK-8057556/webrev.1/ Could you review it again? Thanks, Yasumasa (2014/09/05 17:20), Peter Allwin wrote: Looks like only the first Interface will be considered if no srcAddress is provided (succeeded will

Re: [9] RFR (S) 8057654: Extract checks performed during MethodHandle construction into separate methods

2014-09-05 Thread Paul Sandoz
On Sep 5, 2014, at 10:09 AM, Vladimir Ivanov vladimir.x.iva...@oracle.com wrote: http://cr.openjdk.java.net/~vlivanov/8057654/webrev.00/ https://bugs.openjdk.java.net/browse/JDK-8057654 +1 Paul.

Re: [9] RFR (S) 8057654: Extract checks performed during MethodHandle construction into separate methods

2014-09-05 Thread Aleksey Shipilev
On 09/05/2014 12:09 PM, Vladimir Ivanov wrote: http://cr.openjdk.java.net/~vlivanov/8057654/webrev.00/ https://bugs.openjdk.java.net/browse/JDK-8057654 Random style rant of the week, not particularly about this concrete patch. Can we please try to systematically use more readable/robust/secure

Re: [9] RFR (S) 8057656: Improve MethodType.isCastableTo() MethodType.isConvertibleTo() checks

2014-09-05 Thread Paul Sandoz
On Sep 5, 2014, at 10:23 AM, Vladimir Ivanov vladimir.x.iva...@oracle.com wrote: http://cr.openjdk.java.net/~vlivanov/8057656/webrev.00/ https://bugs.openjdk.java.net/browse/JDK-8057656 854 if (!canConvert(returnType(), newType.returnType())) 855 return false; 856

Re: [9] RFR (L): 8057042: LambdaFormEditor: derive new LFs from a base LF

2014-09-05 Thread Vladimir Ivanov
Paul, thanks for review. Generally looks good (re: Peter's observation of continue/break). - LambdaFormEditor 61 private static final class Transform { 62 final long packedBytes; 63 final byte[] fullBytes; 64 final LambdaForm result; // result of

Re: [9] RFR (S) 8057654: Extract checks performed during MethodHandle construction into separate methods

2014-09-05 Thread Marcus Lagergren
+1 On 05 Sep 2014, at 12:46, Aleksey Shipilev aleksey.shipi...@oracle.com wrote: On 09/05/2014 12:09 PM, Vladimir Ivanov wrote: http://cr.openjdk.java.net/~vlivanov/8057654/webrev.00/ https://bugs.openjdk.java.net/browse/JDK-8057654 Random style rant of the week, not particularly about

Re: [9] RFR (S) 8057654: Extract checks performed during MethodHandle construction into separate methods

2014-09-05 Thread Marcus Lagergren
To the style rant, I mean. On 05 Sep 2014, at 13:40, Marcus Lagergren marcus.lagerg...@oracle.com wrote: +1 On 05 Sep 2014, at 12:46, Aleksey Shipilev aleksey.shipi...@oracle.com wrote: On 09/05/2014 12:09 PM, Vladimir Ivanov wrote:

Re: [9] RFR (L): 8057042: LambdaFormEditor: derive new LFs from a base LF

2014-09-05 Thread Paul Sandoz
On Sep 5, 2014, at 1:25 PM, Vladimir Ivanov vladimir.x.iva...@oracle.com wrote: Paul, thanks for review. Generally looks good (re: Peter's observation of continue/break). - LambdaFormEditor 61 private static final class Transform { 62 final long packedBytes; 63

Re: [9] RFR (S) 8057654: Extract checks performed during MethodHandle construction into separate methods

2014-09-05 Thread Remi Forax
On 09/05/2014 12:31 PM, Paul Sandoz wrote: On Sep 5, 2014, at 10:09 AM, Vladimir Ivanov vladimir.x.iva...@oracle.com wrote: http://cr.openjdk.java.net/~vlivanov/8057654/webrev.00/ https://bugs.openjdk.java.net/browse/JDK-8057654 +1 Paul.

Re: [9] RFR (L): 8057042: LambdaFormEditor: derive new LFs from a base LF

2014-09-05 Thread Vladimir Ivanov
Paul, Peter, Morris, thanks for review. Best regards, Vladimir Ivanov On 9/5/14, 3:51 PM, Paul Sandoz wrote: On Sep 5, 2014, at 1:25 PM, Vladimir Ivanov vladimir.x.iva...@oracle.com wrote: Paul, thanks for review. Generally looks good (re: Peter's observation of continue/break). -

[9] RFR 8055251: Re-examine Integer.parseInt and Long.parseLong methods

2014-09-05 Thread Claes Redestad
Hi, I'm requesting reviews and a sponsor for these changes to the recently added parse methods (8041972), suggested during discussions on net-dev: bug: https://bugs.openjdk.java.net/browse/JDK-8055251 webrev: http://cr.openjdk.java.net/~redestad/8055251/webrev.1/

Re: [9] RFR (S) 8057654: Extract checks performed during MethodHandle construction into separate methods

2014-09-05 Thread Paul Sandoz
On Sep 5, 2014, at 2:30 PM, Remi Forax fo...@univ-mlv.fr wrote: On 09/05/2014 12:31 PM, Paul Sandoz wrote: On Sep 5, 2014, at 10:09 AM, Vladimir Ivanov vladimir.x.iva...@oracle.com wrote: http://cr.openjdk.java.net/~vlivanov/8057654/webrev.00/

Re: [9] RFR (S) 8050173: Generalize BMH.copyWith API to all method handles

2014-09-05 Thread Vladimir Ivanov
http://cr.openjdk.java.net/~vlivanov/8050173/webrev.00/ https://bugs.openjdk.java.net/browse/JDK-8050173 Added j.l.i.MethodHandle.copyWith(MethodType, LambdaForm) and provided implementation for all subclasses. Also, some cleanups: * rewrote MH.viewAsType on top of MH.copyWith; * extended

Re: [9] RFR (S) 8057654: Extract checks performed during MethodHandle construction into separate methods

2014-09-05 Thread Vladimir Ivanov
Paul, Remi, thanks for review. Renamed type - mtype removed @SuppressWarnings. Updated webrev in place. Best regards, Vladimir Ivanov On 9/5/14, 5:13 PM, Paul Sandoz wrote: On Sep 5, 2014, at 2:30 PM, Remi Forax fo...@univ-mlv.fr wrote: On 09/05/2014 12:31 PM, Paul Sandoz wrote: On Sep

Re: [9] RFR (S) 8050173: Generalize BMH.copyWith API to all method handles

2014-09-05 Thread Paul Sandoz
On Sep 5, 2014, at 3:15 PM, Vladimir Ivanov vladimir.x.iva...@oracle.com wrote: Looks good, just one comment. MethodHandles.restrictReceiver This method has: 1578 private MethodHandle restrictReceiver(MemberName method, MethodHandle mh, Class? caller) throws

Re: [9] RFR 8055251: Re-examine Integer.parseInt and Long.parseLong methods

2014-09-05 Thread Alan Bateman
On 05/09/2014 14:03, Claes Redestad wrote: Hi, I'm requesting reviews and a sponsor for these changes to the recently added parse methods (8041972), suggested during discussions on net-dev: bug: https://bugs.openjdk.java.net/browse/JDK-8055251 webrev:

Re: [9] RFR (S) 8057656: Improve MethodType.isCastableTo() MethodType.isConvertibleTo() checks

2014-09-05 Thread Vladimir Ivanov
http://cr.openjdk.java.net/~vlivanov/8057656/webrev.00/ https://bugs.openjdk.java.net/browse/JDK-8057656 854 if (!canConvert(returnType(), newType.returnType())) 855 return false; 856 Class?[] srcTypes = newType.ptypes; 857 Class?[] dstTypes =

Re: [9] RFR (S) 8050173: Generalize BMH.copyWith API to all method handles

2014-09-05 Thread John Rose
On Jul 16, 2014, at 1:50 AM, Paul Sandoz paul.san...@oracle.com wrote: Why not make the second parameter be DirectMethodHandle mh ? Good suggestion; thanks. Makes the restrictReceiver logic less magic. — John

[9] Review request : JDK-8057719: Develop new tests for LambdaForm Reduction and Caching feature

2014-09-05 Thread Konstantin Shefov
Hello, Please review the new tests for the feature Lambda Form Reduction and Caching https://bugs.openjdk.java.net/browse/JDK-8046703 JBS task: https://bugs.openjdk.java.net/browse/JDK-8057719 Webrev: http://cr.openjdk.java.net/~kshefov/8057719/webrev.00/ These tests also depend on

[9] Review request : JDK-8057707: TEST library enhancement: copy sun.hotspot.whitebox classes from hotspot repo and enhance lib/testlibrary/jsr292/com/oracle/testlibrary/jsr292/Helper.java

2014-09-05 Thread Konstantin Shefov
Hello, Please review the change in testlibrary https://bugs.openjdk.java.net/browse/JDK-8057707 This change is needed for new tests for the feature Lambda Form Reduction and Caching https://bugs.openjdk.java.net/browse/JDK-8046703 Webrev of the testlibrary change:

Re: Impact of code difference in Collection#contains() worth improving?

2014-09-05 Thread Martin Buchholz
On Fri, Aug 29, 2014 at 7:53 PM, Guy Steele guy.ste...@oracle.com wrote: But I cannot resist recalling that one of the earliest pieces of software in the implementation of EMACS (back when the implementation language was TECO, a text-editing language) was a routine that, when it loaded TECO

[8u40] RFR 6642881: Improve performance of Class.getClassLoader()

2014-09-05 Thread Coleen Phillimore
Summary: Add classLoader to java/lang/Class instance for fast access This is a backport request for 8u40. This change has been in the jdk9 code for 3 months without any problems. The JDK changes hg imported cleanly. The Hotspot change needed a hand merge for create_mirror call in

Re: [9] Review request : JDK-8057707: TEST library enhancement: copy sun.hotspot.whitebox classes from hotspot repo and enhance lib/testlibrary/jsr292/com/oracle/testlibrary/jsr292/Helper.java

2014-09-05 Thread Alan Bateman
On 05/09/2014 18:57, Konstantin Shefov wrote: Hello, Please review the change in testlibrary https://bugs.openjdk.java.net/browse/JDK-8057707 This change is needed for new tests for the feature Lambda Form Reduction and Caching https://bugs.openjdk.java.net/browse/JDK-8046703 Webrev of the

Re: RFR (JAXP) 8056202: Xerces Update: Catalog Resolver

2014-09-05 Thread Lance Andersen
Hi Joe, This seems OK Best, Lance On Aug 28, 2014, at 10:46 PM, huizhe wang huizhe.w...@oracle.com wrote: Hi, This is an update to Xerces' Catalog Resolver implementation. The changes were mostly performance related, for example the changes to the normalizeURI method in Catalog.java to

Re: RFR (JAXP) 8056202: Xerces Update: Catalog Resolver

2014-09-05 Thread huizhe wang
Thanks Lance! Joe On 9/5/2014 1:44 PM, Lance Andersen wrote: Hi Joe, This seems OK Best, Lance On Aug 28, 2014, at 10:46 PM, huizhe wang huizhe.w...@oracle.com mailto:huizhe.w...@oracle.com wrote: Hi, This is an update to Xerces' Catalog Resolver implementation. The changes were mostly

Re: [9] Review request : JDK-8057707: TEST library enhancement: copy sun.hotspot.whitebox classes from hotspot repo and enhance lib/testlibrary/jsr292/com/oracle/testlibrary/jsr292/Helper.java

2014-09-05 Thread Konstantin Shefov
These test are for core-libs feature, but we want to test that unused lambda forms are garbage collected using WhiteBox.fullGC() method. There are three tests that use one common class, only one of them uses whitebox api. So it is hard to move one of tests to hotspot repo. - Konstantin

Re: Impact of code difference in Collection#contains() worth improving?

2014-09-05 Thread John Rose
On Aug 30, 2014, at 7:17 AM, Ulf Zibis ulf.zi...@cosoco.de wrote: Am 30.08.2014 um 01:33 schrieb John Rose: On Aug 29, 2014, at 1:05 PM, Ulf Zibis ulf.zi...@cosoco.de mailto:ulf.zi...@cosoco.de wrote: Thanks for explaining this, but a very little nit: the immediate (I.e. -1) uses

Re: Impact of code difference in Collection#contains() worth improving?

2014-09-05 Thread John Rose
On Aug 30, 2014, at 10:58 AM, Doug Lea d...@cs.oswego.edu wrote: In the present case, I'm with Martin about short-circuiting this with a simple approximate answer: Rather than flip a coin choosing between solutions A and B, pick the one with smaller bytecode. This has a decent enough