Comments
diff --git a/analysis/analysis-api-fe10/src/org/jetbrains/kotlin/analysis/api/descriptors/components/KaFe10TypeProvider.kt b/analysis/analysis-api-fe10/src/org/jetbrains/kotlin/analysis/api/descriptors/components/KaFe10TypeProvider.kt index 0c4143d..63bd782 100644 --- a/analysis/analysis-api-fe10/src/org/jetbrains/kotlin/analysis/api/descriptors/components/KaFe10TypeProvider.kt +++ b/analysis/analysis-api-fe10/src/org/jetbrains/kotlin/analysis/api/descriptors/components/KaFe10TypeProvider.kt
@@ -280,6 +280,7 @@ queue.addLast(mappingForType) while (queue.isNotEmpty()) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/analysis/api/descriptors/components/KaFe10TypeProvider.TypeArgumentMapping, */ val (typeParameterOwner, mapping) = queue.removeFirst() for (superType in typeParameterOwner.typeConstructor.supertypes) { val mappingForSupertype = superType.toTypeArgumentMapping(mapping) ?: continue
diff --git a/analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/components/KaFirExpressionTypeProvider.kt b/analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/components/KaFirExpressionTypeProvider.kt index d8db8458f..20d10b2 100644 --- a/analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/components/KaFirExpressionTypeProvider.kt +++ b/analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/components/KaFirExpressionTypeProvider.kt
@@ -225,6 +225,7 @@ } private fun getExpectedTypeOfFunctionParameter(expression: PsiElement): KaType? { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/analysis/api/fir/components/KtCallWithArgument, */ val (ktCallElement, argumentExpression) = expression.getFunctionCallAsWithThisAsParameter() ?: return null val firCall = ktCallElement.getOrBuildFir(firResolveSession)?.unwrapSafeCall() as? FirCall ?: return null @@ -237,6 +238,7 @@ } val argumentsToParameters = firCall.argumentsToSubstitutedValueParameters(substituteWithErrorTypes = false) ?: return null + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/analysis/api/fir/components/KaFirExpressionTypeProvider.SubstitutedValueParameter, */ val (firParameterForExpression, substitutedType) = argumentsToParameters.entries.firstOrNull { (arg, _) -> when (arg) {
diff --git a/analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/components/KaFirImportOptimizer.kt b/analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/components/KaFirImportOptimizer.kt index cf9d745..27b784c 100644 --- a/analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/components/KaFirImportOptimizer.kt +++ b/analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/components/KaFirImportOptimizer.kt
@@ -60,6 +60,7 @@ val existingImports = file.importDirectives if (existingImports.isEmpty()) return KaImportOptimizerResult() + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/analysis/api/fir/components/KaFirImportOptimizer.ReferencedEntitiesResult, */ val (usedDeclarations, unresolvedNames) = collectReferencedEntities(file) return KaImportOptimizerResult(usedDeclarations, unresolvedNames)
diff --git a/analysis/analysis-api-platform-interface/src/org/jetbrains/kotlin/analysis/api/platform/declarations/KotlinFileBasedDeclarationProvider.kt b/analysis/analysis-api-platform-interface/src/org/jetbrains/kotlin/analysis/api/platform/declarations/KotlinFileBasedDeclarationProvider.kt index b13d814..7916d22 100644 --- a/analysis/analysis-api-platform-interface/src/org/jetbrains/kotlin/analysis/api/platform/declarations/KotlinFileBasedDeclarationProvider.kt +++ b/analysis/analysis-api-platform-interface/src/org/jetbrains/kotlin/analysis/api/platform/declarations/KotlinFileBasedDeclarationProvider.kt
@@ -58,6 +58,7 @@ tasks += Task(startingChunks, kotlinFile) while (!tasks.isEmpty()) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: <local>/Task, */ val (chunks, element) = tasks.removeFirst() assert(chunks.isNotEmpty())
diff --git a/analysis/analysis-api-standalone/analysis-api-standalone-base/src/org/jetbrains/kotlin/analysis/api/standalone/base/projectStructure/StandaloneProjectFactory.kt b/analysis/analysis-api-standalone/analysis-api-standalone-base/src/org/jetbrains/kotlin/analysis/api/standalone/base/projectStructure/StandaloneProjectFactory.kt index 879ccf0..03234e2 100644 --- a/analysis/analysis-api-standalone/analysis-api-standalone-base/src/org/jetbrains/kotlin/analysis/api/standalone/base/projectStructure/StandaloneProjectFactory.kt +++ b/analysis/analysis-api-standalone/analysis-api-standalone-base/src/org/jetbrains/kotlin/analysis/api/standalone/base/projectStructure/StandaloneProjectFactory.kt
@@ -240,7 +240,8 @@ } val (roots, singleJavaFileRoots) = - rootsWithSingleJavaFileRoots.partition { (file) -> file.isDirectory || file.extension != JavaFileType.DEFAULT_EXTENSION } + rootsWithSingleJavaFileRoots.partition { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 1, destructured variable amount without '_': 1, classId: org/jetbrains/kotlin/cli/jvm/index/JavaRoot, */ + (file) -> file.isDirectory || file.extension != JavaFileType.DEFAULT_EXTENSION } val corePackageIndex = project.getService(PackageIndex::class.java) as CorePackageIndex val rootsIndex = JvmDependenciesDynamicCompoundIndex().apply {
diff --git a/analysis/decompiled/decompiler-to-stubs/src/org/jetbrains/kotlin/analysis/decompiler/stub/ClassClsStubBuilder.kt b/analysis/decompiled/decompiler-to-stubs/src/org/jetbrains/kotlin/analysis/decompiler/stub/ClassClsStubBuilder.kt index e2493f8..1550a32 100644 --- a/analysis/decompiled/decompiler-to-stubs/src/org/jetbrains/kotlin/analysis/decompiler/stub/ClassClsStubBuilder.kt +++ b/analysis/decompiled/decompiler-to-stubs/src/org/jetbrains/kotlin/analysis/decompiler/stub/ClassClsStubBuilder.kt
@@ -251,6 +251,7 @@ } private fun createNestedClassStub(classBody: StubElement<out PsiElement>, nestedClassId: ClassId) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 4, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/serialization/deserialization/ClassData, */ val (nameResolver, classProto, _, sourceElement) = c.components.classDataFinder.findClassData(nestedClassId) ?: c.components.virtualFileForDebug.let { rootFile ->
diff --git a/analysis/decompiled/decompiler-to-stubs/src/org/jetbrains/kotlin/analysis/decompiler/stub/clsStubBuilding.kt b/analysis/decompiled/decompiler-to-stubs/src/org/jetbrains/kotlin/analysis/decompiler/stub/clsStubBuilding.kt index 52710df..0ba0e03 100644 --- a/analysis/decompiled/decompiler-to-stubs/src/org/jetbrains/kotlin/analysis/decompiler/stub/clsStubBuilding.kt +++ b/analysis/decompiled/decompiler-to-stubs/src/org/jetbrains/kotlin/analysis/decompiler/stub/clsStubBuilding.kt
@@ -215,6 +215,7 @@ if (annotations.isEmpty()) return annotations.forEach { annotation -> + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/analysis/decompiler/stub/AnnotationWithTarget, */ val (annotationWithArgs, target) = annotation val annotationEntryStubImpl = KotlinAnnotationEntryStubImpl( parent,
diff --git a/build-common/src/org/jetbrains/kotlin/incremental/AbstractIncrementalCache.kt b/build-common/src/org/jetbrains/kotlin/incremental/AbstractIncrementalCache.kt index 163b34b..e91b7b8 100644 --- a/build-common/src/org/jetbrains/kotlin/incremental/AbstractIncrementalCache.kt +++ b/build-common/src/org/jetbrains/kotlin/incremental/AbstractIncrementalCache.kt
@@ -127,6 +127,7 @@ * The `srcFile` argument may be `null` (e.g., if we are processing .class files in jars where source files are not available). */ protected fun addToClassStorage(classProtoData: ClassProtoData, srcFile: File?, useCompilerMapsOnly: Boolean = false) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/incremental/ClassProtoData, */ val (proto, nameResolver) = classProtoData val supertypes = proto.supertypes(TypeTable(proto.typeTable))
diff --git a/build-common/src/org/jetbrains/kotlin/incremental/IncrementalJsCache.kt b/build-common/src/org/jetbrains/kotlin/incremental/IncrementalJsCache.kt index 47ac8b4..aae8d57 100644 --- a/build-common/src/org/jetbrains/kotlin/incremental/IncrementalJsCache.kt +++ b/build-common/src/org/jetbrains/kotlin/incremental/IncrementalJsCache.kt
@@ -108,6 +108,7 @@ for ((srcFile, data) in translatedFiles) { dirtySources.remove(srcFile) + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/incremental/js/TranslationResultValue, */ val (binaryMetadata, binaryAst, inlineData) = data val oldProtoMap = translationResults[srcFile]?.metadata?.let { protoData(srcFile, it) } ?: emptyMap() @@ -137,6 +138,7 @@ } for ((srcFile, irData) in incrementalResults.irFileData) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 9, destructured variable amount without '_': 9, classId: org/jetbrains/kotlin/incremental/js/IrTranslationResultValue, */ val (fileData, types, signatures, strings, declarations, bodies, fqn, fileMetadata, debugInfos) = irData irTranslationResults.put(srcFile, fileData, types, signatures, strings, declarations, bodies, fqn, fileMetadata, debugInfos) }
diff --git a/build-common/src/org/jetbrains/kotlin/incremental/buildUtil.kt b/build-common/src/org/jetbrains/kotlin/incremental/buildUtil.kt index 3265899..bc2b630 100644 --- a/build-common/src/org/jetbrains/kotlin/incremental/buildUtil.kt +++ b/build-common/src/org/jetbrains/kotlin/incremental/buildUtil.kt
@@ -115,7 +115,8 @@ } } - javaChangesTracker?.javaClassesUpdates?.forEach { (source, serializedJavaClass) -> + javaChangesTracker?.javaClassesUpdates?.forEach { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/incremental/SerializedJavaClassWithSource, */ + (source, serializedJavaClass) -> cache.saveJavaClassProto(source, serializedJavaClass, changesCollector) }
diff --git a/build-common/src/org/jetbrains/kotlin/incremental/protoDifferenceUtils.kt b/build-common/src/org/jetbrains/kotlin/incremental/protoDifferenceUtils.kt index 0c8eb9f..3587ca7 100644 --- a/build-common/src/org/jetbrains/kotlin/incremental/protoDifferenceUtils.kt +++ b/build-common/src/org/jetbrains/kotlin/incremental/protoDifferenceUtils.kt
@@ -184,7 +184,9 @@ ) override fun difference(): Difference { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/incremental/ClassProtoData, */ val (oldProto, oldNameResolver) = oldData + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/incremental/ClassProtoData, */ val (newProto, newNameResolver) = newData val diff = compareObject.difference(oldProto, newProto)
diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/CollectionStubMethodGenerator.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/CollectionStubMethodGenerator.kt index 487dd8a..5b44209 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/CollectionStubMethodGenerator.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/CollectionStubMethodGenerator.kt
@@ -79,7 +79,8 @@ val syntheticStubsToGenerate = LinkedHashSet<JvmMethodGenericSignature>() val bridgesToGenerate = LinkedHashSet<FunctionDescriptor>() - for ((readOnlyClass, mutableClass) in superCollectionClasses) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/codegen/CollectionStubMethodGenerator.CollectionClassPair, */ + (readOnlyClass, mutableClass) in superCollectionClasses) { // To determine which method stubs we need to generate, we create a synthetic class (named 'child' here) which inherits from // our class ('descriptor') and the corresponding MutableCollection class (for example; the process is the same for every // built-in read-only/mutable class pair). We then construct and bind fake overrides in this synthetic class with the usual @@ -174,6 +175,7 @@ } fun generate(functionCodegen: FunctionCodegen, v: ClassBuilder) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/codegen/CollectionStubMethodGenerator.TasksToGenerate, */ val (methodStubsToGenerate, syntheticStubsToGenerate, bridgesToGenerate) = computeTasksToGenerate() for (signature in methodStubsToGenerate) { @@ -220,16 +222,19 @@ val allSuperClasses = TypeUtils.getAllSupertypes(descriptor.defaultType).mapTo(HashSet(), KotlinType::constructor) - val ourSuperCollectionClasses = collectionClasses.filter { (readOnlyClass, mutableClass) -> + val ourSuperCollectionClasses = collectionClasses.filter { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/codegen/CollectionStubMethodGenerator.CollectionClassPair, */ + (readOnlyClass, mutableClass) -> readOnlyClass in allSuperClasses && mutableClass !in allSuperClasses } if (ourSuperCollectionClasses.isEmpty()) return emptySet() // Filter out built-in classes which are overridden by other built-in classes in the list, to avoid duplicating methods. - val redundantClasses = ourSuperCollectionClasses.flatMapTo(HashSet()) { (readOnlyClass) -> + val redundantClasses = ourSuperCollectionClasses.flatMapTo(HashSet()) { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 1, destructured variable amount without '_': 1, classId: org/jetbrains/kotlin/codegen/CollectionStubMethodGenerator.CollectionClassPair, */ + (readOnlyClass) -> readOnlyClass.supertypes.map(KotlinType::constructor) } - return ourSuperCollectionClasses.filter { (readOnlyClass) -> readOnlyClass !in redundantClasses } + return ourSuperCollectionClasses.filter { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 1, destructured variable amount without '_': 1, classId: org/jetbrains/kotlin/codegen/CollectionStubMethodGenerator.CollectionClassPair, */ + (readOnlyClass) -> readOnlyClass !in redundantClasses } } private fun findFakeOverridesForMethodsFromMutableCollection(
diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/InlineCodegenForDefaultBody.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/InlineCodegenForDefaultBody.kt index e941148..6398d6b 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/InlineCodegenForDefaultBody.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/InlineCodegenForDefaultBody.kt
@@ -38,6 +38,7 @@ override fun genCallInner(callableMethod: Callable, resolvedCall: ResolvedCall<*>?, callDefault: Boolean, codegen: ExpressionCodegen) { assert(!callDefault) { "inlining default stub into another default stub" } + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/codegen/inline/SMAPAndMethodNode, */ val (node, smap) = sourceCompilerForInline.compileInlineFunction(jvmSignature) val argsSize = argumentsSize(jvmSignature.asmMethod.descriptor, callableMethod.isStaticCall())
diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/InlineScopesGenerator.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/InlineScopesGenerator.kt index 414b74f..f9eee01 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/InlineScopesGenerator.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/InlineScopesGenerator.kt
@@ -344,6 +344,7 @@ updateCallSiteLineNumber(name) { newLineNumber } fun updateCallSiteLineNumber(name: String, calculate: (Int) -> Int): String { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/codegen/inline/InlineScopeInfo, */ val (scopeNumber, callSiteLineNumber, surroundingScopeNumber) = name.getInlineScopeInfo() ?: return name if (callSiteLineNumber == null) { return name
diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/LambdaInfo.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/LambdaInfo.kt index f11ddd9..def9998 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/LambdaInfo.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/LambdaInfo.kt
@@ -132,6 +132,7 @@ capturedParamDesc(fieldNode.name, Type.getType(fieldNode.desc), isSuspend = false) }?.toList() ?: emptyList() isBoundCallableReference = isReference && capturedVars.isNotEmpty() + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/codegen/inline/SMAPAndMethodNode, */ val (originNode, classSmap) = loadDefaultLambdaBody(classBytes, lambdaClassType, isPropertyReference) node = SMAPAndMethodNode(createNodeWithFakeVariables(originNode), classSmap) }
diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/MethodInliner.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/MethodInliner.kt index f4e4f8b..2c8c66c 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/MethodInliner.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/MethodInliner.kt
@@ -1338,6 +1338,7 @@ } private fun incrementScopeNumbers(name: String): String { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/codegen/inline/InlineScopeInfo, */ val (scopeNumber, callSiteLineNumber, surroundingScopeNumber) = name.getInlineScopeInfo() ?: return name return buildString { append(name.dropInlineScopeInfo())
diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/SMAP.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/SMAP.kt index 89e070a..4cfa936 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/SMAP.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/SMAP.kt
@@ -28,8 +28,10 @@ val debugMappings = linkedMapOf<Pair<String, String>, FileMapping>() for (fileMapping in fileMappings) { - for ((_, dest, range, callSite) in fileMapping.lineMappings) { - callSite?.let { (line, file, path) -> + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 4, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/codegen/inline/RangeMapping, */ + (_, dest, range, callSite) in fileMapping.lineMappings) { + callSite?.let { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/codegen/inline/SourcePosition, */ + (line, file, path) -> debugMappings.getOrPut(file to path) { FileMapping(file, path) }.mapNewInterval(line, dest, range) } }
diff --git a/compiler/build-tools/kotlin-build-tools-impl/src/main/kotlin/org/jetbrains/kotlin/buildtools/internal/CompilationServiceImpl.kt b/compiler/build-tools/kotlin-build-tools-impl/src/main/kotlin/org/jetbrains/kotlin/buildtools/internal/CompilationServiceImpl.kt index 8a6b5c9..923cd9d 100644 --- a/compiler/build-tools/kotlin-build-tools-impl/src/main/kotlin/org/jetbrains/kotlin/buildtools/internal/CompilationServiceImpl.kt +++ b/compiler/build-tools/kotlin-build-tools-impl/src/main/kotlin/org/jetbrains/kotlin/buildtools/internal/CompilationServiceImpl.kt
@@ -209,6 +209,7 @@ } } + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/daemon/client/CompileServiceSession, */ val (daemon, sessionId) = KotlinCompilerRunnerUtils.newDaemonConnection( compilerId, clientIsAliveFile,
diff --git a/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/compiler/ClasspathRootsResolver.kt b/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/compiler/ClasspathRootsResolver.kt index 881b0c7..9e46ebd 100644 --- a/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/compiler/ClasspathRootsResolver.kt +++ b/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/compiler/ClasspathRootsResolver.kt
@@ -100,7 +100,8 @@ val hasOutputDirectoryInClasspath = outputDirectory in jvmClasspathRoots || outputDirectory in jvmModulePathRoots - for ((root, packagePrefix) in javaSourceRoots) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/cli/jvm/compiler/ClasspathRootsResolver.RootWithPrefix, */ + (root, packagePrefix) in javaSourceRoots) { val modularRoot = modularSourceRoot(root, hasOutputDirectoryInClasspath) if (modularRoot != null) { modules += modularRoot
diff --git a/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/compiler/JvmPackagePartProvider.kt b/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/compiler/JvmPackagePartProvider.kt index de24687..8c9dbb5 100644 --- a/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/compiler/JvmPackagePartProvider.kt +++ b/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/compiler/JvmPackagePartProvider.kt
@@ -44,7 +44,8 @@ override val loadedModules: MutableList<ModuleMappingInfo<VirtualFile>> = SmartList() fun addRoots(roots: List<JavaRoot>, messageCollector: MessageCollector) { - for ((root, type) in roots) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/cli/jvm/index/JavaRoot, */ + (root, type) in roots) { if (type != JavaRoot.RootType.BINARY) continue if (root !in scope) continue
diff --git a/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinCliJavaFileManagerImpl.kt b/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinCliJavaFileManagerImpl.kt index a53cdaa..583d7c0 100644 --- a/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinCliJavaFileManagerImpl.kt +++ b/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinCliJavaFileManagerImpl.kt
@@ -102,6 +102,7 @@ fun findClass(classId: ClassId, searchScope: GlobalSearchScope) = findClass(JavaClassFinder.Request(classId), searchScope) override fun findClass(request: JavaClassFinder.Request, searchScope: GlobalSearchScope): JavaClass? { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/load/java/JavaClassFinder.Request, */ val (classId, classFileContentFromRequest, outerClassFromRequest) = request val virtualFile = findVirtualFileForTopLevelClass(classId, searchScope) ?: return null
diff --git a/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinCoreEnvironment.kt b/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinCoreEnvironment.kt index a6f4e8d..1f1ff966 100644 --- a/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinCoreEnvironment.kt +++ b/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinCoreEnvironment.kt
@@ -267,11 +267,13 @@ hasKotlinSources = contentRoots.any { it is KotlinSourceRoot }, ) + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/cli/jvm/compiler/ClasspathRootsResolver.RootsAndModules, */ val (initialRoots, javaModules) = classpathRootsResolver.convertClasspathRoots(contentRoots) this.initialRoots.addAll(initialRoots) val (roots, singleJavaFileRoots) = - initialRoots.partition { (file) -> file.isDirectory || file.extension != JavaFileType.DEFAULT_EXTENSION } + initialRoots.partition { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 1, destructured variable amount without '_': 1, classId: org/jetbrains/kotlin/cli/jvm/index/JavaRoot, */ + (file) -> file.isDirectory || file.extension != JavaFileType.DEFAULT_EXTENSION } // REPL and kapt2 update classpath dynamically rootsIndex = JvmDependenciesDynamicCompoundIndex().apply { @@ -403,7 +405,8 @@ return rootsIndex.addNewIndexForRoots(newRoots)?.let { newIndex -> updateClasspathFromRootsIndex(newIndex) - newIndex.indexedRoots.mapNotNull { (file) -> + newIndex.indexedRoots.mapNotNull { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 1, destructured variable amount without '_': 1, classId: org/jetbrains/kotlin/cli/jvm/index/JavaRoot, */ + (file) -> VfsUtilCore.virtualToIoFile(VfsUtilCore.getVirtualFileForJar(file) ?: file) }.toList() }.orEmpty()
diff --git a/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/compiler/cliJavaModuleUtils.kt b/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/compiler/cliJavaModuleUtils.kt index b89ba08..5f16e62 100644 --- a/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/compiler/cliJavaModuleUtils.kt +++ b/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/compiler/cliJavaModuleUtils.kt
@@ -10,7 +10,8 @@ import org.jetbrains.kotlin.resolve.jvm.modules.JavaModule fun JavaModule.getJavaModuleRoots(): List<JavaRoot> = - moduleRoots.map { (root, isBinary, isBinarySignature) -> + moduleRoots.map { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/resolve/jvm/modules/JavaModule.Root, */ + (root, isBinary, isBinarySignature) -> val type = when { isBinarySignature -> JavaRoot.RootType.BINARY_SIG isBinary -> JavaRoot.RootType.BINARY
diff --git a/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/compiler/coreEnvironmentUtils.kt b/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/compiler/coreEnvironmentUtils.kt index a5dd808..6085f03 100644 --- a/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/compiler/coreEnvironmentUtils.kt +++ b/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/compiler/coreEnvironmentUtils.kt
@@ -53,7 +53,8 @@ } } - for ((sourceRootPath, isCommon, hmppModuleName) in this) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/cli/common/config/KotlinSourceRoot, */ + (sourceRootPath, isCommon, hmppModuleName) in this) { val sourceRoot = File(sourceRootPath) val vFile = localFileSystem.findFileByPath(sourceRoot.normalize().path) if (vFile == null) {
diff --git a/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/index/SingleJavaFileRootsIndex.kt b/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/index/SingleJavaFileRootsIndex.kt index 01fbc6c..00e891a 100644 --- a/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/index/SingleJavaFileRootsIndex.kt +++ b/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/index/SingleJavaFileRootsIndex.kt
@@ -28,7 +28,8 @@ class SingleJavaFileRootsIndex(private val roots: List<JavaRoot>) { init { - for ((file) in roots) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 1, destructured variable amount without '_': 1, classId: org/jetbrains/kotlin/cli/jvm/index/JavaRoot, */ + (file) in roots) { assert(!file.isDirectory) { "Should not be a directory: $file" } } }
diff --git a/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/modules/CliJavaModuleResolver.kt b/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/modules/CliJavaModuleResolver.kt index f65c778..81b2a43 100644 --- a/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/modules/CliJavaModuleResolver.kt +++ b/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/modules/CliJavaModuleResolver.kt
@@ -65,7 +65,8 @@ } private operator fun JavaModule.contains(file: VirtualFile): Boolean = - moduleRoots.any { (root, isBinary) -> isBinary && VfsUtilCore.isAncestor(root, file, false) } + moduleRoots.any { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/resolve/jvm/modules/JavaModule.Root, */ + (root, isBinary) -> isBinary && VfsUtilCore.isAncestor(root, file, false) } override fun checkAccessibility( fileFromOurModule: VirtualFile?, referencedFile: VirtualFile, referencedPackage: FqName?
diff --git a/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/modules/JavaModuleGraph.kt b/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/modules/JavaModuleGraph.kt index 2759d7b..5cbfc10 100644 --- a/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/modules/JavaModuleGraph.kt +++ b/compiler/cli/cli-base/src/org/jetbrains/kotlin/cli/jvm/modules/JavaModuleGraph.kt
@@ -33,7 +33,8 @@ fun dfs(moduleName: String): Boolean { // Automatic modules have no transitive exports, so we only consider explicit modules here val moduleInfo = (module(moduleName) as? JavaModule.Explicit)?.moduleInfo ?: return false - for ((dependencyModuleName, isTransitive) in moduleInfo.requires) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/resolve/jvm/modules/JavaModuleInfo.Requires, */ + (dependencyModuleName, isTransitive) in moduleInfo.requires) { if (isTransitive && visited.add(dependencyModuleName)) { dfs(dependencyModuleName) } @@ -48,7 +49,8 @@ // Do nothing; all automatic modules should be added to compilation roots at call site as per java.lang.module javadoc } is JavaModule.Explicit -> { - for ((dependencyModuleName, isTransitive) in module.moduleInfo.requires) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/resolve/jvm/modules/JavaModuleInfo.Requires, */ + (dependencyModuleName, isTransitive) in module.moduleInfo.requires) { if (visited.add(dependencyModuleName)) { val moduleExists = dfs(dependencyModuleName) //ct.sym can miss some internal modules from non-transitive dependencies @@ -75,7 +77,8 @@ when (module) { is JavaModule.Automatic -> return true is JavaModule.Explicit -> { - for ((dependencyModuleName, isTransitive) in module.moduleInfo.requires) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/resolve/jvm/modules/JavaModuleInfo.Requires, */ + (dependencyModuleName, isTransitive) in module.moduleInfo.requires) { if (dependencyModuleName == dependencyName) return true if (isTransitive && dfs(dependencyModuleName)) return true @@ -92,7 +95,8 @@ when (module) { is JavaModule.Automatic -> return true is JavaModule.Explicit -> { - for ((dependencyModuleName) in module.moduleInfo.requires) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 1, destructured variable amount without '_': 1, classId: org/jetbrains/kotlin/resolve/jvm/modules/JavaModuleInfo.Requires, */ + (dependencyModuleName) in module.moduleInfo.requires) { if (dfs(dependencyModuleName)) return true } }
diff --git a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.kt b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.kt index 79595ae..ced116c 100644 --- a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.kt +++ b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.kt
@@ -921,7 +921,8 @@ var standaloneSamConversionFeaturePassedExplicitly = false var functionReferenceWithDefaultValueFeaturePassedExplicitly = false - for ((feature, state) in internalArguments.filterIsInstance<ManualLanguageFeatureSetting>()) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/cli/common/arguments/ManualLanguageFeatureSetting, */ + (feature, state) in internalArguments.filterIsInstance<ManualLanguageFeatureSetting>()) { put(feature, state) if (state == LanguageFeature.State.ENABLED && feature.forcesPreReleaseBinariesIfEnabled()) { featuresThatForcePreReleaseBinaries += feature
diff --git a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/parseCommandLineArguments.kt b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/parseCommandLineArguments.kt index 9d27342..feb0be9 100644 --- a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/parseCommandLineArguments.kt +++ b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/parseCommandLineArguments.kt
@@ -202,6 +202,7 @@ continue } + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/cli/common/arguments/ArgumentField, */ val (getter, setter, argument) = argumentField // Tests for -shortName=value, which isn't currently allowed.
diff --git a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/repl/KotlinJsr223JvmInvocableScriptEngine.kt b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/repl/KotlinJsr223JvmInvocableScriptEngine.kt index 711dd8a..3bd473f 100644 --- a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/repl/KotlinJsr223JvmInvocableScriptEngine.kt +++ b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/repl/KotlinJsr223JvmInvocableScriptEngine.kt
@@ -60,7 +60,8 @@ private fun invokeImpl(prioritizedCallOrder: List<EvalClassWithInstanceAndLoader>, name: String, args: Array<out Any?>): Any? { // TODO: cache the method lookups? - val (fn, mapping, invokeWrapper) = prioritizedCallOrder.asSequence().map { (klass, instance, _, invokeWrapper) -> + val (fn, mapping, invokeWrapper) = prioritizedCallOrder.asSequence().map { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 4, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/cli/common/repl/EvalClassWithInstanceAndLoader, */ + (klass, instance, _, invokeWrapper) -> val candidates = klass.functions.filter { it.name == name } candidates.findMapping(listOf(instance) + args)?.let { Triple(it.first, it.second, invokeWrapper)
diff --git a/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/K2JsIrCompiler.kt b/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/K2JsIrCompiler.kt index aa404f8..bf91532 100644 --- a/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/K2JsIrCompiler.kt +++ b/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/K2JsIrCompiler.kt
@@ -359,6 +359,7 @@ relativeRequirePath = true ) + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/ir/backend/js/ic/JsExecutableProducer.BuildResult, */ val (outputs, rebuiltModules) = jsExecutableProducer.buildExecutable(arguments.granularity, outJsProgram = false) outputs.writeAll(outputDir, outputName, arguments.dtsStrategy, moduleName, moduleKind) @@ -411,6 +412,7 @@ loadFunctionInterfacesIntoStdlib = true, ) + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/backend/wasm/LoweredIrWithExtraArtifacts, */ val (allModules, backendContext, typeScriptFragment) = compileToLoweredIr( irModuleInfo, module.mainModule,
diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/common/CLICompiler.kt b/compiler/cli/src/org/jetbrains/kotlin/cli/common/CLICompiler.kt index 876225b..fbc2575 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/common/CLICompiler.kt +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/common/CLICompiler.kt
@@ -183,7 +183,8 @@ if (!arguments.disableDefaultScriptingPlugin) { scriptingPluginOptions.addPlatformOptions(arguments) val explicitScriptingPlugin = - extractPluginClasspathAndOptions(pluginConfigurations).any { (_, classpath, _) -> + extractPluginClasspathAndOptions(pluginConfigurations).any { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 3, destructured variable amount without '_': 1, classId: org/jetbrains/kotlin/cli/plugins/PluginClasspathAndOptions, */ + (_, classpath, _) -> classpath.any { File(it).name.startsWith(PathUtil.KOTLIN_SCRIPTING_COMPILER_PLUGIN_NAME) } } || pluginClasspaths.any { File(it).name.startsWith(PathUtil.KOTLIN_SCRIPTING_COMPILER_PLUGIN_NAME) } val explicitOrLoadedScriptingPlugin = explicitScriptingPlugin ||
diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/FirKotlinToJvmBytecodeCompiler.kt b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/FirKotlinToJvmBytecodeCompiler.kt index 605adc9..c2dbbe4 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/FirKotlinToJvmBytecodeCompiler.kt +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/FirKotlinToJvmBytecodeCompiler.kt
@@ -205,7 +205,8 @@ createProviderAndScopeForIncrementalCompilation = { providerAndScopeForIncrementalCompilation } ) - val outputs = sessionsWithSources.map { (session, sources) -> + val outputs = sessionsWithSources.map { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/cli/common/SessionWithSources, */ + (session, sources) -> buildResolveAndCheckFirFromKtFiles(session, sources, diagnosticsReporter) } outputs.runPlatformCheckers(diagnosticsReporter) @@ -234,6 +235,7 @@ fir2IrActualizedResult: Fir2IrActualizedResult, diagnosticsReporter: BaseDiagnosticsCollector, ): GenerationState { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 6, destructured variable amount without '_': 5, classId: org/jetbrains/kotlin/fir/pipeline/Fir2IrActualizedResult, */ val (moduleFragment, components, pluginContext, irActualizedResult, _, symbolTable) = fir2IrActualizedResult val irInput = ModuleCompilerIrBackendInput( TargetId(module),
diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinToJVMBytecodeCompiler.kt b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinToJVMBytecodeCompiler.kt index c2aef08..07a8dce 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinToJVMBytecodeCompiler.kt +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinToJVMBytecodeCompiler.kt
@@ -77,6 +77,7 @@ val useFrontendIR = compilerConfiguration.getBoolean(CommonConfigurationKeys.USE_FIR) val messageCollector = environment.messageCollector + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 7, destructured variable amount without '_': 7, classId: org/jetbrains/kotlin/cli/jvm/compiler/KotlinToJVMBytecodeCompiler.BackendInputForMultiModuleChunk, */ val (codegenFactory, wholeBackendInput, moduleDescriptor, bindingContext, firJvmBackendResolver, firJvmBackendExtension, mainClassFqName) = if (useFrontendIR) { // K2/PSI: base checks val projectEnvironment = @@ -508,13 +509,15 @@ } for (module in chunk) { - for ((path, packagePrefix) in module.getJavaSourceRoots()) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/modules/JavaRootPath, */ + (path, packagePrefix) in module.getJavaSourceRoots()) { addJavaSourceRoot(File(path), packagePrefix) } } val isJava9Module = chunk.any { module -> - module.getJavaSourceRoots().any { (path, packagePrefix) -> + module.getJavaSourceRoots().any { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/modules/JavaRootPath, */ + (path, packagePrefix) -> val file = File(path) packagePrefix == null && (file.name == PsiJavaModule.MODULE_INFO_FILE ||
diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/pipeline/jvmCompilerPipeline.kt b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/pipeline/jvmCompilerPipeline.kt index 13d05cf..8a7cc15 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/pipeline/jvmCompilerPipeline.kt +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/pipeline/jvmCompilerPipeline.kt
@@ -165,6 +165,7 @@ (environment.projectEnvironment as? VfsBasedProjectEnvironment)?.project?.let { IrGenerationExtension.getInstances(it) } ?: emptyList() + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 6, destructured variable amount without '_': 5, classId: org/jetbrains/kotlin/fir/pipeline/Fir2IrActualizedResult, */ val (moduleFragment, components, pluginContext, irActualizedResult, _, symbolTable) = analysisResults.convertToIrAndActualizeForJvm( extensions, input.configuration, environment.diagnosticsReporter, irGenerationExtensions, @@ -314,7 +315,8 @@ val countFilesAndLines = if (performanceManager == null) null else performanceManager::addSourcesStats - val outputs = sessionWithSources.map { (session, sources) -> + val outputs = sessionWithSources.map { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/cli/common/SessionWithSources, */ + (session, sources) -> buildResolveAndCheckFirViaLightTree(session, sources, diagnosticsReporter, countFilesAndLines) } outputs.runPlatformCheckers(diagnosticsReporter) @@ -425,11 +427,13 @@ hasKotlinSources = contentRoots.any { it is KotlinSourceRoot }, ) + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/cli/jvm/compiler/ClasspathRootsResolver.RootsAndModules, */ val (initialRoots, javaModules) = classpathRootsResolver.convertClasspathRoots(contentRoots) val (roots, singleJavaFileRoots) = - initialRoots.partition { (file) -> file.isDirectory || file.extension != JavaFileType.DEFAULT_EXTENSION } + initialRoots.partition { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 1, destructured variable amount without '_': 1, classId: org/jetbrains/kotlin/cli/jvm/index/JavaRoot, */ + (file) -> file.isDirectory || file.extension != JavaFileType.DEFAULT_EXTENSION } // REPL and kapt2 update classpath dynamically val rootsIndex = JvmDependenciesDynamicCompoundIndex().apply {
diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/metadata/FirMetadataSerializer.kt b/compiler/cli/src/org/jetbrains/kotlin/cli/metadata/FirMetadataSerializer.kt index d11a017..f6b5f2a 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/metadata/FirMetadataSerializer.kt +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/metadata/FirMetadataSerializer.kt
@@ -107,7 +107,8 @@ ) } ) - sessionsWithSources.map { (session, files) -> + sessionsWithSources.map { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/cli/common/SessionWithSources, */ + (session, files) -> val firFiles = session.buildFirViaLightTree(files, diagnosticsReporter, performanceManager::addSourcesStats) resolveAndCheckFir(session, firFiles, diagnosticsReporter) } @@ -137,7 +138,8 @@ createProviderAndScopeForIncrementalCompilation = { providerAndScopeForIncrementalCompilation } ) - sessionsWithSources.map { (session, files) -> + sessionsWithSources.map { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/cli/common/SessionWithSources, */ + (session, files) -> val firFiles = session.buildFirFromKtFiles(files) resolveAndCheckFir(session, firFiles, diagnosticsReporter) } @@ -161,6 +163,7 @@ val fragments = mutableMapOf<String, MutableList<ByteArray>>() for (output in analysisResult) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/fir/pipeline/ModuleCompilerAnalyzedOutput, */ val (session, scopeSession, fir) = output val languageVersionSettings = environment.configuration.languageVersionSettings
diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/metadata/MetadataSerializer.kt b/compiler/cli/src/org/jetbrains/kotlin/cli/metadata/MetadataSerializer.kt index ea23f16..e6a6323 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/metadata/MetadataSerializer.kt +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/metadata/MetadataSerializer.kt
@@ -50,6 +50,7 @@ val languageVersionSettings = environment.configuration.languageVersionSettings val files = environment.getSourceFiles() val project = environment.project + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/cli/metadata/CommonAnalysisResult, */ val (module, bindingContext) = analysisResult val packageTable = hashMapOf<FqName, PackageParts>()
diff --git a/compiler/container/src/org/jetbrains/kotlin/container/Storage.kt b/compiler/container/src/org/jetbrains/kotlin/container/Storage.kt index 0bd64fc..7b337fe 100644 --- a/compiler/container/src/org/jetbrains/kotlin/container/Storage.kt +++ b/compiler/container/src/org/jetbrains/kotlin/container/Storage.kt
@@ -217,7 +217,8 @@ private fun injectProperties(instance: Any, context: ValueResolveContext) { val classInfo = instance::class.java.getInfo() - classInfo.setterInfos.forEach { (method) -> + classInfo.setterInfos.forEach { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 1, destructured variable amount without '_': 1, classId: org/jetbrains/kotlin/container/SetterInfo, */ + (method) -> val methodBinding = method.bindToMethod(containerId, context) methodBinding.invoke(instance) }
diff --git a/compiler/daemon/src/org/jetbrains/kotlin/daemon/CompileServiceImpl.kt b/compiler/daemon/src/org/jetbrains/kotlin/daemon/CompileServiceImpl.kt index 8666898..9af8602 100644 --- a/compiler/daemon/src/org/jetbrains/kotlin/daemon/CompileServiceImpl.kt +++ b/compiler/daemon/src/org/jetbrains/kotlin/daemon/CompileServiceImpl.kt
@@ -992,7 +992,8 @@ ) { // all others are smaller that me, take overs' clients and shut them down log.info("$LOG_PREFIX_ASSUMING_OTHER_DAEMONS_HAVE lower prio, taking clients from them and schedule them to shutdown: my runfile: ${runFile.name} (${runFile.lastModified()}) vs best other runfile: ${bestDaemonWithMetadata.runFile.name} (${bestDaemonWithMetadata.runFile.lastModified()})") - aliveWithOpts.forEach { (daemon, runFile, _) -> + aliveWithOpts.forEach { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 3, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/daemon/common/DaemonWithMetadata, */ + (daemon, runFile, _) -> try { daemon.getClients().takeIf { it.isGood }?.let { it.get().forEach { clientAliveFile -> registerClient(clientAliveFile) }
diff --git a/compiler/fir/checkers/checkers.js/src/org/jetbrains/kotlin/fir/analysis/js/checkers/declaration/FirJsNameClashClassMembersChecker.kt b/compiler/fir/checkers/checkers.js/src/org/jetbrains/kotlin/fir/analysis/js/checkers/declaration/FirJsNameClashClassMembersChecker.kt index 17b6790..bae58d3 100644 --- a/compiler/fir/checkers/checkers.js/src/org/jetbrains/kotlin/fir/analysis/js/checkers/declaration/FirJsNameClashClassMembersChecker.kt +++ b/compiler/fir/checkers/checkers.js/src/org/jetbrains/kotlin/fir/analysis/js/checkers/declaration/FirJsNameClashClassMembersChecker.kt
@@ -61,6 +61,7 @@ val symbolsToProcess = mutableListOf(startMemberWithScope) val leaves = mutableSetOf<FirCallableSymbol<*>>() while (symbolsToProcess.isNotEmpty()) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/scopes/MemberWithBaseScope, */ val (processingSymbol, scope) = symbolsToProcess.popLast() val overriddenMembers = scope.getDirectOverriddenMembersWithBaseScope(processingSymbol) for (overriddenMemberWithScope in overriddenMembers) { @@ -206,7 +207,8 @@ val fakeOverrideStableNames = stableNames.filterFakeOverrideNames(declaration, context) val nonFakeOverrideClashes = stableNames.collectNonFakeOverrideClashes { it in fakeOverrideStableNames } - for ((symbol, clashedWith) in nonFakeOverrideClashes) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/analysis/js/checkers/declaration/FirJsNameClashClassMembersChecker.ClashedSymbol, */ + (symbol, clashedWith) in nonFakeOverrideClashes) { val source = when (symbol) { is FirCallableSymbol<*> -> symbol.unwrapFakeOverridesOrDelegated().source else -> symbol.source @@ -214,7 +216,8 @@ reporter.reportOn(source, FirJsErrors.JS_NAME_CLASH, name, clashedWith, context) } - fakeOverrideStableNames.findFirstFakeOverrideClash(stableNameCollector)?.let { (fakeOverrideSymbol, clashedWith) -> + fakeOverrideStableNames.findFirstFakeOverrideClash(stableNameCollector)?.let { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/analysis/js/checkers/declaration/FirJsNameClashClassMembersChecker.ClashedSymbol, */ + (fakeOverrideSymbol, clashedWith) -> reporter.reportOn(declaration.source, FirJsErrors.JS_FAKE_NAME_CLASH, name, fakeOverrideSymbol, clashedWith, context) } }
diff --git a/compiler/fir/checkers/checkers.native/src/org/jetbrains/kotlin/fir/analysis/native/checkers/FirNativeObjCRefinementAnnotationChecker.kt b/compiler/fir/checkers/checkers.native/src/org/jetbrains/kotlin/fir/analysis/native/checkers/FirNativeObjCRefinementAnnotationChecker.kt index 2272293..f06343b 100644 --- a/compiler/fir/checkers/checkers.native/src/org/jetbrains/kotlin/fir/analysis/native/checkers/FirNativeObjCRefinementAnnotationChecker.kt +++ b/compiler/fir/checkers/checkers.native/src/org/jetbrains/kotlin/fir/analysis/native/checkers/FirNativeObjCRefinementAnnotationChecker.kt
@@ -29,6 +29,7 @@ override fun check(declaration: FirRegularClass, context: CheckerContext, reporter: DiagnosticReporter) { if (declaration.classKind != ClassKind.ANNOTATION_CLASS) return val session = context.session + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/analysis/native/checkers/ObjCExportMetaAnnotations, */ val (objCAnnotation, swiftAnnotation) = declaration.annotations.findMetaAnnotations(session) if (objCAnnotation == null && swiftAnnotation == null) return if (objCAnnotation != null && swiftAnnotation != null) {
diff --git a/compiler/fir/checkers/checkers.native/src/org/jetbrains/kotlin/fir/analysis/native/checkers/FirNativeObjCRefinementOverridesChecker.kt b/compiler/fir/checkers/checkers.native/src/org/jetbrains/kotlin/fir/analysis/native/checkers/FirNativeObjCRefinementOverridesChecker.kt index d34fd8d..1401553 100644 --- a/compiler/fir/checkers/checkers.native/src/org/jetbrains/kotlin/fir/analysis/native/checkers/FirNativeObjCRefinementOverridesChecker.kt +++ b/compiler/fir/checkers/checkers.native/src/org/jetbrains/kotlin/fir/analysis/native/checkers/FirNativeObjCRefinementOverridesChecker.kt
@@ -74,7 +74,8 @@ var isRefinedInSwift = swiftAnnotations.isNotEmpty() val supersNotHiddenFromObjC = mutableListOf<FirCallableSymbol<*>>() val supersNotRefinedInSwift = mutableListOf<FirCallableSymbol<*>>() - for ((symbol, scope) in overriddenMemberSymbols) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/scopes/MemberWithBaseScope, */ + (symbol, scope) in overriddenMemberSymbols) { val (superIsHiddenFromObjC, superIsRefinedInSwift) = symbol.inheritsRefinedAnnotations(context.session, scope) if (superIsHiddenFromObjC) isHiddenFromObjC = true else supersNotHiddenFromObjC.add(symbol) if (superIsRefinedInSwift) isRefinedInSwift = true else supersNotRefinedInSwift.add(symbol) @@ -91,6 +92,7 @@ val (hasObjC, hasSwift) = hasRefinedAnnotations(session) if (hasObjC && hasSwift) return true to true // Note: `checkMember` requires all overridden symbols to be either refined or not refined. + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/scopes/MemberWithBaseScope, */ val (overriddenMemberSymbol, scope) = baseScope.getDirectOverriddenMembersWithBaseScope(this).firstOrNull() ?: return hasObjC to hasSwift val (inheritsObjC, inheritsSwift) = overriddenMemberSymbol.inheritsRefinedAnnotations(session, scope)
diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/ConeTypeCompatibilityChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/ConeTypeCompatibilityChecker.kt index 583503e..2cd02a1 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/ConeTypeCompatibilityChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/ConeTypeCompatibilityChecker.kt
@@ -162,6 +162,7 @@ var result = Compatibility.COMPATIBLE val typeArgsCompatibility = typeArgumentMapping.asSequence() .map { (paramRef, boundTypeArguments) -> + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/fir/analysis/checkers/ConeTypeCompatibilityChecker.BoundTypeArguments, */ val (upper, lower, compatibility) = boundTypeArguments if (paramRef in checkedTypeParameters) { // if we are already checking this type parameter, simply bail out to prevent infinite recursion. @@ -279,6 +280,7 @@ val queue = ArrayDeque<TypeArgumentMapping>() queue.addLast(coneType.toTypeArgumentMapping(ctx) ?: return) while (queue.isNotEmpty()) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/analysis/checkers/ConeTypeCompatibilityChecker.TypeArgumentMapping, */ val (typeParameterOwner, mapping) = queue.removeFirst() val superTypes = typeParameterOwner.getSuperTypes() for (superType in superTypes) {
diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirMissingDependencySupertypeUtils.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirMissingDependencySupertypeUtils.kt index 28d7156..f1417c8 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirMissingDependencySupertypeUtils.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/FirMissingDependencySupertypeUtils.kt
@@ -32,7 +32,8 @@ if (declaration !is FirClassSymbol<*>) return false val missingSuperTypes = context.session.missingDependencyStorage.getMissingSuperTypes(declaration) - for ((superType, origin) in missingSuperTypes) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/types/FirMissingDependencyStorage.TypeWithOrigin, */ + (superType, origin) in missingSuperTypes) { val diagnostic = if (origin == FirMissingDependencyStorage.SupertypeOrigin.TYPE_ARGUMENT && !context.languageVersionSettings.supportsFeature( LanguageFeature.ForbidUsingSupertypesWithInaccessibleContentInTypeArguments
diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirInlineDeclarationChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirInlineDeclarationChecker.kt index fa0e9fde..0964336 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirInlineDeclarationChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirInlineDeclarationChecker.kt
@@ -307,6 +307,7 @@ ) { return } + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirInlineDeclarationChecker.InlineFunctionBodyContext.AccessedDeclarationVisibilityData, */ val (isInlineFunPublicOrPublishedApi, isCalledFunPublicOrPublishedApi, calledFunEffectiveVisibility) = checkAccessedDeclaration( source, accessExpression,
diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirSupertypesChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirSupertypesChecker.kt index 6360858..7e82c0c 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirSupertypesChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirSupertypesChecker.kt
@@ -144,6 +144,7 @@ var result = false for ((index, typeArgument) in coneType.typeArguments.withIndex()) { if (typeArgument.isConflictingOrNotInvariant) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 1, classId: org/jetbrains/kotlin/fir/analysis/checkers/FirTypeRefSource, */ val (_, argSource) = typeRefAndSourcesForArguments.getOrNull(index) ?: continue reporter.reportOn( argSource ?: superTypeRef.source,
diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirOptInUsageBaseChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirOptInUsageBaseChecker.kt index d10eec8..6d0e92f 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirOptInUsageBaseChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirOptInUsageBaseChecker.kt
@@ -293,7 +293,8 @@ reporter: DiagnosticReporter, source: KtSourceElement? = element.source, ) { - for ((annotationClassId, severity, message, _, fromSupertype) in experimentalities) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 5, destructured variable amount without '_': 4, classId: org/jetbrains/kotlin/fir/analysis/checkers/expression/FirOptInUsageBaseChecker.Experimentality, */ + (annotationClassId, severity, message, _, fromSupertype) in experimentalities) { if (!isExperimentalityAcceptableInContext(annotationClassId, context, fromSupertype)) { val (diagnostic, verb) = when (severity) { Experimentality.Severity.WARNING -> FirErrors.OPT_IN_USAGE to "should" @@ -317,7 +318,8 @@ context: CheckerContext, reporter: DiagnosticReporter ) { - for ((annotationClassId, severity, markerMessage, supertypeName) in experimentalities) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 4, destructured variable amount without '_': 4, classId: org/jetbrains/kotlin/fir/analysis/checkers/expression/FirOptInUsageBaseChecker.Experimentality, */ + (annotationClassId, severity, markerMessage, supertypeName) in experimentalities) { if (!symbol.fir.isExperimentalityAcceptable(context.session, annotationClassId, fromSupertype = false) && !isExperimentalityAcceptableInContext(annotationClassId, context, fromSupertype = false) ) {
diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/collectors/AbstractDiagnosticCollectorVisitor.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/collectors/AbstractDiagnosticCollectorVisitor.kt index 0d3343c..92e6775 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/collectors/AbstractDiagnosticCollectorVisitor.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/collectors/AbstractDiagnosticCollectorVisitor.kt
@@ -429,6 +429,7 @@ type: ConeKotlinType?, block: () -> R ): R { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/declarations/ImplicitReceivers, */ val (implicitReceiverValue, implicitCompanionValues) = context.sessionHolder.collectImplicitReceivers(type, owner) val existingContext = context implicitCompanionValues.forEach { value ->
diff --git a/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/backend/Fir2IrFakeOverrideStrategy.kt b/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/backend/Fir2IrFakeOverrideStrategy.kt index 20ead39..aa74b96 100644 --- a/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/backend/Fir2IrFakeOverrideStrategy.kt +++ b/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/backend/Fir2IrFakeOverrideStrategy.kt
@@ -202,6 +202,7 @@ fun generateDelegatedBodies() { for (delegatedInfo in delegatedInfos) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 5, destructured variable amount without '_': 5, classId: org/jetbrains/kotlin/fir/backend/DelegatedMemberInfo, */ val (delegatedMember, delegateTargetFromBaseType, classSymbolOfDelegateField, delegateField, parent) = delegatedInfo when (delegatedMember) { is IrSimpleFunction -> generateDelegatedFunctionBody( @@ -338,6 +339,7 @@ parent: IrClass, kind: Kind ) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/fir/backend/Fir2IrDelegatedMembersGenerationStrategy.DelegatedFunctionBodyInfo, */ val (delegateTargetFunction, substitutor, delegatingToMethodOfSupertype) = extractDelegatedFunctionBodyInfo( classSymbolOfDelegateField, delegateTargetFromBaseType,
diff --git a/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/pipeline/convertToIr.kt b/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/pipeline/convertToIr.kt index d760951..8ed89cd 100644 --- a/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/pipeline/convertToIr.kt +++ b/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/pipeline/convertToIr.kt
@@ -365,6 +365,7 @@ } catch (e: Throwable) { CodegenUtil.reportBackendException(e, "IR fake override builder", file.fileEntry.name) { offset -> file.fileEntry.takeIf { it.supportsDebugInfo }?.let { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/ir/LineAndColumn, */ val (line, column) = it.getLineAndColumnNumbers(offset) line to column }
diff --git a/compiler/fir/fir-deserialization/src/org/jetbrains/kotlin/fir/deserialization/AbstractFirDeserializedSymbolProvider.kt b/compiler/fir/fir-deserialization/src/org/jetbrains/kotlin/fir/deserialization/AbstractFirDeserializedSymbolProvider.kt index a543419..7ec27da 100644 --- a/compiler/fir/fir-deserialization/src/org/jetbrains/kotlin/fir/deserialization/AbstractFirDeserializedSymbolProvider.kt +++ b/compiler/fir/fir-deserialization/src/org/jetbrains/kotlin/fir/deserialization/AbstractFirDeserializedSymbolProvider.kt
@@ -228,6 +228,7 @@ return when (val result = extractClassMetadata(classId, parentContext)) { is ClassMetadataFindResult.NoMetadata -> FirRegularClassSymbol(classId) to result.classPostProcessor is ClassMetadataFindResult.Metadata -> { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 6, destructured variable amount without '_': 6, classId: org/jetbrains/kotlin/fir/deserialization/AbstractFirDeserializedSymbolProvider.ClassMetadataFindResult.Metadata, */ val (nameResolver, classProto, annotationDeserializer, moduleData, sourceElement, postProcessor) = result moduleData ?: return null to null val symbol = FirRegularClassSymbol(classId)
diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrClassifierStorage.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrClassifierStorage.kt index 22496e1..29046f4 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrClassifierStorage.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrClassifierStorage.kt
@@ -278,6 +278,7 @@ // ------------------------------------ local classes ------------------------------------ private fun createAndCacheLocalIrClassOnTheFly(klass: FirClass): IrClass { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/fir/backend/generators/Fir2IrClassifiersGenerator.LocalIrClassInfo, */ val (irClass, firClassOrLocalParent, irClassOrLocalParent) = classifiersGenerator.createLocalIrClassOnTheFly( klass, processMembersOfClassesOnTheFlyImmediately
diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/Fir2IrDataClassMembersGenerator.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/Fir2IrDataClassMembersGenerator.kt index e232090..e32ec12 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/Fir2IrDataClassMembersGenerator.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/Fir2IrDataClassMembersGenerator.kt
@@ -224,6 +224,7 @@ symbolTable: SymbolTable, ) { for ((irClass, info) in members) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 4, destructured variable amount without '_': 4, classId: org/jetbrains/kotlin/fir/backend/Fir2IrCommonMemberStorage.DataValueClassGeneratedMembersInfo, */ val (c, firClass, origin, functions) = info MyDataClassMethodsGenerator(c, irClass, firClass, origin, symbolTable).generateBodies(functions) }
diff --git a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/scopes/JavaClassUseSiteMemberScope.kt b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/scopes/JavaClassUseSiteMemberScope.kt index bac21ee..07e25a5 100644 --- a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/scopes/JavaClassUseSiteMemberScope.kt +++ b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/scopes/JavaClassUseSiteMemberScope.kt
@@ -187,7 +187,8 @@ } internal fun syntheticPropertyFromOverride(overriddenProperty: ResultOfIntersection<FirPropertySymbol>): FirSyntheticPropertySymbol? { - val overrideInClass = overriddenProperty.overriddenMembers.firstNotNullOfOrNull superMember@{ (symbol, baseScope) -> + val overrideInClass = overriddenProperty.overriddenMembers.firstNotNullOfOrNull superMember@{ /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/scopes/MemberWithBaseScope, */ + (symbol, baseScope) -> // We may call this function at the STATUS phase, which means that using resolved status may lead to cycle // So we need to use raw status here if (!symbol.isVisibleInClass(klass.symbol, symbol.rawStatus)) return@superMember null @@ -388,9 +389,11 @@ if (!name.sameAsBuiltinMethodWithErasedValueParameters) return false val candidatesToOverride = supertypeScopeContext.collectIntersectionResultsForCallables(name, FirScope::processFunctionsByName) .flatMap { it.overriddenMembers } - .filterNot { (member, _) -> + .filterNot { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 1, classId: org/jetbrains/kotlin/fir/scopes/MemberWithBaseScope, */ + (member, _) -> member.valueParameterSymbols.all { it.resolvedReturnType.lowerBoundIfFlexible().isAny } - }.mapNotNull { (member, scope) -> + }.mapNotNull { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/scopes/MemberWithBaseScope, */ + (member, scope) -> BuiltinMethodsWithSpecialGenericSignature.getOverriddenBuiltinFunctionWithErasedValueParametersInJava(member, scope) } @@ -555,7 +558,8 @@ explicitlyDeclaredFunction: FirNamedFunctionSymbol? ): Boolean { // E.g. contains(String) or contains(T) - val relevantFunctionFromSupertypes = resultOfIntersection.overriddenMembers.firstOrNull { (member, scope) -> + val relevantFunctionFromSupertypes = resultOfIntersection.overriddenMembers.firstOrNull { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/scopes/MemberWithBaseScope, */ + (member, scope) -> BuiltinMethodsWithSpecialGenericSignature.getOverriddenBuiltinFunctionWithErasedValueParametersInJava(member, scope) != null }?.member ?: return false @@ -631,7 +635,8 @@ } destination += symbolToBeCollected directOverriddenFunctions[symbolToBeCollected] = listOf(resultOfIntersection) - for ((member, _) in resultOfIntersection.overriddenMembers) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 2, destructured variable amount without '_': 1, classId: org/jetbrains/kotlin/fir/scopes/MemberWithBaseScope, */ + (member, _) in resultOfIntersection.overriddenMembers) { overrideByBase[member] = symbolToBeCollected } return true
diff --git a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/declarations/FirRetentionAnnotationHelpers.kt b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/declarations/FirRetentionAnnotationHelpers.kt index fe61f2b..30d8f84 100644 --- a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/declarations/FirRetentionAnnotationHelpers.kt +++ b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/declarations/FirRetentionAnnotationHelpers.kt
@@ -25,6 +25,7 @@ } fun FirAnnotation.getRetention(): AnnotationRetention? { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/declarations/EnumValueArgumentInfo, */ val (enumId, entryName) = findArgumentByName(StandardClassIds.Annotations.ParameterNames.retentionValue) ?.extractEnumValueArgumentInfo() ?: return null
diff --git a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/declarations/declarationUtils.kt b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/declarations/declarationUtils.kt index 2d871f21..d925cec 100644 --- a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/declarations/declarationUtils.kt +++ b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/declarations/declarationUtils.kt
@@ -201,7 +201,8 @@ */ fun Collection<MemberWithBaseScope<FirCallableSymbol<*>>>.nonSubsumed(): List<MemberWithBaseScope<FirCallableSymbol<*>>> { val baseMembers = mutableSetOf<FirCallableSymbol<*>>() - for ((member, scope) in this) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/scopes/MemberWithBaseScope, */ + (member, scope) in this) { val unwrapped = member.unwrapSubstitutionOverrides<FirCallableSymbol<*>>() val addIfDifferent = { it: FirCallableSymbol<*> -> val symbol = it.unwrapSubstitutionOverrides() @@ -216,5 +217,6 @@ scope.processOverriddenProperties(member, addIfDifferent) } } - return filter { (member, _) -> member.unwrapSubstitutionOverrides<FirCallableSymbol<*>>() !in baseMembers } + return filter { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 1, classId: org/jetbrains/kotlin/fir/scopes/MemberWithBaseScope, */ + (member, _) -> member.unwrapSubstitutionOverrides<FirCallableSymbol<*>>() !in baseMembers } }
diff --git a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/resolve/calls/Synthetics.kt b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/resolve/calls/Synthetics.kt index c3fcc4b9..8f06d66 100644 --- a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/resolve/calls/Synthetics.kt +++ b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/resolve/calls/Synthetics.kt
@@ -117,6 +117,7 @@ if (getter.isStatic) return // Should have Java among overridden _and_ don't have isHiddenEverywhereBesideSuperCalls among them + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/resolve/calls/FirSyntheticPropertiesScope.GetterCompatibilityResult, */ val (getterCompatibility, deprecatedOverrideOfHidden) = getterSymbol.computeGetterCompatibility() if (getterCompatibility == Incompatible) return
diff --git a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/AbstractFirUseSiteMemberScope.kt b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/AbstractFirUseSiteMemberScope.kt index fcfe69d..0aa11ff 100644 --- a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/AbstractFirUseSiteMemberScope.kt +++ b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/AbstractFirUseSiteMemberScope.kt
@@ -242,14 +242,16 @@ val resultOfIntersection = callablesFromSupertypes[callableSymbol.name] ?.firstOrNull { it.chosenSymbol == callableSymbol } ?: return ProcessorAction.NONE - for ((overridden, baseScope) in resultOfIntersection.overriddenMembers) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/scopes/MemberWithBaseScope, */ + (overridden, baseScope) in resultOfIntersection.overriddenMembers) { if (!processor(overridden, baseScope)) return ProcessorAction.STOP } return ProcessorAction.NONE } else -> { for (resultOfIntersection in directOverridden) { - for ((overridden, baseScope) in resultOfIntersection.overriddenMembers) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/scopes/MemberWithBaseScope, */ + (overridden, baseScope) in resultOfIntersection.overriddenMembers) { if (!processor(overridden, baseScope)) return ProcessorAction.STOP } }
diff --git a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirClassSubstitutionScope.kt b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirClassSubstitutionScope.kt index 7ff1a70..66a04ff 100644 --- a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirClassSubstitutionScope.kt +++ b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirClassSubstitutionScope.kt
@@ -128,6 +128,7 @@ val symbolForOverride = FirFakeOverrideGenerator.createSymbolForSubstitutionOverride(original, newOwnerClassId) + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 6, destructured variable amount without '_': 6, classId: org/jetbrains/kotlin/fir/scopes/impl/FirClassSubstitutionScope.SubstitutedData, */ val (newTypeParameters, newDispatchReceiverType, newReceiverType, newReturnType, newSubstitutor, callableCopySubstitution) = createSubstitutedData(member, symbolForOverride) val newParameterTypes = member.valueParameters.map { @@ -187,6 +188,7 @@ val constructor = original.fir val symbolForOverride = FirConstructorSymbol(original.callableId) + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 6, destructured variable amount without '_': 4, classId: org/jetbrains/kotlin/fir/scopes/impl/FirClassSubstitutionScope.SubstitutedData, */ val (newTypeParameters, _, _, newReturnType, newSubstitutor, callableCopySubstitution) = createSubstitutedData(constructor, symbolForOverride) @@ -236,6 +238,7 @@ val symbolForOverride = FirFakeOverrideGenerator.createSymbolForSubstitutionOverride(original, newOwnerClassId) + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 6, destructured variable amount without '_': 5, classId: org/jetbrains/kotlin/fir/scopes/impl/FirClassSubstitutionScope.SubstitutedData, */ val (newTypeParameters, newDispatchReceiverType, newReceiverType, newReturnType, _, callableCopySubstitutionForTypeUpdater) = createSubstitutedData(member, symbolForOverride)
diff --git a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirGeneratedScopes.kt b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirGeneratedScopes.kt index e088070..c92b80e 100644 --- a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirGeneratedScopes.kt +++ b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirGeneratedScopes.kt
@@ -163,12 +163,14 @@ ) private val callableStorageByClass: FirCache<FirClassSymbol<*>, CallableStorage, StorageContext<MemberGenerationContext>> = - cachesFactory.createCache { _, (context, extensionsMap) -> + cachesFactory.createCache { _,/** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/scopes/impl/FirGeneratedMemberDeclarationsStorage.StorageContext, */ + (context, extensionsMap) -> CallableStorage(cachesFactory, context, extensionsMap) } private val classifierStorageByClass: FirCache<FirClassSymbol<*>, ClassifierStorage, StorageContext<NestedClassGenerationContext>> = - cachesFactory.createCache { classSymbol, (context, extensionsMap) -> + cachesFactory.createCache { classSymbol,/** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/scopes/impl/FirGeneratedMemberDeclarationsStorage.StorageContext, */ + (context, extensionsMap) -> ClassifierStorage(cachesFactory, classSymbol, context, extensionsMap) }
diff --git a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirOverrideUtils.kt b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirOverrideUtils.kt index c2f146b..7eff18a 100644 --- a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirOverrideUtils.kt +++ b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirOverrideUtils.kt
@@ -48,6 +48,7 @@ gMember: D, processAllOverridden: ProcessAllOverridden<D>, ): Boolean { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/scopes/MemberWithBaseScope, */ val (fMember, fScope) = f var result = false
diff --git a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirTypeIntersectionScope.kt b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirTypeIntersectionScope.kt index 0a88cc0..684ce5e 100644 --- a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirTypeIntersectionScope.kt +++ b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirTypeIntersectionScope.kt
@@ -95,7 +95,8 @@ processor: (D, FirTypeScope) -> ProcessorAction, processDirectOverriddenInBaseScope: FirTypeScope.(D, ((D, FirTypeScope) -> ProcessorAction)) -> ProcessorAction ): ProcessorAction { - for ((overridden, baseScope) in getDirectOverriddenSymbols(callableSymbol)) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/scopes/MemberWithBaseScope, */ + (overridden, baseScope) in getDirectOverriddenSymbols(callableSymbol)) { if (overridden === callableSymbol) { if (!baseScope.processDirectOverriddenInBaseScope(callableSymbol, processor)) return ProcessorAction.STOP } else {
diff --git a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirTypeIntersectionScopeContext.kt b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirTypeIntersectionScopeContext.kt index d28d281..d1be185 100644 --- a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirTypeIntersectionScopeContext.kt +++ b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirTypeIntersectionScopeContext.kt
@@ -187,12 +187,14 @@ }, ) } else { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/scopes/MemberWithBaseScope, */ val (member, containingScope) = mostSpecific.first() result += ResultOfIntersection.SingleMember(member, group, containingScope) } } if (allMembersWithScope.isNotEmpty()) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/scopes/MemberWithBaseScope, */ val (single, containingScope) = allMembersWithScope.single() result += ResultOfIntersection.SingleMember(single, allMembersWithScope.toList(), containingScope) } @@ -270,7 +272,8 @@ var hasOpen = false var hasAbstract = false - for ((member) in extractedOverridden) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 1, destructured variable amount without '_': 1, classId: org/jetbrains/kotlin/fir/scopes/MemberWithBaseScope, */ + (member) in extractedOverridden) { when ((member.fir as FirMemberDeclaration).modality) { Modality.FINAL -> return Modality.FINAL Modality.SEALED -> {
diff --git a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/types/FirMissingDependencyStorage.kt b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/types/FirMissingDependencyStorage.kt index 4dce33f..c6ecc6b 100644 --- a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/types/FirMissingDependencyStorage.kt +++ b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/types/FirMissingDependencyStorage.kt
@@ -33,7 +33,8 @@ private fun findMissingSuperTypes(declaration: FirClassSymbol<*>): Set<TypeWithOrigin> { return declaration.collectSuperTypes(session) - .filterTo(mutableSetOf()) { (type, _) -> + .filterTo(mutableSetOf()) { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 1, classId: org/jetbrains/kotlin/fir/types/FirMissingDependencyStorage.TypeWithOrigin, */ + (type, _) -> // Ignore types which are already errors. type !is ConeErrorType && type !is ConeDynamicType && type.lowerBoundIfFlexible().let { it is ConeLookupTagBasedType && it.toSymbol(session) == null
diff --git a/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/LightTreeRawFirDeclarationBuilder.kt b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/LightTreeRawFirDeclarationBuilder.kt index f73a2a0..062a1ae 100644 --- a/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/LightTreeRawFirDeclarationBuilder.kt +++ b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/LightTreeRawFirDeclarationBuilder.kt
@@ -992,7 +992,8 @@ ) } else { buildMultiDelegatedConstructorCall { - classWrapper.delegatedSuperCalls.mapTo(delegatedConstructorCalls) { (delegatedSuperTypeRef, arguments, source) -> + classWrapper.delegatedSuperCalls.mapTo(delegatedConstructorCalls) { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/fir/lightTree/fir/DelegatedConstructorWrapper, */ + (delegatedSuperTypeRef, arguments, source) -> createDelegatedConstructorCall(source, delegatedSuperTypeRef, arguments) } }
diff --git a/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/LightTreeRawFirExpressionBuilder.kt b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/LightTreeRawFirExpressionBuilder.kt index 66b7d7e..b705826 100644 --- a/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/LightTreeRawFirExpressionBuilder.kt +++ b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/LightTreeRawFirExpressionBuilder.kt
@@ -675,6 +675,7 @@ val source = callSuffix.toFirSourceElement() + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/fir/builder/CalleeAndReceiver, */ val (calleeReference, explicitReceiver, isImplicitInvoke) = when { name != null -> CalleeAndReceiver( buildSimpleNamedReference { @@ -860,11 +861,13 @@ when (it.tokenType) { WHEN_CONDITION_EXPRESSION -> conditions += convertWhenConditionExpression(it, whenRefWithSubject.takeIf { hasSubject }) WHEN_CONDITION_IN_RANGE -> { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/lightTree/converter/LightTreeRawFirExpressionBuilder.WhenConditionConvertedResults, */ val (condition, shouldBind) = convertWhenConditionInRange(it, whenRefWithSubject, hasSubject) conditions += condition shouldBindSubject = shouldBindSubject || shouldBind } WHEN_CONDITION_IS_PATTERN -> { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/lightTree/converter/LightTreeRawFirExpressionBuilder.WhenConditionConvertedResults, */ val (condition, shouldBind) = convertWhenConditionIsPattern(it, whenRefWithSubject, hasSubject) conditions += condition shouldBindSubject = shouldBindSubject || shouldBind
diff --git a/compiler/fir/raw-fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/PsiRawFirBuilder.kt b/compiler/fir/raw-fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/PsiRawFirBuilder.kt index a6a5429..7772a42 100644 --- a/compiler/fir/raw-fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/PsiRawFirBuilder.kt +++ b/compiler/fir/raw-fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/PsiRawFirBuilder.kt
@@ -3037,6 +3037,7 @@ override fun visitCallExpression(expression: KtCallExpression, data: FirElement?): FirElement { val source = expression.toFirSourceElement() + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/fir/builder/CalleeAndReceiver, */ val (calleeReference, explicitReceiver, isImplicitInvoke) = splitToCalleeAndReceiver(expression.calleeExpression, source) val result: FirQualifiedAccessExpressionBuilder =
diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/SamResolution.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/SamResolution.kt index 34c0cbe..3477886 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/SamResolution.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/SamResolution.kt
@@ -109,6 +109,7 @@ private fun getFunctionTypeForPossibleSamType(type: ConeClassLikeType): ConeLookupTagBasedType? { val firRegularClass = type.lookupTag.toRegularClassSymbol(session)?.fir ?: return null + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 1, classId: org/jetbrains/kotlin/fir/resolve/SAMInfo, */ val (_, unsubstitutedFunctionType) = resolveFunctionTypeIfSamInterface(firRegularClass) ?: return null val functionType = firRegularClass.buildSubstitutorWithUpperBounds(session, type)?.substituteOrNull(unsubstitutedFunctionType) @@ -133,6 +134,7 @@ fun buildSamConstructorForRegularClass(classSymbol: FirRegularClassSymbol): FirNamedFunctionSymbol? { val firRegularClass = classSymbol.fir + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/resolve/SAMInfo, */ val (functionSymbol, functionType) = resolveFunctionTypeIfSamInterface(firRegularClass) ?: return null val syntheticFunctionSymbol = classSymbol.createSyntheticConstructorSymbol()
diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/ConstructorProcessing.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/ConstructorProcessing.kt index 979844f..f339ee5 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/ConstructorProcessing.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/ConstructorProcessing.kt
@@ -39,6 +39,7 @@ constructorFilter: ConstructorFilter, processor: (FirCallableSymbol<*>) -> Unit ) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/resolve/calls/SymbolWithSubstitutor, */ val (matchedClassifierSymbol, substitutor) = getFirstClassifierOrNull(callInfo, constructorFilter, session, bodyResolveComponents) ?: return val matchedClassSymbol = matchedClassifierSymbol as? FirClassLikeSymbol<*> ?: return
diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/stages/CheckCallableReferenceExpectedType.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/stages/CheckCallableReferenceExpectedType.kt index 7ebf5f3..59f80cc 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/stages/CheckCallableReferenceExpectedType.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/stages/CheckCallableReferenceExpectedType.kt
@@ -208,6 +208,7 @@ // Do not adapt references against KCallable type as it's impossible to map defaults/vararg to absent parameters of KCallable if (expectedType.isKCallableType()) return null + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/resolve/calls/InputOutputTypes, */ val (inputTypes, returnExpectedType) = extractInputOutputTypesFromCallableReferenceExpectedType(expectedType, session) ?: return null val expectedArgumentsCount = inputTypes.size - unboundReceiverCount if (expectedArgumentsCount < 0) return null
diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/stages/ResolutionStages.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/stages/ResolutionStages.kt index 26b391f..42167b3 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/stages/ResolutionStages.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/stages/ResolutionStages.kt
@@ -100,6 +100,7 @@ sink: CheckerSink, context: ResolutionContext ) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/resolve/calls/stages/ReceiverDescription, */ val (atom, type) = receivers.single() ArgumentCheckingProcessor.resolvePlainArgumentType( candidate,
diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/tower/TowerLevels.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/tower/TowerLevels.kt index fba7acd..5568461 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/tower/TowerLevels.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/tower/TowerLevels.kt
@@ -266,7 +266,8 @@ ?: candidatesWithSmartcast?.values?.map { it.memberWithBaseScope } ?: error("candidatesWithoutSmartcast or candidatesWithSmartcast should be not null") - for ((candidate, scope) in candidates) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/scopes/MemberWithBaseScope, */ + (candidate, scope) in candidates) { if (candidate.hasConsistentExtensionReceiver(givenExtensionReceiverOptions)) { val dispatchReceiverToUse = candidatesWithSmartcast?.getValue(candidate)?.dispatchReceiverToUse val isFromOriginalTypeInPresenceOfSmartCast = dispatchReceiverToUse?.unwrapSmartcast == true
diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphBuilder.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphBuilder.kt index 8714815..9b84691 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphBuilder.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphBuilder.kt
@@ -322,7 +322,8 @@ val currentLevelExits = postponedLambdaExits.pop().exits if (currentLevelExits.isEmpty()) return - for ((lambdas, exits) in postponedLambdaExits.all()) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphBuilder.PostponedLambdas, */ + (lambdas, exits) in postponedLambdaExits.all()) { if (symbol in lambdas) { exits.addAll(currentLevelExits) break
diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/CompletionModeCalculator.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/CompletionModeCalculator.kt index d1f7562..1ab342c 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/CompletionModeCalculator.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/CompletionModeCalculator.kt
@@ -136,6 +136,7 @@ } private fun updateDirection(directionForVariable: FixationDirectionForVariable) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/resolve/inference/CalculatorForNestedCall.FixationDirectionForVariable, */ val (variable, newDirection) = directionForVariable fixationDirectionsForVariables[variable]?.let { oldDirection -> if (oldDirection != FixationDirection.EQUALITY && oldDirection != newDirection)
diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/PostponedArgumentsAnalyzer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/PostponedArgumentsAnalyzer.kt index 9cffd9c..ae930c3 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/PostponedArgumentsAnalyzer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/PostponedArgumentsAnalyzer.kt
@@ -174,6 +174,7 @@ results: ReturnArgumentsAnalysisResult, substituteAlreadyFixedVariables: (ConeKotlinType) -> ConeKotlinType = c.createSubstituteFunctorForLambdaAnalysis(), ) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/resolve/inference/ReturnArgumentsAnalysisResult, */ val (returnAtoms, additionalConstraintStorage) = results val returnArguments = returnAtoms.map { it.expression }
diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirCallCompletionResultsWriterTransformer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirCallCompletionResultsWriterTransformer.kt index d6f0a65..a531319 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirCallCompletionResultsWriterTransformer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirCallCompletionResultsWriterTransformer.kt
@@ -364,6 +364,7 @@ substitutor = subCandidate.prepareCustomReturnTypeSubstitutorForFunctionCall() ?: finalSubstitutor ) val allArgs = calleeReference.computeAllArguments(originalArgumentList) + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/resolve/transformers/FirCallCompletionResultsWriterTransformer.ResultingArgumentsMapping, */ val (regularMapping, allArgsMapping) = subCandidate.handleVarargsAndReturnResultingArgumentsMapping(allArgs) if (calleeReference.isError) { result.replaceArgumentList(buildArgumentListForErrorCall(originalArgumentList, allArgsMapping)) @@ -567,6 +568,7 @@ } } val allArgs = calleeReference.computeAllArguments(annotationCall.argumentList, argumentMappingWithArrayOfCalls) + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/resolve/transformers/FirCallCompletionResultsWriterTransformer.ResultingArgumentsMapping, */ val (regularMapping, allArgsMapping) = subCandidate.handleVarargsAndReturnResultingArgumentsMapping( allArgs, precomputedArgumentMapping = argumentMappingWithArrayOfCalls @@ -815,6 +817,7 @@ val originalArgumentList = delegatedConstructorCall.argumentList val allArgs = calleeReference.computeAllArguments(originalArgumentList) + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/resolve/transformers/FirCallCompletionResultsWriterTransformer.ResultingArgumentsMapping, */ val (regularMapping, allArgsMapping) = subCandidate.handleVarargsAndReturnResultingArgumentsMapping(allArgs) if (calleeReference.isError) { delegatedConstructorCall.replaceArgumentList(buildArgumentListForErrorCall(originalArgumentList, allArgsMapping)) @@ -972,7 +975,8 @@ val newData = expectedReturnType?.toExpectedType() val result = transformElement(anonymousFunction, newData) - for ((expression, _) in returnExpressions) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 2, destructured variable amount without '_': 1, classId: org/jetbrains/kotlin/fir/resolve/dfa/cfg/FirAnonymousFunctionReturnExpressionInfo, */ + (expression, _) in returnExpressions) { expression.transformSingle(this, newData) }
diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirImportResolveTransformer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirImportResolveTransformer.kt index a4519b3..02f2059 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirImportResolveTransformer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirImportResolveTransformer.kt
@@ -68,6 +68,7 @@ get() = true private fun transformImportForFqName(fqName: FqName, delegate: FirImport): FirImport { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/resolve/transformers/PackageAndClass, */ val (packageFqName, relativeClassFqName) = findLongestExistingPackage(symbolProvider, fqName) return buildResolvedImport {
diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirSpecificTypeResolverTransformer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirSpecificTypeResolverTransformer.kt index 4e35f55..9784b50 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirSpecificTypeResolverTransformer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirSpecificTypeResolverTransformer.kt
@@ -89,6 +89,7 @@ withBareTypes(allowed = false) { typeRef.transformChildren(this, data) } + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/resolve/FirTypeResolutionResult, */ val (resolvedType, diagnostic) = resolveType(typeRef, data, expandTypeAliases) return transformType(typeRef, resolvedType, diagnostic, data) } @@ -267,6 +268,7 @@ isMarkedNullable = false source = typeRef.source } + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/resolve/FirTypeResolutionResult, */ val (resolvedType, diagnostic) = resolveType(typeRefToTry, data) if (resolvedType is ConeErrorType || diagnostic != null) continue return buildResolvedTypeRef {
diff --git a/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/transformers/ImportUtils.kt b/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/transformers/ImportUtils.kt index f661894..dbe56d2 100644 --- a/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/transformers/ImportUtils.kt +++ b/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/transformers/ImportUtils.kt
@@ -43,6 +43,7 @@ data class PackageAndClass(val packageFqName: FqName, val relativeClassFqName: FqName?) fun resolveToPackageOrClass(symbolProvider: FirSymbolProvider, fqName: FqName): PackageResolutionResult { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/fir/resolve/transformers/PackageAndClass, */ val (currentPackage, relativeClassFqName) = findLongestExistingPackage(symbolProvider, fqName) if (relativeClassFqName == null) return PackageResolutionResult.PackageOrClass(currentPackage, null, null)
diff --git a/compiler/frontend.common/src/org/jetbrains/kotlin/resolve/DefaultImportProvider.kt b/compiler/frontend.common/src/org/jetbrains/kotlin/resolve/DefaultImportProvider.kt index e0b44f6..861f7d0 100644 --- a/compiler/frontend.common/src/org/jetbrains/kotlin/resolve/DefaultImportProvider.kt +++ b/compiler/frontend.common/src/org/jetbrains/kotlin/resolve/DefaultImportProvider.kt
@@ -16,7 +16,8 @@ private data class DefaultImportsKey(val includeKotlinComparisons: Boolean, val includeLowPriorityImports: Boolean) private val defaultImports = LockBasedStorageManager("TargetPlatform").let { storageManager -> - storageManager.createMemoizedFunction<DefaultImportsKey, List<ImportPath>> { (includeKotlinComparisons, includeLowPriorityImports) -> + storageManager.createMemoizedFunction<DefaultImportsKey, List<ImportPath>> { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/resolve/DefaultImportProvider.DefaultImportsKey, */ + (includeKotlinComparisons, includeLowPriorityImports) -> ArrayList<ImportPath>().apply { listOf( "kotlin.*",
diff --git a/compiler/frontend.java/src/org/jetbrains/kotlin/load/kotlin/incremental/IncrementalPackageFragmentProvider.kt b/compiler/frontend.java/src/org/jetbrains/kotlin/load/kotlin/incremental/IncrementalPackageFragmentProvider.kt index 606c2be..999502d 100644 --- a/compiler/frontend.java/src/org/jetbrains/kotlin/load/kotlin/incremental/IncrementalPackageFragmentProvider.kt +++ b/compiler/frontend.java/src/org/jetbrains/kotlin/load/kotlin/incremental/IncrementalPackageFragmentProvider.kt
@@ -90,7 +90,8 @@ ChainedMemberScope.create( "Member scope for incremental compilation: union of multifile class parts data for $facadeName", partsInternalNames.mapNotNull { internalName -> - incrementalCache.getPackagePartData(internalName)?.let { (data, strings) -> + incrementalCache.getPackagePartData(internalName)?.let { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/load/kotlin/incremental/components/JvmPackagePartProto, */ + (data, strings) -> val (nameResolver, packageProto) = JvmProtoBufUtil.readPackageDataFrom(data, strings) val partName = JvmClassName.byInternalName(internalName)
diff --git a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/JvmResolverForModuleFactory.kt b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/JvmResolverForModuleFactory.kt index 25395b9..7f45256 100644 --- a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/JvmResolverForModuleFactory.kt +++ b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/JvmResolverForModuleFactory.kt
@@ -67,6 +67,7 @@ resolveOptimizingOptions: OptimizingOptions?, absentDescriptorHandlerClass: Class<out AbsentDescriptorHandler>? ): ResolverForModule { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/analyzer/ModuleContent, */ val (moduleInfo, syntheticFiles, moduleContentScope) = moduleContent val project = moduleContext.project val declarationProviderFactory = DeclarationProviderFactoryService.createDeclarationProviderFactory(
diff --git a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/checkers/RepeatableAnnotationChecker.kt b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/checkers/RepeatableAnnotationChecker.kt index 65e8e12..895ee0a 100644 --- a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/checkers/RepeatableAnnotationChecker.kt +++ b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/checkers/RepeatableAnnotationChecker.kt
@@ -120,7 +120,8 @@ private fun checkRepeatedEntries(annotations: List<ResolvedAnnotation>, trace: BindingTrace) { val entryTypesWithAnnotations = hashMapOf<FqName, MutableList<AnnotationUseSiteTarget?>>() - for ((entry, descriptor, useSiteTarget) in annotations) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/resolve/jvm/checkers/RepeatableAnnotationChecker.ResolvedAnnotation, */ + (entry, descriptor, useSiteTarget) in annotations) { val fqName = descriptor.fqName ?: continue val classDescriptor = descriptor.annotationClass ?: continue
diff --git a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/modules/JavaModule.kt b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/modules/JavaModule.kt index 6e0f3cd..a705c4f 100644 --- a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/modules/JavaModule.kt +++ b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/modules/JavaModule.kt
@@ -93,13 +93,15 @@ get() = moduleInfoFile.extension == JavaFileType.DEFAULT_EXTENSION || moduleInfoFile.fileType == JavaFileType.INSTANCE override fun exports(packageFqName: FqName): Boolean { - return moduleInfo.exports.any { (fqName, toModules) -> + return moduleInfo.exports.any { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/resolve/jvm/modules/JavaModuleInfo.Exports, */ + (fqName, toModules) -> fqName == packageFqName && toModules.isEmpty() } } override fun exportsTo(packageFqName: FqName, moduleName: String): Boolean { - return moduleInfo.exports.any { (fqName, toModules) -> + return moduleInfo.exports.any { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/resolve/jvm/modules/JavaModuleInfo.Exports, */ + (fqName, toModules) -> fqName == packageFqName && (toModules.isEmpty() || moduleName in toModules) } }
diff --git a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/multiplatform/OptionalAnnotationPackageFragmentProvider.kt b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/multiplatform/OptionalAnnotationPackageFragmentProvider.kt index d28e8ec..e11ffba 100644 --- a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/multiplatform/OptionalAnnotationPackageFragmentProvider.kt +++ b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/multiplatform/OptionalAnnotationPackageFragmentProvider.kt
@@ -97,7 +97,8 @@ } private class OptionalAnnotationClassDataFinder(classes: List<ClassData>) : ClassDataFinder { - val classIdToData = classes.associateBy { (nameResolver, klass) -> nameResolver.getClassId(klass.fqName) } + val classIdToData = classes.associateBy { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/serialization/deserialization/ClassData, */ + (nameResolver, klass) -> nameResolver.getClassId(klass.fqName) } override fun findClassData(classId: ClassId): ClassData? = classIdToData[classId] }
diff --git a/compiler/frontend/cfg/src/org/jetbrains/kotlin/cfg/ControlFlowInformationProviderImpl.kt b/compiler/frontend/cfg/src/org/jetbrains/kotlin/cfg/ControlFlowInformationProviderImpl.kt index f742935..e7bfb35 100644 --- a/compiler/frontend/cfg/src/org/jetbrains/kotlin/cfg/ControlFlowInformationProviderImpl.kt +++ b/compiler/frontend/cfg/src/org/jetbrains/kotlin/cfg/ControlFlowInformationProviderImpl.kt
@@ -248,6 +248,7 @@ if (!function.hasBody()) return + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/cfg/ControlFlowInformationProviderImpl.ReturnedExpressionsInfo, */ val (returnedExpressions, hasReturnsInInlinedLambdas) = collectReturnExpressions() val blockBody = function.hasBlockBody()
diff --git a/compiler/frontend/src/org/jetbrains/kotlin/analyzer/common/CommonResolverForModuleFactory.kt b/compiler/frontend/src/org/jetbrains/kotlin/analyzer/common/CommonResolverForModuleFactory.kt index 8b292a4..185a171 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/analyzer/common/CommonResolverForModuleFactory.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/analyzer/common/CommonResolverForModuleFactory.kt
@@ -95,6 +95,7 @@ resolveOptimizingOptions: OptimizingOptions?, absentDescriptorHandlerClass: Class<out AbsentDescriptorHandler>? ): ResolverForModule { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/analyzer/ModuleContent, */ val (moduleInfo, syntheticFiles, moduleContentScope) = moduleContent val project = moduleContext.project val declarationProviderFactory = DeclarationProviderFactoryService.createDeclarationProviderFactory(
diff --git a/compiler/frontend/src/org/jetbrains/kotlin/checkers/utils/CheckerTestUtil.kt b/compiler/frontend/src/org/jetbrains/kotlin/checkers/utils/CheckerTestUtil.kt index 0de61cc..3f8aad9 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/checkers/utils/CheckerTestUtil.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/checkers/utils/CheckerTestUtil.kt
@@ -625,7 +625,8 @@ } } - for ((diagnostic, start, end) in uncheckedDiagnostics) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/checkers/diagnostics/PositionalTextDiagnostic, */ + (diagnostic, start, end) in uncheckedDiagnostics) { val range = TextRange(start, end) diagnosticsGroupedByRanges.put(range, diagnostic) }
diff --git a/compiler/frontend/src/org/jetbrains/kotlin/descriptors/annotations/AnnotationSplitter.kt b/compiler/frontend/src/org/jetbrains/kotlin/descriptors/annotations/AnnotationSplitter.kt index d7aad7c..0e9ec77 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/descriptors/annotations/AnnotationSplitter.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/descriptors/annotations/AnnotationSplitter.kt
@@ -66,7 +66,8 @@ other.add(annotation) } - for ((annotation, target) in @Suppress("DEPRECATION") allAnnotations.getUseSiteTargetedAnnotations()) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/descriptors/annotations/AnnotationWithTarget, */ + (annotation, target) in @Suppress("DEPRECATION") allAnnotations.getUseSiteTargetedAnnotations()) { if (target in applicableTargets) { map.getOrPut(target) { arrayListOf() }.add(annotation) }
diff --git a/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/rendering/AnnotationsWhitelistDescriptorRenderer.kt b/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/rendering/AnnotationsWhitelistDescriptorRenderer.kt index 2c59f3f..a6668e9 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/rendering/AnnotationsWhitelistDescriptorRenderer.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/rendering/AnnotationsWhitelistDescriptorRenderer.kt
@@ -22,6 +22,7 @@ private val toParameterRenderer: DescriptorRenderer.() -> DiagnosticParameterRenderer<DeclarationDescriptor> ) : DiagnosticParameterRenderer<DeclarationWithDiagnosticComponents> { override fun render(obj: DeclarationWithDiagnosticComponents, renderingContext: RenderingContext): String { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/diagnostics/rendering/DeclarationWithDiagnosticComponents, */ val (descriptor, diagnosticComponents) = obj return baseRenderer.withOptions { annotationFilter = { annotation ->
diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/QualifiedExpressionResolver.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/QualifiedExpressionResolver.kt index da0dec3..cd4953d 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/QualifiedExpressionResolver.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/QualifiedExpressionResolver.kt
@@ -68,6 +68,7 @@ reportOn: KtExpression?, trace: BindingTrace ): ClassifierDescriptor? { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/descriptors/DescriptorWithDeprecation, */ val (classifier, isDeprecated) = findFirstClassifierWithDeprecationStatus(name, lookupLocation) ?: return null if (isDeprecated && reportOn != null) {
diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/CallCompleter.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/CallCompleter.kt index 56743e4..a25a874 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/CallCompleter.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/CallCompleter.kt
@@ -406,6 +406,7 @@ context: BasicCallResolutionContext ): OverloadResolutionResultsImpl<*>? { val cachedData = getResolutionResultsCachedData(expression, context) ?: return null + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/resolve/calls/context/ResolutionResultsCache.CachedData, */ val (cachedResolutionResults, cachedContext, tracing) = cachedData val contextForArgument = cachedContext.replaceBindingTrace(context.trace)
diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/checkers/DslScopeViolationCallChecker.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/checkers/DslScopeViolationCallChecker.kt index 223ccf3..2f0d124 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/checkers/DslScopeViolationCallChecker.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/checkers/DslScopeViolationCallChecker.kt
@@ -57,13 +57,15 @@ if (receiversUntilOneFromTheCall.isEmpty()) return + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/resolve/calls/DslMarkerUtils.DslMarkersFromReceiver, */ val (callDslMarkers, additionalCallDslMarkers) = extractDslMarkerFqNames(callImplicitReceiver) if (callDslMarkers.isEmpty() && additionalCallDslMarkers.isEmpty()) return val dslMarkersFromOuterReceivers = receiversUntilOneFromTheCall.map(::extractDslMarkerFqNames) val closestAnotherReceiverWithSameDslMarker = - dslMarkersFromOuterReceivers.firstOrNull { (dslMarkersFromReceiver, _) -> + dslMarkersFromOuterReceivers.firstOrNull { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 1, classId: org/jetbrains/kotlin/resolve/calls/DslMarkerUtils.DslMarkersFromReceiver, */ + (dslMarkersFromReceiver, _) -> dslMarkersFromReceiver.any(callDslMarkers::contains) } @@ -76,7 +78,8 @@ val allDslMarkersFromCall = callDslMarkers + additionalCallDslMarkers val closestAnotherReceiverWithSameDslMarkerWithDeprecation = - dslMarkersFromOuterReceivers.firstOrNull { (dslMarkersFromReceiver, additionalDslMarkersFromReceiver) -> + dslMarkersFromOuterReceivers.firstOrNull { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/resolve/calls/DslMarkerUtils.DslMarkersFromReceiver, */ + (dslMarkersFromReceiver, additionalDslMarkersFromReceiver) -> val allMarkersFromReceiver = dslMarkersFromReceiver + additionalDslMarkersFromReceiver allDslMarkersFromCall.any(allMarkersFromReceiver::contains) }
diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/inference/ConstraintSystemImpl.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/inference/ConstraintSystemImpl.kt index b3ddb44..27b7207 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/inference/ConstraintSystemImpl.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/inference/ConstraintSystemImpl.kt
@@ -161,7 +161,8 @@ } fun KotlinType.substitute(): KotlinType? = substitutor.substitute(this, Variance.INVARIANT) - return initialConstraints.all { (kind, subtype, superType, position) -> + return initialConstraints.all { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 4, destructured variable amount without '_': 4, classId: org/jetbrains/kotlin/resolve/calls/inference/ConstraintSystemBuilderImpl.Constraint, */ + (kind, subtype, superType, position) -> val resultSubType = subtype.substitute()?.let { // the call might be done via safe access, so we check for notNullable receiver type; // 'unsafe call' error is reported otherwise later
diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/smartcasts/DataFlowValueKindUtils.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/smartcasts/DataFlowValueKindUtils.kt index e1d895a..3bde991 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/smartcasts/DataFlowValueKindUtils.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/smartcasts/DataFlowValueKindUtils.kt
@@ -132,7 +132,8 @@ writers: Set<AssignedVariablesSearcher.Writer>, bindingContext: BindingContext ): Boolean { - return writers.none { (_, writerDeclaration) -> + return writers.none { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 1, classId: org/jetbrains/kotlin/types/expressions/AssignedVariablesSearcher.Writer, */ + (_, writerDeclaration) -> writerDeclaration != null && variableContainingDeclaration != writerDeclaration.getDeclarationDescriptorIncludingConstructors(bindingContext) } @@ -143,7 +144,8 @@ accessElement: KtElement ): Boolean { val parent = accessElement.getElementParentDeclaration() ?: return false - return writers.none { (assignment) -> !assignment.before(parent) } + return writers.none { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 1, destructured variable amount without '_': 1, classId: org/jetbrains/kotlin/types/expressions/AssignedVariablesSearcher.Writer, */ + (assignment) -> !assignment.before(parent) } } private fun isAccessedBeforeAllClosureWriters(
diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tower/PSICallResolver.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tower/PSICallResolver.kt index 18016c3..fda60b1 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tower/PSICallResolver.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tower/PSICallResolver.kt
@@ -234,7 +234,8 @@ tracingStrategy: TracingStrategy ): OverloadResolutionResults<D> { if (result is AllCandidatesResolutionResult) { - val resolvedCalls = result.allCandidates.map { (candidate, diagnostics) -> + val resolvedCalls = result.allCandidates.map { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/resolve/calls/model/CandidateWithDiagnostics, */ + (candidate, diagnostics) -> val system = candidate.getSystem() val resultingSubstitutor = system.asReadOnlyStorage().buildResultingSubstitutor(system as TypeSystemInferenceExtensionContext)
diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/checkers/OptInUsageChecker.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/checkers/OptInUsageChecker.kt index fef2384..7738373 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/checkers/OptInUsageChecker.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/checkers/OptInUsageChecker.kt
@@ -99,7 +99,8 @@ // KT-47708 special case (warning only) val methodDescriptor = resultingDescriptor.getSingleAbstractMethod() val samOptIns = methodDescriptor.loadOptIns(bindingContext, languageVersionSettings) - .map { (fqName, _, message) -> + .map { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 3, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/resolve/checkers/OptInDescription, */ + (fqName, _, message) -> OptInDescription(fqName, OptInDescription.Severity.WARNING, message, subclassesOnly = false) } reportNotAllowedOptIns(samOptIns, reportOn, context) @@ -159,7 +160,8 @@ trace: BindingTrace, diagnostics: OptInReporterMultiplexer ) { - for ((annotationFqName, severity, message, subclassesOnly) in descriptions) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 4, destructured variable amount without '_': 4, classId: org/jetbrains/kotlin/resolve/checkers/OptInDescription, */ + (annotationFqName, severity, message, subclassesOnly) in descriptions) { if (!element.isOptInAllowed(annotationFqName, languageVersionSettings, trace.bindingContext, subclassesOnly)) { val diagnostic = when (severity) { OptInDescription.Severity.WARNING -> diagnostics.warning
diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/lazy/FileScopeFactory.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/lazy/FileScopeFactory.kt index dac4fc3..192e060 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/lazy/FileScopeFactory.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/lazy/FileScopeFactory.kt
@@ -193,6 +193,7 @@ } fun createImportingScope(): LazyImportScope { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/resolve/lazy/FileScopeFactory.DefaultImportResolvers, */ val (defaultExplicitImportResolver, defaultAllUnderImportResolver, defaultLowPriorityImportResolver) = createDefaultImportResolversForFile()
diff --git a/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/DoubleColonExpressionResolver.kt b/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/DoubleColonExpressionResolver.kt index c7d29c1..29a840c 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/DoubleColonExpressionResolver.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/DoubleColonExpressionResolver.kt
@@ -354,6 +354,7 @@ } } + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/types/expressions/DoubleColonExpressionResolver.ReservedDoubleColonLHSResolutionResult, */ val (isReservedExpressionSyntax, doubleColonLHS, traceAndCacheFromReservedDoubleColonLHS) = resolveReservedExpressionSyntaxOnDoubleColonLHS(doubleColonExpression, c)
diff --git a/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/BuildDiffsStorage.kt b/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/BuildDiffsStorage.kt index 25858a5..0489091 100644 --- a/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/BuildDiffsStorage.kt +++ b/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/BuildDiffsStorage.kt
@@ -139,7 +139,8 @@ fun ObjectOutputStream.writeLookups(lookupSymbols: Collection<LookupSymbol>) { writeInt(lookupSymbols.size) - for ((name, scope) in lookupSymbols) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/incremental/LookupSymbol, */ + (name, scope) in lookupSymbols) { writeUTF(name) writeUTF(scope) }
diff --git a/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/IncrementalCompilerRunner.kt b/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/IncrementalCompilerRunner.kt index 5ed8ddb..92f3c6b 100644 --- a/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/IncrementalCompilerRunner.kt +++ b/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/IncrementalCompilerRunner.kt
@@ -552,6 +552,7 @@ break } + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/incremental/DirtyData, */ val (dirtyLookupSymbols, dirtyClassFqNames, forceRecompile) = changesCollector.getChangedAndImpactedSymbols( listOf(caches.platformCache), reporter
diff --git a/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/IncrementalFirJvmCompilerRunner.kt b/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/IncrementalFirJvmCompilerRunner.kt index bad26be..7a54cdc 100644 --- a/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/IncrementalFirJvmCompilerRunner.kt +++ b/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/IncrementalFirJvmCompilerRunner.kt
@@ -260,6 +260,7 @@ val extensions = JvmFir2IrExtensions(configuration, JvmIrDeserializerImpl()) val irGenerationExtensions = projectEnvironment.project.let { IrGenerationExtension.getInstances(it) } + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 6, destructured variable amount without '_': 5, classId: org/jetbrains/kotlin/fir/pipeline/Fir2IrActualizedResult, */ val (irModuleFragment, components, pluginContext, irActualizedResult, _, symbolTable) = cycleResult.convertToIrAndActualizeForJvm( extensions, configuration, compilerEnvironment.diagnosticsReporter, irGenerationExtensions, )
diff --git a/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/IncrementalJsCompilerRunner.kt b/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/IncrementalJsCompilerRunner.kt index 9d2cccd..7431a0e 100644 --- a/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/IncrementalJsCompilerRunner.kt +++ b/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/IncrementalJsCompilerRunner.kt
@@ -248,6 +248,7 @@ val changesCollector = ChangesCollector() // todo: split compare and update (or cache comparing) caches.platformCache.compare(translatedFiles, changesCollector) + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/incremental/DirtyData, */ val (dirtyLookupSymbols, dirtyClassFqNames) = changesCollector.getChangedAndImpactedSymbols(listOf(caches.platformCache), reporter) // todo unify with main cycle
diff --git a/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/incrementalFirCacheUtils.kt b/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/incrementalFirCacheUtils.kt index 710a99c..ba7d9c4 100644 --- a/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/incrementalFirCacheUtils.kt +++ b/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/incrementalFirCacheUtils.kt
@@ -133,6 +133,7 @@ visitFirFiles(output) } + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/incremental/DirtyData, */ val (dirtyLookupSymbols, dirtyClassFqNames, forceRecompile) = changesCollector.getChangedAndImpactedSymbols(listOf(caches.platformCache), reporter)
diff --git a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/ir/ExpectSymbolTransformer.kt b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/ir/ExpectSymbolTransformer.kt index dae1452..1be4a55 100644 --- a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/ir/ExpectSymbolTransformer.kt +++ b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/ir/ExpectSymbolTransformer.kt
@@ -83,6 +83,7 @@ super.visitPropertyReference(expression) if (!isTargetDeclaration(expression.symbol.owner)) return + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/backend/common/ir/ExpectSymbolTransformer.ActualPropertyResult, */ val (newSymbol, newGetter, newSetter) = getActualProperty(expression.symbol.descriptor) ?: return expression.symbol = newSymbol expression.getter = newGetter
diff --git a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/AbstractSuspendFunctionsLowering.kt b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/AbstractSuspendFunctionsLowering.kt index 96c0d60..960b75c 100644 --- a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/AbstractSuspendFunctionsLowering.kt +++ b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/AbstractSuspendFunctionsLowering.kt
@@ -63,6 +63,7 @@ val function = (element as? IrSimpleFunction) ?: return null if (!function.isSuspend || function.modality == Modality.ABSTRACT) return null + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/backend/common/TailSuspendCalls, */ val (tailSuspendCalls, hasNotTailSuspendCalls) = collectTailSuspendCalls(context, function) return if (hasNotTailSuspendCalls) { listOf<IrDeclaration>(buildCoroutine(function).clazz, function)
diff --git a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/LocalClassPopupLowering.kt b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/LocalClassPopupLowering.kt index a24e1b0..eb1452b 100644 --- a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/LocalClassPopupLowering.kt +++ b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/LocalClassPopupLowering.kt
@@ -61,7 +61,8 @@ } }, null) - for ((local, newContainer, extractedUnder) in extractedLocalClasses) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/backend/common/lower/LocalClassPopupLowering.ExtractedLocalClass, */ + (local, newContainer, extractedUnder) in extractedLocalClasses) { when (newContainer) { is IrStatementContainer -> { val insertIndex = extractedUnder?.let { newContainer.statements.indexOf(it) } ?: -1
diff --git a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/LocalDeclarationsLowering.kt b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/LocalDeclarationsLowering.kt index cce3138..581c84c 100644 --- a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/LocalDeclarationsLowering.kt +++ b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/LocalDeclarationsLowering.kt
@@ -720,6 +720,7 @@ val newName = generateNameForLiftedDeclaration(oldDeclaration, ownerParent) // TODO: consider using fields to access the closure of enclosing class. + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/backend/common/lower/Closure, */ val (capturedValues, capturedTypeParameters) = localFunctionContext.closure val newDeclaration = context.irFactory.buildFun {
diff --git a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/TailrecLowering.kt b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/TailrecLowering.kt index 459457c..e0f2798 100644 --- a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/TailrecLowering.kt +++ b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/TailrecLowering.kt
@@ -74,6 +74,7 @@ } private fun TailrecLowering.lowerTailRecursionCalls(irFunction: IrFunction) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/backend/common/TailCalls, */ val (tailRecursionCalls, someCallsAreFromOtherFunctions) = collectTailRecursionCalls(irFunction, ::followFunctionReference) if (tailRecursionCalls.isEmpty()) { return
diff --git a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/loops/ForLoopsLowering.kt b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/loops/ForLoopsLowering.kt index d733bf9..e7d38bc 100644 --- a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/loops/ForLoopsLowering.kt +++ b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/loops/ForLoopsLowering.kt
@@ -187,6 +187,7 @@ val loweredHeader = lowerHeader(iteratorVariable, loopHeader) + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/backend/common/lower/loops/LoopReplacement, */ val (newLoop, loopReplacementExpression) = lowerWhileLoop(oldLoop, loopHeader) ?: return super.visitBlock(expression) // Cannot lower the loop. @@ -220,6 +221,7 @@ private fun lowerWhileLoop(loop: IrWhileLoop, loopHeader: ForLoopHeader): LoopReplacement? { val loopBodyStatements = (loop.body as? IrContainerExpression)?.statements ?: return null + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 4, destructured variable amount without '_': 4, classId: org/jetbrains/kotlin/backend/common/lower/loops/RangeLoopTransformer.LoopVariableInfo, */ val (mainLoopVariable, mainLoopVariableIndex, loopVariableComponents, loopVariableComponentIndices) = gatherLoopVariableInfo(loopBodyStatements)
diff --git a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/phaser/performByIrFile.kt b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/phaser/performByIrFile.kt index 17f887d..2da9372 100644 --- a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/phaser/performByIrFile.kt +++ b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/phaser/performByIrFile.kt
@@ -65,6 +65,7 @@ } catch (e: Throwable) { CodegenUtil.reportBackendException(e, "IR lowering", irFile.fileEntry.name) { offset -> irFile.fileEntry.takeIf { it.supportsDebugInfo }?.let { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/ir/LineAndColumn, */ val (line, column) = it.getLineAndColumnNumbers(offset) line to column } @@ -115,6 +116,7 @@ thrownFromThread.get()?.let { (e, irFile) -> CodegenUtil.reportBackendException(e, "Experimental parallel IR backend", irFile.fileEntry.name) { offset -> irFile.fileEntry.takeIf { it.supportsDebugInfo }?.let { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/ir/LineAndColumn, */ val (line, column) = it.getLineAndColumnNumbers(offset) line to column }
diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/ic/CacheUpdater.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/ic/CacheUpdater.kt index e69dfb3..89b5546 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/ic/CacheUpdater.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/ic/CacheUpdater.kt
@@ -209,6 +209,7 @@ val removedFilesMetadata = hashMapOf<KotlinLibraryFile, Map<KotlinSourceFile, KotlinSourceFileMetadata>>() fun collectDirtyFiles(lib: KotlinLibraryFile, cache: IncrementalCache): MutableMap<KotlinSourceFile, KotlinSourceFileMetadata> { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 4, destructured variable amount without '_': 4, classId: org/jetbrains/kotlin/ir/backend/js/ic/IncrementalCache.ModifiedFiles, */ val (addedFiles, removedFiles, modifiedFiles, nonModifiedFiles) = cache.collectModifiedFiles() val fileStats by lazy(LazyThreadSafetyMode.NONE) { dirtyFileStats.getOrPutFiles(lib) } @@ -766,6 +767,7 @@ ) private fun loadIrAndMakeIrFragmentGenerators(): FragmentGenerators { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 4, destructured variable amount without '_': 4, classId: org/jetbrains/kotlin/ir/backend/js/ic/CacheUpdater.IrForDirtyFilesAndCompiler, */ val (incrementalCachesArtifacts, loadedIr, dirtyFiles, irCompiler) = loadIrForDirtyFilesAndInitCompiler() val moduleNames = loadedIr.loadedFragments.entries.associate { it.key to it.value.name.asString() } @@ -802,6 +804,7 @@ stopwatch.clear() dirtyFileStats.clear() + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/ir/backend/js/ic/CacheUpdater.FragmentGenerators, */ val (incrementalCachesArtifacts, moduleNames, generators) = loadIrAndMakeIrFragmentGenerators() val rebuiltFragments = generateIrFragments(generators)
diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/ic/IdSignatureHashCalculator.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/ic/IdSignatureHashCalculator.kt index 2bccb96..ae0af41 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/ic/IdSignatureHashCalculator.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/ic/IdSignatureHashCalculator.kt
@@ -118,6 +118,7 @@ val newDependsStack = transitiveDepends.toMutableList() while (newDependsStack.isNotEmpty()) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/ir/backend/js/ic/IdSignatureHashCalculator.InlineFunctionDependencies, */ val (usedInlineFunctions, usedConstants) = newDependsStack.removeLast().inlineDepends for (inlineFunction in usedInlineFunctions) { if (transitiveDepends.add(inlineFunction)) {
diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/ic/JsPerFileCache.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/ic/JsPerFileCache.kt index 0ef5382..85679ff 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/ic/JsPerFileCache.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/ic/JsPerFileCache.kt
@@ -230,6 +230,7 @@ val importWithEffectIn = ifTrue { readString() } + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/ir/backend/js/ic/JsMultiArtifactCache.JsIrModuleHeaderNames, */ val (definitions, nameBindings, optionalCrossModuleImports) = fetchJsIrModuleHeaderNames() it.jsIrHeader = JsIrModuleHeader( @@ -384,13 +385,15 @@ } override fun fetchCompiledJsCode(cacheInfo: CachedFileInfo) = - cacheInfo.cachedFiles?.let { (jsCodeFile, sourceMapFile, tsDeclarationsFile) -> + cacheInfo.cachedFiles?.let { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/ir/backend/js/ic/JsPerFileCache.CachedFileArtifacts, */ + (jsCodeFile, sourceMapFile, tsDeclarationsFile) -> jsCodeFile.ifExists { this } ?.let { CompilationOutputsCached(it, sourceMapFile?.ifExists { this }, tsDeclarationsFile?.ifExists { this }) } } override fun commitCompiledJsCode(cacheInfo: CachedFileInfo, compilationOutputs: CompilationOutputsBuilt) = - cacheInfo.cachedFiles?.let { (jsCodeFile, jsMapFile, tsDeclarationsFile) -> + cacheInfo.cachedFiles?.let { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/ir/backend/js/ic/JsPerFileCache.CachedFileArtifacts, */ + (jsCodeFile, jsMapFile, tsDeclarationsFile) -> tsDeclarationsFile?.writeIfNotNull(compilationOutputs.tsDefinitions?.raw) compilationOutputs.writeJsCodeIntoModuleCache(jsCodeFile, jsMapFile) } ?: compilationOutputs
diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/ic/JsPerModuleCache.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/ic/JsPerModuleCache.kt index a904ef0..b6d664b 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/ic/JsPerModuleCache.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/ic/JsPerModuleCache.kt
@@ -35,6 +35,7 @@ val crossModuleReferencesHash = ICHash.fromProtoStream(this) val reexportedInModuleWithName = ifTrue { readString() } val importedWithEffectInModuleWithName = ifTrue { readString() } + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/ir/backend/js/ic/JsMultiArtifactCache.JsIrModuleHeaderNames, */ val (definitions, nameBindings, optionalCrossModuleImports) = fetchJsIrModuleHeaderNames() CachedModuleInfo(
diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/jsCompiler.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/jsCompiler.kt index 303000d..50fd005 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/jsCompiler.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/jsCompiler.kt
@@ -49,6 +49,7 @@ filesToLower: Set<String>? = null, granularity: JsGenerationGranularity = JsGenerationGranularity.WHOLE_PROGRAM, ): LoweredIr { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 6, destructured variable amount without '_': 6, classId: org/jetbrains/kotlin/ir/backend/js/IrModuleInfo, */ val (moduleFragment: IrModuleFragment, dependencyModules, irBuiltIns, symbolTable, deserializer, moduleToName) = loadIr(depsDescriptors, irFactory, verifySignatures, filesToLower, loadFunctionInterfacesIntoStdlib = true)
diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/BridgesConstruction.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/BridgesConstruction.kt index bf4d5d6..95d89d0 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/BridgesConstruction.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/BridgesConstruction.kt
@@ -86,7 +86,8 @@ val result = mutableListOf<IrDeclaration>() - for ((from, to) in bridgesToGenerate) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/backend/common/bridges/Bridge, */ + (from, to) in bridgesToGenerate) { if (!from.function.parentAsClass.isInterface && from.function.isReal && from.function.modality != Modality.ABSTRACT &&
diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/PrepareCollectionsToExportLowering.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/PrepareCollectionsToExportLowering.kt index 99aec8f..fc6d975 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/PrepareCollectionsToExportLowering.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/PrepareCollectionsToExportLowering.kt
@@ -98,6 +98,7 @@ ) private fun IrClass.addCompanionWithJsFactoryFunction() { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/ir/backend/js/lower/PrepareCollectionsToExportLowering.FactoryMethod, */ val (factoryMethodName, factoryMethodForTheCollectionSymbol) = typesToItsFactoryMethods[symbol] ?: irError("Unexpected collection") { withIrEntry("this", this@addCompanionWithJsFactoryFunction)
diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/ThrowableLowering.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/ThrowableLowering.kt index 08d38d5..1bc224b 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/ThrowableLowering.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/ThrowableLowering.kt
@@ -67,6 +67,7 @@ expression.transformChildren(this, data) if (expression.symbol !in throwableConstructors) return expression + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/ir/backend/js/lower/ThrowableLowering.ThrowableArguments, */ val (messageArg, causeArg) = expression.extractThrowableArguments() return expression.run { @@ -85,6 +86,7 @@ expression.transformChildren(this, data) if (expression.symbol !in throwableConstructors) return expression + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/ir/backend/js/lower/ThrowableLowering.ThrowableArguments, */ val (messageArg, causeArg) = expression.extractThrowableArguments() val klass = data as IrClass
diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/PerFileGenerator.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/PerFileGenerator.kt index 0e22f3e..072a030 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/PerFileGenerator.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/PerFileGenerator.kt
@@ -55,7 +55,8 @@ hasModuleLevelEffect = true } - generatedArtifact.takeTestEnvironmentOwnership()?.let { (testFunction, suiteFunction) -> + generatedArtifact.takeTestEnvironmentOwnership()?.let { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/JsIrProgramTestEnvironment, */ + (testFunction, suiteFunction) -> testFunctions.putToMultiMap(generatedArtifact.packageFqn, testFunction) suiteFunctionTag = suiteFunction }
diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/jsAstUtils.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/jsAstUtils.kt index d8ee4eb..27cb525 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/jsAstUtils.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/jsAstUtils.kt
@@ -639,6 +639,7 @@ if (startOffset == UNDEFINED_OFFSET || endOffset == UNDEFINED_OFFSET) return null val path = fileEntry.name val offset = offsetSelector() + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/ir/LineAndColumn, */ val (startLine, startColumn) = fileEntry.getLineAndColumnNumbers(offset) return JsLocation(path, startLine, startColumn) }
diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/jsCode.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/jsCode.kt index e976b22..3178ac4 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/jsCode.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/transformers/irToJs/jsCode.kt
@@ -43,6 +43,7 @@ sourceInfo: JsLocation? ): List<JsStatement>? { // TODO: support proper symbol linkage and label clash resolution + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/js/backend/ast/JsLocation, */ val (fileName, startLine, offset) = sourceInfo ?: JsLocation("<js-code>", 0, 0) val jsCode = foldString(code, context) ?: return null
diff --git a/compiler/ir/backend.jvm/codegen/src/org/jetbrains/kotlin/backend/jvm/codegen/ClassCodegen.kt b/compiler/ir/backend.jvm/codegen/src/org/jetbrains/kotlin/backend/jvm/codegen/ClassCodegen.kt index a427cf3..5860b6a 100644 --- a/compiler/ir/backend.jvm/codegen/src/org/jetbrains/kotlin/backend/jvm/codegen/ClassCodegen.kt +++ b/compiler/ir/backend.jvm/codegen/src/org/jetbrains/kotlin/backend/jvm/codegen/ClassCodegen.kt
@@ -408,6 +408,7 @@ } // Only allow generation of one inline method at a time, to avoid deadlocks when files call inline methods of each other. + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/codegen/inline/SMAPAndMethodNode, */ val (node, smap) = generatedInlineMethods[method] ?: synchronized(context.inlineMethodGenerationLock) { generatedInlineMethods.getOrPut(method) { FunctionCodegen(method, this).generate() } @@ -421,6 +422,7 @@ return } + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/codegen/inline/SMAPAndMethodNode, */ val (node, smap) = generateMethodNode(method) node.preprocessSuspendMarkers( method.origin == JvmLoweredDeclarationOrigin.FOR_INLINE_STATE_MACHINE_TEMPLATE || method.isEffectivelyInlineOnly(),
diff --git a/compiler/ir/backend.jvm/codegen/src/org/jetbrains/kotlin/backend/jvm/codegen/FunctionCodegen.kt b/compiler/ir/backend.jvm/codegen/src/org/jetbrains/kotlin/backend/jvm/codegen/FunctionCodegen.kt index 07ee199..f614a42 100644 --- a/compiler/ir/backend.jvm/codegen/src/org/jetbrains/kotlin/backend/jvm/codegen/FunctionCodegen.kt +++ b/compiler/ir/backend.jvm/codegen/src/org/jetbrains/kotlin/backend/jvm/codegen/FunctionCodegen.kt
@@ -112,6 +112,7 @@ generateAnnotationDefaultValueIfNeeded(methodVisitor) SMAP(listOf()) } else if (notForInline != null) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/codegen/inline/SMAPAndMethodNode, */ val (originalNode, smap) = classCodegen.generateMethodNode(notForInline) originalNode.accept(MethodBodyVisitor(methodVisitor)) smap
diff --git a/compiler/ir/backend.jvm/codegen/src/org/jetbrains/kotlin/backend/jvm/codegen/IrInlineDefaultCodegen.kt b/compiler/ir/backend.jvm/codegen/src/org/jetbrains/kotlin/backend/jvm/codegen/IrInlineDefaultCodegen.kt index a224fd7..7894b52 100644 --- a/compiler/ir/backend.jvm/codegen/src/org/jetbrains/kotlin/backend/jvm/codegen/IrInlineDefaultCodegen.kt +++ b/compiler/ir/backend.jvm/codegen/src/org/jetbrains/kotlin/backend/jvm/codegen/IrInlineDefaultCodegen.kt
@@ -43,6 +43,7 @@ isInsideIfCondition: Boolean ) { val function = expression.symbol.owner + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/codegen/inline/SMAPAndMethodNode, */ val (node, smap) = codegen.classCodegen.generateMethodNode(function) val argsSize = argumentsSize(callableMethod.asmMethod.descriptor, function.isStatic) val mv = object : MethodBodyVisitor(codegen.visitor) {
diff --git a/compiler/ir/backend.jvm/codegen/src/org/jetbrains/kotlin/backend/jvm/codegen/SwitchGenerator.kt b/compiler/ir/backend.jvm/codegen/src/org/jetbrains/kotlin/backend/jvm/codegen/SwitchGenerator.kt index c76491b6..6577f0e 100644 --- a/compiler/ir/backend.jvm/codegen/src/org/jetbrains/kotlin/backend/jvm/codegen/SwitchGenerator.kt +++ b/compiler/ir/backend.jvm/codegen/src/org/jetbrains/kotlin/backend/jvm/codegen/SwitchGenerator.kt
@@ -293,7 +293,8 @@ with(codegen) { val endLabel = Label() - for ((thenExpression, label) in expressionToLabels) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/backend/jvm/codegen/SwitchGenerator.ExpressionToLabel, */ + (thenExpression, label) in expressionToLabels) { mv.visitLabel(label) thenExpression.accept(this, data).also { if (elseExpression != null) { @@ -463,9 +464,11 @@ // Multiple strings can be hashed into the same bucket. // Generate an if cascade to resolve that for each bucket. - for ((hash, switchLabel) in hashAndSwitchLabels) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/backend/jvm/codegen/SwitchGenerator.ValueToLabel, */ + (hash, switchLabel) in hashAndSwitchLabels) { mv.visitLabel(switchLabel) - for ((string, label) in hashToStringAndExprLabels[hash]!!) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/backend/jvm/codegen/SwitchGenerator.ValueToLabel, */ + (string, label) in hashToStringAndExprLabels[hash]!!) { noLineNumberScope { subject.accept(this, data).materialize() }
diff --git a/compiler/ir/backend.jvm/entrypoint/src/org/jetbrains/kotlin/backend/jvm/JvmIrCodegenFactory.kt b/compiler/ir/backend.jvm/entrypoint/src/org/jetbrains/kotlin/backend/jvm/JvmIrCodegenFactory.kt index 1306fef..072d63f 100644 --- a/compiler/ir/backend.jvm/entrypoint/src/org/jetbrains/kotlin/backend/jvm/JvmIrCodegenFactory.kt +++ b/compiler/ir/backend.jvm/entrypoint/src/org/jetbrains/kotlin/backend/jvm/JvmIrCodegenFactory.kt
@@ -326,6 +326,7 @@ } override fun invokeLowerings(state: GenerationState, input: CodegenFactory.BackendInput): CodegenFactory.CodegenInput { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 8, destructured variable amount without '_': 8, classId: org/jetbrains/kotlin/backend/jvm/JvmIrCodegenFactory.JvmIrBackendInput, */ val (irModuleFragment, symbolTable, customPhaseConfig, irProviders, extensions, backendExtension, irPluginContext, notifyCodegenStart) = input as JvmIrBackendInput val irSerializer = if ( @@ -361,6 +362,7 @@ } override fun invokeCodegen(input: CodegenFactory.CodegenInput) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 4, destructured variable amount without '_': 4, classId: org/jetbrains/kotlin/backend/jvm/JvmIrCodegenFactory.JvmIrCodegenInput, */ val (state, context, module, notifyCodegenStart) = input as JvmIrCodegenInput fun hasErrors() = (state.diagnosticReporter as? BaseDiagnosticsCollector)?.hasErrors == true
diff --git a/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/PropertyReferenceLowering.kt b/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/PropertyReferenceLowering.kt index 7685a87..6633002 100644 --- a/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/PropertyReferenceLowering.kt +++ b/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/PropertyReferenceLowering.kt
@@ -315,6 +315,7 @@ // For delegated properties, the getter and setter contain a reference each as the second argument to getValue // and setValue. Since it's highly unlikely that anyone will call get/set on these, optimize for space. return context.createIrBuilder(currentScope!!.scope.scopeOwnerSymbol, expression.startOffset, expression.endOffset).run { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 1, classId: org/jetbrains/kotlin/backend/jvm/lower/PropertyReferenceLowering.PropertyInstance, */ val (_, index) = data.kProperties.getOrPut(expression.symbol) { PropertyInstance(createReflectedKProperty(expression), data.kProperties.size) }
diff --git a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/ir2wasm/locationUtils.kt b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/ir2wasm/locationUtils.kt index e1bd464..adfd1eb 100644 --- a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/ir2wasm/locationUtils.kt +++ b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/ir2wasm/locationUtils.kt
@@ -42,6 +42,7 @@ if (hasSyntheticOrUndefinedLocation) return SourceLocation.NoLocation("Synthetic declaration") val path = fileEntry.name + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/ir/LineAndColumn, */ val (line, column) = type.getLineAndColumnNumberFor(this, fileEntry) if (line < 0 || column < 0) return SourceLocation.NoLocation("startLine or startColumn < 0")
diff --git a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/wasmCompiler.kt b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/wasmCompiler.kt index 768e0b2..ee6d7c7 100644 --- a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/wasmCompiler.kt +++ b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/wasmCompiler.kt
@@ -65,6 +65,7 @@ generateTypeScriptFragment: Boolean, propertyLazyInitialization: Boolean, ): LoweredIrWithExtraArtifacts { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 5, destructured variable amount without '_': 5, classId: org/jetbrains/kotlin/ir/backend/js/IrModuleInfo, */ val (moduleFragment, dependencyModules, irBuiltIns, symbolTable, irLinker) = irModuleInfo val allModules = when (mainModule) {
diff --git a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/fragments/FragmentCompilerSymbolTableDecorator.kt b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/fragments/FragmentCompilerSymbolTableDecorator.kt index 1b3fc82..50aa594 100644 --- a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/fragments/FragmentCompilerSymbolTableDecorator.kt +++ b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/fragments/FragmentCompilerSymbolTableDecorator.kt
@@ -40,10 +40,12 @@ if (declaration !is ReceiverParameterDescriptor) return super.referenceValueParameter(declaration) val finderPredicate = when (val receiverValue = declaration.value) { - is ExtensionReceiver, is ContextReceiver -> { (targetDescriptor, _): EvaluatorFragmentParameterInfo -> + is ExtensionReceiver, is ContextReceiver -> { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 1, classId: org/jetbrains/kotlin/psi2ir/generators/fragments/EvaluatorFragmentParameterInfo, */ + (targetDescriptor, _): EvaluatorFragmentParameterInfo -> receiverValue == (targetDescriptor as? ReceiverParameterDescriptor)?.value } - is ThisClassReceiver -> { (targetDescriptor, _): EvaluatorFragmentParameterInfo -> + is ThisClassReceiver -> { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 1, classId: org/jetbrains/kotlin/psi2ir/generators/fragments/EvaluatorFragmentParameterInfo, */ + (targetDescriptor, _): EvaluatorFragmentParameterInfo -> receiverValue.classDescriptor == targetDescriptor.original } else -> TODO("Unimplemented") @@ -61,10 +63,12 @@ val fi = fragmentInfo ?: return super.referenceValue(value) val finderPredicate = when (value) { - is AbstractReceiverParameterDescriptor -> { (targetDescriptor, _): EvaluatorFragmentParameterInfo -> + is AbstractReceiverParameterDescriptor -> { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 1, classId: org/jetbrains/kotlin/psi2ir/generators/fragments/EvaluatorFragmentParameterInfo, */ + (targetDescriptor, _): EvaluatorFragmentParameterInfo -> value.containingDeclaration == targetDescriptor } - else -> { (targetDescriptor, _): EvaluatorFragmentParameterInfo -> + else -> { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 1, classId: org/jetbrains/kotlin/psi2ir/generators/fragments/EvaluatorFragmentParameterInfo, */ + (targetDescriptor, _): EvaluatorFragmentParameterInfo -> targetDescriptor == value } }
diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/IrFileEntry.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/IrFileEntry.kt index 2c8af9b..fc78677 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/IrFileEntry.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/IrFileEntry.kt
@@ -56,7 +56,9 @@ } override fun getSourceRangeInfo(beginOffset: Int, endOffset: Int): SourceRangeInfo { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/ir/LineAndColumn, */ val (startLineNumber, startColumnNumber) = getLineAndColumnNumbers(beginOffset) + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/ir/LineAndColumn, */ val (endLineNumber, endColumnNumber) = getLineAndColumnNumbers(endOffset) return SourceRangeInfo( filePath = name,
diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/linkage/partial/PartialLinkageUtils.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/linkage/partial/PartialLinkageUtils.kt index c3fc033..166c17e 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/linkage/partial/PartialLinkageUtils.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/linkage/partial/PartialLinkageUtils.kt
@@ -67,6 +67,7 @@ override val module = Module.Real(file.module.name) override fun computeLocationForOffset(offset: Int): PartialLinkageLogger.Location { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/ir/LineAndColumn, */ val (line, column) = file.fileEntry.getLineAndColumnNumbers(offset) return PartialLinkageLogger.Location( moduleName = module.name,
diff --git a/compiler/ir/ir.tree/tree-generator/src/org/jetbrains/kotlin/ir/generator/print/symbol/SymbolRemapperPrinter.kt b/compiler/ir/ir.tree/tree-generator/src/org/jetbrains/kotlin/ir/generator/print/symbol/SymbolRemapperPrinter.kt index f995953..0330518 100644 --- a/compiler/ir/ir.tree/tree-generator/src/org/jetbrains/kotlin/ir/generator/print/symbol/SymbolRemapperPrinter.kt +++ b/compiler/ir/ir.tree/tree-generator/src/org/jetbrains/kotlin/ir/generator/print/symbol/SymbolRemapperPrinter.kt
@@ -107,7 +107,8 @@ if (symbolRemapperSuperTypes.isEmpty()) { val kDoc = buildString { append("Remaps symbols stored, e.g., in the following properties (not necessarily limited to those properties):") - for ((_, fieldName, _, element) in fields) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 4, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/ir/generator/model/symbol/FieldWithSymbol, */ + (_, fieldName, _, element) in fields) { appendLine() append("- [${element.render()}.$fieldName]") }
diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/linkage/issues/UserVisibleIrModulesSupport.kt b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/linkage/issues/UserVisibleIrModulesSupport.kt index 7ed2ff9..afedcba 100644 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/linkage/issues/UserVisibleIrModulesSupport.kt +++ b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/linkage/issues/UserVisibleIrModulesSupport.kt
@@ -190,6 +190,7 @@ private fun Map<ResolvedDependencyId, ModuleWithUninitializedDependencies>.stampDependenciesWithRequestedVersionEqualToSelectedVersion(): Map<ResolvedDependencyId, ResolvedDependency> { return mapValues { (moduleId, moduleWithUninitializedDependencies) -> + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/backend/common/linkage/issues/UserVisibleIrModulesSupport.ModuleWithUninitializedDependencies, */ val (module, outgoingDependencyIds) = moduleWithUninitializedDependencies outgoingDependencyIds.forEach { outgoingDependencyId -> val dependencyModule = getValue(outgoingDependencyId).module
diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/linkage/partial/PartialLinkageErrorMessages.kt b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/linkage/partial/PartialLinkageErrorMessages.kt index 9e74aca..7d6cdd2 100644 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/linkage/partial/PartialLinkageErrorMessages.kt +++ b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/linkage/partial/PartialLinkageErrorMessages.kt
@@ -491,6 +491,7 @@ } private fun StringBuilder.expression(expression: IrExpression, continuation: (ExpressionKind) -> Appendable): Appendable { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/backend/common/linkage/partial/Expression, */ val (expressionKind, referencedDeclarationKind) = expression.expression // Prefix may be null. But when it's not null, it is always capitalized.
diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/CityHash.kt b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/CityHash.kt index 11531c9..2c8ee04 100644 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/CityHash.kt +++ b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/CityHash.kt
@@ -231,6 +231,7 @@ var pos = pos var len = len + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/backend/common/serialization/Hash128Bits, */ var (a, b) = seed var c: ULong var d: ULong @@ -271,6 +272,7 @@ var v = ULongArray(2) var w = ULongArray(2) + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/backend/common/serialization/Hash128Bits, */ var (x, y) = seed var z = len.toULong() * k1
diff --git a/compiler/light-classes/src/org/jetbrains/kotlin/asJava/elements/KtLightPsiClassObjectAccessExpression.kt b/compiler/light-classes/src/org/jetbrains/kotlin/asJava/elements/KtLightPsiClassObjectAccessExpression.kt index d5abad6..96783e4 100644 --- a/compiler/light-classes/src/org/jetbrains/kotlin/asJava/elements/KtLightPsiClassObjectAccessExpression.kt +++ b/compiler/light-classes/src/org/jetbrains/kotlin/asJava/elements/KtLightPsiClassObjectAccessExpression.kt
@@ -22,6 +22,7 @@ KtLightPsiLiteral(kotlinOrigin, lightParent), PsiClassObjectAccessExpression { override fun getType(): PsiType { val bindingContext = LightClassGenerationSupport.getInstance(this.project).analyze(kotlinOrigin) + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/resolve/constants/ClassLiteralValue, */ val (classId, arrayDimensions) = bindingContext[BindingContext.COMPILE_TIME_VALUE, kotlinOrigin] ?.toConstantValue(TypeUtils.NO_EXPECTED_TYPE)?.safeAs<KClassValue>()?.value ?.safeAs<KClassValue.Value.NormalClass>()?.value ?: return PsiTypes.voidType()
diff --git a/compiler/psi/src/org/jetbrains/kotlin/parsing/ParseUtils.kt b/compiler/psi/src/org/jetbrains/kotlin/parsing/ParseUtils.kt index 8cc06d9..716d7eb 100644 --- a/compiler/psi/src/org/jetbrains/kotlin/parsing/ParseUtils.kt +++ b/compiler/psi/src/org/jetbrains/kotlin/parsing/ParseUtils.kt
@@ -66,6 +66,7 @@ } } + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/utils/NumberWithRadix, */ val (number, radix) = extractRadix(numberWithoutSuffix) if (isUnsigned) {
diff --git a/compiler/psi/src/org/jetbrains/kotlin/psi/createByPattern.kt b/compiler/psi/src/org/jetbrains/kotlin/psi/createByPattern.kt index 0c5f5e0..ddf3560 100644 --- a/compiler/psi/src/org/jetbrains/kotlin/psi/createByPattern.kt +++ b/compiler/psi/src/org/jetbrains/kotlin/psi/createByPattern.kt
@@ -142,6 +142,7 @@ arg } + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/psi/PatternData, */ val (processedText, allPlaceholders) = processPattern(pattern, args) var resultElement: KtElement = factory(processedText.trim()) @@ -159,7 +160,8 @@ if (arg is String) continue // already in the text val expectedElementType = (argumentTypes[n] as PsiElementPlaceholderArgumentType<*, *>).placeholderClass - for ((range, _) in placeholders) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 2, destructured variable amount without '_': 1, classId: org/jetbrains/kotlin/psi/Placeholder, */ + (range, _) in placeholders) { val token = resultElement.findElementAt(range.startOffset)!! for (element in token.parentsWithSelf) { val elementRange = element.textRange.shiftRight(-start)
diff --git a/compiler/resolution.common/src/org/jetbrains/kotlin/resolve/calls/inference/components/ConstraintInjector.kt b/compiler/resolution.common/src/org/jetbrains/kotlin/resolve/calls/inference/components/ConstraintInjector.kt index 984a1f3..f53dd27 100644 --- a/compiler/resolution.common/src/org/jetbrains/kotlin/resolve/calls/inference/components/ConstraintInjector.kt +++ b/compiler/resolution.common/src/org/jetbrains/kotlin/resolve/calls/inference/components/ConstraintInjector.kt
@@ -513,6 +513,7 @@ type: KotlinTypeMarker, constraintContext: ConstraintContext ) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 4, destructured variable amount without '_': 4, classId: org/jetbrains/kotlin/resolve/calls/inference/components/ConstraintContext, */ val (kind, derivedFrom, inputTypePosition, isNullabilityConstraint) = constraintContext var targetType = type
diff --git a/compiler/resolution.common/src/org/jetbrains/kotlin/resolve/calls/inference/components/TypeVariableDirectionCalculator.kt b/compiler/resolution.common/src/org/jetbrains/kotlin/resolve/calls/inference/components/TypeVariableDirectionCalculator.kt index 0ec39f6..3cdec75 100644 --- a/compiler/resolution.common/src/org/jetbrains/kotlin/resolve/calls/inference/components/TypeVariableDirectionCalculator.kt +++ b/compiler/resolution.common/src/org/jetbrains/kotlin/resolve/calls/inference/components/TypeVariableDirectionCalculator.kt
@@ -69,7 +69,8 @@ directions[variable] = direction - for ((otherVariable, otherDirection) in getConstraintDependencies(variable, direction)) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/resolve/calls/inference/components/TypeVariableDirectionCalculator.NodeWithDirection, */ + (otherVariable, otherDirection) in getConstraintDependencies(variable, direction)) { enterToNode(otherVariable, otherDirection) } }
diff --git a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/CompletionModeCalculator.kt b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/CompletionModeCalculator.kt index d5fd8e8..5af2467 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/CompletionModeCalculator.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/CompletionModeCalculator.kt
@@ -120,6 +120,7 @@ } private fun updateDirection(directionForVariable: FixationDirectionForVariable) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/resolve/calls/components/CompletionModeCalculator.CalculatorForNestedCall.FixationDirectionForVariable, */ val (variable, newDirection) = directionForVariable fixationDirectionsForVariables[variable]?.let { oldDirection -> if (oldDirection != FixationDirection.EQUALITY && oldDirection != newDirection)
diff --git a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/PostponedArgumentsAnalyzer.kt b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/PostponedArgumentsAnalyzer.kt index 449c44d..66e64c6 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/PostponedArgumentsAnalyzer.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/PostponedArgumentsAnalyzer.kt
@@ -152,6 +152,7 @@ diagnosticHolder: KotlinDiagnosticsHolder, substitute: (KotlinType) -> UnwrappedType = c.createSubstituteFunctorForLambdaAnalysis().substitute ) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/resolve/calls/components/ReturnArgumentsAnalysisResult, */ val (returnArgumentsInfo, inferenceSession, hasInapplicableCallForBuilderInference) = returnArgumentsAnalysisResult
diff --git a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/ResolutionParts.kt b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/ResolutionParts.kt index ffc9af5..8391734 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/ResolutionParts.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/ResolutionParts.kt
@@ -900,6 +900,7 @@ getReceiverArgumentWithConstraintIfCompatible(argument, candidateContextReceiverParameter) }.toList() if (applicableArguments.size == 1) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 4, destructured variable amount without '_': 4, classId: org/jetbrains/kotlin/resolve/calls/components/ApplicableContextReceiverArgumentWithConstraint, */ val (argument, argumentType, expectedType, position) = applicableArguments.single() csBuilder.addSubtypeConstraint(argumentType, expectedType, position) return argument
diff --git a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/tower/TowerLevels.kt b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/tower/TowerLevels.kt index 66f44f5..5bc279f 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/tower/TowerLevels.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/tower/TowerLevels.kt
@@ -344,7 +344,8 @@ name: Name, extensionReceiver: ReceiverValueWithSmartCastInfo? ): Collection<CandidateWithBoundDispatchReceiver> = - resolutionScope.getContributedObjectVariablesIncludeDeprecated(name, location).map { (classifier, isDeprecated) -> + resolutionScope.getContributedObjectVariablesIncludeDeprecated(name, location).map { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/descriptors/DescriptorWithDeprecation, */ + (classifier, isDeprecated) -> createCandidateDescriptor( classifier, dispatchReceiver = null, @@ -531,6 +532,7 @@ name: Name, location: LookupLocation ): Collection<DescriptorWithDeprecation<VariableDescriptor>> { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/descriptors/DescriptorWithDeprecation, */ val (classifier, isOwnerDeprecated) = getContributedClassifierIncludeDeprecated(name, location) ?: return emptyList() val objectDescriptor = getFakeDescriptorForObject(classifier) ?: return emptyList() return listOf(DescriptorWithDeprecation(objectDescriptor, isOwnerDeprecated))
diff --git a/compiler/resolution/src/org/jetbrains/kotlin/resolve/scopes/LexicalChainedScope.kt b/compiler/resolution/src/org/jetbrains/kotlin/resolve/scopes/LexicalChainedScope.kt index db42716..e0350fa 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/resolve/scopes/LexicalChainedScope.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/resolve/scopes/LexicalChainedScope.kt
@@ -50,6 +50,7 @@ getFirstClassifierDiscriminateHeaders(memberScopes) { it.getContributedClassifier(name, location) } override fun getContributedClassifierIncludeDeprecated(name: Name, location: LookupLocation): DescriptorWithDeprecation<ClassifierDescriptor>? { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/descriptors/DescriptorWithDeprecation, */ val (firstClassifier, isFirstDeprecated) = memberScopes.firstNotNullOfOrNull { it.getContributedClassifierIncludeDeprecated(name, location) } ?: return null @@ -58,6 +59,7 @@ // Slow-path: try to find the same classifier, but without deprecation for (scope in memberScopes) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/descriptors/DescriptorWithDeprecation, */ val (descriptor, isDeprecated) = scope.getContributedClassifierIncludeDeprecated(name, location) ?: continue if (descriptor == firstClassifier && !isDeprecated) return DescriptorWithDeprecation.createNonDeprecated(descriptor) }
diff --git a/core/compiler.common.jvm/src/org/jetbrains/kotlin/builtins/jvm/JavaToKotlinClassMap.kt b/core/compiler.common.jvm/src/org/jetbrains/kotlin/builtins/jvm/JavaToKotlinClassMap.kt index 3844c50..6e10424 100644 --- a/core/compiler.common.jvm/src/org/jetbrains/kotlin/builtins/jvm/JavaToKotlinClassMap.kt +++ b/core/compiler.common.jvm/src/org/jetbrains/kotlin/builtins/jvm/JavaToKotlinClassMap.kt
@@ -158,6 +158,7 @@ } private fun addMapping(platformMutabilityMapping: PlatformMutabilityMapping) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/builtins/jvm/JavaToKotlinClassMap.PlatformMutabilityMapping, */ val (javaClassId, readOnlyClassId, mutableClassId) = platformMutabilityMapping add(javaClassId, readOnlyClassId) addKotlinToJava(mutableClassId.asSingleFqName(), javaClassId)
diff --git a/core/compiler.common/src/org/jetbrains/kotlin/util/AttributeArrayOwner.kt b/core/compiler.common/src/org/jetbrains/kotlin/util/AttributeArrayOwner.kt index 2d65c2d..65d4b90 100644 --- a/core/compiler.common/src/org/jetbrains/kotlin/util/AttributeArrayOwner.kt +++ b/core/compiler.common/src/org/jetbrains/kotlin/util/AttributeArrayOwner.kt
@@ -58,6 +58,7 @@ val map = arrayMap as ArrayMapImpl<T> map.remove(id) if (map.size == 1) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/util/ArrayMapImpl.Entry, */ val (index, value) = map.entries().first() arrayMap = OneElementArrayMap(value, index) }
diff --git a/core/descriptors.jvm/src/org/jetbrains/kotlin/load/kotlin/JvmPackagePartProviderBase.kt b/core/descriptors.jvm/src/org/jetbrains/kotlin/load/kotlin/JvmPackagePartProviderBase.kt index 9c52a84..7fc736a 100644 --- a/core/descriptors.jvm/src/org/jetbrains/kotlin/load/kotlin/JvmPackagePartProviderBase.kt +++ b/core/descriptors.jvm/src/org/jetbrains/kotlin/load/kotlin/JvmPackagePartProviderBase.kt
@@ -48,7 +48,8 @@ private fun getPackageParts(packageFqName: String): Collection<PackageParts> { val result = mutableMapOf<MappingsKey, PackageParts>() - for ((root, mapping) in loadedModules) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/load/kotlin/JvmPackagePartProviderBase.ModuleMappingInfo, */ + (root, mapping) in loadedModules) { val newParts = mapping.findPackageParts(packageFqName) ?: continue result[root]?.let { parts -> parts += newParts } ?: result.put(root, newParts) } @@ -56,7 +57,8 @@ } override fun getAnnotationsOnBinaryModule(moduleName: String): List<ClassId> { - return loadedModules.mapNotNull { (_, mapping, name) -> + return loadedModules.mapNotNull { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 3, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/load/kotlin/JvmPackagePartProviderBase.ModuleMappingInfo, */ + (_, mapping, name) -> if (name == moduleName) mapping.moduleData.annotations.map(ClassId::fromString) else null }.flatten() }
diff --git a/core/descriptors/src/org/jetbrains/kotlin/builtins/functions/BuiltInFictitiousFunctionClassFactory.kt b/core/descriptors/src/org/jetbrains/kotlin/builtins/functions/BuiltInFictitiousFunctionClassFactory.kt index d4d3d6d..0026e41 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/builtins/functions/BuiltInFictitiousFunctionClassFactory.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/builtins/functions/BuiltInFictitiousFunctionClassFactory.kt
@@ -49,6 +49,7 @@ if ("Function" !in className) return null // An optimization val packageFqName = classId.packageFqName + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/builtins/functions/FunctionTypeKindExtractor.KindWithArity, */ val (kind, arity) = FunctionTypeKindExtractor.Default.getFunctionalClassKindWithArity(packageFqName, className) ?: return null
diff --git a/core/descriptors/src/org/jetbrains/kotlin/descriptors/NotFoundClasses.kt b/core/descriptors/src/org/jetbrains/kotlin/descriptors/NotFoundClasses.kt index 8a85deb..43bd1be 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/descriptors/NotFoundClasses.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/descriptors/NotFoundClasses.kt
@@ -30,7 +30,8 @@ EmptyPackageFragmentDescriptor(module, fqName) } - private val classes = storageManager.createMemoizedFunction<ClassRequest, ClassDescriptor> { (classId, typeParametersCount) -> + private val classes = storageManager.createMemoizedFunction<ClassRequest, ClassDescriptor> { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/descriptors/NotFoundClasses.ClassRequest, */ + (classId, typeParametersCount) -> if (classId.isLocal) { throw UnsupportedOperationException("Unresolved local class: $classId") }
diff --git a/core/descriptors/src/org/jetbrains/kotlin/resolve/constants/constantValues.kt b/core/descriptors/src/org/jetbrains/kotlin/resolve/constants/constantValues.kt index 61b1246..d6f22d3 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/resolve/constants/constantValues.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/resolve/constants/constantValues.kt
@@ -189,6 +189,7 @@ when (value) { is Value.LocalClass -> return value.type is Value.NormalClass -> { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/resolve/constants/ClassLiteralValue, */ val (classId, arrayDimensions) = value.value val descriptor = module.findClassAcrossModuleDependencies(classId) ?: return ErrorUtils.createErrorType(ErrorTypeKind.UNRESOLVED_KCLASS_CONSTANT_VALUE, classId.toString(), arrayDimensions.toString())
diff --git a/core/descriptors/src/org/jetbrains/kotlin/types/CapturedTypeApproximation.kt b/core/descriptors/src/org/jetbrains/kotlin/types/CapturedTypeApproximation.kt index 78112a8..da3781a 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/types/CapturedTypeApproximation.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/types/CapturedTypeApproximation.kt
@@ -150,6 +150,7 @@ lowerBoundArguments.add(typeArgument) upperBoundArguments.add(typeArgument) } else { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/types/typesApproximation/ApproximationBounds, */ val (lower, upper) = approximateProjection(typeArgument) lowerBoundArguments.add(lower) upperBoundArguments.add(upper) @@ -168,7 +169,9 @@ } private fun approximateProjection(typeArgument: TypeArgument): ApproximationBounds<TypeArgument> { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/types/typesApproximation/ApproximationBounds, */ val (inLower, inUpper) = approximateCapturedTypes(typeArgument.inProjection) + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/types/typesApproximation/ApproximationBounds, */ val (outLower, outUpper) = approximateCapturedTypes(typeArgument.outProjection) return ApproximationBounds( lower = TypeArgument(typeArgument.typeParameter, inUpper, outLower),
diff --git a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/ClassDeserializer.kt b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/ClassDeserializer.kt index f1a8aa3..2cad338 100644 --- a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/ClassDeserializer.kt +++ b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/ClassDeserializer.kt
@@ -40,6 +40,7 @@ } if (classId in BLACK_LIST) return null + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 4, destructured variable amount without '_': 4, classId: org/jetbrains/kotlin/serialization/deserialization/ClassData, */ val (nameResolver, classProto, metadataVersion, sourceElement) = key.classData ?: components.classDataFinder.findClassData(classId) ?: return null
diff --git a/core/reflection.jvm/src/kotlin/reflect/jvm/internal/RuntimeTypeMapper.kt b/core/reflection.jvm/src/kotlin/reflect/jvm/internal/RuntimeTypeMapper.kt index 8d117df..03948f9 100644 --- a/core/reflection.jvm/src/kotlin/reflect/jvm/internal/RuntimeTypeMapper.kt +++ b/core/reflection.jvm/src/kotlin/reflect/jvm/internal/RuntimeTypeMapper.kt
@@ -109,6 +109,7 @@ private val string: String = if (signature.hasGetter()) { nameResolver.getString(signature.getter.name) + nameResolver.getString(signature.getter.desc) } else { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/metadata/jvm/deserialization/JvmMemberSignature.Field, */ val (name, desc) = JvmProtoBufUtil.getJvmFieldSignature(proto, nameResolver, typeTable) ?: throw KotlinReflectionInternalError("No field signature for property: $descriptor")
diff --git a/generators/ide-iml-to-gradle-generator/src/org/jetbrains/kotlin/generators/imltogradle/Main.kt b/generators/ide-iml-to-gradle-generator/src/org/jetbrains/kotlin/generators/imltogradle/Main.kt index d043ef9..77420e3 100644 --- a/generators/ide-iml-to-gradle-generator/src/org/jetbrains/kotlin/generators/imltogradle/Main.kt +++ b/generators/ide-iml-to-gradle-generator/src/org/jetbrains/kotlin/generators/imltogradle/Main.kt
@@ -143,6 +143,7 @@ } in intellijModulesToIgnore -> emptyList() else -> { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/generators/imltogradle/MavenArtifact, */ val (groupId, artifactId) = MavenArtifactsBuilder.generateMavenCoordinates(moduleName) listOf( JpsLikeJarDependency(
diff --git a/generators/protobuf/GenerateProtoBuf.kt b/generators/protobuf/GenerateProtoBuf.kt index 9100464..675e885 100644 --- a/generators/protobuf/GenerateProtoBuf.kt +++ b/generators/protobuf/GenerateProtoBuf.kt
@@ -92,6 +92,7 @@ } private fun checkVersion() { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/generators/protobuf/ProcessOutput, */ val (stdout, stderr) = execAndGetOutput(PROTOC_EXE, "--version") val version = stdout.trim() @@ -108,6 +109,7 @@ listOf(PROTOC_EXE, protoPath, "--java_out=$outPath") + PROTOBUF_PROTO_PATHS.map { "--proto_path=$it" } println("running ${commandLine.joinToString(" ")}") + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/generators/protobuf/ProcessOutput, */ val (stdout, stderr) = execAndGetOutput(*commandLine.toTypedArray()) print(stdout) if (stderr.isNotEmpty()) {
diff --git a/jps/jps-plugin/src/org/jetbrains/kotlin/compilerRunner/JpsKotlinCompilerRunner.kt b/jps/jps-plugin/src/org/jetbrains/kotlin/compilerRunner/JpsKotlinCompilerRunner.kt index 8c2454b..b4864b1 100644 --- a/jps/jps-plugin/src/org/jetbrains/kotlin/compilerRunner/JpsKotlinCompilerRunner.kt +++ b/jps/jps-plugin/src/org/jetbrains/kotlin/compilerRunner/JpsKotlinCompilerRunner.kt
@@ -261,6 +261,7 @@ return null } + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/daemon/client/CompileServiceSession, */ val (daemon, sessionId) = connection val res = fn(sessionId, daemon) // TODO: consider implementing connection retry, instead of fallback here
diff --git a/jps/jps-plugin/src/org/jetbrains/kotlin/jps/build/KotlinBuilder.kt b/jps/jps-plugin/src/org/jetbrains/kotlin/jps/build/KotlinBuilder.kt index 4e9bf03..ced1ecf 100644 --- a/jps/jps-plugin/src/org/jetbrains/kotlin/jps/build/KotlinBuilder.kt +++ b/jps/jps-plugin/src/org/jetbrains/kotlin/jps/build/KotlinBuilder.kt
@@ -826,6 +826,7 @@ lookupStorageManager: JpsLookupStorageManager ): FilesToRecompile { val reporter = JpsICReporter() + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/incremental/DirtyData, */ val (dirtyLookupSymbols, dirtyClassFqNames, forceRecompile) = getChangedAndImpactedSymbols(caches, reporter) val dirtyFilesFromLookups = lookupStorageManager.withLookupStorage { mapLookupSymbolsToFiles(it, dirtyLookupSymbols, reporter)
diff --git a/js/js.frontend/src/org/jetbrains/kotlin/js/naming/NameSuggestion.kt b/js/js.frontend/src/org/jetbrains/kotlin/js/naming/NameSuggestion.kt index c839626..0d44bc8 100644 --- a/js/js.frontend/src/org/jetbrains/kotlin/js/naming/NameSuggestion.kt +++ b/js/js.frontend/src/org/jetbrains/kotlin/js/naming/NameSuggestion.kt
@@ -205,6 +205,7 @@ parts.reverse() val unmangledName = parts.joinToString("$") + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/js/naming/NameSuggestion.Companion.NameAndStability, */ val (id, stable) = mangleNameIfNecessary(unmangledName, fixedDescriptor, bindingContext) return SuggestedName(listOf(id), stable, fixedDescriptor, current) }
diff --git a/js/js.inliner/src/org/jetbrains/kotlin/js/coroutine/CoroutineBodyTransformer.kt b/js/js.inliner/src/org/jetbrains/kotlin/js/coroutine/CoroutineBodyTransformer.kt index 2f1534c..8a72f5f 100644 --- a/js/js.inliner/src/org/jetbrains/kotlin/js/coroutine/CoroutineBodyTransformer.kt +++ b/js/js.inliner/src/org/jetbrains/kotlin/js/coroutine/CoroutineBodyTransformer.kt
@@ -206,6 +206,7 @@ override fun visitBreak(x: JsBreak) { val targetStatement = breakContinueTargetStatements[x]!! + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/js/coroutine/CoroutineBodyTransformer.JumpTarget, */ val (targetBlock, targetTryDepth) = breakTargets[targetStatement]!! referencedBlocks += targetBlock jumpWithFinally(targetTryDepth + 1, targetBlock, x) @@ -214,6 +215,7 @@ override fun visitContinue(x: JsContinue) { val targetStatement = breakContinueTargetStatements[x]!! + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/js/coroutine/CoroutineBodyTransformer.JumpTarget, */ val (targetBlock, targetTryDepth) = continueTargets[targetStatement]!! referencedBlocks += targetBlock jumpWithFinally(targetTryDepth + 1, targetBlock, x)
diff --git a/js/js.inliner/src/org/jetbrains/kotlin/js/inline/FunctionReader.kt b/js/js.inliner/src/org/jetbrains/kotlin/js/inline/FunctionReader.kt index 942eefe..28bb99a 100644 --- a/js/js.inliner/src/org/jetbrains/kotlin/js/inline/FunctionReader.kt +++ b/js/js.inliner/src/org/jetbrains/kotlin/js/inline/FunctionReader.kt
@@ -85,7 +85,8 @@ private val moduleNameToInfo by lazy { val result = HashMultimap.create<String, ModuleInfo>() - JsLibraryUtils.traverseJsLibraries(config.libraries.map(::File)) { (content, path, sourceMapContent, file) -> + JsLibraryUtils.traverseJsLibraries(config.libraries.map(::File)) { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 4, destructured variable amount without '_': 4, classId: org/jetbrains/kotlin/utils/JsLibrary, */ + (content, path, sourceMapContent, file) -> var current = 0 while (true) { @@ -255,6 +256,7 @@ val jsScope = JsRootScope(JsProgram()) val functionExpr = parseFunction(source, info.filePath, position, offset, ThrowExceptionOnErrorReporter, jsScope) ?: return null functionExpr.fixForwardNameReferences() + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/js/inline/util/FunctionWithWrapper, */ val (function, wrapper) = if (isWrapped) { InlineMetadata.decomposeWrapper(functionExpr) ?: return null } else {
diff --git a/js/js.inliner/src/org/jetbrains/kotlin/js/inline/InlineAstVisitor.kt b/js/js.inliner/src/org/jetbrains/kotlin/js/inline/InlineAstVisitor.kt index a572ed4..3fd75b1 100644 --- a/js/js.inliner/src/org/jetbrains/kotlin/js/inline/InlineAstVisitor.kt +++ b/js/js.inliner/src/org/jetbrains/kotlin/js/inline/InlineAstVisitor.kt
@@ -69,6 +69,7 @@ override fun endVisit(call: JsInvocation, ctx: JsContext<JsNode>) { if (hasToBeInlined(call)) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/js/inline/InlineableResult, */ val (inlineableBody, resultExpression) = jsInliner.inline(scope, call, lastStatementLevelContext.currentNode) lastStatementLevelContext.addPrevious(JsAstUtils.flattenStatement(inlineableBody))
diff --git a/js/js.inliner/src/org/jetbrains/kotlin/js/inline/InliningScope.kt b/js/js.inliner/src/org/jetbrains/kotlin/js/inline/InliningScope.kt index 193025e..95f1805 100644 --- a/js/js.inliner/src/org/jetbrains/kotlin/js/inline/InliningScope.kt +++ b/js/js.inliner/src/org/jetbrains/kotlin/js/inline/InliningScope.kt
@@ -152,7 +152,8 @@ private val additionalDeclarations = mutableListOf<JsStatement>() override fun hasImport(name: JsName, tag: String): JsName? { - return name.localAlias?.let { (name, tag) -> + return name.localAlias?.let { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/js/backend/ast/metadata/LocalAlias, */ + (name, tag) -> if (tag != null) { if (tag !in existingBindings) { addNameBinding(name, tag)
diff --git a/js/js.inliner/src/org/jetbrains/kotlin/js/inline/JsInliner.kt b/js/js.inliner/src/org/jetbrains/kotlin/js/inline/JsInliner.kt index 2035f86..6cad7ac 100644 --- a/js/js.inliner/src/org/jetbrains/kotlin/js/inline/JsInliner.kt +++ b/js/js.inliner/src/org/jetbrains/kotlin/js/inline/JsInliner.kt
@@ -45,6 +45,7 @@ if (definitionFragment !in translationResult.newFragments) return cycleReporter.processInlineFunction(inlineFn.fn, call) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/js/inline/util/FunctionWithWrapper, */ val (fn, wrapperBody) = inlineFn.fn if (wrapperBody != null) { @@ -65,6 +66,7 @@ val inliningContext = InliningContext(currentStatement) + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/js/inline/InlineableResult, */ val (inlineableBody, resultExpression) = FunctionInlineMutator.getInlineableCallReplacement(call, function, inliningContext) // body of inline function can contain call to lambdas that need to be inlined
diff --git a/js/js.inliner/src/org/jetbrains/kotlin/js/inline/clean/simplifyWrappedFunctions.kt b/js/js.inliner/src/org/jetbrains/kotlin/js/inline/clean/simplifyWrappedFunctions.kt index e150fd5..0c065b5 100644 --- a/js/js.inliner/src/org/jetbrains/kotlin/js/inline/clean/simplifyWrappedFunctions.kt +++ b/js/js.inliner/src/org/jetbrains/kotlin/js/inline/clean/simplifyWrappedFunctions.kt
@@ -22,7 +22,8 @@ fun simplifyWrappedFunctions(root: JsNode) { val visitor = object : JsVisitorWithContextImpl() { override fun endVisit(x: JsInvocation, ctx: JsContext<in JsNode>) { - extractFunction(x)?.let { (function, wrapper) -> + extractFunction(x)?.let { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/js/inline/util/FunctionWithWrapper, */ + (function, wrapper) -> if (wrapper != null && wrapper.statements.size == 1) { ctx.replaceMe(function) }
diff --git a/js/js.inliner/src/org/jetbrains/kotlin/js/inline/context/FunctionDefinitionLoader.kt b/js/js.inliner/src/org/jetbrains/kotlin/js/inline/context/FunctionDefinitionLoader.kt index b13bfb2..1aa2c7e 100644 --- a/js/js.inliner/src/org/jetbrains/kotlin/js/inline/context/FunctionDefinitionLoader.kt +++ b/js/js.inliner/src/org/jetbrains/kotlin/js/inline/context/FunctionDefinitionLoader.kt
@@ -88,7 +88,8 @@ collectNamedFunctionsAndWrappers(listOf(this)), collectAccessors(listOf(this)), collectLocalFunctions(listOf(this)) - ).also { (functions, accessors) -> + ).also { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/js/inline/context/FunctionDefinitionLoader.FragmentInfo, */ + (functions, accessors) -> (functions.values.asSequence() + accessors.values.asSequence()).forEach { f -> functionsByFunctionNodes[f.function] = f }
diff --git a/js/js.inliner/src/org/jetbrains/kotlin/js/inline/util/collectUtils.kt b/js/js.inliner/src/org/jetbrains/kotlin/js/inline/util/collectUtils.kt index 845903b..08e256d 100644 --- a/js/js.inliner/src/org/jetbrains/kotlin/js/inline/util/collectUtils.kt +++ b/js/js.inliner/src/org/jetbrains/kotlin/js/inline/util/collectUtils.kt
@@ -199,7 +199,8 @@ if (left is JsNameRef) { val name = left.name if (name != null) { - extractFunction(right)?.let { (function, wrapper) -> + extractFunction(right)?.let { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/js/inline/util/FunctionWithWrapper, */ + (function, wrapper) -> namedFunctions[name] = Pair(FunctionWithWrapper(function, wrapper), right) } }
diff --git a/js/js.parser/src/org/jetbrains/kotlin/js/parser/sourcemaps/SourceMap.kt b/js/js.parser/src/org/jetbrains/kotlin/js/parser/sourcemaps/SourceMap.kt index 757e009..5aaaf55 100644 --- a/js/js.parser/src/org/jetbrains/kotlin/js/parser/sourcemaps/SourceMap.kt +++ b/js/js.parser/src/org/jetbrains/kotlin/js/parser/sourcemaps/SourceMap.kt
@@ -43,7 +43,8 @@ val generatedLine = generatedLines[index] val segmentsByColumn = group.segments.map { it.generatedColumnNumber to it }.toMap() for (i in generatedLine.indices) { - segmentsByColumn[i]?.let { (_, sourceFile, sourceLine, sourceColumn, name) -> + segmentsByColumn[i]?.let { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 5, destructured variable amount without '_': 4, classId: org/jetbrains/kotlin/js/parser/sourcemaps/SourceMapSegment, */ + (_, sourceFile, sourceLine, sourceColumn, name) -> val nameIfPresent = if (name != null) "($name)" else "" writer.print("<$sourceFile:${sourceLine + 1}:${sourceColumn + 1}$nameIfPresent>") }
diff --git a/js/js.sourcemap/src/org/jetbrains/kotlin/js/sourceMap/SourceMapBuilderConsumer.kt b/js/js.sourcemap/src/org/jetbrains/kotlin/js/sourceMap/SourceMapBuilderConsumer.kt index 76f0fe9..0f0a4e4 100644 --- a/js/js.sourcemap/src/org/jetbrains/kotlin/js/sourceMap/SourceMapBuilderConsumer.kt +++ b/js/js.sourcemap/src/org/jetbrains/kotlin/js/sourceMap/SourceMapBuilderConsumer.kt
@@ -45,6 +45,7 @@ // This branch is only taken on the legacy backend if (sourceInfo.isFakePsiElement) return try { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/js/backend/ast/JsLocation, */ val (sourceFilePath, startLine, startChar) = PsiUtils.extractLocationFromPsi(sourceInfo, pathResolver) val psiFile = sourceInfo.containingFile val file = File(psiFile.viewProvider.virtualFile.path)
diff --git a/js/js.translator/src/org/jetbrains/kotlin/js/translate/expression/LiteralFunctionTranslator.kt b/js/js.translator/src/org/jetbrains/kotlin/js/translate/expression/LiteralFunctionTranslator.kt index 934e0fd..10184b3 100644 --- a/js/js.translator/src/org/jetbrains/kotlin/js/translate/expression/LiteralFunctionTranslator.kt +++ b/js/js.translator/src/org/jetbrains/kotlin/js/translate/expression/LiteralFunctionTranslator.kt
@@ -157,6 +157,7 @@ val localFunAlias = aliasRef?.getStaticRef() as? JsExpression if (localFunAlias != null) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/js/translate/expression/CapturedArgsParams, */ val (args, params) = moveCapturedLocalInside(this, name, localFunAlias) additionalArgs = args additionalParams = params
diff --git a/js/js.translator/src/org/jetbrains/kotlin/js/translate/general/normalizeImportTags.kt b/js/js.translator/src/org/jetbrains/kotlin/js/translate/general/normalizeImportTags.kt index 3792216..90f36e8 100644 --- a/js/js.translator/src/org/jetbrains/kotlin/js/translate/general/normalizeImportTags.kt +++ b/js/js.translator/src/org/jetbrains/kotlin/js/translate/general/normalizeImportTags.kt
@@ -14,6 +14,7 @@ fun JsProgramFragment.normalizeImportTags() { nameBindings.replaceAll { binding -> + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/js/backend/ast/JsNameBinding, */ val (tag, name) = binding imports[tag]?.let { import ->
diff --git a/libraries/kotlinx-metadata/src/kotlin/metadata/internal/Readers.kt b/libraries/kotlinx-metadata/src/kotlin/metadata/internal/Readers.kt index 878279e..609626b 100644 --- a/libraries/kotlinx-metadata/src/kotlin/metadata/internal/Readers.kt +++ b/libraries/kotlinx-metadata/src/kotlin/metadata/internal/Readers.kt
@@ -327,6 +327,7 @@ v.errorCode = message?.errorCode v.message = message?.message + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/metadata/deserialization/VersionRequirement.Version, */ val (major, minor, patch) = message?.version ?: VersionRequirement.Version.INFINITY v.version = KmVersion(major, minor, patch) return v
diff --git a/libraries/kotlinx-metadata/src/kotlin/metadata/internal/Writers.kt b/libraries/kotlinx-metadata/src/kotlin/metadata/internal/Writers.kt index f7dd1cd..9d539ba 100644 --- a/libraries/kotlinx-metadata/src/kotlin/metadata/internal/Writers.kt +++ b/libraries/kotlinx-metadata/src/kotlin/metadata/internal/Writers.kt
@@ -58,6 +58,7 @@ if (argument == KmTypeProjection.STAR) { t.projection = ProtoBuf.Type.Argument.Projection.STAR } else { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: kotlin/metadata/KmTypeProjection, */ val (variance, argType) = argument if (variance == null || argType == null) throw InconsistentKotlinMetadataException("Variance and type must be set for non-star type projection") @@ -231,6 +232,7 @@ this.message = this@writeVersionRequirement[message] } } + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: kotlin/metadata/KmVersion, */ val (major, minor, patch) = kmVersionRequirement.version VersionRequirement.Version(major, minor, patch).encode(
diff --git a/libraries/reflect/build.gradle.kts b/libraries/reflect/build.gradle.kts index 061bcbc..22074cc 100644 --- a/libraries/reflect/build.gradle.kts +++ b/libraries/reflect/build.gradle.kts
@@ -98,7 +98,8 @@ override fun hasTransformedResource(): Boolean = data.isNotEmpty() override fun modifyOutputStream(os: ZipOutputStream, preserveFileTimestamps: Boolean) { - for ((path, bytes) in data) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: /KotlinModuleShadowTransformer.Entry, */ + (path, bytes) in data) { os.putNextEntry(ZipEntry(path)) os.write(bytes) }
diff --git a/libraries/scripting/common/src/kotlin/script/experimental/api/scriptCompilation.kt b/libraries/scripting/common/src/kotlin/script/experimental/api/scriptCompilation.kt index 25c23b9..ee89d9f 100644 --- a/libraries/scripting/common/src/kotlin/script/experimental/api/scriptCompilation.kt +++ b/libraries/scripting/common/src/kotlin/script/experimental/api/scriptCompilation.kt
@@ -302,7 +302,8 @@ val thisResult: ResultWithDiagnostics<ScriptCompilationConfiguration> = this.asSuccess() return this[ScriptCompilationConfiguration.refineConfigurationOnAnnotations] - ?.fold(thisResult) { config, (annotations, handler) -> + ?.fold(thisResult) { config,/** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: kotlin/script/experimental/api/RefineConfigurationOnAnnotationsData, */ + (annotations, handler) -> config.onSuccess { // checking that the collected data contains expected annotations if (annotations.none { foundAnnotationNames.contains(it.typeName) }) it.asSuccess()
diff --git a/libraries/scripting/dependencies/src/kotlin/script/experimental/dependencies/CompoundDependenciesResolver.kt b/libraries/scripting/dependencies/src/kotlin/script/experimental/dependencies/CompoundDependenciesResolver.kt index 79b533f..9cbc21b 100644 --- a/libraries/scripting/dependencies/src/kotlin/script/experimental/dependencies/CompoundDependenciesResolver.kt +++ b/libraries/scripting/dependencies/src/kotlin/script/experimental/dependencies/CompoundDependenciesResolver.kt
@@ -69,6 +69,7 @@ val resolverGroups = mutableMapOf<Int, MutableList<ArtifactWithLocation>>() for ((artifactWithLocation, resolverIndex) in artifactToResolverIndex) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: kotlin/script/experimental/dependencies/ArtifactWithLocation, */ val (artifact, sourceCodeLocation) = artifactWithLocation var currentIndex = resolverIndex + 1
diff --git a/libraries/scripting/dependencies/src/kotlin/script/experimental/dependencies/ExternalDependenciesResolver.kt b/libraries/scripting/dependencies/src/kotlin/script/experimental/dependencies/ExternalDependenciesResolver.kt index 405af4f..bdc232e 100644 --- a/libraries/scripting/dependencies/src/kotlin/script/experimental/dependencies/ExternalDependenciesResolver.kt +++ b/libraries/scripting/dependencies/src/kotlin/script/experimental/dependencies/ExternalDependenciesResolver.kt
@@ -38,7 +38,8 @@ artifactsWithLocations: List<ArtifactWithLocation>, options: Options = Options.Empty, ): ResultWithDiagnostics<List<File>> = - artifactsWithLocations.map { (artifact, location) -> resolve(artifact, options, location) }.asSuccessIfAny() + artifactsWithLocations.map { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: kotlin/script/experimental/dependencies/ArtifactWithLocation, */ + (artifact, location) -> resolve(artifact, options, location) }.asSuccessIfAny() fun addRepository( repositoryCoordinates: RepositoryCoordinates,
diff --git a/libraries/scripting/dependencies/src/kotlin/script/experimental/dependencies/annotations.kt b/libraries/scripting/dependencies/src/kotlin/script/experimental/dependencies/annotations.kt index 8fc6dd0..9807b38 100644 --- a/libraries/scripting/dependencies/src/kotlin/script/experimental/dependencies/annotations.kt +++ b/libraries/scripting/dependencies/src/kotlin/script/experimental/dependencies/annotations.kt
@@ -37,7 +37,8 @@ annotations: Iterable<ScriptSourceAnnotation<*>> ): ResultWithDiagnostics<List<File>> { val reports = mutableListOf<ScriptDiagnostic>() - annotations.forEach { (annotation, locationWithId) -> + annotations.forEach { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: kotlin/script/experimental/api/ScriptSourceAnnotation, */ + (annotation, locationWithId) -> when (annotation) { is Repository -> { val options = SimpleExternalDependenciesResolverOptionsParser(*annotation.options, locationWithId = locationWithId) @@ -61,7 +62,8 @@ } return reports + annotations.filterByAnnotationType<DependsOn>() - .flatMapSuccess { (annotation, locationWithId) -> + .flatMapSuccess { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: kotlin/script/experimental/api/ScriptSourceAnnotation, */ + (annotation, locationWithId) -> SimpleExternalDependenciesResolverOptionsParser( *annotation.options, locationWithId = locationWithId
diff --git a/libraries/scripting/jvm/src/kotlin/script/experimental/jvm/compat/diagnosticsUtil.kt b/libraries/scripting/jvm/src/kotlin/script/experimental/jvm/compat/diagnosticsUtil.kt index 941d4df..f65d451 100644 --- a/libraries/scripting/jvm/src/kotlin/script/experimental/jvm/compat/diagnosticsUtil.kt +++ b/libraries/scripting/jvm/src/kotlin/script/experimental/jvm/compat/diagnosticsUtil.kt
@@ -50,13 +50,15 @@ fun mapToLegacyScriptReportPosition(pos: SourceCode.Location?): ScriptReport.Position? = pos?.let { ScriptReport.Position(pos.start.line, pos.start.col, pos.end?.line, pos.end?.col) } -fun Iterable<ScriptReport>.mapToDiagnostics(): List<ScriptDiagnostic> = map { (message, severity, position) -> +fun Iterable<ScriptReport>.mapToDiagnostics(): List<ScriptDiagnostic> = map { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: kotlin/script/experimental/dependencies/ScriptReport, */ + (message, severity, position) -> ScriptDiagnostic( ScriptDiagnostic.unspecifiedError, message, mapLegacyDiagnosticSeverity(severity), null, mapLegacyScriptPosition(position) ) } -fun Iterable<ScriptDiagnostic>.mapToLegacyReports(): List<ScriptReport> = map { (_, message, severity, _, location, exception) -> +fun Iterable<ScriptDiagnostic>.mapToLegacyReports(): List<ScriptReport> = map { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 6, destructured variable amount without '_': 4, classId: kotlin/script/experimental/api/ScriptDiagnostic, */ + (_, message, severity, _, location, exception) -> val reportMessage = if (exception == null) message else "$message ($exception)" ScriptReport(reportMessage, mapToLegacyScriptReportSeverity(severity), mapToLegacyScriptReportPosition(location)) }
diff --git a/libraries/stdlib/jvm/src/kotlin/reflect/TypesJVM.kt b/libraries/stdlib/jvm/src/kotlin/reflect/TypesJVM.kt index a025745..03580ae 100644 --- a/libraries/stdlib/jvm/src/kotlin/reflect/TypesJVM.kt +++ b/libraries/stdlib/jvm/src/kotlin/reflect/TypesJVM.kt
@@ -45,6 +45,7 @@ if (jClass.isArray) { if (jClass.componentType.isPrimitive) return jClass + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: kotlin/reflect/KTypeProjection, */ val (variance, elementType) = arguments.singleOrNull() ?: throw IllegalArgumentException("kotlin.Array must have exactly one type argument: $this") return when (variance) {
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/compilerRunner/GradleKotlinCompilerWork.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/compilerRunner/GradleKotlinCompilerWork.kt index f1dd4b8..78bb142 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/compilerRunner/GradleKotlinCompilerWork.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/compilerRunner/GradleKotlinCompilerWork.kt
@@ -213,6 +213,7 @@ ) } ?: throw RuntimeException(COULD_NOT_CONNECT_TO_DAEMON_MESSAGE) // TODO: Add root cause + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/daemon/client/CompileServiceSession, */ val (daemon, sessionId) = connection if (log.isDebugEnabled) {
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/android/internal/AndroidSubplugin.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/android/internal/AndroidSubplugin.kt index a5cb1e4..25df569 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/android/internal/AndroidSubplugin.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/android/internal/AndroidSubplugin.kt
@@ -202,7 +202,8 @@ addSourceSetAsVariant("main") - getVariantComponentNames(variantData)?.let { (variantName, flavorName, buildTypeName) -> + getVariantComponentNames(variantData)?.let { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/gradle/internal/AndroidSubplugin.VariantComponentNames, */ + (variantName, flavorName, buildTypeName) -> addSourceSetAsVariant(buildTypeName) if (flavorName.isNotEmpty()) {
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/internal/CInteropCommonizerTask.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/internal/CInteropCommonizerTask.kt index 3887bba..1eb5719 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/internal/CInteropCommonizerTask.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/internal/CInteropCommonizerTask.kt
@@ -222,7 +222,8 @@ private fun getCInteropCommonizerGroupDependencies(group: CInteropCommonizerGroup): Set<CommonizerDependency> { val dependencies = groupedCommonizerDependencies.getOrThrow()[group] - ?.flatMap { (target, dependencies) -> + ?.flatMap { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/gradle/targets/native/internal/CInteropCommonizerTask.CInteropCommonizerDependencies, */ + (target, dependencies) -> dependencies.files .filter { file -> file.exists() && (file.isDirectory || file.extension == "klib") } .map { file -> TargetedCommonizerDependency(target, file) }
diff --git a/libraries/tools/kotlin-gradle-plugin/src/functionalTest/kotlin/org/jetbrains/kotlin/gradle/util/assertions.kt b/libraries/tools/kotlin-gradle-plugin/src/functionalTest/kotlin/org/jetbrains/kotlin/gradle/util/assertions.kt index d349751..04f83d1 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/functionalTest/kotlin/org/jetbrains/kotlin/gradle/util/assertions.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/functionalTest/kotlin/org/jetbrains/kotlin/gradle/util/assertions.kt
@@ -39,6 +39,7 @@ val queue = ArrayDeque(taskDependencies.getDependencies(this).map { TaskAndDependants(it, listOf(this)) }) while (queue.isNotEmpty()) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: <local>/TaskAndDependants, */ val (task, dependants) = queue.removeFirst() if (task in visited) { val dependencyChain = dependants.joinToString(" -> ") { it.name }
diff --git a/libraries/tools/kotlin-stdlib-gen/src/generators/GenerateStandardLib.kt b/libraries/tools/kotlin-stdlib-gen/src/generators/GenerateStandardLib.kt index 5050c16..031ddad 100644 --- a/libraries/tools/kotlin-stdlib-gen/src/generators/GenerateStandardLib.kt +++ b/libraries/tools/kotlin-stdlib-gen/src/generators/GenerateStandardLib.kt
@@ -54,7 +54,8 @@ } } - templateGroups.groupByFileAndWrite(targetsToGenerate = targetBaseDirs.keys) { (target, source) -> + templateGroups.groupByFileAndWrite(targetsToGenerate = targetBaseDirs.keys) { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: templates/TargetedSourceFile, */ + (target, source) -> val targetDir = targetBaseDirs[target] ?: error("Target $target directory is not configured") val platformSuffix = when (val platform = target.platform) { Platform.Common -> ""
diff --git a/libraries/tools/kotlin-stdlib-gen/src/templates/dsl/MemberBuilder.kt b/libraries/tools/kotlin-stdlib-gen/src/templates/dsl/MemberBuilder.kt index 9b8de39..dbf449e 100644 --- a/libraries/tools/kotlin-stdlib-gen/src/templates/dsl/MemberBuilder.kt +++ b/libraries/tools/kotlin-stdlib-gen/src/templates/dsl/MemberBuilder.kt
@@ -318,7 +318,8 @@ } if (throwsExceptions.any()) { builder.append(" * \n") - throwsExceptions.forEach { (type, reason) -> builder.append(" * @throws $type $reason\n") } + throwsExceptions.forEach { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: templates/ThrowsException, */ + (type, reason) -> builder.append(" * @throws $type $reason\n") } } if (samples.any()) { builder.append(" * \n")
diff --git a/libraries/tools/kotlin-stdlib-gen/src/templates/dsl/Writers.kt b/libraries/tools/kotlin-stdlib-gen/src/templates/dsl/Writers.kt index af266af..40c3137 100644 --- a/libraries/tools/kotlin-stdlib-gen/src/templates/dsl/Writers.kt +++ b/libraries/tools/kotlin-stdlib-gen/src/templates/dsl/Writers.kt
@@ -74,6 +74,7 @@ } fun List<MemberBuilder>.writeTo(file: File, targetedSource: TargetedSourceFile) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: templates/TargetedSourceFile, */ val (target, sourceFile) = targetedSource println("Generating file: $file") file.parentFile.mkdirs()
diff --git a/libraries/tools/kotlinp/klib/src/org/jetbrains/kotlin/kotlinp/klib/DeclarationIdOverMetadata.kt b/libraries/tools/kotlinp/klib/src/org/jetbrains/kotlin/kotlinp/klib/DeclarationIdOverMetadata.kt index 95c5e49..ec5e235 100644 --- a/libraries/tools/kotlinp/klib/src/org/jetbrains/kotlin/kotlinp/klib/DeclarationIdOverMetadata.kt +++ b/libraries/tools/kotlinp/klib/src/org/jetbrains/kotlin/kotlinp/klib/DeclarationIdOverMetadata.kt
@@ -25,6 +25,7 @@ if (this == KmTypeProjection.STAR) { TypeArgumentId.Star } else { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: kotlin/metadata/KmTypeProjection, */ val (variance, type) = this check(variance != null && type != null) { "Variance and type should not be null" } TypeArgumentId.Regular(type.typeId(), variance.varianceId())
diff --git a/libraries/tools/kotlinp/src/org/jetbrains/kotlin/kotlinp/Kotlinp.kt b/libraries/tools/kotlinp/src/org/jetbrains/kotlin/kotlinp/Kotlinp.kt index 4d2a647..acc602e 100644 --- a/libraries/tools/kotlinp/src/org/jetbrains/kotlin/kotlinp/Kotlinp.kt +++ b/libraries/tools/kotlinp/src/org/jetbrains/kotlin/kotlinp/Kotlinp.kt
@@ -403,6 +403,7 @@ if (argument == KmTypeProjection.STAR) { append("*") } else { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: kotlin/metadata/KmTypeProjection, */ val (variance, argumentType) = argument if (variance == null || argumentType == null) throw IllegalArgumentException("Variance and type must be set for non-star type projection")
diff --git a/native/commonizer-api/src/org/jetbrains/kotlin/commonizer/CliCommonizer.kt b/native/commonizer-api/src/org/jetbrains/kotlin/commonizer/CliCommonizer.kt index 6f9413f..0ed4256 100644 --- a/native/commonizer-api/src/org/jetbrains/kotlin/commonizer/CliCommonizer.kt +++ b/native/commonizer-api/src/org/jetbrains/kotlin/commonizer/CliCommonizer.kt
@@ -42,7 +42,8 @@ add("-$DEPENDENCY_LIBRARIES_ALIAS"); add(dependencyLibraries.joinToString(";")) } add("-$LOG_LEVEL_ALIAS"); add(logLevel.name.lowercase()) - for ((settingKey, settingValue) in additionalSettings) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/commonizer/AdditionalCommonizerSetting, */ + (settingKey, settingValue) in additionalSettings) { add("-${settingKey.alias}"); add(settingValue.toString()) } } @@ -62,7 +63,8 @@ add("-$OUTPUT_PATH_ALIAS"); add(outputDirectory.absolutePath) add("-$OUTPUT_COMMONIZER_TARGETS_ALIAS"); add(outputTargets.joinToString(";") { it.identityString }) add("-$LOG_LEVEL_ALIAS"); add(logLevel.name.lowercase()) - for ((settingKey, settingValue) in additionalSettings) { + for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/commonizer/AdditionalCommonizerSetting, */ + (settingKey, settingValue) in additionalSettings) { add("-${settingKey.alias}"); add(settingValue.toString()) } }
diff --git a/native/commonizer/src/org/jetbrains/kotlin/commonizer/CommonizerSettings.kt b/native/commonizer/src/org/jetbrains/kotlin/commonizer/CommonizerSettings.kt index d117fb2..8bcb3cc 100644 --- a/native/commonizer/src/org/jetbrains/kotlin/commonizer/CommonizerSettings.kt +++ b/native/commonizer/src/org/jetbrains/kotlin/commonizer/CommonizerSettings.kt
@@ -14,7 +14,8 @@ internal class MapBasedCommonizerSettings private constructor( private val settings: Map<CommonizerSettings.Key<*>, Any> ) : CommonizerSettings { - constructor(vararg settings: Setting<*>) : this(settings.associate { (k, v) -> k to v }) + constructor(vararg settings: Setting<*>) : this(settings.associate { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/commonizer/MapBasedCommonizerSettings.Setting, */ + (k, v) -> k to v }) override fun <T : Any> getSetting(key: CommonizerSettings.Key<T>): T { @Suppress("UNCHECKED_CAST")
diff --git a/native/commonizer/src/org/jetbrains/kotlin/commonizer/mergedtree/CirProvidedClassifiersByModules.kt b/native/commonizer/src/org/jetbrains/kotlin/commonizer/mergedtree/CirProvidedClassifiersByModules.kt index ef11290..3f9cd6b 100644 --- a/native/commonizer/src/org/jetbrains/kotlin/commonizer/mergedtree/CirProvidedClassifiersByModules.kt +++ b/native/commonizer/src/org/jetbrains/kotlin/commonizer/mergedtree/CirProvidedClassifiersByModules.kt
@@ -175,6 +175,7 @@ typeParameterIndexOffset: Int, consumer: (CirEntityId, CirProvided.Classifier) -> Unit ) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/commonizer/mergedtree/ClassProtosToRead.ClassEntry, */ val (classId, classProto) = classEntry val typeParameterNameToIndex = HashMap<Int, Int>()
diff --git a/native/executors/src/main/kotlin/org/jetbrains/kotlin/native/executors/HostExecutor.kt b/native/executors/src/main/kotlin/org/jetbrains/kotlin/native/executors/HostExecutor.kt index 6f32ca3..9fe1174 100644 --- a/native/executors/src/main/kotlin/org/jetbrains/kotlin/native/executors/HostExecutor.kt +++ b/native/executors/src/main/kotlin/org/jetbrains/kotlin/native/executors/HostExecutor.kt
@@ -170,6 +170,7 @@ environment().putAll(request.environment) }.scoped { process -> val streams = ProcessStreams(this, process, request.stdin, request.stdout, request.stderr) + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: kotlin/time/TimedValue, */ val (isTimeout, duration) = measureTimedValue { !process.waitFor(request.timeout) }
diff --git a/native/frontend/src/org/jetbrains/kotlin/resolve/konan/diagnostics/NativeObjCRefinementAnnotationChecker.kt b/native/frontend/src/org/jetbrains/kotlin/resolve/konan/diagnostics/NativeObjCRefinementAnnotationChecker.kt index 6a6e127..2fd5575 100644 --- a/native/frontend/src/org/jetbrains/kotlin/resolve/konan/diagnostics/NativeObjCRefinementAnnotationChecker.kt +++ b/native/frontend/src/org/jetbrains/kotlin/resolve/konan/diagnostics/NativeObjCRefinementAnnotationChecker.kt
@@ -46,6 +46,7 @@ override fun check(declaration: KtDeclaration, descriptor: DeclarationDescriptor, context: DeclarationCheckerContext) { if (descriptor !is ClassDescriptor || descriptor.kind != ClassKind.ANNOTATION_CLASS) return + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/resolve/konan/diagnostics/ObjCExportMetaAnnotations, */ val (objCAnnotation, swiftAnnotation) = descriptor.findObjCExportMetaAnnotations() ?: return if (objCAnnotation == null && swiftAnnotation == null) return if (objCAnnotation != null && swiftAnnotation != null) {
diff --git a/native/swift/swift-export-standalone/src/org/jetbrains/kotlin/swiftexport/standalone/builders/buildSwiftModule.kt b/native/swift/swift-export-standalone/src/org/jetbrains/kotlin/swiftexport/standalone/builders/buildSwiftModule.kt index 3d1a260..16d5aac 100644 --- a/native/swift/swift-export-standalone/src/org/jetbrains/kotlin/swiftexport/standalone/builders/buildSwiftModule.kt +++ b/native/swift/swift-export-standalone/src/org/jetbrains/kotlin/swiftexport/standalone/builders/buildSwiftModule.kt
@@ -43,6 +43,7 @@ config: SwiftExportConfig, unsupportedDeclarationReporter: UnsupportedDeclarationReporter, ): SwiftModuleBuildResults { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/swiftexport/standalone/builders/ModuleWithScopeProvider, */ val (useSiteModule, mainModule, scopeProvider) = createModuleWithScopeProviderFromBinary(config.distribution, input, dependencies) val moduleProvider = when (config.multipleModulesHandlingStrategy) {
diff --git a/plugins/parcelize/parcelize-compiler/parcelize.backend/src/org/jetbrains/kotlin/parcelize/IrParcelSerializers.kt b/plugins/parcelize/parcelize-compiler/parcelize.backend/src/org/jetbrains/kotlin/parcelize/IrParcelSerializers.kt index 795066d..74cc57e 100644 --- a/plugins/parcelize/parcelize-compiler/parcelize.backend/src/org/jetbrains/kotlin/parcelize/IrParcelSerializers.kt +++ b/plugins/parcelize/parcelize-compiler/parcelize.backend/src/org/jetbrains/kotlin/parcelize/IrParcelSerializers.kt
@@ -500,6 +500,7 @@ override fun AndroidIrBuilder.readParcel(parcel: IrValueDeclaration): IrExpression { return irBlock { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/parcelize/IrListParcelSerializer.ListSymbols, */ val (constructorSymbol, addSymbol) = listSymbols(androidSymbols) val sizeTemporary = irTemporary(parcelReadInt(irGet(parcel))) val list = irTemporary(irCall(constructorSymbol).apply { @@ -610,6 +611,7 @@ override fun AndroidIrBuilder.readParcel(parcel: IrValueDeclaration): IrExpression { return irBlock { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/parcelize/IrMapParcelSerializer.MapSymbols, */ val (constructorSymbol, putSymbol) = mapSymbols(androidSymbols) val sizeTemporary = irTemporary(parcelReadInt(irGet(parcel))) val map = irTemporary(irCall(constructorSymbol).apply {
diff --git a/plugins/parcelize/parcelize-compiler/parcelize.k1/src/org/jetbrains/kotlin/parcelize/ParcelizeDeclarationChecker.kt b/plugins/parcelize/parcelize-compiler/parcelize.k1/src/org/jetbrains/kotlin/parcelize/ParcelizeDeclarationChecker.kt index abe0e25..3a2ff1b 100644 --- a/plugins/parcelize/parcelize-compiler/parcelize.k1/src/org/jetbrains/kotlin/parcelize/ParcelizeDeclarationChecker.kt +++ b/plugins/parcelize/parcelize-compiler/parcelize.k1/src/org/jetbrains/kotlin/parcelize/ParcelizeDeclarationChecker.kt
@@ -244,7 +244,8 @@ val type = descriptor.type if (!type.isError) { val customParcelerTypes = - (getTypeParcelers(descriptor.annotations) + getTypeParcelers(containerClass.annotations)).map { (mappedType, _) -> + (getTypeParcelers(descriptor.annotations) + getTypeParcelers(containerClass.annotations)).map { /** STATISTICS ON DESTRUCTURING - type: Lambdas, destructured variable total amount: 2, destructured variable amount without '_': 1, classId: org/jetbrains/kotlin/parcelize/serializers/TypeParcelerMapping, */ + (mappedType, _) -> mappedType }.toSet()
diff --git a/plugins/scripting/scripting-compiler-impl/src/org/jetbrains/kotlin/scripting/definitions/ScriptiDefinitionsFromClasspathDiscoverySource.kt b/plugins/scripting/scripting-compiler-impl/src/org/jetbrains/kotlin/scripting/definitions/ScriptiDefinitionsFromClasspathDiscoverySource.kt index 92e8d81..973c28c 100644 --- a/plugins/scripting/scripting-compiler-impl/src/org/jetbrains/kotlin/scripting/definitions/ScriptiDefinitionsFromClasspathDiscoverySource.kt +++ b/plugins/scripting/scripting-compiler-impl/src/org/jetbrains/kotlin/scripting/definitions/ScriptiDefinitionsFromClasspathDiscoverySource.kt
@@ -90,6 +90,7 @@ SCRIPT_DEFINITION_MARKERS_EXTENSION_WITH_DOT ) }.toList() + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/scripting/definitions/DefinitionsLoadPartitionResult, */ val (loadedDefinitions, notFoundClasses) = definitionNames.partitionLoadJarDefinitions( jar, @@ -113,6 +114,7 @@ defferedDirDependencies.add(dep) // there is no way to know that the dependency is fully "used" so we add it to the list anyway val discoveryMarkers = File(dep, SCRIPT_DEFINITION_MARKERS_PATH).listFiles() if (discoveryMarkers?.isEmpty() == false) { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/scripting/definitions/DefinitionsLoadPartitionResult, */ val (foundDefinitionClasses, notFoundDefinitions) = discoveryMarkers.map { it.name.removeSuffix( SCRIPT_DEFINITION_MARKERS_EXTENSION_WITH_DOT @@ -139,6 +141,7 @@ for (dep in defferedDirDependencies) { if (remainingDefinitionCandidates.isEmpty()) break try { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/scripting/definitions/DefinitionsLoadPartitionResult, */ val (foundDefinitionClasses, notFoundDefinitions) = remainingDefinitionCandidates.partitionLoadDirDefinitions(dep, classpathWithLoader, hostConfiguration, messageReporter) foundDefinitionClasses.forEach { @@ -191,6 +194,7 @@ if (remainingTemplates.isEmpty()) break try { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 2, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/scripting/definitions/DefinitionsLoadPartitionResult, */ val (loadedDefinitions, notFoundTemplates) = when { dep.isFile && dep.extension == "jar" -> { // checking for extension is the compiler current behaviour, so the same logic is implemented here JarFile(dep).use { jar ->
diff --git a/plugins/scripting/scripting-compiler/src/org/jetbrains/kotlin/scripting/compiler/plugin/extensions/ScriptingCollectAdditionalSourcesExtension.kt b/plugins/scripting/scripting-compiler/src/org/jetbrains/kotlin/scripting/compiler/plugin/extensions/ScriptingCollectAdditionalSourcesExtension.kt index bc02e37..af00293 100644 --- a/plugins/scripting/scripting-compiler/src/org/jetbrains/kotlin/scripting/compiler/plugin/extensions/ScriptingCollectAdditionalSourcesExtension.kt +++ b/plugins/scripting/scripting-compiler/src/org/jetbrains/kotlin/scripting/compiler/plugin/extensions/ScriptingCollectAdditionalSourcesExtension.kt
@@ -19,6 +19,7 @@ configuration: CompilerConfiguration, project: Project ): Collection<KtFile> { + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/scripting/compiler/plugin/dependencies/ScriptsCompilationDependencies, */ val (newSourcesClasspath, newSources, _) = collectScriptsCompilationDependencies( configuration, project,
diff --git a/plugins/scripting/scripting-compiler/src/org/jetbrains/kotlin/scripting/compiler/plugin/impl/KJvmReplCompilerBase.kt b/plugins/scripting/scripting-compiler/src/org/jetbrains/kotlin/scripting/compiler/plugin/impl/KJvmReplCompilerBase.kt index 25f55d7..f70af63 100644 --- a/plugins/scripting/scripting-compiler/src/org/jetbrains/kotlin/scripting/compiler/plugin/impl/KJvmReplCompilerBase.kt +++ b/plugins/scripting/scripting-compiler/src/org/jetbrains/kotlin/scripting/compiler/plugin/impl/KJvmReplCompilerBase.kt
@@ -75,6 +75,7 @@ updateResolutionFilterWithHistory(configuration) + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/scripting/compiler/plugin/impl/KJvmReplCompilerBase.AnalyzePreparationResult, */ val (context, errorHolder, snippetKtFile) = prepareForAnalyze( snippet, messageCollector,
diff --git a/plugins/scripting/scripting-compiler/src/org/jetbrains/kotlin/scripting/compiler/plugin/impl/compilationContext.kt b/plugins/scripting/scripting-compiler/src/org/jetbrains/kotlin/scripting/compiler/plugin/impl/compilationContext.kt index 10c9059..36145a2 100644 --- a/plugins/scripting/scripting-compiler/src/org/jetbrains/kotlin/scripting/compiler/plugin/impl/compilationContext.kt +++ b/plugins/scripting/scripting-compiler/src/org/jetbrains/kotlin/scripting/compiler/plugin/impl/compilationContext.kt
@@ -327,6 +327,7 @@ messageCollector: ScriptDiagnosticsMessageCollector ): Pair<List<KtFile>, List<ScriptsCompilationDependencies.SourceDependencies>> { val sourceFiles = arrayListOf(mainKtFile) + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: org/jetbrains/kotlin/scripting/compiler/plugin/dependencies/ScriptsCompilationDependencies, */ val (classpath, newSources, sourceDependencies) = collectScriptsCompilationDependencies( context.environment.configuration,
diff --git a/plugins/scripting/scripting-ide-services/src/org/jetbrains/kotlin/scripting/ide_services/compiler/KJvmReplCompilerWithIdeServices.kt b/plugins/scripting/scripting-ide-services/src/org/jetbrains/kotlin/scripting/ide_services/compiler/KJvmReplCompilerWithIdeServices.kt index f9a4723..cc00c11 100644 --- a/plugins/scripting/scripting-ide-services/src/org/jetbrains/kotlin/scripting/ide_services/compiler/KJvmReplCompilerWithIdeServices.kt +++ b/plugins/scripting/scripting-ide-services/src/org/jetbrains/kotlin/scripting/ide_services/compiler/KJvmReplCompilerWithIdeServices.kt
@@ -119,6 +119,7 @@ updateResolutionFilterWithHistory(configuration) + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 3, destructured variable amount without '_': 2, classId: org/jetbrains/kotlin/scripting/compiler/plugin/impl/KJvmReplCompilerBase.AnalyzePreparationResult, */ val (_, errorHolder, snippetKtFile) = prepareForAnalyze( newSnippet, messageCollector, @@ -131,6 +132,7 @@ analyzerEngine.statelessAnalyzeWithImportedScripts(snippetKtFile, emptyList(), state.getNextLineNo() + 1) AnalyzerWithCompilerReport.reportDiagnostics(analysisResult.diagnostics, errorHolder, renderDiagnosticName = false) + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 5, destructured variable amount without '_': 4, classId: org/jetbrains/kotlin/scripting/ide_services/compiler/impl/IdeLikeReplCodeAnalyzer.ReplLineAnalysisResultWithStateless.Stateless, */ val (_, bindingContext, resolutionFacade, moduleDescriptor, resultProperty) = when (analysisResult) { is IdeLikeReplCodeAnalyzer.ReplLineAnalysisResultWithStateless.Stateless -> { analysisResult
diff --git a/plugins/scripting/scripting-ide-services/src/org/jetbrains/kotlin/scripting/ide_services/compiler/impl/KJvmReplCompleter.kt b/plugins/scripting/scripting-ide-services/src/org/jetbrains/kotlin/scripting/ide_services/compiler/impl/KJvmReplCompleter.kt index ebf2919..1355744 100644 --- a/plugins/scripting/scripting-ide-services/src/org/jetbrains/kotlin/scripting/ide_services/compiler/impl/KJvmReplCompleter.kt +++ b/plugins/scripting/scripting-ide-services/src/org/jetbrains/kotlin/scripting/ide_services/compiler/impl/KJvmReplCompleter.kt
@@ -275,6 +275,7 @@ } .forEach { resultTriple -> val descriptor = resultTriple.first + /** STATISTICS ON DESTRUCTURING - type: Common, destructured variable total amount: 4, destructured variable amount without '_': 4, classId: org/jetbrains/kotlin/scripting/ide_services/compiler/impl/KJvmReplCompleter.Companion.DescriptorPresentation, */ val (rawName, presentableText, tailText, completionText) = resultTriple.second if (options.nameFilter(rawName, prefix)) { val fullName: String =
diff --git a/repo/gradle-build-conventions/buildsrc-compat/src/main/kotlin/modularized-test-configurations.gradle.kts b/repo/gradle-build-conventions/buildsrc-compat/src/main/kotlin/modularized-test-configurations.gradle.kts index 447d93c..8823748 100644 --- a/repo/gradle-build-conventions/buildsrc-compat/src/main/kotlin/modularized-test-configurations.gradle.kts +++ b/repo/gradle-build-conventions/buildsrc-compat/src/main/kotlin/modularized-test-configurations.gradle.kts
@@ -145,7 +145,8 @@ val generateMT = kotlinBuildProperties.generateModularizedConfigurations val generateFP = kotlinBuildProperties.generateFullPipelineConfigurations -for ((path, projectName, additionalParameters) in testDataPathList) { +for (/** STATISTICS ON DESTRUCTURING - type: For, destructured variable total amount: 3, destructured variable amount without '_': 3, classId: /Configuration, */ +(path, projectName, additionalParameters) in testDataPathList) { rootProject.afterEvaluate { val configurations = mutableListOf<Pair<String, String?>>( "Full $projectName" to null