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
> Exception in thread "main" java.lang.NullPointerException: Cannot invoke 
> "java.lang.classfile.ClassModel.thisClass()" because "model" is null
>   at java.base/java.lang.classfile.ClassFile.transform(ClassFile.java:445)
>   at indify.Indify.transformToBytes(Indify.java:369)
>   at indify.Indify.writeNewClassFile(Indify.java:360)
>   at indify.Indify.indifyFile(Indify.java:356)
>   at indify.Indify.indifyTree(Indify.java:391)
>   at indify.Indify.indifyTree(Indify.java:393)
>   at indify.Indify.indifyTree(Indify.java:393)
>   at indify.Indify.indifyTree(Indify.java:393)
>   at indify.Indify.indifyTree(Indify.java:393)
>   at indify.Indify.indifyTree(Indify.java:393)
>   at indify.Indify.indifyTree(Indify.java:393)
>   at indify.Indify.indify(Indify.java:339)
>   at indify.Indify.run(Indify.java:191)
>   at indify.Indify.main(Indify.java:101)
> ```

I applied a patch addressing this issue, the tool invocation should pass now  
on Microbenchmarks.

-

PR Comment: https://git.openjdk.org/jdk/pull/18841#issuecomment-2123566807


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 class files and intends to migrate 
>> to ASM; but since we have the Classfile API, we can migrate to Classfile API 
>> instead.
>
> Oussama Louati has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   update: Added javadoc documentation

The pull request is not buildable in the current state and I suggest to return 
it to draft.

Minimal change to enable preview for build and run of the Indify tool is 
drafted here:
https://github.com/openjdk/jdk/commit/7c2344b275da1dff99ade284192488eaa8ffba02

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
Exception in thread "main" java.lang.NullPointerException: Cannot invoke 
"java.lang.classfile.ClassModel.thisClass()" because "model" is null
at java.base/java.lang.classfile.ClassFile.transform(ClassFile.java:445)
at indify.Indify.transformToBytes(Indify.java:369)
at indify.Indify.writeNewClassFile(Indify.java:360)
at indify.Indify.indifyFile(Indify.java:356)
at indify.Indify.indifyTree(Indify.java:391)
at indify.Indify.indifyTree(Indify.java:393)
at indify.Indify.indifyTree(Indify.java:393)
at indify.Indify.indifyTree(Indify.java:393)
at indify.Indify.indifyTree(Indify.java:393)
at indify.Indify.indifyTree(Indify.java:393)
at indify.Indify.indifyTree(Indify.java:393)
at indify.Indify.indify(Indify.java:339)
at indify.Indify.run(Indify.java:191)
at indify.Indify.main(Indify.java:101)

-

Changes requested by asotona (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/18841#pullrequestreview-2068375431
PR Comment: https://git.openjdk.org/jdk/pull/18841#issuecomment-2122432164
PR Comment: https://git.openjdk.org/jdk/pull/18841#issuecomment-2122435605


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 have the Classfile API, we can migrate to Classfile API 
> instead.

Oussama Louati has updated the pull request incrementally with one additional 
commit since the last revision:

  update: Added javadoc documentation

-

Changes:
  - all: https://git.openjdk.org/jdk/pull/18841/files
  - new: https://git.openjdk.org/jdk/pull/18841/files/91dbb74c..781c951d

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk=18841=07
 - incr: https://webrevs.openjdk.org/?repo=jdk=18841=06-07

  Stats: 27 lines in 1 file changed: 26 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/18841.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/18841/head:pull/18841

PR: https://git.openjdk.org/jdk/pull/18841