WALA icon indicating copy to clipboard operation
WALA copied to clipboard

Eliminate either AnalysisCache or AnalysisCacheImpl?

Open msridhar opened this issue 6 years ago • 3 comments

I can't figure out why both of these classes exist. It seems like AnalysisCacheImpl just adds some default constructors that could just as easily be included in AnalysisCache.

@juliandolby any idea why we have both of these classes?

msridhar avatar Feb 13 '19 19:02 msridhar

When compiling to JavaScript using TeaVM, some bits of Java are not supported, including soft and weak references. The type AnalysisCache refers to those types indirectly via AuxiliaryCache and CacheReference, so it is excluded from TeaVM builds. This ugly pair of classes is to make that possible.

juliandolby avatar May 15 '19 17:05 juliandolby

@juliandolby how is it possible to exclude AnalysisCache from TeaVM builds but include AnalysisCacheImpl, since AnalysisCacheImpl extends AnalysisCache? Can TeaVM load AnalysisCacheImpl even though its superclass is missing?

msridhar avatar May 15 '19 17:05 msridhar

^ @juliandolby still curious about the above 😄

msridhar avatar Aug 16 '19 20:08 msridhar