Re: RFR: 8243287: Removal of Unsafe::defineAnonymousClass

2021-05-13 Thread Mandy Chung
Maybe you were thinking `jdk.internal.reflect.ReflectUtil::isVMAnonymousClass` that is now removed by this patch [1]. [1] https://github.com/openjdk/jdk/pull/3974/files#diff-1af3026a3b4942af3ebe6a4df02f8952fb9d51bf93336a2f7f93ce175d047574 On 5/13/21 12:03 PM, Brian Goetz wrote: Thanks for

Re: RFR: 8243287: Removal of Unsafe::defineAnonymousClass

2021-05-13 Thread Brian Goetz
Thanks for checking.  I thought I remembered something like this somewhere, but it may be that you already fixed such tests when you did hidden classes?  In any case, seems like we're all good now. Cheers, -Brian On 5/13/2021 2:50 PM, Mandy Chung wrote: I did a search on java.base and the

Re: RFR: 8243287: Removal of Unsafe::defineAnonymousClass

2021-05-13 Thread Mandy Chung
I did a search on java.base and the tests on `String::indexOf` and `String::contains` of a slash and don't spot any such test.  The JDK has no use of VM anonymous class.   If the test is trying to determine if it's lambda proxy class, it should be converted to call `Class::isHidden` but

Re: RFR: 8243287: Removal of Unsafe::defineAnonymousClass [v5]

2021-05-13 Thread Harold Seigel
On Thu, 13 May 2021 12:31:44 GMT, Harold Seigel wrote: >> Please review this large change to remove Unsafe::defineAnonymousClass(). >> The change removes dAC relevant code and changes a lot of tests. Many of >> the changed tests need renaming. I hope to do this in a follow up RFE. >> Some

Re: RFR: 8243287: Removal of Unsafe::defineAnonymousClass [v5]

2021-05-13 Thread Harold Seigel
On Thu, 13 May 2021 07:19:03 GMT, David Holmes wrote: >> Harold Seigel has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fix Weak hidden comment > > src/hotspot/share/oops/constantPool.hpp line 493: > >> 491: // object into a

Re: RFR: 8243287: Removal of Unsafe::defineAnonymousClass [v4]

2021-05-13 Thread Harold Seigel
On Wed, 12 May 2021 22:30:30 GMT, Mandy Chung wrote: >> Harold Seigel has updated the pull request incrementally with one additional >> commit since the last revision: >> >> test changes and small fixes > > src/hotspot/share/classfile/classLoaderData.cpp line 299: > >> 297: } >> 298: >>

Re: RFR: 8243287: Removal of Unsafe::defineAnonymousClass [v5]

2021-05-13 Thread Harold Seigel
> Please review this large change to remove Unsafe::defineAnonymousClass(). > The change removes dAC relevant code and changes a lot of tests. Many of the > changed tests need renaming. I hope to do this in a follow up RFE. Some of > the tests were modified to use hidden classes, others

Re: RFR: 8243287: Removal of Unsafe::defineAnonymousClass [v4]

2021-05-13 Thread David Holmes
On Wed, 12 May 2021 16:10:24 GMT, Harold Seigel wrote: >> Please review this large change to remove Unsafe::defineAnonymousClass(). >> The change removes dAC relevant code and changes a lot of tests. Many of >> the changed tests need renaming. I hope to do this in a follow up RFE. >> Some

Re: RFR: 8243287: Removal of Unsafe::defineAnonymousClass [v4]

2021-05-13 Thread Alan Bateman
On Tue, 11 May 2021 14:11:22 GMT, Harold Seigel wrote: >> Can you check test/jdkjava/lang/Class/attributes/ClassAttributesTest.java? >> It may minimally need a comment to be updated. That's the only additional >> test that I could find in test/jdk. > > Hi Alan, > Thanks for find this. I

Re: RFR: 8243287: Removal of Unsafe::defineAnonymousClass [v4]

2021-05-13 Thread Alan Bateman
On Wed, 12 May 2021 16:10:24 GMT, Harold Seigel wrote: >> Please review this large change to remove Unsafe::defineAnonymousClass(). >> The change removes dAC relevant code and changes a lot of tests. Many of >> the changed tests need renaming. I hope to do this in a follow up RFE. >> Some

Re: RFR: 8243287: Removal of Unsafe::defineAnonymousClass [v4]

2021-05-12 Thread Mandy Chung
On Wed, 12 May 2021 16:10:24 GMT, Harold Seigel wrote: >> Please review this large change to remove Unsafe::defineAnonymousClass(). >> The change removes dAC relevant code and changes a lot of tests. Many of >> the changed tests need renaming. I hope to do this in a follow up RFE. >> Some

Re: RFR: 8243287: Removal of Unsafe::defineAnonymousClass [v3]

2021-05-12 Thread Harold Seigel
On Tue, 11 May 2021 17:07:35 GMT, Ioi Lam wrote: >> Harold Seigel has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fix GetModuleTest.java > > src/hotspot/share/oops/instanceMirrorKlass.inline.hpp line 65: > >> 63: // so when

Re: RFR: 8243287: Removal of Unsafe::defineAnonymousClass [v3]

2021-05-12 Thread Harold Seigel
On Tue, 11 May 2021 20:49:46 GMT, Mandy Chung wrote: >> Harold Seigel has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fix GetModuleTest.java > > src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MetaUtil.java >

Re: RFR: 8243287: Removal of Unsafe::defineAnonymousClass [v3]

2021-05-12 Thread Harold Seigel
On Tue, 11 May 2021 14:13:49 GMT, Harold Seigel wrote: >> Please review this large change to remove Unsafe::defineAnonymousClass(). >> The change removes dAC relevant code and changes a lot of tests. Many of >> the changed tests need renaming. I hope to do this in a follow up RFE. >> Some

Re: RFR: 8243287: Removal of Unsafe::defineAnonymousClass [v4]

2021-05-12 Thread Harold Seigel
> Please review this large change to remove Unsafe::defineAnonymousClass(). > The change removes dAC relevant code and changes a lot of tests. Many of the > changed tests need renaming. I hope to do this in a follow up RFE. Some of > the tests were modified to use hidden classes, others

Re: RFR: 8243287: Removal of Unsafe::defineAnonymousClass [v3]

2021-05-11 Thread Mandy Chung
On Tue, 11 May 2021 14:13:49 GMT, Harold Seigel wrote: >> Please review this large change to remove Unsafe::defineAnonymousClass(). >> The change removes dAC relevant code and changes a lot of tests. Many of >> the changed tests need renaming. I hope to do this in a follow up RFE. >> Some

Re: RFR: 8243287: Removal of Unsafe::defineAnonymousClass [v3]

2021-05-11 Thread Mandy Chung
On Tue, 11 May 2021 14:13:49 GMT, Harold Seigel wrote: >> Please review this large change to remove Unsafe::defineAnonymousClass(). >> The change removes dAC relevant code and changes a lot of tests. Many of >> the changed tests need renaming. I hope to do this in a follow up RFE. >> Some

Re: RFR: 8243287: Removal of Unsafe::defineAnonymousClass [v3]

2021-05-11 Thread Ioi Lam
On Tue, 11 May 2021 14:13:49 GMT, Harold Seigel wrote: >> Please review this large change to remove Unsafe::defineAnonymousClass(). >> The change removes dAC relevant code and changes a lot of tests. Many of >> the changed tests need renaming. I hope to do this in a follow up RFE. >> Some

Re: RFR: 8243287: Removal of Unsafe::defineAnonymousClass [v3]

2021-05-11 Thread Harold Seigel
On Tue, 11 May 2021 13:41:53 GMT, Alan Bateman wrote: >> test/jdk/java/lang/Class/GetModuleTest.java line 42: >> >>> 40: import static org.testng.Assert.*; >>> 41: >>> 42: public class GetModuleTest { >> >> testGetModuleOnVMAnonymousClass is the only test here that uses ASM so you >> can

Re: RFR: 8243287: Removal of Unsafe::defineAnonymousClass

2021-05-11 Thread Harold Seigel
Hi Brian, Thanks for looking at this. The JDK no longer creates unsafe anon classes.  So, those tests could only find an unsafe anonymous class if they explicitly created one.  In which case, the tests would need to call Unsafe.defineAnonymousClass().  And, hopefully, those tests have been

Re: RFR: 8243287: Removal of Unsafe::defineAnonymousClass [v3]

2021-05-11 Thread Harold Seigel
> Please review this large change to remove Unsafe::defineAnonymousClass(). > The change removes dAC relevant code and changes a lot of tests. Many of the > changed tests need renaming. I hope to do this in a follow up RFE. Some of > the tests were modified to use hidden classes, others

Re: RFR: 8243287: Removal of Unsafe::defineAnonymousClass [v2]

2021-05-11 Thread Harold Seigel
> Please review this large change to remove Unsafe::defineAnonymousClass(). > The change removes dAC relevant code and changes a lot of tests. Many of the > changed tests need renaming. I hope to do this in a follow up RFE. Some of > the tests were modified to use hidden classes, others

Re: RFR: 8243287: Removal of Unsafe::defineAnonymousClass

2021-05-11 Thread Alan Bateman
On Tue, 11 May 2021 13:37:32 GMT, Alan Bateman wrote: >> Please review this large change to remove Unsafe::defineAnonymousClass(). >> The change removes dAC relevant code and changes a lot of tests. Many of >> the changed tests need renaming. I hope to do this in a follow up RFE. >> Some

Re: RFR: 8243287: Removal of Unsafe::defineAnonymousClass

2021-05-11 Thread Alan Bateman
On Tue, 11 May 2021 12:50:31 GMT, Harold Seigel wrote: > Please review this large change to remove Unsafe::defineAnonymousClass(). > The change removes dAC relevant code and changes a lot of tests. Many of the > changed tests need renaming. I hope to do this in a follow up RFE. Some of >

Re: RFR: 8243287: Removal of Unsafe::defineAnonymousClass

2021-05-11 Thread Brian Goetz
There may be some JDK code that checks for anon classes by comparing the name to see if it contains a slash, especially tests, but which don’t say “anonymous”. Did you do a search for these idioms too, which are now dead tests? Sent from my iPad > On May 11, 2021, at 8:59 AM, Harold Seigel

RFR: 8243287: Removal of Unsafe::defineAnonymousClass

2021-05-11 Thread Harold Seigel
Please review this large change to remove Unsafe::defineAnonymousClass(). The change removes dAC relevant code and changes a lot of tests. Many of the changed tests need renaming. I hope to do this in a follow up RFE. Some of the tests were modified to use hidden classes, others were