[KAPT] Some optimizations for stubs generation
* Add index to resolve compiled class by name * Disable full property resolution
This commit is contained in:
+7
-2
@@ -85,7 +85,12 @@ open class PartialAnalysisHandlerExtension : AnalysisHandlerExtension {
|
||||
if (declaration is KtProperty) {
|
||||
/* TODO Now we analyse body with anonymous object initializers. Check if we can't avoid it
|
||||
* val a: Runnable = object : Runnable { ... } */
|
||||
bodyResolver.resolveProperty(topDownAnalysisContext, declaration, descriptor)
|
||||
//resolve property in case it has delegate expression or explicit accessor, otherwise just infer type
|
||||
if (declaration.delegateExpression != null || declaration.accessors.isNotEmpty()) {
|
||||
bodyResolver.resolveProperty(topDownAnalysisContext, declaration, descriptor)
|
||||
} else {
|
||||
BodyResolver.computeDeferredType(descriptor.returnType)
|
||||
}
|
||||
}
|
||||
}
|
||||
is FunctionDescriptor -> {
|
||||
@@ -138,4 +143,4 @@ open class PartialAnalysisHandlerExtension : AnalysisHandlerExtension {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user