Avoid serlialization for unrelated Java source-based classes
There is no need to track unknown (not being tracked before) classes content of which we didn't request #KT-17621 Fixed
This commit is contained in:
+5
@@ -156,6 +156,11 @@ class LazyJavaClassDescriptor(
|
||||
}
|
||||
}
|
||||
|
||||
// Checks if any part of compiler has requested scope content
|
||||
// It's necessary for IC to figure out if there is a need to track symbols in the class
|
||||
fun wasScopeContentRequested() =
|
||||
getUnsubstitutedMemberScope().wasContentRequested() || staticScope.wasContentRequested()
|
||||
|
||||
override fun getSealedSubclasses(): Collection<ClassDescriptor> = emptyList()
|
||||
|
||||
override fun toString() = "Lazy Java class ${this.fqNameUnsafe}"
|
||||
|
||||
+2
@@ -67,6 +67,8 @@ abstract class LazyJavaScope(protected val c: LazyJavaResolverContext) : MemberS
|
||||
|
||||
protected val declaredMemberIndex: NotNullLazyValue<DeclaredMemberIndex> = c.storageManager.createLazyValue { computeMemberIndex() }
|
||||
|
||||
fun wasContentRequested() = declaredMemberIndex.isComputed()
|
||||
|
||||
protected abstract fun computeMemberIndex(): DeclaredMemberIndex
|
||||
|
||||
// Fake overrides, values()/valueOf(), etc.
|
||||
|
||||
Reference in New Issue
Block a user