Re: RFR: 8307818: Convert Indify tool to Classfile API [v17]

2024-08-12 Thread Oussama Louati
> An indify tool in j.l.i tests (also in vmTestBase) convert some source-code > private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, > MethodType, and CallSite constants. > ### Purpose of Indify > > - **Transformation Tool**: `Indify` transforms existing class files to >

Re: RFR: 8307818: Convert Indify tool to Classfile API [v16]

2024-07-24 Thread Adam Sotona
On Wed, 24 Jul 2024 07:58:31 GMT, ExE Boss wrote: >> This transformation is called only after the `classModel` is transformed: >> - at line 472 and 380 when the `transformToBytes()` method is called is >> after effectively transforming the `classModel` inside the `Logic` class. > > There isn’t

Re: RFR: 8307818: Convert Indify tool to Classfile API [v16]

2024-07-24 Thread ExE Boss
On Sat, 22 Jun 2024 15:55:28 GMT, Oussama Louati wrote: >> An indify tool in j.l.i tests (also in vmTestBase) convert some source-code >> private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, >> MethodType, and CallSite constants. >> ### Purpose of Indify >> >> - **Transf

Re: RFR: 8307818: Convert Indify tool to Classfile API [v16]

2024-07-24 Thread ExE Boss
On Tue, 25 Jun 2024 13:54:07 GMT, Oussama Louati wrote: >> And what is the purpose of parsing a model from bytes and transforming it >> back to bytes without a change? > > This transformation is called only after the `classModel` is transformed: > - at line 472 and 380 when the `transformToByt

Re: RFR: 8307818: Convert Indify tool to Classfile API [v16]

2024-06-25 Thread Oussama Louati
On Tue, 25 Jun 2024 13:49:31 GMT, Adam Sotona wrote: >> Transforming the classModel back to the bytes array in order to write the >> transformed classfile > > And what is the purpose of parsing a model from bytes and transforming it > back to bytes without a change? This transformation is call

Re: RFR: 8307818: Convert Indify tool to Classfile API [v16]

2024-06-25 Thread Adam Sotona
On Tue, 25 Jun 2024 13:45:17 GMT, Oussama Louati wrote: >> test/jdk/java/lang/invoke/indify/Indify.java line 386: >> >>> 384: >>> 385: byte[] transformToBytes(ClassModel classModel) { >>> 386: return of().transform(classModel, ClassTransform.ACCEPT_ALL); >> >> What is the purpose o

Re: RFR: 8307818: Convert Indify tool to Classfile API [v16]

2024-06-25 Thread Oussama Louati
On Tue, 25 Jun 2024 13:17:13 GMT, Adam Sotona wrote: >> Oussama Louati has updated the pull request incrementally with one >> additional commit since the last revision: >> >> remove: removed unnecessary logging > > test/jdk/java/lang/invoke/indify/Indify.java line 386: > >> 384: >> 385:

Re: RFR: 8307818: Convert Indify tool to Classfile API [v16]

2024-06-25 Thread Adam Sotona
On Sat, 22 Jun 2024 15:55:28 GMT, Oussama Louati wrote: >> An indify tool in j.l.i tests (also in vmTestBase) convert some source-code >> private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, >> MethodType, and CallSite constants. >> ### Purpose of Indify >> >> - **Transf

Re: RFR: 8307818: Convert Indify tool to Classfile API [v16]

2024-06-25 Thread Adam Sotona
On Sat, 22 Jun 2024 15:55:28 GMT, Oussama Louati wrote: >> An indify tool in j.l.i tests (also in vmTestBase) convert some source-code >> private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, >> MethodType, and CallSite constants. >> ### Purpose of Indify >> >> - **Transf

Re: RFR: 8307818: Convert Indify tool to Classfile API [v16]

2024-06-22 Thread Oussama Louati
> An indify tool in j.l.i tests (also in vmTestBase) convert some source-code > private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, > MethodType, and CallSite constants. > It currently uses ad-hoc code to process class files and intends to migrate > to ASM; but since we ha

Re: RFR: 8307818: Convert Indify tool to Classfile API [v15]

2024-06-22 Thread Oussama Louati
> An indify tool in j.l.i tests (also in vmTestBase) convert some source-code > private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, > MethodType, and CallSite constants. > It currently uses ad-hoc code to process class files and intends to migrate > to ASM; but since we ha

Re: RFR: 8307818: Convert Indify tool to Classfile API [v14]

2024-06-22 Thread Oussama Louati
> An indify tool in j.l.i tests (also in vmTestBase) convert some source-code > private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, > MethodType, and CallSite constants. > It currently uses ad-hoc code to process class files and intends to migrate > to ASM; but since we ha

Re: RFR: 8307818: Convert Indify tool to Classfile API [v13]

2024-06-22 Thread Chen Liang
On Sat, 22 Jun 2024 09:39:46 GMT, Oussama Louati wrote: >> An indify tool in j.l.i tests (also in vmTestBase) convert some source-code >> private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, >> MethodType, and CallSite constants. >> It currently uses ad-hoc code to process

Re: RFR: 8307818: Convert Indify tool to Classfile API [v13]

2024-06-22 Thread Oussama Louati
On Mon, 17 Jun 2024 08:33:17 GMT, Adam Sotona wrote: >> We need a boolean value to determine if we should proceed after replacing >> the appropriate "pop" instruction with an "invokedynamic" instruction. >> However, instead of using just a boolean field, we use a stack. The reason >> for this

Re: RFR: 8307818: Convert Indify tool to Classfile API [v13]

2024-06-22 Thread Oussama Louati
> An indify tool in j.l.i tests (also in vmTestBase) convert some source-code > private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, > MethodType, and CallSite constants. > It currently uses ad-hoc code to process class files and intends to migrate > to ASM; but since we ha

Re: RFR: 8307818: Convert Indify tool to Classfile API [v12]

2024-06-22 Thread Oussama Louati
> An indify tool in j.l.i tests (also in vmTestBase) convert some source-code > private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, > MethodType, and CallSite constants. > It currently uses ad-hoc code to process class files and intends to migrate > to ASM; but since we ha

Re: RFR: 8307818: Convert Indify tool to Classfile API [v11]

2024-06-19 Thread ExE Boss
On Wed, 19 Jun 2024 12:04:27 GMT, Oussama Louati wrote: >> An indify tool in j.l.i tests (also in vmTestBase) convert some source-code >> private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, >> MethodType, and CallSite constants. >> It currently uses ad-hoc code to process

Re: RFR: 8307818: Convert Indify tool to Classfile API [v9]

2024-06-19 Thread Oussama Louati
On Mon, 17 Jun 2024 08:12:08 GMT, Adam Sotona wrote: >> Oussama Louati has updated the pull request incrementally with 19 additional >> commits since the last revision: >> >> - fix: fixed whitespaces >> - fix: fixed whitespaces >> - chore: used Class::descriptorString >> - remove: added rem

Re: RFR: 8307818: Convert Indify tool to Classfile API [v11]

2024-06-19 Thread Oussama Louati
> An indify tool in j.l.i tests (also in vmTestBase) convert some source-code > private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, > MethodType, and CallSite constants. > It currently uses ad-hoc code to process class files and intends to migrate > to ASM; but since we ha

Re: RFR: 8307818: Convert Indify tool to Classfile API [v10]

2024-06-17 Thread Adam Sotona
On Fri, 24 May 2024 17:12:34 GMT, Oussama Louati wrote: >> test/jdk/java/lang/invoke/indify/Indify.java line 503: >> >>> 501: >>> 502: Iterator instructionIterator >>> =getInstructions(m).iterator(); >>> 503: final Stack shouldProceedAfterIndyAdded = new >>> St

Re: RFR: 8307818: Convert Indify tool to Classfile API [v10]

2024-06-17 Thread Adam Sotona
On Tue, 28 May 2024 11:03:18 GMT, Oussama Louati wrote: >> An indify tool in j.l.i tests (also in vmTestBase) convert some source-code >> private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, >> MethodType, and CallSite constants. >> It currently uses ad-hoc code to process

Re: RFR: 8307818: Convert Indify tool to Classfile API [v10]

2024-06-17 Thread Adam Sotona
On Fri, 24 May 2024 17:12:24 GMT, Oussama Louati wrote: >> test/jdk/java/lang/invoke/indify/Indify.java line 578: >> >>> 576: classTransform = >>> ClassTransform.transformingMethodBodies(filter, codeTransform); >>> 577: classModel = of().parse( >>

Re: RFR: 8307818: Convert Indify tool to Classfile API [v10]

2024-06-03 Thread Oussama Louati
On Wed, 22 May 2024 22:38:16 GMT, Oussama Louati wrote: >> test/jdk/java/lang/invoke/CallStaticInitOrder.java line 54: >> >>> 52: >>> 53: static int Init1Tick; >>> 54: public static class Init1 { >> >> Is there a reason to change all the classes and methods to public? > > the test thro

Re: RFR: 8307818: Convert Indify tool to Classfile API [v10]

2024-05-28 Thread Oussama Louati
On Fri, 24 May 2024 17:57:28 GMT, Oussama Louati wrote: >> test/jdk/java/lang/invoke/indify/Indify.java line 660: >> >>> 658: * >>> 659: * @return true if any marks were changed, false otherwise. >>> 660: */ >> >> This method does incremental analysis of the constant

Re: RFR: 8307818: Convert Indify tool to Classfile API [v10]

2024-05-28 Thread Oussama Louati
> An indify tool in j.l.i tests (also in vmTestBase) convert some source-code > private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, > MethodType, and CallSite constants. > It currently uses ad-hoc code to process class files and intends to migrate > to ASM; but since we ha

Re: RFR: 8307818: Convert Indify tool to Classfile API [v9]

2024-05-24 Thread Oussama Louati
On Wed, 22 May 2024 22:37:35 GMT, Oussama Louati wrote: >> test/jdk/java/lang/invoke/CallSiteTest.java line 96: >> >>> 94: } >>> 95: >>> 96: public static class MyCCS extends ConstantCallSite { >> >> Any reason for this change? > > Otherwise, it throws an java.lang.IllegalAccessError:

Re: RFR: 8307818: Convert Indify tool to Classfile API [v9]

2024-05-24 Thread Oussama Louati
On Wed, 22 May 2024 08:57:23 GMT, Adam Sotona wrote: >> Oussama Louati has updated the pull request incrementally with 19 additional >> commits since the last revision: >> >> - fix: fixed whitespaces >> - fix: fixed whitespaces >> - chore: used Class::descriptorString >> - remove: added rem

Re: RFR: 8307818: Convert Indify tool to Classfile API [v8]

2024-05-24 Thread Oussama Louati
On Tue, 21 May 2024 11:37:26 GMT, Adam Sotona wrote: > Indify invocation on Microbenchmarks as a part of the JDK build (after > application of the above patch) still fails with: > > ``` > Failure on > /Applications/XcodeJIB.app/dev/github/jdk/build/macosx-aarch64/support/test/micro/classes > E

Re: RFR: 8307818: Convert Indify tool to Classfile API [v9]

2024-05-24 Thread Oussama Louati
On Fri, 24 May 2024 17:57:28 GMT, Oussama Louati wrote: >> An indify tool in j.l.i tests (also in vmTestBase) convert some source-code >> private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, >> MethodType, and CallSite constants. >> It currently uses ad-hoc code to process

Re: RFR: 8307818: Convert Indify tool to Classfile API [v9]

2024-05-24 Thread Adam Sotona
On Fri, 24 May 2024 17:57:28 GMT, Oussama Louati wrote: >> An indify tool in j.l.i tests (also in vmTestBase) convert some source-code >> private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, >> MethodType, and CallSite constants. >> It currently uses ad-hoc code to process

Re: RFR: 8307818: Convert Indify tool to Classfile API [v9]

2024-05-24 Thread Oussama Louati
> An indify tool in j.l.i tests (also in vmTestBase) convert some source-code > private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, > MethodType, and CallSite constants. > It currently uses ad-hoc code to process class files and intends to migrate > to ASM; but since we ha

Re: RFR: 8307818: Convert Indify tool to Classfile API [v8]

2024-05-21 Thread Adam Sotona
On Mon, 20 May 2024 20:56:18 GMT, Oussama Louati wrote: >> An indify tool in j.l.i tests (also in vmTestBase) convert some source-code >> private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, >> MethodType, and CallSite constants. >> It currently uses ad-hoc code to process

Re: RFR: 8307818: Convert Indify tool to Classfile API [v8]

2024-05-20 Thread Oussama Louati
> An indify tool in j.l.i tests (also in vmTestBase) convert some source-code > private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, > MethodType, and CallSite constants. > It currently uses ad-hoc code to process class files and intends to migrate > to ASM; but since we ha

Re: RFR: 8307818: Convert Indify tool to Classfile API [v7]

2024-05-20 Thread Oussama Louati
> An indify tool in j.l.i tests (also in vmTestBase) convert some source-code > private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, > MethodType, and CallSite constants. > It currently uses ad-hoc code to process class files and intends to migrate > to ASM; but since we ha

Re: RFR: 8307818: Convert Indify tool to Classfile API [v6]

2024-05-20 Thread Oussama Louati
> An indify tool in j.l.i tests (also in vmTestBase) convert some source-code > private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, > MethodType, and CallSite constants. > It currently uses ad-hoc code to process class files and intends to migrate > to ASM; but since we ha

Re: RFR: 8307818: Convert Indify tool to Classfile API [v4]

2024-05-20 Thread Chen Liang
On Mon, 20 May 2024 15:34:28 GMT, Oussama Louati wrote: >> An indify tool in j.l.i tests (also in vmTestBase) convert some source-code >> private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, >> MethodType, and CallSite constants. >> It currently uses ad-hoc code to process

Re: RFR: 8307818: Convert Indify tool to Classfile API [v5]

2024-05-20 Thread Oussama Louati
> An indify tool in j.l.i tests (also in vmTestBase) convert some source-code > private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, > MethodType, and CallSite constants. > It currently uses ad-hoc code to process class files and intends to migrate > to ASM; but since we ha

Re: RFR: 8307818: Convert Indify tool to Classfile API [v4]

2024-05-20 Thread Chen Liang
On Mon, 20 May 2024 15:34:28 GMT, Oussama Louati wrote: >> An indify tool in j.l.i tests (also in vmTestBase) convert some source-code >> private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, >> MethodType, and CallSite constants. >> It currently uses ad-hoc code to process

Re: RFR: 8307818: Convert Indify tool to Classfile API [v4]

2024-05-20 Thread Oussama Louati
> An indify tool in j.l.i tests (also in vmTestBase) convert some source-code > private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, > MethodType, and CallSite constants. > It currently uses ad-hoc code to process class files and intends to migrate > to ASM; but since we ha

Re: RFR: 8307818: Convert Indify tool to Classfile API [v3]

2024-05-20 Thread Glavo
On Mon, 20 May 2024 13:20:17 GMT, Oussama Louati wrote: >> An indify tool in j.l.i tests (also in vmTestBase) convert some source-code >> private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, >> MethodType, and CallSite constants. >> It currently uses ad-hoc code to process

Re: RFR: 8307818: Convert Indify tool to Classfile API [v3]

2024-05-20 Thread Oussama Louati
> An indify tool in j.l.i tests (also in vmTestBase) convert some source-code > private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, > MethodType, and CallSite constants. > It currently uses ad-hoc code to process class files and intends to migrate > to ASM; but since we ha

Re: RFR: 8307818: Convert Indify tool to Classfile API [v2]

2024-05-19 Thread Oussama Louati
> An indify tool in j.l.i tests (also in vmTestBase) convert some source-code > private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, > MethodType, and CallSite constants. > It currently uses ad-hoc code to process class files and intends to migrate > to ASM; but since we ha

Re: RFR: 8307818: Convert Indify tool to Classfile API

2024-05-19 Thread Oussama Louati
On Thu, 18 Apr 2024 13:53:34 GMT, Oussama Louati wrote: > An indify tool in j.l.i tests (also in vmTestBase) convert some source-code > private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, > MethodType, and CallSite constants. > It currently uses ad-hoc code to process cla

Re: RFR: 8307818: Convert Indify tool to Classfile API

2024-05-19 Thread ExE Boss
On Thu, 18 Apr 2024 13:53:34 GMT, Oussama Louati wrote: > An indify tool in j.l.i tests (also in vmTestBase) convert some source-code > private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, > MethodType, and CallSite constants. > It currently uses ad-hoc code to process cla

Re: RFR: 8307818: Convert Indify tool to Classfile API

2024-05-19 Thread Oussama Louati
On Thu, 18 Apr 2024 14:15:12 GMT, Chen Liang wrote: > This is going to be a difficult task because of the sheer size of indify > tool; to migrate you really need in-depth understanding of both indify and CF > API. Good luck! Thank you > test/jdk/java/lang/invoke/indify/Indify.java line 1247:

Re: RFR: 8307818: Convert Indify tool to Classfile API

2024-05-19 Thread Chen Liang
On Thu, 18 Apr 2024 13:53:34 GMT, Oussama Louati wrote: > An indify tool in j.l.i tests (also in vmTestBase) convert some source-code > private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, > MethodType, and CallSite constants. > It currently uses ad-hoc code to process cla

RFR: 8307818: Convert Indify tool to Classfile API

2024-05-19 Thread Oussama Louati
An indify tool in j.l.i tests (also in vmTestBase) convert some source-code private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, MethodType, and CallSite constants. It currently uses ad-hoc code to process class files and intends to migrate to ASM; but since we have the Cla