Condensing bootstraps
Brian Goetz
brian.goetz at oracle.com
Fri Aug 4 20:04:30 UTC 2023
> We already pass in one context object into the BSM - the Lookup
> object. It's able to look up classes, methods, etc. I haven't worked
> though the implications of this but I'll throw it out anyway - would
> it make sense to have a special kind of Lookup object for the offline
> mode that delegated class lookups to the condensation context? Do we
> need some kind of common supertype between j.l.Class and ClassDesc
> that allows asking the kinds of class relationship queries
> (isAssignableFrom, getSuperclass, getInterfaces, ...) in a way that
> can be run correctly in both modes?
>
> What I'm trying to get at is what kind of code can we run in both
> online and offline modes? Offline mode can't produce j.l.Class, will
> have challenges dealing with accessibility especially across
> classloader boundaries, others?
>
> More experiments are needed here to see how easy it is to write code
> that is applicable in both modes. Maybe you've already done them?
I think this is an area that needs more analysis. Reinventing the
reflection APIs to work "offline" seems prohibitive. A first step is
figuring out which subset of reflection/hierarchy analysis are likely to
be commonly needed by condensers, so we can narrow down the target.
More information about the leyden-dev
mailing list