[code-reflection] RFR: Experiment with replacing textual representation in classfile with method that builds the model [v2]

Mourad Abbay mabbay at openjdk.org
Mon Nov 11 10:49:38 UTC 2024


On Fri, 8 Nov 2024 22:07:23 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

>> Mourad Abbay has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Assert on the value of executing builder method
>>  - Change bytecode generation for NewOp to use constructor type as owner
>
> test/jdk/java/lang/reflect/code/writer/TestOpMethod.java line 114:
> 
>> 112:                 var lci = (ConstantInstruction.LoadConstantInstruction) prev;
>> 113:                 var pe = (StringEntry) lci.constantEntry();
>> 114:                 res.add(new OpFieldAndIR(fi.name().stringValue().substring(fi.name().stringValue().indexOf(':') + 2), pe.stringValue()));
> 
> Suggest you return pairs of `FieldRefEntry` (or `FieldInstruction`)  and `String`, thereby you retain the full field name for possible reduction later on if needed, and you can reuse later when removing them.
> 
> Was there an issue with using the synthetic field name as a synthetic method name?

For method name, I had to remove the class part.

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

PR Review Comment: https://git.openjdk.org/babylon/pull/274#discussion_r1836457317


More information about the babylon-dev mailing list