@@ -1176,7 +1176,6 @@ object SymDenotations {
1176
1176
val annotations1 = if (annotations != null ) annotations else this .annotations
1177
1177
val d = ctx.SymDenotation (symbol, owner, name, initFlags1, info1, privateWithin1)
1178
1178
d.annotations = annotations1
1179
- // TODO: Copy memberCache if info does not change
1180
1179
d
1181
1180
}
1182
1181
@@ -1911,12 +1910,20 @@ object SymDenotations {
1911
1910
1912
1911
// ---- Caches for inherited info -----------------------------------------
1913
1912
1913
+ /** Base trait for caches that keep info dependent on inherited classes */
1914
1914
trait InheritedCache {
1915
+
1916
+ /** Is the cache valid in current period? */
1915
1917
def isValid (implicit ctx : Context ): Boolean
1918
+
1919
+ /** is the cache valid in current run at given phase? */
1916
1920
def isValidAt (phase : Phase )(implicit ctx : Context ): Boolean
1921
+
1922
+ /** Render invalid this cache and all cache that depend on it */
1917
1923
def invalidate (): Unit
1918
1924
}
1919
1925
1926
+ /** A cache for sets of member names, indexed by a NameFilter */
1920
1927
trait MemberNames extends InheritedCache {
1921
1928
def apply (keepOnly : NameFilter , clsd : ClassDenotation )
1922
1929
(implicit onBehalf : MemberNames , ctx : Context ): Set [Name ]
@@ -1929,6 +1936,9 @@ object SymDenotations {
1929
1936
def newCache ()(implicit ctx : Context ): MemberNames = new MemberNamesImpl (ctx.period)
1930
1937
}
1931
1938
1939
+ /** A cache for baseclasses, as a sequence in linearization order and as a set that
1940
+ * can be queried efficiently for containment.
1941
+ */
1932
1942
trait BaseData extends InheritedCache {
1933
1943
def apply (clsd : ClassDenotation )
1934
1944
(implicit onBehalf : BaseData , ctx : Context ): (List [ClassSymbol ], BaseClassSet )
0 commit comments