[code-reflection] RFR: Unreflect tests [v3]

Maurizio Cimadamore mcimadamore at openjdk.org
Fri Dec 19 14:11:47 UTC 2025


On Thu, 18 Dec 2025 18:08:39 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

>> Adam Sotona has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - obsolete debug print
>>    
>>  - new line
>
> This is a very nice approach. There are some tests where reflectable methods are never invoked e.g., `CoreBinaryOpsTest`, which tests the model in the interpreter and explicitly generated bytecode, in this case we arguably should also test direct invocation So i think it may be worth going through and checking as not all tests need to be modified and some might be to ensure larger converage. Further, with this test do we need as many specific bytecode tests? can we simplify or reduce those now?
> 
> Any thoughts on how we might apply the same approach to reflectable lambdas? I guess we can rewrite the invoke dynamic instructions.

I was probably thinking along similar lines as @PaulSandoz -- in the compiler we have tests like TreePosTest which looks for _all_ tests, and try to do something with them (in that case, ensure that start/end position of all the AST nodes generated while compiling such tests is accurate). This allows to leave other tests unchanged (e.g. we don't have to manually change the test header of each new test to run the position test -- the position test picks that up automatically, as soon as it is added to the compiler test tree). I think a similar approach would be beneficial here also.

Other than that -- great work!

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

PR Comment: https://git.openjdk.org/babylon/pull/762#issuecomment-3675215975


More information about the babylon-dev mailing list