On Thu, 6 Apr 2023 17:27:14 GMT, Jorn Vernee <jver...@openjdk.org> wrote:

>> An other possibility to to add some key into the ClassData that can't be 
>> imitated - such as the `InterfaceInfo` itself.  
>> An `instanceof` check on the ClassData at a fixed position could then 
>> determine if is a MHP.
>
> It looks like Proxy forcibly adds reads and exports edges from the module of 
> the target interface to the module that defines the proxy: 
> https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/lang/reflect/Proxy.java#L855-L868
>  I think we can do the same here

I would support the putting InterfaceInfo in class data approach. With 
IMPL_LOOKUP, we currently define the hidden class in the same module as the 
interface. It's currently hard to define a hidden class without an anchor host 
class for a new module.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13197#discussion_r1160094938

Reply via email to