From amenkov at openjdk.java.net Mon May 9 19:52:55 2022 From: amenkov at openjdk.java.net (Alex Menkov) Date: Mon, 9 May 2022 19:52:55 GMT Subject: [lworld] RFR: 8281269: Update Valhalla test which uses ClassTransformer class Message-ID: prerequisite for JDK-8281268 ------------- Commit messages: - switch to ClassTransformer in test.lib Changes: https://git.openjdk.java.net/valhalla/pull/687/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=687&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8281269 Stats: 3 lines in 1 file changed: 0 ins; 1 del; 2 mod Patch: https://git.openjdk.java.net/valhalla/pull/687.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/687/head:pull/687 PR: https://git.openjdk.java.net/valhalla/pull/687 From amenkov at openjdk.java.net Mon May 9 20:00:15 2022 From: amenkov at openjdk.java.net (Alex Menkov) Date: Mon, 9 May 2022 20:00:15 GMT Subject: [lworld] Integrated: 8281269: Update Valhalla test which uses ClassTransformer class In-Reply-To: References: Message-ID: On Mon, 9 May 2022 19:45:19 GMT, Alex Menkov wrote: > prerequisite for JDK-8281268 This pull request has now been integrated. Changeset: 8d375040 Author: Alex Menkov URL: https://git.openjdk.java.net/valhalla/commit/8d3750400ece36084b47fe5bf9ee06486ae25c1a Stats: 3 lines in 1 file changed: 0 ins; 1 del; 2 mod 8281269: Update Valhalla test which uses ClassTransformer class ------------- PR: https://git.openjdk.java.net/valhalla/pull/687 From sadayapalam at openjdk.java.net Tue May 10 14:43:26 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Tue, 10 May 2022 14:43:26 GMT Subject: [lworld] RFR: 8286491: Withdraw ValueObject and IdentityObject and introduce value and identity class modifiers Message-ID: Changes to javac, hotspot runtime, core libs and asmtools sources and tests ------------- Commit messages: - 8286491: Withdraw ValueObject and IdentityObject and introduce value and identity class modifiers Changes: https://git.openjdk.java.net/valhalla/pull/688/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=688&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8286491 Stats: 1044 lines in 80 files changed: 151 ins; 664 del; 229 mod Patch: https://git.openjdk.java.net/valhalla/pull/688.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/688/head:pull/688 PR: https://git.openjdk.java.net/valhalla/pull/688 From sadayapalam at openjdk.java.net Tue May 10 14:43:26 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Tue, 10 May 2022 14:43:26 GMT Subject: [lworld] RFR: 8286491: Withdraw ValueObject and IdentityObject and introduce value and identity class modifiers In-Reply-To: References: Message-ID: <06oMVEJd9vxON1RWrlyVoEFShnCyLvOceYYg007lNOY=.b354cfd8-047d-44ba-8622-de2f0fbecfda@github.com> On Tue, 10 May 2022 14:28:16 GMT, Srikanth Adayapalam wrote: > Changes to javac, hotspot runtime, core libs and asmtools sources and tests This PR implements the following: - Withdraw the top interface types ValueObject and IdentityObject - Add support for identity and value contextual keyword modifiers for flagging value'ness/identityness of a class/interface. - Redefine ACC_VALUE to be 0x40 Notes for hotspot, core-libs and other non-langtools changes reviewers: Changes necessary to rip out PERMITS_VALUE flag bit are not included - I have simply redefined the value of the flag bit to "get it out of the way" This change set is failing a few tier 1,2,3 tests - I will attach the list of failing tests. If you will provide me with fixes for these and also any additional rectifications/amendments/changes you see fit, I am happy to include them - Thanks! Tier1 Failing Tests: Hotspot/runtime: runtime/valhalla/inlinetypes/classfileparser/ACC_CFETest.java runtime/valhalla/inlinetypes/identityObject/TestIdentityObject.java runtime/valhalla/inlinetypes/primitiveObject/TestPrimitiveObject.java runtime/valhalla/inlinetypes/testSupers/TestSuperClasses.java runtime/valhalla/inlinetypes/verifier/VerifierInlineTypes.java runtime/valhalla/inlinetypes/withfieldTests/RunWithfieldTests.java serviceability/dcmd/vm/ClassHierarchyTest.java Langtools: tools/javac/ClassFileModifiers/ClassModifiers.java tools/javac/SynchronizedClass.java tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerClassTest.java tools/javac/classfiles/attributes/innerclasses/InnerAnnotationsInInnerEnumTest.java tools/javac/classfiles/attributes/innerclasses/InnerClassesInAnonymousClassTest.java tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerAnnotationTest.java tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerClassTest.java tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerEnumTest.java tools/javac/classfiles/attributes/innerclasses/InnerClassesInInnerInterfaceTest.java tools/javac/classfiles/attributes/innerclasses/InnerClassesInLocalClassTest.java tools/javac/classfiles/attributes/innerclasses/InnerClassesTest.java tools/javac/classfiles/attributes/innerclasses/InnerEnumInInnerAnnotationTest.java tools/javac/classfiles/attributes/innerclasses/InnerEnumInInnerEnumTest.java tools/javac/classfiles/attributes/innerclasses/InnerEnumInInnerInterfaceTest.java tools/javac/classfiles/attributes/innerclasses/InnerEnumsInInnerClassTest.java tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerClassTest.java tools/javac/classfiles/attributes/innerclasses/InnerInterfacesInInnerEnumTest.java tools/javac/diags/CheckExamples.java tools/javac/platform/createsymbols/CreateSymbolsTest.java tools/javac/processing/model/completionfailure/NoAbortForBadClassFile.java tools/javap/TestSuperclass.java ------------- PR: https://git.openjdk.java.net/valhalla/pull/688 From duke at openjdk.java.net Tue May 10 14:43:27 2022 From: duke at openjdk.java.net (Thiago Henrique =?UTF-8?B?SMO8cG5lcg==?=) Date: Tue, 10 May 2022 14:43:27 GMT Subject: [lworld] RFR: 8286491: Withdraw ValueObject and IdentityObject and introduce value and identity class modifiers In-Reply-To: References: Message-ID: On Tue, 10 May 2022 14:28:16 GMT, Srikanth Adayapalam wrote: > Changes to javac, hotspot runtime, core libs and asmtools sources and tests src/hotspot/share/classfile/classFileParser.cpp line 910: > 908: THREAD_AND_LOCATION, > 909: vmSymbols::java_lang_IncompatibleClassChangeError(), > 910: "Inline type %s has an identity type as supertytype", Typo: supertype ------------- PR: https://git.openjdk.java.net/valhalla/pull/688 From sadayapalam at openjdk.java.net Tue May 10 14:43:27 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Tue, 10 May 2022 14:43:27 GMT Subject: [lworld] RFR: 8286491: Withdraw ValueObject and IdentityObject and introduce value and identity class modifiers In-Reply-To: References: Message-ID: On Tue, 10 May 2022 14:29:45 GMT, Thiago Henrique H?pner wrote: >> Changes to javac, hotspot runtime, core libs and asmtools sources and tests > > src/hotspot/share/classfile/classFileParser.cpp line 910: > >> 908: THREAD_AND_LOCATION, >> 909: vmSymbols::java_lang_IncompatibleClassChangeError(), >> 910: "Inline type %s has an identity type as supertytype", > > Typo: supertype :) That is fast! ------------- PR: https://git.openjdk.java.net/valhalla/pull/688 From sadayapalam at openjdk.java.net Tue May 10 14:56:29 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Tue, 10 May 2022 14:56:29 GMT Subject: [lworld] RFR: 8286491: Withdraw ValueObject and IdentityObject and introduce value and identity class modifiers In-Reply-To: References: Message-ID: On Tue, 10 May 2022 14:28:16 GMT, Srikanth Adayapalam wrote: > Changes to javac, hotspot runtime, core libs and asmtools sources and tests Tier2 Failing Tests: Hotspot/runtime: runtime/cds/appcds/TestDumpClassListSource.java runtime/cds/appcds/cacheObject/CheckCachedMirrorTest.java runtime/cds/appcds/cacheObject/CheckCachedResolvedReferences.java runtime/cds/appcds/customLoader/ClassListFormatA.java runtime/cds/appcds/customLoader/ClassListFormatD.java runtime/cds/appcds/customLoader/ClassListFormatE.java runtime/cds/appcds/customLoader/CustomClassListDump.java runtime/cds/appcds/customLoader/HelloCustom.java runtime/cds/appcds/customLoader/HelloCustom_JFR.java runtime/cds/appcds/customLoader/LoaderSegregationTest.java runtime/cds/appcds/customLoader/OldClassAndInf.java runtime/cds/appcds/customLoader/ParallelTestMultiFP.java runtime/cds/appcds/customLoader/ParallelTestSingleFP.java runtime/cds/appcds/customLoader/PrintSharedArchiveAndExit.java runtime/cds/appcds/customLoader/ProtectionDomain.java runtime/cds/appcds/customLoader/SameNameInTwoLoadersTest.java runtime/cds/appcds/customLoader/UnintendedLoadersTest.java runtime/cds/appcds/customLoader/UnloadUnregisteredLoaderTest.java runtime/cds/appcds/jvmti/transformRelatedClasses/TransformInterfaceImplementorAppCDS.java runtime/cds/appcds/jvmti/transformRelatedClasses/TransformSuperSubAppCDS.java runtime/cds/appcds/loaderConstraints/LoaderConstraintsTest.java#custom-cl corelibs/jdk: javax/naming/module/RunBasic.java (Spurious ?) java/net/ProxySelector/MultiThreadedSystemProxies.java (Spurious ?) Tier3 failing tests: JDK: java/lang/instrument/IsModifiableClassAgent.java jdk/jfr/api/consumer/TestRecordedObject.java jdk/jfr/api/event/TestShouldCommit.java jdk/jfr/api/recording/event/TestThreshold.java ------------- PR: https://git.openjdk.java.net/valhalla/pull/688 From sadayapalam at openjdk.java.net Thu May 12 05:29:10 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Thu, 12 May 2022 05:29:10 GMT Subject: [lworld] RFR: 8286491: Withdraw ValueObject and IdentityObject and introduce value and identity class modifiers [v2] In-Reply-To: References: Message-ID: > Changes to javac, hotspot runtime, core libs and asmtools sources and tests Srikanth Adayapalam has updated the pull request incrementally with one additional commit since the last revision: Fix failing tier3 test java/lang/instrument/IsModifiableClassAgent.java ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/688/files - new: https://git.openjdk.java.net/valhalla/pull/688/files/ebd2fd57..656bf57b Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=688&range=01 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=688&range=00-01 Stats: 4 lines in 1 file changed: 0 ins; 4 del; 0 mod Patch: https://git.openjdk.java.net/valhalla/pull/688.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/688/head:pull/688 PR: https://git.openjdk.java.net/valhalla/pull/688 From sadayapalam at openjdk.java.net Thu May 12 08:13:16 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Thu, 12 May 2022 08:13:16 GMT Subject: [lworld] RFR: 8286491: Withdraw ValueObject and IdentityObject and introduce value and identity class modifiers [v3] In-Reply-To: References: Message-ID: > Changes to javac, hotspot runtime, core libs and asmtools sources and tests Srikanth Adayapalam has updated the pull request incrementally with one additional commit since the last revision: Fix tier1 failures in test/langtools/tools/javac/classfiles/attributes/innerclasses ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/688/files - new: https://git.openjdk.java.net/valhalla/pull/688/files/656bf57b..470512bb Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=688&range=02 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=688&range=01-02 Stats: 12 lines in 3 files changed: 8 ins; 0 del; 4 mod Patch: https://git.openjdk.java.net/valhalla/pull/688.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/688/head:pull/688 PR: https://git.openjdk.java.net/valhalla/pull/688 From sadayapalam at openjdk.java.net Thu May 12 08:37:13 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Thu, 12 May 2022 08:37:13 GMT Subject: [lworld] RFR: 8286491: Withdraw ValueObject and IdentityObject and introduce value and identity class modifiers [v4] In-Reply-To: References: Message-ID: > Changes to javac, hotspot runtime, core libs and asmtools sources and tests Srikanth Adayapalam has updated the pull request incrementally with one additional commit since the last revision: Fix failing tier1 langtools test: tools/javap/TestSuperclass.java ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/688/files - new: https://git.openjdk.java.net/valhalla/pull/688/files/470512bb..09786c64 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=688&range=03 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=688&range=02-03 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/valhalla/pull/688.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/688/head:pull/688 PR: https://git.openjdk.java.net/valhalla/pull/688 From sadayapalam at openjdk.java.net Thu May 12 10:16:30 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Thu, 12 May 2022 10:16:30 GMT Subject: [lworld] RFR: 8286491: Withdraw ValueObject and IdentityObject and introduce value and identity class modifiers [v5] In-Reply-To: References: Message-ID: > Changes to javac, hotspot runtime, core libs and asmtools sources and tests Srikanth Adayapalam has updated the pull request incrementally with one additional commit since the last revision: Fix failing tier1 langtools test tools/javac/ClassFileModifiers/ClassModifiers.java ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/688/files - new: https://git.openjdk.java.net/valhalla/pull/688/files/09786c64..5b6df93e Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=688&range=04 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=688&range=03-04 Stats: 124 lines in 3 files changed: 0 ins; 7 del; 117 mod Patch: https://git.openjdk.java.net/valhalla/pull/688.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/688/head:pull/688 PR: https://git.openjdk.java.net/valhalla/pull/688 From sadayapalam at openjdk.java.net Thu May 12 10:47:37 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Thu, 12 May 2022 10:47:37 GMT Subject: [lworld] RFR: 8286491: Withdraw ValueObject and IdentityObject and introduce value and identity class modifiers [v6] In-Reply-To: References: Message-ID: > Changes to javac, hotspot runtime, core libs and asmtools sources and tests Srikanth Adayapalam has updated the pull request incrementally with one additional commit since the last revision: Fix failing tier1 langtools test: tools/javac/SynchronizedClass.java ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/688/files - new: https://git.openjdk.java.net/valhalla/pull/688/files/5b6df93e..c281f18e Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=688&range=05 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=688&range=04-05 Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/valhalla/pull/688.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/688/head:pull/688 PR: https://git.openjdk.java.net/valhalla/pull/688 From sadayapalam at openjdk.java.net Fri May 13 07:29:36 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Fri, 13 May 2022 07:29:36 GMT Subject: [lworld] RFR: 8286491: Withdraw ValueObject and IdentityObject and introduce value and identity class modifiers [v7] In-Reply-To: References: Message-ID: > Changes to javac, hotspot runtime, core libs and asmtools sources and tests Srikanth Adayapalam has updated the pull request incrementally with two additional commits since the last revision: - Fix typo spotted in code review - Fix tier1 langtools test failure: tools/javac/diags/CheckExamples.java ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/688/files - new: https://git.openjdk.java.net/valhalla/pull/688/files/c281f18e..34ce4398 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=688&range=06 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=688&range=05-06 Stats: 167 lines in 12 files changed: 101 ins; 61 del; 5 mod Patch: https://git.openjdk.java.net/valhalla/pull/688.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/688/head:pull/688 PR: https://git.openjdk.java.net/valhalla/pull/688 From sadayapalam at openjdk.java.net Mon May 16 06:20:58 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Mon, 16 May 2022 06:20:58 GMT Subject: [lworld] RFR: 8286491: Withdraw ValueObject and IdentityObject and introduce value and identity class modifiers [v8] In-Reply-To: References: Message-ID: <6jKmdaDXDC1kN95i9Mh-SJKkmHv5MgBsfJy6p21YcoA=.abf3bd8c-3ee7-44d4-a7b6-d289e6c45e59@github.com> > Changes to javac, hotspot runtime, core libs and asmtools sources and tests Srikanth Adayapalam has updated the pull request incrementally with one additional commit since the last revision: Fix failure in tier1 langtools test: tools/javac/processing/model/completionfailure/NoAbortForBadClassFile.java ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/688/files - new: https://git.openjdk.java.net/valhalla/pull/688/files/34ce4398..7a22ed11 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=688&range=07 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=688&range=06-07 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/valhalla/pull/688.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/688/head:pull/688 PR: https://git.openjdk.java.net/valhalla/pull/688 From sadayapalam at openjdk.java.net Mon May 16 08:22:13 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Mon, 16 May 2022 08:22:13 GMT Subject: [lworld] RFR: 8286491: Withdraw ValueObject and IdentityObject and introduce value and identity class modifiers [v9] In-Reply-To: References: Message-ID: > Changes to javac, hotspot runtime, core libs and asmtools sources and tests Srikanth Adayapalam has updated the pull request incrementally with one additional commit since the last revision: Fix langtools tier1 test failure: tools/javac/platform/createsymbols/CreateSymbolsTest.java ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/688/files - new: https://git.openjdk.java.net/valhalla/pull/688/files/7a22ed11..cbc37843 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=688&range=08 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=688&range=07-08 Stats: 8 lines in 1 file changed: 0 ins; 0 del; 8 mod Patch: https://git.openjdk.java.net/valhalla/pull/688.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/688/head:pull/688 PR: https://git.openjdk.java.net/valhalla/pull/688 From sadayapalam at openjdk.java.net Mon May 16 08:32:38 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Mon, 16 May 2022 08:32:38 GMT Subject: [lworld] RFR: 8286491: Withdraw ValueObject and IdentityObject and introduce value and identity class modifiers [v10] In-Reply-To: References: Message-ID: > Changes to javac, hotspot runtime, core libs and asmtools sources and tests Srikanth Adayapalam 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 11 additional commits since the last revision: - Merge branch 'lworld' into JDK-8286491 - Fix langtools tier1 test failure: tools/javac/platform/createsymbols/CreateSymbolsTest.java - Fix failure in tier1 langtools test: tools/javac/processing/model/completionfailure/NoAbortForBadClassFile.java - Fix typo spotted in code review - Fix tier1 langtools test failure: tools/javac/diags/CheckExamples.java - Fix failing tier1 langtools test: tools/javac/SynchronizedClass.java - Fix failing tier1 langtools test tools/javac/ClassFileModifiers/ClassModifiers.java - Fix failing tier1 langtools test: tools/javap/TestSuperclass.java - Fix tier1 failures in test/langtools/tools/javac/classfiles/attributes/innerclasses - Fix failing tier3 test java/lang/instrument/IsModifiableClassAgent.java - ... and 1 more: https://git.openjdk.java.net/valhalla/compare/9aa34f35...fdc376eb ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/688/files - new: https://git.openjdk.java.net/valhalla/pull/688/files/cbc37843..fdc376eb Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=688&range=09 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=688&range=08-09 Stats: 3 lines in 1 file changed: 0 ins; 1 del; 2 mod Patch: https://git.openjdk.java.net/valhalla/pull/688.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/688/head:pull/688 PR: https://git.openjdk.java.net/valhalla/pull/688 From dsimms at openjdk.java.net Mon May 16 10:08:19 2022 From: dsimms at openjdk.java.net (David Simms) Date: Mon, 16 May 2022 10:08:19 GMT Subject: [lworld] RFR: 8286491: Withdraw ValueObject and IdentityObject and introduce value and identity class modifiers [v10] In-Reply-To: References: Message-ID: On Mon, 16 May 2022 08:32:38 GMT, Srikanth Adayapalam wrote: >> Changes to javac, hotspot runtime, core libs and asmtools sources and tests > > Srikanth Adayapalam 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 11 additional commits since the last revision: > > - Merge branch 'lworld' into JDK-8286491 > - Fix langtools tier1 test failure: tools/javac/platform/createsymbols/CreateSymbolsTest.java > - Fix failure in tier1 langtools test: tools/javac/processing/model/completionfailure/NoAbortForBadClassFile.java > - Fix typo spotted in code review > - Fix tier1 langtools test failure: tools/javac/diags/CheckExamples.java > - Fix failing tier1 langtools test: tools/javac/SynchronizedClass.java > - Fix failing tier1 langtools test tools/javac/ClassFileModifiers/ClassModifiers.java > - Fix failing tier1 langtools test: tools/javap/TestSuperclass.java > - Fix tier1 failures in test/langtools/tools/javac/classfiles/attributes/innerclasses > - Fix failing tier3 test java/lang/instrument/IsModifiableClassAgent.java > - ... and 1 more: https://git.openjdk.java.net/valhalla/compare/1f2966d8...fdc376eb Patch to remove IdentityObject references from micros (yet to complete testing, compiles for now)... [remove_idobject_benchmark.zip](https://github.com/openjdk/valhalla/files/8699107/remove_idobject_benchmark.zip) ------------- PR: https://git.openjdk.java.net/valhalla/pull/688 From jwaters at openjdk.java.net Mon May 16 12:13:14 2022 From: jwaters at openjdk.java.net (Julian Waters) Date: Mon, 16 May 2022 12:13:14 GMT Subject: [lworld] RFR: 8286491: Withdraw ValueObject and IdentityObject and introduce value and identity class modifiers [v10] In-Reply-To: References: Message-ID: On Mon, 16 May 2022 08:32:38 GMT, Srikanth Adayapalam wrote: >> Changes to javac, hotspot runtime, core libs and asmtools sources and tests > > Srikanth Adayapalam 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 11 additional commits since the last revision: > > - Merge branch 'lworld' into JDK-8286491 > - Fix langtools tier1 test failure: tools/javac/platform/createsymbols/CreateSymbolsTest.java > - Fix failure in tier1 langtools test: tools/javac/processing/model/completionfailure/NoAbortForBadClassFile.java > - Fix typo spotted in code review > - Fix tier1 langtools test failure: tools/javac/diags/CheckExamples.java > - Fix failing tier1 langtools test: tools/javac/SynchronizedClass.java > - Fix failing tier1 langtools test tools/javac/ClassFileModifiers/ClassModifiers.java > - Fix failing tier1 langtools test: tools/javap/TestSuperclass.java > - Fix tier1 failures in test/langtools/tools/javac/classfiles/attributes/innerclasses > - Fix failing tier3 test java/lang/instrument/IsModifiableClassAgent.java > - ... and 1 more: https://git.openjdk.java.net/valhalla/compare/c88c3803...fdc376eb Bit of a weird question, but considering `SomeObject.val` might end up as a language feature in the future (https://mail.openjdk.java.net/pipermail/valhalla-spec-observers/2022-May/001934.html) and that we already have the ref keyword reserved, would it be worth considering reusing those keywords for modifying the "identitiness" of an object instead of having an extra keyword? ------------- PR: https://git.openjdk.java.net/valhalla/pull/688 From forax at openjdk.java.net Mon May 16 12:27:20 2022 From: forax at openjdk.java.net (=?UTF-8?B?UsOpbWk=?= Forax) Date: Mon, 16 May 2022 12:27:20 GMT Subject: [lworld] RFR: 8286491: Withdraw ValueObject and IdentityObject and introduce value and identity class modifiers [v10] In-Reply-To: References: Message-ID: On Mon, 16 May 2022 08:32:38 GMT, Srikanth Adayapalam wrote: >> Changes to javac, hotspot runtime, core libs and asmtools sources and tests > > Srikanth Adayapalam 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 11 additional commits since the last revision: > > - Merge branch 'lworld' into JDK-8286491 > - Fix langtools tier1 test failure: tools/javac/platform/createsymbols/CreateSymbolsTest.java > - Fix failure in tier1 langtools test: tools/javac/processing/model/completionfailure/NoAbortForBadClassFile.java > - Fix typo spotted in code review > - Fix tier1 langtools test failure: tools/javac/diags/CheckExamples.java > - Fix failing tier1 langtools test: tools/javac/SynchronizedClass.java > - Fix failing tier1 langtools test tools/javac/ClassFileModifiers/ClassModifiers.java > - Fix failing tier1 langtools test: tools/javap/TestSuperclass.java > - Fix tier1 failures in test/langtools/tools/javac/classfiles/attributes/innerclasses > - Fix failing tier3 test java/lang/instrument/IsModifiableClassAgent.java > - ... and 1 more: https://git.openjdk.java.net/valhalla/compare/bfec8811...fdc376eb Foo.ref is a type projection, it does not change the behavior of the class at runtime. So X.ref (or X.val) is only a valid operation on a value class, a class which at runtime will not use its address when == is called by example. String.ref or String.val does not exist, otherwise it means that == should have different behaviors at runtime depending on the type that store the string. ------------- PR: https://git.openjdk.java.net/valhalla/pull/688 From dsimms at openjdk.java.net Mon May 16 14:26:19 2022 From: dsimms at openjdk.java.net (David Simms) Date: Mon, 16 May 2022 14:26:19 GMT Subject: [lworld] RFR: 8286491: Withdraw ValueObject and IdentityObject and introduce value and identity class modifiers [v10] In-Reply-To: References: Message-ID: On Mon, 16 May 2022 12:09:51 GMT, Julian Waters wrote: > Bit of a weird question, but considering `SomeObject.val` might end up as a language feature in the future (https://mail.openjdk.java.net/pipermail/valhalla-spec-observers/2022-May/001934.html) and that we already have the ref keyword reserved, would it be worth considering reusing those keywords for modifying the "identitiness" of an object instead of having an extra keyword? "valhalla-spec-observers" mailing list would be a more appropriate forum. ------------- PR: https://git.openjdk.java.net/valhalla/pull/688 From dsimms at openjdk.java.net Mon May 16 14:39:21 2022 From: dsimms at openjdk.java.net (David Simms) Date: Mon, 16 May 2022 14:39:21 GMT Subject: [lworld] RFR: 8286491: Withdraw ValueObject and IdentityObject and introduce value and identity class modifiers [v10] In-Reply-To: References: Message-ID: <0yQS52CkwlMkEJzeg8TXm2Brjv7S-ZfBtLqs3gaiPUc=.15b73c8a-c831-4b43-a55a-3f0f06975098@github.com> On Mon, 16 May 2022 08:32:38 GMT, Srikanth Adayapalam wrote: >> Changes to javac, hotspot runtime, core libs and asmtools sources and tests > > Srikanth Adayapalam 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 11 additional commits since the last revision: > > - Merge branch 'lworld' into JDK-8286491 > - Fix langtools tier1 test failure: tools/javac/platform/createsymbols/CreateSymbolsTest.java > - Fix failure in tier1 langtools test: tools/javac/processing/model/completionfailure/NoAbortForBadClassFile.java > - Fix typo spotted in code review > - Fix tier1 langtools test failure: tools/javac/diags/CheckExamples.java > - Fix failing tier1 langtools test: tools/javac/SynchronizedClass.java > - Fix failing tier1 langtools test tools/javac/ClassFileModifiers/ClassModifiers.java > - Fix failing tier1 langtools test: tools/javap/TestSuperclass.java > - Fix tier1 failures in test/langtools/tools/javac/classfiles/attributes/innerclasses > - Fix failing tier3 test java/lang/instrument/IsModifiableClassAgent.java > - ... and 1 more: https://git.openjdk.java.net/valhalla/compare/20aad301...fdc376eb Adjust ACC_CFETest (doesn't remove ACC_PERMITS_VALUE, that's follow work) [ACC_CFETest.zip](https://github.com/openjdk/valhalla/files/8700971/ACC_CFETest.zip) ------------- PR: https://git.openjdk.java.net/valhalla/pull/688 From sadayapalam at openjdk.java.net Tue May 17 04:53:53 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Tue, 17 May 2022 04:53:53 GMT Subject: [lworld] RFR: 8286491: Withdraw ValueObject and IdentityObject and introduce value and identity class modifiers [v11] In-Reply-To: References: Message-ID: > Changes to javac, hotspot runtime, core libs and asmtools sources and tests Srikanth Adayapalam has updated the pull request incrementally with one additional commit since the last revision: Remove references to obsolete top interfaces types in microbenchmark framework ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/688/files - new: https://git.openjdk.java.net/valhalla/pull/688/files/fdc376eb..be6429b5 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=688&range=10 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=688&range=09-10 Stats: 98 lines in 2 files changed: 0 ins; 98 del; 0 mod Patch: https://git.openjdk.java.net/valhalla/pull/688.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/688/head:pull/688 PR: https://git.openjdk.java.net/valhalla/pull/688 From sadayapalam at openjdk.java.net Tue May 17 04:55:46 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Tue, 17 May 2022 04:55:46 GMT Subject: [lworld] RFR: 8286491: Withdraw ValueObject and IdentityObject and introduce value and identity class modifiers [v12] In-Reply-To: References: Message-ID: > Changes to javac, hotspot runtime, core libs and asmtools sources and tests Srikanth Adayapalam has updated the pull request incrementally with one additional commit since the last revision: Fix for failing tier1 runtime test: test/hotspot/jtreg/runtime/valhalla/inlinetypes/classfileparser/ACC_CFETest.java ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/688/files - new: https://git.openjdk.java.net/valhalla/pull/688/files/be6429b5..32c0e229 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=688&range=11 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=688&range=10-11 Stats: 352 lines in 2 files changed: 4 ins; 315 del; 33 mod Patch: https://git.openjdk.java.net/valhalla/pull/688.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/688/head:pull/688 PR: https://git.openjdk.java.net/valhalla/pull/688 From sadayapalam at openjdk.java.net Tue May 17 05:03:07 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Tue, 17 May 2022 05:03:07 GMT Subject: [lworld] RFR: 8286491: Withdraw ValueObject and IdentityObject and introduce value and identity class modifiers [v12] In-Reply-To: References: Message-ID: On Tue, 17 May 2022 04:55:46 GMT, Srikanth Adayapalam wrote: >> Changes to javac, hotspot runtime, core libs and asmtools sources and tests > > Srikanth Adayapalam has updated the pull request incrementally with one additional commit since the last revision: > > Fix for failing tier1 runtime test: test/hotspot/jtreg/runtime/valhalla/inlinetypes/classfileparser/ACC_CFETest.java The best way to take forward this PR was discussed elsewhere and it was agreed that given the number of failing tests is small, we can go ahead and integrate this, Each component will independently review the changes, make suitable additional changes and fix the remaining failures. Proceeding to integrate on that basis. ------------- PR: https://git.openjdk.java.net/valhalla/pull/688 From sadayapalam at openjdk.java.net Tue May 17 05:23:54 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Tue, 17 May 2022 05:23:54 GMT Subject: [lworld] Integrated: 8286491: Withdraw ValueObject and IdentityObject and introduce value and identity class modifiers In-Reply-To: References: Message-ID: On Tue, 10 May 2022 14:28:16 GMT, Srikanth Adayapalam wrote: > Changes to javac, hotspot runtime, core libs and asmtools sources and tests This pull request has now been integrated. Changeset: d70e7e49 Author: Srikanth Adayapalam URL: https://git.openjdk.java.net/valhalla/commit/d70e7e4920705e5d088e89aea1039eba2fa751a9 Stats: 1766 lines in 95 files changed: 240 ins; 1123 del; 403 mod 8286491: Withdraw ValueObject and IdentityObject and introduce value and identity class modifiers 8237952: [lworld] Examine Class::getAnnotatedInterfaces and other annotation-related API Co-authored-by: David Simms ------------- PR: https://git.openjdk.java.net/valhalla/pull/688 From dsimms at openjdk.java.net Tue May 17 10:19:34 2022 From: dsimms at openjdk.java.net (David Simms) Date: Tue, 17 May 2022 10:19:34 GMT Subject: [lworld] RFR: 8286864: [lworld] runtime/valhalla/inlinetypes/testSupers/TestSuperClasses.java refers to IdentityObject interface Message-ID: Removed IdentityObject and realigned access flags ------------- Commit messages: - 8286864: [lworld] runtime/valhalla/inlinetypes/testSupers/TestSuperClasses.java refers to IdentityObject interface Changes: https://git.openjdk.java.net/valhalla/pull/689/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=689&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8286864 Stats: 875 lines in 4 files changed: 0 ins; 856 del; 19 mod Patch: https://git.openjdk.java.net/valhalla/pull/689.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/689/head:pull/689 PR: https://git.openjdk.java.net/valhalla/pull/689 From dsimms at openjdk.java.net Tue May 17 12:20:49 2022 From: dsimms at openjdk.java.net (David Simms) Date: Tue, 17 May 2022 12:20:49 GMT Subject: [lworld] RFR: 8286864: [lworld] runtime/valhalla/inlinetypes/testSupers/TestSuperClasses.java refers to IdentityObject interface [v2] In-Reply-To: References: Message-ID: > Removed IdentityObject and realigned access flags David Simms has updated the pull request incrementally with one additional commit since the last revision: Add Value Object test cases ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/689/files - new: https://git.openjdk.java.net/valhalla/pull/689/files/dc5d54f1..544fb5a0 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=689&range=01 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=689&range=00-01 Stats: 1377 lines in 2 files changed: 1326 ins; 0 del; 51 mod Patch: https://git.openjdk.java.net/valhalla/pull/689.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/689/head:pull/689 PR: https://git.openjdk.java.net/valhalla/pull/689 From dsimms at openjdk.java.net Tue May 17 13:23:49 2022 From: dsimms at openjdk.java.net (David Simms) Date: Tue, 17 May 2022 13:23:49 GMT Subject: [lworld] RFR: 8286877: [lworld] remove interface injection tests runtime/valhalla/inlinetypes/identityObject/TestIdentityObject.java & runtime/valhalla/inlinetypes/primitiveObject/TestPrimitiveObject.java Message-ID: Removed: * runtime/valhalla/inlinetypes/identityObject * runtime/valhalla/inlinetypes/primitiveObject ------------- Commit messages: - 8286877: [lworld] remove interface injection tests runtime/valhalla/inlinetypes/identityObject/TestIdentityObject.java & runtime/valhalla/inlinetypes/primitiveObject/TestPrimitiveObject.java Changes: https://git.openjdk.java.net/valhalla/pull/690/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=690&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8286877 Stats: 450 lines in 18 files changed: 0 ins; 450 del; 0 mod Patch: https://git.openjdk.java.net/valhalla/pull/690.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/690/head:pull/690 PR: https://git.openjdk.java.net/valhalla/pull/690 From dsimms at openjdk.java.net Wed May 18 05:11:16 2022 From: dsimms at openjdk.java.net (David Simms) Date: Wed, 18 May 2022 05:11:16 GMT Subject: [lworld] Integrated: 8286877: [lworld] remove interface injection tests runtime/valhalla/inlinetypes/identityObject/TestIdentityObject.java & runtime/valhalla/inlinetypes/primitiveObject/TestPrimitiveObject.java In-Reply-To: References: Message-ID: On Tue, 17 May 2022 13:17:21 GMT, David Simms wrote: > Removed: > * runtime/valhalla/inlinetypes/identityObject > * runtime/valhalla/inlinetypes/primitiveObject This pull request has now been integrated. Changeset: 104d6d9f Author: David Simms URL: https://git.openjdk.java.net/valhalla/commit/104d6d9f80cbc4f8edd701d008f6250073e86d53 Stats: 450 lines in 18 files changed: 0 ins; 450 del; 0 mod 8286877: [lworld] remove interface injection tests runtime/valhalla/inlinetypes/identityObject/TestIdentityObject.java & runtime/valhalla/inlinetypes/primitiveObject/TestPrimitiveObject.java ------------- PR: https://git.openjdk.java.net/valhalla/pull/690 From dsimms at openjdk.java.net Wed May 18 05:13:22 2022 From: dsimms at openjdk.java.net (David Simms) Date: Wed, 18 May 2022 05:13:22 GMT Subject: [lworld] Integrated: 8286864: [lworld] runtime/valhalla/inlinetypes/testSupers/TestSuperClasses.java refers to IdentityObject interface In-Reply-To: References: Message-ID: On Tue, 17 May 2022 10:12:59 GMT, David Simms wrote: > Removed IdentityObject and realigned access flags This pull request has now been integrated. Changeset: 4165ca01 Author: David Simms URL: https://git.openjdk.java.net/valhalla/commit/4165ca014805dd3f46bff6320f4780c1d36fac4a Stats: 809 lines in 4 files changed: 542 ins; 72 del; 195 mod 8286864: [lworld] runtime/valhalla/inlinetypes/testSupers/TestSuperClasses.java refers to IdentityObject interface ------------- PR: https://git.openjdk.java.net/valhalla/pull/689 From sadayapalam at openjdk.java.net Wed May 18 05:46:04 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Wed, 18 May 2022 05:46:04 GMT Subject: [lworld] Integrated: 8286807: Revert experimental special treatment given to new Object() instantiation. Message-ID: Revert the changes made for: JDK-8237073 - Need special handling of jlO constructor invocation JDK-8281026 - Allow for compiler.note.cant.instantiate.object.directly to be suppressed via an option JDK-8280456 - javac should allow compilation with abstract java.lang.Object class The revert of JDK-8283573 - a hotspot fix for "Make Object an abstract class" will need to happen on its own. The current commit makes j.l.O concrete again, but leaves in the method java.util.Objects.newIdentity() and the class java.lang.Identity intact and these will have to be removed by a separate follow up patch from the core libraries component. ------------- Commit messages: - 8286807: Revert experimental special treatment given to new Object() instantiation. Changes: https://git.openjdk.java.net/valhalla/pull/691/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=691&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8286807 Stats: 188 lines in 45 files changed: 0 ins; 129 del; 59 mod Patch: https://git.openjdk.java.net/valhalla/pull/691.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/691/head:pull/691 PR: https://git.openjdk.java.net/valhalla/pull/691 From sadayapalam at openjdk.java.net Wed May 18 05:46:05 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Wed, 18 May 2022 05:46:05 GMT Subject: [lworld] Integrated: 8286807: Revert experimental special treatment given to new Object() instantiation. In-Reply-To: References: Message-ID: On Wed, 18 May 2022 05:38:37 GMT, Srikanth Adayapalam wrote: > Revert the changes made for: > JDK-8237073 - Need special handling of jlO constructor invocation > JDK-8281026 - Allow for compiler.note.cant.instantiate.object.directly to be suppressed via an option > JDK-8280456 - javac should allow compilation with abstract java.lang.Object class > > The revert of JDK-8283573 - a hotspot fix for "Make Object an abstract class" will need to happen on its own. > > The current commit makes j.l.O concrete again, but leaves in the method java.util.Objects.newIdentity() and the class java.lang.Identity intact and these will have to be removed by a separate follow up patch from the core libraries component. This pull request has now been integrated. Changeset: b4f0a6e3 Author: Srikanth Adayapalam URL: https://git.openjdk.java.net/valhalla/commit/b4f0a6e327213d76b8a86e3ad648747d842cc80e Stats: 188 lines in 45 files changed: 0 ins; 129 del; 59 mod 8286807: Revert experimental special treatment given to new Object() instantiation. ------------- PR: https://git.openjdk.java.net/valhalla/pull/691 From rriggs at openjdk.java.net Thu May 19 16:00:40 2022 From: rriggs at openjdk.java.net (Roger Riggs) Date: Thu, 19 May 2022 16:00:40 GMT Subject: [lworld] RFR: 8287030: Remove references to Objects.newIdentity Message-ID: <-g6c0NqpIS_1TR7ShsJ7diNyKZd1Jnh_1Mpm5Jo-bkw=.de06078f-4515-47fe-99ab-afcf8e129996@github.com> `new Object()` is again a valid way to construct a simple identity object. As per the [JEP Draft Value Objects (Preview)](https://openjdk.java.net/jeps/8277163). The method `java.util.Objects.newIdentity()` is no longer needed ------------- Commit messages: - 8287030: Remove references to Objects.newIdentity Changes: https://git.openjdk.java.net/valhalla/pull/692/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=692&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8287030 Stats: 37 lines in 6 files changed: 0 ins; 29 del; 8 mod Patch: https://git.openjdk.java.net/valhalla/pull/692.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/692/head:pull/692 PR: https://git.openjdk.java.net/valhalla/pull/692 From rriggs at openjdk.java.net Thu May 19 16:00:40 2022 From: rriggs at openjdk.java.net (Roger Riggs) Date: Thu, 19 May 2022 16:00:40 GMT Subject: [lworld] RFR: 8287030: Remove references to Objects.newIdentity In-Reply-To: <-g6c0NqpIS_1TR7ShsJ7diNyKZd1Jnh_1Mpm5Jo-bkw=.de06078f-4515-47fe-99ab-afcf8e129996@github.com> References: <-g6c0NqpIS_1TR7ShsJ7diNyKZd1Jnh_1Mpm5Jo-bkw=.de06078f-4515-47fe-99ab-afcf8e129996@github.com> Message-ID: On Thu, 19 May 2022 15:53:48 GMT, Roger Riggs wrote: > `new Object()` is again a valid way to construct a simple identity object. > As per the [JEP Draft Value Objects (Preview)](https://openjdk.java.net/jeps/8277163). > > The method `java.util.Objects.newIdentity()` is no longer needed A hotspot test references Objects.newIdentity. `test/hotspot/jtreg/compiler/c2/irTests/TestStripMiningDropsSafepoint.java` Should I modify this test also? ------------- PR: https://git.openjdk.java.net/valhalla/pull/692 From fparain at openjdk.java.net Thu May 19 18:11:44 2022 From: fparain at openjdk.java.net (Frederic Parain) Date: Thu, 19 May 2022 18:11:44 GMT Subject: [lworld] RFR: 8287040: [lworld][lw4] Remove abstract Object class support from HotSpot Message-ID: <6QszthTscPlvZstvt3sOYu_orM7P-y0XamduCikpK38=.92487964-cb52-4abe-9416-010c102ba9b4@github.com> Remove HotSpot support for an abstract Object class. ------------- Commit messages: - More test fixes - Fix tests - Remove unused local variable - Merge remote-tracking branch 'upstream/lworld' into reverting_abstract_object - Removing support for abstract Object class Changes: https://git.openjdk.java.net/valhalla/pull/693/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=693&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8287040 Stats: 139 lines in 20 files changed: 0 ins; 118 del; 21 mod Patch: https://git.openjdk.java.net/valhalla/pull/693.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/693/head:pull/693 PR: https://git.openjdk.java.net/valhalla/pull/693 From mchung at openjdk.java.net Thu May 19 18:19:22 2022 From: mchung at openjdk.java.net (Mandy Chung) Date: Thu, 19 May 2022 18:19:22 GMT Subject: [lworld] RFR: 8287030: Remove references to Objects.newIdentity In-Reply-To: <-g6c0NqpIS_1TR7ShsJ7diNyKZd1Jnh_1Mpm5Jo-bkw=.de06078f-4515-47fe-99ab-afcf8e129996@github.com> References: <-g6c0NqpIS_1TR7ShsJ7diNyKZd1Jnh_1Mpm5Jo-bkw=.de06078f-4515-47fe-99ab-afcf8e129996@github.com> Message-ID: On Thu, 19 May 2022 15:53:48 GMT, Roger Riggs wrote: > `new Object()` is again a valid way to construct a simple identity object. > As per the [JEP Draft Value Objects (Preview)](https://openjdk.java.net/jeps/8277163). > > The method `java.util.Objects.newIdentity()` is no longer needed Marked as reviewed by mchung (Committer). ------------- PR: https://git.openjdk.java.net/valhalla/pull/692 From rriggs at openjdk.java.net Thu May 19 20:58:03 2022 From: rriggs at openjdk.java.net (Roger Riggs) Date: Thu, 19 May 2022 20:58:03 GMT Subject: [lworld] RFR: 8287030: Remove references to Objects.newIdentity [v2] In-Reply-To: <-g6c0NqpIS_1TR7ShsJ7diNyKZd1Jnh_1Mpm5Jo-bkw=.de06078f-4515-47fe-99ab-afcf8e129996@github.com> References: <-g6c0NqpIS_1TR7ShsJ7diNyKZd1Jnh_1Mpm5Jo-bkw=.de06078f-4515-47fe-99ab-afcf8e129996@github.com> Message-ID: > `new Object()` is again a valid way to construct a simple identity object. > As per the [JEP Draft Value Objects (Preview)](https://openjdk.java.net/jeps/8277163). > > The method `java.util.Objects.newIdentity()` is no longer needed Roger Riggs has updated the pull request incrementally with three additional commits since the last revision: - Remove call to removed test method - Merge branch '8287030-remove-newidentity' of https://github.com/RogerRiggs/valhalla into 8287030-remove-newidentity - 8287030: Remove references to Objects.newIdentity ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/692/files - new: https://git.openjdk.java.net/valhalla/pull/692/files/de29d3bc..2176cc83 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=692&range=01 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=692&range=00-01 Stats: 5 lines in 2 files changed: 0 ins; 4 del; 1 mod Patch: https://git.openjdk.java.net/valhalla/pull/692.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/692/head:pull/692 PR: https://git.openjdk.java.net/valhalla/pull/692 From dsimms at openjdk.java.net Fri May 20 13:24:17 2022 From: dsimms at openjdk.java.net (David Simms) Date: Fri, 20 May 2022 13:24:17 GMT Subject: [lworld] RFR: 8287040: [lworld][lw4] Remove abstract Object class support from HotSpot In-Reply-To: <6QszthTscPlvZstvt3sOYu_orM7P-y0XamduCikpK38=.92487964-cb52-4abe-9416-010c102ba9b4@github.com> References: <6QszthTscPlvZstvt3sOYu_orM7P-y0XamduCikpK38=.92487964-cb52-4abe-9416-010c102ba9b4@github.com> Message-ID: On Thu, 19 May 2022 18:03:50 GMT, Frederic Parain wrote: > Remove HotSpot support for an abstract Object class. Marked as reviewed by dsimms (Committer). ------------- PR: https://git.openjdk.java.net/valhalla/pull/693 From fparain at openjdk.java.net Fri May 20 14:09:18 2022 From: fparain at openjdk.java.net (Frederic Parain) Date: Fri, 20 May 2022 14:09:18 GMT Subject: [lworld] Integrated: 8287040: [lworld][lw4] Remove abstract Object class support from HotSpot In-Reply-To: <6QszthTscPlvZstvt3sOYu_orM7P-y0XamduCikpK38=.92487964-cb52-4abe-9416-010c102ba9b4@github.com> References: <6QszthTscPlvZstvt3sOYu_orM7P-y0XamduCikpK38=.92487964-cb52-4abe-9416-010c102ba9b4@github.com> Message-ID: On Thu, 19 May 2022 18:03:50 GMT, Frederic Parain wrote: > Remove HotSpot support for an abstract Object class. This pull request has now been integrated. Changeset: e300a857 Author: Frederic Parain URL: https://git.openjdk.java.net/valhalla/commit/e300a857e9d46fb9f4dc65bee5766eadb8d21569 Stats: 139 lines in 20 files changed: 0 ins; 118 del; 21 mod 8287040: [lworld][lw4] Remove abstract Object class support from HotSpot Reviewed-by: dsimms ------------- PR: https://git.openjdk.java.net/valhalla/pull/693 From vromero at openjdk.java.net Fri May 20 14:43:25 2022 From: vromero at openjdk.java.net (Vicente Romero) Date: Fri, 20 May 2022 14:43:25 GMT Subject: RFR: addressing several issues in the implementation of universal tvars [v2] In-Reply-To: References: Message-ID: > Last review iteration found several issues in the current implementation, addressing them here Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: fixing bugs in unchecked conversions ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/684/files - new: https://git.openjdk.java.net/valhalla/pull/684/files/258bffa6..017aca21 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=684&range=01 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=684&range=00-01 Stats: 239 lines in 11 files changed: 178 ins; 36 del; 25 mod Patch: https://git.openjdk.java.net/valhalla/pull/684.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/684/head:pull/684 PR: https://git.openjdk.java.net/valhalla/pull/684 From vromero at openjdk.java.net Fri May 20 14:46:30 2022 From: vromero at openjdk.java.net (Vicente Romero) Date: Fri, 20 May 2022 14:46:30 GMT Subject: RFR: addressing several issues in the implementation of universal tvars [v3] In-Reply-To: References: Message-ID: <14AVBtJx6muonHjoLIwQTaorePbwCdlpwoFW2dMitn0=.a325bdd2-6e7f-43e9-a78f-68bc525bc7cd@github.com> > Last review iteration found several issues in the current implementation, addressing them here Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: removing files ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/684/files - new: https://git.openjdk.java.net/valhalla/pull/684/files/017aca21..9e0e224a Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=684&range=02 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=684&range=01-02 Stats: 236 lines in 2 files changed: 0 ins; 236 del; 0 mod Patch: https://git.openjdk.java.net/valhalla/pull/684.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/684/head:pull/684 PR: https://git.openjdk.java.net/valhalla/pull/684 From vromero at openjdk.java.net Fri May 20 14:50:45 2022 From: vromero at openjdk.java.net (Vicente Romero) Date: Fri, 20 May 2022 14:50:45 GMT Subject: RFR: addressing several issues in the implementation of universal tvars [v4] In-Reply-To: References: Message-ID: > Last review iteration found several issues in the current implementation, addressing them here Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: removing commented code ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/684/files - new: https://git.openjdk.java.net/valhalla/pull/684/files/9e0e224a..a3cc93a2 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=684&range=03 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=684&range=02-03 Stats: 3 lines in 1 file changed: 0 ins; 3 del; 0 mod Patch: https://git.openjdk.java.net/valhalla/pull/684.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/684/head:pull/684 PR: https://git.openjdk.java.net/valhalla/pull/684 From rriggs at openjdk.java.net Fri May 20 15:59:57 2022 From: rriggs at openjdk.java.net (Roger Riggs) Date: Fri, 20 May 2022 15:59:57 GMT Subject: [lworld] RFR: 8287030: Remove references to Objects.newIdentity [v3] In-Reply-To: <-g6c0NqpIS_1TR7ShsJ7diNyKZd1Jnh_1Mpm5Jo-bkw=.de06078f-4515-47fe-99ab-afcf8e129996@github.com> References: <-g6c0NqpIS_1TR7ShsJ7diNyKZd1Jnh_1Mpm5Jo-bkw=.de06078f-4515-47fe-99ab-afcf8e129996@github.com> Message-ID: > `new Object()` is again a valid way to construct a simple identity object. > As per the [JEP Draft Value Objects (Preview)](https://openjdk.java.net/jeps/8277163). > > The method `java.util.Objects.newIdentity()` is no longer needed Roger Riggs has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains five commits: - Merge - Remove call to removed test method - Merge branch '8287030-remove-newidentity' of https://github.com/RogerRiggs/valhalla into 8287030-remove-newidentity - 8287030: Remove references to Objects.newIdentity - 8287030: Remove references to Objects.newIdentity ------------- Changes: https://git.openjdk.java.net/valhalla/pull/692/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=692&range=02 Stats: 42 lines in 7 files changed: 0 ins; 33 del; 9 mod Patch: https://git.openjdk.java.net/valhalla/pull/692.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/692/head:pull/692 PR: https://git.openjdk.java.net/valhalla/pull/692 From rriggs at openjdk.java.net Fri May 20 16:39:16 2022 From: rriggs at openjdk.java.net (Roger Riggs) Date: Fri, 20 May 2022 16:39:16 GMT Subject: [lworld] Integrated: 8287030: Remove references to Objects.newIdentity In-Reply-To: <-g6c0NqpIS_1TR7ShsJ7diNyKZd1Jnh_1Mpm5Jo-bkw=.de06078f-4515-47fe-99ab-afcf8e129996@github.com> References: <-g6c0NqpIS_1TR7ShsJ7diNyKZd1Jnh_1Mpm5Jo-bkw=.de06078f-4515-47fe-99ab-afcf8e129996@github.com> Message-ID: On Thu, 19 May 2022 15:53:48 GMT, Roger Riggs wrote: > `new Object()` is again a valid way to construct a simple identity object. > As per the [JEP Draft Value Objects (Preview)](https://openjdk.java.net/jeps/8277163). > > The method `java.util.Objects.newIdentity()` is no longer needed This pull request has now been integrated. Changeset: ed449314 Author: Roger Riggs URL: https://git.openjdk.java.net/valhalla/commit/ed4493144f6d1953dde4897a1b14fe331aa41817 Stats: 42 lines in 7 files changed: 0 ins; 33 del; 9 mod 8287030: Remove references to Objects.newIdentity Reviewed-by: mchung ------------- PR: https://git.openjdk.java.net/valhalla/pull/692 From duke at openjdk.java.net Fri May 20 16:59:19 2022 From: duke at openjdk.java.net (ExE Boss) Date: Fri, 20 May 2022 16:59:19 GMT Subject: RFR: addressing several issues in the implementation of universal tvars [v4] In-Reply-To: References: Message-ID: On Fri, 20 May 2022 14:50:45 GMT, Vicente Romero wrote: >> Last review iteration found several issues in the current implementation, addressing them here > > Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: > > removing commented code Maybe instead?of repeated?ternaries, this?could?use a?helper?method for?the?`boolean` to?`IsConvertibleResult`?conversion: src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java line 606: > 604: CONVERTIBLE, > 605: CONVERTIBLE_REF_PROJECTION, > 606: NOT_CONVERTIBLE Suggestion: NOT_CONVERTIBLE; static IsConvertibleResult of(boolean isConvertible) { return convertible ? CONVERTIBLE : NOT_COVERTIBLE; } static IsConvertibleResult ofRefProjection(boolean isConvertible) { return convertible ? CONVERTIBLE_REF_PROJECTION : NOT_COVERTIBLE; } src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java line 651: > 649: return IsConvertibleResult.CONVERTIBLE_REF_PROJECTION; > 650: } > 651: return result ? IsConvertibleResult.CONVERTIBLE : IsConvertibleResult.NOT_CONVERTIBLE; Suggestion: return IsConvertibleResult.of(result); src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java line 671: > 669: warn.warn(LintCategory.UNCHECKED); > 670: } > 671: return result ? IsConvertibleResult.CONVERTIBLE_REF_PROJECTION : IsConvertibleResult.NOT_CONVERTIBLE; Suggestion: return IsConvertibleResult.ofRefProjection(result); src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java line 680: > 678: isSubtype(t, boxedTypeOrType(s)) : > 679: isSubtype(boxedTypeOrType(t), s); > 680: return result ? IsConvertibleResult.CONVERTIBLE : IsConvertibleResult.NOT_CONVERTIBLE; Suggestion: return IsConvertibleResult.of(tUndet ? isSubtype(t, boxedTypeOrType(s)) : isSubtype(boxedTypeOrType(t), s)); src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java line 686: > 684: ? isSubtype(boxedClass(t).type, s) > 685: : isSubtype(unboxedType(t), s); > 686: return result ? IsConvertibleResult.CONVERTIBLE : IsConvertibleResult.NOT_CONVERTIBLE; Suggestion: return IsConvertibleResult.of(tPrimitive ? isSubtype(boxedClass(t).type, s) : isSubtype(unboxedType(t), s)); ------------- PR: https://git.openjdk.java.net/valhalla/pull/684 From vromero at openjdk.java.net Fri May 20 21:22:18 2022 From: vromero at openjdk.java.net (Vicente Romero) Date: Fri, 20 May 2022 21:22:18 GMT Subject: RFR: addressing several issues in the implementation of universal tvars [v4] In-Reply-To: References: Message-ID: <0sW2W9LZH6IlPzulUUdF0mawO5DlMyxfRLWJaNEq_0g=.c352704f-0657-42c4-8070-7daf99c7aa9d@github.com> On Fri, 20 May 2022 16:49:36 GMT, ExE Boss wrote: >> Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: >> >> removing commented code > > src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java line 680: > >> 678: isSubtype(t, boxedTypeOrType(s)) : >> 679: isSubtype(boxedTypeOrType(t), s); >> 680: return result ? IsConvertibleResult.CONVERTIBLE : IsConvertibleResult.NOT_CONVERTIBLE; > > Suggestion: > > return IsConvertibleResult.of(tUndet ? > isSubtype(t, boxedTypeOrType(s)) : > isSubtype(boxedTypeOrType(t), s)); yep, could be thanks for the suggestion ------------- PR: https://git.openjdk.java.net/valhalla/pull/684 From vromero at openjdk.java.net Sat May 21 01:23:28 2022 From: vromero at openjdk.java.net (Vicente Romero) Date: Sat, 21 May 2022 01:23:28 GMT Subject: RFR: addressing several issues in the implementation of universal tvars [v5] In-Reply-To: References: Message-ID: > Last review iteration found several issues in the current implementation, addressing them here Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: missed a case in unchecked conversions ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/684/files - new: https://git.openjdk.java.net/valhalla/pull/684/files/a3cc93a2..d005964b Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=684&range=04 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=684&range=03-04 Stats: 25 lines in 2 files changed: 21 ins; 0 del; 4 mod Patch: https://git.openjdk.java.net/valhalla/pull/684.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/684/head:pull/684 PR: https://git.openjdk.java.net/valhalla/pull/684 From mcimadamore at openjdk.java.net Mon May 23 09:12:23 2022 From: mcimadamore at openjdk.java.net (Maurizio Cimadamore) Date: Mon, 23 May 2022 09:12:23 GMT Subject: RFR: addressing several issues in the implementation of universal tvars [v5] In-Reply-To: References: Message-ID: On Sat, 21 May 2022 01:23:28 GMT, Vicente Romero wrote: >> Last review iteration found several issues in the current implementation, addressing them here > > Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: > > missed a case in unchecked conversions src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java line 1824: > 1822: return true; > 1823: } > 1824: return (allowUniversalTVars && This extra check feels outside the spirit of the rules discussed in https://openjdk.java.net/jeps/8261529. That is, I'd expect type containment to recurse using `isBoundedBy` instead of `isSubtype` (as the first branch of this code does). ------------- PR: https://git.openjdk.java.net/valhalla/pull/684 From mcimadamore at openjdk.java.net Mon May 23 09:12:24 2022 From: mcimadamore at openjdk.java.net (Maurizio Cimadamore) Date: Mon, 23 May 2022 09:12:24 GMT Subject: RFR: addressing several issues in the implementation of universal tvars [v5] In-Reply-To: References: Message-ID: On Mon, 23 May 2022 08:52:00 GMT, Maurizio Cimadamore wrote: >> Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: >> >> missed a case in unchecked conversions > > src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java line 1824: > >> 1822: return true; >> 1823: } >> 1824: return (allowUniversalTVars && > > This extra check feels outside the spirit of the rules discussed in https://openjdk.java.net/jeps/8261529. > That is, I'd expect type containment to recurse using `isBoundedBy` instead of `isSubtype` (as the first branch of this code does). I've been doing some scribbling - is the above change required because of code like this: static class Box<__universal X> { } static primitive class Atom { } void test() { Box val = null; Box ref = null; val = ref; // <------ } ``` With an older compiler I get an error here. Indeed, this `val = ref` conversion cannot be explained in terms of the "isBoundedBy" rule, at least not as defined in the JEP draft: Box <: Box --> Atom.ref <= ? extends Atom --> Atom.ref is-bounded-by Atom But here we hit a roadblock: is-bounded-by doesn't apply in this case: We now say that a type S is bounded by a type T if any of the following is true: [...] S is a primitive class type whose corresponding reference type is bounded by T; or But `S` is not a primitive class type here - only a reference projection of a primitive class type. So this rule doesn't apply and the type containment fails (and hence subtyping fails). It seems like the code now rectifies this by trying `isBoundedBy` first and, if that fails, it uses a type conversion instead. But this feels like a big departure, with subtyping now depending on type conversion. If we want to support the above example, then the `isBoundedBy` routine needs to be updated to deal with this - otherwise other places using `isBoundedBy` will fail in a similar way, e.g. well-formedness of generic types: class Foo { ... } Foo // is this a legal type? ------------- PR: https://git.openjdk.java.net/valhalla/pull/684 From mcimadamore at openjdk.java.net Mon May 23 09:20:19 2022 From: mcimadamore at openjdk.java.net (Maurizio Cimadamore) Date: Mon, 23 May 2022 09:20:19 GMT Subject: RFR: addressing several issues in the implementation of universal tvars [v5] In-Reply-To: References: Message-ID: On Mon, 23 May 2022 09:10:10 GMT, Maurizio Cimadamore wrote: >> src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java line 1824: >> >>> 1822: return true; >>> 1823: } >>> 1824: return (allowUniversalTVars && >> >> This extra check feels outside the spirit of the rules discussed in https://openjdk.java.net/jeps/8261529. >> That is, I'd expect type containment to recurse using `isBoundedBy` instead of `isSubtype` (as the first branch of this code does). > > I've been doing some scribbling - is the above change required because of code like this: > > > static class Box<__universal X> { } > static primitive class Atom { } > > void test() { > Box val = null; > Box ref = null; > val = ref; // <------ > } > ``` > > With an older compiler I get an error here. Indeed, this `val = ref` conversion cannot be explained in terms of the "isBoundedBy" rule, at least not as defined in the JEP draft: > > Box <: Box > --> Atom.ref <= ? extends Atom > --> Atom.ref is-bounded-by Atom > > But here we hit a roadblock: is-bounded-by doesn't apply in this case: > > > We now say that a type S is bounded by a type T if any of the following is true: > [...] > S is a primitive class type whose corresponding reference type is bounded by T; or > > But `S` is not a primitive class type here - only a reference projection of a primitive class type. So this rule doesn't apply and the type containment fails (and hence subtyping fails). > > It seems like the code now rectifies this by trying `isBoundedBy` first and, if that fails, it uses a type conversion instead. But this feels like a big departure, with subtyping now depending on type conversion. If we want to support the above example, then the `isBoundedBy` routine needs to be updated to deal with this - otherwise other places using `isBoundedBy` will fail in a similar way, e.g. well-formedness of generic types: > > > class Foo { ... } > > Foo // is this a legal type? But, to be clear, we should first make sure that this is the feature we want. IMHO it is not: `Box` is a wildcard type that contains only one witness: `Atom`. So, subtyping-wise, I don't think it is ok to conclude that `Box` <: `Box`, because `Atom.ref` is not in the "span" of the wildcard type on the RHS of the subtyping check. ------------- PR: https://git.openjdk.java.net/valhalla/pull/684 From mcimadamore at openjdk.java.net Mon May 23 09:24:08 2022 From: mcimadamore at openjdk.java.net (Maurizio Cimadamore) Date: Mon, 23 May 2022 09:24:08 GMT Subject: RFR: addressing several issues in the implementation of universal tvars [v5] In-Reply-To: References: Message-ID: On Mon, 23 May 2022 09:16:44 GMT, Maurizio Cimadamore wrote: >> I've been doing some scribbling - is the above change required because of code like this: >> >> >> static class Box<__universal X> { } >> static primitive class Atom { } >> >> void test() { >> Box val = null; >> Box ref = null; >> val = ref; // <------ >> } >> ``` >> >> With an older compiler I get an error here. Indeed, this `val = ref` conversion cannot be explained in terms of the "isBoundedBy" rule, at least not as defined in the JEP draft: >> >> Box <: Box >> --> Atom.ref <= ? extends Atom >> --> Atom.ref is-bounded-by Atom >> >> But here we hit a roadblock: is-bounded-by doesn't apply in this case: >> >> >> We now say that a type S is bounded by a type T if any of the following is true: >> [...] >> S is a primitive class type whose corresponding reference type is bounded by T; or >> >> But `S` is not a primitive class type here - only a reference projection of a primitive class type. So this rule doesn't apply and the type containment fails (and hence subtyping fails). >> >> It seems like the code now rectifies this by trying `isBoundedBy` first and, if that fails, it uses a type conversion instead. But this feels like a big departure, with subtyping now depending on type conversion. If we want to support the above example, then the `isBoundedBy` routine needs to be updated to deal with this - otherwise other places using `isBoundedBy` will fail in a similar way, e.g. well-formedness of generic types: >> >> >> class Foo { ... } >> >> Foo // is this a legal type? > > But, to be clear, we should first make sure that this is the feature we want. IMHO it is not: `Box` is a wildcard type that contains only one witness: `Atom`. So, subtyping-wise, I don't think it is ok to conclude that `Box` <: `Box`, because `Atom.ref` is not in the "span" of the wildcard type on the RHS of the subtyping check. And, this is made messier by the fact that: val = ref In my example does not trigger a subtying test. It triggers an assignment conversion, which in turn can use the new form of parameterized conversions. ------------- PR: https://git.openjdk.java.net/valhalla/pull/684 From vromero at openjdk.java.net Mon May 23 21:12:23 2022 From: vromero at openjdk.java.net (Vicente Romero) Date: Mon, 23 May 2022 21:12:23 GMT Subject: RFR: addressing several issues in the implementation of universal tvars [v5] In-Reply-To: References: Message-ID: On Mon, 23 May 2022 09:20:51 GMT, Maurizio Cimadamore wrote: >> But, to be clear, we should first make sure that this is the feature we want. IMHO it is not: `Box` is a wildcard type that contains only one witness: `Atom`. So, subtyping-wise, I don't think it is ok to conclude that `Box` <: `Box`, because `Atom.ref` is not in the "span" of the wildcard type on the RHS of the subtyping check. > > And, this is made messier by the fact that: > > > val = ref > > > In my example does not trigger a subtying test. It triggers an assignment conversion, which in turn can use the new form of parameterized conversions. > This extra check feels outside the spirit of the rules discussed in https://openjdk.java.net/jeps/8261529. That is, I'd expect type containment to recurse using `isBoundedBy` instead of `isSubtype` (as the first branch of this code does). just to provide some context, the reason that supported in my view using this extra check comes from the universal tvars jep in particular where it says: Changing a wildcard bound in a parameterized type from a universal type-variable type (T) or a primitive class type (Point) to its reference type (T.ref, Point.ref), or vice versa (where the conversion is not already allowed by subtyping): this is why on a failure of isBoundedBy which at the end is based on subtyping I tried this more general relation. Although I realize from the additional points you mentioned here that these opens questions in other fronts like type well-formedness. ------------- PR: https://git.openjdk.java.net/valhalla/pull/684 From sadayapalam at openjdk.java.net Tue May 24 09:34:32 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Tue, 24 May 2022 09:34:32 GMT Subject: [lworld] Integrated: 8287203: Synthetic concrete classes generated by javac are lacking the ACC_IDENTITY bit. Message-ID: Ensure that javac synthesized concrete identity classes carry the ACC_IDENTITY bit. ------------- Commit messages: - 8287203: Synthetic concrete classes generated by javac are lacking the ACC_IDENTITY bit. Changes: https://git.openjdk.java.net/valhalla/pull/695/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=695&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8287203 Stats: 10 lines in 3 files changed: 5 ins; 0 del; 5 mod Patch: https://git.openjdk.java.net/valhalla/pull/695.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/695/head:pull/695 PR: https://git.openjdk.java.net/valhalla/pull/695 From sadayapalam at openjdk.java.net Tue May 24 09:34:32 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Tue, 24 May 2022 09:34:32 GMT Subject: [lworld] Integrated: 8287203: Synthetic concrete classes generated by javac are lacking the ACC_IDENTITY bit. In-Reply-To: References: Message-ID: On Tue, 24 May 2022 09:27:36 GMT, Srikanth Adayapalam wrote: > Ensure that javac synthesized concrete identity classes carry the ACC_IDENTITY bit. This pull request has now been integrated. Changeset: 68ab1214 Author: Srikanth Adayapalam URL: https://git.openjdk.java.net/valhalla/commit/68ab121490e22e992a74332f0158364598313465 Stats: 10 lines in 3 files changed: 5 ins; 0 del; 5 mod 8287203: Synthetic concrete classes generated by javac are lacking the ACC_IDENTITY bit. ------------- PR: https://git.openjdk.java.net/valhalla/pull/695 From mcimadamore at openjdk.java.net Tue May 24 10:42:08 2022 From: mcimadamore at openjdk.java.net (Maurizio Cimadamore) Date: Tue, 24 May 2022 10:42:08 GMT Subject: RFR: addressing several issues in the implementation of universal tvars [v5] In-Reply-To: References: Message-ID: On Sat, 21 May 2022 01:23:28 GMT, Vicente Romero wrote: >> Last review iteration found several issues in the current implementation, addressing them here > > Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: > > missed a case in unchecked conversions As discussed offline, rather than chasing individual bugs, a better approach might be *not* to use "loose" version of subtyping and type containment checks to issue warnings. Instead, the code for `isSubtypeUnchecked(S, T)` could work as follows: 1. first check if S <: T - if so, return `true`, otherwise 2. lift S to the same base type as T, using `Types.asSuper`, call the lifted type `S'`, then 3. if `S'` is raw, apply standard unchecked conversion, otherwise 4. perform a structural comparison between `S'` and `T` - if the two types are identical up to `.val`/`.ref` differences, issue an unchecked warning, and return `true`, otherwise return `false`. I believe this has the potential to simplify the code quite a bit, since we would no longer need to duplicate subtyping and containment. Step (4) needs to be implemented in a new structural type visitor, but that's brand new code, and less likely to be problematic since it's only used for that specific purposes. Issues like reporting multiple diagnostic can easily be avoided under this scheme. Since the type comparison doesn't really care about inference variables (`UndetVar`) I also do not think that there could be issues when it comes to (4) generating spurious inference constraints. ------------- PR: https://git.openjdk.java.net/valhalla/pull/684 From rriggs at openjdk.java.net Tue May 24 18:31:28 2022 From: rriggs at openjdk.java.net (Roger Riggs) Date: Tue, 24 May 2022 18:31:28 GMT Subject: [lworld] RFR: 8287241: Add IdentityException to report that a value object is not valid Message-ID: Add class java.lang.IdentityException, when thrown indicates that an identity object was required but a value object was supplied. Also add methods `java.util.Objects.requireIdentity(obj)` and `Objects.requireIdentity(obj, message)` to check and throw. Updated java.lang.ref.Reference and related tests to use new exception and method. ------------- Commit messages: - 8287241: Add IdentityException to report that a value object is not valid Changes: https://git.openjdk.java.net/valhalla/pull/696/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=696&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8287241 Stats: 123 lines in 4 files changed: 116 ins; 3 del; 4 mod Patch: https://git.openjdk.java.net/valhalla/pull/696.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/696/head:pull/696 PR: https://git.openjdk.java.net/valhalla/pull/696 From rriggs at openjdk.java.net Wed May 25 17:29:58 2022 From: rriggs at openjdk.java.net (Roger Riggs) Date: Wed, 25 May 2022 17:29:58 GMT Subject: [lworld] RFR: 8281463: [lworld] VALUE / PRIMITIVE modifiers should be supported by reflection In-Reply-To: References: Message-ID: On Tue, 8 Feb 2022 21:23:30 GMT, Roger Riggs wrote: > Update java.lang.reflection.Modifier to reflect the JVMS specified bits in the modifier. > > The re-use of bits between method and class modifiers poses a problem for this API. > Previously, all bits were distinct and the modifiers do not include any indication of whether > the modifier bits are from a class, field, or method. As a result there is ambiguity as two which > of two meanings a bit takes on. NATIVE vs VALUE and STRICT vs PRIMITIVE. > > Please review for discussion purposes. Withdrawing this PR; the new modifier/access flags will be added to the new AccessFlags class. Look for a replacement PR. ------------- PR: https://git.openjdk.java.net/valhalla/pull/640 From rriggs at openjdk.java.net Wed May 25 17:29:59 2022 From: rriggs at openjdk.java.net (Roger Riggs) Date: Wed, 25 May 2022 17:29:59 GMT Subject: [lworld] Withdrawn: 8281463: [lworld] VALUE / PRIMITIVE modifiers should be supported by reflection In-Reply-To: References: Message-ID: On Tue, 8 Feb 2022 21:23:30 GMT, Roger Riggs wrote: > Update java.lang.reflection.Modifier to reflect the JVMS specified bits in the modifier. > > The re-use of bits between method and class modifiers poses a problem for this API. > Previously, all bits were distinct and the modifiers do not include any indication of whether > the modifier bits are from a class, field, or method. As a result there is ambiguity as two which > of two meanings a bit takes on. NATIVE vs VALUE and STRICT vs PRIMITIVE. > > Please review for discussion purposes. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.java.net/valhalla/pull/640 From rriggs at openjdk.java.net Wed May 25 17:45:40 2022 From: rriggs at openjdk.java.net (Roger Riggs) Date: Wed, 25 May 2022 17:45:40 GMT Subject: [lworld] RFR: 8287330: (valhalla) Better modeling of access flags in core reflection Message-ID: Import, verbatim, the new API for access flags to Valhalla; (Not in mainline until jdk 20). The API is unmodified from the mainline version. [Mainline Review openjdk/jdk/7445](https://git.openjdk.java.net/jdk/pull/7445) The Valhalla modifiers will be added in the new AccessFlags class in a subsequent PR. The existing Modifiers class will not include Valhalla specific modifiers. ------------- Commit messages: - 8287330: (valhalla) Better modeling of access flags in core reflection Changes: https://git.openjdk.java.net/valhalla/pull/697/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=697&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8287330 Stats: 761 lines in 9 files changed: 745 ins; 2 del; 14 mod Patch: https://git.openjdk.java.net/valhalla/pull/697.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/697/head:pull/697 PR: https://git.openjdk.java.net/valhalla/pull/697 From mchung at openjdk.java.net Wed May 25 18:00:53 2022 From: mchung at openjdk.java.net (Mandy Chung) Date: Wed, 25 May 2022 18:00:53 GMT Subject: [lworld] RFR: 8287330: (valhalla) Better modeling of access flags in core reflection In-Reply-To: References: Message-ID: On Wed, 25 May 2022 16:57:38 GMT, Roger Riggs wrote: > Import, verbatim, the new API for access flags to Valhalla; (Not in mainline until jdk 20). > The API is unmodified from the mainline version. [Mainline Review openjdk/jdk/7445](https://git.openjdk.java.net/jdk/pull/7445) > > The Valhalla modifiers will be added in the new AccessFlags class in a subsequent PR. > The existing Modifiers class will not include Valhalla specific modifiers. Good to include this. This will allow us to experiment this AccessFlag API and extend it for value types use. ------------- Marked as reviewed by mchung (Committer). PR: https://git.openjdk.java.net/valhalla/pull/697 From rriggs at openjdk.java.net Wed May 25 19:00:15 2022 From: rriggs at openjdk.java.net (Roger Riggs) Date: Wed, 25 May 2022 19:00:15 GMT Subject: [lworld] Integrated: 8287330: (valhalla) Better modeling of access flags in core reflection In-Reply-To: References: Message-ID: On Wed, 25 May 2022 16:57:38 GMT, Roger Riggs wrote: > Import, verbatim, the new API for access flags to Valhalla; (Not in mainline until jdk 20). > The API is unmodified from the mainline version. [Mainline Review openjdk/jdk/7445](https://git.openjdk.java.net/jdk/pull/7445) > > The Valhalla modifiers will be added in the new AccessFlags class in a subsequent PR. > The existing Modifiers class will not include Valhalla specific modifiers. This pull request has now been integrated. Changeset: 0f7c1c29 Author: Roger Riggs URL: https://git.openjdk.java.net/valhalla/commit/0f7c1c29214441cca2418361deed29fac5ee9585 Stats: 761 lines in 9 files changed: 745 ins; 2 del; 14 mod 8287330: (valhalla) Better modeling of access flags in core reflection Reviewed-by: mchung ------------- PR: https://git.openjdk.java.net/valhalla/pull/697 From duke at openjdk.java.net Wed May 25 19:21:01 2022 From: duke at openjdk.java.net (ExE Boss) Date: Wed, 25 May 2022 19:21:01 GMT Subject: [lworld] RFR: 8287241: Add IdentityException to report that a value object is not valid In-Reply-To: References: Message-ID: On Tue, 24 May 2022 18:25:18 GMT, Roger Riggs wrote: > Add class java.lang.IdentityException, when thrown indicates that an identity object was required but a value object was supplied. > > Also add methods `java.util.Objects.requireIdentity(obj)` and `Objects.requireIdentity(obj, message)` to check and throw. > > Updated java.lang.ref.Reference and related tests to use new exception and method. There?should?probably also?be a?`requireIdentity(T?obj, Supplier?messageSupplier)` overload, like?there?is?for?`requireNonNull`: https://github.com/openjdk/valhalla/blob/eb1682287408033bf1c7738a95cc11a5d73ff7aa/src/java.base/share/classes/java/util/Objects.java#L397-L402 ------------- PR: https://git.openjdk.java.net/valhalla/pull/696 From rriggs at openjdk.java.net Wed May 25 20:36:52 2022 From: rriggs at openjdk.java.net (Roger Riggs) Date: Wed, 25 May 2022 20:36:52 GMT Subject: [lworld] RFR: 8287241: Add IdentityException to report that a value object is not valid [v2] In-Reply-To: References: Message-ID: > Add class java.lang.IdentityException, when thrown indicates that an identity object was required but a value object was supplied. > > Also add methods `java.util.Objects.requireIdentity(obj)` and `Objects.requireIdentity(obj, message)` to check and throw. > > Updated java.lang.ref.Reference and related tests to use new exception and method. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Add Objects.requireIdentity(obj, Supplier supplier); update copyright ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/696/files - new: https://git.openjdk.java.net/valhalla/pull/696/files/eb168228..0785a81f Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=696&range=01 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=696&range=00-01 Stats: 24 lines in 2 files changed: 21 ins; 0 del; 3 mod Patch: https://git.openjdk.java.net/valhalla/pull/696.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/696/head:pull/696 PR: https://git.openjdk.java.net/valhalla/pull/696 From duke at openjdk.java.net Wed May 25 21:42:08 2022 From: duke at openjdk.java.net (liach) Date: Wed, 25 May 2022 21:42:08 GMT Subject: [lworld] RFR: 8287241: Add IdentityException to report that a value object is not valid [v2] In-Reply-To: References: Message-ID: On Wed, 25 May 2022 20:36:52 GMT, Roger Riggs wrote: >> Add class java.lang.IdentityException, when thrown indicates that an identity object was required but a value object was supplied. >> >> Also add methods `java.util.Objects.requireIdentity(obj)` and `Objects.requireIdentity(obj, message)` to check and throw. >> >> Updated java.lang.ref.Reference and related tests to use new exception and method. > > Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: > > Add Objects.requireIdentity(obj, Supplier supplier); > update copyright src/java.base/share/classes/java/util/Objects.java line 206: > 204: Objects.requireNonNull(obj); > 205: var cl = obj.getClass(); > 206: if (cl.isValue()) Just curious, is it that all instances of `Object` (from `new Object()`) are identity, and all other classes that are neither value nor identity are abstract classes? ------------- PR: https://git.openjdk.java.net/valhalla/pull/696 From duke at openjdk.java.net Wed May 25 21:45:11 2022 From: duke at openjdk.java.net (liach) Date: Wed, 25 May 2022 21:45:11 GMT Subject: [lworld] RFR: 8287330: (valhalla) Better modeling of access flags in core reflection In-Reply-To: References: Message-ID: On Wed, 25 May 2022 16:57:38 GMT, Roger Riggs wrote: > Import, verbatim, the new API for access flags to Valhalla; (Not in mainline until jdk 20). > The API is unmodified from the mainline version. [Mainline Review openjdk/jdk/7445](https://git.openjdk.java.net/jdk/pull/7445) > > The Valhalla modifiers will be added in the new AccessFlags class in a subsequent PR. > The existing Modifiers class will not include Valhalla specific modifiers. src/java.base/share/classes/java/lang/module/ModuleDescriptor.java line 167: > 165: * but is optional in the dynamic phase, during execution. > 166: */ > 167: STATIC(AccessFlag.STATIC.mask()), This one should have been `AccessFlag.STATIC_PHASE` ------------- PR: https://git.openjdk.java.net/valhalla/pull/697 From rriggs at openjdk.java.net Wed May 25 22:38:08 2022 From: rriggs at openjdk.java.net (Roger Riggs) Date: Wed, 25 May 2022 22:38:08 GMT Subject: [lworld] RFR: 8287330: (valhalla) Better modeling of access flags in core reflection In-Reply-To: References: Message-ID: On Wed, 25 May 2022 21:41:34 GMT, liach wrote: >> Import, verbatim, the new API for access flags to Valhalla; (Not in mainline until jdk 20). >> The API is unmodified from the mainline version. [Mainline Review openjdk/jdk/7445](https://git.openjdk.java.net/jdk/pull/7445) >> >> The Valhalla modifiers will be added in the new AccessFlags class in a subsequent PR. >> The existing Modifiers class will not include Valhalla specific modifiers. > > src/java.base/share/classes/java/lang/module/ModuleDescriptor.java line 167: > >> 165: * but is optional in the dynamic phase, during execution. >> 166: */ >> 167: STATIC(AccessFlag.STATIC.mask()), > > This one should have been `AccessFlag.STATIC_PHASE` ok, fix later ------------- PR: https://git.openjdk.java.net/valhalla/pull/697 From rriggs at openjdk.java.net Wed May 25 22:44:01 2022 From: rriggs at openjdk.java.net (Roger Riggs) Date: Wed, 25 May 2022 22:44:01 GMT Subject: [lworld] RFR: 8287241: Add IdentityException to report that a value object is not valid [v2] In-Reply-To: References: Message-ID: On Wed, 25 May 2022 21:38:12 GMT, liach wrote: >> Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: >> >> Add Objects.requireIdentity(obj, Supplier supplier); >> update copyright > > src/java.base/share/classes/java/util/Objects.java line 206: > >> 204: Objects.requireNonNull(obj); >> 205: var cl = obj.getClass(); >> 206: if (cl.isValue()) > > Just curious, is it that all instances of `Object` (from `new Object()`) are identity, and all other classes that are neither value nor identity are abstract classes? `obj.getClass()` is always concrete and either identity or value. So abstract doesn't really come into play when talking about instances. This test really should be `!cl.isIdentity()` but that method doesn't exist (yet, TBD soon) Aabstract classes and interfaces can be either identity or value, or neither. (But not both). ------------- PR: https://git.openjdk.java.net/valhalla/pull/696 From rriggs at openjdk.java.net Thu May 26 22:29:50 2022 From: rriggs at openjdk.java.net (Roger Riggs) Date: Thu, 26 May 2022 22:29:50 GMT Subject: [lworld] RFR: 8281463: [lworld] VALUE / PRIMITIVE modifiers should be supported by reflection Message-ID: Add support to java.lang.reflect.AccessFlag ACC_IDENTITY, ACC_VALUE, and ACC_PRIMITIVE. Added corresponding flags to j.l.reflect.Modifier so the "source" of the AccessFlag is the Modifer mask. Remove PERMITS_VALUE; moving the definition used by HotSpot to HotSpot code. Add comments to java.l.reflect.Modifier suggesting use of AccessFlag instead and limitations. ------------- Commit messages: - 8281463: [lworld] VALUE / PRIMITIVE modifiers should be supported by reflection Changes: https://git.openjdk.java.net/valhalla/pull/698/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=698&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8281463 Stats: 84 lines in 5 files changed: 51 ins; 13 del; 20 mod Patch: https://git.openjdk.java.net/valhalla/pull/698.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/698/head:pull/698 PR: https://git.openjdk.java.net/valhalla/pull/698 From sadayapalam at openjdk.java.net Fri May 27 07:15:31 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Fri, 27 May 2022 07:15:31 GMT Subject: [lworld] RFR: 8287359: ACC_IDENTITY bit not consistently set in Inner class flags Message-ID: Properly align with the spec in setting ACC_IDENTITY bit for inner classes ------------- Commit messages: - More precise identity determination while reading class files. - Ensure java.lang.Object is not an identity class - 8287359: ACC_IDENTITY bit not consistently set in Inner class flags Changes: https://git.openjdk.java.net/valhalla/pull/699/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=699&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8287359 Stats: 5 lines in 1 file changed: 5 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/valhalla/pull/699.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/699/head:pull/699 PR: https://git.openjdk.java.net/valhalla/pull/699 From sadayapalam at openjdk.java.net Fri May 27 07:42:10 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Fri, 27 May 2022 07:42:10 GMT Subject: [lworld] Integrated: 8287359: ACC_IDENTITY bit not consistently set in Inner class flags In-Reply-To: References: Message-ID: On Fri, 27 May 2022 07:09:19 GMT, Srikanth Adayapalam wrote: > Properly align with the spec in setting ACC_IDENTITY bit for inner classes This pull request has now been integrated. Changeset: 4b62e1cc Author: Srikanth Adayapalam URL: https://git.openjdk.java.net/valhalla/commit/4b62e1cc0a8ecb3982f410de6685c9d24271352c Stats: 5 lines in 1 file changed: 5 ins; 0 del; 0 mod 8287359: ACC_IDENTITY bit not consistently set in Inner class flags ------------- PR: https://git.openjdk.java.net/valhalla/pull/699 From rriggs at openjdk.java.net Fri May 27 20:21:44 2022 From: rriggs at openjdk.java.net (Roger Riggs) Date: Fri, 27 May 2022 20:21:44 GMT Subject: [lworld] RFR: 8281463: [lworld] VALUE / PRIMITIVE modifiers should be supported by reflection [v2] In-Reply-To: References: Message-ID: > Add support to java.lang.reflect.AccessFlag ACC_IDENTITY, ACC_VALUE, and ACC_PRIMITIVE. > Added corresponding flags to j.l.reflect.Modifier so the "source" of the AccessFlag is the Modifer mask. > Remove PERMITS_VALUE; moving the definition used by HotSpot to HotSpot code. > > Add comments to java.l.reflect.Modifier suggesting use of AccessFlag instead and limitations. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Restore AccessFlag SUPER ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/698/files - new: https://git.openjdk.java.net/valhalla/pull/698/files/96578de2..f83c35fd Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=698&range=01 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=698&range=00-01 Stats: 13 lines in 1 file changed: 13 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/valhalla/pull/698.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/698/head:pull/698 PR: https://git.openjdk.java.net/valhalla/pull/698 From rriggs at openjdk.java.net Fri May 27 20:31:57 2022 From: rriggs at openjdk.java.net (Roger Riggs) Date: Fri, 27 May 2022 20:31:57 GMT Subject: [lworld] RFR: 8281463: [lworld] VALUE / PRIMITIVE modifiers should be supported by reflection [v2] In-Reply-To: References: Message-ID: On Fri, 27 May 2022 20:21:44 GMT, Roger Riggs wrote: >> Add support to java.lang.reflect.AccessFlag ACC_IDENTITY, ACC_VALUE, and ACC_PRIMITIVE. >> Added corresponding flags to j.l.reflect.Modifier so the "source" of the AccessFlag is the Modifer mask. >> Remove PERMITS_VALUE; moving the definition used by HotSpot to HotSpot code. >> >> Add comments to java.l.reflect.Modifier suggesting use of AccessFlag instead and limitations. > > Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: > > Restore AccessFlag SUPER WRT AccessFlags... The description of the "source" linkage should be expanded or possibly the feature removed. My prototyping for Valhalla involving adding identity, value, and primitive to the AccessFlag class. These are new (in Valhalla) source keywords and ACC_* bits for classes. This suggests that the "source" value for them should be 'true', however, the condition and AccessFlagTest require the matching name to be defined in Modifier. That puts Modifier in a conflicted state, not able to correctly interpret the flags or return an accurate result from `toString()` because the new flags overlap with existing masks that apply to fields (and not classes). Modifier has no information about whether the value is from a class, method or field. So regardless of the new AccessFlag API, Modifier will need updates to mitigate the ambiguity. My intention was to break the link with the existing j.u.Modifier and only support the new values in AccessFlag. The "source" linkage to Modifier makes that difficult. Perhaps separately, Modifier should be deprecated; however, it has wide usage. ------------- PR: https://git.openjdk.java.net/valhalla/pull/698 From rriggs at openjdk.java.net Fri May 27 21:30:11 2022 From: rriggs at openjdk.java.net (Roger Riggs) Date: Fri, 27 May 2022 21:30:11 GMT Subject: [lworld] RFR: 8281463: [lworld] VALUE / PRIMITIVE modifiers should be supported by reflection [v2] In-Reply-To: References: Message-ID: On Fri, 27 May 2022 20:21:44 GMT, Roger Riggs wrote: >> Add support to java.lang.reflect.AccessFlag ACC_IDENTITY, ACC_VALUE, and ACC_PRIMITIVE. >> Added corresponding flags to j.l.reflect.Modifier so the "source" of the AccessFlag is the Modifer mask. >> Remove PERMITS_VALUE; moving the definition used by HotSpot to HotSpot code. >> >> Add comments to java.l.reflect.Modifier suggesting use of AccessFlag instead and limitations. > > Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: > > Restore AccessFlag SUPER The design problem with Modifier is that it (will be) acting on a concrete representation of ambiguous information after the mask have been redefined. The bits returned from Class.getModifiers() do not identify as being from that source, similarly Member.getModifiers(). A couple possible avenues going forward: - Plan the end-of-life of the class Modifier, and also Class.getModifiers() and Member.Modifiers(). Initially, by freezing the semantics and deprecating the class and methods. Arrange that Class.getModifiers() not to return the new bit definitions, so that when they are used with the Modifier class the interpretation is unchanged. The AccessFlags implementation will need to change to a new perhaps private API to get the flags. - Enhance the Modifier class and Class.getModifiers() have a mask indicating the alternate use of the low order 16 bits. A new mask in the upper 16 bits could discriminate between the overloaded masks. This could avoid the existing Modifier API from misrepresenting the flag bits. ------------- PR: https://git.openjdk.java.net/valhalla/pull/698 From rriggs at openjdk.java.net Tue May 31 18:29:34 2022 From: rriggs at openjdk.java.net (Roger Riggs) Date: Tue, 31 May 2022 18:29:34 GMT Subject: [lworld] RFR: Add Class.isIdentity Message-ID: Add j.l.Class.isIdentity() as a complement to Class.isValue() and Class.isPrimitiveClass. Class.getModifiers() is updated to remove VM was suppressing the ACC_IDENTITY bit (previously known as ACC_SUPER). Updated Class.toString() to reflect the addition of ACC_IDENTITY. For regular identity classes and interfaces, there is no change to toString. Removed the obsolete test for ACC_SUPER This PR may need to wait for corresponding VM changes. ------------- Commit messages: - Re-enable StaticFactoryTest - Add Class.isIdentity Changes: https://git.openjdk.java.net/valhalla/pull/700/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=700&range=00 Stats: 100 lines in 5 files changed: 36 ins; 44 del; 20 mod Patch: https://git.openjdk.java.net/valhalla/pull/700.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/700/head:pull/700 PR: https://git.openjdk.java.net/valhalla/pull/700 From mchung at openjdk.java.net Tue May 31 22:07:48 2022 From: mchung at openjdk.java.net (Mandy Chung) Date: Tue, 31 May 2022 22:07:48 GMT Subject: [lworld] RFR: Add Class.isIdentity In-Reply-To: References: Message-ID: On Tue, 31 May 2022 18:22:33 GMT, Roger Riggs wrote: > Add j.l.Class.isIdentity() as a complement to Class.isValue() and Class.isPrimitiveClass. > > Class.getModifiers() is updated to remove VM was suppressing the ACC_IDENTITY bit (previously known as ACC_SUPER). > > Updated Class.toString() to reflect the addition of ACC_IDENTITY. > For regular identity classes and interfaces, there is no change to toString. > > Removed the obsolete test for ACC_SUPER > > This PR may need to wait for corresponding VM changes. src/hotspot/share/oops/instanceKlass.cpp line 3398: > 3396: } > 3397: } > 3398: // Do not strip ACC_SUPER, its ACC_IDENTITY now I think this should apply only if `EnableValhalla` (or `--enable-preview` is set). src/java.base/share/classes/java/lang/Class.java line 209: > 207: private static final int VALUE_CLASS = 0x00000040; > 208: private static final int PERMITS_VALUE = 0x00000100; > 209: private static final int PRIMITIVE_CLASS = 0x00000800; // Not in JVMS spec It's defined in http://cr.openjdk.java.net/~dlsmith/jep401/jep401-20211220/specs/primitive-classes-jvms.html#jvms-4.1 test/jdk/valhalla/valuetypes/StaticFactoryTest.java line 44: > 42: import static org.testng.Assert.*; > 43: > 44: public final identity class StaticFactoryTest { Is this changed needed? test/jdk/valhalla/valuetypes/StaticFactoryTest.java line 88: > 86: new Object[] { SimpleIdentity.class, true, false, false }, > 87: new Object[] { SimplePrimitive.class, false, true, true }, > 88: new Object[] { SimpleValue.class, false, true, false }, It'd be good to add a regular class and interface (no `identity` modifier) and other `interface` test cases as well. ------------- PR: https://git.openjdk.java.net/valhalla/pull/700