On Thu, 15 May 2025 17:46:39 GMT, Archie Cobbs wrote:
>> Please review this small performance tweak `ArrayDeque`.
>>
>> `ArrayDeque` has an invariant in which any unused elements in the array must
>> be null. In a couple of places, the code is setting contiguous ranges of
>> elements to null u
On Mon, 12 May 2025 18:24:27 GMT, Archie Cobbs wrote:
> Because it is backed by an array, the `ArrayDeque` class has the ability to
> get and replace any element in the list (accessed by index) in constant time.
> However, this capability is not exposed in the API.
>
> Please review this PR wh
On Wed, 23 Apr 2025 22:04:25 GMT, Brian Burkhalter wrote:
>> Implement the requested methods and add a test thereof.
>
> Brian Burkhalter has updated the pull request incrementally with one
> additional commit since the last revision:
>
> 8354724: Fix readAllChars gaffe in Reader returned by
On Wed, 16 Apr 2025 00:01:18 GMT, Chen Liang wrote:
>> This PR proposes to add the `@Stable` annotation to `j.l.String.hash` and
>> `j.l.String.hashIsZero`. This means the VM can trust these fields to never
>> change which enables constant folding optimizations.
>>
>> This PR is tested in tier
On Thu, 10 Apr 2025 13:46:17 GMT, Per Minborg wrote:
> > > ```
> > >
> > > I will take a look at it.
> > > ```
> >
> >
> > As i said in another mail to core-lib this morning, it seems that the field
> > storing the hashcode of String is not marked with @stable. That's may be
> > the issue.
>
On Thu, 10 Apr 2025 12:51:43 GMT, Per Minborg wrote:
>
> ```
>
> I will take a look at it.
As i said in another mail to core-lib this morning, it seems that the field
storing the hashcode of String is not marked with @Stable. That's may be the
issue.
-
PR Comment: h
On Mon, 7 Apr 2025 16:00:41 GMT, Per Minborg wrote:
>> Implement JEP 502.
>>
>> The PR passes tier1-tier3 tests.
>
> Per Minborg has updated the pull request incrementally with one additional
> commit since the last revision:
>
> Fix typo in return type
Hello,
I do not know if you know but
On Mon, 7 Apr 2025 16:00:41 GMT, Per Minborg wrote:
>> Implement JEP 502.
>>
>> The PR passes tier1-tier3 tests.
>
> Per Minborg has updated the pull request incrementally with one additional
> commit since the last revision:
>
> Fix typo in return type
src/java.base/share/classes/java/lang
On Thu, 21 Nov 2024 17:21:07 GMT, Andrew Haley wrote:
> Test bug.
>
> Another bug caused by the result of `Math.abs()` being negative. I also tried
> `floorMod()`, which would have been cleaner, but it increased the runtime of
> this extremely time-sensitive benchmark.
Let say that the defini
On Wed, 23 Oct 2024 15:36:08 GMT, Joe Darcy wrote:
>> src/java.base/share/classes/java/lang/Boolean.java line 259:
>>
>>> 257: public boolean equals(Object obj) {
>>> 258: if (obj instanceof Boolean b) {
>>> 259: return value == b.booleanValue();
>>
>> I would go even a
On Wed, 23 Oct 2024 02:06:20 GMT, Joe Darcy wrote:
> Noticed this refactoring opportunity while doing some other work in the area.
src/java.base/share/classes/java/lang/Boolean.java line 259:
> 257: public boolean equals(Object obj) {
> 258: if (obj instanceof Boolean b) {
> 259:
On Mon, 15 Jul 2024 11:33:30 GMT, Jorn Vernee wrote:
>> This PR limits the number of cases in which we deoptimize frames when
>> closing a shared Arena. The initial intent of this was to improve the
>> performance of shared arena closure in cases where a lot of threads are
>> accessing and clo
On Mon, 15 Jul 2024 10:50:34 GMT, Jorn Vernee wrote:
> This is what I was thinking of as well. close() on a shared arena can be
> called by any thread, so it would be possible to have an executor service
> with 1-n threads that is dedicated to closing memory.
This delays both the closing of th
On Fri, 12 Jul 2024 20:59:26 GMT, Jorn Vernee wrote:
>> This PR limits the number of cases in which we deoptimize frames when
>> closing a shared Arena. The initial intent of this was to improve the
>> performance of shared arena closure in cases where a lot of threads are
>> accessing and clo
On Fri, 12 Jul 2024 20:59:26 GMT, Jorn Vernee wrote:
>> This PR limits the number of cases in which we deoptimize frames when
>> closing a shared Arena. The initial intent of this was to improve the
>> performance of shared arena closure in cases where a lot of threads are
>> accessing and clo
On Thu, 30 May 2024 12:50:36 GMT, Claes Redestad wrote:
> Extracting duplicate method references to static field reduce proxy class
> spinning and loading. In this case 2 less classes loaded when using
> `findAny()` on each type of stream.
For constant method reference, the solution is to use
On Wed, 15 May 2024 11:27:04 GMT, ExE Boss wrote:
>>> Maybe export this interface to `jdk.unsupported`?
>>
>> I don't we should do that. In general, we need jdk.unsupported to go away in
>> the long term. Also integrity of the platform depends on java.base being
>> very stingy and not exportin
On Tue, 7 May 2024 16:09:08 GMT, Pavel Rappo wrote:
>> I do not think the step to "standardise" a preview feature exists ? When a
>> preview feature becomes a released feature, the code is very lightly edited,
>> at least it this is my experience.
>>
>> You can change both readln and readLine
On Tue, 7 May 2024 11:00:52 GMT, Pavel Rappo wrote:
>> src/java.base/share/classes/jdk/internal/io/JdkConsoleImpl.java line 74:
>>
>>> 72:
>>> 73: @Override
>>> 74: public String readln(String prompt) {
>>
>> this code can be simplified using an early return (and the body of the
>> tr
On Mon, 6 May 2024 21:45:12 GMT, Pavel Rappo wrote:
> Please review this PR which introduces the `java.io.IO` top-level class and
> three methods to `java.io.Console` for [Implicitly Declared Classes and
> Instance Main Methods (Third Preview)].
>
> This PR has been obtained as `git merge --sq
On Fri, 12 Apr 2024 14:53:01 GMT, Viktor Klang wrote:
>> This PR implements Gatherer-inspired encoding of `flatMap` that shows that
>> it is both competitive performance-wise as well as improve correctness.
>>
>> Below is the performance of `Stream::flatMap` (for reference types):
>>
>> Before
On Fri, 12 Apr 2024 14:53:01 GMT, Viktor Klang wrote:
>> This PR implements Gatherer-inspired encoding of `flatMap` that shows that
>> it is both competitive performance-wise as well as improve correctness.
>>
>> Below is the performance of `Stream::flatMap` (for reference types):
>>
>> Before
On Fri, 12 Apr 2024 14:53:01 GMT, Viktor Klang wrote:
>> This PR implements Gatherer-inspired encoding of `flatMap` that shows that
>> it is both competitive performance-wise as well as improve correctness.
>>
>> Below is the performance of `Stream::flatMap` (for reference types):
>>
>> Before
On Tue, 9 Apr 2024 12:01:49 GMT, Claes Redestad wrote:
> This patch suggests a workaround to an issue with huge SCF MH expression
> trees taking excessive JIT compilation resources by reviving (part of) the
> simple bytecode-generating strategy that was originally available as an
> all-or-noth
On Tue, 19 Dec 2023 11:01:12 GMT, Hannes Greule wrote:
> Isn't Arrays.equals() used under the hood?
No, for arrays == is used
-
PR Comment: https://git.openjdk.org/jdk/pull/17143#issuecomment-1863374656
On Tue, 14 Nov 2023 07:51:42 GMT, Viktor Klang wrote:
>> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461)
>
> Viktor Klang has updated the pull request incrementally with one additional
> commit since the last revision:
>
> Addressing last review feedback
Hello,
the relat
On Mon, 30 Oct 2023 15:38:35 GMT, Viktor Klang wrote:
> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461)
src/java.base/share/classes/java/util/stream/Gatherers.java line 64:
> 62: *needlessly
> 63: * 3. allows for more efficient composition and evaluation
> 64:
On Mon, 30 Oct 2023 15:38:35 GMT, Viktor Klang wrote:
> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461)
src/java.base/share/classes/java/util/stream/GathererOp.java line 232:
> 230: */
> 231: @SuppressWarnings("unchecked")
> 232: private GathererOp(Gatherer gat
On Mon, 30 Oct 2023 15:38:35 GMT, Viktor Klang wrote:
> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461)
src/java.base/share/classes/java/util/stream/GathererOp.java line 448:
> 446: private final long targetSize;
> 447: private final Hybrid leftPrede
On Mon, 30 Oct 2023 15:38:35 GMT, Viktor Klang wrote:
> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461)
src/java.base/share/classes/java/util/stream/GathererOp.java line 180:
> 178: finisher.accept(state, this);
> 179: sink.end();
> 180:
On Mon, 30 Oct 2023 15:38:35 GMT, Viktor Klang wrote:
> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461)
src/java.base/share/classes/java/util/stream/GathererOp.java line 95:
> 93: public void accept(X x) {
> 94: final var b = rightMost;
> 95:
On Mon, 30 Oct 2023 15:38:35 GMT, Viktor Klang wrote:
> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461)
src/java.base/share/classes/java/util/stream/GathererOp.java line 50:
> 48: */
> 49: final class GathererOp extends ReferencePipeline {
> 50: @SuppressWarnings("unch
On Wed, 8 Nov 2023 17:22:05 GMT, Rémi Forax wrote:
>> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461)
>
> src/java.base/share/classes/java/util/stream/Gatherer.java line 490:
>
>> 488: * more elements sent to it, {@code false
On Mon, 30 Oct 2023 15:38:35 GMT, Viktor Klang wrote:
> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461)
src/java.base/share/classes/java/util/stream/Gatherer.java line 444:
> 442: */
> 443: static Gatherer of(
> 444: Supplier initializer,
wildcards ar
On Wed, 8 Nov 2023 15:17:57 GMT, Viktor Klang wrote:
>> It's still possible to have a situation where PECS signature could be
>> useful, and I don't see any downsides. A user may want to reuse the same
>> static integrator instead of creating several identical lambdas just because
>> the targe
On Sun, 5 Nov 2023 16:18:52 GMT, Tagir F. Valeev wrote:
>> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461)
>
> src/java.base/share/classes/java/util/stream/Gatherer.java line 330:
>
>> 328: static Gatherer ofSequential(
>> 329: Integrator integrator,
>> 330:
On Wed, 8 Nov 2023 17:10:05 GMT, Tagir F. Valeev wrote:
>> Has this proven to be a problem for things like
>> [Collectors.mapping(…)](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/stream/Collectors.html#mapping(java.util.function.Function,java.util.stream.Collector))
>>
On Tue, 31 Oct 2023 13:19:30 GMT, Viktor Klang wrote:
>> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461)
>
> src/java.base/share/classes/java/util/stream/AbstractPipeline.java line 242:
>
>> 240: }
>> 241:
>> 242: // Terminal evaluation methods
>
> This is needed i
On Fri, 3 Nov 2023 16:51:34 GMT, Viktor Klang wrote:
>> Since stream facilities are package-private, we can just use no access
>> modifier and remove all new `protected` access modifier (on methods, fields,
>> constructors) in this PR.
>
> @liach We could do that, yet I'm not sure that is stric
On Mon, 30 Oct 2023 15:38:35 GMT, Viktor Klang wrote:
> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461)
src/java.base/share/classes/java/util/stream/AbstractPipeline.java line 223:
> 221: * consumed
> 222: */
> 223: protected AbstractPipeline(AbstractPipeline
On Fri, 3 Nov 2023 16:43:30 GMT, Jan Lahoda wrote:
>> Consider code like:
>>
>> void test(Object o) {
>> switch (o) {
>> case X1 -> {}
>> case X2 -> {}
>> ...(about 100 cases)
>> ```
>>
>> javac will compile the switch into a switch whose selector is an indy
>> invocation
On Fri, 3 Nov 2023 15:32:34 GMT, Jan Lahoda wrote:
>> Consider code like:
>>
>> void test(Object o) {
>> switch (o) {
>> case X1 -> {}
>> case X2 -> {}
>> ...(about 100 cases)
>> ```
>>
>> javac will compile the switch into a switch whose selector is an indy
>> invocation
On Fri, 3 Nov 2023 15:29:05 GMT, Jan Lahoda wrote:
> Thanks for all the comments so far - I think I've either reflected them, or
> wrote a comment to each of them. Please let me know if there's something
> else, or if I've forgotten something.
You idea to use an extra array is clever. Using an
On Fri, 3 Nov 2023 15:32:34 GMT, Jan Lahoda wrote:
>> Consider code like:
>>
>> void test(Object o) {
>> switch (o) {
>> case X1 -> {}
>> case X2 -> {}
>> ...(about 100 cases)
>> ```
>>
>> javac will compile the switch into a switch whose selector is an indy
>> invocation
On Fri, 3 Nov 2023 15:32:34 GMT, Jan Lahoda wrote:
>> Consider code like:
>>
>> void test(Object o) {
>> switch (o) {
>> case X1 -> {}
>> case X2 -> {}
>> ...(about 100 cases)
>> ```
>>
>> javac will compile the switch into a switch whose selector is an indy
>> invocation
On Fri, 3 Nov 2023 08:41:12 GMT, Jan Lahoda wrote:
> Consider code like:
>
> void test(Object o) {
> switch (o) {
> case X1 -> {}
> case X2 -> {}
> ...(about 100 cases)
> ```
>
> javac will compile the switch into a switch whose selector is an indy
> invocation to `SwitchB
On Fri, 3 Nov 2023 08:41:12 GMT, Jan Lahoda wrote:
> Consider code like:
>
> void test(Object o) {
> switch (o) {
> case X1 -> {}
> case X2 -> {}
> ...(about 100 cases)
> ```
>
> javac will compile the switch into a switch whose selector is an indy
> invocation to `SwitchB
On Fri, 3 Nov 2023 08:41:12 GMT, Jan Lahoda wrote:
> Consider code like:
>
> void test(Object o) {
> switch (o) {
> case X1 -> {}
> case X2 -> {}
> ...(about 100 cases)
> ```
>
> javac will compile the switch into a switch whose selector is an indy
> invocation to `SwitchB
On Thu, 2 Nov 2023 12:24:31 GMT, Jim Laskey wrote:
>> Uhmm. In the spec I see implicit classes named here:
>>
>>
>> For reference, the following constructs are declared implicitly in source
>> code, but are not marked as mandated because only formal parameters and
>> modules can be so marked
On Fri, 8 Sep 2023 18:55:29 GMT, altrisi wrote:
>> Per Minborg has updated the pull request incrementally with two additional
>> commits since the last revision:
>>
>> - Fix additional formating issue
>> - Don't use polymorphism and reformat code
>
> With the recent changes this ends up just
On Thu, 7 Sep 2023 18:05:51 GMT, Stuart Marks wrote:
>> Hello,
>> In Java, sharing code may have a runtime cost (or not) depending on the
>> shape of the code, because the VM may have to speculate on the class of some
>> value at runtime.
>> Here, in hasNext() and remove(), the VM has to find t
On Thu, 7 Sep 2023 11:48:51 GMT, Per Minborg wrote:
> This PR proposes to slightly improve some iterators of `AbstractMap`:
>
> * Code reuse
> * A field declared `final`
> * Add missing `@Override` annotations
Hello,
In Java, sharing code may have a runtime cost (or not) depending on the shape
On Fri, 25 Aug 2023 22:22:43 GMT, Mandy Chung wrote:
>> 8268829: Provide an optimized way to walk the stack with Class object only
>>
>> `StackWalker::walk` creates one `StackFrame` per frame and the current
>> implementation
>> allocates one `StackFrameInfo` and one `MemberName` objects per fr
On Fri, 25 Aug 2023 22:22:43 GMT, Mandy Chung wrote:
>> 8268829: Provide an optimized way to walk the stack with Class object only
>>
>> `StackWalker::walk` creates one `StackFrame` per frame and the current
>> implementation
>> allocates one `StackFrameInfo` and one `MemberName` objects per fr
On Fri, 25 Aug 2023 22:22:43 GMT, Mandy Chung wrote:
>> 8268829: Provide an optimized way to walk the stack with Class object only
>>
>> `StackWalker::walk` creates one `StackFrame` per frame and the current
>> implementation
>> allocates one `StackFrameInfo` and one `MemberName` objects per fr
On Fri, 21 Jul 2023 16:19:35 GMT, Hollis Waite wrote:
> a SequencedCollection is backed by a doubly linked list. It's up to the user
> to understand performance implications.
Beware of this kind of thinking, implementations of collections in the JDK
change.
Many hashtable implementations in o
On Fri, 21 Jul 2023 11:16:11 GMT, Hollis Waite wrote:
>> Stuart Marks has updated the pull request with a new target base due to a
>> merge or a rebase. The pull request now contains 96 commits:
>>
>> - Merge branch 'master' into JDK-8266571-SequencedCollections
>> - Optimizations for Reverse
On Thu, 25 May 2023 08:21:39 GMT, Alan Bateman wrote:
>> This is the implementation of:
>>
>> - JEP 453: Structured Concurrency (Preview)
>> - JEP 446: Scoped Values (Preview)
>>
>> For the most part, this is just moving code and tests. StructuredTaskScope
>> moves to j.u.concurrent as a prev
On Fri, 26 May 2023 06:07:05 GMT, Joe Darcy wrote:
>> Jim Laskey has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Improving error recovery in presence of less important syntactic errors in
>> top-level methods and fields.
>>
>> Auth
On Mon, 8 May 2023 10:46:34 GMT, Maurizio Cimadamore
wrote:
>> src/java.base/share/classes/java/lang/invoke/MethodHandleProxies.java line
>> 342:
>>
>>> 340:
>>> 341: // individual handle fields
>>> 342: clb.withField(ORIGINAL_TARGET_NAME, CD_MethodHandle,
>>> ACC_PRI
On Fri, 5 May 2023 17:35:33 GMT, Vicente Romero wrote:
>> `Flags.MANDATED` on a class is currently enough to know if it's a unnamed
>> class or not, but it's not enough for classes not produced by javac.
>
> good point
Just to be clear, here, Flags.UNNAMED_CLASS is needed because an an unnamed
On Fri, 5 May 2023 17:08:35 GMT, Vicente Romero wrote:
>> Jim Laskey has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Recommended changes #2
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java
> line 3999:
>
>
On Tue, 2 May 2023 21:22:16 GMT, Chen Liang wrote:
>> As John Rose has pointed out in this issue, the current j.l.r.Proxy based
>> implementation of MethodHandleProxies.asInterface has a few issues:
>> 1. Exposes too much information via Proxy supertype (and WrapperInstance
>> interface)
>> 2.
On Tue, 17 Jan 2023 15:55:40 GMT, Jan Lahoda wrote:
>> The pattern matching switches are using a bootstrap method
>> `SwitchBootstrap.typeSwitch` to implement the jumps in the switch.
>> Basically, for a switch like:
>>
>> switch (obj) {
>> case String s when s.isEmpty() -> {}
>> case
On Mon, 1 May 2023 14:56:27 GMT, Chen Liang wrote:
>> As John Rose has pointed out in this issue, the current j.l.r.Proxy based
>> implementation of MethodHandleProxies.asInterface has a few issues:
>> 1. Exposes too much information via Proxy supertype (and WrapperInstance
>> interface)
>> 2.
On Tue, 17 Jan 2023 15:55:40 GMT, Jan Lahoda wrote:
>> The pattern matching switches are using a bootstrap method
>> `SwitchBootstrap.typeSwitch` to implement the jumps in the switch.
>> Basically, for a switch like:
>>
>> switch (obj) {
>> case String s when s.isEmpty() -> {}
>> case
On Fri, 21 Apr 2023 16:25:04 GMT, Jan Lahoda wrote:
>> This is the first draft of a patch for JEP 440 and JEP 441. Changes included:
>>
>> - the pattern matching for switch and record patterns features are made
>> final, together with updates to tests.
>> - parenthesized patterns are removed.
On Fri, 21 Apr 2023 15:30:24 GMT, Maurizio Cimadamore
wrote:
>> Also, surprisingly, if I make C and D classes (instead of interfaces):
>>
>> class Test {
>> sealed interface I permits C, D { }
>> final class C implements I { }
>> final class D implements I { }
>>
>> interface F
On Thu, 6 Apr 2023 18:33:29 GMT, Chen Liang wrote:
>> As John Rose has pointed out in this issue, the current j.l.r.Proxy based
>> implementation of MethodHandleProxies.asInterface has a few issues:
>> 1. Exposes too much information via Proxy supertype (and WrapperInstance
>> interface)
>> 2.
On Tue, 4 Apr 2023 15:16:19 GMT, Jim Laskey wrote:
>> Enhance the Java programming language with string templates, which are
>> similar to string literals but contain embedded expressions. A string
>> template is interpreted at run time by replacing each expression with the
>> result of evalua
On Tue, 4 Apr 2023 15:16:19 GMT, Jim Laskey wrote:
>> Enhance the Java programming language with string templates, which are
>> similar to string literals but contain embedded expressions. A string
>> template is interpreted at run time by replacing each expression with the
>> result of evalua
On Mon, 3 Apr 2023 20:24:56 GMT, Mandy Chung wrote:
>> This implements a shared utility to dump generated classes defined as
>> normal/hidden classes via `Lookup` API. This replaces the implementation
>> in `LambdaMetaFactory` and method handle implementation that dumps the
>> hidden class b
On Wed, 29 Mar 2023 20:54:15 GMT, Chen Liang wrote:
>> Yes,
>> The spec says :"Changes to the underlying collection might or might not be
>> visible in this reversed view, depending upon the implementation." so i
>> believe the default implementation i proposed is a valid implementation
>
> In
On Wed, 29 Mar 2023 19:54:48 GMT, Tagir F. Valeev wrote:
>> In the same spirit, `reversed()` should also have a default implementation
>> equivalent to
>>
>>
>> Collections.unmodifiableSequenceCollection(Arrays.asList(this.toArray())).reversed()
>
> @forax but this would not be a view: chang
On Wed, 29 Mar 2023 19:06:20 GMT, Chen Liang wrote:
>> Stuart Marks has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Simplify handling of cached keySet, values, and entrySet views.
>
> src/java.base/share/classes/java/util/SequencedCollec
On Tue, 28 Mar 2023 02:37:22 GMT, Stuart Marks wrote:
>> PR for Sequenced Collections implementation.
>
> Stuart Marks has updated the pull request incrementally with one additional
> commit since the last revision:
>
> Simplify handling of cached keySet, values, and entrySet views.
This is
On Tue, 28 Mar 2023 02:37:22 GMT, Stuart Marks wrote:
>> PR for Sequenced Collections implementation.
>
> Stuart Marks has updated the pull request incrementally with one additional
> commit since the last revision:
>
> Simplify handling of cached keySet, values, and entrySet views.
Hi Erik,
On Wed, 29 Mar 2023 06:52:35 GMT, ExE Boss wrote:
> There is SortedMap,
yes, but no sorted "collection". An interface with a special semantic for set,
map or list do not have the same impact in term of number of lines to maintain
than a collection with a special semantics.
And java.util.Colle
On Tue, 28 Mar 2023 00:01:27 GMT, Stuart Marks wrote:
>> This change is absolutely massive, implementing reversed() basically doubles
>> the number of implementations which means multiple years of debugging / spec
>> fixing.
>>
>> Reversing a List makes sense, reversing a LinkedHashSet/LinkedH
On Mon, 27 Mar 2023 23:34:52 GMT, Chen Liang wrote:
> As John Rose has pointed out in this issue, the current j.l.r.Proxy based
> implementation of MethodHandleProxies.asInterface has a few issues:
> 1. Exposes too much information via Proxy supertype (and WrapperInstance
> interface)
> 2. Does
On Mon, 27 Mar 2023 23:34:52 GMT, Chen Liang wrote:
> As John Rose has pointed out in this issue, the current j.l.r.Proxy based
> implementation of MethodHandleProxies.asInterface has a few issues:
> 1. Exposes too much information via Proxy supertype (and WrapperInstance
> interface)
> 2. Does
On Mon, 27 Mar 2023 23:34:52 GMT, Chen Liang wrote:
> As John Rose has pointed out in this issue, the current j.l.r.Proxy based
> implementation of MethodHandleProxies.asInterface has a few issues:
> 1. Exposes too much information via Proxy supertype (and WrapperInstance
> interface)
> 2. Does
On Sat, 25 Mar 2023 03:54:23 GMT, Stuart Marks wrote:
>> PR for Sequenced Collections implementation.
>
> Stuart Marks has updated the pull request incrementally with two additional
> commits since the last revision:
>
> - More specification tweaks.
> - Add simple overrides to ArrayList.
Thi
On Sat, 25 Mar 2023 03:54:23 GMT, Stuart Marks wrote:
>> PR for Sequenced Collections implementation.
>
> Stuart Marks has updated the pull request incrementally with two additional
> commits since the last revision:
>
> - More specification tweaks.
> - Add simple overrides to ArrayList.
src
On Sat, 25 Mar 2023 03:54:23 GMT, Stuart Marks wrote:
>> PR for Sequenced Collections implementation.
>
> Stuart Marks has updated the pull request incrementally with two additional
> commits since the last revision:
>
> - More specification tweaks.
> - Add simple overrides to ArrayList.
src
On Sat, 25 Mar 2023 03:54:23 GMT, Stuart Marks wrote:
>> PR for Sequenced Collections implementation.
>
> Stuart Marks has updated the pull request incrementally with two additional
> commits since the last revision:
>
> - More specification tweaks.
> - Add simple overrides to ArrayList.
src
On Thu, 23 Mar 2023 12:17:55 GMT, Jim Laskey wrote:
>> src/java.base/share/classes/java/lang/runtime/TemplateRuntime.java line 204:
>>
>>> 202: Object[] values
>>> 203: ) throws Throwable {
>>> 204: List asList = Collections.unmodifiableList(new
>>> ArrayList<>(Arrays.as
On Thu, 23 Mar 2023 15:49:37 GMT, Jim Laskey wrote:
>> On the flip side, for those that don't use `var`;
>>
>>
>> Processor simple = Processor.of(st-> new
>> JSONObject(st.interpolate()));
>> Processor string =
>> Processor.of(StringTemplate::interpolate);
>>
>>
>> vs.
>>
>>
>> SimpleProc
On Wed, 22 Feb 2023 17:05:00 GMT, Kasper Nielsen wrote:
>> Volker Simonis has updated the pull request incrementally with two
>> additional commits since the last revision:
>>
>> - Remove assertions which insist on Lambda proxy classes being strongly
>> linked to their class loader
>> - Remo
On Thu, 9 Feb 2023 18:11:18 GMT, Volker Simonis wrote:
>> Prior to
>> [JDK-8239384](https://bugs.openjdk.org/browse/JDK-8239384)/[JDK-8238358](https://bugs.openjdk.org/browse/JDK-8238358)
>> LambdaMetaFactory has created VM-anonymous classes which could easily be
>> unloaded once they were not
On Thu, 9 Feb 2023 18:11:18 GMT, Volker Simonis wrote:
>> Prior to
>> [JDK-8239384](https://bugs.openjdk.org/browse/JDK-8239384)/[JDK-8238358](https://bugs.openjdk.org/browse/JDK-8238358)
>> LambdaMetaFactory has created VM-anonymous classes which could easily be
>> unloaded once they were not
On Fri, 27 Jan 2023 13:53:45 GMT, Glavo wrote:
>> I checked the `java.base` module, and all the `Collection#toArray()` method
>> of collections be implemented correctly.
>>
>> Their return values can be trusted, so many unnecessary array duplication
>> can be eliminated.
>
> Glavo has updated
On Fri, 27 Jan 2023 13:53:45 GMT, Glavo wrote:
>> I checked the `java.base` module, and all the `Collection#toArray()` method
>> of collections be implemented correctly.
>>
>> Their return values can be trusted, so many unnecessary array duplication
>> can be eliminated.
>
> Glavo has updated
On Tue, 24 Jan 2023 13:40:37 GMT, Viktor Klang wrote:
>> `coll instanceof ListN list` should work.
>
> @forax @stuart-marks Yeah, that works. It's unfortunate that it's not
> possible to match on the actual (generic) type, as then both sides of the ||
> could use type unification to avoid havin
On Tue, 24 Jan 2023 10:23:14 GMT, Viktor Klang wrote:
>> src/java.base/share/classes/java/util/ImmutableCollections.java line 169:
>>
>>> 167: @SuppressWarnings("unchecked")
>>> 168: static List listCopy(Collection coll) {
>>> 169: if (coll instanceof List12 || (coll instanceof
On Wed, 18 Jan 2023 07:32:58 GMT, Sergey Tsypanov wrote:
>> - `MethodType.ptypes()` can be used instead of `MethodType.parameterList()`
>> when we don't need a copy
>> - comparison of two lists can be done without `Stream.reduce()`
>
> Sergey Tsypanov has updated the pull request incrementally w
On Tue, 17 Jan 2023 18:07:37 GMT, Sergey Tsypanov wrote:
>> - `MethodType.ptypes()` can be used instead of `MethodType.parameterList()`
>> when we don't need a copy
>> - comparison of two lists can be done without `Stream.reduce()`
>
> Sergey Tsypanov has updated the pull request incrementally w
On Tue, 17 Jan 2023 10:18:42 GMT, Claes Redestad wrote:
>> Using lambdas inside MethodHandles is quite dangerous given that lambdas are
>> initialized using method handles. It may work now because
>> longuestParameterList() is not called when initializing a lambda but it may
>> make any change
On Tue, 17 Jan 2023 09:51:31 GMT, Claes Redestad wrote:
>> - `MethodType.ptypes()` can be used instead of `MethodType.parameterList()`
>> when we don't need a copy
>> - comparison of two lists can be done without `Stream.reduce()`
>
> src/java.base/share/classes/java/lang/invoke/MethodHandles.ja
On Mon, 9 Jan 2023 09:22:25 GMT, Per Minborg wrote:
>> Currently, `java.io.Bits` is using explicit logic to read/write various
>> primitive types to/from byte arrays. Switching to the use of `VarHandle`
>> access would provide better performance and less code.
>>
>> Also, using a standard API
1 - 100 of 129 matches
Mail list logo