[code-reflection] RFR: Improved error message if Reflect annotation is missing on transitive methods from kernel method [v10]
Nadeesh TV
ntv at openjdk.org
Thu Jan 15 21:55:58 UTC 2026
On Thu, 15 Jan 2026 21:37:53 GMT, Nadeesh TV <ntv at openjdk.org> wrote:
>> **Description**
>> Currently, if we miss the @**Reflect** annotation on methods called from kernel functions, no method is generated for them in the corresponding backend. This causes an error like:
>>
>> `> error: implicit declaration of function 'squareitWithoutReflectAnnotation' is invalid...
>> `
>> **Solution**
>> - Throw error if Reflect annotation is missing on all methods called from the kernel function that are defined in the same class as the kernel function.
>>
>> **Test**
>> - A new test is added at **hat.test.TestMissingReflectAnnotation#testTransitiveMethodFromKernelWithoutReflectAnnotation**
>
> Nadeesh TV has updated the pull request incrementally with one additional commit since the last revision:
>
> Removed extra whitespaces
@grfrost I have updated the diff by removing the OpenCLbackend changes and keeping the pattern matching as much as possible. You have previously mentioned that we could resolve CoreOp.FuncOp to its method but I have not seen that in other places in the code base that I have looked. Therefore, I am not sure that is already possible and passed the method as extra parameter. Let me know your thoughts.
-------------
PR Comment: https://git.openjdk.org/babylon/pull/798#issuecomment-3757051458
More information about the babylon-dev
mailing list