[code-reflection] RFR: Code reflection synthetic class generation moved to JavaCompiler::genCode [v2]
Adam Sotona
asotona at openjdk.org
Fri Nov 21 16:39:56 UTC 2025
On Fri, 21 Nov 2025 04:49:58 GMT, Adam Sotona <asotona at openjdk.org> wrote:
>> Prototype of code reflection synthetic class generation move to `JavaCompiler::genCode`.
>>
>> - collected ops are attached to the `ReflectMethods.JCReflectMethodsClassDecl`, an internal extension of `JCTree.JCClassDecl`
>> - new `genCode` method is added to `CodeReflectionTransformer` interface
>> - `JavaCompiler` calls `CodeReflectionTransformer::genCode` inside its `genCode` method
>> - implementation in `ReflectMethods.Provider` calls `OpBuilder` and `BytecodeGenerator` and generates the synthetic inner class
>
> Adam Sotona has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
>
> - TreeTranslatorPrev implementation and ReflectMethods fix
>
> - Merge branch 'code-reflection' into javac-gen-cm
> - removing JCClassDecl.crContext field
>
> - code reflection synthetic class generation moved to JavaCompiler::genCode
Thank you for the reviews.
-------------
PR Comment: https://git.openjdk.org/babylon/pull/689#issuecomment-3563798609
More information about the babylon-dev
mailing list