[code-reflection] RFR: Bytecode cleanup, renames and javadoc [v5]
Adam Sotona
asotona at openjdk.org
Wed Sep 18 07:13:17 UTC 2024
On Tue, 17 Sep 2024 18:47:23 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:
>> Adam Sotona has updated the pull request incrementally with one additional commit since the last revision:
>>
>> fixed lifting of INVOKESPECIAL + TestSmallCorpus skipping when UnsupportedOperationException
>
> test/jdk/java/lang/reflect/code/bytecode/TestSmallCorpus.java line 150:
>
>> 148: }
>> 149: } catch (UnsupportedOperationException uoe) {
>> 150: // InvokeSuperOp
>
> Is this related to bytecode instructions for construction not conforming to an expected shape?
I understand relation between `invokespecial` and `InvokeSuperOp` introduced in #221 following way:
- We cannot simply generate `invokespecial` from `InvokeSuperOp` for reasons mentioned in the `BytecodeGenerator` and so we throw `UnsupportedOperationException` for now.
- We generate `invokespecial` from `NewOp` of a non-array type.
- When `invokespecial` of `<init>` method name follows `new` of the type equals the `invokespecial` owner, it is lifted as `NewOp` of the given non-array type.
- However all other `invokespecial` instructions suppose to be lifted as `InvokeSuperOp`?
I made this assumption and changed `BytecodeLift` of `invokespecial` to lift into`InvokeSuperOp`, which caused certain amount of `TestSmallCorpus` to throw `UnsupportedOperationException`.
Please confirm the assumption is correct.
-------------
PR Review Comment: https://git.openjdk.org/babylon/pull/228#discussion_r1764517839
More information about the babylon-dev
mailing list