[code-reflection] RFR: Bytecode round 7 [v2]
Adam Sotona
asotona at openjdk.org
Tue Jul 2 10:55:34 UTC 2024
On Mon, 1 Jul 2024 16:37:33 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:
>> Adam Sotona has updated the pull request incrementally with one additional commit since the last revision:
>>
>> TestSmallCorpus update
>
> src/java.base/share/classes/java/lang/reflect/code/bytecode/BytecodeLift.java line 127:
>
>> 125: if (!methodModel.flags().has(AccessFlag.STATIC)) {
>> 126: mtd = mtd.insertParameterTypes(0, thisClass);
>> 127: }
>
> There is duplication here and in the static method. It's minor but suggests the layering is awkward. I think it could be resolved if the private instance method `BytecodeLift::lift` returned the function operation, which is then further transformed for slots.
I've reorganized and simplified `BytecodeLift` and `LocalsTypeMapper` parameters, deduplicated some calculations and separated the `liftToSlots` private method.
More changes might be required with extending the MH support in the next round.
-------------
PR Review Comment: https://git.openjdk.org/babylon/pull/165#discussion_r1662304885
More information about the babylon-dev
mailing list