Do not call findKotlinClass when loading class annotations

The main change is in AbstractBinaryClassAnnotationAndConstantLoader, where we
no longer perform unnecessary IO operations for classes which are already
loaded to memory
This commit is contained in:
Alexander Udalov
2016-04-06 16:18:10 +03:00
parent 7620d66019
commit ad068ed4ac
16 changed files with 68 additions and 70 deletions
@@ -39,7 +39,4 @@ object RuntimeErrorReporter : ErrorReporter {
throw IllegalStateException("Cannot infer visibility for $descriptor")
}
override fun reportLoadingError(message: String, exception: Exception?) {
throw IllegalStateException(message, exception)
}
}
@@ -68,7 +68,7 @@ class RuntimeModuleData private constructor(val deserialization: Deserialization
val javaClassDataFinder = JavaClassDataFinder(reflectKotlinClassFinder, deserializedDescriptorResolver)
val notFoundClasses = NotFoundClasses(storageManager, module)
val binaryClassAnnotationAndConstantLoader = BinaryClassAnnotationAndConstantLoaderImpl(
module, notFoundClasses, storageManager, reflectKotlinClassFinder, RuntimeErrorReporter
module, notFoundClasses, storageManager, reflectKotlinClassFinder
)
val deserializationComponentsForJava = DeserializationComponentsForJava(
storageManager, module, javaClassDataFinder, binaryClassAnnotationAndConstantLoader,