[code-reflection] RFR: Improved error message if Reflect annotation is missing on transitive methods from kernel method [v3]
Nadeesh TV
ntv at openjdk.org
Fri Jan 2 21:22:03 UTC 2026
On Fri, 2 Jan 2026 13:05:21 GMT, Gary Frost <gfrost at openjdk.org> wrote:
>> I am assuming that you have missed my comment that I posted couple of minutes ago.
>>> can resolve a Java.lang.rflect.Method... but which has no CodeModel....
>>
>> `hat.buffer.S32Array::array(..)` etc.. will also fall into this category not just `squareitWithoutReflectAnnotation`. Therefore, this criteria won't be sufficient.
>
> We can discriminate. Since kernels (generally) can only call methods on the containing Compute class we can use this.
>
> The onlly other acceptable calls are on KernelContext, through InterfaceMapped buffers. (S32Array for example) and possibly to Math.XXX
>
> So if a call is to a method in the same class as the 'invoker' and it does not have @Reflect annotation then it is in errror.
Updated as suggested.
-------------
PR Review Comment: https://git.openjdk.org/babylon/pull/798#discussion_r2658413015
More information about the babylon-dev
mailing list