[code-reflection] RFR: Remove bytecode dialect [v10]

Paul Sandoz psandoz at openjdk.org
Thu Feb 8 17:09:17 UTC 2024


On Thu, 8 Feb 2024 09:55:44 GMT, Adam Sotona <asotona at openjdk.org> wrote:

>> This patch re-implements `BytecodeLift` to lift from bytecode directly to the core dialect
>> and removes `BytecodeInstructionOps` with the bytecode dialect.
>> 
>> Implementation is complete up to the point of passing all current tests.
>> 
>> Please review.
>> 
>> Thanks,
>> Adam
>
> Adam Sotona has updated the pull request incrementally with one additional commit since the last revision:
> 
>   fixed stack transition through exceptionRegionEnter and exceptionRegionExit blocks

Recommend also adding a test for:

    static int f(int a, int b, int c, int n) {
        return (n < 10) ? (n < 5) ? a : b : c;
    }

which passes. I am unsure how to create a test case that places multiple values on the stack, some of which are consumed. Unsure if that is possible when compiling Java expressions, but could easily be created directly with bytecode.

Yes, i think you need to process as a work queue of blocks. Thereby when branching it should be possible to fork the stack and associate it with a block and restore it.

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

PR Comment: https://git.openjdk.org/babylon/pull/16#issuecomment-1934563821


More information about the babylon-dev mailing list