Re: [PATCH] 8188240: Reflection Proxy should skip static methods

2018-03-13 Thread Sundararajan Athijegannathan
Looks good -Sundar On 14/03/18, 5:49 AM, David Lloyd wrote: On Tue, Mar 13, 2018 at 7:16 PM, David Lloyd wrote: On Tue, Mar 13, 2018 at 6:31 PM, mandy chung wrote: I prefer to keep the original test case i.e. create a proxy class from Runnable and Observer. Instead add a new test case to

Re: Raw String Literal Library Support

2018-03-13 Thread Xueming Shen
On 3/13/18, 5:12 PM, Jonathan Bluett-Duncan wrote: Paul, AFAICT, one sort of behaviour which String.split() allows which Pattern.splitAsStream() and the proposed String.splits() don't is allowing a negative limit, e.g. String.split(string, -1). Over at http://errorprone.info/bugpattern/StringSp

Re: Raw String Literal Library Support

2018-03-13 Thread Jonathan Bluett-Duncan
Sorry, I should really run things in an IDE before posting code examples and results! For examples ":".split(":", 0) and "".split(":", 0), they actually produce [] and [""] respectively (which I still argue is inconsistent and undesired for the proposed String.splits()). For examples ":".split(":

Re: [PATCH] 8188240: Reflection Proxy should skip static methods

2018-03-13 Thread David Lloyd
On Tue, Mar 13, 2018 at 7:16 PM, David Lloyd wrote: > On Tue, Mar 13, 2018 at 6:31 PM, mandy chung wrote: >> I prefer to keep the original test case i.e. create a proxy class from >> Runnable and Observer. Instead add a new test case to create a proxy class >> with ClashWithRunnable, Runnable a

Re: [PATCH] 8188240: Reflection Proxy should skip static methods

2018-03-13 Thread David Lloyd
On Tue, Mar 13, 2018 at 6:31 PM, mandy chung wrote: > I prefer to keep the original test case i.e. create a proxy class from > Runnable and Observer. Instead add a new test case to create a proxy class > with ClashWithRunnable, Runnable and Observer and verify that it does not > include static m

Re: Raw String Literal Library Support

2018-03-13 Thread Jonathan Bluett-Duncan
Paul, AFAICT, one sort of behaviour which String.split() allows which Pattern.splitAsStream() and the proposed String.splits() don't is allowing a negative limit, e.g. String.split(string, -1). Over at http://errorprone.info/bugpattern/StringSplitter, they argue that a limit of -1 has less surpri

Re: RFR 8189230: JDK method:java.lang.Integer.numberOfLeadingZeros(int) can be optimized

2018-03-13 Thread Brian Burkhalter
On Mar 13, 2018, at 4:42 PM, Paul Sandoz wrote: > Given how trivial the changes are it looks ok, but not sure it really matters > in practice. Nor do I. > > — > > Note that it’s possible to selectively disable intrinsics. For future > reference, when you want to avoid copying code if you h

Re: RFR 8189230: JDK method:java.lang.Integer.numberOfLeadingZeros(int) can be optimized

2018-03-13 Thread Paul Sandoz
Given how trivial the changes are it looks ok, but not sure it really matters in practice. — Note that it’s possible to selectively disable intrinsics. For future reference, when you want to avoid copying code if you happen to benchmark intrinsics in the future: -XX:+UnlockDiagnosticVMOptio

Re: [PATCH] 8188240: Reflection Proxy should skip static methods

2018-03-13 Thread mandy chung
On 3/13/18 4:06 PM, David Lloyd wrote: I worked up a little patch for 8188240. I was able to co-opt an existing test which now fails before the patch and passes after. It's a tiny patch so I'm including it inline. I've CC'd Mandy because she filed the original bug. Here's the patch (use patc

Re: Raw String Literal Library Support

2018-03-13 Thread Paul Sandoz
> On Mar 13, 2018, at 3:49 PM, John Rose wrote: > > On Mar 13, 2018, at 6:47 AM, Jim Laskey wrote: >> >> … >> A. Line support. >> >> public Stream lines() >> > > Suggest factoring this as: > > public Stream splits(String regex) { } +1 This is a natural companion to the existing array re

RFR 8189230: JDK method:java.lang.Integer.numberOfLeadingZeros(int) can be optimized

2018-03-13 Thread Brian Burkhalter
https://bugs.openjdk.java.net/browse/JDK-8189230 The change included below improves the performance of {Integer,Long}.numberOfLeadingZeros primarily for negative parameters by 20% to 33% as measured by JMH benchmarks. For details please refer to the bug report. Although on certain platforms the

[PATCH] 8188240: Reflection Proxy should skip static methods

2018-03-13 Thread David Lloyd
I worked up a little patch for 8188240. I was able to co-opt an existing test which now fails before the patch and passes after. It's a tiny patch so I'm including it inline. I've CC'd Mandy because she filed the original bug. Here's the patch (use patch -p1 to apply): cut --- 8<

Re: Raw String Literal Library Support

2018-03-13 Thread John Rose
On Mar 13, 2018, at 6:47 AM, Jim Laskey wrote: > > … > A. Line support. > > public Stream lines() > Suggest factoring this as: public Stream splits(String regex) { } public Stream lines() { return splits(`\n|\r\n?`); } The reason is that "splits" is useful with several other patterns. For

Re: Raw String Literal Library Support

2018-03-13 Thread John Rose
On Mar 13, 2018, at 11:30 AM, Volker Simonis wrote: > > Would it make sense to have a versions of "lines(LINE_TERM lt)" which > take a single, concrete form of line terminator? (Regular expressions for the win!)

Re: Raw String Literal Library Support

2018-03-13 Thread John Rose
On Mar 13, 2018, at 11:42 AM, Remi Forax wrote: > > it already exists :) > Stream stream = Pattern.compile("\n|\r\n|\r").splitAsStream(string); You want ` instead of " there! Somebody added support recently for `\R`, which is a more unicode-flavored version of your pattern (or just `\n`). Las

Re: RFR 8198889 Clarify the throwing of exceptions from ConstantBootstraps.invoke

2018-03-13 Thread mandy chung
+1 Mandy On 3/13/18 11:37 AM, Paul Sandoz wrote: Hi, Please review these minor tweaks to the specification of ConstantBootstraps.invoke to clarify the throwing of exceptions. This was the result of discussion with the JCK team. A CSR has also been filed and requires a reviewer. https://

Re: Raw String Literal Library Support

2018-03-13 Thread Mark Derricutt
On 14 Mar 2018, at 7:42, Remi Forax wrote: > it already exists :) > Stream stream = Pattern.compile("\n|\r\n|\r").splitAsStream(string); > > Rémi One that worked, or had support for grey-space would be a nice addition when working with RSL tho, unless grey-space is automatically handled at the

Re: RFR 8198997: Cache normalized/resolved user.dir property

2018-03-13 Thread Brian Burkhalter
On Mar 13, 2018, at 12:24 PM, Alan Bateman wrote: > As relative paths are command then it might be simpler to just change the > static initializer Static initializer or constructor? > to initialize userDir to normalize(props.getProperty("user.dir")). I was originally going to put that in the

Re: RFR: 8199471: Enable generation of callSiteForms at link time

2018-03-13 Thread Paul Sandoz
Invokers.java — Looks good. Minor comment: 664 /* Placeholder class for Invokers generated ahead of time */ 665 final class Holder {} 666 667 /* Placeholder class for callSiteForms generated ahead of time */ 668 final class CSHolder {} is it easy for you to change, for cla

Re: RFR 8198997: Cache normalized/resolved user.dir property

2018-03-13 Thread Alan Bateman
On 12/03/2018 18:32, Brian Burkhalter wrote: https://bugs.openjdk.java.net/browse/JDK-8198997 http://cr.openjdk.java.net/~bpb/8198997/webrev.00/ Lazily cache the value of the user.dir property on first access. This change is for Windows only as there does not appear to be any percentage in doin

Re: RFR 8198889 Clarify the throwing of exceptions from ConstantBootstraps.invoke

2018-03-13 Thread Lance Andersen
Changes look reasonable Paul… Best Lance > On Mar 13, 2018, at 2:37 PM, Paul Sandoz wrote: > > Hi, > > Please review these minor tweaks to the specification of > ConstantBootstraps.invoke to clarify the throwing of exceptions. This was the > result of discussion with the JCK team. > > A CSR

Re: Raw String Literal Library Support

2018-03-13 Thread Remi Forax
Hi Jim, - Mail original - > De: "Jim Laskey" > À: "core-libs-dev" > Envoyé: Mardi 13 Mars 2018 14:47:29 > Objet: Raw String Literal Library Support > With the announcement of JEP 326 Raw String Literals, we would like to open > up a > discussion with regards to RSL library support. Bel

RFR 8198889 Clarify the throwing of exceptions from ConstantBootstraps.invoke

2018-03-13 Thread Paul Sandoz
Hi, Please review these minor tweaks to the specification of ConstantBootstraps.invoke to clarify the throwing of exceptions. This was the result of discussion with the JCK team. A CSR has also been filed and requires a reviewer. https://bugs.openjdk.java.net/browse/JDK-8199540 Thanks, Paul

Re: Raw String Literal Library Support

2018-03-13 Thread Volker Simonis
On Tue, Mar 13, 2018 at 2:47 PM, Jim Laskey wrote: > With the announcement of JEP 326 Raw String Literals, we would like to open > up a discussion with regards to RSL library support. Below are several > implemented String methods that are believed to be appropriate. Please > comment on those m

Re: [JDK-6341887] RFR: Patch V3: java.util.zip: Add ByteBuffer methods to Inflater/Deflater

2018-03-13 Thread David Lloyd
Sorry all, it looks like GMail doesn't know how to keep replies with the thread when you change the subject line. The follow-up to this thread is http://mail.openjdk.java.net/pipermail/core-libs-dev/2018-March/051960.html with only a few small changes as discussed above. On Fri, Mar 2, 2018 at 2

Raw String Literal Library Support

2018-03-13 Thread Jim Laskey
With the announcement of JEP 326 Raw String Literals, we would like to open up a discussion with regards to RSL library support. Below are several implemented String methods that are believed to be appropriate. Please comment on those mentioned below including recommending alternate names or sig

Re: [11] RFR: 8191410 : Unicode 10.0.0

2018-03-13 Thread Rachna Goel
Hi Roger, Ivan, There is no change in algorithm as such but there has been mainly stability improvements, defects fixed, performance enhancements. e.g Updated header check, version and loading for latest binary files, Simple case mappings will be more efficient as unnecessary checking has bee

Re: RFR JDK-8196748, tools/jar tests need to tolerate unrelated warnings

2018-03-13 Thread Xueming Shen
On 3/12/18, 11:57 PM, David Holmes wrote: test/jdk/tools/jar/modularJar/Basic.java + } else if (line.contains("Java HotSpot(TM) 64-Bit Server VM warning:")) { + continue; // ignore server vm warning see#8196748 That needs to be any VM warning as