[code-reflection] RFR: Adjusted tests to use execution of a method and implementation of the execution model cache [v2]

Adam Sotona asotona at openjdk.org
Fri Feb 28 10:27:21 UTC 2025


On Fri, 28 Feb 2025 10:14:41 GMT, Adam Sotona <asotona at openjdk.org> wrote:

>> Ah I see. I wouldn't say that's an issue with `ClassValue` -- but more of an issue with the fact that the class is not a valid key in your case (and `ClassValue` is better alternative to a  `Map<Class, V>`).
>> 
>> But here I wonder -- if the passed quotable instance does have an associated `Quoted` object -- doesn't it mean that it must be a class generated by the metafactory, and one that is specialized for that particular code model? E.g. I'm wondering if the class alone (after you verified there's a `Quoted` object in there) isn't already a good key?
>
> Which class? I use codeLambda class as a key.

BTW: ThreadLocal does not have this problem, it can be set at any time by any value.

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

PR Review Comment: https://git.openjdk.org/babylon/pull/331#discussion_r1975175450


More information about the babylon-dev mailing list