From fparain at openjdk.org Wed May 1 13:44:10 2024 From: fparain at openjdk.org (Frederic Parain) Date: Wed, 1 May 2024 13:44:10 GMT Subject: [lworld] RFR: 8331006: [lworld] Support of null markers for nullable flat fields [v2] In-Reply-To: References: Message-ID: On Fri, 26 Apr 2024 17:25:03 GMT, Dan Heidinga wrote: >> Frederic Parain has updated the pull request incrementally with one additional commit since the last revision: >> >> Fixing issues spotted during reviews > > src/hotspot/cpu/aarch64/templateTable_aarch64.cpp line 3359: > >> 3357: Label is_flat, has_null_marker, done; >> 3358: __ test_field_has_null_marker(r3, noreg /* temp */, has_null_marker); >> 3359: __ null_check(r0); > > Does `__ null_check(r0);` need to occur first to make sure we consistently null check the receiver object? Or is the null receiver check handled in the InterpreterRuntime::write_nullale_flat_field helper? The receiver object is in r2, which is checked when retrieved with pop_and_check_object(). r0 is the new field value. If the flat field has a null marker, it means it is nullable, so null is a valid value for r0, and the null check must not be performed. If the field doesn't have a null marker, this is a null-free field, and the null check is performed. So I think the null_check(r0) is at the right place. > src/hotspot/share/classfile/fieldLayoutBuilder.cpp line 354: > >> 352: has_instance_fields = true; >> 353: LayoutRawBlock* block; >> 354: // if (fs.field_flags().is_null_free_inline_type()) { > > Left over commented code or breadcrumb for future update? Old code, will be removed in next commit. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/1078#discussion_r1586309369 PR Review Comment: https://git.openjdk.org/valhalla/pull/1078#discussion_r1586309985 From heidinga at openjdk.org Wed May 1 13:47:59 2024 From: heidinga at openjdk.org (Dan Heidinga) Date: Wed, 1 May 2024 13:47:59 GMT Subject: [lworld] RFR: 8331006: [lworld] Support of null markers for nullable flat fields [v2] In-Reply-To: References: Message-ID: On Wed, 1 May 2024 13:40:46 GMT, Frederic Parain wrote: >> src/hotspot/cpu/aarch64/templateTable_aarch64.cpp line 3359: >> >>> 3357: Label is_flat, has_null_marker, done; >>> 3358: __ test_field_has_null_marker(r3, noreg /* temp */, has_null_marker); >>> 3359: __ null_check(r0); >> >> Does `__ null_check(r0);` need to occur first to make sure we consistently null check the receiver object? Or is the null receiver check handled in the InterpreterRuntime::write_nullale_flat_field helper? > > The receiver object is in r2, which is checked when retrieved with pop_and_check_object(). r0 is the new field value. If the flat field has a null marker, it means it is nullable, so null is a valid value for r0, and the null check must not be performed. If the field doesn't have a null marker, this is a null-free field, and the null check is performed. So I think the null_check(r0) is at the right place. You're right. Thanks for checking. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/1078#discussion_r1586314364 From fparain at openjdk.org Wed May 1 13:53:05 2024 From: fparain at openjdk.org (Frederic Parain) Date: Wed, 1 May 2024 13:53:05 GMT Subject: [lworld] RFR: 8331006: [lworld] Support of null markers for nullable flat fields [v2] In-Reply-To: References: Message-ID: On Tue, 30 Apr 2024 14:08:33 GMT, Dan Heidinga wrote: >> Frederic Parain has updated the pull request incrementally with one additional commit since the last revision: >> >> Fixing issues spotted during reviews > > src/hotspot/share/interpreter/interpreterRuntime.cpp line 355: > >> 353: int nm_offset = ik->null_marker_offsets_array()->at(entry->field_index()); >> 354: if (val_h() == nullptr) { >> 355: obj_h()->byte_field_put(nm_offset, (jbyte)0); > > Do we need a barrier here? When we write the null marker, it is as if we wrote the null marker and then nulled the fields out (which we don't actually do) which makes me think we always need the barrier after writing the null marker to be consistent with the non-null case. In this case, there is a single write from the current thread, so there's no visibility ordering issue like with the non-null case. A concurrently reading thread will check (or has already read) the null marker, and this would be no different than reading a reference field being set to null. So I don't think we need a barrier here, but if you really think there's a potential issue, I can add one. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/1078#discussion_r1586320878 From fparain at openjdk.org Wed May 1 13:57:11 2024 From: fparain at openjdk.org (Frederic Parain) Date: Wed, 1 May 2024 13:57:11 GMT Subject: [lworld] RFR: 8331006: [lworld] Support of null markers for nullable flat fields [v2] In-Reply-To: References: Message-ID: On Tue, 30 Apr 2024 14:14:39 GMT, Dan Heidinga wrote: >> src/hotspot/share/interpreter/interpreterRuntime.cpp line 362: >> >>> 360: // The interpreter copies values with a bulk operation >>> 361: // To avoid accidently setting the null marker to "null" during >>> 362: // the copying, the null marker is set to non zero in the source object >> >> Is this saying if the null marker is embedded in the value field layout rather than placed separately, we set it to non-null before writing it into the container? This tripped me up a little bit reading the code but I think it makes sense > > How does that work for our memory barriers then? Do we not need a release here as well given the acquire used to read the null marker? This particular case cannot currently happen with JEP 401 model implementation (nullable flat field are limited to single field values until we have atomic updates supported). But it involves the tearing issue the interpreter has in some cases. So, even adding a barrier would not make the code correct. I'd prefer to address the issue of this particular code when fixing the wider interpreter tearing issue. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/1078#discussion_r1586324853 From fparain at openjdk.org Wed May 1 14:02:14 2024 From: fparain at openjdk.org (Frederic Parain) Date: Wed, 1 May 2024 14:02:14 GMT Subject: [lworld] RFR: 8331006: [lworld] Support of null markers for nullable flat fields [v2] In-Reply-To: References: Message-ID: On Fri, 26 Apr 2024 17:21:16 GMT, Dan Heidinga wrote: >> Frederic Parain has updated the pull request incrementally with one additional commit since the last revision: >> >> Fixing issues spotted during reviews > > src/hotspot/cpu/aarch64/templateTable_aarch64.cpp line 3355: > >> 3353: // access field >> 3354: switch (bytecode()) { >> 3355: case Bytecodes::_fast_vputfield: //fall through > > Suggestion: > > case Bytecodes::_fast_vputfield: Fixed in next commit. > src/hotspot/share/classfile/fieldLayoutBuilder.cpp line 800: > >> 798: bool value_has_oops = field_is_known_value_class ? _inline_type_field_klasses->at(fieldinfo.index())->nonstatic_oop_count() > 0 : true; >> 799: bool is_candidate_for_flattening = fieldinfo.field_flags().is_null_free_inline_type() || (EnableNullableFieldFlattening && field_is_known_value_class && !value_has_oops); >> 800: // if (!fieldinfo.field_flags().is_null_free_inline_type()) { > > Is it worth pulling this into a `array_candidate_for_flattening` helper method? It's a complex set of conditions and this is the second occurrence of it... I don't like the duplication either, and having a helper method would make the code easier to read. However, this is a section of code under big transformations, with nullable flat field being added, then next the atomic fields, then the nullable atomic fields. Before refactoring, I'd prefer to wait until all the cases are covered, so we know exactly all the parameters the helper method will require, and if the two cases are still identical or if some divergences appeared. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/1078#discussion_r1586329253 PR Review Comment: https://git.openjdk.org/valhalla/pull/1078#discussion_r1586328862 From fparain at openjdk.org Wed May 1 14:59:20 2024 From: fparain at openjdk.org (Frederic Parain) Date: Wed, 1 May 2024 14:59:20 GMT Subject: [lworld] RFR: 8331006: [lworld] Support of null markers for nullable flat fields [v3] In-Reply-To: References: Message-ID: > This is the first step in supporting nullable flat fields in JEP 401. > Those changes give value fields the optional capability to be associated with a null marker that indicates if the value if the field is null or not. Null markers are integrated in the object layout, and in the field metadata (in both compresses and uncompressed forms). > Field accesses in the x86 and the arch64 interpreter have been extended to check the presence of a null marker when reading a field. If present, the null marker is checked in reads and updated on writes. > > The field layout logic is becoming more complex (and the complexity will continue to increase in the future with the addition of atomic flat fields and atomic nullable flat fields). So the changeset includes a test framework able to verify the consistency of fields layout using the output of -XX:+PrintFieldLayout. The format of data printed by PrintFieldLayout has been extended and modified to be easier to parse. Frederic Parain has updated the pull request incrementally with one additional commit since the last revision: More fixes from reviews ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/1078/files - new: https://git.openjdk.org/valhalla/pull/1078/files/34180e09..d8190b7c Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=1078&range=02 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=1078&range=01-02 Stats: 28 lines in 3 files changed: 26 ins; 1 del; 1 mod Patch: https://git.openjdk.org/valhalla/pull/1078.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1078/head:pull/1078 PR: https://git.openjdk.org/valhalla/pull/1078 From heidinga at openjdk.org Wed May 1 15:18:01 2024 From: heidinga at openjdk.org (Dan Heidinga) Date: Wed, 1 May 2024 15:18:01 GMT Subject: [lworld] RFR: 8331006: [lworld] Support of null markers for nullable flat fields [v3] In-Reply-To: References: Message-ID: On Wed, 1 May 2024 14:59:20 GMT, Frederic Parain wrote: >> This is the first step in supporting nullable flat fields in JEP 401. >> Those changes give value fields the optional capability to be associated with a null marker that indicates if the value if the field is null or not. Null markers are integrated in the object layout, and in the field metadata (in both compresses and uncompressed forms). >> Field accesses in the x86 and the arch64 interpreter have been extended to check the presence of a null marker when reading a field. If present, the null marker is checked in reads and updated on writes. >> >> The field layout logic is becoming more complex (and the complexity will continue to increase in the future with the addition of atomic flat fields and atomic nullable flat fields). So the changeset includes a test framework able to verify the consistency of fields layout using the output of -XX:+PrintFieldLayout. The format of data printed by PrintFieldLayout has been extended and modified to be easier to parse. > > Frederic Parain has updated the pull request incrementally with one additional commit since the last revision: > > More fixes from reviews Thanks for the clarifications. This looks good to me. ------------- Marked as reviewed by heidinga (no project role). PR Review: https://git.openjdk.org/valhalla/pull/1078#pullrequestreview-2033810901 From heidinga at openjdk.org Wed May 1 15:18:02 2024 From: heidinga at openjdk.org (Dan Heidinga) Date: Wed, 1 May 2024 15:18:02 GMT Subject: [lworld] RFR: 8331006: [lworld] Support of null markers for nullable flat fields [v2] In-Reply-To: References: Message-ID: On Wed, 1 May 2024 13:50:39 GMT, Frederic Parain wrote: >> src/hotspot/share/interpreter/interpreterRuntime.cpp line 355: >> >>> 353: int nm_offset = ik->null_marker_offsets_array()->at(entry->field_index()); >>> 354: if (val_h() == nullptr) { >>> 355: obj_h()->byte_field_put(nm_offset, (jbyte)0); >> >> Do we need a barrier here? When we write the null marker, it is as if we wrote the null marker and then nulled the fields out (which we don't actually do) which makes me think we always need the barrier after writing the null marker to be consistent with the non-null case. > > In this case, there is a single write from the current thread, so there's no visibility ordering issue like with the non-null case. A concurrently reading thread will check (or has already read) the null marker, and this would be no different than reading a reference field being set to null. So I don't think we need a barrier here, but if you really think there's a potential issue, I can add one. I think you're right here and we don't need the `release_byte_field_put` here. Just as we're happy for reads/writes of null references to slowly make their way to other threads, a slow discovery of the null bit is fine given the other value fields are stable before the bit flips. The barrier you have in place is sufficient for that constraint. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/1078#discussion_r1586410470 From fparain at openjdk.org Wed May 1 15:37:01 2024 From: fparain at openjdk.org (Frederic Parain) Date: Wed, 1 May 2024 15:37:01 GMT Subject: [lworld] RFR: 8331006: [lworld] Support of null markers for nullable flat fields [v3] In-Reply-To: References: Message-ID: On Wed, 1 May 2024 14:59:20 GMT, Frederic Parain wrote: >> This is the first step in supporting nullable flat fields in JEP 401. >> Those changes give value fields the optional capability to be associated with a null marker that indicates if the value if the field is null or not. Null markers are integrated in the object layout, and in the field metadata (in both compresses and uncompressed forms). >> Field accesses in the x86 and the arch64 interpreter have been extended to check the presence of a null marker when reading a field. If present, the null marker is checked in reads and updated on writes. >> >> The field layout logic is becoming more complex (and the complexity will continue to increase in the future with the addition of atomic flat fields and atomic nullable flat fields). So the changeset includes a test framework able to verify the consistency of fields layout using the output of -XX:+PrintFieldLayout. The format of data printed by PrintFieldLayout has been extended and modified to be easier to parse. > > Frederic Parain has updated the pull request incrementally with one additional commit since the last revision: > > More fixes from reviews Mr Simms, Dan, Thank you for your reviews. Fred ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1078#issuecomment-2088640577 From fparain at openjdk.org Wed May 1 15:37:03 2024 From: fparain at openjdk.org (Frederic Parain) Date: Wed, 1 May 2024 15:37:03 GMT Subject: [lworld] Integrated: 8331006: [lworld] Support of null markers for nullable flat fields In-Reply-To: References: Message-ID: <7x-Df85IgBO_LzED23uV2kuAtzpVkKZBfw_QxXPyYhA=.86e51613-c64c-4a87-91da-670afb8e204e@github.com> On Thu, 18 Apr 2024 20:40:22 GMT, Frederic Parain wrote: > This is the first step in supporting nullable flat fields in JEP 401. > Those changes give value fields the optional capability to be associated with a null marker that indicates if the value if the field is null or not. Null markers are integrated in the object layout, and in the field metadata (in both compresses and uncompressed forms). > Field accesses in the x86 and the arch64 interpreter have been extended to check the presence of a null marker when reading a field. If present, the null marker is checked in reads and updated on writes. > > The field layout logic is becoming more complex (and the complexity will continue to increase in the future with the addition of atomic flat fields and atomic nullable flat fields). So the changeset includes a test framework able to verify the consistency of fields layout using the output of -XX:+PrintFieldLayout. The format of data printed by PrintFieldLayout has been extended and modified to be easier to parse. This pull request has now been integrated. Changeset: eb1df165 Author: Frederic Parain URL: https://git.openjdk.org/valhalla/commit/eb1df16538a32cb9f59db944e24520ea42222d7b Stats: 2086 lines in 37 files changed: 1891 ins; 13 del; 182 mod 8331006: [lworld] Support of null markers for nullable flat fields Reviewed-by: dsimms, heidinga ------------- PR: https://git.openjdk.org/valhalla/pull/1078 From mchung at openjdk.org Wed May 1 16:26:19 2024 From: mchung at openjdk.org (Mandy Chung) Date: Wed, 1 May 2024 16:26:19 GMT Subject: [lworld] RFR: 8331496: [lworld] Class::isValue, Class::isIdentity and new java.lang.reflect APIs should be reflective preview API Message-ID: <8TmIBRLIn2a5WN_Ls47UZKtBRHoNTQoKLAQ8LSoRUwc=.ace3c7a1-d3ee-40c1-9eb8-d2b19957cbd4@github.com> Mark the reflection APIs added for JEP 401 as reflective preview API. ------------- Commit messages: - 8331496: [lworld] Class::isValue, Class::isIdentity and new java.lang.reflect APIs should be reflective preview API Changes: https://git.openjdk.org/valhalla/pull/1090/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1090&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8331496 Stats: 30 lines in 4 files changed: 10 ins; 13 del; 7 mod Patch: https://git.openjdk.org/valhalla/pull/1090.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1090/head:pull/1090 PR: https://git.openjdk.org/valhalla/pull/1090 From rriggs at openjdk.org Wed May 1 16:51:00 2024 From: rriggs at openjdk.org (Roger Riggs) Date: Wed, 1 May 2024 16:51:00 GMT Subject: [lworld] RFR: 8331496: [lworld] Class::isValue, Class::isIdentity and new java.lang.reflect APIs should be reflective preview API In-Reply-To: <8TmIBRLIn2a5WN_Ls47UZKtBRHoNTQoKLAQ8LSoRUwc=.ace3c7a1-d3ee-40c1-9eb8-d2b19957cbd4@github.com> References: <8TmIBRLIn2a5WN_Ls47UZKtBRHoNTQoKLAQ8LSoRUwc=.ace3c7a1-d3ee-40c1-9eb8-d2b19957cbd4@github.com> Message-ID: On Wed, 1 May 2024 16:21:17 GMT, Mandy Chung wrote: > Mark the reflection APIs added for JEP 401 as reflective preview API. lgtm. Thanks for adding the reflective=true to the new method annotations. That distinction hadn't been a blocker before. ------------- Marked as reviewed by rriggs (Committer). PR Review: https://git.openjdk.org/valhalla/pull/1090#pullrequestreview-2033956520 From vromero at openjdk.org Wed May 1 20:13:41 2024 From: vromero at openjdk.org (Vicente Romero) Date: Wed, 1 May 2024 20:13:41 GMT Subject: [lworld] Integrated: 8331462: [lworld] javac is setting the ACC_STRICT flag for value-based classes Message-ID: javac is erroneously generating the ACC_STRICT flag for value based classes, so classes annotated with: `@jdk.internal.ValueBased` like `java.lang.Integer` etc has the ACC_STRICT flag set. This flag should only be applied to instance fields of value classes not to any class TIA ------------- Commit messages: - removing white space - 8331462: [lworld] javac is setting the ACC_STRICT flag for value-based classes Changes: https://git.openjdk.org/valhalla/pull/1091/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1091&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8331462 Stats: 103 lines in 2 files changed: 96 ins; 0 del; 7 mod Patch: https://git.openjdk.org/valhalla/pull/1091.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1091/head:pull/1091 PR: https://git.openjdk.org/valhalla/pull/1091 From vromero at openjdk.org Wed May 1 20:13:42 2024 From: vromero at openjdk.org (Vicente Romero) Date: Wed, 1 May 2024 20:13:42 GMT Subject: [lworld] Integrated: 8331462: [lworld] javac is setting the ACC_STRICT flag for value-based classes In-Reply-To: References: Message-ID: On Wed, 1 May 2024 20:08:14 GMT, Vicente Romero wrote: > javac is erroneously generating the ACC_STRICT flag for value based classes, so classes annotated with: `@jdk.internal.ValueBased` like `java.lang.Integer` etc has the ACC_STRICT flag set. This flag should only be applied to instance fields of value classes not to any class > > TIA This pull request has now been integrated. Changeset: 6bb6b080 Author: Vicente Romero URL: https://git.openjdk.org/valhalla/commit/6bb6b08039f1c6ae318136ce22cafbf618d590a5 Stats: 103 lines in 2 files changed: 96 ins; 0 del; 7 mod 8331462: [lworld] javac is setting the ACC_STRICT flag for value-based classes ------------- PR: https://git.openjdk.org/valhalla/pull/1091 From mchung at openjdk.org Wed May 1 21:44:59 2024 From: mchung at openjdk.org (Mandy Chung) Date: Wed, 1 May 2024 21:44:59 GMT Subject: [lworld] Integrated: 8331496: [lworld] Class::isValue, Class::isIdentity and new java.lang.reflect APIs should be reflective preview API In-Reply-To: <8TmIBRLIn2a5WN_Ls47UZKtBRHoNTQoKLAQ8LSoRUwc=.ace3c7a1-d3ee-40c1-9eb8-d2b19957cbd4@github.com> References: <8TmIBRLIn2a5WN_Ls47UZKtBRHoNTQoKLAQ8LSoRUwc=.ace3c7a1-d3ee-40c1-9eb8-d2b19957cbd4@github.com> Message-ID: <7vTJHmKMkmyHc2YMZeZkRKmcveBlHSAh9xRbYOgy8Ik=.6345a5a0-410f-409d-9f5f-17afbc6c2693@github.com> On Wed, 1 May 2024 16:21:17 GMT, Mandy Chung wrote: > Mark the reflection APIs added for JEP 401 as reflective preview API. This pull request has now been integrated. Changeset: 7a5cdc72 Author: Mandy Chung URL: https://git.openjdk.org/valhalla/commit/7a5cdc720091c9a36de65e373ec4b128ad1e7f5e Stats: 30 lines in 4 files changed: 10 ins; 13 del; 7 mod 8331496: [lworld] Class::isValue, Class::isIdentity and new java.lang.reflect APIs should be reflective preview API Reviewed-by: rriggs ------------- PR: https://git.openjdk.org/valhalla/pull/1090 From mchung at openjdk.org Wed May 1 22:34:22 2024 From: mchung at openjdk.org (Mandy Chung) Date: Wed, 1 May 2024 22:34:22 GMT Subject: [lworld] RFR: 8331521: [lworld] dynamic proxy class does not strictly need preload attributes Message-ID: <0qEEBtMeGaczVqB_gJenBaz3bV2cmxT_BY0gUuPJUDk=.4cce657b-5d11-43d0-802d-5cf6926e23ed@github.com> This PR takes out the generation of preload attributes in dynamic proxy. If a proxy interface references any value classes, the value classes are listed in the preload attribute of the interface class. The classes that are referenced by the proxy interface have already been loaded before the proxy class. Hence the proxy class can be generated with no preload attributes as it essentially has no effect. ------------- Commit messages: - 8331521: [lworld] dynamic proxy class does not strictly need preload attributes Changes: https://git.openjdk.org/valhalla/pull/1092/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1092&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8331521 Stats: 62 lines in 1 file changed: 6 ins; 54 del; 2 mod Patch: https://git.openjdk.org/valhalla/pull/1092.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1092/head:pull/1092 PR: https://git.openjdk.org/valhalla/pull/1092 From vromero at openjdk.org Thu May 2 03:56:37 2024 From: vromero at openjdk.org (Vicente Romero) Date: Thu, 2 May 2024 03:56:37 GMT Subject: [lworld] Integrated: 8331461: [lworld] javac is generating a class file with the Preload attribute but with minor version '0' Message-ID: if we compile: value class Val {} and: class Ident { Val val; } as in: `javac -d out --enable-preview -source 23 myTests/Val.java myTests/Ident.java` Ident.class will have a Preload attribute but its minor version is `0` instead of `65535`, the minor version should indicate that the class file is using preview features. ------------- Commit messages: - 8331461: [lworld] javac is generating a class file with the Preload attribute but with minor version '0' Changes: https://git.openjdk.org/valhalla/pull/1093/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1093&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8331461 Stats: 113 lines in 2 files changed: 113 ins; 0 del; 0 mod Patch: https://git.openjdk.org/valhalla/pull/1093.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1093/head:pull/1093 PR: https://git.openjdk.org/valhalla/pull/1093 From vromero at openjdk.org Thu May 2 03:56:38 2024 From: vromero at openjdk.org (Vicente Romero) Date: Thu, 2 May 2024 03:56:38 GMT Subject: [lworld] Integrated: 8331461: [lworld] javac is generating a class file with the Preload attribute but with minor version '0' In-Reply-To: References: Message-ID: On Thu, 2 May 2024 03:51:07 GMT, Vicente Romero wrote: > if we compile: > > value class Val {} and: > > class Ident { > Val val; > } > > as in: > `javac -d out --enable-preview -source 23 myTests/Val.java myTests/Ident.java` > > Ident.class will have a Preload attribute but its minor version is `0` instead of `65535`, the minor version should indicate that the class file is using preview features. This pull request has now been integrated. Changeset: 5951b0c9 Author: Vicente Romero URL: https://git.openjdk.org/valhalla/commit/5951b0c9b57321714f18689dd3a03e5cf63d32bb Stats: 113 lines in 2 files changed: 113 ins; 0 del; 0 mod 8331461: [lworld] javac is generating a class file with the Preload attribute but with minor version '0' ------------- PR: https://git.openjdk.org/valhalla/pull/1093 From dsimms at openjdk.org Thu May 2 08:03:26 2024 From: dsimms at openjdk.org (David Simms) Date: Thu, 2 May 2024 08:03:26 GMT Subject: [lworld] Integrated: Merge jdk In-Reply-To: <5B00UbI39ekohTjgj7jDbCp7CqMePBUVAY3ch-dMFQ8=.fc091549-a93f-457a-9343-ad8adb43e17c@github.com> References: <5B00UbI39ekohTjgj7jDbCp7CqMePBUVAY3ch-dMFQ8=.fc091549-a93f-457a-9343-ad8adb43e17c@github.com> Message-ID: On Tue, 30 Apr 2024 08:55:55 GMT, David Simms wrote: > Merge tag 'jdk-23+6' into lworld_merge_jdk_23_6 > Added tag jdk-23+6 for changeset ff8cc268 This pull request has now been integrated. Changeset: 653cf84d Author: David Simms URL: https://git.openjdk.org/valhalla/commit/653cf84dfbdad2468a553eaad8db42ffa9e5e483 Stats: 16248 lines in 383 files changed: 8520 ins; 6460 del; 1268 mod Merge jdk Merge jdk-23+6 ------------- PR: https://git.openjdk.org/valhalla/pull/1089 From fparain at openjdk.org Thu May 2 16:08:17 2024 From: fparain at openjdk.org (Frederic Parain) Date: Thu, 2 May 2024 16:08:17 GMT Subject: [lworld] RFR: 8331583: [lworld] runtime/valhalla/inlinetypes/field_layout/FieldAlignmentTest.java#NoCompressedOops fails with compilation errorRemove hard coded Java version number. Message-ID: Small fix removing a hard coded Java version number causing test failures after merge with mainline. ------------- Commit messages: - Remove hard coded Java version number. Changes: https://git.openjdk.org/valhalla/pull/1094/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1094&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8331583 Stats: 4 lines in 1 file changed: 2 ins; 0 del; 2 mod Patch: https://git.openjdk.org/valhalla/pull/1094.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1094/head:pull/1094 PR: https://git.openjdk.org/valhalla/pull/1094 From fparain at openjdk.org Thu May 2 19:59:07 2024 From: fparain at openjdk.org (Frederic Parain) Date: Thu, 2 May 2024 19:59:07 GMT Subject: [lworld] RFR: 8331602: [lworld] Test using -XX:+EnableNullableFieldFlattening should not be run in product mode Message-ID: NullableFlatFieldTest and UnsafeTest needs EnableNullableFieldFlattening, which is a develop flag, not available on product build. EnableNullableFieldFlattening is a temporary flag that will be removed once all the VM supports nullable flat fields. For now, those two tests will only be run with debug builds. ------------- Commit messages: - Restrict tests to debug mode Changes: https://git.openjdk.org/valhalla/pull/1095/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1095&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8331602 Stats: 2 lines in 2 files changed: 2 ins; 0 del; 0 mod Patch: https://git.openjdk.org/valhalla/pull/1095.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1095/head:pull/1095 PR: https://git.openjdk.org/valhalla/pull/1095 From fparain at openjdk.org Thu May 2 20:09:13 2024 From: fparain at openjdk.org (Frederic Parain) Date: Thu, 2 May 2024 20:09:13 GMT Subject: [lworld] Integrated: 8331602: [lworld] Test using -XX:+EnableNullableFieldFlattening should not be run in product mode In-Reply-To: References: Message-ID: On Thu, 2 May 2024 19:55:40 GMT, Frederic Parain wrote: > NullableFlatFieldTest and UnsafeTest needs EnableNullableFieldFlattening, which is a develop flag, not available on product build. EnableNullableFieldFlattening is a temporary flag that will be removed once all the VM supports nullable flat fields. For now, those two tests will only be run with debug builds. This pull request has now been integrated. Changeset: e125a279 Author: Frederic Parain URL: https://git.openjdk.org/valhalla/commit/e125a279a09a0afb4ca39d14f4dd16b3638f843b Stats: 2 lines in 2 files changed: 2 ins; 0 del; 0 mod 8331602: [lworld] Test using -XX:+EnableNullableFieldFlattening should not be run in product mode ------------- PR: https://git.openjdk.org/valhalla/pull/1095 From mchung at openjdk.org Thu May 2 20:17:07 2024 From: mchung at openjdk.org (Mandy Chung) Date: Thu, 2 May 2024 20:17:07 GMT Subject: [lworld] Integrated: 8331521: [lworld] dynamic proxy class does not strictly need preload attributes In-Reply-To: <0qEEBtMeGaczVqB_gJenBaz3bV2cmxT_BY0gUuPJUDk=.4cce657b-5d11-43d0-802d-5cf6926e23ed@github.com> References: <0qEEBtMeGaczVqB_gJenBaz3bV2cmxT_BY0gUuPJUDk=.4cce657b-5d11-43d0-802d-5cf6926e23ed@github.com> Message-ID: On Wed, 1 May 2024 22:29:37 GMT, Mandy Chung wrote: > This PR takes out the generation of preload attributes in dynamic proxy. > > If a proxy interface references any value classes, the value classes are listed in the preload attribute of the interface class. The classes that are referenced by the proxy interface have already been loaded before the proxy class. Hence the proxy class can be generated with no preload attributes as it essentially has no effect. This pull request has now been integrated. Changeset: 2a9782b7 Author: Mandy Chung URL: https://git.openjdk.org/valhalla/commit/2a9782b73fd46e4f038872b03e2da806d7c8c7c4 Stats: 62 lines in 1 file changed: 6 ins; 54 del; 2 mod 8331521: [lworld] dynamic proxy class does not strictly need preload attributes ------------- PR: https://git.openjdk.org/valhalla/pull/1092 From fparain at openjdk.org Thu May 2 23:00:13 2024 From: fparain at openjdk.org (Frederic Parain) Date: Thu, 2 May 2024 23:00:13 GMT Subject: [lworld] RFR: 8331583: [lworld] runtime/valhalla/inlinetypes/field_layout/FieldAlignmentTest.java fails with compilation error In-Reply-To: References: Message-ID: On Thu, 2 May 2024 16:03:48 GMT, Frederic Parain wrote: > Small fix removing a hard coded Java version number causing test failures after merge with mainline. Tested with tier1, no failure reported. ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1094#issuecomment-2091878629 From fparain at openjdk.org Thu May 2 23:00:13 2024 From: fparain at openjdk.org (Frederic Parain) Date: Thu, 2 May 2024 23:00:13 GMT Subject: [lworld] Integrated: 8331583: [lworld] runtime/valhalla/inlinetypes/field_layout/FieldAlignmentTest.java fails with compilation error In-Reply-To: References: Message-ID: On Thu, 2 May 2024 16:03:48 GMT, Frederic Parain wrote: > Small fix removing a hard coded Java version number causing test failures after merge with mainline. This pull request has now been integrated. Changeset: 9b8e936d Author: Frederic Parain URL: https://git.openjdk.org/valhalla/commit/9b8e936df21ebad25ec04afc9fa74ad3e29f42cc Stats: 4 lines in 1 file changed: 2 ins; 0 del; 2 mod 8331583: [lworld] runtime/valhalla/inlinetypes/field_layout/FieldAlignmentTest.java fails with compilation error ------------- PR: https://git.openjdk.org/valhalla/pull/1094 From fparain at openjdk.org Mon May 6 19:53:22 2024 From: fparain at openjdk.org (Frederic Parain) Date: Mon, 6 May 2024 19:53:22 GMT Subject: [lworld] RFR: 8331587: [lworld] runtime/valhalla/inlinetypes/field_layout/NullMarkersTest.java fails with java.lang.RuntimeException: assertEquals: expected 4 to equal 8 Message-ID: Changes in the format of field layout dump to include the size of oops. Adjustments in the FieldLayoutAnalyzer to rely on these new entry rather than an argument passed by the caller. Test with Mach5 tiers 1-3 ------------- Commit messages: - Makes FieldAnalyzer robust against unexpected oop size Changes: https://git.openjdk.org/valhalla/pull/1097/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1097&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8331587 Stats: 36 lines in 4 files changed: 13 ins; 9 del; 14 mod Patch: https://git.openjdk.org/valhalla/pull/1097.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1097/head:pull/1097 PR: https://git.openjdk.org/valhalla/pull/1097 From fparain at openjdk.org Mon May 6 21:25:59 2024 From: fparain at openjdk.org (Frederic Parain) Date: Mon, 6 May 2024 21:25:59 GMT Subject: [lworld] Integrated: 8331587: [lworld] runtime/valhalla/inlinetypes/field_layout/NullMarkersTest.java fails with java.lang.RuntimeException: assertEquals: expected 4 to equal 8 In-Reply-To: References: Message-ID: On Mon, 6 May 2024 19:48:19 GMT, Frederic Parain wrote: > Changes in the format of field layout dump to include the size of oops. Adjustments in the FieldLayoutAnalyzer to rely on these new entry rather than an argument passed by the caller. > > Test with Mach5 tiers 1-3 This pull request has now been integrated. Changeset: 3b89acb1 Author: Frederic Parain URL: https://git.openjdk.org/valhalla/commit/3b89acb102ddb7b4f318edab5c1a6169b28757c0 Stats: 36 lines in 4 files changed: 13 ins; 9 del; 14 mod 8331587: [lworld] runtime/valhalla/inlinetypes/field_layout/NullMarkersTest.java fails with java.lang.RuntimeException: assertEquals: expected 4 to equal 8 ------------- PR: https://git.openjdk.org/valhalla/pull/1097 From bkilambi at openjdk.org Tue May 7 08:40:28 2024 From: bkilambi at openjdk.org (Bhavana Kilambi) Date: Tue, 7 May 2024 08:40:28 GMT Subject: [lworld+fp16] RFR: 8330021: AArch64: Add backend support for FP16 add operation Message-ID: <-sLrODPBVflosNEfVE5yzNdbC2l2AhJ3E-tfyLc3OTc=.606995b7-bdef-4d04-bf84-75ecdc3668fb@github.com> This commit [1] adds initial support for FP16 operations and adds backend support for FP16 add operation for X86. This task adds backend support for scalar and vector FP16 add operation on aarch64. [1] https://github.com/openjdk/valhalla/commit/f03fb4e4ee4d59ed692d0c26ddce260511f544e7#diff-a799ce8da7f3062bb3699beb65aae504840c649942032e325c2a50f88a2869ad ------------- Commit messages: - 8330021: AArch64: Add backend support for FP16 add operation Changes: https://git.openjdk.org/valhalla/pull/1096/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1096&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8330021 Stats: 968 lines in 19 files changed: 271 ins; 4 del; 693 mod Patch: https://git.openjdk.org/valhalla/pull/1096.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1096/head:pull/1096 PR: https://git.openjdk.org/valhalla/pull/1096 From dsimms at openjdk.org Tue May 7 09:45:23 2024 From: dsimms at openjdk.org (David Simms) Date: Tue, 7 May 2024 09:45:23 GMT Subject: [lworld] RFR: Merge jdk Message-ID: Merge jdk-23+9 ------------- Commit messages: - Fixed triggered missing lock assertion from 8306767 - Merge branch 'lworld' into lworld_merge_jdk_23_7 - Logical merge compilation errors - Merge tag 'jdk-23+9' into lworld_merge_jdk_23_7 - 8325304: Several classes in java.util.jar and java.util.zip don't specify the behaviour for null arguments - 8325367: Rename nsk_list.h - 8323681: SA PointerFinder code should support G1 - 8325189: Enable this-escape javac warning in java.base - 8325302: Files.move(REPLACE_EXISTING) throws NoSuchFileException on deleted target - 8325268: Add policy statement to langtools makefiles concerning warnings - ... and 231 more: https://git.openjdk.org/valhalla/compare/3b89acb1...bb9f5004 The webrevs contain the adjustments done while merging with regards to each parent branch: - lworld: https://webrevs.openjdk.org/?repo=valhalla&pr=1098&range=00.0 - jdk: https://webrevs.openjdk.org/?repo=valhalla&pr=1098&range=00.1 Changes: https://git.openjdk.org/valhalla/pull/1098/files Stats: 35307 lines in 1861 files changed: 17245 ins; 5221 del; 12841 mod Patch: https://git.openjdk.org/valhalla/pull/1098.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1098/head:pull/1098 PR: https://git.openjdk.org/valhalla/pull/1098 From bkilambi at openjdk.org Tue May 7 10:27:06 2024 From: bkilambi at openjdk.org (Bhavana Kilambi) Date: Tue, 7 May 2024 10:27:06 GMT Subject: [lworld+fp16] RFR: 8330021: AArch64: Add backend support for FP16 add operation In-Reply-To: <-sLrODPBVflosNEfVE5yzNdbC2l2AhJ3E-tfyLc3OTc=.606995b7-bdef-4d04-bf84-75ecdc3668fb@github.com> References: <-sLrODPBVflosNEfVE5yzNdbC2l2AhJ3E-tfyLc3OTc=.606995b7-bdef-4d04-bf84-75ecdc3668fb@github.com> Message-ID: On Mon, 6 May 2024 18:28:31 GMT, Bhavana Kilambi wrote: > This commit [1] adds initial support for FP16 operations and adds backend support for FP16 add operation for X86. This task adds backend support for scalar and vector FP16 add operation on aarch64. > > [1] https://github.com/openjdk/valhalla/commit/f03fb4e4ee4d59ed692d0c26ddce260511f544e7#diff-a799ce8da7f3062bb3699beb65aae504840c649942032e325c2a50f88a2869ad test/hotspot/gtest/aarch64/aarch64-asmtest.py line 19: > 17: 0x7e0, 0xfc0, 0x1f80, 0x3ff0, 0x7e00, 0x7e00, > 18: 0x8000, 0x81ff, 0xc1ff, 0xc003, 0xc7ff, 0xdfff, > 19: 0xe03f, 0xe1ff, 0xf801, 0xfc00, 0xfc07, 0xff03, Removed "0xe10f" from the list as it is not a valid 16-imemdiate. Source : https://gist.github.com/dinfuehr/51a01ac58c0b23e4de9aac313ed6a06a test/hotspot/jtreg/compiler/intrinsics/float16/TestFP16ScalarAdd.java line 99: > 97: @IR(applyIfCPUFeature = {"avx512_fp16" , "true"}, counts = {IRNode.CONVF2HFANDS2HF, " >= 1"}) > 98: @IR(applyIfCPUFeatureAnd = {"fphp", "true", "asimdhp", "true"}, counts = {IRNode.CONVF2HFANDS2HF, " >= 1"}) > 99: public void test3() { "test3" and "test4" are not exactly related to FP16 add operation and I can move them to another file if needed. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/1096#discussion_r1592194879 PR Review Comment: https://git.openjdk.org/valhalla/pull/1096#discussion_r1592188182 From dsimms at openjdk.org Wed May 8 08:33:22 2024 From: dsimms at openjdk.org (David Simms) Date: Wed, 8 May 2024 08:33:22 GMT Subject: [lworld] Integrated: Merge jdk In-Reply-To: References: Message-ID: On Tue, 7 May 2024 09:38:30 GMT, David Simms wrote: > Merge jdk-23+9 This pull request has now been integrated. Changeset: 2d516373 Author: David Simms URL: https://git.openjdk.org/valhalla/commit/2d5163731ae90d4bc1fb7be6b7e29f4a4d47734d Stats: 35307 lines in 1861 files changed: 17245 ins; 5221 del; 12841 mod Merge jdk Merge jdk-23+9 ------------- PR: https://git.openjdk.org/valhalla/pull/1098 From chagedorn at openjdk.org Wed May 8 09:02:44 2024 From: chagedorn at openjdk.org (Christian Hagedorn) Date: Wed, 8 May 2024 09:02:44 GMT Subject: [lworld] RFR: 8330691: [lworld] C2: assert(gvn().type(n)->is_zero_type()) failed: Should have been scalarized Message-ID: The unique concrete subclass optimization replaces an abstract class with a unique concrete sub class (if there is one). In the test case, `abstractValueClassSingleSubclass` is a field with the abstract value class type `AbstractValueClassSingleSubclass` which has a unique (loaded) concrete value sub class `UniqueValueSubClass`. In `do_get_xxx()`, we get the declared `ciType` of the field: https://github.com/openjdk/valhalla/blob/3b89acb102ddb7b4f318edab5c1a6169b28757c0/src/hotspot/share/opto/parse3.cpp#L143 which is `AbstractValueClassSingleSubclass` (i.e. no unique concrete sub class optimization applied). But for the type, we call `make_from_klass()` which does apply the unique concrete sub class optimization: https://github.com/openjdk/valhalla/blob/3b89acb102ddb7b4f318edab5c1a6169b28757c0/src/hotspot/share/opto/parse3.cpp#L173 https://github.com/openjdk/valhalla/blob/3b89acb102ddb7b4f318edab5c1a6169b28757c0/src/hotspot/share/opto/type.cpp#L3842-L3859 As a result, we create a load that has type `UniqueValueSubClass` while `field_klass` is still abstract. We do not create an `InlineTypeNode` because `is_inlinetype()` returns false for abstract classes: https://github.com/openjdk/valhalla/blob/3b89acb102ddb7b4f318edab5c1a6169b28757c0/src/hotspot/share/opto/parse3.cpp#L191-L193 Later, we assert that we've missed a scalarization opportunity based on the concrete inline type load. The fix is straight forward to improve the fetched declared `ciType` in `do_get_xxx()` by applying the unique concrete sub class optimization to match the improved type. We only need to apply it for abstract inline type classes. In other cases, we do not the improved field type. I've added a method to check this accordingly. Thanks, Christian ------------- Commit messages: - 8330691: [lworld] C2: assert(gvn().type(n)->is_zero_type()) failed: Should have been scalarized Changes: https://git.openjdk.org/valhalla/pull/1099/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1099&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8330691 Stats: 47 lines in 5 files changed: 47 ins; 0 del; 0 mod Patch: https://git.openjdk.org/valhalla/pull/1099.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1099/head:pull/1099 PR: https://git.openjdk.org/valhalla/pull/1099 From dsimms at openjdk.org Wed May 8 09:04:18 2024 From: dsimms at openjdk.org (David Simms) Date: Wed, 8 May 2024 09:04:18 GMT Subject: [lworld] Integrated: Adjust testing Message-ID: Added new test failures to problem lists ------------- Commit messages: - Adjust testing Changes: https://git.openjdk.org/valhalla/pull/1100/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1100&range=00 Stats: 10 lines in 2 files changed: 10 ins; 0 del; 0 mod Patch: https://git.openjdk.org/valhalla/pull/1100.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1100/head:pull/1100 PR: https://git.openjdk.org/valhalla/pull/1100 From dsimms at openjdk.org Wed May 8 09:04:18 2024 From: dsimms at openjdk.org (David Simms) Date: Wed, 8 May 2024 09:04:18 GMT Subject: [lworld] Integrated: Adjust testing In-Reply-To: References: Message-ID: On Wed, 8 May 2024 08:57:36 GMT, David Simms wrote: > Added new test failures to problem lists This pull request has now been integrated. Changeset: 0ccc6ead Author: David Simms URL: https://git.openjdk.org/valhalla/commit/0ccc6eade7264b6669bfb2224d92e2c0b32134ab Stats: 10 lines in 2 files changed: 10 ins; 0 del; 0 mod Adjust testing ------------- PR: https://git.openjdk.org/valhalla/pull/1100 From thartmann at openjdk.org Wed May 8 09:10:44 2024 From: thartmann at openjdk.org (Tobias Hartmann) Date: Wed, 8 May 2024 09:10:44 GMT Subject: [lworld] Integrated: 8331538: [lworld] Fix array handling code in C2 for JEP 401 Message-ID: This PR contains several fixes to array handling code in C2 to align with the JEP 401 design. I also fixed an issue with replay compilation where `ArrayStoreData` was not correctly dumped to the file because it's a subtype of `ReceiverTypeData` which was checked first in `ciMethodData::dump_replay_data`. Thanks, Tobias ------------- Commit messages: - Added a TODO - More fixes - Problem listed test triggering 8331551 - Merge branch 'lworld' into JDK-8331538 - Removed ToDos - Move folding code to Ideal() - Removed UseArrayMarkWordCheck - First prototype Changes: https://git.openjdk.org/valhalla/pull/1101/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1101&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8331538 Stats: 457 lines in 37 files changed: 202 ins; 146 del; 109 mod Patch: https://git.openjdk.org/valhalla/pull/1101.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1101/head:pull/1101 PR: https://git.openjdk.org/valhalla/pull/1101 From thartmann at openjdk.org Wed May 8 09:10:44 2024 From: thartmann at openjdk.org (Tobias Hartmann) Date: Wed, 8 May 2024 09:10:44 GMT Subject: [lworld] Integrated: 8331538: [lworld] Fix array handling code in C2 for JEP 401 In-Reply-To: References: Message-ID: On Wed, 8 May 2024 09:02:00 GMT, Tobias Hartmann wrote: > This PR contains several fixes to array handling code in C2 to align with the JEP 401 design. > > I also fixed an issue with replay compilation where `ArrayStoreData` was not correctly dumped to the file because it's a subtype of `ReceiverTypeData` which was checked first in `ciMethodData::dump_replay_data`. > > Thanks, > Tobias This pull request has now been integrated. Changeset: eab1e932 Author: Tobias Hartmann URL: https://git.openjdk.org/valhalla/commit/eab1e932dad26ca2dc30d3440436950ca9fd3fe9 Stats: 457 lines in 37 files changed: 202 ins; 146 del; 109 mod 8331538: [lworld] Fix array handling code in C2 for JEP 401 ------------- PR: https://git.openjdk.org/valhalla/pull/1101 From chagedorn at openjdk.org Wed May 8 09:21:30 2024 From: chagedorn at openjdk.org (Christian Hagedorn) Date: Wed, 8 May 2024 09:21:30 GMT Subject: [lworld] RFR: 8330691: [lworld] C2: assert(gvn().type(n)->is_zero_type()) failed: Should have been scalarized [v2] In-Reply-To: References: Message-ID: > The unique concrete subclass optimization replaces an abstract class with a unique concrete sub class (if there is one). In the test case, `abstractValueClassSingleSubclass` is a field with the abstract value class type `AbstractValueClassSingleSubclass` which has a unique (loaded) concrete value sub class `UniqueValueSubClass`. > > In `do_get_xxx()`, we get the declared `ciType` of the field: > https://github.com/openjdk/valhalla/blob/3b89acb102ddb7b4f318edab5c1a6169b28757c0/src/hotspot/share/opto/parse3.cpp#L143 > > which is `AbstractValueClassSingleSubclass` (i.e. no unique concrete sub class optimization applied). But for the type, we call `make_from_klass()` which does apply the unique concrete sub class optimization: > https://github.com/openjdk/valhalla/blob/3b89acb102ddb7b4f318edab5c1a6169b28757c0/src/hotspot/share/opto/parse3.cpp#L173 > https://github.com/openjdk/valhalla/blob/3b89acb102ddb7b4f318edab5c1a6169b28757c0/src/hotspot/share/opto/type.cpp#L3842-L3859 > > As a result, we create a load that has type `UniqueValueSubClass` while `field_klass` is still abstract. We do not create an `InlineTypeNode` because `is_inlinetype()` returns false for abstract classes: > https://github.com/openjdk/valhalla/blob/3b89acb102ddb7b4f318edab5c1a6169b28757c0/src/hotspot/share/opto/parse3.cpp#L191-L193 > > Later, we assert that we've missed a scalarization opportunity based on the concrete inline type load. > > The fix is straight forward to improve the fetched declared `ciType` in `do_get_xxx()` by applying the unique concrete sub class optimization to match the improved type. We only need to apply it for abstract inline type classes. In other cases, we do not the improved field type. I've added a method to check this accordingly. > > Thanks, > Christian Christian Hagedorn has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision: - Merge branch 'lworld' into JDK-8330691 - 8330691: [lworld] C2: assert(gvn().type(n)->is_zero_type()) failed: Should have been scalarized ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/1099/files - new: https://git.openjdk.org/valhalla/pull/1099/files/c0e9eae6..9fa77a26 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=1099&range=01 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=1099&range=00-01 Stats: 35810 lines in 1887 files changed: 17470 ins; 5376 del; 12964 mod Patch: https://git.openjdk.org/valhalla/pull/1099.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1099/head:pull/1099 PR: https://git.openjdk.org/valhalla/pull/1099 From thartmann at openjdk.org Wed May 8 10:21:23 2024 From: thartmann at openjdk.org (Tobias Hartmann) Date: Wed, 8 May 2024 10:21:23 GMT Subject: [lworld] Integrated: [lworld] Re-adjust problem list Message-ID: <0xeIV90ARfo239O5uOEJhHnNYG7Z86iEwxLMqbzbyuE=.15981b91-2eb2-4363-b8de-c66bd6457b86@github.com> Undoing the problem listing because: - `TestZGCUnrolling.java` was already disabled with the changes for [JDK-8331538](https://bugs.openjdk.org/browse/JDK-8331538) - `TestBasicFunctionality.java` is a large and important test. Only the failing unit test should be disabled. Also, the linked bug is wrong, it should be [JDK-8315003](https://bugs.openjdk.org/browse/JDK-8315003). - The `TestValueClasses.java` failure seems to be highly intermittent and we should not disable the test completely. I'll investigate with [JDK-8331909](https://bugs.openjdk.org/browse/JDK-8331909) and potentially problem list the unit test. Thanks, Tobias ------------- Commit messages: - [lworld] Re-adjusted problem list Changes: https://git.openjdk.org/valhalla/pull/1102/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1102&range=00 Stats: 8 lines in 2 files changed: 3 ins; 5 del; 0 mod Patch: https://git.openjdk.org/valhalla/pull/1102.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1102/head:pull/1102 PR: https://git.openjdk.org/valhalla/pull/1102 From thartmann at openjdk.org Wed May 8 10:21:23 2024 From: thartmann at openjdk.org (Tobias Hartmann) Date: Wed, 8 May 2024 10:21:23 GMT Subject: [lworld] Integrated: [lworld] Re-adjust problem list In-Reply-To: <0xeIV90ARfo239O5uOEJhHnNYG7Z86iEwxLMqbzbyuE=.15981b91-2eb2-4363-b8de-c66bd6457b86@github.com> References: <0xeIV90ARfo239O5uOEJhHnNYG7Z86iEwxLMqbzbyuE=.15981b91-2eb2-4363-b8de-c66bd6457b86@github.com> Message-ID: On Wed, 8 May 2024 10:15:06 GMT, Tobias Hartmann wrote: > Undoing the problem listing because: > - `TestZGCUnrolling.java` was already disabled with the changes for [JDK-8331538](https://bugs.openjdk.org/browse/JDK-8331538) > - `TestBasicFunctionality.java` is a large and important test. Only the failing unit test should be disabled. Also, the linked bug is wrong, it should be [JDK-8315003](https://bugs.openjdk.org/browse/JDK-8315003). > - The `TestValueClasses.java` failure seems to be highly intermittent and we should not disable the test completely. I'll investigate with [JDK-8331909](https://bugs.openjdk.org/browse/JDK-8331909) and potentially problem list the unit test. > > Thanks, > Tobias This pull request has now been integrated. Changeset: f9bc1cc9 Author: Tobias Hartmann URL: https://git.openjdk.org/valhalla/commit/f9bc1cc98eb5e5f28769374e4c71285719f13d59 Stats: 8 lines in 2 files changed: 3 ins; 5 del; 0 mod [lworld] Re-adjust problem list ------------- PR: https://git.openjdk.org/valhalla/pull/1102 From chagedorn at openjdk.org Wed May 8 10:43:30 2024 From: chagedorn at openjdk.org (Christian Hagedorn) Date: Wed, 8 May 2024 10:43:30 GMT Subject: [lworld] RFR: 8330691: [lworld] C2: assert(gvn().type(n)->is_zero_type()) failed: Should have been scalarized [v3] In-Reply-To: References: Message-ID: > The unique concrete subclass optimization replaces an abstract class with a unique concrete sub class (if there is one). In the test case, `abstractValueClassSingleSubclass` is a field with the abstract value class type `AbstractValueClassSingleSubclass` which has a unique (loaded) concrete value sub class `UniqueValueSubClass`. > > In `do_get_xxx()`, we get the declared `ciType` of the field: > https://github.com/openjdk/valhalla/blob/3b89acb102ddb7b4f318edab5c1a6169b28757c0/src/hotspot/share/opto/parse3.cpp#L143 > > which is `AbstractValueClassSingleSubclass` (i.e. no unique concrete sub class optimization applied). But for the type, we call `make_from_klass()` which does apply the unique concrete sub class optimization: > https://github.com/openjdk/valhalla/blob/3b89acb102ddb7b4f318edab5c1a6169b28757c0/src/hotspot/share/opto/parse3.cpp#L173 > https://github.com/openjdk/valhalla/blob/3b89acb102ddb7b4f318edab5c1a6169b28757c0/src/hotspot/share/opto/type.cpp#L3842-L3859 > > As a result, we create a load that has type `UniqueValueSubClass` while `field_klass` is still abstract. We do not create an `InlineTypeNode` because `is_inlinetype()` returns false for abstract classes: > https://github.com/openjdk/valhalla/blob/3b89acb102ddb7b4f318edab5c1a6169b28757c0/src/hotspot/share/opto/parse3.cpp#L191-L193 > > Later, we assert that we've missed a scalarization opportunity based on the concrete inline type load. > > The fix is straight forward to improve the fetched declared `ciType` in `do_get_xxx()` by applying the unique concrete sub class optimization to match the improved type. We only need to apply it for abstract inline type classes. In other cases, we do not the improved field type. I've added a method to check this accordingly. > > Thanks, > Christian Christian Hagedorn has updated the pull request incrementally with one additional commit since the last revision: Fix comment ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/1099/files - new: https://git.openjdk.org/valhalla/pull/1099/files/9fa77a26..381e208e Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=1099&range=02 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=1099&range=01-02 Stats: 4 lines in 1 file changed: 0 ins; 0 del; 4 mod Patch: https://git.openjdk.org/valhalla/pull/1099.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1099/head:pull/1099 PR: https://git.openjdk.org/valhalla/pull/1099 From thartmann at openjdk.org Wed May 8 10:43:33 2024 From: thartmann at openjdk.org (Tobias Hartmann) Date: Wed, 8 May 2024 10:43:33 GMT Subject: [lworld] RFR: 8330691: [lworld] C2: assert(gvn().type(n)->is_zero_type()) failed: Should have been scalarized [v2] In-Reply-To: References: Message-ID: On Wed, 8 May 2024 09:21:30 GMT, Christian Hagedorn wrote: >> The unique concrete subclass optimization replaces an abstract class with a unique concrete sub class (if there is one). In the test case, `abstractValueClassSingleSubclass` is a field with the abstract value class type `AbstractValueClassSingleSubclass` which has a unique (loaded) concrete value sub class `UniqueValueSubClass`. >> >> In `do_get_xxx()`, we get the declared `ciType` of the field: >> https://github.com/openjdk/valhalla/blob/3b89acb102ddb7b4f318edab5c1a6169b28757c0/src/hotspot/share/opto/parse3.cpp#L143 >> >> which is `AbstractValueClassSingleSubclass` (i.e. no unique concrete sub class optimization applied). But for the type, we call `make_from_klass()` which does apply the unique concrete sub class optimization: >> https://github.com/openjdk/valhalla/blob/3b89acb102ddb7b4f318edab5c1a6169b28757c0/src/hotspot/share/opto/parse3.cpp#L173 >> https://github.com/openjdk/valhalla/blob/3b89acb102ddb7b4f318edab5c1a6169b28757c0/src/hotspot/share/opto/type.cpp#L3842-L3859 >> >> As a result, we create a load that has type `UniqueValueSubClass` while `field_klass` is still abstract. We do not create an `InlineTypeNode` because `is_inlinetype()` returns false for abstract classes: >> https://github.com/openjdk/valhalla/blob/3b89acb102ddb7b4f318edab5c1a6169b28757c0/src/hotspot/share/opto/parse3.cpp#L191-L193 >> >> Later, we assert that we've missed a scalarization opportunity based on the concrete inline type load. >> >> The fix is straight forward to improve the fetched declared `ciType` in `do_get_xxx()` by applying the unique concrete sub class optimization to match the improved type. We only need to apply it for abstract inline type classes. In other cases, we do not the improved field type. I've added a method to check this accordingly. >> >> Thanks, >> Christian > > Christian Hagedorn has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision: > > - Merge branch 'lworld' into JDK-8330691 > - 8330691: [lworld] C2: assert(gvn().type(n)->is_zero_type()) failed: Should have been scalarized Looks good, thanks for fixing Christian! Please re-run testing now that the merge and the fix for [JDK-8331538](https://bugs.openjdk.org/browse/JDK-8331538) is in. test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestLWorld.java line 4387: > 4385: @Test > 4386: public void testUniqueConcreteValueSubKlass(boolean flag) { > 4387: // C2 should recognize that even though we do not know whether the underlying inline type of the abstract field Comment could be made more clear, as we discussed offline. ------------- Marked as reviewed by thartmann (Committer). PR Review: https://git.openjdk.org/valhalla/pull/1099#pullrequestreview-2045289286 PR Review Comment: https://git.openjdk.org/valhalla/pull/1099#discussion_r1593814798 From chagedorn at openjdk.org Wed May 8 10:43:33 2024 From: chagedorn at openjdk.org (Christian Hagedorn) Date: Wed, 8 May 2024 10:43:33 GMT Subject: [lworld] RFR: 8330691: [lworld] C2: assert(gvn().type(n)->is_zero_type()) failed: Should have been scalarized [v2] In-Reply-To: References: Message-ID: On Wed, 8 May 2024 09:21:30 GMT, Christian Hagedorn wrote: >> The unique concrete subclass optimization replaces an abstract class with a unique concrete sub class (if there is one). In the test case, `abstractValueClassSingleSubclass` is a field with the abstract value class type `AbstractValueClassSingleSubclass` which has a unique (loaded) concrete value sub class `UniqueValueSubClass`. >> >> In `do_get_xxx()`, we get the declared `ciType` of the field: >> https://github.com/openjdk/valhalla/blob/3b89acb102ddb7b4f318edab5c1a6169b28757c0/src/hotspot/share/opto/parse3.cpp#L143 >> >> which is `AbstractValueClassSingleSubclass` (i.e. no unique concrete sub class optimization applied). But for the type, we call `make_from_klass()` which does apply the unique concrete sub class optimization: >> https://github.com/openjdk/valhalla/blob/3b89acb102ddb7b4f318edab5c1a6169b28757c0/src/hotspot/share/opto/parse3.cpp#L173 >> https://github.com/openjdk/valhalla/blob/3b89acb102ddb7b4f318edab5c1a6169b28757c0/src/hotspot/share/opto/type.cpp#L3842-L3859 >> >> As a result, we create a load that has type `UniqueValueSubClass` while `field_klass` is still abstract. We do not create an `InlineTypeNode` because `is_inlinetype()` returns false for abstract classes: >> https://github.com/openjdk/valhalla/blob/3b89acb102ddb7b4f318edab5c1a6169b28757c0/src/hotspot/share/opto/parse3.cpp#L191-L193 >> >> Later, we assert that we've missed a scalarization opportunity based on the concrete inline type load. >> >> The fix is straight forward to improve the fetched declared `ciType` in `do_get_xxx()` by applying the unique concrete sub class optimization to match the improved type. We only need to apply it for abstract inline type classes. In other cases, we do not the improved field type. I've added a method to check this accordingly. >> >> Thanks, >> Christian > > Christian Hagedorn has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision: > > - Merge branch 'lworld' into JDK-8330691 > - 8330691: [lworld] C2: assert(gvn().type(n)->is_zero_type()) failed: Should have been scalarized Thanks Tobias for your review! I've merged in your changes and I started testing again. ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1099#issuecomment-2100285492 From chagedorn at openjdk.org Wed May 8 10:43:33 2024 From: chagedorn at openjdk.org (Christian Hagedorn) Date: Wed, 8 May 2024 10:43:33 GMT Subject: [lworld] RFR: 8330691: [lworld] C2: assert(gvn().type(n)->is_zero_type()) failed: Should have been scalarized [v2] In-Reply-To: References: Message-ID: On Wed, 8 May 2024 10:36:52 GMT, Tobias Hartmann wrote: >> Christian Hagedorn has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision: >> >> - Merge branch 'lworld' into JDK-8330691 >> - 8330691: [lworld] C2: assert(gvn().type(n)->is_zero_type()) failed: Should have been scalarized > > test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestLWorld.java line 4387: > >> 4385: @Test >> 4386: public void testUniqueConcreteValueSubKlass(boolean flag) { >> 4387: // C2 should recognize that even though we do not know whether the underlying inline type of the abstract field > > Comment could be made more clear, as we discussed offline. Thanks for the hint, pushed an update. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/1099#discussion_r1593818669 From thartmann at openjdk.org Wed May 8 14:09:01 2024 From: thartmann at openjdk.org (Tobias Hartmann) Date: Wed, 8 May 2024 14:09:01 GMT Subject: [lworld] RFR: 8330691: [lworld] C2: assert(gvn().type(n)->is_zero_type()) failed: Should have been scalarized [v3] In-Reply-To: References: Message-ID: On Wed, 8 May 2024 10:43:30 GMT, Christian Hagedorn wrote: >> The unique concrete subclass optimization replaces an abstract class with a unique concrete sub class (if there is one). In the test case, `abstractValueClassSingleSubclass` is a field with the abstract value class type `AbstractValueClassSingleSubclass` which has a unique (loaded) concrete value sub class `UniqueValueSubClass`. >> >> In `do_get_xxx()`, we get the declared `ciType` of the field: >> https://github.com/openjdk/valhalla/blob/3b89acb102ddb7b4f318edab5c1a6169b28757c0/src/hotspot/share/opto/parse3.cpp#L143 >> >> which is `AbstractValueClassSingleSubclass` (i.e. no unique concrete sub class optimization applied). But for the type, we call `make_from_klass()` which does apply the unique concrete sub class optimization: >> https://github.com/openjdk/valhalla/blob/3b89acb102ddb7b4f318edab5c1a6169b28757c0/src/hotspot/share/opto/parse3.cpp#L173 >> https://github.com/openjdk/valhalla/blob/3b89acb102ddb7b4f318edab5c1a6169b28757c0/src/hotspot/share/opto/type.cpp#L3842-L3859 >> >> As a result, we create a load that has type `UniqueValueSubClass` while `field_klass` is still abstract. We do not create an `InlineTypeNode` because `is_inlinetype()` returns false for abstract classes: >> https://github.com/openjdk/valhalla/blob/3b89acb102ddb7b4f318edab5c1a6169b28757c0/src/hotspot/share/opto/parse3.cpp#L191-L193 >> >> Later, we assert that we've missed a scalarization opportunity based on the concrete inline type load. >> >> The fix is straight forward to improve the fetched declared `ciType` in `do_get_xxx()` by applying the unique concrete sub class optimization to match the improved type. We only need to apply it for abstract inline type classes. In other cases, we do not the improved field type. I've added a method to check this accordingly. >> >> Thanks, >> Christian > > Christian Hagedorn has updated the pull request incrementally with one additional commit since the last revision: > > Fix comment Thanks, still good! ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1099#issuecomment-2100671497 From vromero at openjdk.org Thu May 9 00:45:22 2024 From: vromero at openjdk.org (Vicente Romero) Date: Thu, 9 May 2024 00:45:22 GMT Subject: [lworld] RFR: 8331606: [lworld] javac should consider some library classes as value classes Message-ID: For some library classes two compiled versions are produced, one is the legacy class file and the other one is a class file representing a value class. The version representing a value class is stored in a separate jar. During compilation of classes using one of these library classes javac loads the vanilla version. But if preview features are enabled, javac should act as if the loaded class was the one representing the value class. So basically javac's class loader needs to massage the flags in the loaded class so that the rest of the compiler pipeline can handle it as a value class. This PR is proposing an annotation to mark these classes so that they can be identified by javac without having to keep an internal list of classes that will need to be maintained, TIA ------------- Commit messages: - adding the MigratedValueClass annotation - 8331606: [lworld] javac should consider some library classes as value classes Changes: https://git.openjdk.org/valhalla/pull/1104/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1104&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8331606 Stats: 151 lines in 19 files changed: 136 ins; 4 del; 11 mod Patch: https://git.openjdk.org/valhalla/pull/1104.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1104/head:pull/1104 PR: https://git.openjdk.org/valhalla/pull/1104 From vromero at openjdk.org Thu May 9 02:15:38 2024 From: vromero at openjdk.org (Vicente Romero) Date: Thu, 9 May 2024 02:15:38 GMT Subject: [lworld] RFR: 8331606: [lworld] javac should consider some library classes as value classes [v2] In-Reply-To: References: Message-ID: > For some library classes two compiled versions are produced, one is the legacy class file and the other one is a class file representing a value class. The version representing a value class is stored in a separate jar. During compilation of classes using one of these library classes javac loads the vanilla version. But if preview features are enabled, javac should act as if the loaded class was the one representing the value class. So basically javac's class loader needs to massage the flags in the loaded class so that the rest of the compiler pipeline can handle it as a value class. This PR is proposing an annotation to mark these classes so that they can be identified by javac without having to keep an internal list of classes that will need to be maintained, > > TIA Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: minor refactorings ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/1104/files - new: https://git.openjdk.org/valhalla/pull/1104/files/2212ef48..6a32bf99 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=1104&range=01 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=1104&range=00-01 Stats: 2 lines in 1 file changed: 0 ins; 2 del; 0 mod Patch: https://git.openjdk.org/valhalla/pull/1104.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1104/head:pull/1104 PR: https://git.openjdk.org/valhalla/pull/1104 From bkilambi at openjdk.org Thu May 9 08:14:05 2024 From: bkilambi at openjdk.org (Bhavana Kilambi) Date: Thu, 9 May 2024 08:14:05 GMT Subject: [lworld+fp16] RFR: 8330021: AArch64: Add backend support for FP16 add operation In-Reply-To: <-sLrODPBVflosNEfVE5yzNdbC2l2AhJ3E-tfyLc3OTc=.606995b7-bdef-4d04-bf84-75ecdc3668fb@github.com> References: <-sLrODPBVflosNEfVE5yzNdbC2l2AhJ3E-tfyLc3OTc=.606995b7-bdef-4d04-bf84-75ecdc3668fb@github.com> Message-ID: On Mon, 6 May 2024 18:28:31 GMT, Bhavana Kilambi wrote: > This commit [1] adds initial support for FP16 operations and adds backend support for FP16 add operation for X86. This task adds backend support for scalar and vector FP16 add operation on aarch64. > > [1] https://github.com/openjdk/valhalla/commit/f03fb4e4ee4d59ed692d0c26ddce260511f544e7#diff-a799ce8da7f3062bb3699beb65aae504840c649942032e325c2a50f88a2869ad Can I please ask for some reviews for this PR? Thank you in advance! ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1096#issuecomment-2102172849 From mcimadamore at openjdk.org Thu May 9 10:23:06 2024 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Thu, 9 May 2024 10:23:06 GMT Subject: [lworld] RFR: 8331606: [lworld] javac should consider some library classes as value classes [v2] In-Reply-To: References: Message-ID: <91dppfKnxfOQm4AXRltemz5L6-y2l7wTYN3wfaRxQWo=.4510a5e9-9396-439f-b4ab-b9ba8df395c1@github.com> On Thu, 9 May 2024 02:15:38 GMT, Vicente Romero wrote: >> For some library classes two compiled versions are produced, one is the legacy class file and the other one is a class file representing a value class. The version representing a value class is stored in a separate jar. During compilation of classes using one of these library classes javac loads the vanilla version. But if preview features are enabled, javac should act as if the loaded class was the one representing the value class. So basically javac's class loader needs to massage the flags in the loaded class so that the rest of the compiler pipeline can handle it as a value class. This PR is proposing an annotation to mark these classes so that they can be identified by javac without having to keep an internal list of classes that will need to be maintained, >> >> TIA > > Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: > > minor refactorings src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java line 3180: > 3178: if (((flags & ACC_IDENTITY) != 0 && !isMigratedValueClass(flags)) || (majorVersion < V66.major && (flags & INTERFACE) == 0)) { > 3179: flags |= IDENTITY_TYPE; > 3180: } else if (needsValueFlag(c, flags)) { isn't this redundant? E.g. isn't VALUE_CLASS set as soon as you see the annotation? ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/1104#discussion_r1595263866 From mcimadamore at openjdk.org Thu May 9 10:27:05 2024 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Thu, 9 May 2024 10:27:05 GMT Subject: [lworld] RFR: 8331606: [lworld] javac should consider some library classes as value classes [v2] In-Reply-To: References: Message-ID: On Thu, 9 May 2024 02:15:38 GMT, Vicente Romero wrote: >> For some library classes two compiled versions are produced, one is the legacy class file and the other one is a class file representing a value class. The version representing a value class is stored in a separate jar. During compilation of classes using one of these library classes javac loads the vanilla version. But if preview features are enabled, javac should act as if the loaded class was the one representing the value class. So basically javac's class loader needs to massage the flags in the loaded class so that the rest of the compiler pipeline can handle it as a value class. This PR is proposing an annotation to mark these classes so that they can be identified by javac without having to keep an internal list of classes that will need to be maintained, >> >> TIA > > Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: > > minor refactorings test/langtools/tools/javac/valhalla/value-objects/ValueObjectCompilationTests.java line 311: > 309: } > 310: """); > 311: assertFail("compiler.err.type.found.req", Might be good to try the full set of options: * --source 23, --enable-preview * --source 23 * --release 23, --enable-preview * --release 23 (since when release is specified, the code path is different) ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/1104#discussion_r1595267776 From vromero at openjdk.org Thu May 9 14:22:12 2024 From: vromero at openjdk.org (Vicente Romero) Date: Thu, 9 May 2024 14:22:12 GMT Subject: [lworld] RFR: 8331606: [lworld] javac should consider some library classes as value classes [v2] In-Reply-To: <91dppfKnxfOQm4AXRltemz5L6-y2l7wTYN3wfaRxQWo=.4510a5e9-9396-439f-b4ab-b9ba8df395c1@github.com> References: <91dppfKnxfOQm4AXRltemz5L6-y2l7wTYN3wfaRxQWo=.4510a5e9-9396-439f-b4ab-b9ba8df395c1@github.com> Message-ID: On Thu, 9 May 2024 10:20:50 GMT, Maurizio Cimadamore wrote: >> Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: >> >> minor refactorings > > src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java line 3180: > >> 3178: if (((flags & ACC_IDENTITY) != 0 && !isMigratedValueClass(flags)) || (majorVersion < V66.major && (flags & INTERFACE) == 0)) { >> 3179: flags |= IDENTITY_TYPE; >> 3180: } else if (needsValueFlag(c, flags)) { > > isn't this redundant? E.g. isn't VALUE_CLASS set as soon as you see the annotation? no, we need this path for the cases when we load a `real` value class ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/1104#discussion_r1595518340 From fparain at openjdk.org Thu May 9 14:50:21 2024 From: fparain at openjdk.org (Frederic Parain) Date: Thu, 9 May 2024 14:50:21 GMT Subject: [lworld] RFR: 8326598: [lworld] JVM must support field inheritance for value classes Message-ID: <9Z6BWw82Lc4VUrHJYMGRvkMPZuNn9xR9rIiWjD2aID0=.4453932a-7a71-400e-a1b4-7bbc3f1b80c8@github.com> Adds field inheritance for value classes. Layouts of value classes that inherited fields are not always optimal, but fixing them would require a new placement algorithm which is beyond the scope of this CR. The test is currently limited to the interpreted mode because of issues with CI and C2 tracked by JDK-8331964. ------------- Commit messages: - Cleanup - Restrict test to interpreted mode for now - Merge remote-tracking branch 'upstream/lworld' into field_inheritance - Fix test after merge - Merge remote-tracking branch 'upstream/lworld' into field_inheritance - Field inheritance test, VM fixes, layout analyzer improvements - Merge remote-tracking branch 'upstream/lworld' into field_inheritance - Field inheritance first step Changes: https://git.openjdk.org/valhalla/pull/1103/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1103&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8326598 Stats: 498 lines in 5 files changed: 361 ins; 39 del; 98 mod Patch: https://git.openjdk.org/valhalla/pull/1103.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1103/head:pull/1103 PR: https://git.openjdk.org/valhalla/pull/1103 From vromero at openjdk.org Thu May 9 15:58:23 2024 From: vromero at openjdk.org (Vicente Romero) Date: Thu, 9 May 2024 15:58:23 GMT Subject: [lworld] RFR: 8331606: [lworld] javac should consider some library classes as value classes [v3] In-Reply-To: References: Message-ID: > For some library classes two compiled versions are produced, one is the legacy class file and the other one is a class file representing a value class. The version representing a value class is stored in a separate jar. During compilation of classes using one of these library classes javac loads the vanilla version. But if preview features are enabled, javac should act as if the loaded class was the one representing the value class. So basically javac's class loader needs to massage the flags in the loaded class so that the rest of the compiler pipeline can handle it as a value class. This PR is proposing an annotation to mark these classes so that they can be identified by javac without having to keep an internal list of classes that will need to be maintained, > > TIA Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: addressing review comments ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/1104/files - new: https://git.openjdk.org/valhalla/pull/1104/files/6a32bf99..9238bee9 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=1104&range=02 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=1104&range=01-02 Stats: 30 lines in 1 file changed: 27 ins; 0 del; 3 mod Patch: https://git.openjdk.org/valhalla/pull/1104.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1104/head:pull/1104 PR: https://git.openjdk.org/valhalla/pull/1104 From chagedorn at openjdk.org Fri May 10 08:07:23 2024 From: chagedorn at openjdk.org (Christian Hagedorn) Date: Fri, 10 May 2024 08:07:23 GMT Subject: [lworld] RFR: 8330691: [lworld] C2: assert(gvn().type(n)->is_zero_type()) failed: Should have been scalarized [v3] In-Reply-To: References: Message-ID: On Wed, 8 May 2024 10:43:30 GMT, Christian Hagedorn wrote: >> The unique concrete subclass optimization replaces an abstract class with a unique concrete sub class (if there is one). In the test case, `abstractValueClassSingleSubclass` is a field with the abstract value class type `AbstractValueClassSingleSubclass` which has a unique (loaded) concrete value sub class `UniqueValueSubClass`. >> >> In `do_get_xxx()`, we get the declared `ciType` of the field: >> https://github.com/openjdk/valhalla/blob/3b89acb102ddb7b4f318edab5c1a6169b28757c0/src/hotspot/share/opto/parse3.cpp#L143 >> >> which is `AbstractValueClassSingleSubclass` (i.e. no unique concrete sub class optimization applied). But for the type, we call `make_from_klass()` which does apply the unique concrete sub class optimization: >> https://github.com/openjdk/valhalla/blob/3b89acb102ddb7b4f318edab5c1a6169b28757c0/src/hotspot/share/opto/parse3.cpp#L173 >> https://github.com/openjdk/valhalla/blob/3b89acb102ddb7b4f318edab5c1a6169b28757c0/src/hotspot/share/opto/type.cpp#L3842-L3859 >> >> As a result, we create a load that has type `UniqueValueSubClass` while `field_klass` is still abstract. We do not create an `InlineTypeNode` because `is_inlinetype()` returns false for abstract classes: >> https://github.com/openjdk/valhalla/blob/3b89acb102ddb7b4f318edab5c1a6169b28757c0/src/hotspot/share/opto/parse3.cpp#L191-L193 >> >> Later, we assert that we've missed a scalarization opportunity based on the concrete inline type load. >> >> The fix is straight forward to improve the fetched declared `ciType` in `do_get_xxx()` by applying the unique concrete sub class optimization to match the improved type. We only need to apply it for abstract inline type classes. In other cases, we do not the improved field type. I've added a method to check this accordingly. >> >> Thanks, >> Christian > > Christian Hagedorn has updated the pull request incrementally with one additional commit since the last revision: > > Fix comment Thanks Tobias for your re-review! Testing showed no new failures. ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1099#issuecomment-2104139328 From mcimadamore at openjdk.org Fri May 10 15:04:18 2024 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Fri, 10 May 2024 15:04:18 GMT Subject: [lworld] RFR: 8331606: [lworld] javac should consider some library classes as value classes [v3] In-Reply-To: References: Message-ID: On Thu, 9 May 2024 15:58:23 GMT, Vicente Romero wrote: >> For some library classes two compiled versions are produced, one is the legacy class file and the other one is a class file representing a value class. The version representing a value class is stored in a separate jar. During compilation of classes using one of these library classes javac loads the vanilla version. But if preview features are enabled, javac should act as if the loaded class was the one representing the value class. So basically javac's class loader needs to massage the flags in the loaded class so that the rest of the compiler pipeline can handle it as a value class. This PR is proposing an annotation to mark these classes so that they can be identified by javac without having to keep an internal list of classes that will need to be maintained, >> >> TIA > > Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: > > addressing review comments Marked as reviewed by mcimadamore (Committer). ------------- PR Review: https://git.openjdk.org/valhalla/pull/1104#pullrequestreview-2050271185 From vromero at openjdk.org Fri May 10 16:21:30 2024 From: vromero at openjdk.org (Vicente Romero) Date: Fri, 10 May 2024 16:21:30 GMT Subject: [lworld] RFR: 8331606: [lworld] javac should consider some library classes as value classes [v3] In-Reply-To: References: Message-ID: On Thu, 9 May 2024 15:58:23 GMT, Vicente Romero wrote: >> For some library classes two compiled versions are produced, one is the legacy class file and the other one is a class file representing a value class. The version representing a value class is stored in a separate jar. During compilation of classes using one of these library classes javac loads the vanilla version. But if preview features are enabled, javac should act as if the loaded class was the one representing the value class. So basically javac's class loader needs to massage the flags in the loaded class so that the rest of the compiler pipeline can handle it as a value class. This PR is proposing an annotation to mark these classes so that they can be identified by javac without having to keep an internal list of classes that will need to be maintained, >> >> TIA > > Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: > > addressing review comments thanks for the comments! ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1104#issuecomment-2104881295 From vromero at openjdk.org Fri May 10 16:24:58 2024 From: vromero at openjdk.org (Vicente Romero) Date: Fri, 10 May 2024 16:24:58 GMT Subject: [lworld] Integrated: 8331606: [lworld] javac should consider some library classes as value classes In-Reply-To: References: Message-ID: On Thu, 9 May 2024 00:41:14 GMT, Vicente Romero wrote: > For some library classes two compiled versions are produced, one is the legacy class file and the other one is a class file representing a value class. The version representing a value class is stored in a separate jar. During compilation of classes using one of these library classes javac loads the vanilla version. But if preview features are enabled, javac should act as if the loaded class was the one representing the value class. So basically javac's class loader needs to massage the flags in the loaded class so that the rest of the compiler pipeline can handle it as a value class. This PR is proposing an annotation to mark these classes so that they can be identified by javac without having to keep an internal list of classes that will need to be maintained, > > TIA This pull request has now been integrated. Changeset: 6c6b4bd9 Author: Vicente Romero URL: https://git.openjdk.org/valhalla/commit/6c6b4bd93b71394129f717419d6a34a05014a620 Stats: 176 lines in 19 files changed: 161 ins; 4 del; 11 mod 8331606: [lworld] javac should consider some library classes as value classes Reviewed-by: mcimadamore ------------- PR: https://git.openjdk.org/valhalla/pull/1104 From chagedorn at openjdk.org Sun May 12 11:00:18 2024 From: chagedorn at openjdk.org (Christian Hagedorn) Date: Sun, 12 May 2024 11:00:18 GMT Subject: [lworld] Integrated: 8330691: [lworld] C2: assert(gvn().type(n)->is_zero_type()) failed: Should have been scalarized In-Reply-To: References: Message-ID: On Wed, 8 May 2024 08:57:04 GMT, Christian Hagedorn wrote: > The unique concrete subclass optimization replaces an abstract class with a unique concrete sub class (if there is one). In the test case, `abstractValueClassSingleSubclass` is a field with the abstract value class type `AbstractValueClassSingleSubclass` which has a unique (loaded) concrete value sub class `UniqueValueSubClass`. > > In `do_get_xxx()`, we get the declared `ciType` of the field: > https://github.com/openjdk/valhalla/blob/3b89acb102ddb7b4f318edab5c1a6169b28757c0/src/hotspot/share/opto/parse3.cpp#L143 > > which is `AbstractValueClassSingleSubclass` (i.e. no unique concrete sub class optimization applied). But for the type, we call `make_from_klass()` which does apply the unique concrete sub class optimization: > https://github.com/openjdk/valhalla/blob/3b89acb102ddb7b4f318edab5c1a6169b28757c0/src/hotspot/share/opto/parse3.cpp#L173 > https://github.com/openjdk/valhalla/blob/3b89acb102ddb7b4f318edab5c1a6169b28757c0/src/hotspot/share/opto/type.cpp#L3842-L3859 > > As a result, we create a load that has type `UniqueValueSubClass` while `field_klass` is still abstract. We do not create an `InlineTypeNode` because `is_inlinetype()` returns false for abstract classes: > https://github.com/openjdk/valhalla/blob/3b89acb102ddb7b4f318edab5c1a6169b28757c0/src/hotspot/share/opto/parse3.cpp#L191-L193 > > Later, we assert that we've missed a scalarization opportunity based on the concrete inline type load. > > The fix is straight forward to improve the fetched declared `ciType` in `do_get_xxx()` by applying the unique concrete sub class optimization to match the improved type. We only need to apply it for abstract inline type classes. In other cases, we do not the improved field type. I've added a method to check this accordingly. > > Thanks, > Christian This pull request has now been integrated. Changeset: 1d322d52 Author: Christian Hagedorn Committer: Tobias Hartmann URL: https://git.openjdk.org/valhalla/commit/1d322d52c4e396898dec4b837e86a7c475bbfd15 Stats: 47 lines in 5 files changed: 47 ins; 0 del; 0 mod 8330691: [lworld] C2: assert(gvn().type(n)->is_zero_type()) failed: Should have been scalarized Reviewed-by: thartmann ------------- PR: https://git.openjdk.org/valhalla/pull/1099 From vromero at openjdk.org Tue May 14 18:11:30 2024 From: vromero at openjdk.org (Vicente Romero) Date: Tue, 14 May 2024 18:11:30 GMT Subject: [lworld] Integrated: 8332235: [lworld] introduce internal annotation to indicate that the ACC_STRICT flag must be set Message-ID: <2JJmCx-gl7VPmapFo7dFtIhNW_b6U9va7AMsmI2h_uI=.c76bfff1-ae9b-4194-a4a1-764fa40413bb@github.com> experimental annotation to indicate the compiler that the annotated field should have the ACC_STRICT flag set TIA ------------- Commit messages: - 8332235: [lworld] introduce internal annotation to set the ACC_STRICT field Changes: https://git.openjdk.org/valhalla/pull/1105/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1105&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8332235 Stats: 80 lines in 4 files changed: 80 ins; 0 del; 0 mod Patch: https://git.openjdk.org/valhalla/pull/1105.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1105/head:pull/1105 PR: https://git.openjdk.org/valhalla/pull/1105 From vromero at openjdk.org Tue May 14 18:11:31 2024 From: vromero at openjdk.org (Vicente Romero) Date: Tue, 14 May 2024 18:11:31 GMT Subject: [lworld] Integrated: 8332235: [lworld] introduce internal annotation to indicate that the ACC_STRICT flag must be set In-Reply-To: <2JJmCx-gl7VPmapFo7dFtIhNW_b6U9va7AMsmI2h_uI=.c76bfff1-ae9b-4194-a4a1-764fa40413bb@github.com> References: <2JJmCx-gl7VPmapFo7dFtIhNW_b6U9va7AMsmI2h_uI=.c76bfff1-ae9b-4194-a4a1-764fa40413bb@github.com> Message-ID: On Tue, 14 May 2024 18:02:53 GMT, Vicente Romero wrote: > experimental annotation to indicate the compiler that the annotated field should have the ACC_STRICT flag set > > TIA This pull request has now been integrated. Changeset: 48e1a62c Author: Vicente Romero URL: https://git.openjdk.org/valhalla/commit/48e1a62cb8b5c236563f2477aaf097c1f03a14b7 Stats: 80 lines in 4 files changed: 80 ins; 0 del; 0 mod 8332235: [lworld] introduce internal annotation to indicate that the ACC_STRICT flag must be set ------------- PR: https://git.openjdk.org/valhalla/pull/1105 From rotanolexandr842 at gmail.com Wed May 15 18:55:56 2024 From: rotanolexandr842 at gmail.com (Olexandr Rotan) Date: Wed, 15 May 2024 21:55:56 +0300 Subject: Primitive-parametrized classes covariance with pre-existing specialized types Message-ID: I have been reading through JEP 402: Enhanced Primitive Boxing, and "Overriding, overloading, and type arguments inference ( https://openjdk.org/jeps/402#:~:text=Overriding%2C%20overloading%2C%20and%20type%20arguments%20inference) section has caught my mind. I am here only speaking as a user, as I have virtually no idea on how new primitives work in valhalla. I am currently working on some Stream API enhancements and its internals have become really complicated as time passed, mainly (imo), due to primitive-specialized pipelines. JEP 402, at first glance, looked like salvation, but the more I think about it, the more problems I see with integrating legacy with new features. Specialized stream pipelines are wired with specialized functional interfaces (ToXFunction, XPredicate etc.). This (and also some specialized for primitive ops of streams), make it impossible to harmlessly switch from XStream to Stream (where X is primitive). While the second issue (specialized methods) could be addressed separately, one thing that could certainly help with eventually moving on from primitive-specialized types induced mess in current APIs is introducing covariance between generic types and their specialized versions. It is intuitive that ToLongFunction is essentially the same as Function. I saw a note at the end of the JEP that Long! and long are not fully interchangeable for some internal for JVM reasons, but the API that these interfaces provide are exactly the same. I understand that if public APIs that types provide are similar, that still doesn't mean their behaviour is the same, but while it does not mean it, it could be the case (and is a case in huge amounts of situations as when it comes to specialized types). If such covariance would be present in language, huge amounts of code could be just clamped as they are no longer needed. For example, whole IntPipeline could be clamped to IntPipeline extends ReferencePipeline { /* proprietary methods of IntStream */ } instead of virtually a second ReferencePipeline class but specialized for int. This example is just the thing that is closest to me right now, but I am sure anyone could think of a way where this could be helpful for them. I am not really sure how this is implementable in a way that does not weaken the type system though. We can't just let users write that class A is covariant to class B or something like that for obvious reasons. The easiest solution is to just add some compiler rules for a pre-defined number of types in jdk, but this still will leave all library devs and just users that had to write specialized types for some reason stranding. The rules for this covariance could surely be a topic of discussion for more experienced developers than me, but to have this feature would be a dramatic step forward in Java. Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From fparain at openjdk.org Wed May 15 19:20:38 2024 From: fparain at openjdk.org (Frederic Parain) Date: Wed, 15 May 2024 19:20:38 GMT Subject: [lworld] Integrated: 8332323: [lworld] runtime/valhalla/inlinetypes/ValuePreloadTest.java fails with compilation error Message-ID: Simple fix in the way the test is launched. ------------- Commit messages: - Fix way the test is launched to get the --enable-preview flag Changes: https://git.openjdk.org/valhalla/pull/1106/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1106&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8332323 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/valhalla/pull/1106.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1106/head:pull/1106 PR: https://git.openjdk.org/valhalla/pull/1106 From fparain at openjdk.org Wed May 15 19:20:38 2024 From: fparain at openjdk.org (Frederic Parain) Date: Wed, 15 May 2024 19:20:38 GMT Subject: [lworld] Integrated: 8332323: [lworld] runtime/valhalla/inlinetypes/ValuePreloadTest.java fails with compilation error In-Reply-To: References: Message-ID: On Wed, 15 May 2024 19:15:07 GMT, Frederic Parain wrote: > Simple fix in the way the test is launched. This pull request has now been integrated. Changeset: 7aab2230 Author: Frederic Parain URL: https://git.openjdk.org/valhalla/commit/7aab223099e0cc220806f82951a67844b979e792 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod 8332323: [lworld] runtime/valhalla/inlinetypes/ValuePreloadTest.java fails with compilation error ------------- PR: https://git.openjdk.org/valhalla/pull/1106 From thartmann at openjdk.org Wed May 15 19:33:20 2024 From: thartmann at openjdk.org (Tobias Hartmann) Date: Wed, 15 May 2024 19:33:20 GMT Subject: [lworld] RFR: 8331909: [lworld] compiler/valhalla/inlinetypes/TestValueClasses.java fails when random value rI is zero Message-ID: Some tests fail IR verification if the random value used to initialize fields is zero because C2 will use the default value. Thanks, Tobias ------------- Commit messages: - Rephrased a comment - 8331909: [lworld] compiler/valhalla/inlinetypes/TestValueClasses.java fails when random value rI is zero Changes: https://git.openjdk.org/valhalla/pull/1107/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1107&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8331909 Stats: 20 lines in 4 files changed: 0 ins; 0 del; 20 mod Patch: https://git.openjdk.org/valhalla/pull/1107.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1107/head:pull/1107 PR: https://git.openjdk.org/valhalla/pull/1107 From bkilambi at openjdk.org Thu May 16 09:22:26 2024 From: bkilambi at openjdk.org (Bhavana Kilambi) Date: Thu, 16 May 2024 09:22:26 GMT Subject: [lworld+fp16] RFR: 8330021: AArch64: Add backend support for FP16 add operation In-Reply-To: <-sLrODPBVflosNEfVE5yzNdbC2l2AhJ3E-tfyLc3OTc=.606995b7-bdef-4d04-bf84-75ecdc3668fb@github.com> References: <-sLrODPBVflosNEfVE5yzNdbC2l2AhJ3E-tfyLc3OTc=.606995b7-bdef-4d04-bf84-75ecdc3668fb@github.com> Message-ID: On Mon, 6 May 2024 18:28:31 GMT, Bhavana Kilambi wrote: > This commit [1] adds initial support for FP16 operations and adds backend support for FP16 add operation for X86. This task adds backend support for scalar and vector FP16 add operation on aarch64. > > [1] https://github.com/openjdk/valhalla/commit/f03fb4e4ee4d59ed692d0c26ddce260511f544e7#diff-a799ce8da7f3062bb3699beb65aae504840c649942032e325c2a50f88a2869ad Hi @jatin-bhateja @TobiHartmann Can I get some reviews please? Atleast for the c2 specific part. Thank you ! ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1096#issuecomment-2114663596 From brian.goetz at oracle.com Thu May 16 12:35:11 2024 From: brian.goetz at oracle.com (Brian Goetz) Date: Thu, 16 May 2024 12:35:11 +0000 Subject: Primitive-parametrized classes covariance with pre-existing specialized types In-Reply-To: References: Message-ID: I am currently working on some Stream API enhancements and its internals have become really complicated as time passed, mainly (imo), due to primitive-specialized pipelines. Slight correction: the internals were complicated from day 1, for this reason. This is not something that ?happened over time?; the hand-specialization was part of its fundamental complexity. JEP 402, at first glance, looked like salvation You are mistaking JEP 402 for the full sweep of the Valhalla project. Indeed, Valhalla grew out of the observations of the painfulness of hand specialization (among other challenges). But before we can get to full generic specialization with both layout and code specialization, we have to cover some fundamentals first. There are many steps along the way here. We walk before we can run. What you are asking for is to blur the distinction between nominal and structural function types, allowing Predicate and Function to be considered ?the same? in some way. While this is in some sense natural, this sort of ?anything goes? flexibility that incorporates both nominal and structural subtyping creates new problems, and even if not, is unlikely to move us very far in the direction of ?IntStream is-a Stream?. Rest assured that we share your goal, but the path to get there is somewhat longer. , but the more I think about it, the more problems I see with integrating legacy with new features. Specialized stream pipelines are wired with specialized functional interfaces (ToXFunction, XPredicate etc.). This (and also some specialized for primitive ops of streams), make it impossible to harmlessly switch from XStream to Stream (where X is primitive). While the second issue (specialized methods) could be addressed separately, one thing that could certainly help with eventually moving on from primitive-specialized types induced mess in current APIs is introducing covariance between generic types and their specialized versions. It is intuitive that ToLongFunction is essentially the same as Function. I saw a note at the end of the JEP that Long! and long are not fully interchangeable for some internal for JVM reasons, but the API that these interfaces provide are exactly the same. I understand that if public APIs that types provide are similar, that still doesn't mean their behaviour is the same, but while it does not mean it, it could be the case (and is a case in huge amounts of situations as when it comes to specialized types). If such covariance would be present in language, huge amounts of code could be just clamped as they are no longer needed. For example, whole IntPipeline could be clamped to IntPipeline extends ReferencePipeline { /* proprietary methods of IntStream */ } instead of virtually a second ReferencePipeline class but specialized for int. This example is just the thing that is closest to me right now, but I am sure anyone could think of a way where this could be helpful for them. I am not really sure how this is implementable in a way that does not weaken the type system though. We can't just let users write that class A is covariant to class B or something like that for obvious reasons. The easiest solution is to just add some compiler rules for a pre-defined number of types in jdk, but this still will leave all library devs and just users that had to write specialized types for some reason stranding. The rules for this covariance could surely be a topic of discussion for more experienced developers than me, but to have this feature would be a dramatic step forward in Java. Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From thartmann at openjdk.org Thu May 16 13:18:56 2024 From: thartmann at openjdk.org (Tobias Hartmann) Date: Thu, 16 May 2024 13:18:56 GMT Subject: [lworld] RFR: 8331909: [lworld] compiler/valhalla/inlinetypes/TestValueClasses.java fails when random value rI is zero [v2] In-Reply-To: References: Message-ID: > Some tests fail IR verification if the random value used to initialize fields is zero because C2 will use the default value. > > Thanks, > Tobias Tobias Hartmann has updated the pull request incrementally with one additional commit since the last revision: Fix ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/1107/files - new: https://git.openjdk.org/valhalla/pull/1107/files/504a8533..6bd11094 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=1107&range=01 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=1107&range=00-01 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/valhalla/pull/1107.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1107/head:pull/1107 PR: https://git.openjdk.org/valhalla/pull/1107 From thartmann at openjdk.org Thu May 16 13:18:57 2024 From: thartmann at openjdk.org (Tobias Hartmann) Date: Thu, 16 May 2024 13:18:57 GMT Subject: [lworld] Integrated: 8331909: [lworld] compiler/valhalla/inlinetypes/TestValueClasses.java fails when random value rI is zero In-Reply-To: References: Message-ID: <7zUwFDh0QeE5AUSl69_Jlfz0kdykD1EwbvI4i5iSdRM=.2751d5da-6c48-4739-8249-362c6871f5c4@github.com> On Wed, 15 May 2024 19:29:02 GMT, Tobias Hartmann wrote: > Some tests fail IR verification if the random value used to initialize fields is zero because C2 will use the default value. > > Thanks, > Tobias This pull request has now been integrated. Changeset: da31144b Author: Tobias Hartmann URL: https://git.openjdk.org/valhalla/commit/da31144bb3ffc850bd000d9ddbf33d23adc46769 Stats: 21 lines in 4 files changed: 0 ins; 0 del; 21 mod 8331909: [lworld] compiler/valhalla/inlinetypes/TestValueClasses.java fails when random value rI is zero ------------- PR: https://git.openjdk.org/valhalla/pull/1107 From rotanolexandr842 at gmail.com Thu May 16 13:23:25 2024 From: rotanolexandr842 at gmail.com (Olexandr Rotan) Date: Thu, 16 May 2024 16:23:25 +0300 Subject: Primitive-parametrized classes covariance with pre-existing specialized types In-Reply-To: References: Message-ID: > > While this is in some sense natural, this sort of ?anything goes? > flexibility that incorporates both nominal and structural subtyping creates > new problems, and even if not, is unlikely to move us very far in the > direction of ?IntStream is-a Stream?. My main concern with transitioning from Predicate to Function (or any other primitive-specialized, predicate is not the biggest problem, obviously) is that if currently, hypothetically, we have changed all specialized functional types to generic functional types, even if they essentially "behave the same", would completely brake backwards compatibility. Not even talking about binary compatibility, about which I don't know virtually anything, I could easily think of a scenario where this change would break source compatibility: ToIntFunction mapper = ....; someList.stream().mapToInt(mapper) .... // now won't compile if mapToInt expects Function That was the main concern that I have tried to express with the initial letter. I am all for any easier workaround than the one I have described, but if we want to move to ?IntStream is-a Stream? (and I guess we really want), some way to convert between specialized and generic types should be present at least in some form. On Thu, May 16, 2024 at 3:35?PM Brian Goetz wrote: > I am currently working on some Stream API enhancements and its internals > have become really complicated as time passed, mainly (imo), due to > primitive-specialized pipelines. > > > Slight correction: the internals were complicated from day 1, for this > reason. This is not something that ?happened over time?; the > hand-specialization was part of its fundamental complexity. > > JEP 402, at first glance, looked like salvation > > > You are mistaking JEP 402 for the full sweep of the Valhalla project. > Indeed, Valhalla grew out of the observations of the painfulness of hand > specialization (among other challenges). But before we can get to full > generic specialization with both layout and code specialization, we have to > cover some fundamentals first. There are many steps along the way here. > We walk before we can run. > > What you are asking for is to blur the distinction between nominal and > structural function types, allowing Predicate and Function > to be considered ?the same? in some way. While this is in some sense > natural, this sort of ?anything goes? flexibility that incorporates both > nominal and structural subtyping creates new problems, and even if not, is > unlikely to move us very far in the direction of ?IntStream is-a > Stream?. > > Rest assured that we share your goal, but the path to get there is > somewhat longer. > > , but the more I think about it, the more problems I see with integrating > legacy with new features. Specialized stream pipelines are wired with > specialized functional interfaces (ToXFunction, XPredicate etc.). This (and > also some specialized for primitive ops of streams), make it impossible to > harmlessly switch from XStream to Stream (where X is primitive). > > While the second issue (specialized methods) could be addressed > separately, one thing that could certainly help with eventually moving on > from primitive-specialized types induced mess in current APIs is > introducing covariance between generic types and their specialized > versions. It is intuitive that ToLongFunction is essentially the same as > Function. I saw a note at the end of the JEP that Long! and long > are not fully interchangeable for some internal for JVM reasons, but the > API that these interfaces provide are exactly the same. I understand that > if public APIs that types provide are similar, that still doesn't mean > their behaviour is the same, but while it does not mean it, it could be the > case (and is a case in huge amounts of situations as when it comes to > specialized types). > > If such covariance would be present in language, huge amounts of code > could be just clamped as they are no longer needed. For example, whole > IntPipeline could be clamped to IntPipeline extends ReferencePipeline > { /* proprietary methods of IntStream */ } instead of virtually a second > ReferencePipeline class but specialized for int. This example is just the > thing that is closest to me right now, but I am sure anyone could think of > a way where this could be helpful for them. > > I am not really sure how this is implementable in a way that does not > weaken the type system though. We can't just let users write that class A > is covariant to class B or something like that for obvious reasons. The > easiest solution is to just add some compiler rules for a pre-defined > number of types in jdk, but this still will leave all library devs and just > users that had to write specialized types for some reason stranding. The > rules for this covariance could surely be a topic of discussion for more > experienced developers than me, but to have this feature would be a > dramatic step forward in Java. > > Regards > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.bjorkstrand at gmail.com Thu May 16 13:52:19 2024 From: paul.bjorkstrand at gmail.com (Paul Bjorkstrand) Date: Thu, 16 May 2024 08:52:19 -0500 Subject: Primitive-parametrized classes covariance with pre-existing specialized types In-Reply-To: References: Message-ID: It would compile if Predicate extends Function. I don't think that specialized generics would equate to "immediately remove all hand specializations." With Predicate's wide use, it would probably take a decade or longer to fully remove it from the ecosystem, and that is assuming it would be removed at all (how much code still uses HashTable, when there are now generic replacements?) // Paul On Thu, May 16, 2024 at 8:23?AM Olexandr Rotan wrote: > While this is in some sense natural, this sort of ?anything goes? >> flexibility that incorporates both nominal and structural subtyping creates >> new problems, and even if not, is unlikely to move us very far in the >> direction of ?IntStream is-a Stream?. > > My main concern with transitioning from Predicate to Function boolean> (or any other primitive-specialized, predicate is not the biggest > problem, obviously) is that if currently, hypothetically, we have changed > all specialized functional types to generic functional types, even if they > essentially "behave the same", would completely brake > backwards compatibility. Not even talking about binary compatibility, about > which I don't know virtually anything, I could easily think of a scenario > where this change would break source compatibility: > > ToIntFunction mapper = ....; > someList.stream().mapToInt(mapper) .... // now won't compile if mapToInt > expects Function > > That was the main concern that I have tried to express with the > initial letter. I am all for any easier workaround than the one I have > described, but if we want to move to ?IntStream is-a Stream? (and I > guess we really want), some way to convert between specialized and generic > types should be present at least in some form. > > On Thu, May 16, 2024 at 3:35?PM Brian Goetz > wrote: > >> I am currently working on some Stream API enhancements and its internals >> have become really complicated as time passed, mainly (imo), due to >> primitive-specialized pipelines. >> >> >> Slight correction: the internals were complicated from day 1, for this >> reason. This is not something that ?happened over time?; the >> hand-specialization was part of its fundamental complexity. >> >> JEP 402, at first glance, looked like salvation >> >> >> You are mistaking JEP 402 for the full sweep of the Valhalla project. >> Indeed, Valhalla grew out of the observations of the painfulness of hand >> specialization (among other challenges). But before we can get to full >> generic specialization with both layout and code specialization, we have to >> cover some fundamentals first. There are many steps along the way here. >> We walk before we can run. >> >> What you are asking for is to blur the distinction between nominal and >> structural function types, allowing Predicate and Function >> to be considered ?the same? in some way. While this is in some sense >> natural, this sort of ?anything goes? flexibility that incorporates both >> nominal and structural subtyping creates new problems, and even if not, is >> unlikely to move us very far in the direction of ?IntStream is-a >> Stream?. >> >> Rest assured that we share your goal, but the path to get there is >> somewhat longer. >> >> , but the more I think about it, the more problems I see with integrating >> legacy with new features. Specialized stream pipelines are wired with >> specialized functional interfaces (ToXFunction, XPredicate etc.). This (and >> also some specialized for primitive ops of streams), make it impossible to >> harmlessly switch from XStream to Stream (where X is primitive). >> >> While the second issue (specialized methods) could be addressed >> separately, one thing that could certainly help with eventually moving on >> from primitive-specialized types induced mess in current APIs is >> introducing covariance between generic types and their specialized >> versions. It is intuitive that ToLongFunction is essentially the same as >> Function. I saw a note at the end of the JEP that Long! and long >> are not fully interchangeable for some internal for JVM reasons, but the >> API that these interfaces provide are exactly the same. I understand that >> if public APIs that types provide are similar, that still doesn't mean >> their behaviour is the same, but while it does not mean it, it could be the >> case (and is a case in huge amounts of situations as when it comes to >> specialized types). >> >> If such covariance would be present in language, huge amounts of code >> could be just clamped as they are no longer needed. For example, whole >> IntPipeline could be clamped to IntPipeline extends ReferencePipeline >> { /* proprietary methods of IntStream */ } instead of virtually a second >> ReferencePipeline class but specialized for int. This example is just the >> thing that is closest to me right now, but I am sure anyone could think of >> a way where this could be helpful for them. >> >> I am not really sure how this is implementable in a way that does not >> weaken the type system though. We can't just let users write that class A >> is covariant to class B or something like that for obvious reasons. The >> easiest solution is to just add some compiler rules for a pre-defined >> number of types in jdk, but this still will leave all library devs and just >> users that had to write specialized types for some reason stranding. The >> rules for this covariance could surely be a topic of discussion for more >> experienced developers than me, but to have this feature would be a >> dramatic step forward in Java. >> >> Regards >> >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From bkilambi at openjdk.org Thu May 16 13:55:28 2024 From: bkilambi at openjdk.org (Bhavana Kilambi) Date: Thu, 16 May 2024 13:55:28 GMT Subject: [lworld+fp16] RFR: 8330021: AArch64: Add backend support for FP16 add operation [v2] In-Reply-To: <-sLrODPBVflosNEfVE5yzNdbC2l2AhJ3E-tfyLc3OTc=.606995b7-bdef-4d04-bf84-75ecdc3668fb@github.com> References: <-sLrODPBVflosNEfVE5yzNdbC2l2AhJ3E-tfyLc3OTc=.606995b7-bdef-4d04-bf84-75ecdc3668fb@github.com> Message-ID: <55vZczWry3u2c2UEnnskkMIkXTNGyKH-UCtKEfq43dg=.f5529874-ea8a-43ab-8436-cffefb6d3d90@github.com> > This commit [1] adds initial support for FP16 operations and adds backend support for FP16 add operation for X86. This task adds backend support for scalar and vector FP16 add operation on aarch64. > > [1] https://github.com/openjdk/valhalla/commit/f03fb4e4ee4d59ed692d0c26ddce260511f544e7#diff-a799ce8da7f3062bb3699beb65aae504840c649942032e325c2a50f88a2869ad Bhavana Kilambi has updated the pull request incrementally with one additional commit since the last revision: Add a missing return statement in the ad file ------------- Changes: - all: https://git.openjdk.org/valhalla/pull/1096/files - new: https://git.openjdk.org/valhalla/pull/1096/files/1d09ba44..afdd81c6 Webrevs: - full: https://webrevs.openjdk.org/?repo=valhalla&pr=1096&range=01 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=1096&range=00-01 Stats: 6 lines in 2 files changed: 2 ins; 0 del; 4 mod Patch: https://git.openjdk.org/valhalla/pull/1096.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1096/head:pull/1096 PR: https://git.openjdk.org/valhalla/pull/1096 From rotanolexandr842 at gmail.com Thu May 16 14:06:05 2024 From: rotanolexandr842 at gmail.com (Olexandr Rotan) Date: Thu, 16 May 2024 17:06:05 +0300 Subject: Primitive-parametrized classes covariance with pre-existing specialized types In-Reply-To: References: Message-ID: It would compile, but then predicate will no longer be a functional interface, isn't it? Correct me if I am wrong. There could be workarounds using default methods though. Also, both Function and Predicate are in the public API, so changing class hierarchy could potentially (and will) break behavioural backward compatibility in if and switch statements, and it will break it silently, introducing bugs in various unexpected places. On Thu, May 16, 2024 at 4:53?PM Paul Bjorkstrand wrote: > It would compile if Predicate extends Function. I don't > think that specialized generics would equate to "immediately remove all > hand specializations." With Predicate's wide use, it would probably take a > decade or longer to fully remove it from the ecosystem, and that is > assuming it would be removed at all (how much code still uses HashTable, > when there are now generic replacements?) > > // Paul > > > On Thu, May 16, 2024 at 8:23?AM Olexandr Rotan > wrote: > >> While this is in some sense natural, this sort of ?anything goes? >>> flexibility that incorporates both nominal and structural subtyping creates >>> new problems, and even if not, is unlikely to move us very far in the >>> direction of ?IntStream is-a Stream?. >> >> My main concern with transitioning from Predicate to Function> boolean> (or any other primitive-specialized, predicate is not the biggest >> problem, obviously) is that if currently, hypothetically, we have changed >> all specialized functional types to generic functional types, even if they >> essentially "behave the same", would completely brake >> backwards compatibility. Not even talking about binary compatibility, about >> which I don't know virtually anything, I could easily think of a scenario >> where this change would break source compatibility: >> >> ToIntFunction mapper = ....; >> someList.stream().mapToInt(mapper) .... // now won't compile if mapToInt >> expects Function >> >> That was the main concern that I have tried to express with the >> initial letter. I am all for any easier workaround than the one I have >> described, but if we want to move to ?IntStream is-a Stream? (and I >> guess we really want), some way to convert between specialized and generic >> types should be present at least in some form. >> >> On Thu, May 16, 2024 at 3:35?PM Brian Goetz >> wrote: >> >>> I am currently working on some Stream API enhancements and its internals >>> have become really complicated as time passed, mainly (imo), due to >>> primitive-specialized pipelines. >>> >>> >>> Slight correction: the internals were complicated from day 1, for this >>> reason. This is not something that ?happened over time?; the >>> hand-specialization was part of its fundamental complexity. >>> >>> JEP 402, at first glance, looked like salvation >>> >>> >>> You are mistaking JEP 402 for the full sweep of the Valhalla project. >>> Indeed, Valhalla grew out of the observations of the painfulness of hand >>> specialization (among other challenges). But before we can get to full >>> generic specialization with both layout and code specialization, we have to >>> cover some fundamentals first. There are many steps along the way here. >>> We walk before we can run. >>> >>> What you are asking for is to blur the distinction between nominal and >>> structural function types, allowing Predicate and Function >>> to be considered ?the same? in some way. While this is in some sense >>> natural, this sort of ?anything goes? flexibility that incorporates both >>> nominal and structural subtyping creates new problems, and even if not, is >>> unlikely to move us very far in the direction of ?IntStream is-a >>> Stream?. >>> >>> Rest assured that we share your goal, but the path to get there is >>> somewhat longer. >>> >>> , but the more I think about it, the more problems I see with >>> integrating legacy with new features. Specialized stream pipelines are >>> wired with specialized functional interfaces (ToXFunction, >>> XPredicate etc.). This (and also some specialized for primitive ops of >>> streams), make it impossible to harmlessly switch from XStream to Stream >>> (where X is primitive). >>> >>> While the second issue (specialized methods) could be addressed >>> separately, one thing that could certainly help with eventually moving on >>> from primitive-specialized types induced mess in current APIs is >>> introducing covariance between generic types and their specialized >>> versions. It is intuitive that ToLongFunction is essentially the same as >>> Function. I saw a note at the end of the JEP that Long! and long >>> are not fully interchangeable for some internal for JVM reasons, but the >>> API that these interfaces provide are exactly the same. I understand that >>> if public APIs that types provide are similar, that still doesn't mean >>> their behaviour is the same, but while it does not mean it, it could be the >>> case (and is a case in huge amounts of situations as when it comes to >>> specialized types). >>> >>> If such covariance would be present in language, huge amounts of code >>> could be just clamped as they are no longer needed. For example, whole >>> IntPipeline could be clamped to IntPipeline extends ReferencePipeline >>> { /* proprietary methods of IntStream */ } instead of virtually a second >>> ReferencePipeline class but specialized for int. This example is just the >>> thing that is closest to me right now, but I am sure anyone could think of >>> a way where this could be helpful for them. >>> >>> I am not really sure how this is implementable in a way that does not >>> weaken the type system though. We can't just let users write that class A >>> is covariant to class B or something like that for obvious reasons. The >>> easiest solution is to just add some compiler rules for a pre-defined >>> number of types in jdk, but this still will leave all library devs and just >>> users that had to write specialized types for some reason stranding. The >>> rules for this covariance could surely be a topic of discussion for more >>> experienced developers than me, but to have this feature would be a >>> dramatic step forward in Java. >>> >>> Regards >>> >>> >>> -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian.goetz at oracle.com Thu May 16 14:48:50 2024 From: brian.goetz at oracle.com (Brian Goetz) Date: Thu, 16 May 2024 14:48:50 +0000 Subject: Primitive-parametrized classes covariance with pre-existing specialized types In-Reply-To: References: Message-ID: <3CAD4D9E-3A7F-4008-BA15-5699B563776C@oracle.com> Relating Predicate and Function is not hard (though has challenges). The real problem is that, while Java supports covariant overrides for method returns, it lacks the dual feature of ?contra variant underrides? for method parameters. On May 16, 2024, at 9:53?AM, Paul Bjorkstrand wrote: ? It would compile if Predicate extends Function. I don't think that specialized generics would equate to "immediately remove all hand specializations." With Predicate's wide use, it would probably take a decade or longer to fully remove it from the ecosystem, and that is assuming it would be removed at all (how much code still uses HashTable, when there are now generic replacements?) // Paul On Thu, May 16, 2024 at 8:23?AM Olexandr Rotan > wrote: While this is in some sense natural, this sort of ?anything goes? flexibility that incorporates both nominal and structural subtyping creates new problems, and even if not, is unlikely to move us very far in the direction of ?IntStream is-a Stream?. My main concern with transitioning from Predicate to Function (or any other primitive-specialized, predicate is not the biggest problem, obviously) is that if currently, hypothetically, we have changed all specialized functional types to generic functional types, even if they essentially "behave the same", would completely brake backwards compatibility. Not even talking about binary compatibility, about which I don't know virtually anything, I could easily think of a scenario where this change would break source compatibility: ToIntFunction mapper = ....; someList.stream().mapToInt(mapper) .... // now won't compile if mapToInt expects Function That was the main concern that I have tried to express with the initial letter. I am all for any easier workaround than the one I have described, but if we want to move to ?IntStream is-a Stream? (and I guess we really want), some way to convert between specialized and generic types should be present at least in some form. On Thu, May 16, 2024 at 3:35?PM Brian Goetz > wrote: I am currently working on some Stream API enhancements and its internals have become really complicated as time passed, mainly (imo), due to primitive-specialized pipelines. Slight correction: the internals were complicated from day 1, for this reason. This is not something that ?happened over time?; the hand-specialization was part of its fundamental complexity. JEP 402, at first glance, looked like salvation You are mistaking JEP 402 for the full sweep of the Valhalla project. Indeed, Valhalla grew out of the observations of the painfulness of hand specialization (among other challenges). But before we can get to full generic specialization with both layout and code specialization, we have to cover some fundamentals first. There are many steps along the way here. We walk before we can run. What you are asking for is to blur the distinction between nominal and structural function types, allowing Predicate and Function to be considered ?the same? in some way. While this is in some sense natural, this sort of ?anything goes? flexibility that incorporates both nominal and structural subtyping creates new problems, and even if not, is unlikely to move us very far in the direction of ?IntStream is-a Stream?. Rest assured that we share your goal, but the path to get there is somewhat longer. , but the more I think about it, the more problems I see with integrating legacy with new features. Specialized stream pipelines are wired with specialized functional interfaces (ToXFunction, XPredicate etc.). This (and also some specialized for primitive ops of streams), make it impossible to harmlessly switch from XStream to Stream (where X is primitive). While the second issue (specialized methods) could be addressed separately, one thing that could certainly help with eventually moving on from primitive-specialized types induced mess in current APIs is introducing covariance between generic types and their specialized versions. It is intuitive that ToLongFunction is essentially the same as Function. I saw a note at the end of the JEP that Long! and long are not fully interchangeable for some internal for JVM reasons, but the API that these interfaces provide are exactly the same. I understand that if public APIs that types provide are similar, that still doesn't mean their behaviour is the same, but while it does not mean it, it could be the case (and is a case in huge amounts of situations as when it comes to specialized types). If such covariance would be present in language, huge amounts of code could be just clamped as they are no longer needed. For example, whole IntPipeline could be clamped to IntPipeline extends ReferencePipeline { /* proprietary methods of IntStream */ } instead of virtually a second ReferencePipeline class but specialized for int. This example is just the thing that is closest to me right now, but I am sure anyone could think of a way where this could be helpful for them. I am not really sure how this is implementable in a way that does not weaken the type system though. We can't just let users write that class A is covariant to class B or something like that for obvious reasons. The easiest solution is to just add some compiler rules for a pre-defined number of types in jdk, but this still will leave all library devs and just users that had to write specialized types for some reason stranding. The rules for this covariance could surely be a topic of discussion for more experienced developers than me, but to have this feature would be a dramatic step forward in Java. Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From jbossons at gmail.com Sat May 18 17:24:10 2024 From: jbossons at gmail.com (John Bossons) Date: Sat, 18 May 2024 13:24:10 -0400 Subject: Most recent JEP 401 description Message-ID: Thanks for making this so very clear. Two questions/issues: (1) It would be helpful to include more on the properties of abstract value classes (AVCs) -- perhaps a labelled subsection? A specific question not dealt with explicitly in the current version: Can an AVC have an instance field, now that a value class utilizes the Flexible Constructor Bodies JEP? (The alternative is repetition of that field definition and accessor in every subtype, which is potentially error-prone). (2) It would also be helpful to include some commentary on limitations. Specifically, although it is clear that the purpose is more efficiently defined SMALL value objects, (a) How big is 'small'? And (b) will the compiler accept value types of any size, no matter how deep? John Phone: (416) 450-3584 (cell) -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian.goetz at oracle.com Sun May 19 00:21:34 2024 From: brian.goetz at oracle.com (Brian Goetz) Date: Sat, 18 May 2024 20:21:34 -0400 Subject: Most recent JEP 401 description In-Reply-To: References: Message-ID: <82a59a07-3eac-4364-93b2-aa9dc63bf236@oracle.com> Amazingly, yes, value-capable abstract classes can have fields.? We thought for many years this would never be possible; the Great Initialization Alignment (eliminating `vnew` and `withfield` in favor of the `new` and `putfield` approach) made this possible. The language imposes no restrictions on the number of fields of value types.? The VM reserves the right to flatten, or not, based on its whims.? One likely whim is that "large" values are usually not worth flattening.? But this is invisible to the user; the semantics are the same whether or not the object is flattened. On 5/18/2024 1:24 PM, John Bossons wrote: > Thanks for making this so very clear. > > Two questions/issues: > (1) It would be helpful to include more on the properties of abstract > value classes (AVCs) -- perhaps a labelled subsection? A specific > question not dealt with explicitly in the current version: Can an AVC > have an instance field, now that a value class utilizes the > Flexible?Constructor Bodies JEP? (The alternative is ?repetition of > that field definition and accessor in every subtype, which is > potentially error-prone). > (2) It would also be helpful to include some commentary on limitations. > Specifically, although it is clear that the purpose is more > efficiently defined SMALL value objects, (a) How big is 'small'? And > (b) will the compiler accept value types of any size, no matter how deep? > > John > > > Phone:? (416) 450-3584 (cell) -------------- next part -------------- An HTML attachment was scrubbed... URL: From jbossons at gmail.com Sun May 19 04:18:55 2024 From: jbossons at gmail.com (John Bossons) Date: Sun, 19 May 2024 00:18:55 -0400 Subject: Most recent JEP 401 description In-Reply-To: <82a59a07-3eac-4364-93b2-aa9dc63bf236@oracle.com> References: <82a59a07-3eac-4364-93b2-aa9dc63bf236@oracle.com> Message-ID: Thanks for the confirmation. Good news! As to 'no restrictions' re size (horizontal - number of fields), fine. But what about depth (vertical - fields that are value objects that in turn contain fields that are value objects etc. all the way down)? No constraint on depth of nesting? On Sat, May 18, 2024 at 8:21?PM Brian Goetz wrote: > Amazingly, yes, value-capable abstract classes can have fields. We > thought for many years this would never be possible; the Great > Initialization Alignment (eliminating `vnew` and `withfield` in favor of > the `new` and `putfield` approach) made this possible. > > The language imposes no restrictions on the number of fields of value > types. The VM reserves the right to flatten, or not, based on its whims. > One likely whim is that "large" values are usually not worth flattening. > But this is invisible to the user; the semantics are the same whether or > not the object is flattened. > > On 5/18/2024 1:24 PM, John Bossons wrote: > > Thanks for making this so very clear. > > Two questions/issues: > (1) It would be helpful to include more on the properties of abstract > value classes (AVCs) -- perhaps a labelled subsection? A specific question > not dealt with explicitly in the current version: Can an AVC have an > instance field, now that a value class utilizes the Flexible Constructor > Bodies JEP? (The alternative is repetition of that field definition and > accessor in every subtype, which is potentially error-prone). > (2) It would also be helpful to include some commentary on limitations. > Specifically, although it is clear that the purpose is more efficiently > defined SMALL value objects, (a) How big is 'small'? And (b) will the > compiler accept value types of any size, no matter how deep? > > John > > > Phone: (416) 450-3584 (cell) > > > -- Phone: (416) 450-3584 (cell) -------------- next part -------------- An HTML attachment was scrubbed... URL: From fparain at openjdk.org Tue May 21 20:10:27 2024 From: fparain at openjdk.org (Frederic Parain) Date: Tue, 21 May 2024 20:10:27 GMT Subject: [lworld] Integrated: 8326598: [lworld] JVM must support field inheritance for value classes In-Reply-To: <9Z6BWw82Lc4VUrHJYMGRvkMPZuNn9xR9rIiWjD2aID0=.4453932a-7a71-400e-a1b4-7bbc3f1b80c8@github.com> References: <9Z6BWw82Lc4VUrHJYMGRvkMPZuNn9xR9rIiWjD2aID0=.4453932a-7a71-400e-a1b4-7bbc3f1b80c8@github.com> Message-ID: On Wed, 8 May 2024 19:42:31 GMT, Frederic Parain wrote: > Adds field inheritance for value classes. > Layouts of value classes that inherited fields are not always optimal, but fixing them would require a new placement algorithm which is beyond the scope of this CR. > The test is currently limited to the interpreted mode because of issues with CI and C2 tracked by JDK-8331964. This pull request has now been integrated. Changeset: f2f813da Author: Frederic Parain URL: https://git.openjdk.org/valhalla/commit/f2f813da4f557100e33244df2dc7cd0aff1174f5 Stats: 498 lines in 5 files changed: 361 ins; 39 del; 98 mod 8326598: [lworld] JVM must support field inheritance for value classes ------------- PR: https://git.openjdk.org/valhalla/pull/1103 From brian.goetz at oracle.com Wed May 22 13:42:59 2024 From: brian.goetz at oracle.com (Brian Goetz) Date: Wed, 22 May 2024 09:42:59 -0400 Subject: Most recent JEP 401 description In-Reply-To: References: <82a59a07-3eac-4364-93b2-aa9dc63bf236@oracle.com> Message-ID: <2e167ece-5e5e-4e69-ac52-8467f788eccc@oracle.com> There are no restrictions in the specification.? However, the object layout algorithm is already quite complicated, so it is possible there will be implementation limitations, at least at first. On 5/19/2024 12:18 AM, John Bossons wrote: > Thanks for?the?confirmation. Good news! > > As to 'no restrictions' re size (horizontal - number of fields), fine. > But what about depth (vertical - fields that are value objects that in > turn contain fields that are value objects etc. all the way down)? No > constraint on depth of nesting? > > > > > > On Sat, May 18, 2024 at 8:21?PM Brian Goetz > wrote: > > Amazingly, yes, value-capable abstract classes can have fields.? > We thought for many years this would never be possible; the Great > Initialization Alignment (eliminating `vnew` and `withfield` in > favor of the `new` and `putfield` approach) made this possible. > > The language imposes no restrictions on the number of fields of > value types.? The VM reserves the right to flatten, or not, based > on its whims.? One likely whim is that "large" values are usually > not worth flattening.? But this is invisible to the user; the > semantics are the same whether or not the object is flattened. > > On 5/18/2024 1:24 PM, John Bossons wrote: >> Thanks for making this so very clear. >> >> Two questions/issues: >> (1) It would be helpful to include more on the properties of >> abstract value classes (AVCs) -- perhaps a labelled subsection? A >> specific question not dealt with explicitly in the current >> version: Can an AVC have an instance field, now that a value >> class utilizes the Flexible?Constructor Bodies JEP? (The >> alternative is ?repetition of that field definition and accessor >> in every subtype, which is potentially error-prone). >> (2) It would also be helpful to include some commentary on >> limitations. >> Specifically, although it is clear that the purpose is more >> efficiently defined SMALL value objects, (a) How big is 'small'? >> And (b) will the compiler accept value types of any size, no >> matter how deep? >> >> John >> >> >> Phone:? (416) 450-3584 (cell) > > > > -- > Phone:? (416) 450-3584 (cell) -------------- next part -------------- An HTML attachment was scrubbed... URL: From liangchenblue at gmail.com Wed May 22 14:47:31 2024 From: liangchenblue at gmail.com (Chen Liang) Date: Wed, 22 May 2024 09:47:31 -0500 Subject: Most recent JEP 401 description In-Reply-To: <2e167ece-5e5e-4e69-ac52-8467f788eccc@oracle.com> References: <82a59a07-3eac-4364-93b2-aa9dc63bf236@oracle.com> <2e167ece-5e5e-4e69-ac52-8467f788eccc@oracle.com> Message-ID: For your information, John Rose has recently written a few essays on layout of flattened values in the VM: https://cr.openjdk.org/~jrose/values/flattened-values.html Also another recent article discussing loose consistency (old "primitive classes"): https://cr.openjdk.org/~jrose/values/loose-consistency.html On Wed, May 22, 2024 at 9:37?AM Brian Goetz wrote: > There are no restrictions in the specification. However, the object > layout algorithm is already quite complicated, so it is possible there will > be implementation limitations, at least at first. > > On 5/19/2024 12:18 AM, John Bossons wrote: > > Thanks for the confirmation. Good news! > > As to 'no restrictions' re size (horizontal - number of fields), fine. But > what about depth (vertical - fields that are value objects that in turn > contain fields that are value objects etc. all the way down)? No constraint > on depth of nesting? > > > > > > On Sat, May 18, 2024 at 8:21?PM Brian Goetz > wrote: > >> Amazingly, yes, value-capable abstract classes can have fields. We >> thought for many years this would never be possible; the Great >> Initialization Alignment (eliminating `vnew` and `withfield` in favor of >> the `new` and `putfield` approach) made this possible. >> >> The language imposes no restrictions on the number of fields of value >> types. The VM reserves the right to flatten, or not, based on its whims. >> One likely whim is that "large" values are usually not worth flattening. >> But this is invisible to the user; the semantics are the same whether or >> not the object is flattened. >> >> On 5/18/2024 1:24 PM, John Bossons wrote: >> >> Thanks for making this so very clear. >> >> Two questions/issues: >> (1) It would be helpful to include more on the properties of abstract >> value classes (AVCs) -- perhaps a labelled subsection? A specific question >> not dealt with explicitly in the current version: Can an AVC have an >> instance field, now that a value class utilizes the Flexible Constructor >> Bodies JEP? (The alternative is repetition of that field definition and >> accessor in every subtype, which is potentially error-prone). >> (2) It would also be helpful to include some commentary on limitations. >> Specifically, although it is clear that the purpose is more efficiently >> defined SMALL value objects, (a) How big is 'small'? And (b) will the >> compiler accept value types of any size, no matter how deep? >> >> John >> >> >> Phone: (416) 450-3584 (cell) >> >> >> > > -- > Phone: (416) 450-3584 (cell) > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fparain at openjdk.org Wed May 22 20:03:29 2024 From: fparain at openjdk.org (Frederic Parain) Date: Wed, 22 May 2024 20:03:29 GMT Subject: [lworld] RFR: 8332387: [lworld] monitorenter on value class instances must throw IdentityException instead of IllegalMonitorStateException Message-ID: Change the exception thrown by monitorenter when attempted on an instance of a value class. Monitorexit is not changed according to some discussions about the JVMS changes (it still throws IllegalMonitorStateException). Tested with Mach5, tier1-3. Fred ------------- Commit messages: - Merge remote-tracking branch 'upstream/lworld' into monitor_exception - Change monitorenter exception from IMSE to IE when argument is a value Changes: https://git.openjdk.org/valhalla/pull/1108/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1108&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8332387 Stats: 87 lines in 24 files changed: 29 ins; 2 del; 56 mod Patch: https://git.openjdk.org/valhalla/pull/1108.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1108/head:pull/1108 PR: https://git.openjdk.org/valhalla/pull/1108 From heidinga at openjdk.org Thu May 23 13:49:16 2024 From: heidinga at openjdk.org (Dan Heidinga) Date: Thu, 23 May 2024 13:49:16 GMT Subject: [lworld] RFR: 8332387: [lworld] monitorenter on value class instances must throw IdentityException instead of IllegalMonitorStateException In-Reply-To: References: Message-ID: On Wed, 22 May 2024 19:58:01 GMT, Frederic Parain wrote: > Change the exception thrown by monitorenter when attempted on an instance of a value class. > Monitorexit is not changed according to some discussions about the JVMS changes (it still throws IllegalMonitorStateException). > > Tested with Mach5, tier1-3. > > Fred Looks straightforward and correct by pattern match =) apart from a minor question src/hotspot/share/c1/c1_LIR.cpp line 841: > 839: > 840: do_stub(opLock->_stub); > 841: do_stub(opLock->_throw_ie_stub); Does `_throw_ie_stub` apply to both `lir_lock` & 'lir_unlock`? I thought only `monitorenter` was being changed. ------------- PR Review: https://git.openjdk.org/valhalla/pull/1108#pullrequestreview-2074020257 PR Review Comment: https://git.openjdk.org/valhalla/pull/1108#discussion_r1611724324 From fparain at openjdk.org Thu May 23 17:24:15 2024 From: fparain at openjdk.org (Frederic Parain) Date: Thu, 23 May 2024 17:24:15 GMT Subject: [lworld] RFR: 8332387: [lworld] monitorenter on value class instances must throw IdentityException instead of IllegalMonitorStateException In-Reply-To: References: Message-ID: On Thu, 23 May 2024 13:42:33 GMT, Dan Heidinga wrote: >> Change the exception thrown by monitorenter when attempted on an instance of a value class. >> Monitorexit is not changed according to some discussions about the JVMS changes (it still throws IllegalMonitorStateException). >> >> Tested with Mach5, tier1-3. >> >> Fred > > src/hotspot/share/c1/c1_LIR.cpp line 841: > >> 839: >> 840: do_stub(opLock->_stub); >> 841: do_stub(opLock->_throw_ie_stub); > > Does `_throw_ie_stub` apply to both `lir_lock` & 'lir_unlock`? I thought only `monitorenter` was being changed. When creating a LIR_OpLock for lir_unlock (in LIR_List::unlock_object(), c1_LIR.cpp:1576), no stub is provided so _throw_ie_stub is null. And do_stub() does nothing if the pointer passed in argument is null. Did I miss something? ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/1108#discussion_r1612064611 From heidinga at openjdk.org Thu May 23 17:32:13 2024 From: heidinga at openjdk.org (Dan Heidinga) Date: Thu, 23 May 2024 17:32:13 GMT Subject: [lworld] RFR: 8332387: [lworld] monitorenter on value class instances must throw IdentityException instead of IllegalMonitorStateException In-Reply-To: References: Message-ID: On Wed, 22 May 2024 19:58:01 GMT, Frederic Parain wrote: > Change the exception thrown by monitorenter when attempted on an instance of a value class. > Monitorexit is not changed according to some discussions about the JVMS changes (it still throws IllegalMonitorStateException). > > Tested with Mach5, tier1-3. > > Fred Marked as reviewed by heidinga (no project role). ------------- PR Review: https://git.openjdk.org/valhalla/pull/1108#pullrequestreview-2074620706 From heidinga at openjdk.org Thu May 23 17:32:14 2024 From: heidinga at openjdk.org (Dan Heidinga) Date: Thu, 23 May 2024 17:32:14 GMT Subject: [lworld] RFR: 8332387: [lworld] monitorenter on value class instances must throw IdentityException instead of IllegalMonitorStateException In-Reply-To: References: Message-ID: On Thu, 23 May 2024 17:21:55 GMT, Frederic Parain wrote: >> src/hotspot/share/c1/c1_LIR.cpp line 841: >> >>> 839: >>> 840: do_stub(opLock->_stub); >>> 841: do_stub(opLock->_throw_ie_stub); >> >> Does `_throw_ie_stub` apply to both `lir_lock` & 'lir_unlock`? I thought only `monitorenter` was being changed. > > When creating a LIR_OpLock for lir_unlock (in LIR_List::unlock_object(), c1_LIR.cpp:1576), no stub is provided so _throw_ie_stub is null. And do_stub() does nothing if the pointer passed in argument is null. > Did I miss something? You're correct. Thanks for confirming ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/1108#discussion_r1612072903 From fparain at openjdk.org Thu May 23 18:19:27 2024 From: fparain at openjdk.org (Frederic Parain) Date: Thu, 23 May 2024 18:19:27 GMT Subject: [lworld] RFR: 8332387: [lworld] monitorenter on value class instances must throw IdentityException instead of IllegalMonitorStateException In-Reply-To: References: Message-ID: On Wed, 22 May 2024 19:58:01 GMT, Frederic Parain wrote: > Change the exception thrown by monitorenter when attempted on an instance of a value class. > Monitorexit is not changed according to some discussions about the JVMS changes (it still throws IllegalMonitorStateException). > > Tested with Mach5, tier1-3. > > Fred Dan, Thank you for the review. ------------- PR Comment: https://git.openjdk.org/valhalla/pull/1108#issuecomment-2127773321 From fparain at openjdk.org Thu May 23 18:19:27 2024 From: fparain at openjdk.org (Frederic Parain) Date: Thu, 23 May 2024 18:19:27 GMT Subject: [lworld] Integrated: 8332387: [lworld] monitorenter on value class instances must throw IdentityException instead of IllegalMonitorStateException In-Reply-To: References: Message-ID: On Wed, 22 May 2024 19:58:01 GMT, Frederic Parain wrote: > Change the exception thrown by monitorenter when attempted on an instance of a value class. > Monitorexit is not changed according to some discussions about the JVMS changes (it still throws IllegalMonitorStateException). > > Tested with Mach5, tier1-3. > > Fred This pull request has now been integrated. Changeset: 0ea02dad Author: Frederic Parain URL: https://git.openjdk.org/valhalla/commit/0ea02dad905376eb52e0f71368363bfc97f2cea1 Stats: 87 lines in 24 files changed: 29 ins; 2 del; 56 mod 8332387: [lworld] monitorenter on value class instances must throw IdentityException instead of IllegalMonitorStateException Reviewed-by: heidinga ------------- PR: https://git.openjdk.org/valhalla/pull/1108 From thartmann at openjdk.org Tue May 28 09:47:35 2024 From: thartmann at openjdk.org (Tobias Hartmann) Date: Tue, 28 May 2024 09:47:35 GMT Subject: [lworld] RFR: 8333037: [lworld] Part 2: Prepare compiler implementation and tests for JEP 401 Message-ID: Fixing a few more test and implementation issues that came with or were triggered by the JEP 401 related changes. The remaining issues / ToDo's will be fixed by [JDK-8325106](https://bugs.openjdk.org/browse/JDK-8325106). Thanks, Tobias ------------- Commit messages: - 8333037: [lworld] Part 2: Prepare compiler implementation and tests for JEP 401 Changes: https://git.openjdk.org/valhalla/pull/1110/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1110&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8333037 Stats: 277 lines in 30 files changed: 66 ins; 131 del; 80 mod Patch: https://git.openjdk.org/valhalla/pull/1110.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1110/head:pull/1110 PR: https://git.openjdk.org/valhalla/pull/1110 From thartmann at openjdk.org Tue May 28 10:46:16 2024 From: thartmann at openjdk.org (Tobias Hartmann) Date: Tue, 28 May 2024 10:46:16 GMT Subject: [lworld] Integrated: 8333037: [lworld] Part 2: Prepare compiler implementation and tests for JEP 401 In-Reply-To: References: Message-ID: On Tue, 28 May 2024 09:42:10 GMT, Tobias Hartmann wrote: > Fixing a few more test and implementation issues that came with or were triggered by the JEP 401 related changes. The remaining issues / ToDo's will be fixed by [JDK-8325106](https://bugs.openjdk.org/browse/JDK-8325106). > > Thanks, > Tobias This pull request has now been integrated. Changeset: fcf2f796 Author: Tobias Hartmann URL: https://git.openjdk.org/valhalla/commit/fcf2f79683aeb005b9991faaafa68e2ca440ec4c Stats: 277 lines in 30 files changed: 66 ins; 131 del; 80 mod 8333037: [lworld] Part 2: Prepare compiler implementation and tests for JEP 401 ------------- PR: https://git.openjdk.org/valhalla/pull/1110 From thartmann at openjdk.org Tue May 28 13:24:31 2024 From: thartmann at openjdk.org (Tobias Hartmann) Date: Tue, 28 May 2024 13:24:31 GMT Subject: [lworld] RFR: 8333087: [lworld] Undo problem listing and remove assert added due to JDK-8331766 Message-ID: The issue described by [JDK-8331766](https://bugs.openjdk.org/browse/JDK-8331766) does not reproduce anymore. Undo the problem listing and remove the corresponding assert. Thanks, Tobias ------------- Commit messages: - Undo problem listing and remove the assert Changes: https://git.openjdk.org/valhalla/pull/1111/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1111&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8333087 Stats: 5 lines in 3 files changed: 0 ins; 5 del; 0 mod Patch: https://git.openjdk.org/valhalla/pull/1111.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1111/head:pull/1111 PR: https://git.openjdk.org/valhalla/pull/1111 From thartmann at openjdk.org Tue May 28 15:42:18 2024 From: thartmann at openjdk.org (Tobias Hartmann) Date: Tue, 28 May 2024 15:42:18 GMT Subject: [lworld] Integrated: 8333087: [lworld] Undo problem listing and remove assert added due to JDK-8331766 In-Reply-To: References: Message-ID: On Tue, 28 May 2024 13:19:28 GMT, Tobias Hartmann wrote: > The issue described by [JDK-8331766](https://bugs.openjdk.org/browse/JDK-8331766) does not reproduce anymore. Undo the problem listing and remove the corresponding assert. > > Thanks, > Tobias This pull request has now been integrated. Changeset: 0e7fca13 Author: Tobias Hartmann URL: https://git.openjdk.org/valhalla/commit/0e7fca13fcb8fa764fa5f50394cec65f249fcf16 Stats: 5 lines in 3 files changed: 0 ins; 5 del; 0 mod 8333087: [lworld] Undo problem listing and remove assert added due to JDK-8331766 ------------- PR: https://git.openjdk.org/valhalla/pull/1111 From duke at openjdk.org Fri May 31 17:47:23 2024 From: duke at openjdk.org (Jens Lidestrom) Date: Fri, 31 May 2024 17:47:23 GMT Subject: [lworld] RFR: 8331496: [lworld] Class::isValue, Class::isIdentity and new java.lang.reflect APIs should be reflective preview API In-Reply-To: <8TmIBRLIn2a5WN_Ls47UZKtBRHoNTQoKLAQ8LSoRUwc=.ace3c7a1-d3ee-40c1-9eb8-d2b19957cbd4@github.com> References: <8TmIBRLIn2a5WN_Ls47UZKtBRHoNTQoKLAQ8LSoRUwc=.ace3c7a1-d3ee-40c1-9eb8-d2b19957cbd4@github.com> Message-ID: On Wed, 1 May 2024 16:21:17 GMT, Mandy Chung wrote: > Mark the reflection APIs added for JEP 401 as reflective preview API. src/java.base/share/classes/java/lang/Class.java line 704: > 702: * @since Valhalla > 703: */ > 704: @PreviewFeature(feature = PreviewFeature.Feature.VALUE_OBJECTS, reflective=true) There should probably be spaces around `=`: reflective = true ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/1090#discussion_r1622761352 From fparain at openjdk.org Fri May 31 21:03:39 2024 From: fparain at openjdk.org (Frederic Parain) Date: Fri, 31 May 2024 21:03:39 GMT Subject: [lworld] Integrated: 8333376: [lworld] runtime/cds/appcds/RewriteBytecodesInlineTest.java fails because of missing preview mode Message-ID: <3N_OQ6A13pUtJSnF9s3rKz5KHVk8pcnNZIrYOFbU8IY=.272afa05-b8c1-42e0-bbef-93bdb34d8e92@github.com> Change test invocation method to enable preview mode in the VM analyzing the output of the test. Tested with Mach5 on all platforms. ------------- Commit messages: - Fix test invocation to enable preview mode Changes: https://git.openjdk.org/valhalla/pull/1112/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1112&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8333376 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/valhalla/pull/1112.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1112/head:pull/1112 PR: https://git.openjdk.org/valhalla/pull/1112 From fparain at openjdk.org Fri May 31 21:03:40 2024 From: fparain at openjdk.org (Frederic Parain) Date: Fri, 31 May 2024 21:03:40 GMT Subject: [lworld] Integrated: 8333376: [lworld] runtime/cds/appcds/RewriteBytecodesInlineTest.java fails because of missing preview mode In-Reply-To: <3N_OQ6A13pUtJSnF9s3rKz5KHVk8pcnNZIrYOFbU8IY=.272afa05-b8c1-42e0-bbef-93bdb34d8e92@github.com> References: <3N_OQ6A13pUtJSnF9s3rKz5KHVk8pcnNZIrYOFbU8IY=.272afa05-b8c1-42e0-bbef-93bdb34d8e92@github.com> Message-ID: On Fri, 31 May 2024 20:57:38 GMT, Frederic Parain wrote: > Change test invocation method to enable preview mode in the VM analyzing the output of the test. > > Tested with Mach5 on all platforms. This pull request has now been integrated. Changeset: 24300107 Author: Frederic Parain URL: https://git.openjdk.org/valhalla/commit/24300107ca1bdb0878873973871a057193afac4a Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod 8333376: [lworld] runtime/cds/appcds/RewriteBytecodesInlineTest.java fails because of missing preview mode ------------- PR: https://git.openjdk.org/valhalla/pull/1112