[code-reflection] RFR: Super expressions [v2]
Paul Sandoz
psandoz at openjdk.org
Fri Sep 6 00:06:39 UTC 2024
> Support super expressions.
>
> The work in the bytecode generator is not complete, and a disabled test has been added. Currently when it encounters an invoke super operation it will throw. We cannot generate invokespecial instructions as this will create invalid bytecode (the calling class is not related to the referenced class). Instead, in a subsequent PR, we need to dynamically generate method handles, pass them as class data to the defined hidden class, so they can be loaded as constants and invoked (and therefore emulating the invokespecial instruction). That subsequent PR should also address the lifting of invokespecial instructions.
>
> This work has shown deficiencies in the modeling of invocation expressions and the resolution of `MethodRef`s. The latter has been partially addressed by providing additional information for resolution, namely the kind of invocation.
>
> Invocation operations do not fully model invocation to vararg methods and this means we cannot reliably determine in all cases if the invocation has a receiver operand or not (a class or instance invocation). This should be fixed in a subsequent PR. The fix might require the following:
> - explicit modeling of class and instance and invocation; and
> - modeling var args as a prefix (sublist) of the operand list
Paul Sandoz has updated the pull request incrementally with one additional commit since the last revision:
Remove comment.
-------------
Changes:
- all: https://git.openjdk.org/babylon/pull/221/files
- new: https://git.openjdk.org/babylon/pull/221/files/9e419b38..e1e1e0ed
Webrevs:
- full: https://webrevs.openjdk.org/?repo=babylon&pr=221&range=01
- incr: https://webrevs.openjdk.org/?repo=babylon&pr=221&range=00-01
Stats: 4 lines in 1 file changed: 0 ins; 4 del; 0 mod
Patch: https://git.openjdk.org/babylon/pull/221.diff
Fetch: git fetch https://git.openjdk.org/babylon.git pull/221/head:pull/221
PR: https://git.openjdk.org/babylon/pull/221
More information about the babylon-dev
mailing list