On Thu, 18 Apr 2024 13:53:34 GMT, Oussama Louati <d...@openjdk.org> 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.

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!

test/jdk/java/lang/invoke/indify/Indify.java line 45:

> 43:  * must be stereotyped generators of MethodHandle and MethodType
> 44:  * constants.  All calls to them are transformed to {@code 
> CONSTANT_MethodHandle}
> 45:  * and {@code CONSTANT_MethodType} "ldc" instructions.

Don't need to rename these, as they are from the JVMS 
https://docs.oracle.com/javase/specs/jvms/se22/html/jvms-4.html#jvms-4.4-210

test/jdk/java/lang/invoke/indify/Indify.java line 1247:

> 1245:     }
> 1246: 
> 1247:     public class Bytecode {

You don't really need this class; you should be able to get whatever you need 
from ClassModel.

-------------

PR Review: https://git.openjdk.org/jdk/pull/18841#pullrequestreview-2009032065
PR Review Comment: https://git.openjdk.org/jdk/pull/18841#discussion_r1570850951
PR Review Comment: https://git.openjdk.org/jdk/pull/18841#discussion_r1591707139

Reply via email to