[code-reflection] RFR: Bytecode round 6 - lifting lambdas [v3]
Paul Sandoz
psandoz at openjdk.org
Fri May 31 22:38:25 UTC 2024
On Fri, 31 May 2024 12:55:27 GMT, Adam Sotona <asotona at openjdk.org> wrote:
>> - lifting lambdas (local impl methods) as inlined functions
>> - lifting method handles (external methods) as lambdas with invocation
>> - improved lifting of byte, short, char, boolean and int operands
>> - lifting LCMP, FCMP and DCMP to `::compare` method calls
>> - lifting LOOKUPSWITCH and TABLESWITCH to chain of conditional branches
>
> Adam Sotona has updated the pull request incrementally with one additional commit since the last revision:
>
> lifting LOOKUPSWITCH and TABLESWITCH
Looks good. The approach to switch is good. We can refine later if need be.
Some other things to consider later:
- we need some lambda tests that capture `this` and say access fields
- i suspect that many LCMP usages are directly followed by some single operand IF, so they could be merged into a comparison operation rather than generating a method invocation
- we could add a form of constant operation with a body for the modeling of dynamic constants, then i think we can lift up constant instructions with dynamic constants.
-------------
Marked as reviewed by psandoz (Lead).
PR Review: https://git.openjdk.org/babylon/pull/109#pullrequestreview-2091794491
More information about the babylon-dev
mailing list