From duke at openjdk.java.net Tue Feb 1 11:12:40 2022 From: duke at openjdk.java.net (Aggelos Biboudis) Date: Tue, 1 Feb 2022 11:12:40 GMT Subject: [lworld] RFR: 8280194: Abstract classes that allow value subclasses should be marked ACC_PERMITS_VALUE (0x0040) In-Reply-To: <6R7uyjsabNXiT2YljFGI3ohOzBDtOTIYMF-MdK6tncI=.4ff4eb00-4cdc-4123-887c-a827cc4dc35b@github.com> References: <6R7uyjsabNXiT2YljFGI3ohOzBDtOTIYMF-MdK6tncI=.4ff4eb00-4cdc-4123-887c-a827cc4dc35b@github.com> Message-ID: <5r-ovi2Ti16W-v8u25-U9-H0w26_DsybBJGWXh6-XWc=.a48f53a6-f064-4b3d-9e37-d5d0afdcb732@github.com> On Mon, 31 Jan 2022 14:08:59 GMT, Srikanth Adayapalam wrote: > Mark abstract classes that qualify with ACC_PERMITS_VALUE flag. This PR looks good. Some clarifications requested. ------------- Marked as reviewed by biboudis at github.com (no known OpenJDK username). PR: https://git.openjdk.java.net/valhalla/pull/622 From duke at openjdk.java.net Tue Feb 1 11:12:44 2022 From: duke at openjdk.java.net (Aggelos Biboudis) Date: Tue, 1 Feb 2022 11:12:44 GMT Subject: [lworld] RFR: 8280194: Abstract classes that allow value subclasses should be marked ACC_PERMITS_VALUE (0x0040) In-Reply-To: References: <6R7uyjsabNXiT2YljFGI3ohOzBDtOTIYMF-MdK6tncI=.4ff4eb00-4cdc-4123-887c-a827cc4dc35b@github.com> Message-ID: On Mon, 31 Jan 2022 14:10:03 GMT, Srikanth Adayapalam wrote: >> Mark abstract classes that qualify with ACC_PERMITS_VALUE flag. > > src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java line 2381: > >> 2379: if ((s.flags() & (SYNCHRONIZED | STATIC)) == SYNCHRONIZED) { >> 2380: return true; >> 2381: } else if (s.isConstructor()) { > > This is a bug fix - static methods may be synchronized or not - immaterial. Do you think the comment above the signature of `implicitIdentityType` needs to reflect this change in a parenthesis? > src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java line 1255: > >> 1253: } >> 1254: } >> 1255: > > This is too late here. Now this is moved up to MemberEnter Why was this moved up? (for me to understand better) > test/langtools/tools/javac/classfiles/attributes/innerclasses/InnerClassesInLocalClassTest.java line 56: > >> 54: sb.append(outerModifier.getString()).append(' '); >> 55: sb.append("class Local { int f; "); >> 56: Map> class2Flags = new HashMap<>(); > > Hack to suppress ACC_PERMITS_VALUE bit from being set thereby causing the test to "fail" I was playing around to understand this generated test: public class OuterClass { static void method() {abstract class Local { class A0{} abstract class A1{} final class A2{} };} } Why do we get the following for an inner class that is abstract, [ASSERT] : inner_class_access_flags 1Local Expected: [ACC_ABSTRACT], Got: [ACC_ABSTRACT, 0x40] while `abstract class A8` in `PermitsValueTest.java` does not emit `ACC_PERMITS_VALUE`? nitpick (and possibly not addressed yet): `Modifiers:getString()` doesn't return the name for `ACC_PERMITS_VALUE` yet. Do we need to address this in this PR? possibly not ------------- PR: https://git.openjdk.java.net/valhalla/pull/622 From sadayapalam at openjdk.java.net Tue Feb 1 11:20:37 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Tue, 1 Feb 2022 11:20:37 GMT Subject: [lworld] RFR: 8280194: Abstract classes that allow value subclasses should be marked ACC_PERMITS_VALUE (0x0040) In-Reply-To: References: <6R7uyjsabNXiT2YljFGI3ohOzBDtOTIYMF-MdK6tncI=.4ff4eb00-4cdc-4123-887c-a827cc4dc35b@github.com> Message-ID: On Tue, 1 Feb 2022 10:08:18 GMT, Aggelos Biboudis wrote: > Do you think the comment above the signature of `implicitIdentityType` needs to reflect this change in a parenthesis? Sure, I don't see a comment above implicitIdentityType, but inside it at the top, I have amended it to say "if it declares a synhronized instance method ..." ------------- PR: https://git.openjdk.java.net/valhalla/pull/622 From sadayapalam at openjdk.java.net Tue Feb 1 11:25:40 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Tue, 1 Feb 2022 11:25:40 GMT Subject: [lworld] RFR: 8280194: Abstract classes that allow value subclasses should be marked ACC_PERMITS_VALUE (0x0040) In-Reply-To: References: <6R7uyjsabNXiT2YljFGI3ohOzBDtOTIYMF-MdK6tncI=.4ff4eb00-4cdc-4123-887c-a827cc4dc35b@github.com> Message-ID: On Tue, 1 Feb 2022 10:10:02 GMT, Aggelos Biboudis wrote: >> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java line 1255: >> >>> 1253: } >>> 1254: } >>> 1255: >> >> This is too late here. Now this is moved up to MemberEnter > > Why was this moved up? (for me to understand better) This was in being set in Attribution phase - and is also consulted in the attribution phase. so when we have classes like: value class V extends A {} abstract class A { A() {} } when we are attributing V, A may not be attributed. While attributing V, we will check if V's superclass (A) meets all the requirements of an abstract class to be a value super but A isn't attributed yet. What we have done now is to move these analysis to MemberEnter - MemberEnter for V and A are both guaranteed to have finished before Attribution of either starts, so we have eliminated the phase ordering problem ------------- PR: https://git.openjdk.java.net/valhalla/pull/622 From sadayapalam at openjdk.java.net Tue Feb 1 11:33:23 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Tue, 1 Feb 2022 11:33:23 GMT Subject: [lworld] RFR: 8280194: Abstract classes that allow value subclasses should be marked ACC_PERMITS_VALUE (0x0040) [v2] In-Reply-To: <6R7uyjsabNXiT2YljFGI3ohOzBDtOTIYMF-MdK6tncI=.4ff4eb00-4cdc-4123-887c-a827cc4dc35b@github.com> References: <6R7uyjsabNXiT2YljFGI3ohOzBDtOTIYMF-MdK6tncI=.4ff4eb00-4cdc-4123-887c-a827cc4dc35b@github.com> Message-ID: > Mark abstract classes that qualify with ACC_PERMITS_VALUE flag. Srikanth Adayapalam has updated the pull request incrementally with one additional commit since the last revision: Incorporate review comments ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/622/files - new: https://git.openjdk.java.net/valhalla/pull/622/files/28ff0c54..7f41d9a4 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=622&range=01 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=622&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/valhalla/pull/622.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/622/head:pull/622 PR: https://git.openjdk.java.net/valhalla/pull/622 From sadayapalam at openjdk.java.net Tue Feb 1 11:33:23 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Tue, 1 Feb 2022 11:33:23 GMT Subject: [lworld] RFR: 8280194: Abstract classes that allow value subclasses should be marked ACC_PERMITS_VALUE (0x0040) [v2] In-Reply-To: References: <6R7uyjsabNXiT2YljFGI3ohOzBDtOTIYMF-MdK6tncI=.4ff4eb00-4cdc-4123-887c-a827cc4dc35b@github.com> Message-ID: On Tue, 1 Feb 2022 11:04:48 GMT, Aggelos Biboudis wrote: > I was playing around to understand this generated test: > > ``` > public class OuterClass { > static void method() {abstract class Local { class A0{} > abstract class A1{} > final class A2{} > };} > } > ``` > > Why do we get the following for an inner class that is abstract, > > ``` > [ASSERT] : inner_class_access_flags 1Local > Expected: [ACC_ABSTRACT], > Got: [ACC_ABSTRACT, 0x40] > ``` > > while `abstract class A8` in `PermitsValueTest.java` does not emit `ACC_PERMITS_VALUE`? Class A8 in PermitsValue is an inner class that has an enclosing instance. Enclosing instance means the class will have an instance field to store the outer this and also its constructor will receive an argument - ie it cannot be a no-arg constructor only. (You may want to see the class files generated to understand the synthetic fields and constructor args that represent the outer this for an inner class with an enclosing instance) > > nitpick (and possibly not addressed yet): `Modifiers:getString()` doesn't return the name for `ACC_PERMITS_VALUE` yet. Do we need to address this in this PR? possibly not Oops - Yes I will raise a follow up defect. ------------- PR: https://git.openjdk.java.net/valhalla/pull/622 From sadayapalam at openjdk.java.net Tue Feb 1 11:37:41 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Tue, 1 Feb 2022 11:37:41 GMT Subject: [lworld] Integrated: 8280194: Abstract classes that allow value subclasses should be marked ACC_PERMITS_VALUE (0x0040) In-Reply-To: <6R7uyjsabNXiT2YljFGI3ohOzBDtOTIYMF-MdK6tncI=.4ff4eb00-4cdc-4123-887c-a827cc4dc35b@github.com> References: <6R7uyjsabNXiT2YljFGI3ohOzBDtOTIYMF-MdK6tncI=.4ff4eb00-4cdc-4123-887c-a827cc4dc35b@github.com> Message-ID: On Mon, 31 Jan 2022 14:08:59 GMT, Srikanth Adayapalam wrote: > Mark abstract classes that qualify with ACC_PERMITS_VALUE flag. This pull request has now been integrated. Changeset: 2e44552e Author: Srikanth Adayapalam URL: https://git.openjdk.java.net/valhalla/commit/2e44552e0b8566280a706cfbec73eaec1bffe6fb Stats: 274 lines in 16 files changed: 228 ins; 10 del; 36 mod 8280194: Abstract classes that allow value subclasses should be marked ACC_PERMITS_VALUE (0x0040) 8242619: [lworld] Ascertain that no-arg super constructors of inline classes are empty ------------- PR: https://git.openjdk.java.net/valhalla/pull/622 From duke at openjdk.java.net Tue Feb 1 12:35:41 2022 From: duke at openjdk.java.net (Aggelos Biboudis) Date: Tue, 1 Feb 2022 12:35:41 GMT Subject: [lworld] RFR: 8280194: Abstract classes that allow value subclasses should be marked ACC_PERMITS_VALUE (0x0040) [v2] In-Reply-To: References: <6R7uyjsabNXiT2YljFGI3ohOzBDtOTIYMF-MdK6tncI=.4ff4eb00-4cdc-4123-887c-a827cc4dc35b@github.com> Message-ID: <8oPO76EdvrFG_xgImynGZGiRHR3Bi4uWHte_SNy1YOc=.a96cc066-f862-4a5e-bff5-8f20c19c1b19@github.com> On Tue, 1 Feb 2022 11:27:08 GMT, Srikanth Adayapalam wrote: >> I was playing around to understand this generated test: >> >> >> public class OuterClass { >> static void method() {abstract class Local { class A0{} >> abstract class A1{} >> final class A2{} >> };} >> } >> >> >> Why do we get the following for an inner class that is abstract, >> >> >> [ASSERT] : inner_class_access_flags 1Local >> Expected: [ACC_ABSTRACT], >> Got: [ACC_ABSTRACT, 0x40] >> >> >> while `abstract class A8` in `PermitsValueTest.java` does not emit `ACC_PERMITS_VALUE`? >> >> nitpick (and possibly not addressed yet): `Modifiers:getString()` doesn't return the name for `ACC_PERMITS_VALUE` yet. Do we need to address this in this PR? possibly not > >> I was playing around to understand this generated test: >> >> ``` >> public class OuterClass { >> static void method() {abstract class Local { class A0{} >> abstract class A1{} >> final class A2{} >> };} >> } >> ``` >> >> Why do we get the following for an inner class that is abstract, >> >> ``` >> [ASSERT] : inner_class_access_flags 1Local >> Expected: [ACC_ABSTRACT], >> Got: [ACC_ABSTRACT, 0x40] >> ``` >> >> while `abstract class A8` in `PermitsValueTest.java` does not emit `ACC_PERMITS_VALUE`? > > Class A8 in PermitsValue is an inner class that has an enclosing instance. Enclosing instance means the class will have an instance field to store the outer this and also its constructor will receive an argument - ie it cannot be a no-arg constructor only. (You may want to see the class files generated to understand the synthetic fields and constructor args that represent the outer this for an inner class with an enclosing instance) > >> >> nitpick (and possibly not addressed yet): `Modifiers:getString()` doesn't return the name for `ACC_PERMITS_VALUE` yet. Do we need to address this in this PR? possibly not > > Oops - Yes I will raise a follow up defect. Thank you! It's clear now! ------------- PR: https://git.openjdk.java.net/valhalla/pull/622 From fparain at openjdk.java.net Wed Feb 2 13:25:12 2022 From: fparain at openjdk.java.net (Frederic Parain) Date: Wed, 2 Feb 2022 13:25:12 GMT Subject: [lworld] RFR: 8281116: [lworld] Adding Preload attribute support Message-ID: Please review this changeset adding support for the Preload attribute. It includes a logging feature to track and diagnose those optimistic class loading. Tested with Mach5 tier1. Thank you, Fred ------------- Commit messages: - Fix Tabs - Adding support for the Preload attribute Changes: https://git.openjdk.java.net/valhalla/pull/623/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=623&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8281116 Stats: 376 lines in 10 files changed: 372 ins; 0 del; 4 mod Patch: https://git.openjdk.java.net/valhalla/pull/623.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/623/head:pull/623 PR: https://git.openjdk.java.net/valhalla/pull/623 From hseigel at openjdk.java.net Wed Feb 2 14:14:35 2022 From: hseigel at openjdk.java.net (Harold Seigel) Date: Wed, 2 Feb 2022 14:14:35 GMT Subject: [lworld] RFR: 8281116: [lworld] Adding Preload attribute support In-Reply-To: References: Message-ID: <2C7cP_9svnP2WH4zLEtpKM3JBRqnCk32trLckrXbWvo=.54a04f9b-b024-4c47-b82a-5b13ec716f5f@github.com> On Wed, 2 Feb 2022 13:12:19 GMT, Frederic Parain wrote: > Please review this changeset adding support for the Preload attribute. > It includes a logging feature to track and diagnose those optimistic class loading. > > Tested with Mach5 tier1. > > Thank you, > > Fred src/hotspot/share/oops/instanceKlass.hpp line 291: > 289: _misc_has_preload_attribute = 1 << 23 // class has a Preload attribute > 290: }; > 291: Is the _misc_has_preload_attribute flag needed, or can the code just check if _preload_classes equals Null? ------------- PR: https://git.openjdk.java.net/valhalla/pull/623 From fparain at openjdk.java.net Wed Feb 2 14:21:33 2022 From: fparain at openjdk.java.net (Frederic Parain) Date: Wed, 2 Feb 2022 14:21:33 GMT Subject: [lworld] RFR: 8281116: [lworld] Adding Preload attribute support In-Reply-To: <2C7cP_9svnP2WH4zLEtpKM3JBRqnCk32trLckrXbWvo=.54a04f9b-b024-4c47-b82a-5b13ec716f5f@github.com> References: <2C7cP_9svnP2WH4zLEtpKM3JBRqnCk32trLckrXbWvo=.54a04f9b-b024-4c47-b82a-5b13ec716f5f@github.com> Message-ID: <0QsHysPcBVc0S0S0rZNaeQTZv5EjtDT8IX2UuUZrrIg=.65572a8d-938c-46ed-93ff-3f21818cd168@github.com> On Wed, 2 Feb 2022 14:11:27 GMT, Harold Seigel wrote: >> Please review this changeset adding support for the Preload attribute. >> It includes a logging feature to track and diagnose those optimistic class loading. >> >> Tested with Mach5 tier1. >> >> Thank you, >> >> Fred > > src/hotspot/share/oops/instanceKlass.hpp line 291: > >> 289: _misc_has_preload_attribute = 1 << 23 // class has a Preload attribute >> 290: }; >> 291: > > Is the _misc_has_preload_attribute flag needed, or can the code just check if _preload_classes equals Null? Strictly speaking, it is not needed. At some point, I've considered putting the _preload_classes pointer into the optional part of InstanceKlass, which would have required this flag. But finally it is declared as a regular field, so this flag can be removed. ------------- PR: https://git.openjdk.java.net/valhalla/pull/623 From hseigel at openjdk.java.net Wed Feb 2 14:25:42 2022 From: hseigel at openjdk.java.net (Harold Seigel) Date: Wed, 2 Feb 2022 14:25:42 GMT Subject: [lworld] RFR: 8281116: [lworld] Adding Preload attribute support In-Reply-To: References: Message-ID: On Wed, 2 Feb 2022 13:12:19 GMT, Frederic Parain wrote: > Please review this changeset adding support for the Preload attribute. > It includes a logging feature to track and diagnose those optimistic class loading. > > Tested with Mach5 tier1. > > Thank you, > > Fred src/hotspot/share/classfile/classFileParser.cpp line 5951: > 5949: _record_components(NULL), > 5950: _temp_local_interfaces(NULL), > 5951: _local_interfaces(NULL), Do you need to free _preload_classes in ClassFileParser::~ClassFileParser() and set _preload_classes to NULL in ClassFileParser::clear_class_metadata(), also, assert that it is NULL in ClassFileParser::fill_instance_klass() ? ------------- PR: https://git.openjdk.java.net/valhalla/pull/623 From hseigel at openjdk.java.net Wed Feb 2 14:29:41 2022 From: hseigel at openjdk.java.net (Harold Seigel) Date: Wed, 2 Feb 2022 14:29:41 GMT Subject: [lworld] RFR: 8281116: [lworld] Adding Preload attribute support In-Reply-To: References: Message-ID: On Wed, 2 Feb 2022 13:12:19 GMT, Frederic Parain wrote: > Please review this changeset adding support for the Preload attribute. > It includes a logging feature to track and diagnose those optimistic class loading. > > Tested with Mach5 tier1. > > Thank you, > > Fred test/hotspot/jtreg/runtime/valhalla/inlinetypes/ValuePreloadTest.java line 61: > 59: checkFor(pb, "[warning][class,preload] Preloading of class PreloadValue1 during linking of class ValuePreloadClient1 (Preload attribute) failed"); > 60: } > 61: } The test looks good but have multipe 2022's in the copyright: * Copyright (c) 2022, 2022, Oracle and/or its affiliates. All rights reserved. ------------- PR: https://git.openjdk.java.net/valhalla/pull/623 From fparain at openjdk.java.net Wed Feb 2 15:58:22 2022 From: fparain at openjdk.java.net (Frederic Parain) Date: Wed, 2 Feb 2022 15:58:22 GMT Subject: [lworld] RFR: 8281116: [lworld] Adding Preload attribute support [v2] In-Reply-To: References: Message-ID: > Please review this changeset adding support for the Preload attribute. > It includes a logging feature to track and diagnose those optimistic class loading. > > Tested with Mach5 tier1. > > Thank you, > > Fred Frederic Parain has updated the pull request incrementally with one additional commit since the last revision: Fixes to address Harold's comments ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/623/files - new: https://git.openjdk.java.net/valhalla/pull/623/files/cb0dd95a..a3ccb572 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=623&range=01 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=623&range=00-01 Stats: 25 lines in 6 files changed: 7 ins; 11 del; 7 mod Patch: https://git.openjdk.java.net/valhalla/pull/623.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/623/head:pull/623 PR: https://git.openjdk.java.net/valhalla/pull/623 From fparain at openjdk.java.net Wed Feb 2 15:58:23 2022 From: fparain at openjdk.java.net (Frederic Parain) Date: Wed, 2 Feb 2022 15:58:23 GMT Subject: [lworld] RFR: 8281116: [lworld] Adding Preload attribute support [v2] In-Reply-To: References: Message-ID: On Wed, 2 Feb 2022 14:22:47 GMT, Harold Seigel wrote: >> Frederic Parain has updated the pull request incrementally with one additional commit since the last revision: >> >> Fixes to address Harold's comments > > src/hotspot/share/classfile/classFileParser.cpp line 5951: > >> 5949: _record_components(NULL), >> 5950: _temp_local_interfaces(NULL), >> 5951: _local_interfaces(NULL), > > Do you need to free _preload_classes in ClassFileParser::~ClassFileParser() and set _preload_classes to NULL in ClassFileParser::clear_class_metadata(), also, assert that it is NULL in ClassFileParser::fill_instance_klass() ? Fixed > test/hotspot/jtreg/runtime/valhalla/inlinetypes/ValuePreloadTest.java line 61: > >> 59: checkFor(pb, "[warning][class,preload] Preloading of class PreloadValue1 during linking of class ValuePreloadClient1 (Preload attribute) failed"); >> 60: } >> 61: } > > The test looks good but have multipe 2022's in the copyright: > * Copyright (c) 2022, 2022, Oracle and/or its affiliates. All rights reserved. Fixed ------------- PR: https://git.openjdk.java.net/valhalla/pull/623 From fparain at openjdk.java.net Wed Feb 2 16:03:32 2022 From: fparain at openjdk.java.net (Frederic Parain) Date: Wed, 2 Feb 2022 16:03:32 GMT Subject: [lworld] RFR: 8281116: [lworld] Adding Preload attribute support [v2] In-Reply-To: References: Message-ID: On Wed, 2 Feb 2022 15:58:22 GMT, Frederic Parain wrote: >> Please review this changeset adding support for the Preload attribute. >> It includes a logging feature to track and diagnose those optimistic class loading. >> >> Tested with Mach5 tier1. >> >> Thank you, >> >> Fred > > Frederic Parain has updated the pull request incrementally with one additional commit since the last revision: > > Fixes to address Harold's comments Harold, Thank you for your feedback. Those issues should be fixed with the last commit. Fred ------------- PR: https://git.openjdk.java.net/valhalla/pull/623 From hseigel at openjdk.java.net Wed Feb 2 16:09:36 2022 From: hseigel at openjdk.java.net (Harold Seigel) Date: Wed, 2 Feb 2022 16:09:36 GMT Subject: [lworld] RFR: 8281116: [lworld] Adding Preload attribute support [v2] In-Reply-To: References: Message-ID: On Wed, 2 Feb 2022 15:58:22 GMT, Frederic Parain wrote: >> Please review this changeset adding support for the Preload attribute. >> It includes a logging feature to track and diagnose those optimistic class loading. >> >> Tested with Mach5 tier1. >> >> Thank you, >> >> Fred > > Frederic Parain has updated the pull request incrementally with one additional commit since the last revision: > > Fixes to address Harold's comments The changes look good! Thanks, Harold ------------- Marked as reviewed by hseigel (Committer). PR: https://git.openjdk.java.net/valhalla/pull/623 From fparain at openjdk.java.net Wed Feb 2 16:09:38 2022 From: fparain at openjdk.java.net (Frederic Parain) Date: Wed, 2 Feb 2022 16:09:38 GMT Subject: [lworld] Integrated: 8281116: [lworld] Adding Preload attribute support In-Reply-To: References: Message-ID: On Wed, 2 Feb 2022 13:12:19 GMT, Frederic Parain wrote: > Please review this changeset adding support for the Preload attribute. > It includes a logging feature to track and diagnose those optimistic class loading. > > Tested with Mach5 tier1. > > Thank you, > > Fred This pull request has now been integrated. Changeset: f5a5dc35 Author: Frederic Parain URL: https://git.openjdk.java.net/valhalla/commit/f5a5dc35f126734401eded910420ac5b805f0193 Stats: 371 lines in 10 files changed: 368 ins; 0 del; 3 mod 8281116: [lworld] Adding Preload attribute support Reviewed-by: hseigel ------------- PR: https://git.openjdk.java.net/valhalla/pull/623 From mchung at openjdk.java.net Thu Feb 3 20:27:59 2022 From: mchung at openjdk.java.net (Mandy Chung) Date: Thu, 3 Feb 2022 20:27:59 GMT Subject: [lworld] RFR: 8280980: [lworld] MethodHandle and VarHandle support for value classes Message-ID: <5F0j9coadl1nTba1hWGb_Y3yDWHSQhgXns_8qlLuAdg=.6a06004b-8e82-4749-ae12-40316fe552d1@github.com> Add new test cases for value classes. ------------- Commit messages: - Fix StaticFactoryTest not to run noInflation mode - 8280980: [lworld] MethodHandle and VarHandle support for value classes Changes: https://git.openjdk.java.net/valhalla/pull/624/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=624&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8280980 Stats: 432 lines in 10 files changed: 228 ins; 137 del; 67 mod Patch: https://git.openjdk.java.net/valhalla/pull/624.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/624/head:pull/624 PR: https://git.openjdk.java.net/valhalla/pull/624 From mchung at openjdk.java.net Thu Feb 3 20:34:40 2022 From: mchung at openjdk.java.net (Mandy Chung) Date: Thu, 3 Feb 2022 20:34:40 GMT Subject: [lworld] Integrated: 8280980: [lworld] MethodHandle and VarHandle support for value classes In-Reply-To: <5F0j9coadl1nTba1hWGb_Y3yDWHSQhgXns_8qlLuAdg=.6a06004b-8e82-4749-ae12-40316fe552d1@github.com> References: <5F0j9coadl1nTba1hWGb_Y3yDWHSQhgXns_8qlLuAdg=.6a06004b-8e82-4749-ae12-40316fe552d1@github.com> Message-ID: On Thu, 3 Feb 2022 20:21:54 GMT, Mandy Chung wrote: > Add new test cases for value classes. This pull request has now been integrated. Changeset: b7a7fa72 Author: Mandy Chung URL: https://git.openjdk.java.net/valhalla/commit/b7a7fa729f922b784e8167befe1ec786ec163bef Stats: 432 lines in 10 files changed: 228 ins; 137 del; 67 mod 8280980: [lworld] MethodHandle and VarHandle support for value classes ------------- PR: https://git.openjdk.java.net/valhalla/pull/624 From jespersm at openjdk.java.net Fri Feb 4 09:50:52 2022 From: jespersm at openjdk.java.net (Jesper Steen =?UTF-8?B?TcO4bGxlcg==?=) Date: Fri, 4 Feb 2022 09:50:52 GMT Subject: [lworld] RFR: 8279840 [lworld] Inconsistent treatment of repeated modifiers Message-ID: Make context-dependent keywords value and primitive act more like ordinary modifiers (for consistent error reporting.) ------------- Commit messages: - 8279840 [lworld] Inconsistent treatment of repeated modifiers Changes: https://git.openjdk.java.net/valhalla/pull/625/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=625&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8279840 Stats: 33 lines in 3 files changed: 29 ins; 0 del; 4 mod Patch: https://git.openjdk.java.net/valhalla/pull/625.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/625/head:pull/625 PR: https://git.openjdk.java.net/valhalla/pull/625 From fparain at openjdk.java.net Fri Feb 4 17:06:07 2022 From: fparain at openjdk.java.net (Frederic Parain) Date: Fri, 4 Feb 2022 17:06:07 GMT Subject: [lworld] RFR: 8281281: [lworld] Preload attribute code needs some fixes Message-ID: Please review those small fixes in the Preload attribute code. Thank you, Fred ------------- Commit messages: - Various fixes in Preload attribute support Changes: https://git.openjdk.java.net/valhalla/pull/626/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=626&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8281281 Stats: 58 lines in 5 files changed: 50 ins; 4 del; 4 mod Patch: https://git.openjdk.java.net/valhalla/pull/626.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/626/head:pull/626 PR: https://git.openjdk.java.net/valhalla/pull/626 From hseigel at openjdk.java.net Fri Feb 4 18:51:34 2022 From: hseigel at openjdk.java.net (Harold Seigel) Date: Fri, 4 Feb 2022 18:51:34 GMT Subject: [lworld] RFR: 8281281: [lworld] Preload attribute code needs some fixes In-Reply-To: References: Message-ID: On Fri, 4 Feb 2022 16:58:22 GMT, Frederic Parain wrote: > Please review those small fixes in the Preload attribute code. > > Thank you, > > Fred Changes look good! Thanks, Harold ------------- Marked as reviewed by hseigel (Committer). PR: https://git.openjdk.java.net/valhalla/pull/626 From fparain at openjdk.java.net Fri Feb 4 19:11:28 2022 From: fparain at openjdk.java.net (Frederic Parain) Date: Fri, 4 Feb 2022 19:11:28 GMT Subject: git: openjdk/valhalla: lworld: 8281281: [lworld] Preload attribute code needs some fixes Message-ID: <2e81a7e8-3837-4252-9cc0-24fc1ce38b5a@openjdk.org> Changeset: a7b10d2a Author: Frederic Parain Date: 2022-02-04 19:11:05 +0000 URL: https://git.openjdk.java.net/valhalla/commit/a7b10d2acff754b015a4372b4b838d1d41b39940 8281281: [lworld] Preload attribute code needs some fixes Reviewed-by: hseigel ! src/hotspot/share/classfile/classFileParser.cpp ! src/hotspot/share/oops/instanceKlass.cpp ! src/hotspot/share/oops/instanceKlass.hpp ! src/hotspot/share/prims/jvmtiRedefineClasses.cpp ! src/hotspot/share/prims/jvmtiRedefineClasses.hpp From fparain at openjdk.java.net Fri Feb 4 19:13:39 2022 From: fparain at openjdk.java.net (Frederic Parain) Date: Fri, 4 Feb 2022 19:13:39 GMT Subject: [lworld] RFR: 8281281: [lworld] Preload attribute code needs some fixes In-Reply-To: References: Message-ID: On Fri, 4 Feb 2022 16:58:22 GMT, Frederic Parain wrote: > Please review those small fixes in the Preload attribute code. > > Thank you, > > Fred Thank you for the review Harold. ------------- PR: https://git.openjdk.java.net/valhalla/pull/626 From fparain at openjdk.java.net Fri Feb 4 19:13:40 2022 From: fparain at openjdk.java.net (Frederic Parain) Date: Fri, 4 Feb 2022 19:13:40 GMT Subject: [lworld] Integrated: 8281281: [lworld] Preload attribute code needs some fixes In-Reply-To: References: Message-ID: On Fri, 4 Feb 2022 16:58:22 GMT, Frederic Parain wrote: > Please review those small fixes in the Preload attribute code. > > Thank you, > > Fred This pull request has now been integrated. Changeset: a7b10d2a Author: Frederic Parain URL: https://git.openjdk.java.net/valhalla/commit/a7b10d2acff754b015a4372b4b838d1d41b39940 Stats: 58 lines in 5 files changed: 50 ins; 4 del; 4 mod 8281281: [lworld] Preload attribute code needs some fixes Reviewed-by: hseigel ------------- PR: https://git.openjdk.java.net/valhalla/pull/626 From vromero at openjdk.java.net Fri Feb 4 22:21:06 2022 From: vromero at openjdk.java.net (Vicente Romero) Date: Fri, 4 Feb 2022 22:21:06 GMT Subject: Integrated: Adding type system regression tests Message-ID: Adding more type system regression tests for universal type variables. Adding overload resolution for primitive classes. ------------- Commit messages: - inference related tests - adding type system regression tests Changes: https://git.openjdk.java.net/valhalla/pull/628/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=628&range=00 Stats: 297 lines in 10 files changed: 223 ins; 26 del; 48 mod Patch: https://git.openjdk.java.net/valhalla/pull/628.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/628/head:pull/628 PR: https://git.openjdk.java.net/valhalla/pull/628 From vromero at openjdk.java.net Fri Feb 4 22:21:06 2022 From: vromero at openjdk.java.net (Vicente Romero) Date: Fri, 4 Feb 2022 22:21:06 GMT Subject: Integrated: Adding type system regression tests In-Reply-To: References: Message-ID: On Fri, 4 Feb 2022 22:11:23 GMT, Vicente Romero wrote: > Adding more type system regression tests for universal type variables. Adding overload resolution for primitive classes. This pull request has now been integrated. Changeset: cf21b754 Author: Vicente Romero URL: https://git.openjdk.java.net/valhalla/commit/cf21b7542c9f5cff54c07a526cfa5764d42169e8 Stats: 297 lines in 10 files changed: 223 ins; 26 del; 48 mod Adding type system regression tests ------------- PR: https://git.openjdk.java.net/valhalla/pull/628 From jespersm at openjdk.java.net Fri Feb 4 23:24:59 2022 From: jespersm at openjdk.java.net (Jesper Steen =?UTF-8?B?TcO4bGxlcg==?=) Date: Fri, 4 Feb 2022 23:24:59 GMT Subject: [lworld] RFR: 8279839 [lworld] Javac has started incorrectly accepting native as a modifer for classes Message-ID: Confusion between the ACC_VALUE and ACC_NATIVE resolved by making explicit class flags masks for the adjusted flags. ------------- Commit messages: - Stray whitespace - 8279839 [lworld] Javac has started incorrectly accepting native as a modifer for classes Changes: https://git.openjdk.java.net/valhalla/pull/627/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=627&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8279839 Stats: 21 lines in 5 files changed: 17 ins; 0 del; 4 mod Patch: https://git.openjdk.java.net/valhalla/pull/627.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/627/head:pull/627 PR: https://git.openjdk.java.net/valhalla/pull/627 From jespersm at openjdk.java.net Sat Feb 5 11:48:35 2022 From: jespersm at openjdk.java.net (Jesper Steen =?UTF-8?B?TcO4bGxlcg==?=) Date: Sat, 5 Feb 2022 11:48:35 GMT Subject: [lworld] RFR: 8279839 [lworld] Javac has started incorrectly accepting native as a modifer for classes In-Reply-To: References: Message-ID: On Fri, 4 Feb 2022 21:42:33 GMT, Jesper Steen M?ller wrote: > Confusion between the ACC_VALUE and ACC_NATIVE resolved > by making explicit class flags masks for the adjusted flags. To the reviewer: This time, I tried the "integrate auto" command since it's a small change and this would smooth out the stuttering "approve - integrate - sponsor" cycle across timezones. I don't know it that is how it is intended, and a bit surpriset it kicked off another round of checks. ------------- PR: https://git.openjdk.java.net/valhalla/pull/627 From sadayapalam at openjdk.java.net Mon Feb 7 07:41:06 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Mon, 7 Feb 2022 07:41:06 GMT Subject: [lworld] RFR: 8281166: [lworld] javac should generate BSM to invoke the static factory for value class In-Reply-To: <1fGVM7EAm5XXVEuslIbog5A_my4p6s61UnCWngABxpU=.8550588d-cd92-45d9-ac61-67c44772827f@github.com> References: <1fGVM7EAm5XXVEuslIbog5A_my4p6s61UnCWngABxpU=.8550588d-cd92-45d9-ac61-67c44772827f@github.com> Message-ID: On Mon, 7 Feb 2022 07:24:36 GMT, Srikanth Adayapalam wrote: > When constructor reference expressions invole value classes, ensure that TransValues will see the constructor call in order for that call to be transformed into factory method invocation. src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java line 2345: > 2343: tree.kind != ReferenceKind.ARRAY_CTOR && > 2344: (tree.sym.owner.isDirectlyOrIndirectlyLocal() || tree.sym.owner.isInner() || tree.sym.owner.isValueClass())); > 2345: } Notes for reviewer: Basically by forcing the constructor references to be converted into lambdas, we ensure that later pipeline stages will see the constructor invocation. For example, with the code change above, given a value class V, a constructor reference of the form V::new will be transformed into a lambda implementation method of the form /*synthetic*/ private static X$V lambda$main$1() { return new X$V(); } This lambda implementation method has the constructor invocation intact which can then be detected and transformed by *com.sun.tools.javac.jvm.TransValues#visitNewClass* (It is possible to directly emit BSM entries without converting them to lambda but that would result in code duplication - we would have to look at DynamicMethod symbols, pick them apart and reencode static and dynamic arguments to indy so that value constructors (and primitive class constructors are reencoded to static factory) ------------- PR: https://git.openjdk.java.net/valhalla/pull/629 From sadayapalam at openjdk.java.net Mon Feb 7 07:41:05 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Mon, 7 Feb 2022 07:41:05 GMT Subject: [lworld] RFR: 8281166: [lworld] javac should generate BSM to invoke the static factory for value class Message-ID: <1fGVM7EAm5XXVEuslIbog5A_my4p6s61UnCWngABxpU=.8550588d-cd92-45d9-ac61-67c44772827f@github.com> When constructor reference expressions invole value classes, ensure that TransValues will see the constructor call in order for that call to be transformed into factory method invocation. ------------- Commit messages: - Fix white space errors - 8281166: javac should generate BSM to invoke the static factory for value class Changes: https://git.openjdk.java.net/valhalla/pull/629/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=629&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8281166 Stats: 72 lines in 2 files changed: 71 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/valhalla/pull/629.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/629/head:pull/629 PR: https://git.openjdk.java.net/valhalla/pull/629 From forax at openjdk.java.net Mon Feb 7 08:00:38 2022 From: forax at openjdk.java.net (=?UTF-8?B?UsOpbWk=?= Forax) Date: Mon, 7 Feb 2022 08:00:38 GMT Subject: [lworld] RFR: 8281166: [lworld] javac should generate BSM to invoke the static factory for value class In-Reply-To: References: <1fGVM7EAm5XXVEuslIbog5A_my4p6s61UnCWngABxpU=.8550588d-cd92-45d9-ac61-67c44772827f@github.com> Message-ID: On Mon, 7 Feb 2022 07:32:28 GMT, Srikanth Adayapalam wrote: >> When constructor reference expressions invole value classes, ensure that TransValues will see the constructor call in order for that call to be transformed into factory method invocation. > > src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java line 2345: > >> 2343: tree.kind != ReferenceKind.ARRAY_CTOR && >> 2344: (tree.sym.owner.isDirectlyOrIndirectlyLocal() || tree.sym.owner.isInner() || tree.sym.owner.isValueClass())); >> 2345: } > > Notes for reviewer: Basically by forcing the constructor references to be converted into lambdas, we ensure that later pipeline stages will see the constructor invocation. For example, with the code change above, given a value class V, a constructor reference of the form V::new will be transformed into a lambda implementation method of the form > > > /*synthetic*/ private static X$V lambda$main$1() { > return new X$V(); > } > > This lambda implementation method has the constructor invocation intact which can then be detected and transformed by *com.sun.tools.javac.jvm.TransValues#visitNewClass* > > (It is possible to directly emit BSM entries without converting them to lambda but that would result in code duplication - we would have to look at DynamicMethod symbols, pick them apart and reencode static and dynamic arguments to indy so that value constructors (and primitive class constructors are reencoded to static factory) I wonder if the transformation from a constructor call to a static method call when it's a value class should not be done before the lambda transformation ? ------------- PR: https://git.openjdk.java.net/valhalla/pull/629 From sadayapalam at openjdk.java.net Mon Feb 7 08:08:37 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Mon, 7 Feb 2022 08:08:37 GMT Subject: [lworld] RFR: 8279839 [lworld] Javac has started incorrectly accepting native as a modifer for classes In-Reply-To: References: Message-ID: <1nIOfqSMdVDfaH-IeevrOT6nF5Mgs5WYfjSKLBlr1Xc=.6deef43b-e82c-469c-ada8-6b3793677bbd@github.com> On Fri, 4 Feb 2022 21:42:33 GMT, Jesper Steen M?ller wrote: > Confusion between the ACC_VALUE and ACC_NATIVE resolved > by making explicit class flags masks for the adjusted flags. Changes look good - Thanks Jesper! ------------- Marked as reviewed by sadayapalam (Committer). PR: https://git.openjdk.java.net/valhalla/pull/627 From jespersm at openjdk.java.net Mon Feb 7 08:12:38 2022 From: jespersm at openjdk.java.net (Jesper Steen =?UTF-8?B?TcO4bGxlcg==?=) Date: Mon, 7 Feb 2022 08:12:38 GMT Subject: [lworld] Integrated: 8279839 [lworld] Javac has started incorrectly accepting native as a modifer for classes In-Reply-To: References: Message-ID: On Fri, 4 Feb 2022 21:42:33 GMT, Jesper Steen M?ller wrote: > Confusion between the ACC_VALUE and ACC_NATIVE resolved > by making explicit class flags masks for the adjusted flags. This pull request has now been integrated. Changeset: 6e609b32 Author: Jesper Steen M?ller Committer: Srikanth Adayapalam URL: https://git.openjdk.java.net/valhalla/commit/6e609b324aed08413c9eae2e7cc93814c8d24933 Stats: 21 lines in 5 files changed: 17 ins; 0 del; 4 mod 8279839: [lworld] Javac has started incorrectly accepting native as a modifer for classes Reviewed-by: sadayapalam ------------- PR: https://git.openjdk.java.net/valhalla/pull/627 From sadayapalam at openjdk.java.net Mon Feb 7 08:15:34 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Mon, 7 Feb 2022 08:15:34 GMT Subject: [lworld] RFR: 8281166: [lworld] javac should generate BSM to invoke the static factory for value class In-Reply-To: References: <1fGVM7EAm5XXVEuslIbog5A_my4p6s61UnCWngABxpU=.8550588d-cd92-45d9-ac61-67c44772827f@github.com> Message-ID: On Mon, 7 Feb 2022 07:57:43 GMT, R?mi Forax wrote: > I wonder if the transformation from a constructor call to a static method call when it's a value class should not be done before the lambda transformation ? This is technically feasible, but has some practical complications. As the top level comment in com.sun.tools.javac.jvm.TransValues calls out: /** * This pass translates value class constructors into static factory methods and patches up constructor * calls to become invocations of those static factory methods. * * We get commissioned as a subpass of Gen. Constructor trees undergo plenty of change in Lower * (enclosing instance injection, captured locals ...) and in Gen (instance field initialization, * see normalizeDefs) and so it is most effective to wait until things reach a quiescent state * before undertaking the tinkering that we do. * * See https://bugs.openjdk.java.net/browse/JDK-8198749 for the kind of transformations we do. * */ Lambda lowering happens well before Lower and Gen pipeline phases. TransValues is a subphase of Gen - we need to wait until Gen because constructors undergo lots of changes up until and well into Gen. So if we want to group all transformations - of constructors into static factories and constructor invocations into static value factory invocations - into one centralized localized pipeline stage (i.e TransValues) the present approach is the best ------------- PR: https://git.openjdk.java.net/valhalla/pull/629 From sadayapalam at openjdk.java.net Mon Feb 7 08:44:36 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Mon, 7 Feb 2022 08:44:36 GMT Subject: [lworld] RFR: 8279840 [lworld] Inconsistent treatment of repeated modifiers. In-Reply-To: References: Message-ID: On Fri, 4 Feb 2022 09:45:15 GMT, Jesper Steen M?ller wrote: > Make context-dependent keywords value and primitive act more like ordinary modifiers (for consistent error reporting.) Changes look good - Thanks Jepser! Please proceed to integrate ------------- Marked as reviewed by sadayapalam (Committer). PR: https://git.openjdk.java.net/valhalla/pull/625 From dsimms at openjdk.java.net Mon Feb 7 09:13:07 2022 From: dsimms at openjdk.java.net (David Simms) Date: Mon, 7 Feb 2022 09:13:07 GMT Subject: [lworld] RFR: Merge jdk Message-ID: Merge jdk-19+8 Further fixes for: - CP indices modified by changes from mainline (javac tests) - Finalizer deprecation - Classfile version 63 ------------- Commit messages: - Further CP indices modified by changes from mainline - Finalizer deprecation - CP indices modified by changes from mainline - Version 63 - Logical merge fixes - Merge tag 'jdk-19+8' into lworld_merge_jdk_19_8 - 8278254: Cleanup doclint warnings in java.desktop module - 8280600: C2: assert(!had_error) failed: bad dominance - 8279535: C2: Dead code in PhaseIdealLoop::create_loop_nest after JDK-8276116 - 8280885: Shenandoah: Some tests failed with "EA: missing allocation reference path" - ... and 855 more: https://git.openjdk.java.net/valhalla/compare/f5a5dc35...59d74953 The webrevs contain the adjustments done while merging with regards to each parent branch: - lworld: https://webrevs.openjdk.java.net/?repo=valhalla&pr=630&range=00.0 - jdk: https://webrevs.openjdk.java.net/?repo=valhalla&pr=630&range=00.1 Changes: https://git.openjdk.java.net/valhalla/pull/630/files Stats: 103971 lines in 2818 files changed: 68416 ins; 20442 del; 15113 mod Patch: https://git.openjdk.java.net/valhalla/pull/630.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/630/head:pull/630 PR: https://git.openjdk.java.net/valhalla/pull/630 From forax at openjdk.java.net Mon Feb 7 09:32:28 2022 From: forax at openjdk.java.net (=?UTF-8?B?UsOpbWk=?= Forax) Date: Mon, 7 Feb 2022 09:32:28 GMT Subject: [lworld] RFR: 8281166: [lworld] javac should generate BSM to invoke the static factory for value class In-Reply-To: References: <1fGVM7EAm5XXVEuslIbog5A_my4p6s61UnCWngABxpU=.8550588d-cd92-45d9-ac61-67c44772827f@github.com> Message-ID: On Mon, 7 Feb 2022 08:11:57 GMT, Srikanth Adayapalam wrote: >> I wonder if the transformation from a constructor call to a static method call when it's a value class should not be done before the lambda transformation ? > >> I wonder if the transformation from a constructor call to a static method call when it's a value class should not be done before the lambda transformation ? > > This is technically feasible, but has some practical complications. As the top level comment in com.sun.tools.javac.jvm.TransValues calls out: > > > /** > * This pass translates value class constructors into static factory methods and patches up constructor > * calls to become invocations of those static factory methods. > * > * We get commissioned as a subpass of Gen. Constructor trees undergo plenty of change in Lower > * (enclosing instance injection, captured locals ...) and in Gen (instance field initialization, > * see normalizeDefs) and so it is most effective to wait until things reach a quiescent state > * before undertaking the tinkering that we do. > * > * See https://bugs.openjdk.java.net/browse/JDK-8198749 for the kind of transformations we do. > * > */ > > > Lambda lowering happens well before Lower and Gen pipeline phases. TransValues is a subphase of Gen - we need to wait until Gen because constructors undergo lots of changes up until and well into Gen. So if we want to group all transformations - of constructors into static factories and constructor invocations into static value factory invocations - into one centralized localized pipeline stage (i.e TransValues) the present approach is the best Okay, make sense ------------- PR: https://git.openjdk.java.net/valhalla/pull/629 From dsimms at openjdk.java.net Mon Feb 7 09:44:41 2022 From: dsimms at openjdk.java.net (David Simms) Date: Mon, 7 Feb 2022 09:44:41 GMT Subject: [lworld] RFR: Merge jdk [v2] In-Reply-To: References: Message-ID: > Merge jdk-19+8 > > Further fixes for: > - CP indices modified by changes from mainline (javac tests) > - Finalizer deprecation > - Classfile version 63 David Simms has updated the pull request incrementally with one additional commit since the last revision: JDK-8281325 TestCallingConvention problem listed ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/630/files - new: https://git.openjdk.java.net/valhalla/pull/630/files/59d74953..98c48116 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=630&range=01 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=630&range=00-01 Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/valhalla/pull/630.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/630/head:pull/630 PR: https://git.openjdk.java.net/valhalla/pull/630 From dsimms at openjdk.java.net Mon Feb 7 09:47:44 2022 From: dsimms at openjdk.java.net (David Simms) Date: Mon, 7 Feb 2022 09:47:44 GMT Subject: [lworld] Integrated: Merge jdk In-Reply-To: References: Message-ID: On Mon, 7 Feb 2022 09:02:59 GMT, David Simms wrote: > Merge jdk-19+8 > > Further fixes for: > - CP indices modified by changes from mainline (javac tests) > - Finalizer deprecation > - Classfile version 63 This pull request has now been integrated. Changeset: 68b7cfaa Author: David Simms URL: https://git.openjdk.java.net/valhalla/commit/68b7cfaa27339454f48571154da3545c9433e13e Stats: 103973 lines in 2818 files changed: 68418 ins; 20442 del; 15113 mod Merge jdk Merge jdk-19+8 ------------- PR: https://git.openjdk.java.net/valhalla/pull/630 From duke at openjdk.java.net Mon Feb 7 10:17:35 2022 From: duke at openjdk.java.net (Aggelos Biboudis) Date: Mon, 7 Feb 2022 10:17:35 GMT Subject: [lworld] RFR: 8281166: [lworld] javac should generate BSM to invoke the static factory for value class In-Reply-To: <1fGVM7EAm5XXVEuslIbog5A_my4p6s61UnCWngABxpU=.8550588d-cd92-45d9-ac61-67c44772827f@github.com> References: <1fGVM7EAm5XXVEuslIbog5A_my4p6s61UnCWngABxpU=.8550588d-cd92-45d9-ac61-67c44772827f@github.com> Message-ID: On Mon, 7 Feb 2022 07:24:36 GMT, Srikanth Adayapalam wrote: > When constructor reference expressions invole value classes, ensure that TransValues will see the constructor call in order for that call to be transformed into factory method invocation. ???? ------------- Marked as reviewed by biboudis at github.com (no known OpenJDK username). PR: https://git.openjdk.java.net/valhalla/pull/629 From jespersm at openjdk.java.net Mon Feb 7 10:47:23 2022 From: jespersm at openjdk.java.net (Jesper Steen =?UTF-8?B?TcO4bGxlcg==?=) Date: Mon, 7 Feb 2022 10:47:23 GMT Subject: [lworld] Integrated: 8279840 [lworld] Inconsistent treatment of repeated modifiers. In-Reply-To: References: Message-ID: On Fri, 4 Feb 2022 09:45:15 GMT, Jesper Steen M?ller wrote: > Make context-dependent keywords value and primitive act more like ordinary modifiers (for consistent error reporting.) This pull request has now been integrated. Changeset: 4ae0a0d2 Author: Jesper Steen M?ller Committer: Srikanth Adayapalam URL: https://git.openjdk.java.net/valhalla/commit/4ae0a0d2e11d67f6d1efe161674110aff171e872 Stats: 33 lines in 3 files changed: 29 ins; 0 del; 4 mod 8279840: [lworld] Inconsistent treatment of repeated modifiers. Reviewed-by: sadayapalam ------------- PR: https://git.openjdk.java.net/valhalla/pull/625 From sadayapalam at openjdk.java.net Mon Feb 7 10:22:39 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Mon, 7 Feb 2022 10:22:39 GMT Subject: [lworld] Integrated: 8281166: [lworld] javac should generate BSM to invoke the static factory for value class In-Reply-To: <1fGVM7EAm5XXVEuslIbog5A_my4p6s61UnCWngABxpU=.8550588d-cd92-45d9-ac61-67c44772827f@github.com> References: <1fGVM7EAm5XXVEuslIbog5A_my4p6s61UnCWngABxpU=.8550588d-cd92-45d9-ac61-67c44772827f@github.com> Message-ID: On Mon, 7 Feb 2022 07:24:36 GMT, Srikanth Adayapalam wrote: > When constructor reference expressions invole value classes, ensure that TransValues will see the constructor call in order for that call to be transformed into factory method invocation. This pull request has now been integrated. Changeset: 8b5c17ba Author: Srikanth Adayapalam URL: https://git.openjdk.java.net/valhalla/commit/8b5c17ba3d714adaeb43a62624db800122529ed2 Stats: 72 lines in 2 files changed: 71 ins; 0 del; 1 mod 8281166: [lworld] javac should generate BSM to invoke the static factory for value class ------------- PR: https://git.openjdk.java.net/valhalla/pull/629 From sadayapalam at openjdk.java.net Mon Feb 7 12:40:46 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Mon, 7 Feb 2022 12:40:46 GMT Subject: [lworld] RFR: 8281336: [lworld] Remove workaround in LambdaToMethod to circumvent BootstrapMethodError Message-ID: Remove the workaround in Javac and include the fix from Mandy for runtime in lieu. ------------- Commit messages: - 8281336: Remove workaround in LambdaToMethod to circumvent BootstrapMethodError Changes: https://git.openjdk.java.net/valhalla/pull/631/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=631&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8281336 Stats: 12 lines in 2 files changed: 0 ins; 9 del; 3 mod Patch: https://git.openjdk.java.net/valhalla/pull/631.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/631/head:pull/631 PR: https://git.openjdk.java.net/valhalla/pull/631 From hseigel at openjdk.java.net Mon Feb 7 13:45:52 2022 From: hseigel at openjdk.java.net (Harold Seigel) Date: Mon, 7 Feb 2022 13:45:52 GMT Subject: [lworld] RFR: 8281279: [lworld] Add JVM support for ACC_PERMITS_VALUE Message-ID: Please review this fix to add JVM support for ACC_PERMITS_VALUE. This change throws an ICCE exception when loading a value class whose super class is not java.lang.Object or does not have ACC_PERMITS_VALUE set. The fix was tested with Mach5 tiers 1-2 on Linux, Mac OS, and Windows and Mach5 tiers 3-5 on Linux x64. Thanks, Harold ------------- Commit messages: - 8281279: [lworld] Add JVM support for ACC_PERMITS_VALUE Changes: https://git.openjdk.java.net/valhalla/pull/632/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=632&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8281279 Stats: 1659 lines in 15 files changed: 1361 ins; 205 del; 93 mod Patch: https://git.openjdk.java.net/valhalla/pull/632.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/632/head:pull/632 PR: https://git.openjdk.java.net/valhalla/pull/632 From hseigel at openjdk.java.net Mon Feb 7 15:01:14 2022 From: hseigel at openjdk.java.net (Harold Seigel) Date: Mon, 7 Feb 2022 15:01:14 GMT Subject: [lworld] RFR: 8281279: [lworld] Add JVM support for ACC_PERMITS_VALUE [v2] In-Reply-To: References: Message-ID: > Please review this fix to add JVM support for ACC_PERMITS_VALUE. This change throws an ICCE exception when loading a value class whose super class is not java.lang.Object or does not have ACC_PERMITS_VALUE set. The fix was tested with Mach5 tiers 1-2 on Linux, Mac OS, and Windows and Mach5 tiers 3-5 on Linux x64. > > Thanks, Harold Harold Seigel has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits: - Merge lworld - 8281279: [lworld] Add JVM support for ACC_PERMITS_VALUE ------------- Changes: https://git.openjdk.java.net/valhalla/pull/632/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=632&range=01 Stats: 1659 lines in 15 files changed: 1361 ins; 205 del; 93 mod Patch: https://git.openjdk.java.net/valhalla/pull/632.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/632/head:pull/632 PR: https://git.openjdk.java.net/valhalla/pull/632 From hseigel at openjdk.java.net Mon Feb 7 15:15:13 2022 From: hseigel at openjdk.java.net (Harold Seigel) Date: Mon, 7 Feb 2022 15:15:13 GMT Subject: [lworld] RFR: 8281279: [lworld] Add JVM support for ACC_PERMITS_VALUE [v3] In-Reply-To: References: Message-ID: <4q-fdSLg8oc_fR5c5Qt0Fh7cfm37omb6Qi944drCzaE=.474f196d-78d1-4d36-80e6-e3c61bdbab04@github.com> > Please review this fix to add JVM support for ACC_PERMITS_VALUE. This change throws an ICCE exception when loading a value class whose super class is not java.lang.Object or does not have ACC_PERMITS_VALUE set. The fix was tested with Mach5 tiers 1-2 on Linux, Mac OS, and Windows and Mach5 tiers 3-5 on Linux x64. > > Thanks, Harold Harold Seigel has updated the pull request incrementally with one additional commit since the last revision: Update test TestResolvedJavaType.java ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/632/files - new: https://git.openjdk.java.net/valhalla/pull/632/files/c2cbdfe0..81dc07be Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=632&range=02 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=632&range=01-02 Stats: 4 lines in 1 file changed: 0 ins; 0 del; 4 mod Patch: https://git.openjdk.java.net/valhalla/pull/632.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/632/head:pull/632 PR: https://git.openjdk.java.net/valhalla/pull/632 From thartmann at openjdk.java.net Mon Feb 7 15:23:38 2022 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Mon, 7 Feb 2022 15:23:38 GMT Subject: [lworld] RFR: 8281325: [lworld] Unused code emitted for unpacking arguments leads to code buffer overflow Message-ID: An unrelated change to javac that came in with the mainline merge triggered this: When emitting code to scalarize a buffered inline type argument in the method entries, there is sometimes an overlap with registers/stack slots occupied by another argument that needs to be resolved before we can make progress. We should not emit any code in such a case and proceed with the next argument (we will revisit this argument later, once the conflict has been resolved). Some of that code will be refactored by [JDK-8278390](https://bugs.openjdk.java.net/browse/JDK-8278390) anyway. Thanks, Tobias ------------- Commit messages: - Typo - Removed from problem list - 8281325: [lworld] Unused code emitted for unpacking arguments leads to code buffer overflow Changes: https://git.openjdk.java.net/valhalla/pull/633/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=633&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8281325 Stats: 64 lines in 3 files changed: 31 ins; 20 del; 13 mod Patch: https://git.openjdk.java.net/valhalla/pull/633.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/633/head:pull/633 PR: https://git.openjdk.java.net/valhalla/pull/633 From sadayapalam at openjdk.java.net Mon Feb 7 15:26:25 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Mon, 7 Feb 2022 15:26:25 GMT Subject: [lworld] RFR: 8280194: Abstract classes that allow value subclasses should be marked ACC_PERMITS_VALUE (0x0040) [v2] In-Reply-To: References: <6R7uyjsabNXiT2YljFGI3ohOzBDtOTIYMF-MdK6tncI=.4ff4eb00-4cdc-4123-887c-a827cc4dc35b@github.com> Message-ID: <56yPDp_p_oWbgGV656OTpnEZ8Det3AXr7aa-alK4MD0=.55810b18-0ea0-4387-8fe1-c33ece5f96c3@github.com> On Tue, 1 Feb 2022 11:33:23 GMT, Srikanth Adayapalam wrote: >> Mark abstract classes that qualify with ACC_PERMITS_VALUE flag. > > Srikanth Adayapalam has updated the pull request incrementally with one additional commit since the last revision: > > Incorporate review comments I took a look at the Modifier.getString enhancement - at the moment ACC_PERMITS_VALUE is not surfaced at all in these tests. So we can leave it as is for the time being. ------------- PR: https://git.openjdk.java.net/valhalla/pull/622 From thartmann at openjdk.java.net Mon Feb 7 15:50:42 2022 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Mon, 7 Feb 2022 15:50:42 GMT Subject: [lworld] Integrated: 8281325: [lworld] Unused code emitted for unpacking arguments leads to code buffer overflow In-Reply-To: References: Message-ID: On Mon, 7 Feb 2022 15:17:05 GMT, Tobias Hartmann wrote: > An unrelated change to javac that came in with the mainline merge triggered this: > When emitting code to scalarize a buffered inline type argument in the method entries, there is sometimes an overlap with registers/stack slots occupied by another argument that needs to be resolved before we can make progress. We should not emit any code in such a case and proceed with the next argument (we will revisit this argument later, once the conflict has been resolved). > > Some of that code will be refactored by [JDK-8278390](https://bugs.openjdk.java.net/browse/JDK-8278390) anyway. > > Thanks, > Tobias This pull request has now been integrated. Changeset: 2f2fa459 Author: Tobias Hartmann URL: https://git.openjdk.java.net/valhalla/commit/2f2fa459af4215085b8bf78be7fc11619a250b59 Stats: 64 lines in 3 files changed: 31 ins; 20 del; 13 mod 8281325: [lworld] Unused code emitted for unpacking arguments leads to code buffer overflow ------------- PR: https://git.openjdk.java.net/valhalla/pull/633 From hseigel at openjdk.java.net Mon Feb 7 18:05:13 2022 From: hseigel at openjdk.java.net (Harold Seigel) Date: Mon, 7 Feb 2022 18:05:13 GMT Subject: [lworld] RFR: 8281279: [lworld] Add JVM support for ACC_PERMITS_VALUE [v4] In-Reply-To: References: Message-ID: > Please review this fix to add JVM support for ACC_PERMITS_VALUE. This change throws an ICCE exception when loading a value class whose super class is not java.lang.Object or does not have ACC_PERMITS_VALUE set. The fix was tested with Mach5 tiers 1-2 on Linux, Mac OS, and Windows and Mach5 tiers 3-5 on Linux x64. > > Thanks, Harold Harold Seigel has updated the pull request incrementally with one additional commit since the last revision: some additional fixes ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/632/files - new: https://git.openjdk.java.net/valhalla/pull/632/files/81dc07be..71b99f48 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=632&range=03 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=632&range=02-03 Stats: 9 lines in 3 files changed: 2 ins; 0 del; 7 mod Patch: https://git.openjdk.java.net/valhalla/pull/632.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/632/head:pull/632 PR: https://git.openjdk.java.net/valhalla/pull/632 From fparain at openjdk.java.net Mon Feb 7 18:05:14 2022 From: fparain at openjdk.java.net (Frederic Parain) Date: Mon, 7 Feb 2022 18:05:14 GMT Subject: [lworld] RFR: 8281279: [lworld] Add JVM support for ACC_PERMITS_VALUE [v3] In-Reply-To: <4q-fdSLg8oc_fR5c5Qt0Fh7cfm37omb6Qi944drCzaE=.474f196d-78d1-4d36-80e6-e3c61bdbab04@github.com> References: <4q-fdSLg8oc_fR5c5Qt0Fh7cfm37omb6Qi944drCzaE=.474f196d-78d1-4d36-80e6-e3c61bdbab04@github.com> Message-ID: On Mon, 7 Feb 2022 15:15:13 GMT, Harold Seigel wrote: >> Please review this fix to add JVM support for ACC_PERMITS_VALUE. This change throws an ICCE exception when loading a value class whose super class is not java.lang.Object or does not have ACC_PERMITS_VALUE set. The fix was tested with Mach5 tiers 1-2 on Linux, Mac OS, and Windows and Mach5 tiers 3-5 on Linux x64. >> >> Thanks, Harold > > Harold Seigel has updated the pull request incrementally with one additional commit since the last revision: > > Update test TestResolvedJavaType.java src/hotspot/share/classfile/classFileParser.cpp line 4596: > 4594: return; > 4595: } > 4596: This is not the behavior written in the JVMS draft for value classes, which requires the direct super class of a value class to have the ACC_PERMITS _VALUE flag set. However, because we haven't changed java.lang.Object into an abstract class, java.lang.Object cannot have the ACC_PERMITS _VALUE flag set. Currently, I see no other solution than the one you have implemented, adding a special case when the direct super class is java.lang.Object. But it would be useful to add a comment in the source code and the CR to remember and track this discrepancy. ------------- PR: https://git.openjdk.java.net/valhalla/pull/632 From mchung at openjdk.java.net Mon Feb 7 18:11:39 2022 From: mchung at openjdk.java.net (Mandy Chung) Date: Mon, 7 Feb 2022 18:11:39 GMT Subject: [lworld] RFR: 8281336: [lworld] Remove workaround in LambdaToMethod to circumvent BootstrapMethodError In-Reply-To: References: Message-ID: On Mon, 7 Feb 2022 12:33:39 GMT, Srikanth Adayapalam wrote: > Remove the workaround in Javac and include the fix from Mandy for runtime in lieu. The runtime change looks fine. Is there an existing test verifying this? ------------- PR: https://git.openjdk.java.net/valhalla/pull/631 From hseigel at openjdk.java.net Mon Feb 7 18:15:54 2022 From: hseigel at openjdk.java.net (Harold Seigel) Date: Mon, 7 Feb 2022 18:15:54 GMT Subject: [lworld] RFR: 8281279: [lworld] Add JVM support for ACC_PERMITS_VALUE [v5] In-Reply-To: References: Message-ID: > Please review this fix to add JVM support for ACC_PERMITS_VALUE. This change throws an ICCE exception when loading a value class whose super class is not java.lang.Object or does not have ACC_PERMITS_VALUE set. The fix was tested with Mach5 tiers 1-2 on Linux, Mac OS, and Windows and Mach5 tiers 3-5 on Linux x64. > > Thanks, Harold Harold Seigel has updated the pull request incrementally with one additional commit since the last revision: add j.l.Object comment ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/632/files - new: https://git.openjdk.java.net/valhalla/pull/632/files/71b99f48..32609d17 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=632&range=04 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=632&range=03-04 Stats: 5 lines in 1 file changed: 4 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/valhalla/pull/632.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/632/head:pull/632 PR: https://git.openjdk.java.net/valhalla/pull/632 From hseigel at openjdk.java.net Mon Feb 7 18:15:56 2022 From: hseigel at openjdk.java.net (Harold Seigel) Date: Mon, 7 Feb 2022 18:15:56 GMT Subject: [lworld] RFR: 8281279: [lworld] Add JVM support for ACC_PERMITS_VALUE [v3] In-Reply-To: References: <4q-fdSLg8oc_fR5c5Qt0Fh7cfm37omb6Qi944drCzaE=.474f196d-78d1-4d36-80e6-e3c61bdbab04@github.com> Message-ID: <7Ar4JIVs4FX3JhqUfykv5uZlavzia_VXwOYvCtjtppM=.1e83938e-ff8a-4f4f-b800-2c286584b61b@github.com> On Mon, 7 Feb 2022 17:59:25 GMT, Frederic Parain wrote: >> Harold Seigel has updated the pull request incrementally with one additional commit since the last revision: >> >> Update test TestResolvedJavaType.java > > src/hotspot/share/classfile/classFileParser.cpp line 4596: > >> 4594: return; >> 4595: } >> 4596: > > This is not the behavior written in the JVMS draft for value classes, which requires the direct super class of a value class to have the ACC_PERMITS _VALUE flag set. However, because we haven't changed java.lang.Object into an abstract class, java.lang.Object cannot have the ACC_PERMITS _VALUE flag set. Currently, I see no other solution than the one you have implemented, adding a special case when the direct super class is java.lang.Object. But it would be useful to add a comment in the source code and the CR to remember and track this discrepancy. Thanks for suggesting this. I added a comment. ------------- PR: https://git.openjdk.java.net/valhalla/pull/632 From duke at openjdk.java.net Mon Feb 7 22:45:25 2022 From: duke at openjdk.java.net (Aggelos Biboudis) Date: Mon, 7 Feb 2022 22:45:25 GMT Subject: [lworld] RFR: 8281336: [lworld] Remove workaround in LambdaToMethod to circumvent BootstrapMethodError In-Reply-To: References: Message-ID: On Mon, 7 Feb 2022 12:33:39 GMT, Srikanth Adayapalam wrote: > Remove the workaround in Javac and include the fix from Mandy for runtime in lieu. Maybe we can use the test from the the original PR? import java.util.function.Supplier; public primitive class CheckRefLambda { int theInteger; CheckRefLambda(int newValue){ theInteger=newValue; } public Supplier makeCopier(){ return()->new CheckRefLambda(this.theInteger + 1); } public static void main(String[]args){ CheckRefLambda rec=new CheckRefLambda(42); CheckRefLambda rec2=rec.makeCopier().get(); if(rec2!=new CheckRefLambda(43)){ throw new AssertionError("Classes should be equal"); } } } ------------- PR: https://git.openjdk.java.net/valhalla/pull/631 From sadayapalam at openjdk.java.net Tue Feb 8 00:14:25 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Tue, 8 Feb 2022 00:14:25 GMT Subject: [lworld] RFR: 8281336: [lworld] Remove workaround in LambdaToMethod to circumvent BootstrapMethodError In-Reply-To: References: Message-ID: On Mon, 7 Feb 2022 18:08:29 GMT, Mandy Chung wrote: > The runtime change looks fine. Is there an existing test verifying this? Yes, indeed. test/langtools/tools/javac/valhalla/lworld-values/StreamsTest.java fails with only javac changes without the runtime changes. ------------- PR: https://git.openjdk.java.net/valhalla/pull/631 From mchung at openjdk.java.net Tue Feb 8 00:19:19 2022 From: mchung at openjdk.java.net (Mandy Chung) Date: Tue, 8 Feb 2022 00:19:19 GMT Subject: [lworld] RFR: 8281336: [lworld] Remove workaround in LambdaToMethod to circumvent BootstrapMethodError In-Reply-To: References: Message-ID: On Mon, 7 Feb 2022 12:33:39 GMT, Srikanth Adayapalam wrote: > Remove the workaround in Javac and include the fix from Mandy for runtime in lieu. Marked as reviewed by mchung (Committer). ------------- PR: https://git.openjdk.java.net/valhalla/pull/631 From sadayapalam at openjdk.java.net Tue Feb 8 00:35:38 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Tue, 8 Feb 2022 00:35:38 GMT Subject: [lworld] RFR: 8281336: [lworld] Remove workaround in LambdaToMethod to circumvent BootstrapMethodError In-Reply-To: References: Message-ID: <8uadIR33TCdqAIDE-muIL3bjTuZYvQCgIsodQ4_v0JE=.1bdfe57a-b38b-4be7-aef1-f5f4d4a51a73@github.com> On Mon, 7 Feb 2022 22:42:37 GMT, Aggelos Biboudis wrote: > Maybe we can use the test from the the original PR? > > ``` > import java.util.function.Supplier; > > public primitive class CheckRefLambda { > int theInteger; > > CheckRefLambda(int newValue){ > theInteger=newValue; > } > > public Supplier makeCopier(){ > return()->new CheckRefLambda(this.theInteger + 1); > } > > public static void main(String[]args){ > CheckRefLambda rec=new CheckRefLambda(42); > CheckRefLambda rec2=rec.makeCopier().get(); > if(rec2!=new CheckRefLambda(43)){ > throw new AssertionError("Classes should be equal"); > } > } > } > ``` Much water has flown under the bridge - we have ripped out all support for ref-default classes and so the meanings of unadorned/naked names have changed. (in the original scenario the name CheckRefLambda is a primitive reference but in what you have put together, CheckRefLambda is an instance of a primitive class) This test case does not fail anymore without any changes (javac and/or runtime). Since we already have a javac test covering the PR, we should be good I would say. ------------- PR: https://git.openjdk.java.net/valhalla/pull/631 From sadayapalam at openjdk.java.net Tue Feb 8 00:35:39 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Tue, 8 Feb 2022 00:35:39 GMT Subject: [lworld] Integrated: 8281336: [lworld] Remove workaround in LambdaToMethod to circumvent BootstrapMethodError In-Reply-To: References: Message-ID: On Mon, 7 Feb 2022 12:33:39 GMT, Srikanth Adayapalam wrote: > Remove the workaround in Javac and include the fix from Mandy for runtime in lieu. This pull request has now been integrated. Changeset: 2571b270 Author: Srikanth Adayapalam URL: https://git.openjdk.java.net/valhalla/commit/2571b270de06c209d5bfdb86a1a1929e6aa711b4 Stats: 12 lines in 2 files changed: 0 ins; 9 del; 3 mod 8281336: [lworld] Remove workaround in LambdaToMethod to circumvent BootstrapMethodError 8274399: [lworld] LambdaConversionException thrown when the receiver type is a primitive reference type and the implementation type is the primitive value type of the same class Co-authored-by: Mandy Chung Reviewed-by: mchung ------------- PR: https://git.openjdk.java.net/valhalla/pull/631 From sadayapalam at openjdk.java.net Tue Feb 8 06:41:06 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Tue, 8 Feb 2022 06:41:06 GMT Subject: [lworld] RFR: 8281013: Errors.PrimitiveClassDoesNotSupport diagnostic should apply to value classes also Message-ID: Diagnose value classes accessing various jlO methods that don't work with B2/B3 classes ------------- Commit messages: - 8281013: Errors.PrimitiveClassDoesNotSupport diagnostic should apply to value classes also Changes: https://git.openjdk.java.net/valhalla/pull/635/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=635&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8281013 Stats: 87 lines in 9 files changed: 50 ins; 0 del; 37 mod Patch: https://git.openjdk.java.net/valhalla/pull/635.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/635/head:pull/635 PR: https://git.openjdk.java.net/valhalla/pull/635 From duke at openjdk.java.net Tue Feb 8 10:25:42 2022 From: duke at openjdk.java.net (Aggelos Biboudis) Date: Tue, 8 Feb 2022 10:25:42 GMT Subject: [lworld] RFR: 8281013: Errors.PrimitiveClassDoesNotSupport diagnostic should apply to value classes also In-Reply-To: References: Message-ID: On Tue, 8 Feb 2022 06:32:17 GMT, Srikanth Adayapalam wrote: > Diagnose value classes accessing various jlO methods that don't work with B2/B3 classes Looks good! Should we reference 8237066 as well in the PR for administrative purposes? (I noticed it is referred in the JTREG comment). ------------- Marked as reviewed by biboudis at github.com (no known OpenJDK username). PR: https://git.openjdk.java.net/valhalla/pull/635 From sadayapalam at openjdk.java.net Tue Feb 8 10:34:41 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Tue, 8 Feb 2022 10:34:41 GMT Subject: [lworld] RFR: 8281013: Errors.PrimitiveClassDoesNotSupport diagnostic should apply to value classes also In-Reply-To: References: Message-ID: On Tue, 8 Feb 2022 10:22:07 GMT, Aggelos Biboudis wrote: > Looks good! Should we reference 8237066 as well in the PR for administrative purposes? (I noticed it is referred in the JTREG comment). The new test is a starts off with existing test which was introduced for JDK-8237066 - As a part of the testsuite cleanup much of these references should really be cleaned up. I am not sure these bug ids would make sense during and post integration to mainline JDK - these are pre-release bugs. Referencing 8237066 in the PR - I don't think something like /issue add 8237066 would work - since that would look for a open ticket that should also be closed alongside. ------------- PR: https://git.openjdk.java.net/valhalla/pull/635 From sadayapalam at openjdk.java.net Tue Feb 8 10:44:35 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Tue, 8 Feb 2022 10:44:35 GMT Subject: [lworld] Integrated: 8281013: Errors.PrimitiveClassDoesNotSupport diagnostic should apply to value classes also In-Reply-To: References: Message-ID: On Tue, 8 Feb 2022 06:32:17 GMT, Srikanth Adayapalam wrote: > Diagnose value classes accessing various jlO methods that don't work with B2/B3 classes This pull request has now been integrated. Changeset: fc22b797 Author: Srikanth Adayapalam URL: https://git.openjdk.java.net/valhalla/commit/fc22b797a7438dec5dbae8bb0f536207b5619765 Stats: 87 lines in 9 files changed: 50 ins; 0 del; 37 mod 8281013: Errors.PrimitiveClassDoesNotSupport diagnostic should apply to value classes also ------------- PR: https://git.openjdk.java.net/valhalla/pull/635 From sadayapalam at openjdk.java.net Tue Feb 8 12:49:47 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Tue, 8 Feb 2022 12:49:47 GMT Subject: [lworld] RFR: 8281026: Allow for compiler.note.cant.instantiate.object.directly to be suppressed via an option Message-ID: <76skw4CeVr0i6WFPBK4ToC3eQc661eq_0QKi8TjKob0=.ea4ad890-0e7f-4357-a4fb-dc85cb0de50e@github.com> Introduce the javac option -XDtolerateObjectInstantiation to suppress the warning. ------------- Commit messages: - 8281026: Allow for compiler.note.cant.instantiate.object.directly to be suppressed via an option Changes: https://git.openjdk.java.net/valhalla/pull/636/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=636&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8281026 Stats: 20 lines in 4 files changed: 14 ins; 0 del; 6 mod Patch: https://git.openjdk.java.net/valhalla/pull/636.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/636/head:pull/636 PR: https://git.openjdk.java.net/valhalla/pull/636 From roland at openjdk.java.net Tue Feb 8 13:45:45 2022 From: roland at openjdk.java.net (Roland Westrelin) Date: Tue, 8 Feb 2022 13:45:45 GMT Subject: [lworld] RFR: 8281378: [lworld] Crash in LateInlineMHCallGenerator::do_late_inline_check Message-ID: I think this is caused by the support that was added recently for virtual call late inlining and I propose tweaking the AlwaysIncrementalInline logic for that case. ------------- Commit messages: - fix Changes: https://git.openjdk.java.net/valhalla/pull/637/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=637&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8281378 Stats: 3 lines in 1 file changed: 1 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/valhalla/pull/637.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/637/head:pull/637 PR: https://git.openjdk.java.net/valhalla/pull/637 From thartmann at openjdk.java.net Tue Feb 8 14:02:27 2022 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Tue, 8 Feb 2022 14:02:27 GMT Subject: [lworld] RFR: 8281378: [lworld] Crash in LateInlineMHCallGenerator::do_late_inline_check In-Reply-To: References: Message-ID: On Tue, 8 Feb 2022 13:40:14 GMT, Roland Westrelin wrote: > I think this is caused by the support that was added recently for > virtual call late inlining and I propose tweaking the > AlwaysIncrementalInline logic for that case. That looks reasonable to me. Thanks for quickly fixing! ------------- Marked as reviewed by thartmann (Committer). PR: https://git.openjdk.java.net/valhalla/pull/637 From roland at openjdk.java.net Tue Feb 8 14:02:28 2022 From: roland at openjdk.java.net (Roland Westrelin) Date: Tue, 8 Feb 2022 14:02:28 GMT Subject: [lworld] RFR: 8281378: [lworld] Crash in LateInlineMHCallGenerator::do_late_inline_check In-Reply-To: References: Message-ID: On Tue, 8 Feb 2022 13:56:20 GMT, Tobias Hartmann wrote: >> I think this is caused by the support that was added recently for >> virtual call late inlining and I propose tweaking the >> AlwaysIncrementalInline logic for that case. > > That looks reasonable to me. Thanks for quickly fixing! @TobiHartmann thanks for the review ------------- PR: https://git.openjdk.java.net/valhalla/pull/637 From roland at openjdk.java.net Tue Feb 8 14:02:29 2022 From: roland at openjdk.java.net (Roland Westrelin) Date: Tue, 8 Feb 2022 14:02:29 GMT Subject: [lworld] Integrated: 8281378: [lworld] Crash in LateInlineMHCallGenerator::do_late_inline_check In-Reply-To: References: Message-ID: On Tue, 8 Feb 2022 13:40:14 GMT, Roland Westrelin wrote: > I think this is caused by the support that was added recently for > virtual call late inlining and I propose tweaking the > AlwaysIncrementalInline logic for that case. This pull request has now been integrated. Changeset: 18b1f28d Author: Roland Westrelin URL: https://git.openjdk.java.net/valhalla/commit/18b1f28d13eeb7c390fd9298be579801799562a3 Stats: 3 lines in 1 file changed: 1 ins; 0 del; 2 mod 8281378: [lworld] Crash in LateInlineMHCallGenerator::do_late_inline_check Reviewed-by: thartmann ------------- PR: https://git.openjdk.java.net/valhalla/pull/637 From fparain at openjdk.java.net Tue Feb 8 15:12:36 2022 From: fparain at openjdk.java.net (Frederic Parain) Date: Tue, 8 Feb 2022 15:12:36 GMT Subject: [lworld] RFR: 8281279: [lworld] Add JVM support for ACC_PERMITS_VALUE [v5] In-Reply-To: References: Message-ID: On Mon, 7 Feb 2022 18:15:54 GMT, Harold Seigel wrote: >> Please review this fix to add JVM support for ACC_PERMITS_VALUE. This change throws an ICCE exception when loading a value class whose super class is not java.lang.Object or does not have ACC_PERMITS_VALUE set. The fix was tested with Mach5 tiers 1-2 on Linux, Mac OS, and Windows and Mach5 tiers 3-5 on Linux x64. >> >> Thanks, Harold > > Harold Seigel has updated the pull request incrementally with one additional commit since the last revision: > > add j.l.Object comment Marked as reviewed by fparain (Committer). ------------- PR: https://git.openjdk.java.net/valhalla/pull/632 From hseigel at openjdk.java.net Tue Feb 8 15:24:23 2022 From: hseigel at openjdk.java.net (Harold Seigel) Date: Tue, 8 Feb 2022 15:24:23 GMT Subject: [lworld] RFR: 8281279: [lworld] Add JVM support for ACC_PERMITS_VALUE [v5] In-Reply-To: References: Message-ID: On Mon, 7 Feb 2022 18:15:54 GMT, Harold Seigel wrote: >> Please review this fix to add JVM support for ACC_PERMITS_VALUE. This change throws an ICCE exception when loading a value class whose super class is not java.lang.Object or does not have ACC_PERMITS_VALUE set. The fix was tested with Mach5 tiers 1-2 on Linux, Mac OS, and Windows and Mach5 tiers 3-5 on Linux x64. >> >> Thanks, Harold > > Harold Seigel has updated the pull request incrementally with one additional commit since the last revision: > > add j.l.Object comment Thanks Fred for the review! ------------- PR: https://git.openjdk.java.net/valhalla/pull/632 From hseigel at openjdk.java.net Tue Feb 8 15:24:23 2022 From: hseigel at openjdk.java.net (Harold Seigel) Date: Tue, 8 Feb 2022 15:24:23 GMT Subject: [lworld] Integrated: 8281279: [lworld] Add JVM support for ACC_PERMITS_VALUE In-Reply-To: References: Message-ID: On Mon, 7 Feb 2022 13:34:47 GMT, Harold Seigel wrote: > Please review this fix to add JVM support for ACC_PERMITS_VALUE. This change throws an ICCE exception when loading a value class whose super class is not java.lang.Object or does not have ACC_PERMITS_VALUE set. The fix was tested with Mach5 tiers 1-2 on Linux, Mac OS, and Windows and Mach5 tiers 3-5 on Linux x64. > > Thanks, Harold This pull request has now been integrated. Changeset: 3017cf71 Author: Harold Seigel URL: https://git.openjdk.java.net/valhalla/commit/3017cf71c2201b236415c671827cfc3bac9c3521 Stats: 1668 lines in 17 files changed: 1367 ins; 205 del; 96 mod 8281279: [lworld] Add JVM support for ACC_PERMITS_VALUE Reviewed-by: fparain ------------- PR: https://git.openjdk.java.net/valhalla/pull/632 From fparain at openjdk.java.net Tue Feb 8 15:56:51 2022 From: fparain at openjdk.java.net (Frederic Parain) Date: Tue, 8 Feb 2022 15:56:51 GMT Subject: [lworld] RFR: 8281380: [lworld] Rename T_INLINE_TYPE to T_PRIMITIVE_OBJECT Message-ID: Please review this renaming patch, changing T_INLINE_TYPE to T_PRIMITIVE_OBJECT in order to prevent the confusion between the InlineKlass concept, which is used to represent both value classes and primitive classes, and the BasicType that represents only primitive classes. Remaining occurrences of the "INLINE_TYPE" string are located in a JDI test, which could be fixed later, and in the verifier code, which might need to be revisited to check the way value classes/primitive classes are handled. Tested with Mach5, tier1 to ensure build is working on all platforms. Thank you, Fred ------------- Commit messages: - Rename Basictype T_INLINE_TYPE to T_PRIMITIVE_OBJECT Changes: https://git.openjdk.java.net/valhalla/pull/638/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=638&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8281380 Stats: 323 lines in 98 files changed: 0 ins; 0 del; 323 mod Patch: https://git.openjdk.java.net/valhalla/pull/638.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/638/head:pull/638 PR: https://git.openjdk.java.net/valhalla/pull/638 From hseigel at openjdk.java.net Tue Feb 8 16:18:25 2022 From: hseigel at openjdk.java.net (Harold Seigel) Date: Tue, 8 Feb 2022 16:18:25 GMT Subject: [lworld] RFR: 8281380: [lworld] Rename T_INLINE_TYPE to T_PRIMITIVE_OBJECT In-Reply-To: References: Message-ID: On Tue, 8 Feb 2022 15:51:34 GMT, Frederic Parain wrote: > Please review this renaming patch, changing T_INLINE_TYPE to T_PRIMITIVE_OBJECT in order to prevent the confusion between the InlineKlass concept, which is used to represent both value classes and primitive classes, and the BasicType that represents only primitive classes. > > Remaining occurrences of the "INLINE_TYPE" string are located in a JDI test, which could be fixed later, and in the verifier code, which might need to be revisited to check the way value classes/primitive classes are handled. > > Tested with Mach5, tier1 to ensure build is working on all platforms. > > Thank you, > > Fred Changes look good! I wonder if src/java.base/share/native/libverify/check_code.c needs to worry about T_PRIMITVE_OBJECT's. It should only see old classfiles. ------------- Marked as reviewed by hseigel (Committer). PR: https://git.openjdk.java.net/valhalla/pull/638 From vromero at openjdk.java.net Tue Feb 8 18:02:47 2022 From: vromero at openjdk.java.net (Vicente Romero) Date: Tue, 8 Feb 2022 18:02:47 GMT Subject: RFR: some existing regression tests are failing due to universal tvars changes Message-ID: This PR contains some type system bug fixes that were impacting existing regression tests. Improved code at Attr that deals with the `universality` of declared type variables in order to consider if primitives could be accepted as bounds in wildcards etc ------------- Commit messages: - some existing regression tests are failing due to universal tvars changes Changes: https://git.openjdk.java.net/valhalla/pull/639/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=639&range=00 Stats: 68 lines in 4 files changed: 53 ins; 4 del; 11 mod Patch: https://git.openjdk.java.net/valhalla/pull/639.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/639/head:pull/639 PR: https://git.openjdk.java.net/valhalla/pull/639 From vromero at openjdk.java.net Tue Feb 8 18:13:34 2022 From: vromero at openjdk.java.net (Vicente Romero) Date: Tue, 8 Feb 2022 18:13:34 GMT Subject: Integrated: some existing regression tests are failing due to universal tvars changes In-Reply-To: References: Message-ID: On Tue, 8 Feb 2022 17:17:45 GMT, Vicente Romero wrote: > This PR contains some type system bug fixes that were impacting existing regression tests. Improved code at Attr that deals with the `universality` of declared type variables in order to consider if primitives could be accepted as bounds in wildcards etc This pull request has now been integrated. Changeset: 79d60ae4 Author: Vicente Romero URL: https://git.openjdk.java.net/valhalla/commit/79d60ae4e10c32e457acf9b7e961c0b3bd197cd8 Stats: 68 lines in 4 files changed: 53 ins; 4 del; 11 mod some existing regression tests are failing due to universal tvars changes ------------- PR: https://git.openjdk.java.net/valhalla/pull/639 From fparain at openjdk.java.net Tue Feb 8 18:54:29 2022 From: fparain at openjdk.java.net (Frederic Parain) Date: Tue, 8 Feb 2022 18:54:29 GMT Subject: [lworld] RFR: 8281380: [lworld] Rename T_INLINE_TYPE to T_PRIMITIVE_OBJECT In-Reply-To: References: Message-ID: On Tue, 8 Feb 2022 16:14:56 GMT, Harold Seigel wrote: > I wonder if src/java.base/share/native/libverify/check_code.c needs to worry about T_PRIMITVE_OBJECT's. It should only see old classfiles. check_code.c might not need to support Q-signatures, but the additional logic was added back in 2018. I'd prefer to limit this changeset to pure renaming, and handle the case of check_code.c in a different changeset. ------------- PR: https://git.openjdk.java.net/valhalla/pull/638 From fparain at openjdk.java.net Tue Feb 8 19:51:35 2022 From: fparain at openjdk.java.net (Frederic Parain) Date: Tue, 8 Feb 2022 19:51:35 GMT Subject: [lworld] Integrated: 8281380: [lworld] Rename T_INLINE_TYPE to T_PRIMITIVE_OBJECT In-Reply-To: References: Message-ID: On Tue, 8 Feb 2022 15:51:34 GMT, Frederic Parain wrote: > Please review this renaming patch, changing T_INLINE_TYPE to T_PRIMITIVE_OBJECT in order to prevent the confusion between the InlineKlass concept, which is used to represent both value classes and primitive classes, and the BasicType that represents only primitive classes. > > Remaining occurrences of the "INLINE_TYPE" string are located in a JDI test, which could be fixed later, and in the verifier code, which might need to be revisited to check the way value classes/primitive classes are handled. > > Tested with Mach5, tier1 to ensure build is working on all platforms. > > Thank you, > > Fred This pull request has now been integrated. Changeset: 954f5ca4 Author: Frederic Parain URL: https://git.openjdk.java.net/valhalla/commit/954f5ca407e4d68204fc0010d2082103255a61cb Stats: 323 lines in 98 files changed: 0 ins; 0 del; 323 mod 8281380: [lworld] Rename T_INLINE_TYPE to T_PRIMITIVE_OBJECT Reviewed-by: hseigel ------------- PR: https://git.openjdk.java.net/valhalla/pull/638 From rriggs at openjdk.java.net Tue Feb 8 21:29:56 2022 From: rriggs at openjdk.java.net (Roger Riggs) Date: Tue, 8 Feb 2022 21:29:56 GMT Subject: [lworld] RFR: 8281463: [lworld] VALUE / PRIMITIVE modifiers should be supported by reflection Message-ID: 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. ------------- Commit messages: - 8281463: [lworld] VALUE / PRIMITIVE modifiers should be supported by reflection Changes: https://git.openjdk.java.net/valhalla/pull/640/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=640&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8281463 Stats: 76 lines in 3 files changed: 44 ins; 8 del; 24 mod Patch: https://git.openjdk.java.net/valhalla/pull/640.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/640/head:pull/640 PR: https://git.openjdk.java.net/valhalla/pull/640 From vromero at openjdk.java.net Tue Feb 8 22:13:36 2022 From: vromero at openjdk.java.net (Vicente Romero) Date: Tue, 8 Feb 2022 22:13:36 GMT Subject: Integrated: Merge lworld Message-ID: Merge lworld into universal-tvars # Conflicts: # src/jdk.compiler/share/classes/com/sun/tools/javac/code/Flags.java # src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java # src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java # src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java # src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java # src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties # test/langtools/tools/javac/diags/examples.not-yet.txt ------------- Commit messages: - Merge branch 'lworld' into universal-tvars_merge_lworld - some existing regression tests are failing due to universal tvars changes - Adding type system regression tests - some bug fixing, adding new regression tests - Merge lworld - Primitive value conversion - updating tests - Merge lworld - Merge lworld - universal type variables: initial prototype - ... and 3 more: https://git.openjdk.java.net/valhalla/compare/954f5ca4...b249ca68 The merge commit only contains trivial merges, so no merge-specific webrevs have been generated. Changes: https://git.openjdk.java.net/valhalla/pull/641/files Stats: 1187 lines in 30 files changed: 1081 ins; 26 del; 80 mod Patch: https://git.openjdk.java.net/valhalla/pull/641.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/641/head:pull/641 PR: https://git.openjdk.java.net/valhalla/pull/641 From vromero at openjdk.java.net Tue Feb 8 22:13:39 2022 From: vromero at openjdk.java.net (Vicente Romero) Date: Tue, 8 Feb 2022 22:13:39 GMT Subject: Integrated: Merge lworld In-Reply-To: References: Message-ID: On Tue, 8 Feb 2022 21:59:07 GMT, Vicente Romero wrote: > Merge lworld into universal-tvars > > # Conflicts: > # src/jdk.compiler/share/classes/com/sun/tools/javac/code/Flags.java > # src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java > # src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java > # src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java > # src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java > # src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties > # test/langtools/tools/javac/diags/examples.not-yet.txt This pull request has now been integrated. Changeset: c1a11fc6 Author: Vicente Romero URL: https://git.openjdk.java.net/valhalla/commit/c1a11fc60bd4753ecd74cf7abbaade3cf98bbb50 Stats: 111302 lines in 3055 files changed: 73584 ins; 21472 del; 16246 mod Merge lworld ------------- PR: https://git.openjdk.java.net/valhalla/pull/641 From mchung at openjdk.java.net Tue Feb 8 22:36:33 2022 From: mchung at openjdk.java.net (Mandy Chung) Date: Tue, 8 Feb 2022 22:36:33 GMT Subject: [lworld] RFR: 8281463: [lworld] VALUE / PRIMITIVE modifiers should be supported by reflection In-Reply-To: References: Message-ID: <32sUMw_FT6ytRNJhSwpty5xN8VPYaEOlNABCkdsLyxE=.06277f7c-413c-4144-aea2-3a70e5f8c741@github.com> 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. `ACC_VALUE`, `ACC_PRIMITIVE`, and `ACC_PERMITS_VALUE` are class modifiers. Not every class modifiers defined in JVMS is defined in the `java.lang.reflect.Modifier` API for example ACC_ENUM, ACC_ANNOTATION and ACC_MODULE. But instead a test method such as `Class::isEnum`, `Class::isAnnotation` is provided in the `java.lang.Class` API. For value and primitive class, a new `Class::isValue` and `Class::isPrimitiveClass` API (subject to the final terminology for B2 and B3) would suffice. I'm not sure yet if an API is needed for `ACC_PERMITS_VALUE` since this is mostly used by JVM. ------------- PR: https://git.openjdk.java.net/valhalla/pull/640 From duke at openjdk.java.net Wed Feb 9 10:59:39 2022 From: duke at openjdk.java.net (Aggelos Biboudis) Date: Wed, 9 Feb 2022 10:59:39 GMT Subject: [lworld] RFR: 8281026: Allow for compiler.note.cant.instantiate.object.directly to be suppressed via an option In-Reply-To: <76skw4CeVr0i6WFPBK4ToC3eQc661eq_0QKi8TjKob0=.ea4ad890-0e7f-4357-a4fb-dc85cb0de50e@github.com> References: <76skw4CeVr0i6WFPBK4ToC3eQc661eq_0QKi8TjKob0=.ea4ad890-0e7f-4357-a4fb-dc85cb0de50e@github.com> Message-ID: On Tue, 8 Feb 2022 12:44:33 GMT, Srikanth Adayapalam wrote: > Introduce the javac option -XDtolerateObjectInstantiation to suppress the warning. It's less verbose now. ?? Marked as reviewed by biboudis at github.com (no known OpenJDK username). ------------- PR: https://git.openjdk.java.net/valhalla/pull/636 From thartmann at openjdk.java.net Wed Feb 9 11:11:35 2022 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Wed, 9 Feb 2022 11:11:35 GMT Subject: [lworld] RFR: 8281454: [lworld] Assert in EA due to oop access to flat array Message-ID: Similar to [JDK-8250951](https://bugs.openjdk.java.net/browse/JDK-8250951), we hit an assert in EA because an oop load is used to access a flat array. The load is from an `Arrays.copyOf` and flat array checks in `LibraryCallKit::inline_array_copyOf` will prevent that load from ever being executed but the dead subgraph is not removed because we run with `-XX:+StressReflectiveCode`. I fixed this by using the `FlatArrayCheckNode` for checks in the intrinsics as well. This ensures that the graph is folded even with `-XX:+StressReflectiveCode` and enables more aggressive optimizations. The patch also includes some cleanups and removal of (now) dead code. Thanks, Tobias ------------- Commit messages: - Removed override keywords - 8281454: [lworld] Assert in EA due to oop access to flat array Changes: https://git.openjdk.java.net/valhalla/pull/642/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=642&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8281454 Stats: 83 lines in 12 files changed: 10 ins; 22 del; 51 mod Patch: https://git.openjdk.java.net/valhalla/pull/642.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/642/head:pull/642 PR: https://git.openjdk.java.net/valhalla/pull/642 From thartmann at openjdk.java.net Wed Feb 9 11:39:37 2022 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Wed, 9 Feb 2022 11:39:37 GMT Subject: [lworld] Integrated: 8281454: [lworld] Assert in EA due to oop access to flat array In-Reply-To: References: Message-ID: On Wed, 9 Feb 2022 11:05:10 GMT, Tobias Hartmann wrote: > Similar to [JDK-8250951](https://bugs.openjdk.java.net/browse/JDK-8250951), we hit an assert in EA because an oop load is used to access a flat array. The load is from an `Arrays.copyOf` and flat array checks in `LibraryCallKit::inline_array_copyOf` will prevent that load from ever being executed but the dead subgraph is not removed because we run with `-XX:+StressReflectiveCode`. > > I fixed this by using the `FlatArrayCheckNode` for checks in the intrinsics as well. This ensures that the graph is folded even with `-XX:+StressReflectiveCode` and enables more aggressive optimizations. The patch also includes some cleanups and removal of (now) dead code. > > Thanks, > Tobias This pull request has now been integrated. Changeset: 5a0f3336 Author: Tobias Hartmann URL: https://git.openjdk.java.net/valhalla/commit/5a0f3336c0e51ea8e4942f7b70a40f37ded0c2f2 Stats: 83 lines in 12 files changed: 10 ins; 22 del; 51 mod 8281454: [lworld] Assert in EA due to oop access to flat array ------------- PR: https://git.openjdk.java.net/valhalla/pull/642 From sadayapalam at openjdk.java.net Wed Feb 9 12:29:34 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Wed, 9 Feb 2022 12:29:34 GMT Subject: [lworld] RFR: 8281026: Allow for compiler.note.cant.instantiate.object.directly to be suppressed via an option In-Reply-To: <76skw4CeVr0i6WFPBK4ToC3eQc661eq_0QKi8TjKob0=.ea4ad890-0e7f-4357-a4fb-dc85cb0de50e@github.com> References: <76skw4CeVr0i6WFPBK4ToC3eQc661eq_0QKi8TjKob0=.ea4ad890-0e7f-4357-a4fb-dc85cb0de50e@github.com> Message-ID: On Tue, 8 Feb 2022 12:44:33 GMT, Srikanth Adayapalam wrote: > Introduce the javac option -XDtolerateObjectInstantiation to suppress the warning. Thanks for the review Aggelos! ------------- PR: https://git.openjdk.java.net/valhalla/pull/636 From sadayapalam at openjdk.java.net Wed Feb 9 12:29:35 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Wed, 9 Feb 2022 12:29:35 GMT Subject: [lworld] Integrated: 8281026: Allow for compiler.note.cant.instantiate.object.directly to be suppressed via an option In-Reply-To: <76skw4CeVr0i6WFPBK4ToC3eQc661eq_0QKi8TjKob0=.ea4ad890-0e7f-4357-a4fb-dc85cb0de50e@github.com> References: <76skw4CeVr0i6WFPBK4ToC3eQc661eq_0QKi8TjKob0=.ea4ad890-0e7f-4357-a4fb-dc85cb0de50e@github.com> Message-ID: <1nhx0NcjoMWru2cYkXpTjhORECqbu6YgPCPmoS8wDys=.1267c4cc-020b-4358-b8ab-0cff6b663f6b@github.com> On Tue, 8 Feb 2022 12:44:33 GMT, Srikanth Adayapalam wrote: > Introduce the javac option -XDtolerateObjectInstantiation to suppress the warning. This pull request has now been integrated. Changeset: fe2126b2 Author: Srikanth Adayapalam URL: https://git.openjdk.java.net/valhalla/commit/fe2126b2fc2c865fc2d1bbc7bb8154fa00c678da Stats: 20 lines in 4 files changed: 14 ins; 0 del; 6 mod 8281026: Allow for compiler.note.cant.instantiate.object.directly to be suppressed via an option ------------- PR: https://git.openjdk.java.net/valhalla/pull/636 From fparain at openjdk.java.net Wed Feb 9 13:34:09 2022 From: fparain at openjdk.java.net (Frederic Parain) Date: Wed, 9 Feb 2022 13:34:09 GMT Subject: [lworld] Integrated: 8281537: [lworld] runtime/cds/appcds/TestDumpClassListSource.java fails with Exception: java.lang.RuntimeException: Class Hello should be printed in classlist Message-ID: Small test fix. ------------- Commit messages: - Fix pattern matching to expect injected interface Changes: https://git.openjdk.java.net/valhalla/pull/643/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=643&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8281537 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/valhalla/pull/643.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/643/head:pull/643 PR: https://git.openjdk.java.net/valhalla/pull/643 From fparain at openjdk.java.net Wed Feb 9 13:34:10 2022 From: fparain at openjdk.java.net (Frederic Parain) Date: Wed, 9 Feb 2022 13:34:10 GMT Subject: [lworld] Integrated: 8281537: [lworld] runtime/cds/appcds/TestDumpClassListSource.java fails with Exception: java.lang.RuntimeException: Class Hello should be printed in classlist In-Reply-To: References: Message-ID: On Wed, 9 Feb 2022 13:27:49 GMT, Frederic Parain wrote: > Small test fix. This pull request has now been integrated. Changeset: 9cab68b4 Author: Frederic Parain URL: https://git.openjdk.java.net/valhalla/commit/9cab68b494b7d89f7782a50cb67e7677e7253729 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod 8281537: [lworld] runtime/cds/appcds/TestDumpClassListSource.java fails with Exception: java.lang.RuntimeException: Class Hello should be printed in classlist ------------- PR: https://git.openjdk.java.net/valhalla/pull/643 From mchung at openjdk.java.net Wed Feb 9 20:31:11 2022 From: mchung at openjdk.java.net (Mandy Chung) Date: Wed, 9 Feb 2022 20:31:11 GMT Subject: [lworld] RFR: 8281073: [lworld] Update MethodHandles::zero, empty, constant APIs for primitive classes Message-ID: The `MethodHandles::zero` and `MethodHandles::empty` APIs are updated to return a primitive object with the default value if the given type is a primitive value type. These methods return null if the given type is a value class and a primitive reference type. The MethodHandles::constant method will throw `NullPointerException` if the given type is a primitive value type and the given value is null. That's the same behavior as the `int` type but such case is missing in the spec. ------------- Commit messages: - Further clean up - JDK-8281073: [lworld] Update MethodHandles::zero, empty, constant APIs for value classes Changes: https://git.openjdk.java.net/valhalla/pull/644/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=644&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8281073 Stats: 132 lines in 2 files changed: 126 ins; 0 del; 6 mod Patch: https://git.openjdk.java.net/valhalla/pull/644.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/644/head:pull/644 PR: https://git.openjdk.java.net/valhalla/pull/644 From amenkov at openjdk.java.net Thu Feb 10 15:09:48 2022 From: amenkov at openjdk.java.net (Alex Menkov) Date: Thu, 10 Feb 2022 15:09:48 GMT Subject: [lworld] RFR: 8281073: [lworld] Update MethodHandles::zero, empty, constant APIs for primitive classes In-Reply-To: References: Message-ID: On Wed, 9 Feb 2022 20:24:07 GMT, Mandy Chung wrote: > The `MethodHandles::zero` and `MethodHandles::empty` APIs are updated to return a primitive object with the default value if the given type is a primitive value type. These methods return null if the given type is a value class and a primitive reference type. > > The MethodHandles::constant method will throw `NullPointerException` if the given type is a primitive value type and the given value is null. That's the same behavior as the `int` type but such case is missing in the spec. src/java.base/share/classes/java/lang/invoke/MethodHandles.java line 5116: > 5114: * and returns a suitable default depending on the return type. > 5115: * If the requested type is a primitive type or {@code void}, it returns > 5116: * a zero primitive value or {@ocde void}. {@ocde void} -> {@code void} ------------- PR: https://git.openjdk.java.net/valhalla/pull/644 From mchung at openjdk.java.net Thu Feb 10 18:13:25 2022 From: mchung at openjdk.java.net (Mandy Chung) Date: Thu, 10 Feb 2022 18:13:25 GMT Subject: [lworld] RFR: 8281073: [lworld] Update MethodHandles::zero, empty, constant APIs for primitive classes [v2] In-Reply-To: References: Message-ID: > The `MethodHandles::zero` and `MethodHandles::empty` APIs are updated to return a primitive object with the default value if the given type is a primitive value type. These methods return null if the given type is a value class and a primitive reference type. > > The MethodHandles::constant method will throw `NullPointerException` if the given type is a primitive value type and the given value is null. That's the same behavior as the `int` type but such case is missing in the spec. Mandy Chung has updated the pull request incrementally with one additional commit since the last revision: fix typo ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/644/files - new: https://git.openjdk.java.net/valhalla/pull/644/files/e4d0bbe7..5f353636 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=644&range=01 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=644&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/valhalla/pull/644.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/644/head:pull/644 PR: https://git.openjdk.java.net/valhalla/pull/644 From mchung at openjdk.java.net Thu Feb 10 18:13:26 2022 From: mchung at openjdk.java.net (Mandy Chung) Date: Thu, 10 Feb 2022 18:13:26 GMT Subject: [lworld] RFR: 8281073: [lworld] Update MethodHandles::zero, empty, constant APIs for primitive classes [v2] In-Reply-To: References: Message-ID: On Thu, 10 Feb 2022 15:05:47 GMT, Alex Menkov wrote: >> Mandy Chung has updated the pull request incrementally with one additional commit since the last revision: >> >> fix typo > > src/java.base/share/classes/java/lang/invoke/MethodHandles.java line 5116: > >> 5114: * and returns a suitable default depending on the return type. >> 5115: * If the requested type is a primitive type or {@code void}, it returns >> 5116: * a zero primitive value or {@ocde void}. > > {@ocde void} -> {@code void} Thanks for catching the typo. Fixed. ------------- PR: https://git.openjdk.java.net/valhalla/pull/644 From hseigel at openjdk.java.net Thu Feb 10 18:16:35 2022 From: hseigel at openjdk.java.net (Harold Seigel) Date: Thu, 10 Feb 2022 18:16:35 GMT Subject: [lworld] RFR: 8281471: [lworld] check_code.c should not accept Q-signatures as valid Message-ID: Please review this small change to not allow Q signatures in old class files that are verified using the old verifier. The change removes checks for Q signatures from the old verifier. The fix was tested with Mach5 tiers 1-2 on Linux, Mac OS, and Windows, and Mach5 tiers 3-5 on Linux x64. Thanks, Harold ------------- Commit messages: - 8281471: [lworld] check_code.c should not accept Q-signatures as valid Changes: https://git.openjdk.java.net/valhalla/pull/645/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=645&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8281471 Stats: 146 lines in 4 files changed: 131 ins; 3 del; 12 mod Patch: https://git.openjdk.java.net/valhalla/pull/645.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/645/head:pull/645 PR: https://git.openjdk.java.net/valhalla/pull/645 From fparain at openjdk.java.net Thu Feb 10 18:29:38 2022 From: fparain at openjdk.java.net (Frederic Parain) Date: Thu, 10 Feb 2022 18:29:38 GMT Subject: [lworld] RFR: 8281471: [lworld] check_code.c should not accept Q-signatures as valid In-Reply-To: References: Message-ID: On Thu, 10 Feb 2022 18:10:56 GMT, Harold Seigel wrote: > Please review this small change to not allow Q signatures in old class files that are verified using the old verifier. The change removes checks for Q signatures from the old verifier. > > The fix was tested with Mach5 tiers 1-2 on Linux, Mac OS, and Windows, and Mach5 tiers 3-5 on Linux x64. > > Thanks, Harold Looks good to me. Fred ------------- Marked as reviewed by fparain (Committer). PR: https://git.openjdk.java.net/valhalla/pull/645 From rriggs at openjdk.java.net Thu Feb 10 20:52:30 2022 From: rriggs at openjdk.java.net (Roger Riggs) Date: Thu, 10 Feb 2022 20:52:30 GMT Subject: [lworld] RFR: 8281073: [lworld] Update MethodHandles::zero, empty, constant APIs for primitive classes [v2] In-Reply-To: References: Message-ID: On Thu, 10 Feb 2022 18:13:25 GMT, Mandy Chung wrote: >> The `MethodHandles::zero` and `MethodHandles::empty` APIs are updated to return a primitive object with the default value if the given type is a primitive value type. These methods return null if the given type is a value class and a primitive reference type. >> >> The MethodHandles::constant method will throw `NullPointerException` if the given type is a primitive value type and the given value is null. That's the same behavior as the `int` type but such case is missing in the spec. > > Mandy Chung has updated the pull request incrementally with one additional commit since the last revision: > > fix typo Marked as reviewed by rriggs (Committer). ------------- PR: https://git.openjdk.java.net/valhalla/pull/644 From dlsmith at openjdk.java.net Thu Feb 10 22:01:10 2022 From: dlsmith at openjdk.java.net (Dan Smith) Date: Thu, 10 Feb 2022 22:01:10 GMT Subject: [lworld] RFR: 8281618: Add asmtools sources as a test library Message-ID: <0SUC8DtXWAE2PYQ7SJbh_AIeYeSP3qQP_9rMCT5YrFQ=.6376e86a-58ef-4eec-9817-9705766ba42a@github.com> This is mostly a direct copy of the asmtools repo. The one interesting file is JtregDriver, which avoids various complications involved in directly invoking the asmtools 'Main' entry point. ------------- Commit messages: - Fix trailing whitespace - Added usage comment - Generalize JtregDriver for all asmtools commands - Add JtregDriver to provide an entry point that doesn't call System.exit - Add asmtools source to test/lib Changes: https://git.openjdk.java.net/valhalla/pull/646/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=646&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8281618 Stats: 27569 lines in 101 files changed: 27569 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/valhalla/pull/646.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/646/head:pull/646 PR: https://git.openjdk.java.net/valhalla/pull/646 From mchung at openjdk.java.net Thu Feb 10 22:49:46 2022 From: mchung at openjdk.java.net (Mandy Chung) Date: Thu, 10 Feb 2022 22:49:46 GMT Subject: [lworld] Integrated: 8281073: [lworld] Update MethodHandles::zero, empty, constant APIs for primitive classes In-Reply-To: References: Message-ID: <4f7iMFFxha0i0CYVVFXAX04D9H70dV2HowwagMbOVG0=.73c3ed81-88da-4235-8523-2a542a826643@github.com> On Wed, 9 Feb 2022 20:24:07 GMT, Mandy Chung wrote: > The `MethodHandles::zero` and `MethodHandles::empty` APIs are updated to return a primitive object with the default value if the given type is a primitive value type. These methods return null if the given type is a value class and a primitive reference type. > > The MethodHandles::constant method will throw `NullPointerException` if the given type is a primitive value type and the given value is null. That's the same behavior as the `int` type but such case is missing in the spec. This pull request has now been integrated. Changeset: 611fca0a Author: Mandy Chung URL: https://git.openjdk.java.net/valhalla/commit/611fca0a13051036144414e0d07509f45b5e70ca Stats: 132 lines in 2 files changed: 126 ins; 0 del; 6 mod 8281073: [lworld] Update MethodHandles::zero, empty, constant APIs for primitive classes Reviewed-by: rriggs ------------- PR: https://git.openjdk.java.net/valhalla/pull/644 From dlsmith at openjdk.java.net Thu Feb 10 23:56:23 2022 From: dlsmith at openjdk.java.net (Dan Smith) Date: Thu, 10 Feb 2022 23:56:23 GMT Subject: [lworld] RFR: 8281618: Add asmtools sources as a test library [v2] In-Reply-To: <0SUC8DtXWAE2PYQ7SJbh_AIeYeSP3qQP_9rMCT5YrFQ=.6376e86a-58ef-4eec-9817-9705766ba42a@github.com> References: <0SUC8DtXWAE2PYQ7SJbh_AIeYeSP3qQP_9rMCT5YrFQ=.6376e86a-58ef-4eec-9817-9705766ba42a@github.com> Message-ID: > This is mostly a direct copy of the asmtools repo. The one interesting file is JtregDriver, which avoids various complications involved in directly invoking the asmtools 'Main' entry point. Dan Smith 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 six additional commits since the last revision: - Merge branch 'lworld' into asmtools - Fix trailing whitespace - Added usage comment - Generalize JtregDriver for all asmtools commands - Add JtregDriver to provide an entry point that doesn't call System.exit - Add asmtools source to test/lib ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/646/files - new: https://git.openjdk.java.net/valhalla/pull/646/files/ccbec02f..ed43e819 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=646&range=01 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=646&range=00-01 Stats: 106967 lines in 2913 files changed: 70406 ins; 20833 del; 15728 mod Patch: https://git.openjdk.java.net/valhalla/pull/646.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/646/head:pull/646 PR: https://git.openjdk.java.net/valhalla/pull/646 From hseigel at openjdk.java.net Fri Feb 11 13:26:49 2022 From: hseigel at openjdk.java.net (Harold Seigel) Date: Fri, 11 Feb 2022 13:26:49 GMT Subject: [lworld] RFR: 8281471: [lworld] check_code.c should not accept Q-signatures as valid In-Reply-To: References: Message-ID: <4K6aefjUKeuj4hxamZ8vCl_v1yGcpELXkxiSw4559tI=.d4447d3a-089d-4e2c-8b96-07ec83603395@github.com> On Thu, 10 Feb 2022 18:10:56 GMT, Harold Seigel wrote: > Please review this small change to not allow Q signatures in old class files that are verified using the old verifier. The change removes checks for Q signatures from the old verifier. > > The fix was tested with Mach5 tiers 1-2 on Linux, Mac OS, and Windows, and Mach5 tiers 3-5 on Linux x64. > > Thanks, Harold Thanks Fred for the review! ------------- PR: https://git.openjdk.java.net/valhalla/pull/645 From hseigel at openjdk.java.net Fri Feb 11 13:26:50 2022 From: hseigel at openjdk.java.net (Harold Seigel) Date: Fri, 11 Feb 2022 13:26:50 GMT Subject: [lworld] Integrated: 8281471: [lworld] check_code.c should not accept Q-signatures as valid In-Reply-To: References: Message-ID: On Thu, 10 Feb 2022 18:10:56 GMT, Harold Seigel wrote: > Please review this small change to not allow Q signatures in old class files that are verified using the old verifier. The change removes checks for Q signatures from the old verifier. > > The fix was tested with Mach5 tiers 1-2 on Linux, Mac OS, and Windows, and Mach5 tiers 3-5 on Linux x64. > > Thanks, Harold This pull request has now been integrated. Changeset: c99c872f Author: Harold Seigel URL: https://git.openjdk.java.net/valhalla/commit/c99c872f9fcdcb5874b0ef046b1e645a187dba40 Stats: 146 lines in 4 files changed: 131 ins; 3 del; 12 mod 8281471: [lworld] check_code.c should not accept Q-signatures as valid Reviewed-by: fparain ------------- PR: https://git.openjdk.java.net/valhalla/pull/645 From dsimms at openjdk.java.net Mon Feb 14 19:17:40 2022 From: dsimms at openjdk.java.net (David Simms) Date: Mon, 14 Feb 2022 19:17:40 GMT Subject: [lworld] RFR: 8281618: Add asmtools sources as a test library [v2] In-Reply-To: References: <0SUC8DtXWAE2PYQ7SJbh_AIeYeSP3qQP_9rMCT5YrFQ=.6376e86a-58ef-4eec-9817-9705766ba42a@github.com> Message-ID: On Thu, 10 Feb 2022 23:56:23 GMT, Dan Smith wrote: >> This is mostly a direct copy of the asmtools repo. The one interesting file is JtregDriver, which avoids various complications involved in directly invoking the asmtools 'Main' entry point. > > Dan Smith 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 six additional commits since the last revision: > > - Merge branch 'lworld' into asmtools > - Fix trailing whitespace > - Added usage comment > - Generalize JtregDriver for all asmtools commands > - Add JtregDriver to provide an entry point that doesn't call System.exit > - Add asmtools source to test/lib There is not a good way of adding Valhalla features still in prototyping without having a Valhalla specific copy...looks good ------------- Marked as reviewed by dsimms (Committer). PR: https://git.openjdk.java.net/valhalla/pull/646 From dlsmith at openjdk.java.net Mon Feb 14 20:20:39 2022 From: dlsmith at openjdk.java.net (Dan Smith) Date: Mon, 14 Feb 2022 20:20:39 GMT Subject: [lworld] Integrated: 8281618: Add asmtools sources as a test library In-Reply-To: <0SUC8DtXWAE2PYQ7SJbh_AIeYeSP3qQP_9rMCT5YrFQ=.6376e86a-58ef-4eec-9817-9705766ba42a@github.com> References: <0SUC8DtXWAE2PYQ7SJbh_AIeYeSP3qQP_9rMCT5YrFQ=.6376e86a-58ef-4eec-9817-9705766ba42a@github.com> Message-ID: On Thu, 10 Feb 2022 21:43:59 GMT, Dan Smith wrote: > Adding the asmtools sources to test/lib to allow for valhalla feature support before the features become standard. (See https://github.com/openjdk/asmtools). > > Example usage: given a source file Foo.jasm in a test directory, the test would typically say: > > `* @build Foo` > > or maybe > > `* @compile Foo.jasm` > > These lines would be replaced with: > > `* @library /test/lib` > `* @build org.openjdk.asmtools.* org.openjdk.asmtools.jasm.*` > `* @run driver org.openjdk.asmtools.JtregDriver jasm Foo.jasm` > > I added the JtregDriver class, which takes care of things like making sure the source and class file paths are in the right place (and System.exit doesn't crash jtreg!). Everything else is a straight 'cp -R' from the asmtools repo; I'll follow up with changes to support the Valhalla class file features. This pull request has now been integrated. Changeset: dc6036f6 Author: Dan Smith URL: https://git.openjdk.java.net/valhalla/commit/dc6036f627813e5605d93be4c89bc8dfa2006bc5 Stats: 27569 lines in 101 files changed: 27569 ins; 0 del; 0 mod 8281618: Add asmtools sources as a test library Duplicate copy of asmtools that will support Valhalla class file features. Eventually those features will end up in the official asmtools & jtreg, and we can garbage-collect this fork. Reviewed-by: dsimms ------------- PR: https://git.openjdk.java.net/valhalla/pull/646 From dlsmith at openjdk.java.net Mon Feb 14 20:55:07 2022 From: dlsmith at openjdk.java.net (Dan Smith) Date: Mon, 14 Feb 2022 20:55:07 GMT Subject: [lworld] RFR: 8281763: Support Valhalla class file features in asmtools Message-ID: Modifying the Valhalla repo's fork of asmtools to implement Valhalla class file features: - ACC_VALUE, ACC_PERMITS_VALUE, and ACC_PRIMITIVE - Preload attribute - aconst_init & withfield instructions - Unnamed factory methods - Q descriptors Mainly relevant to the `jasm` tool, but there are also some interactions with `jdis` and `jdec`. No impact on `jcod`. ------------- Commit messages: - Merge branch 'asmtools' into asmtools-valhalla - Merge branch 'lworld' into asmtools - Modified asmtools files - AsmTools updates for Valhalla features - Merge branch 'lworld' into asmtools - Fix trailing whitespace - Added usage comment - Generalize JtregDriver for all asmtools commands - Add JtregDriver to provide an entry point that doesn't call System.exit - Add asmtools source to test/lib Changes: https://git.openjdk.java.net/valhalla/pull/647/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=647&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8281763 Stats: 189 lines in 14 files changed: 165 ins; 6 del; 18 mod Patch: https://git.openjdk.java.net/valhalla/pull/647.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/647/head:pull/647 PR: https://git.openjdk.java.net/valhalla/pull/647 From vromero at openjdk.java.net Tue Feb 15 05:00:53 2022 From: vromero at openjdk.java.net (Vicente Romero) Date: Tue, 15 Feb 2022 05:00:53 GMT Subject: Integrated: cleaning up overload resolution code Message-ID: Overload resolution cleanup ------------- Commit messages: - cleaning up overload resolution code Changes: https://git.openjdk.java.net/valhalla/pull/648/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=648&range=00 Stats: 29 lines in 3 files changed: 3 ins; 13 del; 13 mod Patch: https://git.openjdk.java.net/valhalla/pull/648.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/648/head:pull/648 PR: https://git.openjdk.java.net/valhalla/pull/648 From vromero at openjdk.java.net Tue Feb 15 05:00:54 2022 From: vromero at openjdk.java.net (Vicente Romero) Date: Tue, 15 Feb 2022 05:00:54 GMT Subject: Integrated: cleaning up overload resolution code In-Reply-To: References: Message-ID: On Tue, 15 Feb 2022 04:54:02 GMT, Vicente Romero wrote: > Overload resolution cleanup This pull request has now been integrated. Changeset: f171f25b Author: Vicente Romero URL: https://git.openjdk.java.net/valhalla/commit/f171f25badfb72a444739c79ad54de7ab7b8aa2f Stats: 29 lines in 3 files changed: 3 ins; 13 del; 13 mod cleaning up overload resolution code ------------- PR: https://git.openjdk.java.net/valhalla/pull/648 From dsimms at openjdk.java.net Tue Feb 15 08:50:55 2022 From: dsimms at openjdk.java.net (David Simms) Date: Tue, 15 Feb 2022 08:50:55 GMT Subject: [lworld] Integrated: Tweak header format for correctness Message-ID: Formatting ------------- Commit messages: - Tweak header format for correctness Changes: https://git.openjdk.java.net/valhalla/pull/649/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=649&range=00 Stats: 4 lines in 4 files changed: 0 ins; 0 del; 4 mod Patch: https://git.openjdk.java.net/valhalla/pull/649.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/649/head:pull/649 PR: https://git.openjdk.java.net/valhalla/pull/649 From dsimms at openjdk.java.net Tue Feb 15 08:50:55 2022 From: dsimms at openjdk.java.net (David Simms) Date: Tue, 15 Feb 2022 08:50:55 GMT Subject: [lworld] Integrated: Tweak header format for correctness In-Reply-To: References: Message-ID: On Tue, 15 Feb 2022 08:43:10 GMT, David Simms wrote: > Formatting This pull request has now been integrated. Changeset: 7c0494a4 Author: David Simms URL: https://git.openjdk.java.net/valhalla/commit/7c0494a44bf9a8ac29dcf52c5a3a29409b22c03e Stats: 4 lines in 4 files changed: 0 ins; 0 del; 4 mod Tweak header format for correctness ------------- PR: https://git.openjdk.java.net/valhalla/pull/649 From mcimadamore at openjdk.java.net Tue Feb 15 09:34:39 2022 From: mcimadamore at openjdk.java.net (Maurizio Cimadamore) Date: Tue, 15 Feb 2022 09:34:39 GMT Subject: Integrated: cleaning up overload resolution code In-Reply-To: References: Message-ID: <3OC6gIzCDsnz15C4DuM8kJjLzNLBWdHOZBNAxnNJQIA=.df594dd2-aa1c-472d-a107-aec71568f910@github.com> On Tue, 15 Feb 2022 04:54:02 GMT, Vicente Romero wrote: > Overload resolution cleanup src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java line 1058: > 1056: boolean anyIsPrimitiveClass = found.isPrimitiveClass() || req.isPrimitiveClass(); > 1057: return strict ? > 1058: (anyIsUndetVar && anyIsPrimitiveClass ? false : Could this code be simplified if we hacked directly into the subtyping routine? Note that, I believe that would be necessary anyway, because you have to take into account cases like: `List <: List` and, also: `List <: List` So, I think fixing at the level of subtyping/type-containment is what we want here. ------------- PR: https://git.openjdk.java.net/valhalla/pull/648 From vromero at openjdk.java.net Tue Feb 15 13:52:19 2022 From: vromero at openjdk.java.net (Vicente Romero) Date: Tue, 15 Feb 2022 13:52:19 GMT Subject: Integrated: cleaning up overload resolution code In-Reply-To: <3OC6gIzCDsnz15C4DuM8kJjLzNLBWdHOZBNAxnNJQIA=.df594dd2-aa1c-472d-a107-aec71568f910@github.com> References: <3OC6gIzCDsnz15C4DuM8kJjLzNLBWdHOZBNAxnNJQIA=.df594dd2-aa1c-472d-a107-aec71568f910@github.com> Message-ID: On Tue, 15 Feb 2022 09:30:44 GMT, Maurizio Cimadamore wrote: >> Overload resolution cleanup > > src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java line 1058: > >> 1056: boolean anyIsPrimitiveClass = found.isPrimitiveClass() || req.isPrimitiveClass(); >> 1057: return strict ? >> 1058: (anyIsUndetVar && anyIsPrimitiveClass ? false : > > Could this code be simplified if we hacked directly into the subtyping routine? Note that, I believe that would be necessary anyway, because you have to take into account cases like: > > `List <: List` > > and, also: > > `List <: List` > > So, I think fixing at the level of subtyping/type-containment is what we want here. sure, I will try this ------------- PR: https://git.openjdk.java.net/valhalla/pull/648 From dlsmith at openjdk.java.net Tue Feb 15 20:58:04 2022 From: dlsmith at openjdk.java.net (Dan Smith) Date: Tue, 15 Feb 2022 20:58:04 GMT Subject: [lworld] RFR: 8281880: AsmTools driver uses wrong implementation classes Message-ID: In Valhalla's copy of the AsmTools library, jtreg runs the JtregDriver with a class loader that knows about the original AsmTools bundled with jtreg. As a result, these original classes are used instead of Valhalla's modified implementation. Fix: run the driver code in the context of a class loader that will prefer the Valhalla implementation. ------------- Commit messages: - 8281880: AsmTools driver uses wrong implementation classes - Merge branch 'lworld' into asmtools - Merge branch 'lworld' into asmtools - Fix trailing whitespace - Added usage comment - Generalize JtregDriver for all asmtools commands - Add JtregDriver to provide an entry point that doesn't call System.exit - Add asmtools source to test/lib Changes: https://git.openjdk.java.net/valhalla/pull/650/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=650&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8281880 Stats: 141 lines in 1 file changed: 80 ins; 20 del; 41 mod Patch: https://git.openjdk.java.net/valhalla/pull/650.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/650/head:pull/650 PR: https://git.openjdk.java.net/valhalla/pull/650 From dlsmith at openjdk.java.net Tue Feb 15 22:57:22 2022 From: dlsmith at openjdk.java.net (Dan Smith) Date: Tue, 15 Feb 2022 22:57:22 GMT Subject: [lworld] Integrated: 8281880: AsmTools driver uses wrong implementation classes In-Reply-To: References: Message-ID: <-rU9LJJv1Iga2i4bCzjShBSZGHsV6290I0-dvm6AIEg=.4466a1f1-97bd-4aca-a666-60b88a4af407@github.com> On Tue, 15 Feb 2022 20:51:42 GMT, Dan Smith wrote: > In Valhalla's copy of the AsmTools library, jtreg runs the JtregDriver with a class loader that knows about the original AsmTools bundled with jtreg. As a result, these original classes are used instead of Valhalla's modified implementation. > > Fix: run the driver code in the context of a class loader that will prefer the Valhalla implementation. This pull request has now been integrated. Changeset: 2c8ecdb0 Author: Dan Smith URL: https://git.openjdk.java.net/valhalla/commit/2c8ecdb0cd4a3d1a0d699a5fd2cf769692c73bba Stats: 141 lines in 1 file changed: 80 ins; 20 del; 41 mod 8281880: AsmTools driver uses wrong implementation classes ------------- PR: https://git.openjdk.java.net/valhalla/pull/650 From dlsmith at openjdk.java.net Tue Feb 15 23:22:43 2022 From: dlsmith at openjdk.java.net (Dan Smith) Date: Tue, 15 Feb 2022 23:22:43 GMT Subject: [lworld] RFR: 8281763: Support Valhalla class file features in asmtools [v2] In-Reply-To: References: Message-ID: > Modifying the Valhalla repo's fork of asmtools to implement Valhalla class file features: > > - ACC_VALUE, ACC_PERMITS_VALUE, and ACC_PRIMITIVE > - Preload attribute > - aconst_init & withfield instructions > - Unnamed factory methods > - Q descriptors > > Mainly relevant to the `jasm` tool, but there are also some interactions with `jdis` and `jdec`. No impact on `jcod`. Dan Smith has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 13 commits: - Merge branch 'asmtools' into asmtools-valhalla - Merge branch 'lworld' into asmtools - 8281880: AsmTools driver uses wrong implementation classes - Merge branch 'asmtools' into asmtools-valhalla - Merge branch 'lworld' into asmtools - Modified asmtools files - AsmTools updates for Valhalla features - Merge branch 'lworld' into asmtools - Fix trailing whitespace - Added usage comment - ... and 3 more: https://git.openjdk.java.net/valhalla/compare/2c8ecdb0...634c132f ------------- Changes: https://git.openjdk.java.net/valhalla/pull/647/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=647&range=01 Stats: 189 lines in 14 files changed: 165 ins; 6 del; 18 mod Patch: https://git.openjdk.java.net/valhalla/pull/647.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/647/head:pull/647 PR: https://git.openjdk.java.net/valhalla/pull/647 From dlsmith at openjdk.java.net Tue Feb 15 23:22:44 2022 From: dlsmith at openjdk.java.net (Dan Smith) Date: Tue, 15 Feb 2022 23:22:44 GMT Subject: [lworld] RFR: 8281763: Support Valhalla class file features in asmtools In-Reply-To: References: Message-ID: On Mon, 14 Feb 2022 20:48:06 GMT, Dan Smith wrote: > Modifying the Valhalla repo's fork of asmtools to implement Valhalla class file features: > > - ACC_VALUE, ACC_PERMITS_VALUE, and ACC_PRIMITIVE > - Preload attribute > - aconst_init & withfield instructions > - Unnamed factory methods > - Q descriptors > > Mainly relevant to the `jasm` tool, but there are also some interactions with `jdis` and `jdec`. No impact on `jcod`. I don't think we typically write tests for our testing code, but here's an example that can be used to manually sanity-check the behavior: /** * @test * @summary Make sure custom jasm works * @library /test/lib * @build org.openjdk.asmtools.* org.openjdk.asmtools.jasm.* * @run driver org.openjdk.asmtools.JtregDriver jasm -strict JasmTest.jasm * @run main JasmTest */ public final primitive value class JasmTest version 62:0 { Preload java/lang/String; private final Field x:I; public static Method make:"(I)QJasmTest;" stack 2 { aconst_init JasmTest; iload_0; withfield x:I; areturn; } public static Method id:"(QJasmTest;)QJasmTest;" stack 1 { aload_0; areturn; } public static Method fail:"()V" stack 2 { new java/lang/RuntimeException; dup; invokespecial java/lang/RuntimeException.:"()V"; athrow; } public static Method main:"([Ljava/lang/String;)V" stack 1 { //invokestatic fail:"()V"; iconst_2; invokestatic make:"(I)QJasmTest;"; pop; return; } } ------------- PR: https://git.openjdk.java.net/valhalla/pull/647 From lkuskov at openjdk.java.net Wed Feb 16 02:56:25 2022 From: lkuskov at openjdk.java.net (Leonid Kuskov) Date: Wed, 16 Feb 2022 02:56:25 GMT Subject: [lworld] RFR: 8281763: Support Valhalla class file features in asmtools [v2] In-Reply-To: References: Message-ID: On Tue, 15 Feb 2022 23:22:43 GMT, Dan Smith wrote: >> Modifying the Valhalla repo's fork of asmtools to implement Valhalla class file features: >> >> - ACC_VALUE, ACC_PERMITS_VALUE, and ACC_PRIMITIVE >> - Preload attribute >> - aconst_init & withfield instructions >> - Unnamed factory methods >> - Q descriptors >> >> Mainly relevant to the `jasm` tool, but there are also some interactions with `jdis` and `jdec`. No impact on `jcod`. > > Dan Smith has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 13 commits: > > - Merge branch 'asmtools' into asmtools-valhalla > - Merge branch 'lworld' into asmtools > - 8281880: AsmTools driver uses wrong implementation classes > - Merge branch 'asmtools' into asmtools-valhalla > - Merge branch 'lworld' into asmtools > - Modified asmtools files > - AsmTools updates for Valhalla features > - Merge branch 'lworld' into asmtools > - Fix trailing whitespace > - Added usage comment > - ... and 3 more: https://git.openjdk.java.net/valhalla/compare/2c8ecdb0...634c132f Looks good to me. ------------- PR: https://git.openjdk.java.net/valhalla/pull/647 From vromero at openjdk.java.net Wed Feb 16 03:51:46 2022 From: vromero at openjdk.java.net (Vicente Romero) Date: Wed, 16 Feb 2022 03:51:46 GMT Subject: RFR: fail during inference if primitive classes are bounds during the first overload resolution phase Message-ID: Fail during inference if any bound is a primitive class during the first phase ------------- Commit messages: - removing debugging code - fail during inference if primitive classes are bounds during the first overload resolution phase Changes: https://git.openjdk.java.net/valhalla/pull/651/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=651&range=00 Stats: 15 lines in 2 files changed: 11 ins; 3 del; 1 mod Patch: https://git.openjdk.java.net/valhalla/pull/651.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/651/head:pull/651 PR: https://git.openjdk.java.net/valhalla/pull/651 From mcimadamore at openjdk.java.net Wed Feb 16 09:34:39 2022 From: mcimadamore at openjdk.java.net (Maurizio Cimadamore) Date: Wed, 16 Feb 2022 09:34:39 GMT Subject: RFR: fail during inference if primitive classes are bounds during the first overload resolution phase In-Reply-To: References: Message-ID: On Wed, 16 Feb 2022 01:06:18 GMT, Vicente Romero wrote: > Fail during inference if any bound is a primitive class during the first phase Marked as reviewed by mcimadamore (Committer). src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java line 216: > 214: deferredAttrContext.complete(); > 215: > 216: /* if boxing is not allowed then, no undetVar should have a bound that is a primitive class, unless the bound Looks good and very minimal - probably a good starting option for a prototype. Other approaches I thought of include setting "poison" bounds on the inference variable, so as to make subtyping/equality/containment fail. But it's more complex and less localized. I believe this might just work. Of course some tests are needed :-) ------------- PR: https://git.openjdk.java.net/valhalla/pull/651 From vromero at openjdk.java.net Wed Feb 16 14:15:36 2022 From: vromero at openjdk.java.net (Vicente Romero) Date: Wed, 16 Feb 2022 14:15:36 GMT Subject: RFR: fail during inference if primitive classes are bounds during the first overload resolution phase In-Reply-To: References: Message-ID: On Wed, 16 Feb 2022 09:31:16 GMT, Maurizio Cimadamore wrote: >> Fail during inference if any bound is a primitive class during the first phase > > src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java line 216: > >> 214: deferredAttrContext.complete(); >> 215: >> 216: /* if boxing is not allowed then, no undetVar should have a bound that is a primitive class, unless the bound > > Looks good and very minimal - probably a good starting option for a prototype. Other approaches I thought of include setting "poison" bounds on the inference variable, so as to make subtyping/equality/containment fail. But it's more complex and less localized. > > I believe this might just work. Of course some tests are needed :-) yep, I will add more tests, thanks for the review ------------- PR: https://git.openjdk.java.net/valhalla/pull/651 From vromero at openjdk.java.net Wed Feb 16 14:15:39 2022 From: vromero at openjdk.java.net (Vicente Romero) Date: Wed, 16 Feb 2022 14:15:39 GMT Subject: Integrated: fail during inference if primitive classes are bounds during the first overload resolution phase In-Reply-To: References: Message-ID: On Wed, 16 Feb 2022 01:06:18 GMT, Vicente Romero wrote: > Fail during inference if any bound is a primitive class during the first phase This pull request has now been integrated. Changeset: 07f6c61c Author: Vicente Romero URL: https://git.openjdk.java.net/valhalla/commit/07f6c61c45a6abc8504d85713fe27bed0a4f38b9 Stats: 15 lines in 2 files changed: 11 ins; 3 del; 1 mod fail during inference if primitive classes are bounds during the first overload resolution phase Reviewed-by: mcimadamore ------------- PR: https://git.openjdk.java.net/valhalla/pull/651 From dlsmith at openjdk.java.net Wed Feb 16 15:19:10 2022 From: dlsmith at openjdk.java.net (Dan Smith) Date: Wed, 16 Feb 2022 15:19:10 GMT Subject: git: openjdk/valhalla: lworld: 8281763: Support Valhalla class file features in asmtools Message-ID: <238e4ce0-619f-4027-885d-d3385b8e5761@openjdk.org> Changeset: 6c863ce4 Author: Dan Smith Date: 2022-02-16 15:18:44 +0000 URL: https://git.openjdk.java.net/valhalla/commit/6c863ce493e37c652406f08f1726a5518cae7116 8281763: Support Valhalla class file features in asmtools Reviewed-by: lkuskov ! test/lib/org/openjdk/asmtools/jasm/ClassData.java ! test/lib/org/openjdk/asmtools/jasm/JasmTokens.java ! test/lib/org/openjdk/asmtools/jasm/Modifiers.java ! test/lib/org/openjdk/asmtools/jasm/OpcodeTables.java ! test/lib/org/openjdk/asmtools/jasm/Parser.java ! test/lib/org/openjdk/asmtools/jasm/ParserInstr.java + test/lib/org/openjdk/asmtools/jasm/PreloadAttr.java ! test/lib/org/openjdk/asmtools/jasm/RuntimeConstants.java ! test/lib/org/openjdk/asmtools/jasm/Tables.java ! test/lib/org/openjdk/asmtools/jasm/i18n.properties ! test/lib/org/openjdk/asmtools/jdec/ClassData.java ! test/lib/org/openjdk/asmtools/jdis/ClassData.java ! test/lib/org/openjdk/asmtools/jdis/CodeData.java + test/lib/org/openjdk/asmtools/jdis/PreloadData.java From dlsmith at openjdk.java.net Wed Feb 16 15:23:45 2022 From: dlsmith at openjdk.java.net (Dan Smith) Date: Wed, 16 Feb 2022 15:23:45 GMT Subject: [lworld] Integrated: 8281763: Support Valhalla class file features in asmtools In-Reply-To: References: Message-ID: On Mon, 14 Feb 2022 20:48:06 GMT, Dan Smith wrote: > Modifying the Valhalla repo's fork of asmtools to implement Valhalla class file features: > > - ACC_VALUE, ACC_PERMITS_VALUE, and ACC_PRIMITIVE > - Preload attribute > - aconst_init & withfield instructions > - Unnamed factory methods > - Q descriptors > > Mainly relevant to the `jasm` tool, but there are also some interactions with `jdis` and `jdec`. No impact on `jcod`. This pull request has now been integrated. Changeset: 6c863ce4 Author: Dan Smith URL: https://git.openjdk.java.net/valhalla/commit/6c863ce493e37c652406f08f1726a5518cae7116 Stats: 189 lines in 14 files changed: 165 ins; 6 del; 18 mod 8281763: Support Valhalla class file features in asmtools Reviewed-by: lkuskov ------------- PR: https://git.openjdk.java.net/valhalla/pull/647 From vromero at openjdk.java.net Thu Feb 17 00:47:33 2022 From: vromero at openjdk.java.net (Vicente Romero) Date: Thu, 17 Feb 2022 00:47:33 GMT Subject: Integrated: Merge lworld Message-ID: Merge lworld into universal-tvars ------------- Commit messages: - Merge branch 'lworld' into universal-tvars_merge_lworld_1 - fail during inference if primitive classes are bounds during the first overload resolution phase - cleaning up overload resolution code - Merge lworld - some existing regression tests are failing due to universal tvars changes - Adding type system regression tests - some bug fixing, adding new regression tests - Merge lworld - Primitive value conversion - updating tests - ... and 6 more: https://git.openjdk.java.net/valhalla/compare/6c863ce4...3f6df0aa The merge commit only contains trivial merges, so no merge-specific webrevs have been generated. Changes: https://git.openjdk.java.net/valhalla/pull/652/files Stats: 1182 lines in 29 files changed: 1079 ins; 26 del; 77 mod Patch: https://git.openjdk.java.net/valhalla/pull/652.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/652/head:pull/652 PR: https://git.openjdk.java.net/valhalla/pull/652 From vromero at openjdk.java.net Thu Feb 17 00:47:34 2022 From: vromero at openjdk.java.net (Vicente Romero) Date: Thu, 17 Feb 2022 00:47:34 GMT Subject: Integrated: Merge lworld In-Reply-To: References: Message-ID: On Thu, 17 Feb 2022 00:34:47 GMT, Vicente Romero wrote: > Merge lworld into universal-tvars This pull request has now been integrated. Changeset: 469c04cb Author: Vicente Romero URL: https://git.openjdk.java.net/valhalla/commit/469c04cbc2e047cc8065fc7953471a27bc731da8 Stats: 28170 lines in 126 files changed: 28069 ins; 25 del; 76 mod Merge lworld ------------- PR: https://git.openjdk.java.net/valhalla/pull/652 From dlsmith at openjdk.java.net Thu Feb 17 01:03:36 2022 From: dlsmith at openjdk.java.net (Dan Smith) Date: Thu, 17 Feb 2022 01:03:36 GMT Subject: [lworld] RFR: 8281283: Remove usages of __WithField in runtime tests Message-ID: Modifying Valhalla runtime tests to no longer use `__WithField` as a macro for the `withfield` instruction. Most uses can be replaced with standard constructor compilation via javac. The remaining uses are rewritten in jasm. Summary of changes: - Remove all uses of `-XDallowWithFieldOperator` - Replace various `make` and `create` factory methods for primitive classes with constructors - Bug fixes for `JumboInline` that were exposed by this change - Rewrote `TestFieldNullability` to use jasm - Rewrote `VWithFieldTest` to use jasm, renamed `WithFieldTest` - Rewrote `WithFieldAccessorTest` to use jasm, made more comprehensive - Deleted `WithFieldNoAccessTest`, made redundant by `WithFieldAccessorTest` changes - Minor tweaks to `TestFieldTypeMismatch` for consistent jasm usage - Cleanup of some debugging output in `asmtools.JtregDriver` ------------- Commit messages: - Fix whitespace - WithFieldNoAccessTest is superceded by revised WithFieldAccessTest - withfield tests using jasm - Fix up jasm tests - Fix whitespace - Merge branch 'lworld' into 8281283 - Convert TestFieldNullability to jasm - Convert __Withfield usages in factories to constructors Changes: https://git.openjdk.java.net/valhalla/pull/653/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=653&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8281283 Stats: 2016 lines in 38 files changed: 703 ins; 1105 del; 208 mod Patch: https://git.openjdk.java.net/valhalla/pull/653.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/653/head:pull/653 PR: https://git.openjdk.java.net/valhalla/pull/653 From duke at openjdk.java.net Thu Feb 17 12:03:36 2022 From: duke at openjdk.java.net (ExE Boss) Date: Thu, 17 Feb 2022 12:03:36 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. I?personally?think that?extending the?upcoming `AccessFlag`[^1]?enum is?a?better?option. [^1]: https://github.com/openjdk/jdk/pull/7445 ------------- PR: https://git.openjdk.java.net/valhalla/pull/640 From dlsmith at openjdk.java.net Thu Feb 17 19:13:41 2022 From: dlsmith at openjdk.java.net (Dan Smith) Date: Thu, 17 Feb 2022 19:13:41 GMT Subject: [lworld] RFR: 8281283: Remove usages of __WithField in runtime tests In-Reply-To: References: Message-ID: On Thu, 17 Feb 2022 00:56:50 GMT, Dan Smith wrote: > Modifying Valhalla runtime tests to no longer use `__WithField` as a macro for the `withfield` instruction. Most uses can be replaced with standard constructor compilation via javac. The remaining uses are rewritten in jasm. > > Summary of changes: > > - Remove all uses of `-XDallowWithFieldOperator` > - Replace various `make` and `create` factory methods for primitive classes with constructors > - Bug fixes for `JumboInline` that were exposed by this change > - Rewrote `TestFieldNullability` to use jasm > - Rewrote `VWithFieldTest` to use jasm, renamed `WithFieldTest` > - Rewrote `WithFieldAccessorTest` to use jasm, made more comprehensive > - Deleted `WithFieldNoAccessTest`, made redundant by `WithFieldAccessorTest` changes > - Minor tweaks to `TestFieldTypeMismatch` for consistent jasm usage > - Cleanup of some debugging output in `asmtools.JtregDriver` test/hotspot/jtreg/runtime/valhalla/inlinetypes/JumboInline.java line 79: > 77: j = __WithField(j.l1, l1); > 78: j = __WithField(j.l2, l0 + l1); > 79: j = __WithField(j.l3, l1 + l2); Bug here (and the following lines): `l2` refers to `this.l2`, not `j.l2`?if `this` is `JumboInline.default`, that value is 0, not `l0+l1`. test/hotspot/jtreg/runtime/valhalla/inlinetypes/JumboInline.java line 113: > 111: return (l0 == j.l0 && l1 == j.l1 && l2 == j.l2 && l3 == j.l3 > 112: && l4 == j.l4 && l5 == j.l5 && l6 == j.l6 && l7 == j.l7 > 113: && l8 == j.l8 && l9 == j.l9 && l10 == j.l10 && l7 == j.l10 `l7 == j.l10`? Happens to work, because these are always 0, per the above bug. ------------- PR: https://git.openjdk.java.net/valhalla/pull/653 From dlsmith at openjdk.java.net Thu Feb 17 19:26:29 2022 From: dlsmith at openjdk.java.net (Dan Smith) Date: Thu, 17 Feb 2022 19:26:29 GMT Subject: [lworld] RFR: 8281283: Remove usages of __WithField in runtime tests In-Reply-To: References: Message-ID: On Thu, 17 Feb 2022 00:56:50 GMT, Dan Smith wrote: > Modifying Valhalla runtime tests to no longer use `__WithField` as a macro for the `withfield` instruction. Most uses can be replaced with standard constructor compilation via javac. The remaining uses are rewritten in jasm. > > Summary of changes: > > - Remove all uses of `-XDallowWithFieldOperator` > - Replace various `make` and `create` factory methods for primitive classes with constructors > - Bug fixes for `JumboInline` that were exposed by this change > - Rewrote `TestFieldNullability` to use jasm > - Rewrote `VWithFieldTest` to use jasm, renamed `WithFieldTest` > - Rewrote `WithFieldAccessorTest` to use jasm, made more comprehensive > - Deleted `WithFieldNoAccessTest`, made redundant by `WithFieldAccessorTest` changes > - Minor tweaks to `TestFieldTypeMismatch` for consistent jasm usage > - Cleanup of some debugging output in `asmtools.JtregDriver` test/hotspot/jtreg/runtime/valhalla/inlinetypes/TestFieldTypeMismatch.java line 32: > 30: * @library /test/lib > 31: * @build org.openjdk.asmtools.* org.openjdk.asmtools.jasm.* > 32: * @run driver org.openjdk.asmtools.JtregDriver jasm -strict TestFieldTypeMismatchClasses.jasm Naming convention change: suggest putting jasm classes in a file named `[Test name]Classes.jasm`. No need for any classes declared there to actually use that name, although they should have names that won't clash with other tests in this directory. test/hotspot/jtreg/runtime/valhalla/inlinetypes/TestValue4.java line 48: > 46: > 47: public TestValue4() { > 48: this((int) System.nanoTime()); Don't need the bit twiddling logic, because it's reproduced by the ByteBuffer reads in the other constructor. test/hotspot/jtreg/runtime/valhalla/inlinetypes/WithFieldAccessorTest.java line 66: > 64: catchAccessError(() -> WithFieldSamePackage.withL(start, 10)); > 65: catchAccessError(() -> WithFieldSamePackage.withD(start, 11)); > 66: catchAccessError(() -> WithFieldSamePackage.withI(start, 12)); These calls replace the WithFieldNoAccessTest. (Not checking error messages. Should I add that?) test/hotspot/jtreg/runtime/valhalla/inlinetypes/WithFieldAccessorTestClasses.jasm line 31: > 29: public final Field c:C; > 30: protected final Field l:J; > 31: final Field d:D; Added a package-access field to test that, too. test/hotspot/jtreg/runtime/valhalla/inlinetypes/WithFieldAccessorTestClasses.jasm line 151: > 149: } > 150: > 151: public final primitive value class runtime/valhalla/inlinetypes/WithFieldNestHost Additional test methods here, so we can test both the nest "sibling" and the nest "parent". test/hotspot/jtreg/runtime/valhalla/inlinetypes/WithFieldTest.java line 1: > 1: /* Renamed VWithFieldTest --> WithFieldTest test/hotspot/jtreg/runtime/valhalla/inlinetypes/WithFieldTest.java line 77: > 75: static Point[] p_values = new Point[] { new Point(0, 0), new Point(-1, 1), new Point(1, -1)}; > 76: > 77: static void allTypesTest() { Restructured this logic to avoid managing a bunch of arrays in jasm. Same behavior, the test data just lives outside of the class now. ------------- PR: https://git.openjdk.java.net/valhalla/pull/653 From duke at openjdk.java.net Thu Feb 17 19:35:35 2022 From: duke at openjdk.java.net (liach) Date: Thu, 17 Feb 2022 19:35:35 GMT Subject: [lworld] RFR: 8281463: [lworld] VALUE / PRIMITIVE modifiers should be supported by reflection In-Reply-To: References: Message-ID: <8E6nSQK5AAnFJ4YuTG4aA51xlko_5qgqZZrpzcuD_kw=.468aa2e7-b506-44e4-b21f-318129406106@github.com> 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. > I?personally?think that?extending the?upcoming `AccessFlag`?enum is?a?better?option. I recall that pr was created exactly for valhalla: that in valhalla, class modifier start to use bits used by method/parameter-exclusive modifiers, which made that issue more urgent. ------------- PR: https://git.openjdk.java.net/valhalla/pull/640 From rriggs at openjdk.java.net Thu Feb 17 19:56:35 2022 From: rriggs at openjdk.java.net (Roger Riggs) Date: Thu, 17 Feb 2022 19:56:35 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. The need in Valhalla isn't urgent and the need prompted the AccessFlag proposal. I figure to wait for that to settle and be integrated into Valhalla. Then revise this PR to refer people to AccessFlags and update the javadoc only to avoid confusion. I'll switch this back to "Draft" for the time being. ------------- PR: https://git.openjdk.java.net/valhalla/pull/640 From vromero at openjdk.java.net Fri Feb 18 01:02:42 2022 From: vromero at openjdk.java.net (Vicente Romero) Date: Fri, 18 Feb 2022 01:02:42 GMT Subject: RFR: fixing bugs in inference and type system more regression tests Message-ID: this PR is adapting Types::glb so that it can deal with primitive classes. It also fixes a bug in inference, basically we are now failing during overload resolution if any undetVar has a bound that is a primitive class. But a bug was making inference fail after overload resolution in some cases. ------------- Commit messages: - fixing bugs in inference and type system Changes: https://git.openjdk.java.net/valhalla/pull/654/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=654&range=00 Stats: 36 lines in 3 files changed: 31 ins; 1 del; 4 mod Patch: https://git.openjdk.java.net/valhalla/pull/654.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/654/head:pull/654 PR: https://git.openjdk.java.net/valhalla/pull/654 From mcimadamore at openjdk.java.net Fri Feb 18 11:09:27 2022 From: mcimadamore at openjdk.java.net (Maurizio Cimadamore) Date: Fri, 18 Feb 2022 11:09:27 GMT Subject: RFR: fixing bugs in inference and type system more regression tests In-Reply-To: References: Message-ID: On Fri, 18 Feb 2022 00:55:43 GMT, Vicente Romero wrote: > this PR is adapting Types::glb so that it can deal with primitive classes. It also fixes a bug in inference, basically we are now failing during overload resolution if any undetVar has a bound that is a primitive class. But a bug was making inference fail after overload resolution in some cases. Looks good. I think we should add more tests - e.g. you want to check that, given two primitive types P1 and P2 which both extend a common superinterface I, then: * lub(P1, P2) == lub(P1, I) == lub(P2, I) == I. * lub(P1, P1.ref) = P1.ref * glb(P1, P1.ref) = P1 * glb(P1, I) == P1 * glb(P1.ref, I) == P1.ref * glb(P2, I) == P2 * glb(P2.ref, I) == P2.ref ------------- PR: https://git.openjdk.java.net/valhalla/pull/654 From vromero at openjdk.java.net Fri Feb 18 13:56:14 2022 From: vromero at openjdk.java.net (Vicente Romero) Date: Fri, 18 Feb 2022 13:56:14 GMT Subject: RFR: fixing bugs in inference and type system more regression tests In-Reply-To: References: Message-ID: <26wH9i7HxeUscq3UsmtohJ0qSXYdiZZkVIlO3zi4mu0=.d8696547-93b6-47be-bafc-ade5301b5a07@github.com> On Fri, 18 Feb 2022 11:06:24 GMT, Maurizio Cimadamore wrote: > Looks good. I think we should add more tests - e.g. you want to check that, given two primitive types P1 and P2 which both extend a common superinterface I, then: > > * lub(P1, P2) == lub(P1, I) == lub(P2, I) == I. > > * lub(P1, P1.ref) = P1.ref > > * glb(P1, P1.ref) = P1 > > * glb(P1, I) == P1 > > * glb(P1.ref, I) == P1.ref > > * glb(P2, I) == P2 > > * glb(P2.ref, I) == P2.ref > : sure, I will add more tests before pushing, thanks ------------- PR: https://git.openjdk.java.net/valhalla/pull/654 From vromero at openjdk.java.net Fri Feb 18 17:22:00 2022 From: vromero at openjdk.java.net (Vicente Romero) Date: Fri, 18 Feb 2022 17:22:00 GMT Subject: RFR: fixing bugs in inference and type system more regression tests [v2] In-Reply-To: References: Message-ID: > this PR is adapting Types::glb so that it can deal with primitive classes. It also fixes a bug in inference, basically we are now failing during overload resolution if any undetVar has a bound that is a primitive class. But a bug was making inference fail after overload resolution in some cases. Vicente Romero has updated the pull request incrementally with two additional commits since the last revision: - Merge remote-tracking branch 'refs/remotes/origin/fixing.bugs.in.inference' into fixing.bugs.in.inference - fixing bugs in inference and type system ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/654/files - new: https://git.openjdk.java.net/valhalla/pull/654/files/860c6726..00ad577c Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=654&range=01 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=654&range=00-01 Stats: 8 lines in 1 file changed: 5 ins; 0 del; 3 mod Patch: https://git.openjdk.java.net/valhalla/pull/654.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/654/head:pull/654 PR: https://git.openjdk.java.net/valhalla/pull/654 From vromero at openjdk.java.net Fri Feb 18 17:26:16 2022 From: vromero at openjdk.java.net (Vicente Romero) Date: Fri, 18 Feb 2022 17:26:16 GMT Subject: Integrated: fixing bugs in inference and type system more regression tests In-Reply-To: References: Message-ID: On Fri, 18 Feb 2022 00:55:43 GMT, Vicente Romero wrote: > this PR is adapting Types::glb so that it can deal with primitive classes. It also fixes a bug in inference, basically we are now failing during overload resolution if any undetVar has a bound that is a primitive class. But a bug was making inference fail after overload resolution in some cases. This pull request has now been integrated. Changeset: aef8323a Author: Vicente Romero URL: https://git.openjdk.java.net/valhalla/commit/aef8323a3355b1ed3f00a07907054fca8ea8339f Stats: 44 lines in 4 files changed: 36 ins; 1 del; 7 mod fixing bugs in inference and type system more regression tests ------------- PR: https://git.openjdk.java.net/valhalla/pull/654 From rriggs at openjdk.java.net Fri Feb 18 21:43:23 2022 From: rriggs at openjdk.java.net (Roger Riggs) Date: Fri, 18 Feb 2022 21:43:23 GMT Subject: [lworld] RFR: 8281283: Remove usages of __WithField in runtime tests In-Reply-To: References: Message-ID: On Thu, 17 Feb 2022 00:56:50 GMT, Dan Smith wrote: > Modifying Valhalla runtime tests to no longer use `__WithField` as a macro for the `withfield` instruction. Most uses can be replaced with standard constructor compilation via javac. The remaining uses are rewritten in jasm. > > Summary of changes: > > - Remove all uses of `-XDallowWithFieldOperator` > - Replace various `make` and `create` factory methods for primitive classes with constructors > - Bug fixes for `JumboInline` that were exposed by this change > - Rewrote `TestFieldNullability` to use jasm > - Rewrote `VWithFieldTest` to use jasm, renamed `WithFieldTest` > - Rewrote `WithFieldAccessorTest` to use jasm, made more comprehensive > - Deleted `WithFieldNoAccessTest`, made redundant by `WithFieldAccessorTest` changes > - Minor tweaks to `TestFieldTypeMismatch` for consistent jasm usage > - Cleanup of some debugging output in `asmtools.JtregDriver` Spot checked. LGTM ------------- Marked as reviewed by rriggs (Committer). PR: https://git.openjdk.java.net/valhalla/pull/653 From vromero at openjdk.java.net Fri Feb 18 22:58:41 2022 From: vromero at openjdk.java.net (Vicente Romero) Date: Fri, 18 Feb 2022 22:58:41 GMT Subject: Integrated: clean up to warnings related code Message-ID: clean up to warnings for universal tvars ------------- Commit messages: - cleaning up warnings related code Changes: https://git.openjdk.java.net/valhalla/pull/655/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=655&range=00 Stats: 71 lines in 5 files changed: 63 ins; 5 del; 3 mod Patch: https://git.openjdk.java.net/valhalla/pull/655.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/655/head:pull/655 PR: https://git.openjdk.java.net/valhalla/pull/655 From vromero at openjdk.java.net Fri Feb 18 22:58:42 2022 From: vromero at openjdk.java.net (Vicente Romero) Date: Fri, 18 Feb 2022 22:58:42 GMT Subject: Integrated: clean up to warnings related code In-Reply-To: References: Message-ID: <5pBYjUFLqsJaxgHSClk5ELJQ0VsJZfYzdqrWgOcYWvk=.3292bf71-71d2-4c7d-9b69-7a862466dbe2@github.com> On Fri, 18 Feb 2022 22:52:41 GMT, Vicente Romero wrote: > clean up to warnings for universal tvars This pull request has now been integrated. Changeset: b0450ed2 Author: Vicente Romero URL: https://git.openjdk.java.net/valhalla/commit/b0450ed29b02eb84712632519ef28c0eabcc98b6 Stats: 71 lines in 5 files changed: 63 ins; 5 del; 3 mod clean up to warnings related code ------------- PR: https://git.openjdk.java.net/valhalla/pull/655 From dsimms at openjdk.java.net Mon Feb 21 07:50:08 2022 From: dsimms at openjdk.java.net (David Simms) Date: Mon, 21 Feb 2022 07:50:08 GMT Subject: [lworld] RFR: 8281283: Remove usages of __WithField in runtime tests In-Reply-To: References: Message-ID: On Thu, 17 Feb 2022 00:56:50 GMT, Dan Smith wrote: > Modifying Valhalla runtime tests to no longer use `__WithField` as a macro for the `withfield` instruction. Most uses can be replaced with standard constructor compilation via javac. The remaining uses are rewritten in jasm. > > Summary of changes: > > - Remove all uses of `-XDallowWithFieldOperator` > - Replace various `make` and `create` factory methods for primitive classes with constructors > - Bug fixes for `JumboInline` that were exposed by this change > - Rewrote `TestFieldNullability` to use jasm > - Rewrote `VWithFieldTest` to use jasm, renamed `WithFieldTest` > - Rewrote `WithFieldAccessorTest` to use jasm, made more comprehensive > - Deleted `WithFieldNoAccessTest`, made redundant by `WithFieldAccessorTest` changes > - Minor tweaks to `TestFieldTypeMismatch` for consistent jasm usage > - Cleanup of some debugging output in `asmtools.JtregDriver` For my part the Hotspot Runtime tests look good. Thanks for cleaning some of the old cruft where appropriate. ------------- Marked as reviewed by dsimms (Committer). PR: https://git.openjdk.java.net/valhalla/pull/653 From dsimms at openjdk.java.net Mon Feb 21 07:50:13 2022 From: dsimms at openjdk.java.net (David Simms) Date: Mon, 21 Feb 2022 07:50:13 GMT Subject: [lworld] RFR: 8281283: Remove usages of __WithField in runtime tests In-Reply-To: References: Message-ID: On Thu, 17 Feb 2022 19:09:05 GMT, Dan Smith wrote: >> Modifying Valhalla runtime tests to no longer use `__WithField` as a macro for the `withfield` instruction. Most uses can be replaced with standard constructor compilation via javac. The remaining uses are rewritten in jasm. >> >> Summary of changes: >> >> - Remove all uses of `-XDallowWithFieldOperator` >> - Replace various `make` and `create` factory methods for primitive classes with constructors >> - Bug fixes for `JumboInline` that were exposed by this change >> - Rewrote `TestFieldNullability` to use jasm >> - Rewrote `VWithFieldTest` to use jasm, renamed `WithFieldTest` >> - Rewrote `WithFieldAccessorTest` to use jasm, made more comprehensive >> - Deleted `WithFieldNoAccessTest`, made redundant by `WithFieldAccessorTest` changes >> - Minor tweaks to `TestFieldTypeMismatch` for consistent jasm usage >> - Cleanup of some debugging output in `asmtools.JtregDriver` > > test/hotspot/jtreg/runtime/valhalla/inlinetypes/JumboInline.java line 79: > >> 77: j = __WithField(j.l1, l1); >> 78: j = __WithField(j.l2, l0 + l1); >> 79: j = __WithField(j.l3, l1 + l2); > > Bug here (and the following lines): `l2` refers to `this.l2`, not `j.l2`?if `this` is `JumboInline.default`, that value is 0, not `l0+l1`. Agreed > test/hotspot/jtreg/runtime/valhalla/inlinetypes/JumboInline.java line 113: > >> 111: return (l0 == j.l0 && l1 == j.l1 && l2 == j.l2 && l3 == j.l3 >> 112: && l4 == j.l4 && l5 == j.l5 && l6 == j.l6 && l7 == j.l7 >> 113: && l8 == j.l8 && l9 == j.l9 && l10 == j.l10 && l7 == j.l10 > > `l7 == j.l10`? Happens to work, because these are always 0, per the above bug. The newer code here is cleaner, and more importantly correct. Again, agree, it only worked since "0" default > test/hotspot/jtreg/runtime/valhalla/inlinetypes/TestFieldTypeMismatch.java line 32: > >> 30: * @library /test/lib >> 31: * @build org.openjdk.asmtools.* org.openjdk.asmtools.jasm.* >> 32: * @run driver org.openjdk.asmtools.JtregDriver jasm -strict TestFieldTypeMismatchClasses.jasm > > Naming convention change: suggest putting jasm classes in a file named `[Test name]Classes.jasm`. No need for any classes declared there to actually use that name, although they should have names that won't clash with other tests in this directory. Good idea > test/hotspot/jtreg/runtime/valhalla/inlinetypes/TestValue4.java line 48: > >> 46: >> 47: public TestValue4() { >> 48: this((int) System.nanoTime()); > > Don't need the bit twiddling logic, because it's reproduced by the ByteBuffer reads in the other constructor. At some point early on, debugging the interpreter was probably easy to not leave the frame, hence the manual bit twiddle, but I think we are past that now, nice clean up. > test/hotspot/jtreg/runtime/valhalla/inlinetypes/WithFieldAccessorTest.java line 66: > >> 64: catchAccessError(() -> WithFieldSamePackage.withL(start, 10)); >> 65: catchAccessError(() -> WithFieldSamePackage.withD(start, 11)); >> 66: catchAccessError(() -> WithFieldSamePackage.withI(start, 12)); > > These calls replace the WithFieldNoAccessTest. (Not checking error messages. Should I add that?) I think error message was more useful when things were unstable and this test broke more easily. Assume the frame information is correct and offending line number can be determined. Looks good. ------------- PR: https://git.openjdk.java.net/valhalla/pull/653 From sadayapalam at openjdk.java.net Tue Feb 22 09:39:57 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Tue, 22 Feb 2022 09:39:57 GMT Subject: [lworld] RFR: 8281323: [lworld] Unnecessary entries in Preload attribute Message-ID: Reimplement generation of Preload attribute decoupling it from InnerClasses attribute generation to minimize/eliminate needless entries from the Preload list ------------- Commit messages: - Fix white space errors - 8281323: Unnecessary entries in Preload attribute Changes: https://git.openjdk.java.net/valhalla/pull/656/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=656&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8281323 Stats: 342 lines in 8 files changed: 268 ins; 46 del; 28 mod Patch: https://git.openjdk.java.net/valhalla/pull/656.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/656/head:pull/656 PR: https://git.openjdk.java.net/valhalla/pull/656 From sadayapalam at openjdk.java.net Tue Feb 22 09:45:12 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Tue, 22 Feb 2022 09:45:12 GMT Subject: [lworld] RFR: 8281323: [lworld] Unnecessary entries in Preload attribute In-Reply-To: References: Message-ID: On Tue, 22 Feb 2022 09:29:37 GMT, Srikanth Adayapalam wrote: > Reimplement generation of Preload attribute decoupling it from InnerClasses attribute generation to minimize/eliminate needless entries from the Preload list Notes for reviewer: This change basically decouples the generation of Preload attribute from InnerClasses attribute - that scheme generates redundant entries as shows by https://bugs.openjdk.java.net/browse/JDK-8281323 and also as can be determined by a review of the draft JEP at https://openjdk.java.net/jeps/8277163 which simply says: Each class file generated by javac includes a Preload attribute naming any value class that appears in one of the class file's declared field or method descriptors. In internal discussions, the VM team also has expressed an interest in seeing those value classes that appear as types of local variables in Preload list. In Internal discussions, it was pointed out that where arrays are involved, if the component type happens to be a value type, it is not useful to see a Preload entry for that value class. This PR also happens to solve https://bugs.openjdk.java.net/browse/JDK-8280942 - the reimplementation simply subsumes that fix too. ------------- PR: https://git.openjdk.java.net/valhalla/pull/656 From scott at adligo.com Tue Feb 22 01:44:51 2022 From: scott at adligo.com (Scott Morgan) Date: Mon, 21 Feb 2022 19:44:51 -0600 Subject: Fwd: Custom Primitives? In-Reply-To: References: Message-ID: Hi All, I've been messing around with some data structures / arrays lately and I am wondering if Java will ever have custom primitives, and if those custom primitives could contain optional pointers in some way. I have found a number of similar things Value Classes, https://openjdk.java.net/jeps/401 Primitive Value Classes, etc, but I'm really looking for something a little lower level. Ideally I would like to store an array (with a single pointer pointing at it) of one boolean and one optional pointer / reference, in a primitive array structure to reduce the space of the null pointers. However this creates some obvious problems as length of the boolean only could be one bit and the boolean + the pointer / reference could be 8 bytes and one bit (on 64 bit JVMs). Without the fixed length size of the primitive, I imagine that the mapping to bytes and array indexes would be quite challenging & slow. However I have a gut feeling that something like this path must be possible. Are there any plans to solve problems like these in the current JEPs? Is anyone doing similar research? Cheers, -- Regards, Scott Morgan President & CEO Adligo Inc http://www.adligo.com https://www.linkedin.com/in/scott-morgan-21739415 A+ Better Business Bureau Rating https://github.com/adligo By Appointment Only: 1-866-968-1893 Ex 101 scott at adligo.com skype:adligo1?call Send Me Files Securely: *https://www.sendthisfile.com/f.jsp?id=ewOnyeFQM18IDRf7MMIdolfI * https://discord.com/ Adligo#3066 -- Regards, Scott Morgan President & CEO Adligo Inc http://www.adligo.com https://www.linkedin.com/in/scott-morgan-21739415 A+ Better Business Bureau Rating https://github.com/adligo By Appointment Only: 1-866-968-1893 Ex 101 scott at adligo.com skype:adligo1?call Send Me Files Securely: *https://www.sendthisfile.com/f.jsp?id=ewOnyeFQM18IDRf7MMIdolfI * https://discord.com/ Adligo#3066 From sadayapalam at openjdk.java.net Wed Feb 23 09:13:34 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Wed, 23 Feb 2022 09:13:34 GMT Subject: [lworld] Integrated: 8282108: [lworld] Enhance CreateSymbols to read Preload attribute In-Reply-To: <_211zSDzXdBGVEWhq25rnLc6p51RH8fm_RozwYlJW_w=.2d523564-15e3-48a6-ab01-b3d327899ffd@github.com> References: <_211zSDzXdBGVEWhq25rnLc6p51RH8fm_RozwYlJW_w=.2d523564-15e3-48a6-ab01-b3d327899ffd@github.com> Message-ID: On Wed, 23 Feb 2022 09:06:34 GMT, Srikanth Adayapalam wrote: > Arrange to skip Preload attribute as it is not relevant to compilation This pull request has now been integrated. Changeset: 52546456 Author: Srikanth Adayapalam URL: https://git.openjdk.java.net/valhalla/commit/52546456dd9c53152f807a1306a2ff3e19cfab2e Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod 8282108: [lworld] Enhance CreateSymbols to read Preload attribute ------------- PR: https://git.openjdk.java.net/valhalla/pull/657 From sadayapalam at openjdk.java.net Wed Feb 23 09:13:33 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Wed, 23 Feb 2022 09:13:33 GMT Subject: [lworld] Integrated: 8282108: [lworld] Enhance CreateSymbols to read Preload attribute Message-ID: <_211zSDzXdBGVEWhq25rnLc6p51RH8fm_RozwYlJW_w=.2d523564-15e3-48a6-ab01-b3d327899ffd@github.com> Arrange to skip Preload attribute as it is not relevant to compilation ------------- Commit messages: - 8282108: Enhance CreateSymbols to read Preload attribute Changes: https://git.openjdk.java.net/valhalla/pull/657/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=657&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8282108 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/valhalla/pull/657.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/657/head:pull/657 PR: https://git.openjdk.java.net/valhalla/pull/657 From duke at openjdk.java.net Wed Feb 23 10:39:21 2022 From: duke at openjdk.java.net (Aggelos Biboudis) Date: Wed, 23 Feb 2022 10:39:21 GMT Subject: [lworld] RFR: 8281323: [lworld] Unnecessary entries in Preload attribute In-Reply-To: References: Message-ID: On Tue, 22 Feb 2022 09:29:37 GMT, Srikanth Adayapalam wrote: > Reimplement generation of Preload attribute decoupling it from InnerClasses attribute generation to minimize/eliminate needless entries from the Preload list Looks good! src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/PoolWriter.java line 260: > 258: } > 259: c.complete(); > 260: if (c.isValueClass() && !c.isPrimitiveClass()) { This is fully covered by `requiresPreload` in `Type`. Actually more strict, because of the `if (this.isReferenceProjection()) return true;` condition in the previous method. Is my understanding correct? ------------- Marked as reviewed by biboudis at github.com (no known OpenJDK username). PR: https://git.openjdk.java.net/valhalla/pull/656 From sadayapalam at openjdk.java.net Wed Feb 23 10:54:17 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Wed, 23 Feb 2022 10:54:17 GMT Subject: [lworld] RFR: 8281323: [lworld] Unnecessary entries in Preload attribute In-Reply-To: References: Message-ID: On Wed, 23 Feb 2022 10:33:30 GMT, Aggelos Biboudis wrote: > This is fully covered by `requiresPreload` in `Type`. Actually more strict, because of the `if (this.isReferenceProjection()) return true;` condition in the previous method. Is my understanding correct? Yes, you are correct. The check if (this.isReferenceProjection()) return true; covers the requirement for https://bugs.openjdk.java.net/browse/JDK-8280942 The check return this.isValueClass() && !this.isPrimitiveClass(); works for "pure" B2 classes. (every B3 is also a B2) So we are saying in effect preload is required for pure B2 classes or for a B3 class whose reference projection is used (in field/method descriptors and/or local types) ------------- PR: https://git.openjdk.java.net/valhalla/pull/656 From sadayapalam at openjdk.java.net Wed Feb 23 10:57:24 2022 From: sadayapalam at openjdk.java.net (Srikanth Adayapalam) Date: Wed, 23 Feb 2022 10:57:24 GMT Subject: [lworld] Integrated: 8281323: [lworld] Unnecessary entries in Preload attribute In-Reply-To: References: Message-ID: <4cib0jjnrs7wfw8brK2dj5zs5KHNAlUyQJ0mZ2_O9c0=.83a1e8e3-b433-445c-8f0d-156f22e7afd8@github.com> On Tue, 22 Feb 2022 09:29:37 GMT, Srikanth Adayapalam wrote: > Reimplement generation of Preload attribute decoupling it from InnerClasses attribute generation to minimize/eliminate needless entries from the Preload list This pull request has now been integrated. Changeset: 603cb9d6 Author: Srikanth Adayapalam URL: https://git.openjdk.java.net/valhalla/commit/603cb9d66be577ad17f90a0386160761d4a76b06 Stats: 342 lines in 8 files changed: 268 ins; 46 del; 28 mod 8281323: [lworld] Unnecessary entries in Preload attribute 8280942: Preload attribute should mention primitive classes when reference projection is used in descriptors ------------- PR: https://git.openjdk.java.net/valhalla/pull/656 From vromero at openjdk.java.net Wed Feb 23 20:54:47 2022 From: vromero at openjdk.java.net (Vicente Romero) Date: Wed, 23 Feb 2022 20:54:47 GMT Subject: RFR: type of TypeVar.ref is incorrect and should be fixed Message-ID: <3vMo5X6OcSNOAgd-VY3YTyTyx5eEUbDQ-ARZGQBtyVA=.4ed18c59-7fbb-43a9-9464-48a3b636ca78@github.com> The type of TypeVar.ref is incorrect and should be fixed, in particular due to a bug, the compiler is not able to differentiate between `T` and `T.ref`. Also did some cleanup to warnings related code, in particular there should be a different warning for cases when a universal tvar is not assigned `null` but it is assigned a value that could be null at run time. This warning should not be the same as the one for a plain null assignment. ------------- Commit messages: - clean up to warnings related code Changes: https://git.openjdk.java.net/valhalla/pull/658/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=658&range=00 Stats: 87 lines in 6 files changed: 77 ins; 5 del; 5 mod Patch: https://git.openjdk.java.net/valhalla/pull/658.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/658/head:pull/658 PR: https://git.openjdk.java.net/valhalla/pull/658 From dlsmith at openjdk.java.net Wed Feb 23 23:33:28 2022 From: dlsmith at openjdk.java.net (Dan Smith) Date: Wed, 23 Feb 2022 23:33:28 GMT Subject: git: openjdk/valhalla: lworld: 8281283: Remove usages of __WithField in runtime tests Message-ID: <3c052f64-8971-4173-8d22-fcb0a6cd5d57@openjdk.org> Changeset: 71cf8628 Author: Dan Smith Date: 2022-02-23 23:32:57 +0000 URL: https://git.openjdk.java.net/valhalla/commit/71cf8628fa3133ff43bff0238f7a4eaa921cb88d 8281283: Remove usages of __WithField in runtime tests Reviewed-by: rriggs, dsimms ! test/hotspot/jtreg/runtime/valhalla/inlinetypes/ClassPrintLayoutDcmd.java ! test/hotspot/jtreg/runtime/valhalla/inlinetypes/FlattenableSemanticTest.java ! test/hotspot/jtreg/runtime/valhalla/inlinetypes/InlineOops.java ! test/hotspot/jtreg/runtime/valhalla/inlinetypes/InlineTypeArray.java ! test/hotspot/jtreg/runtime/valhalla/inlinetypes/InlineTypeCreation.java ! test/hotspot/jtreg/runtime/valhalla/inlinetypes/InlineTypeDensity.java ! test/hotspot/jtreg/runtime/valhalla/inlinetypes/InlineTypeGetField.java ! test/hotspot/jtreg/runtime/valhalla/inlinetypes/InlineTypesTest.java ! test/hotspot/jtreg/runtime/valhalla/inlinetypes/InlineWithJni.java ! test/hotspot/jtreg/runtime/valhalla/inlinetypes/JumboInline.java ! test/hotspot/jtreg/runtime/valhalla/inlinetypes/Long8Inline.java ! test/hotspot/jtreg/runtime/valhalla/inlinetypes/ObjectMethods.java ! test/hotspot/jtreg/runtime/valhalla/inlinetypes/Person.java ! test/hotspot/jtreg/runtime/valhalla/inlinetypes/Point.java ! test/hotspot/jtreg/runtime/valhalla/inlinetypes/QuickeningTest.java ! test/hotspot/jtreg/runtime/valhalla/inlinetypes/Test8186715.java ! test/hotspot/jtreg/runtime/valhalla/inlinetypes/TestFieldNullability.java + test/hotspot/jtreg/runtime/valhalla/inlinetypes/TestFieldNullabilityClasses.jasm ! test/hotspot/jtreg/runtime/valhalla/inlinetypes/TestFieldTypeMismatch.java + test/hotspot/jtreg/runtime/valhalla/inlinetypes/TestFieldTypeMismatchClasses.jasm - test/hotspot/jtreg/runtime/valhalla/inlinetypes/TestFieldTypeMismatchHelper.jasm ! test/hotspot/jtreg/runtime/valhalla/inlinetypes/TestInheritedInlineTypeFields.java ! test/hotspot/jtreg/runtime/valhalla/inlinetypes/TestValue1.java ! test/hotspot/jtreg/runtime/valhalla/inlinetypes/TestValue2.java ! test/hotspot/jtreg/runtime/valhalla/inlinetypes/TestValue3.java ! test/hotspot/jtreg/runtime/valhalla/inlinetypes/TestValue4.java ! test/hotspot/jtreg/runtime/valhalla/inlinetypes/UninitializedInlineFieldsTest.java ! test/hotspot/jtreg/runtime/valhalla/inlinetypes/UnsafeTest.java ! test/hotspot/jtreg/runtime/valhalla/inlinetypes/VDefaultTest.java - test/hotspot/jtreg/runtime/valhalla/inlinetypes/VWithFieldTest.java ! test/hotspot/jtreg/runtime/valhalla/inlinetypes/WithFieldAccessorTest.java + test/hotspot/jtreg/runtime/valhalla/inlinetypes/WithFieldAccessorTestClasses.jasm - test/hotspot/jtreg/runtime/valhalla/inlinetypes/WithFieldNoAccessTest.jcod + test/hotspot/jtreg/runtime/valhalla/inlinetypes/WithFieldTest.java + test/hotspot/jtreg/runtime/valhalla/inlinetypes/WithFieldTestClasses.jasm ! test/hotspot/jtreg/runtime/valhalla/inlinetypes/verifier/VTAssignability.java ! test/hotspot/jtreg/runtime/valhalla/inlinetypes/verifier/VTMonitor.java ! test/lib/org/openjdk/asmtools/JtregDriver.java From dlsmith at openjdk.java.net Wed Feb 23 23:36:29 2022 From: dlsmith at openjdk.java.net (Dan Smith) Date: Wed, 23 Feb 2022 23:36:29 GMT Subject: [lworld] Integrated: 8281283: Remove usages of __WithField in runtime tests In-Reply-To: References: Message-ID: On Thu, 17 Feb 2022 00:56:50 GMT, Dan Smith wrote: > Modifying Valhalla runtime tests to no longer use `__WithField` as a macro for the `withfield` instruction. Most uses can be replaced with standard constructor compilation via javac. The remaining uses are rewritten in jasm. > > Summary of changes: > > - Remove all uses of `-XDallowWithFieldOperator` > - Replace various `make` and `create` factory methods for primitive classes with constructors > - Bug fixes for `JumboInline` that were exposed by this change > - Rewrote `TestFieldNullability` to use jasm > - Rewrote `VWithFieldTest` to use jasm, renamed `WithFieldTest` > - Rewrote `WithFieldAccessorTest` to use jasm, made more comprehensive > - Deleted `WithFieldNoAccessTest`, made redundant by `WithFieldAccessorTest` changes > - Minor tweaks to `TestFieldTypeMismatch` for consistent jasm usage > - Cleanup of some debugging output in `asmtools.JtregDriver` This pull request has now been integrated. Changeset: 71cf8628 Author: Dan Smith URL: https://git.openjdk.java.net/valhalla/commit/71cf8628fa3133ff43bff0238f7a4eaa921cb88d Stats: 2016 lines in 38 files changed: 703 ins; 1105 del; 208 mod 8281283: Remove usages of __WithField in runtime tests Reviewed-by: rriggs, dsimms ------------- PR: https://git.openjdk.java.net/valhalla/pull/653 From vromero at openjdk.java.net Thu Feb 24 18:25:13 2022 From: vromero at openjdk.java.net (Vicente Romero) Date: Thu, 24 Feb 2022 18:25:13 GMT Subject: RFR: type of TypeVar.ref is incorrect and should be fixed [v2] In-Reply-To: <3vMo5X6OcSNOAgd-VY3YTyTyx5eEUbDQ-ARZGQBtyVA=.4ed18c59-7fbb-43a9-9464-48a3b636ca78@github.com> References: <3vMo5X6OcSNOAgd-VY3YTyTyx5eEUbDQ-ARZGQBtyVA=.4ed18c59-7fbb-43a9-9464-48a3b636ca78@github.com> Message-ID: > The type of TypeVar.ref is incorrect and should be fixed, in particular due to a bug, the compiler is not able to differentiate between `T` and `T.ref`. Also did some cleanup to warnings related code, in particular there should be a different warning for cases when a universal tvar is not assigned `null` but it is assigned a value that could be null at run time. This warning should not be the same as the one for a plain null assignment. Vicente Romero has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision: - Merge branch 'universal-tvars' into fixing.warning.bugs - clean up to warnings related code ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/658/files - new: https://git.openjdk.java.net/valhalla/pull/658/files/b3edd868..c8bb952a Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=658&range=01 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=658&range=00-01 Stats: 0 lines in 0 files changed: 0 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/valhalla/pull/658.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/658/head:pull/658 PR: https://git.openjdk.java.net/valhalla/pull/658 From vromero at openjdk.java.net Fri Feb 25 00:29:09 2022 From: vromero at openjdk.java.net (Vicente Romero) Date: Fri, 25 Feb 2022 00:29:09 GMT Subject: RFR: type of TypeVar.ref is incorrect and should be fixed [v3] In-Reply-To: <3vMo5X6OcSNOAgd-VY3YTyTyx5eEUbDQ-ARZGQBtyVA=.4ed18c59-7fbb-43a9-9464-48a3b636ca78@github.com> References: <3vMo5X6OcSNOAgd-VY3YTyTyx5eEUbDQ-ARZGQBtyVA=.4ed18c59-7fbb-43a9-9464-48a3b636ca78@github.com> Message-ID: > The type of TypeVar.ref is incorrect and should be fixed, in particular due to a bug, the compiler is not able to differentiate between `T` and `T.ref` which should have a different type Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: more tests ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/658/files - new: https://git.openjdk.java.net/valhalla/pull/658/files/c8bb952a..50f7ae2f Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=658&range=02 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=658&range=01-02 Stats: 107 lines in 1 file changed: 53 ins; 26 del; 28 mod Patch: https://git.openjdk.java.net/valhalla/pull/658.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/658/head:pull/658 PR: https://git.openjdk.java.net/valhalla/pull/658 From vromero at openjdk.java.net Fri Feb 25 01:29:43 2022 From: vromero at openjdk.java.net (Vicente Romero) Date: Fri, 25 Feb 2022 01:29:43 GMT Subject: RFR: type of TypeVar.ref is incorrect and should be fixed [v4] In-Reply-To: <3vMo5X6OcSNOAgd-VY3YTyTyx5eEUbDQ-ARZGQBtyVA=.4ed18c59-7fbb-43a9-9464-48a3b636ca78@github.com> References: <3vMo5X6OcSNOAgd-VY3YTyTyx5eEUbDQ-ARZGQBtyVA=.4ed18c59-7fbb-43a9-9464-48a3b636ca78@github.com> Message-ID: > The type of TypeVar.ref is incorrect and should be fixed, in particular due to a bug, the compiler is not able to differentiate between `T` and `T.ref` which should have a different type Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: minor refactoring ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/658/files - new: https://git.openjdk.java.net/valhalla/pull/658/files/50f7ae2f..df161eb5 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=658&range=03 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=658&range=02-03 Stats: 8 lines in 1 file changed: 5 ins; 0 del; 3 mod Patch: https://git.openjdk.java.net/valhalla/pull/658.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/658/head:pull/658 PR: https://git.openjdk.java.net/valhalla/pull/658 From vromero at openjdk.java.net Fri Feb 25 01:35:55 2022 From: vromero at openjdk.java.net (Vicente Romero) Date: Fri, 25 Feb 2022 01:35:55 GMT Subject: RFR: type of TypeVar.ref is incorrect and should be fixed [v5] In-Reply-To: <3vMo5X6OcSNOAgd-VY3YTyTyx5eEUbDQ-ARZGQBtyVA=.4ed18c59-7fbb-43a9-9464-48a3b636ca78@github.com> References: <3vMo5X6OcSNOAgd-VY3YTyTyx5eEUbDQ-ARZGQBtyVA=.4ed18c59-7fbb-43a9-9464-48a3b636ca78@github.com> Message-ID: > The type of TypeVar.ref is incorrect and should be fixed, in particular due to a bug, the compiler is not able to differentiate between `T` and `T.ref` which should have a different type Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: removing whitespace ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/658/files - new: https://git.openjdk.java.net/valhalla/pull/658/files/df161eb5..4d9379db Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=658&range=04 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=658&range=03-04 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/valhalla/pull/658.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/658/head:pull/658 PR: https://git.openjdk.java.net/valhalla/pull/658 From fparain at openjdk.java.net Fri Feb 25 14:49:03 2022 From: fparain at openjdk.java.net (Frederic Parain) Date: Fri, 25 Feb 2022 14:49:03 GMT Subject: [lworld] RFR: 8282292: [lworld] runtime/valhalla/inlinetypes/WithFieldAccessorTest.java Xcomp C1 asserts Message-ID: Please review this small patch fixing handling of illegal accesses in C1's implementation of withfield. Thank you, Fred ------------- Commit messages: - Withfield: insert deopt point if field is inaccessible Changes: https://git.openjdk.java.net/valhalla/pull/659/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=659&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8282292 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/valhalla/pull/659.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/659/head:pull/659 PR: https://git.openjdk.java.net/valhalla/pull/659 From fparain at openjdk.java.net Fri Feb 25 15:15:23 2022 From: fparain at openjdk.java.net (Frederic Parain) Date: Fri, 25 Feb 2022 15:15:23 GMT Subject: git: openjdk/valhalla: lworld: 8282292: [lworld] runtime/valhalla/inlinetypes/WithFieldAccessorTest.java Xcomp C1 asserts Message-ID: <5667969d-eaa0-46f6-a484-957ea8a94e67@openjdk.org> Changeset: 53bb0965 Author: Frederic Parain Date: 2022-02-25 15:14:58 +0000 URL: https://git.openjdk.java.net/valhalla/commit/53bb09651a02a21b7cb2d18e9bcbd74e6198355d 8282292: [lworld] runtime/valhalla/inlinetypes/WithFieldAccessorTest.java Xcomp C1 asserts Reviewed-by: thartmann ! src/hotspot/share/c1/c1_GraphBuilder.cpp From fparain at openjdk.java.net Fri Feb 25 15:18:21 2022 From: fparain at openjdk.java.net (Frederic Parain) Date: Fri, 25 Feb 2022 15:18:21 GMT Subject: [lworld] RFR: 8282292: [lworld] runtime/valhalla/inlinetypes/WithFieldAccessorTest.java Xcomp C1 asserts In-Reply-To: References: Message-ID: On Fri, 25 Feb 2022 14:41:46 GMT, Frederic Parain wrote: > Please review this small patch fixing handling of illegal accesses in C1's implementation of withfield. > > Thank you, > > Fred Thanks for the review. ------------- PR: https://git.openjdk.java.net/valhalla/pull/659 From thartmann at openjdk.java.net Fri Feb 25 15:18:20 2022 From: thartmann at openjdk.java.net (Tobias Hartmann) Date: Fri, 25 Feb 2022 15:18:20 GMT Subject: [lworld] RFR: 8282292: [lworld] runtime/valhalla/inlinetypes/WithFieldAccessorTest.java Xcomp C1 asserts In-Reply-To: References: Message-ID: On Fri, 25 Feb 2022 14:41:46 GMT, Frederic Parain wrote: > Please review this small patch fixing handling of illegal accesses in C1's implementation of withfield. > > Thank you, > > Fred Looks good to me, thanks for fixing! ------------- Marked as reviewed by thartmann (Committer). PR: https://git.openjdk.java.net/valhalla/pull/659 From fparain at openjdk.java.net Fri Feb 25 15:18:22 2022 From: fparain at openjdk.java.net (Frederic Parain) Date: Fri, 25 Feb 2022 15:18:22 GMT Subject: [lworld] Integrated: 8282292: [lworld] runtime/valhalla/inlinetypes/WithFieldAccessorTest.java Xcomp C1 asserts In-Reply-To: References: Message-ID: On Fri, 25 Feb 2022 14:41:46 GMT, Frederic Parain wrote: > Please review this small patch fixing handling of illegal accesses in C1's implementation of withfield. > > Thank you, > > Fred This pull request has now been integrated. Changeset: 53bb0965 Author: Frederic Parain URL: https://git.openjdk.java.net/valhalla/commit/53bb09651a02a21b7cb2d18e9bcbd74e6198355d Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod 8282292: [lworld] runtime/valhalla/inlinetypes/WithFieldAccessorTest.java Xcomp C1 asserts Reviewed-by: thartmann ------------- PR: https://git.openjdk.java.net/valhalla/pull/659 From mcimadamore at openjdk.java.net Fri Feb 25 16:48:14 2022 From: mcimadamore at openjdk.java.net (Maurizio Cimadamore) Date: Fri, 25 Feb 2022 16:48:14 GMT Subject: RFR: type of TypeVar.ref is incorrect and should be fixed [v5] In-Reply-To: References: <3vMo5X6OcSNOAgd-VY3YTyTyx5eEUbDQ-ARZGQBtyVA=.4ed18c59-7fbb-43a9-9464-48a3b636ca78@github.com> Message-ID: On Fri, 25 Feb 2022 01:35:55 GMT, Vicente Romero wrote: >> The type of TypeVar.ref is incorrect and should be fixed, in particular due to a bug, the compiler is not able to differentiate between `T` and `T.ref` which should have a different type > > Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: > > removing whitespace Looks good! ------------- Marked as reviewed by mcimadamore (Committer). PR: https://git.openjdk.java.net/valhalla/pull/658 From vromero at openjdk.java.net Fri Feb 25 17:50:29 2022 From: vromero at openjdk.java.net (Vicente Romero) Date: Fri, 25 Feb 2022 17:50:29 GMT Subject: RFR: type of TypeVar.ref is incorrect and should be fixed [v6] In-Reply-To: <3vMo5X6OcSNOAgd-VY3YTyTyx5eEUbDQ-ARZGQBtyVA=.4ed18c59-7fbb-43a9-9464-48a3b636ca78@github.com> References: <3vMo5X6OcSNOAgd-VY3YTyTyx5eEUbDQ-ARZGQBtyVA=.4ed18c59-7fbb-43a9-9464-48a3b636ca78@github.com> Message-ID: <2KxPiarrLVgdyrmfuivZ5nuTUlA4yUIgN7T-8js-hf4=.b347ba20-76ea-4f64-980b-e28773f9295c@github.com> > The type of TypeVar.ref is incorrect and should be fixed, in particular due to a bug, the compiler is not able to differentiate between `T` and `T.ref` which should have a different type Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: removing whitespace ------------- Changes: - all: https://git.openjdk.java.net/valhalla/pull/658/files - new: https://git.openjdk.java.net/valhalla/pull/658/files/4d9379db..2b4f4416 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=valhalla&pr=658&range=05 - incr: https://webrevs.openjdk.java.net/?repo=valhalla&pr=658&range=04-05 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/valhalla/pull/658.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/658/head:pull/658 PR: https://git.openjdk.java.net/valhalla/pull/658 From vromero at openjdk.java.net Fri Feb 25 18:03:15 2022 From: vromero at openjdk.java.net (Vicente Romero) Date: Fri, 25 Feb 2022 18:03:15 GMT Subject: Integrated: type of TypeVar.ref is incorrect and should be fixed In-Reply-To: <3vMo5X6OcSNOAgd-VY3YTyTyx5eEUbDQ-ARZGQBtyVA=.4ed18c59-7fbb-43a9-9464-48a3b636ca78@github.com> References: <3vMo5X6OcSNOAgd-VY3YTyTyx5eEUbDQ-ARZGQBtyVA=.4ed18c59-7fbb-43a9-9464-48a3b636ca78@github.com> Message-ID: <3181KV-xpjcOz-TuJnzs9mTT1eClxxIqa-8myGle1ms=.ca24a8b8-9fb1-4627-ae23-fe3c38d87523@github.com> On Wed, 23 Feb 2022 20:44:36 GMT, Vicente Romero wrote: > The type of TypeVar.ref is incorrect and should be fixed, in particular due to a bug, the compiler is not able to differentiate between `T` and `T.ref` which should have a different type This pull request has now been integrated. Changeset: 8841a648 Author: Vicente Romero URL: https://git.openjdk.java.net/valhalla/commit/8841a6485dd1c382b2f0f43edc089405d3daac6b Stats: 117 lines in 2 files changed: 66 ins; 20 del; 31 mod type of TypeVar.ref is incorrect and should be fixed Reviewed-by: mcimadamore ------------- PR: https://git.openjdk.java.net/valhalla/pull/658 From vromero at openjdk.java.net Fri Feb 25 18:19:42 2022 From: vromero at openjdk.java.net (Vicente Romero) Date: Fri, 25 Feb 2022 18:19:42 GMT Subject: Integrated: some test refactorings Message-ID: Refactoring tests at UniversalTvarsCompilationTests ------------- Commit messages: - test refactorings Changes: https://git.openjdk.java.net/valhalla/pull/660/files Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=660&range=00 Stats: 69 lines in 1 file changed: 8 ins; 39 del; 22 mod Patch: https://git.openjdk.java.net/valhalla/pull/660.diff Fetch: git fetch https://git.openjdk.java.net/valhalla pull/660/head:pull/660 PR: https://git.openjdk.java.net/valhalla/pull/660 From vromero at openjdk.java.net Fri Feb 25 18:19:42 2022 From: vromero at openjdk.java.net (Vicente Romero) Date: Fri, 25 Feb 2022 18:19:42 GMT Subject: Integrated: some test refactorings In-Reply-To: References: Message-ID: On Fri, 25 Feb 2022 18:12:34 GMT, Vicente Romero wrote: > Refactoring tests at UniversalTvarsCompilationTests This pull request has now been integrated. Changeset: 02a49734 Author: Vicente Romero URL: https://git.openjdk.java.net/valhalla/commit/02a49734bac4633e82ac32c34e5ec204349bcd59 Stats: 69 lines in 1 file changed: 8 ins; 39 del; 22 mod some test refactorings ------------- PR: https://git.openjdk.java.net/valhalla/pull/660