[code-reflection] RFR: 8373572: BytecodeGenerator throws UnsupportedOperationException for JavaOp.InvokeOp when invoke kind is SUPER.

Paul Sandoz psandoz at openjdk.org
Mon Dec 15 22:29:46 UTC 2025


On Mon, 15 Dec 2025 17:39:47 GMT, Adam Sotona <asotona at openjdk.org> wrote:

> We cannot generate an invokespecial as it will result in a verify error, since the owner is not assignable to generated hidden class.
> 
> This patch constructs method handle via lookup.findSpecial using the lookup's class as the specialCaller.
> Original lookup is stored in class data of the constructed hidden class.

src/jdk.incubator.code/share/classes/jdk/incubator/code/bytecode/BytecodeGenerator.java line 860:

> 858:                             case SUPER ->
> 859:                                     cob.invokevirtual(CD_MethodHandle,
> 860:                                                       "invoke",

Can you use `invokeExact`?

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

PR Review Comment: https://git.openjdk.org/babylon/pull/752#discussion_r2621068488


More information about the babylon-dev mailing list