Re: RFR: 8180352: Add Stream.toList() method [v3]

2020-11-21 Thread Rémi Forax
On Wed, 18 Nov 2020 22:20:26 GMT, Stuart Marks wrote: >> This change introduces a new terminal operation on Stream. This looks like a >> convenience method for Stream.collect(Collectors.toList()) or >> Stream.collect(Collectors.toUnmodifiableList()), but it's not. Having this >> method

Re: RFR: 8180352: Add Stream.toList() method [v3]

2020-11-21 Thread Rémi Forax
On Thu, 5 Nov 2020 17:26:48 GMT, Stuart Marks wrote: >> src/java.base/share/classes/java/util/ImmutableCollections.java line 199: >> >>> 197: * safely reused as the List's internal storage, avoiding a >>> defensive copy. Declared >>> 198: * with Object... instead of E... as the

Re: RFR: 8159746: (proxy) Support for default methods

2020-11-20 Thread Rémi Forax
On Fri, 20 Nov 2020 19:51:57 GMT, Mandy Chung wrote: >> @plevart I'm okay with this slight performance improvement. > > I have a fresh look at the different options we have explored (lots of > challenges in finding the right API with security, usability and performance > issues to consider).

Re: RFR: 8180352: Add Stream.toList() method [v2]

2020-11-18 Thread Remi Forax
- Mail original - > De: "Florian Weimer" > À: "Peter Levart" > Cc: "Stuart Marks" , "core-libs-dev" > > Envoyé: Mercredi 18 Novembre 2020 12:55:02 > Objet: Re: RFR: 8180352: Add Stream.toList() method [v2] > * Peter Levart: > >> But I see that the new  IMM_LIST_NULLS type is needed

Re: RFR: 8248862: Implement Enhanced Pseudo-Random Number Generators [v3]

2020-11-17 Thread Remi Forax
An honest question, why do we need so many interfaces for the different categories of RandomGenerator ? My fear is that we are encoding the state of our knowledge of the different kinds of random generators now so it will not be pretty in the future when new categories of random generator are

Re: 'Find' method for Iterable

2020-11-17 Thread Remi Forax
- Mail original - > De: "Brian Goetz" > À: "Michael Kuhlmann" , "core-libs-dev" > > Envoyé: Mardi 17 Novembre 2020 20:44:17 > Objet: Re: 'Find' method for Iterable > On 9/21/2020 4:08 AM, Michael Kuhlmann wrote: >> But after thinking about it, I'm now convinced that it would be a bad

Re: RFR: 8230501: Class data support for hidden classes

2020-11-11 Thread Remi Forax
Hi Mandy, maybe a stupid question but why this mechanism is limited to hidden classes ? regards, Rémi - Mail original - > De: "Mandy Chung" > À: "core-libs-dev" , "hotspot compiler" > > Envoyé: Mercredi 11 Novembre 2020 19:57:04 > Objet: RFR: 8230501: Class data support for hidden

Re: Class TreeMap | Lower and Upper Count Support

2020-11-08 Thread forax
> De: "mayank bansal" > À: "Remi Forax" > Cc: "core-libs-dev" > Envoyé: Dimanche 8 Novembre 2020 12:55:09 > Objet: Re: Class TreeMap | Lower and Upper Count Support > Hi Remi, > Thank you for pointing that out. This is providing th

Re: RFR: 8180352: Add Stream.toList() method

2020-11-08 Thread forax
> De: "Alan Snyder" > À: "Remi Forax" > Cc: "Simon Roberts" , "core-libs-dev" > > Envoyé: Vendredi 6 Novembre 2020 18:55:40 > Objet: Re: RFR: 8180352: Add Stream.toList() method Hi Alan, >>> This discussion of unmodifiab

Re: Class TreeMap | Lower and Upper Count Support

2020-11-08 Thread Remi Forax
Is it different from headMap(key, true).size() / tailMap(key, true).size() ? https://docs.oracle.com/en/java/javase/15/docs/api/java.base/java/util/NavigableMap.html#headMap(K,boolean) https://docs.oracle.com/en/java/javase/15/docs/api/java.base/java/util/NavigableMap.html#tailMap(K,boolean)

Re: RFR: 8180352: Add Stream.toList() method

2020-11-06 Thread Remi Forax
; worth considering, might it have some merit, or merely horrible > unforeseen-by-me consequences to the implementation? This question is asked at least every six months since 1998 https://docs.oracle.com/javase/8/docs/technotes/guides/collections/designfaq.html#a1 > > Cheers, > Si

Re: RFR: 8180352: Add Stream.toList() method

2020-11-04 Thread forax
- Mail original - > De: "Brian Goetz" > À: "Tagir Valeev" > Cc: "Remi Forax" , "Stuart Marks" > , "core-libs-dev" > > Envoyé: Mercredi 4 Novembre 2020 18:58:59 > Objet: Re: RFR: 8180352: Add Stream.toList() met

Re: RFR: 8180352: Add Stream.toList() method

2020-11-04 Thread Remi Forax
- Mail original - > De: "Stuart Marks" > À: "core-libs-dev" > Envoyé: Mercredi 4 Novembre 2020 01:14:54 > Objet: Re: RFR: 8180352: Add Stream.toList() method > On Tue, 3 Nov 2020 18:53:23 GMT, Stuart Marks wrote: > >>> Should there be a test that tests the default implementation in

Re: RFR: 8180352: Add Stream.toList() method

2020-11-03 Thread Remi Forax
- Mail original - > De: "Martin Desruisseaux" > À: "core-libs-dev" > Envoyé: Mardi 3 Novembre 2020 23:16:49 > Objet: Re: RFR: 8180352: Add Stream.toList() method > Hello > > Le 03/11/2020 à 21:30, fo...@univ-mlv.fr a écrit : > >> You know that you can not change the implementation of

Re: RFR: 8180352: Add Stream.toList() method

2020-11-03 Thread forax
Hi Aaron, > De: "Aaron Scott-Boddendijk" > À: "Remi Forax" > Cc: "Brian Goetz" , "Stuart Marks" > , "core-libs-dev" > Envoyé: Mardi 3 Novembre 2020 21:59:37 > Objet: Re: RFR: 8180352: Add Stream.toList() method > >>

Re: RFR: 8180352: Add Stream.toList() method

2020-11-03 Thread forax
> De: "Brian Goetz" > À: "Remi Forax" > Cc: "Stuart Marks" , "core-libs-dev" > > Envoyé: Mardi 3 Novembre 2020 20:54:57 > Objet: Re: RFR: 8180352: Add Stream.toList() method >>> There is no value in making users remember wh

Re: RFR: 8180352: Add Stream.toList() method

2020-11-03 Thread forax
- Mail original - > De: "Brian Goetz" > À: "Remi Forax" , "Stuart Marks" > Cc: "core-libs-dev" > Envoyé: Mardi 3 Novembre 2020 19:02:37 > Objet: Re: RFR: 8180352: Add Stream.toList() method >>> This change introduces a new

Re: RFR: 8180352: Add Stream.toList() method

2020-11-03 Thread Remi Forax
- Mail original - > De: "Stuart Marks" > À: "core-libs-dev" > Envoyé: Mardi 3 Novembre 2020 04:18:08 > Objet: RFR: 8180352: Add Stream.toList() method > This change introduces a new terminal operation on Stream. This looks like a > convenience method for

Re: RFR: 8186085: (opt) add filter(), flatMap(), and map() methods to OptionalDouble/Int/Long

2020-11-01 Thread Rémi Forax
On Sun, 1 Nov 2020 13:20:20 GMT, Kartik Ohri wrote: >> Hi ! >> thanks for taking the time to craft that pull request but this is typically >> the kind of patch that should be discussed on the mailing list first before >> creating a pull request. >> >> There are several issues, one is that we

Re: RFR: 8186085: (opt) add filter(), flatMap(), and map() methods to OptionalDouble/Int/Long

2020-11-01 Thread Rémi Forax
On Sat, 31 Oct 2020 16:45:06 GMT, Kartik Ohri wrote: >> Hi all, >> This PR intends to add filter, map and flatMap methods to the Optional >> classes for primitives. The rationale is consistency with the Optional class >> for objects and user convenience. >> Thanks. >> Regards, >> Kartik > >

Re: RFR: 8159746: (proxy) Support for default methods

2020-10-28 Thread Rémi Forax
On Wed, 28 Oct 2020 19:28:36 GMT, Mandy Chung wrote: >> Hi Mandy and Peter, >> reading your exchanges, i wonder if it's not better to stop trying to add >> more and more features to the already clunky java.lang.reflect.Proxy but >> instead to move to provide the same set of feature but using

Re: RFR: 8159746: (proxy) Support for default methods

2020-10-28 Thread Rémi Forax
On Wed, 28 Oct 2020 17:36:40 GMT, Mandy Chung wrote: >>> Hi Peter, >>> >>> > Question remains how do we distinguish proxies with old-fassioned >>> > InvocationHandlers from proxies with InvocationHandlers having access to >>> > super-default-handler. Both kinds of handlers look the same from

Re: RFR: 8254354: Add an asExact() VarHandle combinator

2020-10-26 Thread Rémi Forax
On Fri, 23 Oct 2020 17:47:36 GMT, Jorn Vernee wrote: > Hi, > > This patch adds an asExact() combinator to VarHandle, that will return a new > VarHandle that performs exact type checks, similar to > MethodHandle::invokeExact, to help developers catch inexact VarHandle usage, > which can lead

Re: RFR: 8254354: Add an asExact() VarHandle combinator [v2]

2020-10-26 Thread Rémi Forax
On Mon, 26 Oct 2020 16:34:10 GMT, Paul Sandoz wrote: >> The direct use of the enum ordinal is because HotSpot accessing it from the >> enum value is (or was) not optimal in C2. >> >> You can avoid the addition of the stable array by doing the following: >> >> public final MethodType

Re: RFR: 8255398: Add a dropReturn MethodHandle combinator [v3]

2020-10-26 Thread Rémi Forax
On Mon, 26 Oct 2020 18:01:04 GMT, John R Rose wrote: >> @rose00 My bad. You're right, I realized we could also use `asType` later on >> (I did call it out in the CSR), but It's still a bit more wordy than what >> I'm proposing. >> >> `dropReturn` seemed like a good choice since we already

Re: RFR: 8255398: Add a dropReturn MethodHandle combinator

2020-10-26 Thread Remi Forax
- Mail original - > De: "Jorn Vernee" > À: "core-libs-dev" > Envoyé: Lundi 26 Octobre 2020 16:37:20 > Objet: RFR: 8255398: Add a dropReturn MethodHandle combinator > Hi, > > This patch adds a `dropReturn` combinator to `MethodHandles` that can be used > to > create a new method handle

Re: RFR: 8254354: Add an asExact() VarHandle combinator [v2]

2020-10-23 Thread Rémi Forax
On Fri, 23 Oct 2020 18:04:11 GMT, Jorn Vernee wrote: >> Hi, >> >> This patch adds an asExact() combinator to VarHandle, that will return a new >> VarHandle that performs exact type checks, similar to >> MethodHandle::invokeExact, to help developers catch inexact VarHandle usage, >> which can

Re: 'Find' method for Iterable

2020-09-16 Thread Remi Forax
- Mail original - > De: "Nir Lisker" > À: "core-libs-dev" > Envoyé: Lundi 14 Septembre 2020 20:56:27 > Objet: 'Find' method for Iterable > Hi, > > This has probably been brought up at some point. When we need to find an > item in a collection based on its properties, we can either do

Re: JDK 15 hidden classes & stack trace visibility

2020-09-05 Thread Remi Forax
Hi Uwe, - Mail original - > De: "Uwe Schindler" > À: "core-libs-dev" > Envoyé: Samedi 5 Septembre 2020 13:55:03 > Objet: JDK 15 hidden classes & stack trace visibility > Hi, > > I am doing a mockup for dynamically compiled scripts in Apache Lucene (later > also painless scripting in

Re: Review request for JDK-8251538: Modernize and lint Dynalink code

2020-08-20 Thread Remi Forax
- Mail original - > De: "Attila Szegedi" > À: "core-libs-dev" > Envoyé: Jeudi 20 Août 2020 22:40:53 > Objet: Review request for JDK-8251538: Modernize and lint Dynalink code > Following up on the previous e-mail, here’s the modernization and linting work > on the existing Dynalink

Re: RFR[8238286]: 'Add new flatMap stream operation that is more amenable to pushing’

2020-08-13 Thread forax
- Mail original - > De: "Florian Weimer" > À: "Remi Forax" > Cc: "Patrick Concannon" , "Julia Boes" > , "Anthony Vanelverdinghe" > , "core-libs-dev" > Envoyé: Jeudi 13 Août 2020 11:58:38 > Objet: Re: RF

Re: RFR[8238286]: 'Add new flatMap stream operation that is more amenable to pushing’

2020-08-12 Thread Remi Forax
Hi Patrick, I still don't like the fact that IntMapMultiConsumer, DoubleMapMultiConsumer and LongMapMultiConsumer are not in java.util.function unlike all other functional interfaces used by the Stream API. Otherwise looks good. regards, Rémi - Mail original - > De: "Patrick

Re: Type inference: bug or feature?

2020-07-27 Thread Remi Forax
- Mail original - > De: "Maurizio Cimadamore" > À: "Justin Dekeyser" , "core-libs-dev" > > Envoyé: Lundi 27 Juillet 2020 12:26:40 > Objet: Re: Type inference: bug or feature? > CC'ing compiler-dev > > Hi Justin, > the behavior you are observing is normal. For a Java expression to be >

Re: RFR[8238286]: 'Add new flatMap stream operation that is more amenable to pushing’

2020-07-07 Thread forax
- Mail original - > De: "Paul Sandoz" > À: "Remi Forax" > Cc: "Peter Levart" , "Patrick Concannon" > , "Julia Boes" > , "core-libs-dev" > Envoyé: Mardi 7 Juillet 2020 21:04:09 > Objet: Re: RFR[8238286]:

Re: RFR[8238286]: 'Add new flatMap stream operation that is more amenable to pushing’

2020-07-07 Thread forax
optimizations. Rémi - Mail original - > De: "Paul Sandoz" > À: "Peter Levart" > Cc: "Patrick Concannon" , "Remi Forax" > , "Julia Boes" > , "core-libs-dev" > Envoyé: Mardi 7 Juillet 2020 20:09:01 > Ob

Re: RFR[8238286]: 'Add new flatMap stream operation that is more amenable to pushing’

2020-07-02 Thread forax
> De: "Paul Sandoz" > À: "Remi Forax" > Cc: "Brian Goetz" , "Julia Boes" > , "core-libs-dev" , > "Patrick Concannon" > Envoyé: Jeudi 2 Juillet 2020 19:46:22 > Objet: Re: RFR[8238286]: 'Add new flatMap stream opera

Re: RFR[8238286]: 'Add new flatMap stream operation that is more amenable to pushing’

2020-07-02 Thread forax
and introduce multiMap() later when generics over primitives is added to Java. Rémi > De: "Patrick Concannon" > À: "Remi Forax" > Cc: "Julia Boes" , "core-libs-dev" > > Envoyé: Jeudi 2 Juillet 2020 18:45:13 > Objet: Re: RFR[8238286]:

Re: RFR[8238286]: 'Add new flatMap stream operation that is more amenable to pushing’

2020-07-02 Thread Remi Forax
Hi Patrick & Julia, this version starts to look good. I just don't understand why the new functional interfaces are not in java.util.function like the other ones ? (BTW, in the javadoc, the link to the summary overview point to the wrong one, to java.util.stream and not java.util.function).

Re: Explicitly constructed NPE is showing (wrong) message

2020-06-27 Thread Remi Forax
- Mail original - > De: "Christoph Dreis" > À: "hotspot-runtime-dev" > Envoyé: Samedi 27 Juin 2020 11:54:19 > Objet: Explicitly constructed NPE is showing (wrong) message > Hi, Hi Christoph, > > I hope this is the correct mailing list. > > The latest changes on JDK-8233014 to enable

Re: RFR[8238286]: 'Add new flatMap stream operation that is more amenable to pushing’

2020-06-26 Thread forax
- Mail original - > De: "Daniel Fuchs" > À: "Remi Forax" > Cc: "Patrick Concannon" , "core-libs-dev" > > Envoyé: Vendredi 26 Juin 2020 16:13:08 > Objet: Re: RFR[8238286]: 'Add new flatMap stream operation that is more > am

Re: RFR[8238286]: 'Add new flatMap stream operation that is more amenable to pushing’

2020-06-25 Thread Remi Forax
- Mail original - > De: "Remi Forax" > À: "Daniel Fuchs" > Cc: "Patrick Concannon" , "core-libs-dev" > > Envoyé: Jeudi 25 Juin 2020 23:46:08 > Objet: Re: RFR[8238286]: 'Add new flatMap stream operation that is more > ame

Re: RFR[8238286]: 'Add new flatMap stream operation that is more amenable to pushing’

2020-06-25 Thread forax
- Mail original - > De: "Daniel Fuchs" > À: "Remi Forax" , "Patrick Concannon" > > Cc: "core-libs-dev" > Envoyé: Jeudi 25 Juin 2020 11:28:00 > Objet: Re: RFR[8238286]: 'Add new flatMap stream operation that is more > amenab

Re: RFR[8238286]: 'Add new flatMap stream operation that is more amenable to pushing’

2020-06-25 Thread forax
- Mail original - > De: "Brian Goetz" > À: "Remi Forax" , "Patrick Concannon" > > Cc: "core-libs-dev" > Envoyé: Jeudi 25 Juin 2020 22:04:27 > Objet: Re: RFR[8238286]: 'Add new flatMap stream operation that is more > amenabl

Re: RFR[8238286]: 'Add new flatMap stream operation that is more amenable to pushing’

2020-06-24 Thread Remi Forax
Hi Patrick, - Mail original - > De: "Patrick Concannon" > À: "core-libs-dev" > Envoyé: Mercredi 24 Juin 2020 12:57:01 > Objet: RFR[8238286]: 'Add new flatMap stream operation that is more amenable > to pushing’ > Hi, Hi, > > Could someone please review myself and Julia's RFE and

Re: [PATCH] remove redundant initialization of volatile fields with default values

2020-06-19 Thread Remi Forax
Hi Sergei, the problem is that you are changing the semantics if there are several fields. By example with the code below, you have the guarantee that the code will print 4 (if it prints something), if you remove the assignment field = false, the code can print 0 or 4. class A { int i =

Re: RFR: 8247532: Records deserialization is slow

2020-06-17 Thread forax
- Mail original - > De: "Peter Levart" > À: "Remi Forax" > Cc: "core-libs-dev" , "Chris Hegarty" > > Envoyé: Mercredi 17 Juin 2020 07:37:16 > Objet: Re: RFR: 8247532: Records deserialization is slow > Hi Remi, > >

Re: RFR: 8247532: Records deserialization is slow

2020-06-16 Thread Remi Forax
Hi Peter, is their a reason to not use a ClassValue using the record class as key instead of the more complex keys you are proposing ? Rémi - Mail original - > De: "Chris Hegarty" > À: "Peter Levart" > Cc: "core-libs-dev" > Envoyé: Mardi 16 Juin 2020 17:15:03 > Objet: Re: RFR:

Re: (15) RFR: JDK-8247444: Trust final fields in records

2020-06-16 Thread Remi Forax
Hi Mndy, Looks good, I don't like too much the fact that there is a new boolean field in j.l.r.Field instead of using the modifiers like in the VM counterpart, but it will require masking and unmasking the modifiers which is a far bigger change, too big to worth it in my opinion. So +1 Rémi

Re: Comparator.reversed() type inference issue

2020-06-09 Thread Remi Forax
- Mail original - > De: "Tagir Valeev" > À: "Attila Szegedi" > Cc: "core-libs-dev" > Envoyé: Mardi 9 Juin 2020 09:05:42 > Objet: Re: Comparator.reversed() type inference issue > Hello! > > This is more related to Java language specification and implementation > than to core libraries,

Re: Comparator.reversed() type inference issue

2020-06-09 Thread Remi Forax
yep, the inference is not smart enough. So the way to fix the code is either to explicitly specify the type arguments var rs1 = x.entrySet().stream().sorted( Map.Entry.comparingByValue().reversed() ); or to store the result of comparingByValue() in a variable (so it's a poly

Re: RFR: 8246152: Improve String concat bootstrapping

2020-05-29 Thread forax
- Mail original - > De: "Claes Redestad" > À: "Remi Forax" > Cc: "core-libs-dev" > Envoyé: Vendredi 29 Mai 2020 20:45:26 > Objet: Re: RFR: 8246152: Improve String concat bootstrapping > On 2020-05-29 19:32, fo...@univ-mlv.fr wr

Re: RFR: 8246152: Improve String concat bootstrapping

2020-05-29 Thread forax
- Mail original - > De: "Claes Redestad" > À: "Remi Forax" > Cc: "core-libs-dev" > Envoyé: Vendredi 29 Mai 2020 18:47:03 > Objet: Re: RFR: 8246152: Improve String concat bootstrapping > Hi Rémi, > > thanks for looking at this and

Re: RFR: 8246152: Improve String concat bootstrapping

2020-05-29 Thread forax
- Mail original - > De: "Claes Redestad" > À: "Remi Forax" > Cc: "core-libs-dev" > Envoyé: Vendredi 29 Mai 2020 18:10:40 > Objet: Re: RFR: 8246152: Improve String concat bootstrapping > Hi, > > will deal with your suggestions soon

Re: RFR: 8246152: Improve String concat bootstrapping

2020-05-29 Thread Remi Forax
Hi Claes, For the code below the comment "Mock the recipe to reuse the concat generator code", i believe you can use String.repeat() that was introduced recently. The code that parse the the receipe can be in its own method to make the code more readable, this method returns the list and use

Re: RFR: 8245969: Simplify String concat constant folding

2020-05-27 Thread forax
- Mail original - > De: "Claes Redestad" > À: "Remi Forax" > Cc: "core-libs-dev" > Envoyé: Mercredi 27 Mai 2020 17:50:19 > Objet: Re: RFR: 8245969: Simplify String concat constant folding > Hi Rémi, > > thanks for looking at t

Re: RFR: JDK-8245432: Lookup::defineHiddenClass should throw UnsupportedClassVersionError if the given bytes are of an unsupported major or minor version

2020-05-27 Thread forax
- Mail original - > De: "Alan Bateman" > À: "mandy chung" , "core-libs-dev" > , "Remi Forax" > > Envoyé: Mercredi 27 Mai 2020 18:16:33 > Objet: Re: RFR: JDK-8245432: Lookup::defineHiddenClass should throw > UnsupportedClassVersionEr

Re: RFR: 8245969: Simplify String concat constant folding

2020-05-27 Thread Remi Forax
Hi Claes, so instead of having a prefix and a suffix, there is only a prefix, a suffix being seen as a prefix for the next iteration and if at the end instead of just allocating an array, you allocate an array and stuff it with the last prefix. Are you sure having a suffix at the end is

Re: RFR: 8245756: Reduce bootstrap cost of StringConcatFactory prependers

2020-05-26 Thread forax
- Mail original - > De: "Claes Redestad" > À: "Paul Sandoz" > Cc: "Remi Forax" , "core-libs-dev" > > Envoyé: Mardi 26 Mai 2020 20:31:51 > Objet: Re: RFR: 8245756: Reduce bootstrap cost of StringConcatFactory > prependers &g

Re: RFR: 8245756: Reduce bootstrap cost of StringConcatFactory prependers

2020-05-25 Thread forax
- Mail original - > De: "Claes Redestad" > À: "Remi Forax" > Cc: "core-libs-dev" > Envoyé: Lundi 25 Mai 2020 23:13:27 > Objet: Re: RFR: 8245756: Reduce bootstrap cost of StringConcatFactory > prependers > Hi Rémi, > > in is

Re: RFR: 8245756: Reduce bootstrap cost of StringConcatFactory prependers

2020-05-25 Thread Remi Forax
Hi Claes, do you have evaluated the improvement (1) in separation of the others ? (2) or (3) are clearly improvement but (1) is a trade of because you are adding a second lookup into another table and make prepender() less likely to be inlined. Rémi - Mail original - > De: "Claes

Re: RFR: 8245455: Remove alternative StringConcatFactory strategies

2020-05-22 Thread Remi Forax
- Mail original - > De: "Paul Sandoz" > À: "Claes Redestad" > Cc: "core-libs-dev" > Envoyé: Vendredi 22 Mai 2020 19:28:39 > Objet: Re: RFR: 8245455: Remove alternative StringConcatFactory strategies > Hi, > > I support the removal of all the other strategies to simplify SCF and make

Re: RFR: JDK-8225056 VM support for sealed classes

2020-05-19 Thread Remi Forax
- Mail original - > De: "David Holmes" > À: "Harold David Seigel" , "hotspot-runtime-dev" > , > "amber-dev" , "core-libs-dev" > , "serviceability-dev" > > Envoyé: Mardi 19 Mai 2020 07:26:38 > Objet: Re: RFR: JDK-8225056 VM support for sealed classes > Hi Harold, > > Adding

Re: CfD: compile-time checked immutable collections

2020-05-05 Thread Remi Forax
Hallo ! This questions have been asked so many times since 1998, Josh Bloch one of the designer of the API (who will later write Effective Java) as created a FAQ around that time answering to that question: https://docs.oracle.com/javase/8/docs/technotes/guides/collections/designfaq.html

Re: RFR 8243491: Implementation of Foreign-Memory Access API (Second Incubator)

2020-04-30 Thread forax
Hi Mandy, i've taken a look to the code, i think it's better to have two methods, one for List and one for Map to avoid to have a bootstrap argument ( classDataType ) and to have a code more straightforward. Rémi > De: "mandy chung" > À: "Remi Forax" , &quo

Re: RFR 8243491: Implementation of Foreign-Memory Access API (Second Incubator)

2020-04-29 Thread forax
- Mail original - > De: "Jorn Vernee" > À: "Maurizio Cimadamore" , "mandy chung" > , "Remi Forax" > > Cc: "core-libs-dev" > Envoyé: Mercredi 29 Avril 2020 22:09:47 > Objet: Re: RFR 8243491: Implementation of Foreign

Re: RFR 8243491: Implementation of Foreign-Memory Access API (Second Incubator)

2020-04-29 Thread forax
- Mail original - > De: "Maurizio Cimadamore" > À: "mandy chung" , "Remi Forax" > Cc: "core-libs-dev" > Envoyé: Mercredi 29 Avril 2020 03:13:35 > Objet: Re: RFR 8243491: Implementation of Foreign-Memory Access API (Second &

Re: RFR 8243491: Implementation of Foreign-Memory Access API (Second Incubator)

2020-04-29 Thread forax
> De: "mandy chung" > À: "Remi Forax" > Cc: "Maurizio Cimadamore" , "core-libs-dev" > > Envoyé: Mardi 28 Avril 2020 20:09:07 > Objet: Re: RFR 8243491: Implementation of Foreign-Memory Access API (Second > Incubator) > On 4/28/20

Re: RFR 8243491: Implementation of Foreign-Memory Access API (Second Incubator)

2020-04-28 Thread forax
> De: "mandy chung" > À: "Remi Forax" , "Maurizio Cimadamore" > > Cc: "core-libs-dev" > Envoyé: Mardi 28 Avril 2020 01:17:05 > Objet: Re: RFR 8243491: Implementation of Foreign-Memory Access API (Second > Incubator) &

Re: RFR 8243491: Implementation of Foreign-Memory Access API (Second Incubator)

2020-04-27 Thread Remi Forax
Hi Maurizio, Mandy, In https://cr.openjdk.java.net/~mcimadamore/8243491_v2/webrev/src/java.base/share/classes/java/lang/invoke/MemoryAccessVarHandleGenerator.java.udiff.html, using a condy inside a static init make me sad, using a late loading constant to early load it in the static init seems

Re: RFR JDK-8223347 Integration of Vector API (Incubator): Java API, implementation, and tests

2020-04-20 Thread Remi Forax
BTW, did you try to add an intermediary private non visible class between Vector and IntVector to avoid all hand-written cast inside the implementation of IntVector, something along that line public abstract class Vector { abstract void foo(Vector vector); abstract Vector bar(); }

Re: RFR JDK-8223347 Integration of Vector API (Incubator): Java API, implementation, and tests

2020-04-20 Thread Remi Forax
Hi Paul, about the API part (not the implementation), there are location where the same concept is described with a different names which doesn't help to understand how thing work - vector length <=> vector lane count - vector shape <=> vector bits size - element size <=> lane size "size" should

Re: JDK 15 RF(pre)R of JDK-8241374: add Math.absExact

2020-03-29 Thread Remi Forax
- Mail original - > De: "Stuart Marks" > À: "joe darcy" > Cc: "core-libs-dev" > Envoyé: Dimanche 29 Mars 2020 04:37:06 > Objet: Re: JDK 15 RF(pre)R of JDK-8241374: add Math.absExact > Hi Joe, > > Overall this looks quite good. Thanks for being thorough about this; I > certainly >

ASM 8 is available

2020-03-28 Thread Remi Forax
Hi all, it's a little bit OT even if the JDK itself as a dependency on ASM. I'm proud to announce that ASM 8 (nicknamed the Quarantine Edition) was released today ! It fully supports Java 14 (the Record attribute) and even support sealed types (the attribute PermittedSubtypes) as an

Re: Review Request: 8238358: Implementation of JEP 371: Hidden Classes

2020-03-27 Thread Remi Forax
- Mail original - > De: "David Holmes" > À: "mandy chung" , "Vicente Romero" > , "jan lahoda" > > Cc: "serviceability-dev" , "hotspot-dev" > , > "core-libs-dev" , "valhalla-dev" > > Envoyé: Samedi 28 Mars 2020 00:01:58 > Objet: Re: Review Request: 8238358: Implementation of JEP 371:

Re: Review Request: 8238358: Implementation of JEP 371: Hidden Classes

2020-03-27 Thread forax
> De: "mandy chung" > À: "Remi Forax" > Cc: "valhalla-dev" , "core-libs-dev" > , "serviceability-dev" > , "hotspot-dev" > > Envoyé: Vendredi 27 Mars 2020 16:50:55 > Objet: Re: Review Request: 8238358: Imple

Re: Review Request: 8238358: Implementation of JEP 371: Hidden Classes

2020-03-27 Thread Remi Forax
Hi Mandy, in ReflectionFactory, why in the case of a constructor the check to the anonymous class is removed ? in BytecodeGenerator, the comment "// bootstrapping issue if using condy" can be promoted on top of clinit, because i ask myself the same question seeing a static block was generated

Re: RFR: JDK-8241310 Fix warnings in jdk buildtools

2020-03-19 Thread Remi Forax
Hi Magnus, please try not to use @SuppressWarnings("unchecked") on methods, but on local variable instead to reduce the scope, you can introduce a local variable for that. In Bundle, your patch declare @SuppressWarnings("unchecked") on the method while you already have a local variable with a

Re: 回复:回复:VM crashed at StringTable expansion

2020-02-26 Thread Remi Forax
- Mail original - > De: "向伟(识月)" > À: "Florian Weimer" > Cc: "core-libs-dev" , "hotspot-runtime-dev" > > Envoyé: Mercredi 26 Février 2020 13:45:52 > Objet: 回复:回复:VM crashed at StringTable expansion > Hi Florian, Alan, > >public static void main(String[] args) throws Exception

Re: RFR [15] 8161558: ListIterator should not discard cause on exception

2020-02-25 Thread forax
- Mail original - > De: "Stuart Marks" > À: "Remi Forax" > Cc: "Martin Buchholz" , "Kiran Ravikumar" > , "core-libs-dev" > > Envoyé: Vendredi 21 Février 2020 22:53:36 > Objet: Re: RFR [15] 8161558: ListIterator sho

Re: RFR [15] 8161558: ListIterator should not discard cause on exception

2020-02-14 Thread forax
- Mail original - > De: "Stuart Marks" > À: "Remi Forax" > Cc: "Martin Buchholz" , "Kiran Ravikumar" > , "core-libs-dev" > > Envoyé: Vendredi 14 Février 2020 18:25:14 > Objet: Re: RFR [15] 8161558: ListIterator sho

Re: RFR [15] 8161558: ListIterator should not discard cause on exception

2020-02-12 Thread forax
- Mail original - > De: "Stuart Marks" > À: "Remi Forax" > Cc: "Martin Buchholz" , "Kiran Ravikumar" > , "core-libs-dev" > > Envoyé: Mardi 11 Février 2020 00:57:52 > Objet: Re: RFR [15] 8161558: ListIterator s

Re: RFR: 8238684: Override getOrDefault in immutable Map implementations

2020-02-07 Thread Remi Forax
Hi Claes, looks good, it can be written in a less Doug Lea-ish way like this V v = get(key); return (v != null)? v: default; I believe it using the same number of bytecodes :) with a ALOAD instead of a DUP Rémi - Mail original - > De: "Claes Redestad" > À: "core-libs-dev" >

Re: RFR: 8237878: Improve ModuleLoaderMap datastructures

2020-02-06 Thread forax
- Mail original - > De: "Claes Redestad" > À: "Remi Forax" > Cc: "core-libs-dev" > Envoyé: Jeudi 6 Février 2020 14:48:38 > Objet: Re: RFR: 8237878: Improve ModuleLoaderMap datastructures > Hi Rémi, > > > On 2020-02-06 14:08,

Re: RFR: 8237878: Improve ModuleLoaderMap datastructures

2020-02-06 Thread Remi Forax
Hi Claes, In ArchivedModuleGraph, there is no point to take the mainModule as parameter given that it should always be null. In ModuleLoaderMap, the constants PLATFORM_LOADER_INDEX and APP_LOADER_INDEX should be moved inside the nested class Mapper given that there are only needed by the

Re: RFR [15] 8161558: ListIterator should not discard cause on exception

2020-02-05 Thread Remi Forax
Stuart, Martin, Kiran, I think this "bug" should not be fixed because it's one of the cases where providing more information is actually bad from a user POV. The current code throws NoSuchElementException when the iterator reach the end so from the user POV, this is the right exception because

Re: [PATCH] Enhancement proposal for java.util.StringJoiner

2020-02-05 Thread forax
- Mail original - > De: "Сергей Цыпанов" > À: "Remi Forax" , "core-libs-dev" > > Envoyé: Mercredi 5 Février 2020 22:12:34 > Objet: Re: [PATCH] Enhancement proposal for java.util.StringJoiner > Hello, > >> If you want

Re: [PATCH] Enhancement proposal for java.util.StringJoiner

2020-02-04 Thread Remi Forax
- Mail original - > De: "Сергей Цыпанов" > À: "jonathan gibbons" , "core-libs-dev" > > Envoyé: Mardi 4 Février 2020 08:53:31 > Objet: Re: [PATCH] Enhancement proposal for java.util.StringJoiner > Hello, Hi Sergey, > > I'd probably agree about a new class in java.lang, but what is

Re: New candidate JEP: 371: Hidden Classes

2020-01-27 Thread Remi Forax
- Mail original - > De: "David Lloyd" > À: "David Holmes" > Cc: "hotspot-dev" , "core-libs-dev" > > Envoyé: Lundi 27 Janvier 2020 14:56:57 > Objet: Re: New candidate JEP: 371: Hidden Classes > On Fri, Jan 24, 2020 at 4:56 PM David Holmes wrote: >> >> FYI. > > I'm a bit curious about

Re: Depth and String handling in ObjectInputFilter

2020-01-17 Thread Remi Forax
Hi Robert, first this is the wrong mailing list, this mailing list is about how to implement the JDK, not how it works, usually stackoverflow is better for the kind of questions you are asking. - Mail original - > De: "Robert Olofsson" > À: "core-libs-dev" > Envoyé: Vendredi 17 Janvier

Re: RFR [15/java.xml] 8235368 : Update BCEL to Version 6.4.1

2020-01-16 Thread Remi Forax
- Mail original - > De: "Joe Wang" > À: "Daniel Fuchs" , "core-libs-dev" > > Envoyé: Jeudi 16 Janvier 2020 18:40:18 > Objet: Re: RFR [15/java.xml] 8235368 : Update BCEL to Version 6.4.1 > On 1/16/20 2:35 AM, Daniel Fuchs wrote: >> Hi Joe, >> >> Looks OK to me as well. > > Thanks for

Re: RFR: 8236850: Operations on constant List/Set.of(element) instances does not consistently constant fold

2020-01-11 Thread forax
> De: "John Rose" > À: "Remi Forax" > Cc: "Claes Redestad" , "core-libs-dev" > > Envoyé: Samedi 11 Janvier 2020 02:23:50 > Objet: Re: RFR: 8236850: Operations on constant List/Set.of(element) instances > does not consisten

Re: RFR: 8236850: Operations on constant List/Set.of(element) instances does not consistently constant fold

2020-01-10 Thread Remi Forax
Seem to be a JIT bug to me, the fields of Set12 are declared final not @Stable (even if the field storing the instanceof of Set&2 itself is marked @Stable) so there is no reason not not let the constant folding happen. Rémi - Mail original - > De: "Claes Redestad" > À:

Re: Note bulk methods in Javadocs for Collections.synchronizedXxx()

2020-01-01 Thread Remi Forax
Hi Roman, addAll() returns a boolean that will be not easy to compute given that forEach() takes a lambda (that can only capture local values and not change them). and the javadoc of AbstractCollection clearly states that addAll has to use an iterator if implemented

Re: RFR JDK-8234049: Implementation of Memory Access API (Incubator)

2019-12-05 Thread Remi Forax
Hi Maurizio, that's a huge work :) So as a guy discovering the API, i've not taken a deep look to the implementation because i've noob questions. The first sentence of the overview of GroupLayout should say that there are two types of GroupLayout struct and union instead of talking about

Re: wavl based alternative to red-black TreeMap

2019-12-01 Thread Remi Forax
Nice ! there is a wikipedia article about WAVL tree [1]. I did not know this new kind of balanced tree, worth the exploration i believe. and TreeMap code really needs some love anyway, unlike ArrayList and HashMap, this code has not be updated since a long time. Rémi [1]

Re: [PATCH] Simplification proposal regarding TYPE-field initialization in primitive wrappers

2019-11-26 Thread Remi Forax
Hi Sergey, hum, it doesn't work :) int.class is compiled by javac as Integer.TYPE, the opcode ldc only works with an object/interface class, not with a primitive type [1]. regards, Rémi [1] https://docs.oracle.com/javase/specs/jvms/se13/html/jvms-6.html#jvms-6.5.ldc - Mail original -

Re: Looking for Sponsor: JDK-8229959 Convert proxy class to use constant dynamic

2019-11-22 Thread Remi Forax
. There is perhaps a better way, as part of the branch nestmates of valhalla, Mandy has added a way to transfer a live object to a Class when defining it, with that you can send all the Methods as an array and in the bootstrap method of a condy, access to the right method by extracting it from the array usi

Re: JEP 358 (Helpful NPEs) and single source file mode

2019-11-19 Thread Remi Forax
- Mail original - > De: "Gunnar Morling" > À: "core-libs-dev" > Envoyé: Mardi 19 Novembre 2019 09:34:41 > Objet: JEP 358 (Helpful NPEs) and single source file mode > Hi, > > I've been exploring the new helpful NPE feature a bit. > > It's a very welcomed improvement, but I noticed one

Re: RFR 8233920: MethodHandles::tryFinally generates illegal bytecode for long/double return types

2019-11-12 Thread Remi Forax
Hi Jorn, Claes, Is it not better to always store in a local variable, like javac does, instead of doing the double SWAP if there is a return value of size 1 ? Rémi - Mail original - > De: "Jorn Vernee" > À: "Claes Redestad" , "core-libs-dev" > > Envoyé: Mardi 12 Novembre 2019

Re: RFR: CSR JDK-8233117 Escape Sequences For Line Continuation and White Space (Preview)

2019-11-05 Thread forax
> De: "John Rose" > À: "Remi Forax" > Cc: "Jim Laskey" , "compiler-dev" > , "core-libs-dev" > > Envoyé: Mardi 5 Novembre 2019 19:35:45 > Objet: Re: RFR: CSR JDK-8233117 Escape Sequences For Line Continuation and > White

<    1   2   3   4   5   6   7   8   9   10   >