Re: RFR: 8340831: Simplify simple validation for class definition in MethodHandles.Lookup [v2]

2024-10-01 Thread Mandy Chung
On Wed, 25 Sep 2024 14:50:12 GMT, Chen Liang wrote: >> `MethodHandles.Lookup` defines a `ClassFile` for simple validations; it is >> unnecessary and can be scalarized manually. The removal of `ClassFile` class >> is also slightly helpful for bootstrap by reducing class loading. Also >> improve

Re: RFR: 8340831: Simplify simple validation for class definition in MethodHandles.Lookup [v2]

2024-09-25 Thread Chen Liang
On Wed, 25 Sep 2024 14:50:12 GMT, Chen Liang wrote: >> `MethodHandles.Lookup` defines a `ClassFile` for simple validations; it is >> unnecessary and can be scalarized manually. The removal of `ClassFile` class >> is also slightly helpful for bootstrap by reducing class loading. Also >> improve

Re: RFR: 8340831: Simplify simple validation for class definition in MethodHandles.Lookup

2024-09-25 Thread Claes Redestad
On Wed, 25 Sep 2024 14:44:32 GMT, Chen Liang wrote: > Apparently forgot to push when I re-requested a review after the renames. I thought something was off, but on the third refresh the changes came in :-) - PR Comment: https://git.openjdk.org/jdk/pull/21170#issuecomment-2374309882

Re: RFR: 8340831: Simplify simple validation for class definition in MethodHandles.Lookup

2024-09-25 Thread Chen Liang
On Tue, 24 Sep 2024 22:07:25 GMT, Chen Liang wrote: > `MethodHandles.Lookup` defines a `ClassFile` for simple validations; it is > unnecessary and can be scalarized manually. The removal of `ClassFile` class > is also slightly helpful for bootstrap by reducing class loading. Also > improved cl

Re: RFR: 8340831: Simplify simple validation for class definition in MethodHandles.Lookup [v2]

2024-09-25 Thread Claes Redestad
On Wed, 25 Sep 2024 14:47:10 GMT, Chen Liang wrote: >> `MethodHandles.Lookup` defines a `ClassFile` for simple validations; it is >> unnecessary and can be scalarized manually. The removal of `ClassFile` class >> is also slightly helpful for bootstrap by reducing class loading. Also >> improve

Re: RFR: 8340831: Simplify simple validation for class definition in MethodHandles.Lookup [v2]

2024-09-25 Thread Chen Liang
> `MethodHandles.Lookup` defines a `ClassFile` for simple validations; it is > unnecessary and can be scalarized manually. The removal of `ClassFile` class > is also slightly helpful for bootstrap by reducing class loading. Also > improved class file version checking in `VM` class. Chen Liang h

Re: RFR: 8340831: Simplify simple validation for class definition in MethodHandles.Lookup

2024-09-25 Thread Claes Redestad
On Wed, 25 Sep 2024 12:58:22 GMT, Chen Liang wrote: >> AFAICT they already use the record names, so we're not generating redundant >> code there. > > I mean the name variable in makeHiddenClassDefiner and makeClassDefiner that > leads up here. Ah.. Yeah, either way you like, but if it's an int

Re: RFR: 8340831: Simplify simple validation for class definition in MethodHandles.Lookup

2024-09-25 Thread Chen Liang
On Wed, 25 Sep 2024 12:10:32 GMT, Claes Redestad wrote: >> Should I rename other existing name vars too? > > AFAICT they already use the record names, so we're not generating redundant > code there. I mean the name variable in makeHiddenClassDefiner and makeClassDefiner that leads up here. --

Re: RFR: 8340831: Simplify simple validation for class definition in MethodHandles.Lookup

2024-09-25 Thread Claes Redestad
On Wed, 25 Sep 2024 12:03:58 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/lang/invoke/MethodHandles.java line 2276: >> >>> 2274: var thisClass = cm.thisClass(); >>> 2275: name = thisClass.asInternalName(); >>> 2276: sym = thisClass.as

Re: RFR: 8340831: Simplify simple validation for class definition in MethodHandles.Lookup

2024-09-25 Thread Chen Liang
On Wed, 25 Sep 2024 10:02:37 GMT, Claes Redestad wrote: >> `MethodHandles.Lookup` defines a `ClassFile` for simple validations; it is >> unnecessary and can be scalarized manually. The removal of `ClassFile` class >> is also slightly helpful for bootstrap by reducing class loading. Also >> imp

Re: RFR: 8340831: Simplify simple validation for class definition in MethodHandles.Lookup

2024-09-25 Thread Claes Redestad
On Tue, 24 Sep 2024 22:07:25 GMT, Chen Liang wrote: > `MethodHandles.Lookup` defines a `ClassFile` for simple validations; it is > unnecessary and can be scalarized manually. The removal of `ClassFile` class > is also slightly helpful for bootstrap by reducing class loading. Also > improved cl

RFR: 8340831: Simplify simple validation for class definition in MethodHandles.Lookup

2024-09-24 Thread Chen Liang
`MethodHandles.Lookup` defines a `ClassFile` for simple validations; it is unnecessary and can be scalarized manually. The removal of `ClassFile` class is also slightly helpful for bootstrap by reducing class loading. Also improved class file version checking in `VM` class. - Commi