[foreign] RFR Cache binder generated classes with ClassValue

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Thu May 17 11:30:35 UTC 2018


Looks great - but you might want to move the logic for default 
constructor from the more general BinderClassGenerator to the more 
specific HeaderImplGenerator, which is, I think, the one you want.

Maurizio


On 17/05/18 06:45, Sundararajan Athijegannathan wrote:
> Please review: 
> http://cr.openjdk.java.net/~sundar/binder_class_cache_cleanup/webrev.00/
>
> * Binder generated classes are cached using two ClassValues - one for 
> header impls and one for struct impls.
>
> Other cleanups:
>
> * Enabled those checks for annotations (NativeType, NativeHeader) in 
> LibrariesHelper.
>
> * generating default constructor so that we can avoid 
> unsafe.allocateInstance() can be avoided to create bind instances.
>
> * Using ArrayList instead of HashMap in BinderClassWriter. We don't 
> need the keys and we just need to iterate the values.
>
> Thanks,
> -Sundar



More information about the panama-dev mailing list