From b55fda0c554152dc8dacbc9c83bc80e1c4fd1d0e Mon Sep 17 00:00:00 2001 From: Brian Norman Date: Tue, 25 Jul 2023 10:23:22 -0500 Subject: [PATCH] [FIR] Create CFG for files to track top-level property initialization In order to properly analyze top-level property initialization, a control-flow graph must be created for FirFiles. This change adds the foundation for the file CFG and updates body resolve to create the CFG. Checking the CFG for proper initialization is separated into a following change to ease code review. KT-56683 --- .../api/fir/api/targets/LLFirResolveTarget.kt | 2 +- .../fir/file/structure/FileElementFactory.kt | 2 +- .../api/fir/file/structure/FileStructure.kt | 2 + .../fir/transformers/LLFirBodyLazyResolver.kt | 46 +- .../level/api/fir/util/declarationUtils.kt | 3 + .../fileStructure/topLevelProperty.kt | 2 +- .../testdata/fileStructure/withoutName.kt | 2 +- .../inBlockModification/entireInitializer.txt | 8 +- .../topLevelPropertyWithTypeInDelegate.txt | 19 +- ...lPropertyWithTypeInDelegateWithoutName.txt | 19 +- ...opLevelPropertyWithTypeInErrorDelegate.txt | 12 +- .../topLevelPropertyWithTypeInInititalzer.txt | 8 +- ...opertyWithTypeInInititalzerWithoutName.txt | 8 +- .../testdata/lazyResolve/fileElements.txt | 12 +- .../resolve/cfa/initializationInTry.dot | 249 +- .../resolve/cfg/annotatedLocalClass.dot | 145 +- .../testData/resolve/cfg/binaryOperations.dot | 409 ++-- .../cfg/booleanOperatorsWithConsts.dot | 741 +++--- .../testData/resolve/cfg/complex.dot | 337 +-- .../testData/resolve/cfg/defaultArguments.dot | 123 +- .../testData/resolve/cfg/emptyWhen.dot | 115 +- .../resolve/cfg/flowFromInplaceLambda.dot | 2031 +++++++++-------- .../resolve/cfg/flowFromInplaceLambda2.dot | 1261 +++++----- .../resolve/cfg/flowFromInplaceLambda3.dot | 567 ++--- .../resolve/cfg/flowFromTwoInplaceLambdas.dot | 1155 +++++----- .../testData/resolve/cfg/initBlock.dot | 131 +- .../resolve/cfg/initBlockAndInPlaceLambda.dot | 117 +- .../cfg/innerClassInAnonymousObject.dot | 87 +- .../inplaceLambdaInControlFlowExpressions.dot | 359 +-- .../testData/resolve/cfg/jumps.dot | 545 ++--- .../resolve/cfg/lambdaAsReturnOfLambda.dot | 119 +- .../resolve/cfg/lambdaReturningObject.dot | 147 +- .../testData/resolve/cfg/lambdas.dot | 379 +-- .../resolve/cfg/localClassesWithImplicit.dot | 609 ++--- .../testData/resolve/cfg/loops.dot | 723 +++--- .../testData/resolve/cfg/nestedClass.dot | 147 +- .../cfg/postponedLambdaInConstructor.dot | 161 +- .../resolve/cfg/postponedLambdaInReturn.dot | 585 ++--- .../testData/resolve/cfg/postponedLambdas.dot | 81 +- .../resolve/cfg/propertiesAndInitBlocks.dot | 525 ++--- .../resolve/cfg/returnValuesFromLambda.dot | 303 +-- .../testData/resolve/cfg/safeCalls.dot | 195 +- .../testData/resolve/cfg/simple.dot | 55 +- .../testData/resolve/cfg/tryCatch.dot | 463 ++-- .../cfg/variableInitializedInTryBlock.dot | 185 +- .../testData/resolve/cfg/when.dot | 263 +-- .../testData/resolve/classCallInLambda.dot | 63 +- .../testData/resolve/elvisReturnSimple.dot | 117 +- .../positive/exhaustiveWhenAndDNNType.dot | 361 +-- .../problems/secondaryConstructorCfg.dot | 117 +- .../testData/resolve/smartcasts/bangbang.dot | 591 ++--- .../smartcasts/booleans/booleanOperators.dot | 1375 +++++------ .../smartcasts/booleans/equalsToBoolean.dot | 665 +++--- .../booleans/jumpFromRhsOfOperator.dot | 745 +++--- .../boundSmartcasts/boundSmartcasts.dot | 643 +++--- .../boundSmartcastsInBranches.dot | 1533 ++++++------- .../boundSmartcasts/functionCallBound.dot | 191 +- .../testData/resolve/smartcasts/casts.dot | 505 ++-- .../smartcasts/controlStructures/elvis.dot | 277 +-- .../smartcasts/controlStructures/returns.dot | 587 ++--- .../smartcasts/controlStructures/simpleIf.dot | 237 +- .../smartcastFromArgument.dot | 135 +- .../smartcasts/controlStructures/when.dot | 823 +++---- .../whenSubjectExpression.dot | 207 +- .../resolve/smartcasts/equalsAndIdentity.dot | 443 ++-- .../incorrectSmartcastToNothing.dot | 183 +- .../smartcasts/lambdas/inPlaceLambdas.dot | 307 +-- .../smartcasts/lambdas/lambdaInWhenBranch.dot | 377 +-- .../smartcasts/lambdas/smartcastOnLambda.dot | 63 +- .../loops/dataFlowInfoFromWhileCondition.dot | 129 +- .../resolve/smartcasts/loops/endlessLoops.dot | 835 +++---- .../resolve/smartcasts/multipleCasts.dot | 219 +- .../resolve/smartcasts/nullability.dot | 1865 +++++++-------- .../implicitReceiverAsWhenSubject.dot | 235 +- .../receivers/implicitReceivers.dot | 715 +++--- .../receivers/thisOfExtensionProperty.dot | 117 +- .../smartcasts/safeCalls/assignSafeCall.dot | 559 ++--- .../safeCalls/safeCallAndEqualityToBool.dot | 377 +-- .../smartcasts/safeCalls/safeCalls.dot | 443 ++-- .../resolve/smartcasts/smartCastInInit.dot | 115 +- .../smartcasts/smartcastInByClause.dot | 305 +-- .../resolve/smartcasts/smartcastToNothing.dot | 521 ++--- .../smartcasts/stability/overridenOpenVal.dot | 211 +- .../variables/delayedAssignment.dot | 131 +- .../variables/smartcastAfterReassignment.dot | 157 +- .../resolveWithStdlib/complexPostponedCfg.dot | 181 +- .../contracts/fromLibrary/callsInPlace.dot | 643 +++--- .../fromLibrary/conditionalEffects.dot | 345 +-- .../bad/callsInPlace/inAnonymousObject.dot | 127 +- .../bad/callsInPlace/inLocalClass.dot | 139 +- .../bad/callsInPlace/inLocalFunction.dot | 59 +- .../bad/callsInPlace/toLocalVariables.dot | 113 +- .../good/callsInPlace/atLeastOnce.dot | 213 +- .../good/callsInPlace/atMostOnce.dot | 205 +- .../good/callsInPlace/contractsUsage.dot | 189 +- .../good/callsInPlace/exactlyOnce.dot | 209 +- .../fromSource/good/callsInPlace/flow.dot | 351 +-- .../good/callsInPlace/inPlaceLambda.dot | 123 +- .../fromSource/good/callsInPlace/simple.dot | 109 +- .../fromSource/good/callsInPlace/unknown.dot | 209 +- .../delegates/delegateWithAnonymousObject.dot | 329 +-- .../inference/plusAssignWithLambdaInRhs.dot | 211 +- .../smartcasts/tryWithLambdaInside.dot | 245 +- .../ControlFlowAnalysisDiagnosticComponent.kt | 6 + .../fir/resolve/dfa/FirDataFlowAnalyzer.kt | 22 +- .../dfa/cfg/ControlFlowGraphBuilder.kt | 69 +- .../dfa/cfg/ControlFlowGraphNodeBuilder.kt | 6 + ...bstractBodyResolveTransformerDispatcher.kt | 9 +- .../FirDeclarationsResolveTransformer.kt | 39 + ...actContractResolveTransformerDispatcher.kt | 6 + ...irAnnotationArgumentsMappingTransformer.kt | 6 + ...irAnnotationArgumentsResolveTransformer.kt | 6 + .../kotlin/fir/resolve/dfa/cfg/CFGNode.kt | 18 + .../fir/resolve/dfa/cfg/CFGNodeRenderer.kt | 3 + .../fir/resolve/dfa/cfg/ControlFlowGraph.kt | 1 + .../dfa/cfg/ControlFlowGraphVisitor.kt | 10 + .../kotlin/fir/declarations/FirFile.kt | 6 +- .../declarations/builder/FirFileBuilder.kt | 1 + .../fir/declarations/impl/FirFileImpl.kt | 8 + .../kotlin/fir/visitors/FirDefaultVisitor.kt | 2 - .../fir/visitors/FirDefaultVisitorVoid.kt | 2 - .../fir/tree/generator/FirTreeBuilder.kt | 2 +- .../codegen/box/smartCasts/kt44814.dot | 1197 +++++----- .../definiteReturn/singleReturnFromTry.dot | 513 +++-- .../delegatedConstructorArguments.dot | 261 +-- .../castchecks/castInTryWithJump.dot | 1181 +++++----- .../simple.kt | 1 + 127 files changed, 19565 insertions(+), 18746 deletions(-) diff --git a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/api/targets/LLFirResolveTarget.kt b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/api/targets/LLFirResolveTarget.kt index 3f7818ef2ab..035f7f4f503 100644 --- a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/api/targets/LLFirResolveTarget.kt +++ b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/api/targets/LLFirResolveTarget.kt @@ -42,7 +42,7 @@ sealed class LLFirResolveTarget( abstract fun forEachTarget(action: (FirElementWithResolveState) -> Unit) override fun toString(): String = buildString { - append(this::class.simpleName) + append(this@LLFirResolveTarget::class.simpleName) append("(") buildList { add(firFile.name) diff --git a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/file/structure/FileElementFactory.kt b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/file/structure/FileElementFactory.kt index 81b6049d2ca..167a939b072 100644 --- a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/file/structure/FileElementFactory.kt +++ b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/file/structure/FileElementFactory.kt @@ -161,5 +161,5 @@ private fun KtNamedFunction.isReanalyzableContainer(): Boolean = hasBlockBody() private fun KtPropertyAccessor.isReanalyzableContainer(): Boolean = isSetter || hasBlockBody() || property.typeReference != null -private fun KtProperty.isReanalyzableContainer(): Boolean = typeReference != null && (isTopLevel || !hasDelegateExpressionOrInitializer()) +private fun KtProperty.isReanalyzableContainer(): Boolean = typeReference != null && !hasDelegateExpressionOrInitializer() diff --git a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/file/structure/FileStructure.kt b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/file/structure/FileStructure.kt index 8dabae375fa..baff67ec23c 100644 --- a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/file/structure/FileStructure.kt +++ b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/file/structure/FileStructure.kt @@ -115,6 +115,8 @@ internal class FileStructure private constructor( } fun getAllDiagnosticsForFile(diagnosticCheckerFilter: DiagnosticCheckerFilter): Collection { + // TODO, KT-60799: Add a new FileStructure for file diagnostics + firFile.lazyResolveToPhase(FirResolvePhase.BODY_RESOLVE) val structureElements = getAllStructureElements() return buildList { collectDiagnosticsFromStructureElements(structureElements, diagnosticCheckerFilter) diff --git a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/transformers/LLFirBodyLazyResolver.kt b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/transformers/LLFirBodyLazyResolver.kt index e289d34b7e1..861cd784bee 100644 --- a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/transformers/LLFirBodyLazyResolver.kt +++ b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/transformers/LLFirBodyLazyResolver.kt @@ -44,6 +44,7 @@ import org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.FirResolveCont import org.jetbrains.kotlin.fir.resolve.transformers.contracts.FirContractsDslNames import org.jetbrains.kotlin.fir.symbols.lazyResolveToPhase import org.jetbrains.kotlin.fir.resolve.dfa.cfg.isUsedInControlFlowGraphBuilderForClass +import org.jetbrains.kotlin.fir.resolve.dfa.cfg.isUsedInControlFlowGraphBuilderForFile import org.jetbrains.kotlin.fir.symbols.FirBasedSymbol import org.jetbrains.kotlin.fir.types.ConeKotlinType import org.jetbrains.kotlin.psi.KtCodeFragment @@ -114,6 +115,19 @@ private class LLFirBodyTargetResolver( return true } + is FirFile -> { + if (target.resolvePhase >= resolverPhase) return true + + resolveFileAnnotationContainerIfNeeded(target) + + // resolve file CFG graph here, to do this we need to have property blocks resoled + resolveMembersForControlFlowGraph(target) + performCustomResolveUnderLock(target) { + calculateControlFlowGraph(target) + } + + return true + } is FirCodeFragment -> { resolveCodeFragmentContext(target) performCustomResolveUnderLock(target) { @@ -156,6 +170,35 @@ private class LLFirBodyTargetResolver( } } + private fun calculateControlFlowGraph(target: FirFile) { + checkWithAttachment( + target.controlFlowGraphReference == null, + { "'controlFlowGraphReference' should be 'null' if the file phase < $resolverPhase)" }, + ) { + withFirEntry("firFile", target) + } + + val dataFlowAnalyzer = transformer.declarationsTransformer.dataFlowAnalyzer + dataFlowAnalyzer.enterFile(target, buildGraph = true) + val controlFlowGraph = dataFlowAnalyzer.exitFile() + ?: errorWithAttachment("CFG should not be 'null' as 'buildGraph' is specified") { + withFirEntry("firFile", target) + } + + target.replaceControlFlowGraphReference(FirControlFlowGraphReferenceImpl(controlFlowGraph)) + } + + private fun resolveMembersForControlFlowGraph(target: FirFile) { + withFile(target) { + for (member in target.declarations) { + if (member is FirControlFlowGraphOwner && member.isUsedInControlFlowGraphBuilderForFile) { + member.lazyResolveToPhase(resolverPhase.previous) + performResolve(member) + } + } + } + } + private fun resolveCodeFragmentContext(firCodeFragment: FirCodeFragment) { val ktCodeFragment = firCodeFragment.psi as? KtCodeFragment ?: errorWithAttachment("Code fragment source not found") { @@ -191,7 +234,7 @@ private class LLFirBodyTargetResolver( override fun doLazyResolveUnderLock(target: FirElementWithResolveState) { when (target) { - is FirRegularClass, is FirCodeFragment -> error("Should have been resolved in ${::doResolveWithoutLock.name}") + is FirFile, is FirRegularClass, is FirCodeFragment -> error("Should have been resolved in ${::doResolveWithoutLock.name}") is FirConstructor -> resolve(target, BodyStateKeepers.CONSTRUCTOR) is FirFunction -> resolve(target, BodyStateKeepers.FUNCTION) is FirProperty -> resolve(target, BodyStateKeepers.PROPERTY) @@ -202,7 +245,6 @@ private class LLFirBodyTargetResolver( is FirDanglingModifierList, is FirFileAnnotationsContainer, is FirTypeAlias, - is FirFile, -> { // No bodies here } diff --git a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/util/declarationUtils.kt b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/util/declarationUtils.kt index f2537d92d01..c229d667e05 100644 --- a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/util/declarationUtils.kt +++ b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/util/declarationUtils.kt @@ -190,6 +190,9 @@ var KtFile.originalKtFile by UserDataProperty(ORIGINAL_KT_FILE_KEY) private fun KtClassLikeDeclaration.findFir(provider: FirProvider): FirClassLikeDeclaration? { + // TODO, KTIJ-26848: this is a workaround for IDE index inconsistency for unnamed classes + if (name == null) return null + return if (provider is LLFirProvider) { provider.getFirClassifierByDeclaration(this) } else { diff --git a/analysis/low-level-api-fir/testdata/fileStructure/topLevelProperty.kt b/analysis/low-level-api-fir/testdata/fileStructure/topLevelProperty.kt index af301be2b65..b849432b16d 100644 --- a/analysis/low-level-api-fir/testdata/fileStructure/topLevelProperty.kt +++ b/analysis/low-level-api-fir/testdata/fileStructure/topLevelProperty.kt @@ -6,4 +6,4 @@ var x: Int/* ReanalyzablePropertyStructureElement */ val y = 42/* NonReanalyzableNonClassDeclarationStructureElement */ -var z: Int = 15/* ReanalyzablePropertyStructureElement */ +var z: Int = 15/* NonReanalyzableNonClassDeclarationStructureElement */ diff --git a/analysis/low-level-api-fir/testdata/fileStructure/withoutName.kt b/analysis/low-level-api-fir/testdata/fileStructure/withoutName.kt index 9e2d18f5950..d756d78b480 100644 --- a/analysis/low-level-api-fir/testdata/fileStructure/withoutName.kt +++ b/analysis/low-level-api-fir/testdata/fileStructure/withoutName.kt @@ -4,7 +4,7 @@ fun () {/* ReanalyzableFunctionStructureElement */ } -val : Int = 4/* ReanalyzablePropertyStructureElement */ +val : Int = 4/* NonReanalyzableNonClassDeclarationStructureElement */ var : Int/* ReanalyzablePropertyStructureElement */ get() = 4 diff --git a/analysis/low-level-api-fir/testdata/inBlockModification/entireInitializer.txt b/analysis/low-level-api-fir/testdata/inBlockModification/entireInitializer.txt index 4559817b1d1..d6b3a3199da 100644 --- a/analysis/low-level-api-fir/testdata/inBlockModification/entireInitializer.txt +++ b/analysis/low-level-api-fir/testdata/inBlockModification/entireInitializer.txt @@ -1,7 +1 @@ -BEFORE MODIFICATION: -public final [ResolvedTo(BODY_RESOLVE)] val i: R|kotlin/Int| = Int(42) - public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| - -AFTER MODIFICATION: -public final [ResolvedTo(ANNOTATIONS_ARGUMENTS_MAPPING)] val i: R|kotlin/Int| = LAZY_EXPRESSION - public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| +IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS PLACE \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/inBlockModification/topLevelPropertyWithTypeInDelegate.txt b/analysis/low-level-api-fir/testdata/inBlockModification/topLevelPropertyWithTypeInDelegate.txt index d78c9a1ae22..d6b3a3199da 100644 --- a/analysis/low-level-api-fir/testdata/inBlockModification/topLevelPropertyWithTypeInDelegate.txt +++ b/analysis/low-level-api-fir/testdata/inBlockModification/topLevelPropertyWithTypeInDelegate.txt @@ -1,18 +1 @@ -BEFORE MODIFICATION: -public final [ResolvedTo(BODY_RESOLVE)] val x: R|kotlin/Int|by #( = [ResolvedTo(BODY_RESOLVE)] lazy@fun (): R|kotlin/Int| { - local final [ResolvedTo(BODY_RESOLVE)] fun doSmth([ResolvedTo(BODY_RESOLVE)] i: R|kotlin/String|): R|kotlin/Int| { - ^doSmth Int(4) - } - - ^ R|/doSmth|(String(str)) -} -) - public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| { - ^ D|/x|.#(Null(null), ::R|/x|) - } - -AFTER MODIFICATION: -public final [ResolvedTo(ANNOTATIONS_ARGUMENTS_MAPPING)] val x: R|kotlin/Int|by LAZY_EXPRESSION - public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| { - ^ D|/x|.#(Null(null), ::R|/x|) - } +IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS PLACE \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/inBlockModification/topLevelPropertyWithTypeInDelegateWithoutName.txt b/analysis/low-level-api-fir/testdata/inBlockModification/topLevelPropertyWithTypeInDelegateWithoutName.txt index 2011a948564..d6b3a3199da 100644 --- a/analysis/low-level-api-fir/testdata/inBlockModification/topLevelPropertyWithTypeInDelegateWithoutName.txt +++ b/analysis/low-level-api-fir/testdata/inBlockModification/topLevelPropertyWithTypeInDelegateWithoutName.txt @@ -1,18 +1 @@ -BEFORE MODIFICATION: -public final [ResolvedTo(BODY_RESOLVE)] val : R|kotlin/Int|by #( = [ResolvedTo(BODY_RESOLVE)] lazy@fun (): R|kotlin/Int| { - local final [ResolvedTo(BODY_RESOLVE)] fun doSmth([ResolvedTo(BODY_RESOLVE)] i: R|kotlin/String|): R|kotlin/Int| { - ^doSmth Int(4) - } - - ^ R|/doSmth|(String(str)) -} -) - public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| { - ^ D|/|.#(Null(null), ::R|/|) - } - -AFTER MODIFICATION: -public final [ResolvedTo(ANNOTATIONS_ARGUMENTS_MAPPING)] val : R|kotlin/Int|by LAZY_EXPRESSION - public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| { - ^ D|/|.#(Null(null), ::R|/|) - } +IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS PLACE \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/inBlockModification/topLevelPropertyWithTypeInErrorDelegate.txt b/analysis/low-level-api-fir/testdata/inBlockModification/topLevelPropertyWithTypeInErrorDelegate.txt index 4b6bc10af7d..d6b3a3199da 100644 --- a/analysis/low-level-api-fir/testdata/inBlockModification/topLevelPropertyWithTypeInErrorDelegate.txt +++ b/analysis/low-level-api-fir/testdata/inBlockModification/topLevelPropertyWithTypeInErrorDelegate.txt @@ -1,11 +1 @@ -BEFORE MODIFICATION: -public final [ResolvedTo(BODY_RESOLVE)] val x: R|kotlin/Int|by #() - public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| { - ^ D|/x|.#(Null(null), ::R|/x|) - } - -AFTER MODIFICATION: -public final [ResolvedTo(ANNOTATIONS_ARGUMENTS_MAPPING)] val x: R|kotlin/Int|by LAZY_EXPRESSION - public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| { - ^ D|/x|.#(Null(null), ::R|/x|) - } +IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS PLACE \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/inBlockModification/topLevelPropertyWithTypeInInititalzer.txt b/analysis/low-level-api-fir/testdata/inBlockModification/topLevelPropertyWithTypeInInititalzer.txt index 0ad7b259bcd..d6b3a3199da 100644 --- a/analysis/low-level-api-fir/testdata/inBlockModification/topLevelPropertyWithTypeInInititalzer.txt +++ b/analysis/low-level-api-fir/testdata/inBlockModification/topLevelPropertyWithTypeInInititalzer.txt @@ -1,7 +1 @@ -BEFORE MODIFICATION: -public final [ResolvedTo(BODY_RESOLVE)] val x: R|kotlin/Int| = R|/doSmth|(String(str)) - public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| - -AFTER MODIFICATION: -public final [ResolvedTo(ANNOTATIONS_ARGUMENTS_MAPPING)] val x: R|kotlin/Int| = LAZY_EXPRESSION - public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| +IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS PLACE \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/inBlockModification/topLevelPropertyWithTypeInInititalzerWithoutName.txt b/analysis/low-level-api-fir/testdata/inBlockModification/topLevelPropertyWithTypeInInititalzerWithoutName.txt index f44f8ec7cee..d6b3a3199da 100644 --- a/analysis/low-level-api-fir/testdata/inBlockModification/topLevelPropertyWithTypeInInititalzerWithoutName.txt +++ b/analysis/low-level-api-fir/testdata/inBlockModification/topLevelPropertyWithTypeInInititalzerWithoutName.txt @@ -1,7 +1 @@ -BEFORE MODIFICATION: -public final [ResolvedTo(BODY_RESOLVE)] val : R|kotlin/Int| = R|/doSmth|(String(str)) - public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| - -AFTER MODIFICATION: -public final [ResolvedTo(ANNOTATIONS_ARGUMENTS_MAPPING)] val : R|kotlin/Int| = LAZY_EXPRESSION - public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| +IN-BLOCK MODIFICATION IS NOT APPLICABLE FOR THIS PLACE \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/lazyResolve/fileElements.txt b/analysis/low-level-api-fir/testdata/lazyResolve/fileElements.txt index ce95d0a4270..fc7778beb54 100644 --- a/analysis/low-level-api-fir/testdata/lazyResolve/fileElements.txt +++ b/analysis/low-level-api-fir/testdata/lazyResolve/fileElements.txt @@ -480,12 +480,12 @@ FILE: [ResolvedTo(BODY_RESOLVE)] fileElements.kt public [ResolvedTo(STATUS)] [ContainingClassKey=Anno] get(): R|kotlin/Int| } - public? final? [ResolvedTo(RAW_FIR)] val a: = LAZY_EXPRESSION - public? [ResolvedTo(RAW_FIR)] get(): - public? final? [ResolvedTo(RAW_FIR)] val b: = LAZY_EXPRESSION - public? [ResolvedTo(RAW_FIR)] get(): - public? final? [ResolvedTo(RAW_FIR)] val c: = LAZY_EXPRESSION - public? [ResolvedTo(RAW_FIR)] get(): + public final [ResolvedTo(BODY_RESOLVE)] val a: R|kotlin/Int| = Int(1) + public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| + public final [ResolvedTo(BODY_RESOLVE)] val b: R|kotlin/Int| = Int(2).R|kotlin/Int.plus|(R|one/a|) + public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| + public final [ResolvedTo(BODY_RESOLVE)] val c: R|kotlin/Int| = R|one/b|.R|kotlin/Int.plus|(R|one/a|) + public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| public? final? [ResolvedTo(RAW_FIR)] fun test1(): R|kotlin/Unit| { LAZY_BLOCK } @Deprecated[Unresolved](String()) @Anno[Unresolved](IntegerLiteral(2)) public? final? [ResolvedTo(RAW_FIR)] fun test2(): R|kotlin/Unit| { LAZY_BLOCK } public? final? [ResolvedTo(RAW_FIR)] class A : R|kotlin/Any| { diff --git a/compiler/fir/analysis-tests/testData/resolve/cfa/initializationInTry.dot b/compiler/fir/analysis-tests/testData/resolve/cfa/initializationInTry.dot index a510f8a0c5c..171d29aec89 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfa/initializationInTry.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfa/initializationInTry.dot @@ -5,99 +5,104 @@ digraph initializationInTry_kt { subgraph cluster_0 { color=red - 0 [label="Enter function getNullableString" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter block"]; - 2 [label="Const: Null(null)"]; - 3 [label="Jump: ^getNullableString Null(null)"]; - 4 [label="Stub" style="filled" fillcolor=gray]; - 5 [label="Exit block" style="filled" fillcolor=gray]; - } - 6 [label="Exit function getNullableString" style="filled" fillcolor=red]; + 0 [label="Enter file initializationInTry.kt" style="filled" fillcolor=red]; + 1 [label="Exit file initializationInTry.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function getNullableString" style="filled" fillcolor=red]; + subgraph cluster_2 { + color=blue + 3 [label="Enter block"]; + 4 [label="Const: Null(null)"]; + 5 [label="Jump: ^getNullableString Null(null)"]; + 6 [label="Stub" style="filled" fillcolor=gray]; + 7 [label="Exit block" style="filled" fillcolor=gray]; + } + 8 [label="Exit function getNullableString" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; - 3 -> {6}; - 3 -> {4} [style=dotted]; - 4 -> {5} [style=dotted]; + 3 -> {4}; + 4 -> {5}; + 5 -> {8}; 5 -> {6} [style=dotted]; + 6 -> {7} [style=dotted]; + 7 -> {8} [style=dotted]; - subgraph cluster_2 { + subgraph cluster_3 { color=red - 7 [label="Enter function takeNullableString" style="filled" fillcolor=red]; - subgraph cluster_3 { + 9 [label="Enter function takeNullableString" style="filled" fillcolor=red]; + subgraph cluster_4 { color=blue - 8 [label="Enter block"]; - 9 [label="Exit block"]; + 10 [label="Enter block"]; + 11 [label="Exit block"]; } - 10 [label="Exit function takeNullableString" style="filled" fillcolor=red]; + 12 [label="Exit function takeNullableString" style="filled" fillcolor=red]; } - 7 -> {8}; - 8 -> {9}; 9 -> {10}; - - subgraph cluster_4 { - color=red - 11 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_5 { - color=blue - 12 [label="Enter block"]; - 13 [label="Variable declaration: lval x: R|kotlin/String?|"]; - subgraph cluster_6 { - color=blue - 14 [label="Try expression enter"]; - subgraph cluster_7 { - color=blue - 15 [label="Try main block enter"]; - subgraph cluster_8 { - color=blue - 16 [label="Enter block"]; - 17 [label="Function call: R|/getNullableString|()" style="filled" fillcolor=yellow]; - 18 [label="Check not null: R|/getNullableString|()!!" style="filled" fillcolor=yellow]; - 19 [label="Variable declaration: lval y: R|kotlin/String|"]; - 20 [label="Function call: R|/getNullableString|()" style="filled" fillcolor=yellow]; - 21 [label="Assignment: R|/x|"]; - 22 [label="Exit block"]; - } - 23 [label="Try main block exit"]; - } - subgraph cluster_9 { - color=blue - 24 [label="Enter finally"]; - subgraph cluster_10 { - color=blue - 25 [label="Enter block"]; - 26 [label="Access qualifier kotlin/Unit"]; - 27 [label="Exit block"]; - } - 28 [label="Exit finally"]; - } - 29 [label="Try expression exit"]; - } - 30 [label="Access variable R|/x|"]; - 31 [label="Function call: R|/takeNullableString|(...)" style="filled" fillcolor=yellow]; - 32 [label="Exit block"]; - } - 33 [label="Exit function test_1" style="filled" fillcolor=red]; - } + 10 -> {11}; 11 -> {12}; - 12 -> {13}; + + subgraph cluster_5 { + color=red + 13 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_6 { + color=blue + 14 [label="Enter block"]; + 15 [label="Variable declaration: lval x: R|kotlin/String?|"]; + subgraph cluster_7 { + color=blue + 16 [label="Try expression enter"]; + subgraph cluster_8 { + color=blue + 17 [label="Try main block enter"]; + subgraph cluster_9 { + color=blue + 18 [label="Enter block"]; + 19 [label="Function call: R|/getNullableString|()" style="filled" fillcolor=yellow]; + 20 [label="Check not null: R|/getNullableString|()!!" style="filled" fillcolor=yellow]; + 21 [label="Variable declaration: lval y: R|kotlin/String|"]; + 22 [label="Function call: R|/getNullableString|()" style="filled" fillcolor=yellow]; + 23 [label="Assignment: R|/x|"]; + 24 [label="Exit block"]; + } + 25 [label="Try main block exit"]; + } + subgraph cluster_10 { + color=blue + 26 [label="Enter finally"]; + subgraph cluster_11 { + color=blue + 27 [label="Enter block"]; + 28 [label="Access qualifier kotlin/Unit"]; + 29 [label="Exit block"]; + } + 30 [label="Exit finally"]; + } + 31 [label="Try expression exit"]; + } + 32 [label="Access variable R|/x|"]; + 33 [label="Function call: R|/takeNullableString|(...)" style="filled" fillcolor=yellow]; + 34 [label="Exit block"]; + } + 35 [label="Exit function test_1" style="filled" fillcolor=red]; + } 13 -> {14}; 14 -> {15}; - 14 -> {24} [label="onUncaughtException"]; 15 -> {16}; 16 -> {17}; + 16 -> {26} [label="onUncaughtException"]; 17 -> {18}; - 17 -> {24} [label="onUncaughtException"]; 18 -> {19}; - 18 -> {24} [label="onUncaughtException"]; 19 -> {20}; + 19 -> {26} [label="onUncaughtException"]; 20 -> {21}; - 20 -> {24} [label="onUncaughtException"]; + 20 -> {26} [label="onUncaughtException"]; 21 -> {22}; 22 -> {23}; + 22 -> {26} [label="onUncaughtException"]; 23 -> {24}; 24 -> {25}; 25 -> {26}; @@ -108,64 +113,64 @@ digraph initializationInTry_kt { 30 -> {31}; 31 -> {32}; 32 -> {33}; - - subgraph cluster_11 { - color=red - 34 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_12 { - color=blue - 35 [label="Enter block"]; - 36 [label="Variable declaration: lval x: R|kotlin/String?|"]; - subgraph cluster_13 { - color=blue - 37 [label="Try expression enter"]; - subgraph cluster_14 { - color=blue - 38 [label="Try main block enter"]; - subgraph cluster_15 { - color=blue - 39 [label="Enter block"]; - 40 [label="Function call: R|/getNullableString|()" style="filled" fillcolor=yellow]; - 41 [label="Variable declaration: lval y: R|kotlin/String?|"]; - 42 [label="Function call: R|/getNullableString|()" style="filled" fillcolor=yellow]; - 43 [label="Assignment: R|/x|"]; - 44 [label="Exit block"]; - } - 45 [label="Try main block exit"]; - } - subgraph cluster_16 { - color=blue - 46 [label="Enter finally"]; - subgraph cluster_17 { - color=blue - 47 [label="Enter block"]; - 48 [label="Access qualifier kotlin/Unit"]; - 49 [label="Exit block"]; - } - 50 [label="Exit finally"]; - } - 51 [label="Try expression exit"]; - } - 52 [label="Access variable R|/x|"]; - 53 [label="Function call: R|/takeNullableString|(...)" style="filled" fillcolor=yellow]; - 54 [label="Exit block"]; - } - 55 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 33 -> {34}; 34 -> {35}; - 35 -> {36}; + + subgraph cluster_12 { + color=red + 36 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_13 { + color=blue + 37 [label="Enter block"]; + 38 [label="Variable declaration: lval x: R|kotlin/String?|"]; + subgraph cluster_14 { + color=blue + 39 [label="Try expression enter"]; + subgraph cluster_15 { + color=blue + 40 [label="Try main block enter"]; + subgraph cluster_16 { + color=blue + 41 [label="Enter block"]; + 42 [label="Function call: R|/getNullableString|()" style="filled" fillcolor=yellow]; + 43 [label="Variable declaration: lval y: R|kotlin/String?|"]; + 44 [label="Function call: R|/getNullableString|()" style="filled" fillcolor=yellow]; + 45 [label="Assignment: R|/x|"]; + 46 [label="Exit block"]; + } + 47 [label="Try main block exit"]; + } + subgraph cluster_17 { + color=blue + 48 [label="Enter finally"]; + subgraph cluster_18 { + color=blue + 49 [label="Enter block"]; + 50 [label="Access qualifier kotlin/Unit"]; + 51 [label="Exit block"]; + } + 52 [label="Exit finally"]; + } + 53 [label="Try expression exit"]; + } + 54 [label="Access variable R|/x|"]; + 55 [label="Function call: R|/takeNullableString|(...)" style="filled" fillcolor=yellow]; + 56 [label="Exit block"]; + } + 57 [label="Exit function test_2" style="filled" fillcolor=red]; + } 36 -> {37}; 37 -> {38}; - 37 -> {46} [label="onUncaughtException"]; 38 -> {39}; 39 -> {40}; + 39 -> {48} [label="onUncaughtException"]; 40 -> {41}; - 40 -> {46} [label="onUncaughtException"]; 41 -> {42}; 42 -> {43}; - 42 -> {46} [label="onUncaughtException"]; + 42 -> {48} [label="onUncaughtException"]; 43 -> {44}; 44 -> {45}; + 44 -> {48} [label="onUncaughtException"]; 45 -> {46}; 46 -> {47}; 47 -> {48}; @@ -176,5 +181,7 @@ digraph initializationInTry_kt { 52 -> {53}; 53 -> {54}; 54 -> {55}; + 55 -> {56}; + 56 -> {57}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/annotatedLocalClass.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/annotatedLocalClass.dot index b154607e69a..dcc29c5e74c 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/annotatedLocalClass.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/annotatedLocalClass.dot @@ -5,104 +5,111 @@ digraph annotatedLocalClass_kt { subgraph cluster_0 { color=red - 0 [label="Enter class Ann" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter function " style="filled" fillcolor=red]; - 2 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 3 [label="Exit function " style="filled" fillcolor=red]; - } - 4 [label="Exit class Ann" style="filled" fillcolor=red]; + 0 [label="Enter file annotatedLocalClass.kt" style="filled" fillcolor=red]; + 1 [label="Exit file annotatedLocalClass.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; - 0 -> {4} [style=dotted]; - 0 -> {1} [style=dashed]; - 1 -> {2}; - 2 -> {3}; - 3 -> {4} [color=green]; - subgraph cluster_2 { + subgraph cluster_1 { color=red - 5 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_3 { + 2 [label="Enter class Ann" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 6 [label="Enter block"]; - subgraph cluster_4 { + 3 [label="Enter function " style="filled" fillcolor=red]; + 4 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 5 [label="Exit function " style="filled" fillcolor=red]; + } + 6 [label="Exit class Ann" style="filled" fillcolor=red]; + } + 2 -> {3} [color=green]; + 2 -> {6} [style=dotted]; + 2 -> {3} [style=dashed]; + 3 -> {4}; + 4 -> {5}; + 5 -> {6} [color=green]; + + subgraph cluster_3 { + color=red + 7 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_4 { + color=blue + 8 [label="Enter block"]; + subgraph cluster_5 { color=blue - 7 [label="Enter when"]; - subgraph cluster_5 { - color=blue - 8 [label="Enter when branch condition "]; - 9 [label="Access variable R|/b|"]; - 10 [label="Exit when branch condition"]; - } - 11 [label="Synthetic else branch"]; - 12 [label="Enter when branch result"]; + 9 [label="Enter when"]; subgraph cluster_6 { color=blue - 13 [label="Enter block"]; - 14 [label="Jump: ^foo Unit"]; - 15 [label="Stub" style="filled" fillcolor=gray]; - 16 [label="Exit block" style="filled" fillcolor=gray]; + 10 [label="Enter when branch condition "]; + 11 [label="Access variable R|/b|"]; + 12 [label="Exit when branch condition"]; } - 17 [label="Exit when branch result" style="filled" fillcolor=gray]; - 18 [label="Exit when"]; + 13 [label="Synthetic else branch"]; + 14 [label="Enter when branch result"]; + subgraph cluster_7 { + color=blue + 15 [label="Enter block"]; + 16 [label="Jump: ^foo Unit"]; + 17 [label="Stub" style="filled" fillcolor=gray]; + 18 [label="Exit block" style="filled" fillcolor=gray]; + } + 19 [label="Exit when branch result" style="filled" fillcolor=gray]; + 20 [label="Exit when"]; } - 19 [label="Local class declaration"]; - 20 [label="Function call: R|/bar|()" style="filled" fillcolor=yellow]; - 21 [label="Exit block"]; + 21 [label="Local class declaration"]; + 22 [label="Function call: R|/bar|()" style="filled" fillcolor=yellow]; + 23 [label="Exit block"]; } - 22 [label="Exit function foo" style="filled" fillcolor=red]; + 24 [label="Exit function foo" style="filled" fillcolor=red]; } - subgraph cluster_7 { + subgraph cluster_8 { color=blue - 23 [label="Enter class Local" style="filled" fillcolor=red]; - subgraph cluster_8 { + 25 [label="Enter class Local" style="filled" fillcolor=red]; + subgraph cluster_9 { color=blue - 24 [label="Enter function " style="filled" fillcolor=red]; - 25 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 26 [label="Exit function " style="filled" fillcolor=red]; + 26 [label="Enter function " style="filled" fillcolor=red]; + 27 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 28 [label="Exit function " style="filled" fillcolor=red]; } - 27 [label="Exit class Local" style="filled" fillcolor=red]; + 29 [label="Exit class Local" style="filled" fillcolor=red]; } - 5 -> {6}; - 6 -> {7}; 7 -> {8}; 8 -> {9}; 9 -> {10}; - 10 -> {11 12}; - 11 -> {18}; - 12 -> {13}; - 13 -> {14}; - 14 -> {22}; - 14 -> {15} [style=dotted]; - 15 -> {16} [style=dotted]; + 10 -> {11}; + 11 -> {12}; + 12 -> {13 14}; + 13 -> {20}; + 14 -> {15}; + 15 -> {16}; + 16 -> {24}; 16 -> {17} [style=dotted]; 17 -> {18} [style=dotted]; - 18 -> {19}; - 19 -> {20 23}; - 19 -> {23} [style=dashed]; + 18 -> {19} [style=dotted]; + 19 -> {20} [style=dotted]; 20 -> {21}; - 21 -> {22}; + 21 -> {22 25}; + 21 -> {25} [style=dashed]; + 22 -> {23}; 23 -> {24}; - 23 -> {27} [style=dotted]; - 23 -> {24} [style=dashed]; - 24 -> {25}; 25 -> {26}; - 26 -> {27} [color=green]; + 25 -> {29} [style=dotted]; + 25 -> {26} [style=dashed]; + 26 -> {27}; + 27 -> {28}; + 28 -> {29} [color=green]; - subgraph cluster_9 { + subgraph cluster_10 { color=red - 28 [label="Enter function bar" style="filled" fillcolor=red]; - subgraph cluster_10 { + 30 [label="Enter function bar" style="filled" fillcolor=red]; + subgraph cluster_11 { color=blue - 29 [label="Enter block"]; - 30 [label="Exit block"]; + 31 [label="Enter block"]; + 32 [label="Exit block"]; } - 31 [label="Exit function bar" style="filled" fillcolor=red]; + 33 [label="Exit function bar" style="filled" fillcolor=red]; } - 28 -> {29}; - 29 -> {30}; 30 -> {31}; + 31 -> {32}; + 32 -> {33}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/binaryOperations.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/binaryOperations.dot index cad511ef9a1..10d3a5f98ac 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/binaryOperations.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/binaryOperations.dot @@ -5,260 +5,267 @@ digraph binaryOperations_kt { subgraph cluster_0 { color=red - 0 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter block"]; - subgraph cluster_2 { - color=blue - 2 [label="Enter when"]; - subgraph cluster_3 { - color=blue - 3 [label="Enter when branch condition "]; - subgraph cluster_4 { - color=blue - 4 [label="Enter ||"]; - 5 [label="Access variable R|/b1|"]; - 6 [label="Exit left part of ||"]; - 7 [label="Enter right part of ||"]; - 8 [label="Access variable R|/b2|"]; - 9 [label="Exit ||"]; - } - 10 [label="Exit when branch condition"]; - } - 11 [label="Synthetic else branch"]; - 12 [label="Enter when branch result"]; - subgraph cluster_5 { - color=blue - 13 [label="Enter block"]; - 14 [label="Const: Int(1)"]; - 15 [label="Exit block"]; - } - 16 [label="Exit when branch result"]; - 17 [label="Exit when"]; - } - 18 [label="Exit block"]; - } - 19 [label="Exit function test_1" style="filled" fillcolor=red]; + 0 [label="Enter file binaryOperations.kt" style="filled" fillcolor=red]; + 1 [label="Exit file binaryOperations.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_2 { + color=blue + 3 [label="Enter block"]; + subgraph cluster_3 { + color=blue + 4 [label="Enter when"]; + subgraph cluster_4 { + color=blue + 5 [label="Enter when branch condition "]; + subgraph cluster_5 { + color=blue + 6 [label="Enter ||"]; + 7 [label="Access variable R|/b1|"]; + 8 [label="Exit left part of ||"]; + 9 [label="Enter right part of ||"]; + 10 [label="Access variable R|/b2|"]; + 11 [label="Exit ||"]; + } + 12 [label="Exit when branch condition"]; + } + 13 [label="Synthetic else branch"]; + 14 [label="Enter when branch result"]; + subgraph cluster_6 { + color=blue + 15 [label="Enter block"]; + 16 [label="Const: Int(1)"]; + 17 [label="Exit block"]; + } + 18 [label="Exit when branch result"]; + 19 [label="Exit when"]; + } + 20 [label="Exit block"]; + } + 21 [label="Exit function test_1" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; 3 -> {4}; 4 -> {5}; 5 -> {6}; - 6 -> {7 9}; + 6 -> {7}; 7 -> {8}; - 8 -> {9}; + 8 -> {9 11}; 9 -> {10}; - 10 -> {11 12}; - 11 -> {17}; - 12 -> {13}; - 13 -> {14}; + 10 -> {11}; + 11 -> {12}; + 12 -> {13 14}; + 13 -> {19}; 14 -> {15}; 15 -> {16}; 16 -> {17}; 17 -> {18}; 18 -> {19}; - - subgraph cluster_6 { - color=red - 20 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_7 { - color=blue - 21 [label="Enter block"]; - subgraph cluster_8 { - color=blue - 22 [label="Enter when"]; - subgraph cluster_9 { - color=blue - 23 [label="Enter when branch condition "]; - subgraph cluster_10 { - color=blue - 24 [label="Enter &&"]; - 25 [label="Access variable R|/b1|"]; - 26 [label="Exit left part of &&"]; - 27 [label="Enter right part of &&"]; - 28 [label="Access variable R|/b2|"]; - 29 [label="Exit &&"]; - } - 30 [label="Exit when branch condition"]; - } - 31 [label="Synthetic else branch"]; - 32 [label="Enter when branch result"]; - subgraph cluster_11 { - color=blue - 33 [label="Enter block"]; - 34 [label="Const: Int(1)"]; - 35 [label="Exit block"]; - } - 36 [label="Exit when branch result"]; - 37 [label="Exit when"]; - } - 38 [label="Exit block"]; - } - 39 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 19 -> {20}; 20 -> {21}; - 21 -> {22}; + + subgraph cluster_7 { + color=red + 22 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_8 { + color=blue + 23 [label="Enter block"]; + subgraph cluster_9 { + color=blue + 24 [label="Enter when"]; + subgraph cluster_10 { + color=blue + 25 [label="Enter when branch condition "]; + subgraph cluster_11 { + color=blue + 26 [label="Enter &&"]; + 27 [label="Access variable R|/b1|"]; + 28 [label="Exit left part of &&"]; + 29 [label="Enter right part of &&"]; + 30 [label="Access variable R|/b2|"]; + 31 [label="Exit &&"]; + } + 32 [label="Exit when branch condition"]; + } + 33 [label="Synthetic else branch"]; + 34 [label="Enter when branch result"]; + subgraph cluster_12 { + color=blue + 35 [label="Enter block"]; + 36 [label="Const: Int(1)"]; + 37 [label="Exit block"]; + } + 38 [label="Exit when branch result"]; + 39 [label="Exit when"]; + } + 40 [label="Exit block"]; + } + 41 [label="Exit function test_2" style="filled" fillcolor=red]; + } 22 -> {23}; 23 -> {24}; 24 -> {25}; 25 -> {26}; - 26 -> {27 29}; + 26 -> {27}; 27 -> {28}; - 28 -> {29}; + 28 -> {29 31}; 29 -> {30}; - 30 -> {31 32}; - 31 -> {37}; - 32 -> {33}; - 33 -> {34}; + 30 -> {31}; + 31 -> {32}; + 32 -> {33 34}; + 33 -> {39}; 34 -> {35}; 35 -> {36}; 36 -> {37}; 37 -> {38}; 38 -> {39}; - - subgraph cluster_12 { - color=red - 40 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_13 { - color=blue - 41 [label="Enter block"]; - subgraph cluster_14 { - color=blue - 42 [label="Enter when"]; - subgraph cluster_15 { - color=blue - 43 [label="Enter when branch condition "]; - subgraph cluster_16 { - color=blue - 44 [label="Enter ||"]; - subgraph cluster_17 { - color=blue - 45 [label="Enter &&"]; - 46 [label="Access variable R|/b1|"]; - 47 [label="Exit left part of &&"]; - 48 [label="Enter right part of &&"]; - 49 [label="Access variable R|/b2|"]; - 50 [label="Exit &&"]; - } - 51 [label="Exit left part of ||"]; - 52 [label="Enter right part of ||"]; - 53 [label="Access variable R|/b3|"]; - 54 [label="Exit ||"]; - } - 55 [label="Exit when branch condition"]; - } - 56 [label="Synthetic else branch"]; - 57 [label="Enter when branch result"]; - subgraph cluster_18 { - color=blue - 58 [label="Enter block"]; - 59 [label="Const: Int(1)"]; - 60 [label="Exit block"]; - } - 61 [label="Exit when branch result"]; - 62 [label="Exit when"]; - } - 63 [label="Exit block"]; - } - 64 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 39 -> {40}; 40 -> {41}; - 41 -> {42}; + + subgraph cluster_13 { + color=red + 42 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_14 { + color=blue + 43 [label="Enter block"]; + subgraph cluster_15 { + color=blue + 44 [label="Enter when"]; + subgraph cluster_16 { + color=blue + 45 [label="Enter when branch condition "]; + subgraph cluster_17 { + color=blue + 46 [label="Enter ||"]; + subgraph cluster_18 { + color=blue + 47 [label="Enter &&"]; + 48 [label="Access variable R|/b1|"]; + 49 [label="Exit left part of &&"]; + 50 [label="Enter right part of &&"]; + 51 [label="Access variable R|/b2|"]; + 52 [label="Exit &&"]; + } + 53 [label="Exit left part of ||"]; + 54 [label="Enter right part of ||"]; + 55 [label="Access variable R|/b3|"]; + 56 [label="Exit ||"]; + } + 57 [label="Exit when branch condition"]; + } + 58 [label="Synthetic else branch"]; + 59 [label="Enter when branch result"]; + subgraph cluster_19 { + color=blue + 60 [label="Enter block"]; + 61 [label="Const: Int(1)"]; + 62 [label="Exit block"]; + } + 63 [label="Exit when branch result"]; + 64 [label="Exit when"]; + } + 65 [label="Exit block"]; + } + 66 [label="Exit function test_3" style="filled" fillcolor=red]; + } 42 -> {43}; 43 -> {44}; 44 -> {45}; 45 -> {46}; 46 -> {47}; - 47 -> {48 50}; + 47 -> {48}; 48 -> {49}; - 49 -> {50}; + 49 -> {50 52}; 50 -> {51}; - 51 -> {52 54}; + 51 -> {52}; 52 -> {53}; - 53 -> {54}; + 53 -> {54 56}; 54 -> {55}; - 55 -> {56 57}; - 56 -> {62}; - 57 -> {58}; - 58 -> {59}; + 55 -> {56}; + 56 -> {57}; + 57 -> {58 59}; + 58 -> {64}; 59 -> {60}; 60 -> {61}; 61 -> {62}; 62 -> {63}; 63 -> {64}; - - subgraph cluster_19 { - color=red - 65 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_20 { - color=blue - 66 [label="Enter block"]; - subgraph cluster_21 { - color=blue - 67 [label="Enter when"]; - subgraph cluster_22 { - color=blue - 68 [label="Enter when branch condition "]; - subgraph cluster_23 { - color=blue - 69 [label="Enter ||"]; - 70 [label="Access variable R|/b1|"]; - 71 [label="Exit left part of ||"]; - 72 [label="Enter right part of ||"]; - subgraph cluster_24 { - color=blue - 73 [label="Enter &&"]; - 74 [label="Access variable R|/b2|"]; - 75 [label="Exit left part of &&"]; - 76 [label="Enter right part of &&"]; - 77 [label="Access variable R|/b3|"]; - 78 [label="Exit &&"]; - } - 79 [label="Exit ||"]; - } - 80 [label="Exit when branch condition"]; - } - 81 [label="Synthetic else branch"]; - 82 [label="Enter when branch result"]; - subgraph cluster_25 { - color=blue - 83 [label="Enter block"]; - 84 [label="Const: Int(1)"]; - 85 [label="Exit block"]; - } - 86 [label="Exit when branch result"]; - 87 [label="Exit when"]; - } - 88 [label="Exit block"]; - } - 89 [label="Exit function test_4" style="filled" fillcolor=red]; - } + 64 -> {65}; 65 -> {66}; - 66 -> {67}; + + subgraph cluster_20 { + color=red + 67 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_21 { + color=blue + 68 [label="Enter block"]; + subgraph cluster_22 { + color=blue + 69 [label="Enter when"]; + subgraph cluster_23 { + color=blue + 70 [label="Enter when branch condition "]; + subgraph cluster_24 { + color=blue + 71 [label="Enter ||"]; + 72 [label="Access variable R|/b1|"]; + 73 [label="Exit left part of ||"]; + 74 [label="Enter right part of ||"]; + subgraph cluster_25 { + color=blue + 75 [label="Enter &&"]; + 76 [label="Access variable R|/b2|"]; + 77 [label="Exit left part of &&"]; + 78 [label="Enter right part of &&"]; + 79 [label="Access variable R|/b3|"]; + 80 [label="Exit &&"]; + } + 81 [label="Exit ||"]; + } + 82 [label="Exit when branch condition"]; + } + 83 [label="Synthetic else branch"]; + 84 [label="Enter when branch result"]; + subgraph cluster_26 { + color=blue + 85 [label="Enter block"]; + 86 [label="Const: Int(1)"]; + 87 [label="Exit block"]; + } + 88 [label="Exit when branch result"]; + 89 [label="Exit when"]; + } + 90 [label="Exit block"]; + } + 91 [label="Exit function test_4" style="filled" fillcolor=red]; + } 67 -> {68}; 68 -> {69}; 69 -> {70}; 70 -> {71}; - 71 -> {72 79}; + 71 -> {72}; 72 -> {73}; - 73 -> {74}; + 73 -> {74 81}; 74 -> {75}; - 75 -> {76 78}; + 75 -> {76}; 76 -> {77}; - 77 -> {78}; + 77 -> {78 80}; 78 -> {79}; 79 -> {80}; - 80 -> {81 82}; - 81 -> {87}; - 82 -> {83}; - 83 -> {84}; + 80 -> {81}; + 81 -> {82}; + 82 -> {83 84}; + 83 -> {89}; 84 -> {85}; 85 -> {86}; 86 -> {87}; 87 -> {88}; 88 -> {89}; + 89 -> {90}; + 90 -> {91}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/booleanOperatorsWithConsts.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/booleanOperatorsWithConsts.dot index fb7beae24a9..7c5e1b9067e 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/booleanOperatorsWithConsts.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/booleanOperatorsWithConsts.dot @@ -5,470 +5,477 @@ digraph booleanOperatorsWithConsts_kt { subgraph cluster_0 { color=red - 0 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter block"]; - subgraph cluster_2 { - color=blue - 2 [label="Enter when"]; - subgraph cluster_3 { - color=blue - 3 [label="Enter when branch condition "]; - subgraph cluster_4 { - color=blue - 4 [label="Enter ||"]; - 5 [label="Access variable R|/b|"]; - 6 [label="Exit left part of ||"]; - 7 [label="Enter right part of ||"]; - 8 [label="Const: Boolean(false)"]; - 9 [label="Exit ||"]; - } - 10 [label="Exit when branch condition"]; - } - 11 [label="Synthetic else branch"]; - 12 [label="Enter when branch result"]; - subgraph cluster_5 { - color=blue - 13 [label="Enter block"]; - 14 [label="Const: Int(1)"]; - 15 [label="Exit block"]; - } - 16 [label="Exit when branch result"]; - 17 [label="Exit when"]; - } - 18 [label="Exit block"]; - } - 19 [label="Exit function test_1" style="filled" fillcolor=red]; + 0 [label="Enter file booleanOperatorsWithConsts.kt" style="filled" fillcolor=red]; + 1 [label="Exit file booleanOperatorsWithConsts.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_2 { + color=blue + 3 [label="Enter block"]; + subgraph cluster_3 { + color=blue + 4 [label="Enter when"]; + subgraph cluster_4 { + color=blue + 5 [label="Enter when branch condition "]; + subgraph cluster_5 { + color=blue + 6 [label="Enter ||"]; + 7 [label="Access variable R|/b|"]; + 8 [label="Exit left part of ||"]; + 9 [label="Enter right part of ||"]; + 10 [label="Const: Boolean(false)"]; + 11 [label="Exit ||"]; + } + 12 [label="Exit when branch condition"]; + } + 13 [label="Synthetic else branch"]; + 14 [label="Enter when branch result"]; + subgraph cluster_6 { + color=blue + 15 [label="Enter block"]; + 16 [label="Const: Int(1)"]; + 17 [label="Exit block"]; + } + 18 [label="Exit when branch result"]; + 19 [label="Exit when"]; + } + 20 [label="Exit block"]; + } + 21 [label="Exit function test_1" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; 3 -> {4}; 4 -> {5}; 5 -> {6}; - 6 -> {7 9}; + 6 -> {7}; 7 -> {8}; - 8 -> {9}; + 8 -> {9 11}; 9 -> {10}; - 10 -> {11 12}; - 11 -> {17}; - 12 -> {13}; - 13 -> {14}; + 10 -> {11}; + 11 -> {12}; + 12 -> {13 14}; + 13 -> {19}; 14 -> {15}; 15 -> {16}; 16 -> {17}; 17 -> {18}; 18 -> {19}; - - subgraph cluster_6 { - color=red - 20 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_7 { - color=blue - 21 [label="Enter block"]; - subgraph cluster_8 { - color=blue - 22 [label="Enter when"]; - subgraph cluster_9 { - color=blue - 23 [label="Enter when branch condition "]; - subgraph cluster_10 { - color=blue - 24 [label="Enter ||"]; - 25 [label="Const: Boolean(false)"]; - 26 [label="Exit left part of ||"]; - 27 [label="Enter right part of ||"]; - 28 [label="Access variable R|/b|"]; - 29 [label="Exit ||"]; - } - 30 [label="Exit when branch condition"]; - } - 31 [label="Synthetic else branch"]; - 32 [label="Enter when branch result"]; - subgraph cluster_11 { - color=blue - 33 [label="Enter block"]; - 34 [label="Const: Int(1)"]; - 35 [label="Exit block"]; - } - 36 [label="Exit when branch result"]; - 37 [label="Exit when"]; - } - 38 [label="Exit block"]; - } - 39 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 19 -> {20}; 20 -> {21}; - 21 -> {22}; + + subgraph cluster_7 { + color=red + 22 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_8 { + color=blue + 23 [label="Enter block"]; + subgraph cluster_9 { + color=blue + 24 [label="Enter when"]; + subgraph cluster_10 { + color=blue + 25 [label="Enter when branch condition "]; + subgraph cluster_11 { + color=blue + 26 [label="Enter ||"]; + 27 [label="Const: Boolean(false)"]; + 28 [label="Exit left part of ||"]; + 29 [label="Enter right part of ||"]; + 30 [label="Access variable R|/b|"]; + 31 [label="Exit ||"]; + } + 32 [label="Exit when branch condition"]; + } + 33 [label="Synthetic else branch"]; + 34 [label="Enter when branch result"]; + subgraph cluster_12 { + color=blue + 35 [label="Enter block"]; + 36 [label="Const: Int(1)"]; + 37 [label="Exit block"]; + } + 38 [label="Exit when branch result"]; + 39 [label="Exit when"]; + } + 40 [label="Exit block"]; + } + 41 [label="Exit function test_2" style="filled" fillcolor=red]; + } 22 -> {23}; 23 -> {24}; 24 -> {25}; 25 -> {26}; 26 -> {27}; - 26 -> {29} [style=dotted]; 27 -> {28}; 28 -> {29}; + 28 -> {31} [style=dotted]; 29 -> {30}; - 30 -> {31 32}; - 31 -> {37}; - 32 -> {33}; - 33 -> {34}; + 30 -> {31}; + 31 -> {32}; + 32 -> {33 34}; + 33 -> {39}; 34 -> {35}; 35 -> {36}; 36 -> {37}; 37 -> {38}; 38 -> {39}; - - subgraph cluster_12 { - color=red - 40 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_13 { - color=blue - 41 [label="Enter block"]; - subgraph cluster_14 { - color=blue - 42 [label="Enter when"]; - subgraph cluster_15 { - color=blue - 43 [label="Enter when branch condition "]; - subgraph cluster_16 { - color=blue - 44 [label="Enter ||"]; - 45 [label="Access variable R|/b|"]; - 46 [label="Exit left part of ||"]; - 47 [label="Enter right part of ||"]; - 48 [label="Const: Boolean(true)"]; - 49 [label="Exit ||"]; - } - 50 [label="Exit when branch condition"]; - } - 51 [label="Synthetic else branch"]; - 52 [label="Enter when branch result"]; - subgraph cluster_17 { - color=blue - 53 [label="Enter block"]; - 54 [label="Const: Int(1)"]; - 55 [label="Exit block"]; - } - 56 [label="Exit when branch result"]; - 57 [label="Exit when"]; - } - 58 [label="Exit block"]; - } - 59 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 39 -> {40}; 40 -> {41}; - 41 -> {42}; + + subgraph cluster_13 { + color=red + 42 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_14 { + color=blue + 43 [label="Enter block"]; + subgraph cluster_15 { + color=blue + 44 [label="Enter when"]; + subgraph cluster_16 { + color=blue + 45 [label="Enter when branch condition "]; + subgraph cluster_17 { + color=blue + 46 [label="Enter ||"]; + 47 [label="Access variable R|/b|"]; + 48 [label="Exit left part of ||"]; + 49 [label="Enter right part of ||"]; + 50 [label="Const: Boolean(true)"]; + 51 [label="Exit ||"]; + } + 52 [label="Exit when branch condition"]; + } + 53 [label="Synthetic else branch"]; + 54 [label="Enter when branch result"]; + subgraph cluster_18 { + color=blue + 55 [label="Enter block"]; + 56 [label="Const: Int(1)"]; + 57 [label="Exit block"]; + } + 58 [label="Exit when branch result"]; + 59 [label="Exit when"]; + } + 60 [label="Exit block"]; + } + 61 [label="Exit function test_3" style="filled" fillcolor=red]; + } 42 -> {43}; 43 -> {44}; 44 -> {45}; 45 -> {46}; - 46 -> {47 49}; + 46 -> {47}; 47 -> {48}; - 48 -> {49}; + 48 -> {49 51}; 49 -> {50}; - 50 -> {51 52}; - 51 -> {57}; - 52 -> {53}; - 53 -> {54}; + 50 -> {51}; + 51 -> {52}; + 52 -> {53 54}; + 53 -> {59}; 54 -> {55}; 55 -> {56}; 56 -> {57}; 57 -> {58}; 58 -> {59}; - - subgraph cluster_18 { - color=red - 60 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_19 { - color=blue - 61 [label="Enter block"]; - subgraph cluster_20 { - color=blue - 62 [label="Enter when"]; - subgraph cluster_21 { - color=blue - 63 [label="Enter when branch condition "]; - subgraph cluster_22 { - color=blue - 64 [label="Enter ||"]; - 65 [label="Const: Boolean(true)"]; - 66 [label="Exit left part of ||"]; - 67 [label="Enter right part of ||" style="filled" fillcolor=gray]; - 68 [label="Access variable R|/b|" style="filled" fillcolor=gray]; - 69 [label="Exit ||"]; - } - 70 [label="Exit when branch condition"]; - } - 71 [label="Synthetic else branch"]; - 72 [label="Enter when branch result"]; - subgraph cluster_23 { - color=blue - 73 [label="Enter block"]; - 74 [label="Const: Int(1)"]; - 75 [label="Exit block"]; - } - 76 [label="Exit when branch result"]; - 77 [label="Exit when"]; - } - 78 [label="Exit block"]; - } - 79 [label="Exit function test_4" style="filled" fillcolor=red]; - } + 59 -> {60}; 60 -> {61}; - 61 -> {62}; + + subgraph cluster_19 { + color=red + 62 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_20 { + color=blue + 63 [label="Enter block"]; + subgraph cluster_21 { + color=blue + 64 [label="Enter when"]; + subgraph cluster_22 { + color=blue + 65 [label="Enter when branch condition "]; + subgraph cluster_23 { + color=blue + 66 [label="Enter ||"]; + 67 [label="Const: Boolean(true)"]; + 68 [label="Exit left part of ||"]; + 69 [label="Enter right part of ||" style="filled" fillcolor=gray]; + 70 [label="Access variable R|/b|" style="filled" fillcolor=gray]; + 71 [label="Exit ||"]; + } + 72 [label="Exit when branch condition"]; + } + 73 [label="Synthetic else branch"]; + 74 [label="Enter when branch result"]; + subgraph cluster_24 { + color=blue + 75 [label="Enter block"]; + 76 [label="Const: Int(1)"]; + 77 [label="Exit block"]; + } + 78 [label="Exit when branch result"]; + 79 [label="Exit when"]; + } + 80 [label="Exit block"]; + } + 81 [label="Exit function test_4" style="filled" fillcolor=red]; + } 62 -> {63}; 63 -> {64}; 64 -> {65}; 65 -> {66}; - 66 -> {69}; - 66 -> {67} [style=dotted]; - 67 -> {68} [style=dotted]; + 66 -> {67}; + 67 -> {68}; + 68 -> {71}; 68 -> {69} [style=dotted]; - 69 -> {70}; - 70 -> {71 72}; - 71 -> {77}; - 72 -> {73}; - 73 -> {74}; + 69 -> {70} [style=dotted]; + 70 -> {71} [style=dotted]; + 71 -> {72}; + 72 -> {73 74}; + 73 -> {79}; 74 -> {75}; 75 -> {76}; 76 -> {77}; 77 -> {78}; 78 -> {79}; - - subgraph cluster_24 { - color=red - 80 [label="Enter function test_5" style="filled" fillcolor=red]; - subgraph cluster_25 { - color=blue - 81 [label="Enter block"]; - subgraph cluster_26 { - color=blue - 82 [label="Enter when"]; - subgraph cluster_27 { - color=blue - 83 [label="Enter when branch condition "]; - subgraph cluster_28 { - color=blue - 84 [label="Enter &&"]; - 85 [label="Access variable R|/b|"]; - 86 [label="Exit left part of &&"]; - 87 [label="Enter right part of &&"]; - 88 [label="Const: Boolean(false)"]; - 89 [label="Exit &&"]; - } - 90 [label="Exit when branch condition"]; - } - 91 [label="Synthetic else branch"]; - 92 [label="Enter when branch result"]; - subgraph cluster_29 { - color=blue - 93 [label="Enter block"]; - 94 [label="Const: Int(1)"]; - 95 [label="Exit block"]; - } - 96 [label="Exit when branch result"]; - 97 [label="Exit when"]; - } - 98 [label="Exit block"]; - } - 99 [label="Exit function test_5" style="filled" fillcolor=red]; - } + 79 -> {80}; 80 -> {81}; - 81 -> {82}; + + subgraph cluster_25 { + color=red + 82 [label="Enter function test_5" style="filled" fillcolor=red]; + subgraph cluster_26 { + color=blue + 83 [label="Enter block"]; + subgraph cluster_27 { + color=blue + 84 [label="Enter when"]; + subgraph cluster_28 { + color=blue + 85 [label="Enter when branch condition "]; + subgraph cluster_29 { + color=blue + 86 [label="Enter &&"]; + 87 [label="Access variable R|/b|"]; + 88 [label="Exit left part of &&"]; + 89 [label="Enter right part of &&"]; + 90 [label="Const: Boolean(false)"]; + 91 [label="Exit &&"]; + } + 92 [label="Exit when branch condition"]; + } + 93 [label="Synthetic else branch"]; + 94 [label="Enter when branch result"]; + subgraph cluster_30 { + color=blue + 95 [label="Enter block"]; + 96 [label="Const: Int(1)"]; + 97 [label="Exit block"]; + } + 98 [label="Exit when branch result"]; + 99 [label="Exit when"]; + } + 100 [label="Exit block"]; + } + 101 [label="Exit function test_5" style="filled" fillcolor=red]; + } 82 -> {83}; 83 -> {84}; 84 -> {85}; 85 -> {86}; - 86 -> {87 89}; + 86 -> {87}; 87 -> {88}; - 88 -> {89}; + 88 -> {89 91}; 89 -> {90}; - 90 -> {91 92}; - 91 -> {97}; - 92 -> {93}; - 93 -> {94}; + 90 -> {91}; + 91 -> {92}; + 92 -> {93 94}; + 93 -> {99}; 94 -> {95}; 95 -> {96}; 96 -> {97}; 97 -> {98}; 98 -> {99}; - - subgraph cluster_30 { - color=red - 100 [label="Enter function test_6" style="filled" fillcolor=red]; - subgraph cluster_31 { - color=blue - 101 [label="Enter block"]; - subgraph cluster_32 { - color=blue - 102 [label="Enter when"]; - subgraph cluster_33 { - color=blue - 103 [label="Enter when branch condition "]; - subgraph cluster_34 { - color=blue - 104 [label="Enter &&"]; - 105 [label="Const: Boolean(false)"]; - 106 [label="Exit left part of &&"]; - 107 [label="Enter right part of &&" style="filled" fillcolor=gray]; - 108 [label="Access variable R|/b|" style="filled" fillcolor=gray]; - 109 [label="Exit &&"]; - } - 110 [label="Exit when branch condition"]; - } - 111 [label="Synthetic else branch"]; - 112 [label="Enter when branch result"]; - subgraph cluster_35 { - color=blue - 113 [label="Enter block"]; - 114 [label="Const: Int(1)"]; - 115 [label="Exit block"]; - } - 116 [label="Exit when branch result"]; - 117 [label="Exit when"]; - } - 118 [label="Exit block"]; - } - 119 [label="Exit function test_6" style="filled" fillcolor=red]; - } + 99 -> {100}; 100 -> {101}; - 101 -> {102}; + + subgraph cluster_31 { + color=red + 102 [label="Enter function test_6" style="filled" fillcolor=red]; + subgraph cluster_32 { + color=blue + 103 [label="Enter block"]; + subgraph cluster_33 { + color=blue + 104 [label="Enter when"]; + subgraph cluster_34 { + color=blue + 105 [label="Enter when branch condition "]; + subgraph cluster_35 { + color=blue + 106 [label="Enter &&"]; + 107 [label="Const: Boolean(false)"]; + 108 [label="Exit left part of &&"]; + 109 [label="Enter right part of &&" style="filled" fillcolor=gray]; + 110 [label="Access variable R|/b|" style="filled" fillcolor=gray]; + 111 [label="Exit &&"]; + } + 112 [label="Exit when branch condition"]; + } + 113 [label="Synthetic else branch"]; + 114 [label="Enter when branch result"]; + subgraph cluster_36 { + color=blue + 115 [label="Enter block"]; + 116 [label="Const: Int(1)"]; + 117 [label="Exit block"]; + } + 118 [label="Exit when branch result"]; + 119 [label="Exit when"]; + } + 120 [label="Exit block"]; + } + 121 [label="Exit function test_6" style="filled" fillcolor=red]; + } 102 -> {103}; 103 -> {104}; 104 -> {105}; 105 -> {106}; - 106 -> {109}; - 106 -> {107} [style=dotted]; - 107 -> {108} [style=dotted]; + 106 -> {107}; + 107 -> {108}; + 108 -> {111}; 108 -> {109} [style=dotted]; - 109 -> {110}; - 110 -> {111 112}; - 111 -> {117}; - 112 -> {113}; - 113 -> {114}; + 109 -> {110} [style=dotted]; + 110 -> {111} [style=dotted]; + 111 -> {112}; + 112 -> {113 114}; + 113 -> {119}; 114 -> {115}; 115 -> {116}; 116 -> {117}; 117 -> {118}; 118 -> {119}; - - subgraph cluster_36 { - color=red - 120 [label="Enter function test_7" style="filled" fillcolor=red]; - subgraph cluster_37 { - color=blue - 121 [label="Enter block"]; - subgraph cluster_38 { - color=blue - 122 [label="Enter when"]; - subgraph cluster_39 { - color=blue - 123 [label="Enter when branch condition "]; - subgraph cluster_40 { - color=blue - 124 [label="Enter &&"]; - 125 [label="Access variable R|/b|"]; - 126 [label="Exit left part of &&"]; - 127 [label="Enter right part of &&"]; - 128 [label="Const: Boolean(true)"]; - 129 [label="Exit &&"]; - } - 130 [label="Exit when branch condition"]; - } - 131 [label="Synthetic else branch"]; - 132 [label="Enter when branch result"]; - subgraph cluster_41 { - color=blue - 133 [label="Enter block"]; - 134 [label="Const: Int(1)"]; - 135 [label="Exit block"]; - } - 136 [label="Exit when branch result"]; - 137 [label="Exit when"]; - } - 138 [label="Exit block"]; - } - 139 [label="Exit function test_7" style="filled" fillcolor=red]; - } + 119 -> {120}; 120 -> {121}; - 121 -> {122}; + + subgraph cluster_37 { + color=red + 122 [label="Enter function test_7" style="filled" fillcolor=red]; + subgraph cluster_38 { + color=blue + 123 [label="Enter block"]; + subgraph cluster_39 { + color=blue + 124 [label="Enter when"]; + subgraph cluster_40 { + color=blue + 125 [label="Enter when branch condition "]; + subgraph cluster_41 { + color=blue + 126 [label="Enter &&"]; + 127 [label="Access variable R|/b|"]; + 128 [label="Exit left part of &&"]; + 129 [label="Enter right part of &&"]; + 130 [label="Const: Boolean(true)"]; + 131 [label="Exit &&"]; + } + 132 [label="Exit when branch condition"]; + } + 133 [label="Synthetic else branch"]; + 134 [label="Enter when branch result"]; + subgraph cluster_42 { + color=blue + 135 [label="Enter block"]; + 136 [label="Const: Int(1)"]; + 137 [label="Exit block"]; + } + 138 [label="Exit when branch result"]; + 139 [label="Exit when"]; + } + 140 [label="Exit block"]; + } + 141 [label="Exit function test_7" style="filled" fillcolor=red]; + } 122 -> {123}; 123 -> {124}; 124 -> {125}; 125 -> {126}; - 126 -> {127 129}; + 126 -> {127}; 127 -> {128}; - 128 -> {129}; + 128 -> {129 131}; 129 -> {130}; - 130 -> {131 132}; - 131 -> {137}; - 132 -> {133}; - 133 -> {134}; + 130 -> {131}; + 131 -> {132}; + 132 -> {133 134}; + 133 -> {139}; 134 -> {135}; 135 -> {136}; 136 -> {137}; 137 -> {138}; 138 -> {139}; - - subgraph cluster_42 { - color=red - 140 [label="Enter function test_8" style="filled" fillcolor=red]; - subgraph cluster_43 { - color=blue - 141 [label="Enter block"]; - subgraph cluster_44 { - color=blue - 142 [label="Enter when"]; - subgraph cluster_45 { - color=blue - 143 [label="Enter when branch condition "]; - subgraph cluster_46 { - color=blue - 144 [label="Enter &&"]; - 145 [label="Const: Boolean(true)"]; - 146 [label="Exit left part of &&"]; - 147 [label="Enter right part of &&"]; - 148 [label="Access variable R|/b|"]; - 149 [label="Exit &&"]; - } - 150 [label="Exit when branch condition"]; - } - 151 [label="Synthetic else branch"]; - 152 [label="Enter when branch result"]; - subgraph cluster_47 { - color=blue - 153 [label="Enter block"]; - 154 [label="Const: Int(1)"]; - 155 [label="Exit block"]; - } - 156 [label="Exit when branch result"]; - 157 [label="Exit when"]; - } - 158 [label="Exit block"]; - } - 159 [label="Exit function test_8" style="filled" fillcolor=red]; - } + 139 -> {140}; 140 -> {141}; - 141 -> {142}; + + subgraph cluster_43 { + color=red + 142 [label="Enter function test_8" style="filled" fillcolor=red]; + subgraph cluster_44 { + color=blue + 143 [label="Enter block"]; + subgraph cluster_45 { + color=blue + 144 [label="Enter when"]; + subgraph cluster_46 { + color=blue + 145 [label="Enter when branch condition "]; + subgraph cluster_47 { + color=blue + 146 [label="Enter &&"]; + 147 [label="Const: Boolean(true)"]; + 148 [label="Exit left part of &&"]; + 149 [label="Enter right part of &&"]; + 150 [label="Access variable R|/b|"]; + 151 [label="Exit &&"]; + } + 152 [label="Exit when branch condition"]; + } + 153 [label="Synthetic else branch"]; + 154 [label="Enter when branch result"]; + subgraph cluster_48 { + color=blue + 155 [label="Enter block"]; + 156 [label="Const: Int(1)"]; + 157 [label="Exit block"]; + } + 158 [label="Exit when branch result"]; + 159 [label="Exit when"]; + } + 160 [label="Exit block"]; + } + 161 [label="Exit function test_8" style="filled" fillcolor=red]; + } 142 -> {143}; 143 -> {144}; 144 -> {145}; 145 -> {146}; 146 -> {147}; - 146 -> {149} [style=dotted]; 147 -> {148}; 148 -> {149}; + 148 -> {151} [style=dotted]; 149 -> {150}; - 150 -> {151 152}; - 151 -> {157}; - 152 -> {153}; - 153 -> {154}; + 150 -> {151}; + 151 -> {152}; + 152 -> {153 154}; + 153 -> {159}; 154 -> {155}; 155 -> {156}; 156 -> {157}; 157 -> {158}; 158 -> {159}; + 159 -> {160}; + 160 -> {161}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/complex.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/complex.dot index 62daf065950..23805e3f642 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/complex.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/complex.dot @@ -5,104 +5,111 @@ digraph complex_kt { subgraph cluster_0 { color=red - 0 [label="Enter class AutoCloseable" style="filled" fillcolor=red]; - 1 [label="Exit class AutoCloseable" style="filled" fillcolor=red]; + 0 [label="Enter file complex.kt" style="filled" fillcolor=red]; + 1 [label="Exit file complex.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; subgraph cluster_1 { color=red - 2 [label="Enter function close" style="filled" fillcolor=red]; - 3 [label="Exit function close" style="filled" fillcolor=red]; + 2 [label="Enter class AutoCloseable" style="filled" fillcolor=red]; + 3 [label="Exit class AutoCloseable" style="filled" fillcolor=red]; } - 2 -> {3}; + 2 -> {3} [color=green]; subgraph cluster_2 { color=red - 4 [label="Enter function closeFinally" style="filled" fillcolor=red]; - subgraph cluster_3 { + 4 [label="Enter function close" style="filled" fillcolor=red]; + 5 [label="Exit function close" style="filled" fillcolor=red]; + } + 4 -> {5}; + + subgraph cluster_3 { + color=red + 6 [label="Enter function closeFinally" style="filled" fillcolor=red]; + subgraph cluster_4 { color=blue - 5 [label="Enter block"]; - subgraph cluster_4 { + 7 [label="Enter block"]; + subgraph cluster_5 { color=blue - 6 [label="Enter when"]; - subgraph cluster_5 { - color=blue - 7 [label="Enter when branch condition "]; - 8 [label="Access variable this@R|/closeFinally|"]; - 9 [label="Const: Null(null)"]; - 10 [label="Equality operator =="]; - 11 [label="Exit when branch condition"]; - } + 8 [label="Enter when"]; subgraph cluster_6 { color=blue - 12 [label="Enter when branch condition "]; - 13 [label="Access variable R|/cause|"]; - 14 [label="Const: Null(null)"]; - 15 [label="Equality operator =="]; - 16 [label="Exit when branch condition"]; + 9 [label="Enter when branch condition "]; + 10 [label="Access variable this@R|/closeFinally|"]; + 11 [label="Const: Null(null)"]; + 12 [label="Equality operator =="]; + 13 [label="Exit when branch condition"]; } subgraph cluster_7 { color=blue - 17 [label="Enter when branch condition else"]; + 14 [label="Enter when branch condition "]; + 15 [label="Access variable R|/cause|"]; + 16 [label="Const: Null(null)"]; + 17 [label="Equality operator =="]; 18 [label="Exit when branch condition"]; } - 19 [label="Enter when branch result"]; subgraph cluster_8 { color=blue - 20 [label="Enter block"]; - subgraph cluster_9 { - color=blue - 21 [label="Try expression enter"]; - subgraph cluster_10 { - color=blue - 22 [label="Try main block enter"]; - subgraph cluster_11 { - color=blue - 23 [label="Enter block"]; - 24 [label="Function call: this@R|/closeFinally|.R|/AutoCloseable.close|()" style="filled" fillcolor=yellow]; - 25 [label="Exit block"]; - } - 26 [label="Try main block exit"]; - } - subgraph cluster_12 { - color=blue - 27 [label="Catch enter"]; - 28 [label="Variable declaration: closeException: R|kotlin/Throwable|"]; - subgraph cluster_13 { - color=blue - 29 [label="Enter block"]; - 30 [label="Access variable R|/cause|"]; - 31 [label="Smart cast: R|/cause|"]; - 32 [label="Access variable R|/closeException|"]; - 33 [label="Function call: R|/cause|.R|kotlin/Throwable.addSuppressed|(...)" style="filled" fillcolor=yellow]; - 34 [label="Exit block"]; - } - 35 [label="Catch exit"]; - } - 36 [label="Try expression exit"]; - } - 37 [label="Exit block"]; + 19 [label="Enter when branch condition else"]; + 20 [label="Exit when branch condition"]; } - 38 [label="Exit when branch result"]; - 39 [label="Enter when branch result"]; - subgraph cluster_14 { + 21 [label="Enter when branch result"]; + subgraph cluster_9 { color=blue - 40 [label="Enter block"]; - 41 [label="Function call: this@R|/closeFinally|.R|/AutoCloseable.close|()" style="filled" fillcolor=yellow]; - 42 [label="Exit block"]; + 22 [label="Enter block"]; + subgraph cluster_10 { + color=blue + 23 [label="Try expression enter"]; + subgraph cluster_11 { + color=blue + 24 [label="Try main block enter"]; + subgraph cluster_12 { + color=blue + 25 [label="Enter block"]; + 26 [label="Function call: this@R|/closeFinally|.R|/AutoCloseable.close|()" style="filled" fillcolor=yellow]; + 27 [label="Exit block"]; + } + 28 [label="Try main block exit"]; + } + subgraph cluster_13 { + color=blue + 29 [label="Catch enter"]; + 30 [label="Variable declaration: closeException: R|kotlin/Throwable|"]; + subgraph cluster_14 { + color=blue + 31 [label="Enter block"]; + 32 [label="Access variable R|/cause|"]; + 33 [label="Smart cast: R|/cause|"]; + 34 [label="Access variable R|/closeException|"]; + 35 [label="Function call: R|/cause|.R|kotlin/Throwable.addSuppressed|(...)" style="filled" fillcolor=yellow]; + 36 [label="Exit block"]; + } + 37 [label="Catch exit"]; + } + 38 [label="Try expression exit"]; + } + 39 [label="Exit block"]; } - 43 [label="Exit when branch result"]; - 44 [label="Enter when branch result"]; + 40 [label="Exit when branch result"]; + 41 [label="Enter when branch result"]; subgraph cluster_15 { color=blue - 45 [label="Enter block"]; - 46 [label="Exit block"]; + 42 [label="Enter block"]; + 43 [label="Function call: this@R|/closeFinally|.R|/AutoCloseable.close|()" style="filled" fillcolor=yellow]; + 44 [label="Exit block"]; } - 47 [label="Exit when branch result"]; - 48 [label="Exit when"]; + 45 [label="Exit when branch result"]; + 46 [label="Enter when branch result"]; + subgraph cluster_16 { + color=blue + 47 [label="Enter block"]; + 48 [label="Exit block"]; + } + 49 [label="Exit when branch result"]; + 50 [label="Exit when"]; } - 49 [label="Jump: ^closeFinally when () { + 51 [label="Jump: ^closeFinally when () { ==(this@R|/closeFinally|, Null(null)) -> { } ==(R|/cause|, Null(null)) -> { @@ -119,36 +126,34 @@ digraph complex_kt { } } "]; - 50 [label="Stub" style="filled" fillcolor=gray]; - 51 [label="Exit block" style="filled" fillcolor=gray]; + 52 [label="Stub" style="filled" fillcolor=gray]; + 53 [label="Exit block" style="filled" fillcolor=gray]; } - 52 [label="Exit function closeFinally" style="filled" fillcolor=red]; + 54 [label="Exit function closeFinally" style="filled" fillcolor=red]; } - 4 -> {5}; - 5 -> {6}; 6 -> {7}; 7 -> {8}; 8 -> {9}; 9 -> {10}; 10 -> {11}; - 11 -> {12 44}; + 11 -> {12}; 12 -> {13}; - 13 -> {14}; + 13 -> {14 46}; 14 -> {15}; 15 -> {16}; - 16 -> {17 39}; + 16 -> {17}; 17 -> {18}; - 18 -> {19}; + 18 -> {19 41}; 19 -> {20}; 20 -> {21}; - 21 -> {22 27}; + 21 -> {22}; 22 -> {23}; - 23 -> {24}; - 24 -> {25 27}; + 23 -> {24 29}; + 24 -> {25}; 25 -> {26}; - 26 -> {27 36}; + 26 -> {27 29}; 27 -> {28}; - 28 -> {29}; + 28 -> {29 38}; 29 -> {30}; 30 -> {31}; 31 -> {32}; @@ -158,99 +163,99 @@ digraph complex_kt { 35 -> {36}; 36 -> {37}; 37 -> {38}; - 38 -> {48}; + 38 -> {39}; 39 -> {40}; - 40 -> {41}; + 40 -> {50}; 41 -> {42}; 42 -> {43}; - 43 -> {48}; + 43 -> {44}; 44 -> {45}; - 45 -> {46}; + 45 -> {50}; 46 -> {47}; 47 -> {48}; 48 -> {49}; - 49 -> {52}; - 49 -> {50} [style=dotted]; - 50 -> {51} [style=dotted]; + 49 -> {50}; + 50 -> {51}; + 51 -> {54}; 51 -> {52} [style=dotted]; + 52 -> {53} [style=dotted]; + 53 -> {54} [style=dotted]; - subgraph cluster_16 { + subgraph cluster_17 { color=red - 53 [label="Enter function firstIsInstanceOrNull" style="filled" fillcolor=red]; - subgraph cluster_17 { + 55 [label="Enter function firstIsInstanceOrNull" style="filled" fillcolor=red]; + subgraph cluster_18 { color=blue - 54 [label="Enter block"]; - subgraph cluster_18 { + 56 [label="Enter block"]; + subgraph cluster_19 { color=blue - 55 [label="Enter block"]; - 56 [label="Access variable this@R|/firstIsInstanceOrNull|"]; - 57 [label="Function call: this@R|/firstIsInstanceOrNull|.R|SubstitutionOverride|>|()" style="filled" fillcolor=yellow]; - 58 [label="Variable declaration: lval : R|kotlin/collections/Iterator|"]; - subgraph cluster_19 { + 57 [label="Enter block"]; + 58 [label="Access variable this@R|/firstIsInstanceOrNull|"]; + 59 [label="Function call: this@R|/firstIsInstanceOrNull|.R|SubstitutionOverride|>|()" style="filled" fillcolor=yellow]; + 60 [label="Variable declaration: lval : R|kotlin/collections/Iterator|"]; + subgraph cluster_20 { color=blue - 59 [label="Enter while loop"]; - subgraph cluster_20 { - color=blue - 60 [label="Enter loop condition"]; - 61 [label="Access variable R|/|"]; - 62 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 63 [label="Exit loop condition"]; - } + 61 [label="Enter while loop"]; subgraph cluster_21 { color=blue - 64 [label="Enter loop block"]; - subgraph cluster_22 { + 62 [label="Enter loop condition"]; + 63 [label="Access variable R|/|"]; + 64 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 65 [label="Exit loop condition"]; + } + subgraph cluster_22 { + color=blue + 66 [label="Enter loop block"]; + subgraph cluster_23 { color=blue - 65 [label="Enter block"]; - 66 [label="Access variable R|/|"]; - 67 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 68 [label="Variable declaration: lval element: R|kotlin/Any?|"]; - subgraph cluster_23 { + 67 [label="Enter block"]; + 68 [label="Access variable R|/|"]; + 69 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 70 [label="Variable declaration: lval element: R|kotlin/Any?|"]; + subgraph cluster_24 { color=blue - 69 [label="Enter block"]; - subgraph cluster_24 { + 71 [label="Enter block"]; + subgraph cluster_25 { color=blue - 70 [label="Enter when"]; - subgraph cluster_25 { - color=blue - 71 [label="Enter when branch condition "]; - 72 [label="Access variable R|/element|"]; - 73 [label="Type operator: (R|/element| is R|T|)"]; - 74 [label="Exit when branch condition"]; - } - 75 [label="Synthetic else branch"]; - 76 [label="Enter when branch result"]; + 72 [label="Enter when"]; subgraph cluster_26 { color=blue - 77 [label="Enter block"]; - 78 [label="Access variable R|/element|"]; - 79 [label="Smart cast: R|/element|"]; - 80 [label="Jump: ^firstIsInstanceOrNull R|/element|"]; - 81 [label="Stub" style="filled" fillcolor=gray]; - 82 [label="Exit block" style="filled" fillcolor=gray]; + 73 [label="Enter when branch condition "]; + 74 [label="Access variable R|/element|"]; + 75 [label="Type operator: (R|/element| is R|T|)"]; + 76 [label="Exit when branch condition"]; } - 83 [label="Exit when branch result" style="filled" fillcolor=gray]; - 84 [label="Exit when"]; + 77 [label="Synthetic else branch"]; + 78 [label="Enter when branch result"]; + subgraph cluster_27 { + color=blue + 79 [label="Enter block"]; + 80 [label="Access variable R|/element|"]; + 81 [label="Smart cast: R|/element|"]; + 82 [label="Jump: ^firstIsInstanceOrNull R|/element|"]; + 83 [label="Stub" style="filled" fillcolor=gray]; + 84 [label="Exit block" style="filled" fillcolor=gray]; + } + 85 [label="Exit when branch result" style="filled" fillcolor=gray]; + 86 [label="Exit when"]; } - 85 [label="Exit block"]; + 87 [label="Exit block"]; } - 86 [label="Exit block"]; + 88 [label="Exit block"]; } - 87 [label="Exit loop block"]; + 89 [label="Exit loop block"]; } - 88 [label="Exit while loop"]; + 90 [label="Exit while loop"]; } - 89 [label="Exit block"]; + 91 [label="Exit block"]; } - 90 [label="Const: Null(null)"]; - 91 [label="Jump: ^firstIsInstanceOrNull Null(null)"]; - 92 [label="Stub" style="filled" fillcolor=gray]; - 93 [label="Exit block" style="filled" fillcolor=gray]; + 92 [label="Const: Null(null)"]; + 93 [label="Jump: ^firstIsInstanceOrNull Null(null)"]; + 94 [label="Stub" style="filled" fillcolor=gray]; + 95 [label="Exit block" style="filled" fillcolor=gray]; } - 94 [label="Exit function firstIsInstanceOrNull" style="filled" fillcolor=red]; + 96 [label="Exit function firstIsInstanceOrNull" style="filled" fillcolor=red]; } - 53 -> {54}; - 54 -> {55}; 55 -> {56}; 56 -> {57}; 57 -> {58}; @@ -259,9 +264,9 @@ digraph complex_kt { 60 -> {61}; 61 -> {62}; 62 -> {63}; - 63 -> {64 88}; + 63 -> {64}; 64 -> {65}; - 65 -> {66}; + 65 -> {66 90}; 66 -> {67}; 67 -> {68}; 68 -> {69}; @@ -270,27 +275,29 @@ digraph complex_kt { 71 -> {72}; 72 -> {73}; 73 -> {74}; - 74 -> {75 76}; - 75 -> {84}; - 76 -> {77}; - 77 -> {78}; + 74 -> {75}; + 75 -> {76}; + 76 -> {77 78}; + 77 -> {86}; 78 -> {79}; 79 -> {80}; - 80 -> {94}; - 80 -> {81} [style=dotted]; - 81 -> {82} [style=dotted]; + 80 -> {81}; + 81 -> {82}; + 82 -> {96}; 82 -> {83} [style=dotted]; 83 -> {84} [style=dotted]; - 84 -> {85}; - 85 -> {86}; + 84 -> {85} [style=dotted]; + 85 -> {86} [style=dotted]; 86 -> {87}; - 87 -> {60} [color=green style=dashed]; + 87 -> {88}; 88 -> {89}; - 89 -> {90}; + 89 -> {62} [color=green style=dashed]; 90 -> {91}; - 91 -> {94}; - 91 -> {92} [style=dotted]; - 92 -> {93} [style=dotted]; + 91 -> {92}; + 92 -> {93}; + 93 -> {96}; 93 -> {94} [style=dotted]; + 94 -> {95} [style=dotted]; + 95 -> {96} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/defaultArguments.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/defaultArguments.dot index 88c10ad078b..f2f53926557 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/defaultArguments.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/defaultArguments.dot @@ -5,82 +5,87 @@ digraph defaultArguments_kt { subgraph cluster_0 { color=red - 0 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter block"]; - 2 [label="Const: Int(1)"]; - 3 [label="Jump: ^foo Int(1)"]; - 4 [label="Stub" style="filled" fillcolor=gray]; - 5 [label="Exit block" style="filled" fillcolor=gray]; - } - 6 [label="Exit function foo" style="filled" fillcolor=red]; + 0 [label="Enter file defaultArguments.kt" style="filled" fillcolor=red]; + 1 [label="Exit file defaultArguments.kt" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; - 2 -> {3}; - 3 -> {6}; - 3 -> {4} [style=dotted]; - 4 -> {5} [style=dotted]; - 5 -> {6} [style=dotted]; + 0 -> {1} [color=green]; - subgraph cluster_2 { + subgraph cluster_1 { color=red - 7 [label="Enter function test" style="filled" fillcolor=red]; - 8 [label="Enter default value of y"]; - subgraph cluster_3 { + 2 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 9 [label="Enter default value of y" style="filled" fillcolor=red]; - 10 [label="Access variable R|/x|"]; - 11 [label="Type operator: (R|/x| as R|kotlin/String|)"]; - 12 [label="Exit default value of y" style="filled" fillcolor=red]; + 3 [label="Enter block"]; + 4 [label="Const: Int(1)"]; + 5 [label="Jump: ^foo Int(1)"]; + 6 [label="Stub" style="filled" fillcolor=gray]; + 7 [label="Exit block" style="filled" fillcolor=gray]; } - 13 [label="Exit default value of y"]; - 14 [label="Enter default value of z"]; + 8 [label="Exit function foo" style="filled" fillcolor=red]; + } + 2 -> {3}; + 3 -> {4}; + 4 -> {5}; + 5 -> {8}; + 5 -> {6} [style=dotted]; + 6 -> {7} [style=dotted]; + 7 -> {8} [style=dotted]; + + subgraph cluster_3 { + color=red + 9 [label="Enter function test" style="filled" fillcolor=red]; + 10 [label="Enter default value of y"]; subgraph cluster_4 { color=blue - 15 [label="Enter default value of z" style="filled" fillcolor=red]; - 16 [label="Postponed enter to lambda"]; - subgraph cluster_5 { - color=blue - 17 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_6 { - color=blue - 18 [label="Enter block"]; - 19 [label="Function call: R|/foo|()" style="filled" fillcolor=yellow]; - 20 [label="Exit block"]; - } - 21 [label="Exit function " style="filled" fillcolor=red]; - } - 22 [label="Postponed exit from lambda"]; - 23 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 24 [label="Exit default value of z" style="filled" fillcolor=red]; + 11 [label="Enter default value of y" style="filled" fillcolor=red]; + 12 [label="Access variable R|/x|"]; + 13 [label="Type operator: (R|/x| as R|kotlin/String|)"]; + 14 [label="Exit default value of y" style="filled" fillcolor=red]; } - 25 [label="Exit default value of z"]; - subgraph cluster_7 { + 15 [label="Exit default value of y"]; + 16 [label="Enter default value of z"]; + subgraph cluster_5 { color=blue - 26 [label="Enter block"]; - 27 [label="Function call: R|/foo|()" style="filled" fillcolor=yellow]; - 28 [label="Exit block"]; + 17 [label="Enter default value of z" style="filled" fillcolor=red]; + 18 [label="Postponed enter to lambda"]; + subgraph cluster_6 { + color=blue + 19 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_7 { + color=blue + 20 [label="Enter block"]; + 21 [label="Function call: R|/foo|()" style="filled" fillcolor=yellow]; + 22 [label="Exit block"]; + } + 23 [label="Exit function " style="filled" fillcolor=red]; + } + 24 [label="Postponed exit from lambda"]; + 25 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 26 [label="Exit default value of z" style="filled" fillcolor=red]; } - 29 [label="Exit function test" style="filled" fillcolor=red]; + 27 [label="Exit default value of z"]; + subgraph cluster_8 { + color=blue + 28 [label="Enter block"]; + 29 [label="Function call: R|/foo|()" style="filled" fillcolor=yellow]; + 30 [label="Exit block"]; + } + 31 [label="Exit function test" style="filled" fillcolor=red]; } - 7 -> {8}; - 8 -> {9 13}; - 8 -> {9} [style=dashed]; 9 -> {10}; - 10 -> {11}; + 10 -> {11 15}; + 10 -> {11} [style=dashed]; 11 -> {12}; 12 -> {13}; 13 -> {14}; - 14 -> {15 25}; - 14 -> {15} [style=dashed]; + 14 -> {15}; 15 -> {16}; - 16 -> {17 23}; - 16 -> {22} [style=dotted]; + 16 -> {17 27}; 16 -> {17} [style=dashed]; 17 -> {18}; - 18 -> {19}; + 18 -> {19 25}; + 18 -> {24} [style=dotted]; + 18 -> {19} [style=dashed]; 19 -> {20}; 20 -> {21}; 21 -> {22}; @@ -91,5 +96,7 @@ digraph defaultArguments_kt { 26 -> {27}; 27 -> {28}; 28 -> {29}; + 29 -> {30}; + 30 -> {31}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/emptyWhen.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/emptyWhen.dot index d7c04d028ae..a9447abc155 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/emptyWhen.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/emptyWhen.dot @@ -5,77 +5,84 @@ digraph emptyWhen_kt { subgraph cluster_0 { color=red - 0 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter block"]; - subgraph cluster_2 { - color=blue - 2 [label="Enter when"]; - 3 [label="Synthetic else branch"]; - 4 [label="Exit when"]; - } - 5 [label="Exit block"]; - } - 6 [label="Exit function test_1" style="filled" fillcolor=red]; + 0 [label="Enter file emptyWhen.kt" style="filled" fillcolor=red]; + 1 [label="Exit file emptyWhen.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_2 { + color=blue + 3 [label="Enter block"]; + subgraph cluster_3 { + color=blue + 4 [label="Enter when"]; + 5 [label="Synthetic else branch"]; + 6 [label="Exit when"]; + } + 7 [label="Exit block"]; + } + 8 [label="Exit function test_1" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; 3 -> {4}; 4 -> {5}; 5 -> {6}; - - subgraph cluster_3 { - color=red - 7 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_4 { - color=blue - 8 [label="Enter block"]; - subgraph cluster_5 { - color=blue - 9 [label="Enter when"]; - 10 [label="Access variable R|/x|"]; - 11 [label="Synthetic else branch"]; - 12 [label="Exit when"]; - } - 13 [label="Exit block"]; - } - 14 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 6 -> {7}; 7 -> {8}; - 8 -> {9}; + + subgraph cluster_4 { + color=red + 9 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_5 { + color=blue + 10 [label="Enter block"]; + subgraph cluster_6 { + color=blue + 11 [label="Enter when"]; + 12 [label="Access variable R|/x|"]; + 13 [label="Synthetic else branch"]; + 14 [label="Exit when"]; + } + 15 [label="Exit block"]; + } + 16 [label="Exit function test_2" style="filled" fillcolor=red]; + } 9 -> {10}; 10 -> {11}; 11 -> {12}; 12 -> {13}; 13 -> {14}; - - subgraph cluster_6 { - color=red - 15 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_7 { - color=blue - 16 [label="Enter block"]; - subgraph cluster_8 { - color=blue - 17 [label="Enter when"]; - 18 [label="Access variable R|/x|"]; - 19 [label="Variable declaration: lval y: R|kotlin/Int|"]; - 20 [label="Synthetic else branch"]; - 21 [label="Exit when"]; - } - 22 [label="Exit block"]; - } - 23 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 14 -> {15}; 15 -> {16}; - 16 -> {17}; + + subgraph cluster_7 { + color=red + 17 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_8 { + color=blue + 18 [label="Enter block"]; + subgraph cluster_9 { + color=blue + 19 [label="Enter when"]; + 20 [label="Access variable R|/x|"]; + 21 [label="Variable declaration: lval y: R|kotlin/Int|"]; + 22 [label="Synthetic else branch"]; + 23 [label="Exit when"]; + } + 24 [label="Exit block"]; + } + 25 [label="Exit function test_3" style="filled" fillcolor=red]; + } 17 -> {18}; 18 -> {19}; 19 -> {20}; 20 -> {21}; 21 -> {22}; 22 -> {23}; + 23 -> {24}; + 24 -> {25}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda.dot index 142ac9814e5..cb0fa8545fc 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda.dot @@ -5,242 +5,247 @@ digraph flowFromInplaceLambda_kt { subgraph cluster_0 { color=red - 0 [label="Enter function unknown" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter block"]; - subgraph cluster_2 { - color=blue - 2 [label="Enter block"]; - 3 [label="Exit block"]; - } - 4 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 5 [label="Jump: ^unknown R|/x|.R|SubstitutionOverride|()"]; - 6 [label="Stub" style="filled" fillcolor=gray]; - 7 [label="Exit block" style="filled" fillcolor=gray]; - } - 8 [label="Exit function unknown" style="filled" fillcolor=red]; + 0 [label="Enter file flowFromInplaceLambda.kt" style="filled" fillcolor=red]; + 1 [label="Exit file flowFromInplaceLambda.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function unknown" style="filled" fillcolor=red]; + subgraph cluster_2 { + color=blue + 3 [label="Enter block"]; + subgraph cluster_3 { + color=blue + 4 [label="Enter block"]; + 5 [label="Exit block"]; + } + 6 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 7 [label="Jump: ^unknown R|/x|.R|SubstitutionOverride|()"]; + 8 [label="Stub" style="filled" fillcolor=gray]; + 9 [label="Exit block" style="filled" fillcolor=gray]; + } + 10 [label="Exit function unknown" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; 3 -> {4}; 4 -> {5}; - 5 -> {8}; - 5 -> {6} [style=dotted]; - 6 -> {7} [style=dotted]; + 5 -> {6}; + 6 -> {7}; + 7 -> {10}; 7 -> {8} [style=dotted]; + 8 -> {9} [style=dotted]; + 9 -> {10} [style=dotted]; - subgraph cluster_3 { + subgraph cluster_4 { color=red - 9 [label="Enter function atLeastOnce" style="filled" fillcolor=red]; - subgraph cluster_4 { + 11 [label="Enter function atLeastOnce" style="filled" fillcolor=red]; + subgraph cluster_5 { color=blue - 10 [label="Enter block"]; - subgraph cluster_5 { + 12 [label="Enter block"]; + subgraph cluster_6 { color=blue - 11 [label="Enter block"]; - 12 [label="Exit block"]; + 13 [label="Enter block"]; + 14 [label="Exit block"]; } - 13 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 14 [label="Jump: ^atLeastOnce R|/x|.R|SubstitutionOverride|()"]; - 15 [label="Stub" style="filled" fillcolor=gray]; - 16 [label="Exit block" style="filled" fillcolor=gray]; + 15 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 16 [label="Jump: ^atLeastOnce R|/x|.R|SubstitutionOverride|()"]; + 17 [label="Stub" style="filled" fillcolor=gray]; + 18 [label="Exit block" style="filled" fillcolor=gray]; } - 17 [label="Exit function atLeastOnce" style="filled" fillcolor=red]; + 19 [label="Exit function atLeastOnce" style="filled" fillcolor=red]; } - 9 -> {10}; - 10 -> {11}; 11 -> {12}; 12 -> {13}; 13 -> {14}; - 14 -> {17}; - 14 -> {15} [style=dotted]; - 15 -> {16} [style=dotted]; + 14 -> {15}; + 15 -> {16}; + 16 -> {19}; 16 -> {17} [style=dotted]; + 17 -> {18} [style=dotted]; + 18 -> {19} [style=dotted]; - subgraph cluster_6 { + subgraph cluster_7 { color=red - 18 [label="Enter function exactlyOnce" style="filled" fillcolor=red]; - subgraph cluster_7 { + 20 [label="Enter function exactlyOnce" style="filled" fillcolor=red]; + subgraph cluster_8 { color=blue - 19 [label="Enter block"]; - subgraph cluster_8 { + 21 [label="Enter block"]; + subgraph cluster_9 { color=blue - 20 [label="Enter block"]; - 21 [label="Exit block"]; + 22 [label="Enter block"]; + 23 [label="Exit block"]; } - 22 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 23 [label="Jump: ^exactlyOnce R|/x|.R|SubstitutionOverride|()"]; - 24 [label="Stub" style="filled" fillcolor=gray]; - 25 [label="Exit block" style="filled" fillcolor=gray]; + 24 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 25 [label="Jump: ^exactlyOnce R|/x|.R|SubstitutionOverride|()"]; + 26 [label="Stub" style="filled" fillcolor=gray]; + 27 [label="Exit block" style="filled" fillcolor=gray]; } - 26 [label="Exit function exactlyOnce" style="filled" fillcolor=red]; + 28 [label="Exit function exactlyOnce" style="filled" fillcolor=red]; } - 18 -> {19}; - 19 -> {20}; 20 -> {21}; 21 -> {22}; 22 -> {23}; - 23 -> {26}; - 23 -> {24} [style=dotted]; - 24 -> {25} [style=dotted]; + 23 -> {24}; + 24 -> {25}; + 25 -> {28}; 25 -> {26} [style=dotted]; + 26 -> {27} [style=dotted]; + 27 -> {28} [style=dotted]; - subgraph cluster_9 { + subgraph cluster_10 { color=red - 27 [label="Enter function atMostOnce" style="filled" fillcolor=red]; - subgraph cluster_10 { + 29 [label="Enter function atMostOnce" style="filled" fillcolor=red]; + subgraph cluster_11 { color=blue - 28 [label="Enter block"]; - subgraph cluster_11 { + 30 [label="Enter block"]; + subgraph cluster_12 { color=blue - 29 [label="Enter block"]; - 30 [label="Exit block"]; + 31 [label="Enter block"]; + 32 [label="Exit block"]; } - 31 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 32 [label="Jump: ^atMostOnce R|/x|.R|SubstitutionOverride|()"]; - 33 [label="Stub" style="filled" fillcolor=gray]; - 34 [label="Exit block" style="filled" fillcolor=gray]; + 33 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 34 [label="Jump: ^atMostOnce R|/x|.R|SubstitutionOverride|()"]; + 35 [label="Stub" style="filled" fillcolor=gray]; + 36 [label="Exit block" style="filled" fillcolor=gray]; } - 35 [label="Exit function atMostOnce" style="filled" fillcolor=red]; + 37 [label="Exit function atMostOnce" style="filled" fillcolor=red]; } - 27 -> {28}; - 28 -> {29}; 29 -> {30}; 30 -> {31}; 31 -> {32}; - 32 -> {35}; - 32 -> {33} [style=dotted]; - 33 -> {34} [style=dotted]; + 32 -> {33}; + 33 -> {34}; + 34 -> {37}; 34 -> {35} [style=dotted]; + 35 -> {36} [style=dotted]; + 36 -> {37} [style=dotted]; - subgraph cluster_12 { + subgraph cluster_13 { color=red - 36 [label="Enter function noContract" style="filled" fillcolor=red]; - subgraph cluster_13 { + 38 [label="Enter function noContract" style="filled" fillcolor=red]; + subgraph cluster_14 { color=blue - 37 [label="Enter block"]; - 38 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 39 [label="Jump: ^noContract R|/x|.R|SubstitutionOverride|()"]; - 40 [label="Stub" style="filled" fillcolor=gray]; - 41 [label="Exit block" style="filled" fillcolor=gray]; + 39 [label="Enter block"]; + 40 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 41 [label="Jump: ^noContract R|/x|.R|SubstitutionOverride|()"]; + 42 [label="Stub" style="filled" fillcolor=gray]; + 43 [label="Exit block" style="filled" fillcolor=gray]; } - 42 [label="Exit function noContract" style="filled" fillcolor=red]; + 44 [label="Exit function noContract" style="filled" fillcolor=red]; } - 36 -> {37}; - 37 -> {38}; 38 -> {39}; - 39 -> {42}; - 39 -> {40} [style=dotted]; - 40 -> {41} [style=dotted]; + 39 -> {40}; + 40 -> {41}; + 41 -> {44}; 41 -> {42} [style=dotted]; + 42 -> {43} [style=dotted]; + 43 -> {44} [style=dotted]; - subgraph cluster_14 { + subgraph cluster_15 { color=red - 43 [label="Enter function select" style="filled" fillcolor=red]; - subgraph cluster_15 { + 45 [label="Enter function select" style="filled" fillcolor=red]; + subgraph cluster_16 { color=blue - 44 [label="Enter block"]; - 45 [label="Access variable R|/x|"]; - 46 [label="Const: Int(0)"]; - 47 [label="Function call: R|/x|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; - 48 [label="Jump: ^select R|/x|.R|SubstitutionOverride|(Int(0))"]; - 49 [label="Stub" style="filled" fillcolor=gray]; - 50 [label="Exit block" style="filled" fillcolor=gray]; + 46 [label="Enter block"]; + 47 [label="Access variable R|/x|"]; + 48 [label="Const: Int(0)"]; + 49 [label="Function call: R|/x|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; + 50 [label="Jump: ^select R|/x|.R|SubstitutionOverride|(Int(0))"]; + 51 [label="Stub" style="filled" fillcolor=gray]; + 52 [label="Exit block" style="filled" fillcolor=gray]; } - 51 [label="Exit function select" style="filled" fillcolor=red]; + 53 [label="Exit function select" style="filled" fillcolor=red]; } - 43 -> {44}; - 44 -> {45}; 45 -> {46}; 46 -> {47}; 47 -> {48}; - 48 -> {51}; - 48 -> {49} [style=dotted]; - 49 -> {50} [style=dotted]; + 48 -> {49}; + 49 -> {50}; + 50 -> {53}; 50 -> {51} [style=dotted]; + 51 -> {52} [style=dotted]; + 52 -> {53} [style=dotted]; - subgraph cluster_16 { + subgraph cluster_17 { color=red - 52 [label="Enter function id" style="filled" fillcolor=red]; - subgraph cluster_17 { + 54 [label="Enter function id" style="filled" fillcolor=red]; + subgraph cluster_18 { color=blue - 53 [label="Enter block"]; - 54 [label="Access variable R|/x|"]; - 55 [label="Jump: ^id R|/x|"]; - 56 [label="Stub" style="filled" fillcolor=gray]; - 57 [label="Exit block" style="filled" fillcolor=gray]; + 55 [label="Enter block"]; + 56 [label="Access variable R|/x|"]; + 57 [label="Jump: ^id R|/x|"]; + 58 [label="Stub" style="filled" fillcolor=gray]; + 59 [label="Exit block" style="filled" fillcolor=gray]; } - 58 [label="Exit function id" style="filled" fillcolor=red]; + 60 [label="Exit function id" style="filled" fillcolor=red]; } - 52 -> {53}; - 53 -> {54}; 54 -> {55}; - 55 -> {58}; - 55 -> {56} [style=dotted]; - 56 -> {57} [style=dotted]; + 55 -> {56}; + 56 -> {57}; + 57 -> {60}; 57 -> {58} [style=dotted]; + 58 -> {59} [style=dotted]; + 59 -> {60} [style=dotted]; - subgraph cluster_18 { + subgraph cluster_19 { color=red - 59 [label="Enter function materialize" style="filled" fillcolor=red]; - subgraph cluster_19 { + 61 [label="Enter function materialize" style="filled" fillcolor=red]; + subgraph cluster_20 { color=blue - 60 [label="Enter block"]; - 61 [label="Const: Null(null)"]; - 62 [label="Check not null: Null(null)!!" style="filled" fillcolor=yellow]; - 63 [label="Stub" style="filled" fillcolor=gray]; - 64 [label="Jump: ^materialize Null(null)!!" style="filled" fillcolor=gray]; + 62 [label="Enter block"]; + 63 [label="Const: Null(null)"]; + 64 [label="Check not null: Null(null)!!" style="filled" fillcolor=yellow]; 65 [label="Stub" style="filled" fillcolor=gray]; - 66 [label="Exit block" style="filled" fillcolor=gray]; + 66 [label="Jump: ^materialize Null(null)!!" style="filled" fillcolor=gray]; + 67 [label="Stub" style="filled" fillcolor=gray]; + 68 [label="Exit block" style="filled" fillcolor=gray]; } - 67 [label="Exit function materialize" style="filled" fillcolor=gray]; + 69 [label="Exit function materialize" style="filled" fillcolor=gray]; } - 59 -> {60}; - 60 -> {61}; 61 -> {62}; - 62 -> {63} [style=dotted]; - 63 -> {64} [style=dotted]; - 64 -> {65 67} [style=dotted]; + 62 -> {63}; + 63 -> {64}; + 64 -> {65} [style=dotted]; 65 -> {66} [style=dotted]; - 66 -> {67} [style=dotted]; + 66 -> {67 69} [style=dotted]; + 67 -> {68} [style=dotted]; + 68 -> {69} [style=dotted]; - subgraph cluster_20 { + subgraph cluster_21 { color=red - 68 [label="Enter function basic" style="filled" fillcolor=red]; - subgraph cluster_21 { + 70 [label="Enter function basic" style="filled" fillcolor=red]; + subgraph cluster_22 { color=blue - 69 [label="Enter block"]; - 70 [label="Postponed enter to lambda"]; - subgraph cluster_22 { + 71 [label="Enter block"]; + 72 [label="Postponed enter to lambda"]; + subgraph cluster_23 { color=blue - 71 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_23 { + 73 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_24 { color=blue - 72 [label="Enter block"]; - 73 [label="Access variable R|/x|"]; - 74 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 75 [label="Exit block"]; + 74 [label="Enter block"]; + 75 [label="Access variable R|/x|"]; + 76 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 77 [label="Exit block"]; } - 76 [label="Exit function " style="filled" fillcolor=red]; + 78 [label="Exit function " style="filled" fillcolor=red]; } - 77 [label="Postponed exit from lambda"]; - 78 [label="Function call: R|/exactlyOnce|(...)" style="filled" fillcolor=yellow]; - 79 [label="Access variable R|/x|"]; - 80 [label="Smart cast: R|/x|"]; - 81 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 82 [label="Exit block"]; + 79 [label="Postponed exit from lambda"]; + 80 [label="Function call: R|/exactlyOnce|(...)" style="filled" fillcolor=yellow]; + 81 [label="Access variable R|/x|"]; + 82 [label="Smart cast: R|/x|"]; + 83 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 84 [label="Exit block"]; } - 83 [label="Exit function basic" style="filled" fillcolor=red]; + 85 [label="Exit function basic" style="filled" fillcolor=red]; } - 68 -> {69}; - 69 -> {70}; - 70 -> {71 78}; - 70 -> {77} [style=dotted]; - 70 -> {71} [style=dashed]; + 70 -> {71}; 71 -> {72}; - 72 -> {73}; + 72 -> {73 80}; + 72 -> {79} [style=dotted]; + 72 -> {73} [style=dashed]; 73 -> {74}; 74 -> {75}; 75 -> {76}; @@ -251,88 +256,88 @@ digraph flowFromInplaceLambda_kt { 80 -> {81}; 81 -> {82}; 82 -> {83}; - - subgraph cluster_24 { - color=red - 84 [label="Enter function completedCallExactlyOnce" style="filled" fillcolor=red]; - subgraph cluster_25 { - color=blue - 85 [label="Enter block"]; - 86 [label="Postponed enter to lambda"]; - subgraph cluster_26 { - color=blue - 87 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_27 { - color=blue - 88 [label="Enter block"]; - 89 [label="Access variable R|/y|"]; - 90 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 91 [label="Access variable R|/x|"]; - 92 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 93 [label="Exit block"]; - } - 94 [label="Exit function " style="filled" fillcolor=red]; - } - 95 [label="Postponed exit from lambda"]; - 96 [label="Function call: R|/exactlyOnce|(...)" style="filled" fillcolor=yellow]; - 97 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 98 [label="Access variable R|/y|"]; - 99 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; - 100 [label="Postponed enter to lambda"]; - subgraph cluster_28 { - color=blue - 101 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_29 { - color=blue - 102 [label="Enter block"]; - 103 [label="Access variable R|/x|"]; - 104 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 105 [label="Access variable R|/y|"]; - 106 [label="Smart cast: R|/y|"]; - 107 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 108 [label="Const: Int(1)"]; - 109 [label="Exit block"]; - } - 110 [label="Exit function " style="filled" fillcolor=red]; - } - 111 [label="Postponed exit from lambda"]; - 112 [label="Function call: R|/exactlyOnce|(...)" style="filled" fillcolor=yellow]; - 113 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; - 114 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 115 [label="Access variable R|/x|"]; - 116 [label="Smart cast: R|/x|"]; - 117 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 118 [label="Access variable R|/y|"]; - 119 [label="Smart cast: R|/y|"]; - 120 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 121 [label="Exit block"]; - } - 122 [label="Exit function completedCallExactlyOnce" style="filled" fillcolor=red]; - } + 83 -> {84}; 84 -> {85}; - 85 -> {86}; - 86 -> {87 96}; - 86 -> {95} [style=dotted]; - 86 -> {87} [style=dashed]; + + subgraph cluster_25 { + color=red + 86 [label="Enter function completedCallExactlyOnce" style="filled" fillcolor=red]; + subgraph cluster_26 { + color=blue + 87 [label="Enter block"]; + 88 [label="Postponed enter to lambda"]; + subgraph cluster_27 { + color=blue + 89 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_28 { + color=blue + 90 [label="Enter block"]; + 91 [label="Access variable R|/y|"]; + 92 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + 93 [label="Access variable R|/x|"]; + 94 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 95 [label="Exit block"]; + } + 96 [label="Exit function " style="filled" fillcolor=red]; + } + 97 [label="Postponed exit from lambda"]; + 98 [label="Function call: R|/exactlyOnce|(...)" style="filled" fillcolor=yellow]; + 99 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 100 [label="Access variable R|/y|"]; + 101 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; + 102 [label="Postponed enter to lambda"]; + subgraph cluster_29 { + color=blue + 103 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_30 { + color=blue + 104 [label="Enter block"]; + 105 [label="Access variable R|/x|"]; + 106 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 107 [label="Access variable R|/y|"]; + 108 [label="Smart cast: R|/y|"]; + 109 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 110 [label="Const: Int(1)"]; + 111 [label="Exit block"]; + } + 112 [label="Exit function " style="filled" fillcolor=red]; + } + 113 [label="Postponed exit from lambda"]; + 114 [label="Function call: R|/exactlyOnce|(...)" style="filled" fillcolor=yellow]; + 115 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; + 116 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 117 [label="Access variable R|/x|"]; + 118 [label="Smart cast: R|/x|"]; + 119 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 120 [label="Access variable R|/y|"]; + 121 [label="Smart cast: R|/y|"]; + 122 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 123 [label="Exit block"]; + } + 124 [label="Exit function completedCallExactlyOnce" style="filled" fillcolor=red]; + } + 86 -> {87}; 87 -> {88}; - 88 -> {89}; + 88 -> {89 98}; + 88 -> {97} [style=dotted]; + 88 -> {89} [style=dashed]; 89 -> {90}; 90 -> {91}; 91 -> {92}; 92 -> {93}; 93 -> {94}; 94 -> {95}; - 95 -> {96} [color=green]; - 95 -> {113} [color=red]; + 95 -> {96}; 96 -> {97}; - 97 -> {98}; + 97 -> {98} [color=green]; + 97 -> {115} [color=red]; 98 -> {99}; 99 -> {100}; - 100 -> {101 112}; - 100 -> {111} [style=dotted]; - 100 -> {101} [style=dashed]; + 100 -> {101}; 101 -> {102}; - 102 -> {103}; + 102 -> {103 114}; + 102 -> {113} [style=dotted]; + 102 -> {103} [style=dashed]; 103 -> {104}; 104 -> {105}; 105 -> {106}; @@ -341,10 +346,10 @@ digraph flowFromInplaceLambda_kt { 108 -> {109}; 109 -> {110}; 110 -> {111}; - 111 -> {112} [color=green]; - 111 -> {113} [color=red]; + 111 -> {112}; 112 -> {113}; - 113 -> {114}; + 113 -> {114} [color=green]; + 113 -> {115} [color=red]; 114 -> {115}; 115 -> {116}; 116 -> {117}; @@ -353,89 +358,89 @@ digraph flowFromInplaceLambda_kt { 119 -> {120}; 120 -> {121}; 121 -> {122}; - - subgraph cluster_30 { - color=red - 123 [label="Enter function completedCallAtLeastOnce" style="filled" fillcolor=red]; - subgraph cluster_31 { - color=blue - 124 [label="Enter block"]; - 125 [label="Postponed enter to lambda"]; - subgraph cluster_32 { - color=blue - 126 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_33 { - color=blue - 127 [label="Enter block"]; - 128 [label="Access variable R|/y|"]; - 129 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 130 [label="Access variable R|/x|"]; - 131 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 132 [label="Exit block"]; - } - 133 [label="Exit function " style="filled" fillcolor=red]; - } - 134 [label="Postponed exit from lambda"]; - 135 [label="Function call: R|/atLeastOnce|(...)" style="filled" fillcolor=yellow]; - 136 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 137 [label="Access variable R|/y|"]; - 138 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; - 139 [label="Postponed enter to lambda"]; - subgraph cluster_34 { - color=blue - 140 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_35 { - color=blue - 141 [label="Enter block"]; - 142 [label="Access variable R|/x|"]; - 143 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 144 [label="Access variable R|/y|"]; - 145 [label="Smart cast: R|/y|"]; - 146 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 147 [label="Const: Int(1)"]; - 148 [label="Exit block"]; - } - 149 [label="Exit function " style="filled" fillcolor=red]; - } - 150 [label="Postponed exit from lambda"]; - 151 [label="Function call: R|/atLeastOnce|(...)" style="filled" fillcolor=yellow]; - 152 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; - 153 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 154 [label="Access variable R|/x|"]; - 155 [label="Smart cast: R|/x|"]; - 156 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 157 [label="Access variable R|/y|"]; - 158 [label="Smart cast: R|/y|"]; - 159 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 160 [label="Exit block"]; - } - 161 [label="Exit function completedCallAtLeastOnce" style="filled" fillcolor=red]; - } + 122 -> {123}; 123 -> {124}; - 124 -> {125}; - 125 -> {126 135}; - 125 -> {134} [style=dotted]; - 125 -> {126} [style=dashed]; + + subgraph cluster_31 { + color=red + 125 [label="Enter function completedCallAtLeastOnce" style="filled" fillcolor=red]; + subgraph cluster_32 { + color=blue + 126 [label="Enter block"]; + 127 [label="Postponed enter to lambda"]; + subgraph cluster_33 { + color=blue + 128 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_34 { + color=blue + 129 [label="Enter block"]; + 130 [label="Access variable R|/y|"]; + 131 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + 132 [label="Access variable R|/x|"]; + 133 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 134 [label="Exit block"]; + } + 135 [label="Exit function " style="filled" fillcolor=red]; + } + 136 [label="Postponed exit from lambda"]; + 137 [label="Function call: R|/atLeastOnce|(...)" style="filled" fillcolor=yellow]; + 138 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 139 [label="Access variable R|/y|"]; + 140 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; + 141 [label="Postponed enter to lambda"]; + subgraph cluster_35 { + color=blue + 142 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_36 { + color=blue + 143 [label="Enter block"]; + 144 [label="Access variable R|/x|"]; + 145 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 146 [label="Access variable R|/y|"]; + 147 [label="Smart cast: R|/y|"]; + 148 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 149 [label="Const: Int(1)"]; + 150 [label="Exit block"]; + } + 151 [label="Exit function " style="filled" fillcolor=red]; + } + 152 [label="Postponed exit from lambda"]; + 153 [label="Function call: R|/atLeastOnce|(...)" style="filled" fillcolor=yellow]; + 154 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; + 155 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 156 [label="Access variable R|/x|"]; + 157 [label="Smart cast: R|/x|"]; + 158 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 159 [label="Access variable R|/y|"]; + 160 [label="Smart cast: R|/y|"]; + 161 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 162 [label="Exit block"]; + } + 163 [label="Exit function completedCallAtLeastOnce" style="filled" fillcolor=red]; + } + 125 -> {126}; 126 -> {127}; - 127 -> {128}; + 127 -> {128 137}; + 127 -> {136} [style=dotted]; + 127 -> {128} [style=dashed]; 128 -> {129}; 129 -> {130}; 130 -> {131}; 131 -> {132}; 132 -> {133}; 133 -> {134}; - 134 -> {125} [color=green style=dashed]; - 134 -> {135} [color=green]; - 134 -> {152} [color=red]; + 134 -> {135}; 135 -> {136}; - 136 -> {137}; + 136 -> {127} [color=green style=dashed]; + 136 -> {137} [color=green]; + 136 -> {154} [color=red]; 137 -> {138}; 138 -> {139}; - 139 -> {140 151}; - 139 -> {150} [style=dotted]; - 139 -> {140} [style=dashed]; + 139 -> {140}; 140 -> {141}; - 141 -> {142}; + 141 -> {142 153}; + 141 -> {152} [style=dotted]; + 141 -> {142} [style=dashed]; 142 -> {143}; 143 -> {144}; 144 -> {145}; @@ -444,11 +449,11 @@ digraph flowFromInplaceLambda_kt { 147 -> {148}; 148 -> {149}; 149 -> {150}; - 150 -> {139} [color=green style=dashed]; - 150 -> {151} [color=green]; - 150 -> {152} [color=red]; + 150 -> {151}; 151 -> {152}; - 152 -> {153}; + 152 -> {141} [color=green style=dashed]; + 152 -> {153} [color=green]; + 152 -> {154} [color=red]; 153 -> {154}; 154 -> {155}; 155 -> {156}; @@ -457,85 +462,85 @@ digraph flowFromInplaceLambda_kt { 158 -> {159}; 159 -> {160}; 160 -> {161}; - - subgraph cluster_36 { - color=red - 162 [label="Enter function completedCallAtMostOnce" style="filled" fillcolor=red]; - subgraph cluster_37 { - color=blue - 163 [label="Enter block"]; - 164 [label="Postponed enter to lambda"]; - subgraph cluster_38 { - color=blue - 165 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_39 { - color=blue - 166 [label="Enter block"]; - 167 [label="Access variable R|/y|"]; - 168 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 169 [label="Access variable R|/x|"]; - 170 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 171 [label="Exit block"]; - } - 172 [label="Exit function " style="filled" fillcolor=red]; - } - 173 [label="Postponed exit from lambda"]; - 174 [label="Function call: R|/atMostOnce|(...)" style="filled" fillcolor=yellow]; - 175 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 176 [label="Access variable R|/y|"]; - 177 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; - 178 [label="Postponed enter to lambda"]; - subgraph cluster_40 { - color=blue - 179 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_41 { - color=blue - 180 [label="Enter block"]; - 181 [label="Access variable R|/x|"]; - 182 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 183 [label="Access variable R|/y|"]; - 184 [label="Smart cast: R|/y|"]; - 185 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 186 [label="Const: Int(1)"]; - 187 [label="Exit block"]; - } - 188 [label="Exit function " style="filled" fillcolor=red]; - } - 189 [label="Postponed exit from lambda"]; - 190 [label="Function call: R|/atMostOnce|(...)" style="filled" fillcolor=yellow]; - 191 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; - 192 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 193 [label="Access variable R|/x|"]; - 194 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 195 [label="Access variable R|/y|"]; - 196 [label="Smart cast: R|/y|"]; - 197 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 198 [label="Exit block"]; - } - 199 [label="Exit function completedCallAtMostOnce" style="filled" fillcolor=red]; - } + 161 -> {162}; 162 -> {163}; - 163 -> {164}; - 164 -> {165 173 174}; - 164 -> {165} [style=dashed]; + + subgraph cluster_37 { + color=red + 164 [label="Enter function completedCallAtMostOnce" style="filled" fillcolor=red]; + subgraph cluster_38 { + color=blue + 165 [label="Enter block"]; + 166 [label="Postponed enter to lambda"]; + subgraph cluster_39 { + color=blue + 167 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_40 { + color=blue + 168 [label="Enter block"]; + 169 [label="Access variable R|/y|"]; + 170 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + 171 [label="Access variable R|/x|"]; + 172 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 173 [label="Exit block"]; + } + 174 [label="Exit function " style="filled" fillcolor=red]; + } + 175 [label="Postponed exit from lambda"]; + 176 [label="Function call: R|/atMostOnce|(...)" style="filled" fillcolor=yellow]; + 177 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 178 [label="Access variable R|/y|"]; + 179 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; + 180 [label="Postponed enter to lambda"]; + subgraph cluster_41 { + color=blue + 181 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_42 { + color=blue + 182 [label="Enter block"]; + 183 [label="Access variable R|/x|"]; + 184 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 185 [label="Access variable R|/y|"]; + 186 [label="Smart cast: R|/y|"]; + 187 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 188 [label="Const: Int(1)"]; + 189 [label="Exit block"]; + } + 190 [label="Exit function " style="filled" fillcolor=red]; + } + 191 [label="Postponed exit from lambda"]; + 192 [label="Function call: R|/atMostOnce|(...)" style="filled" fillcolor=yellow]; + 193 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; + 194 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 195 [label="Access variable R|/x|"]; + 196 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 197 [label="Access variable R|/y|"]; + 198 [label="Smart cast: R|/y|"]; + 199 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 200 [label="Exit block"]; + } + 201 [label="Exit function completedCallAtMostOnce" style="filled" fillcolor=red]; + } + 164 -> {165}; 165 -> {166}; - 166 -> {167}; + 166 -> {167 175 176}; + 166 -> {167} [style=dashed]; 167 -> {168}; 168 -> {169}; 169 -> {170}; 170 -> {171}; 171 -> {172}; 172 -> {173}; - 173 -> {174} [color=green]; - 173 -> {191} [color=red]; + 173 -> {174}; 174 -> {175}; - 175 -> {176}; + 175 -> {176} [color=green]; + 175 -> {193} [color=red]; 176 -> {177}; 177 -> {178}; - 178 -> {179 189 190}; - 178 -> {179} [style=dashed]; + 178 -> {179}; 179 -> {180}; - 180 -> {181}; + 180 -> {181 191 192}; + 180 -> {181} [style=dashed]; 181 -> {182}; 182 -> {183}; 183 -> {184}; @@ -544,10 +549,10 @@ digraph flowFromInplaceLambda_kt { 186 -> {187}; 187 -> {188}; 188 -> {189}; - 189 -> {190} [color=green]; - 189 -> {191} [color=red]; + 189 -> {190}; 190 -> {191}; - 191 -> {192}; + 191 -> {192} [color=green]; + 191 -> {193} [color=red]; 192 -> {193}; 193 -> {194}; 194 -> {195}; @@ -555,86 +560,86 @@ digraph flowFromInplaceLambda_kt { 196 -> {197}; 197 -> {198}; 198 -> {199}; - - subgraph cluster_42 { - color=red - 200 [label="Enter function completedCallUnknown" style="filled" fillcolor=red]; - subgraph cluster_43 { - color=blue - 201 [label="Enter block"]; - 202 [label="Postponed enter to lambda"]; - subgraph cluster_44 { - color=blue - 203 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_45 { - color=blue - 204 [label="Enter block"]; - 205 [label="Access variable R|/y|"]; - 206 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 207 [label="Access variable R|/x|"]; - 208 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 209 [label="Exit block"]; - } - 210 [label="Exit function " style="filled" fillcolor=red]; - } - 211 [label="Postponed exit from lambda"]; - 212 [label="Function call: R|/unknown|(...)" style="filled" fillcolor=yellow]; - 213 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 214 [label="Access variable R|/y|"]; - 215 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; - 216 [label="Postponed enter to lambda"]; - subgraph cluster_46 { - color=blue - 217 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_47 { - color=blue - 218 [label="Enter block"]; - 219 [label="Access variable R|/x|"]; - 220 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 221 [label="Access variable R|/y|"]; - 222 [label="Smart cast: R|/y|"]; - 223 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 224 [label="Const: Int(1)"]; - 225 [label="Exit block"]; - } - 226 [label="Exit function " style="filled" fillcolor=red]; - } - 227 [label="Postponed exit from lambda"]; - 228 [label="Function call: R|/unknown|(...)" style="filled" fillcolor=yellow]; - 229 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; - 230 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 231 [label="Access variable R|/x|"]; - 232 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 233 [label="Access variable R|/y|"]; - 234 [label="Smart cast: R|/y|"]; - 235 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 236 [label="Exit block"]; - } - 237 [label="Exit function completedCallUnknown" style="filled" fillcolor=red]; - } + 199 -> {200}; 200 -> {201}; - 201 -> {202}; - 202 -> {203 211 212}; - 202 -> {203} [style=dashed]; + + subgraph cluster_43 { + color=red + 202 [label="Enter function completedCallUnknown" style="filled" fillcolor=red]; + subgraph cluster_44 { + color=blue + 203 [label="Enter block"]; + 204 [label="Postponed enter to lambda"]; + subgraph cluster_45 { + color=blue + 205 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_46 { + color=blue + 206 [label="Enter block"]; + 207 [label="Access variable R|/y|"]; + 208 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + 209 [label="Access variable R|/x|"]; + 210 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 211 [label="Exit block"]; + } + 212 [label="Exit function " style="filled" fillcolor=red]; + } + 213 [label="Postponed exit from lambda"]; + 214 [label="Function call: R|/unknown|(...)" style="filled" fillcolor=yellow]; + 215 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 216 [label="Access variable R|/y|"]; + 217 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; + 218 [label="Postponed enter to lambda"]; + subgraph cluster_47 { + color=blue + 219 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_48 { + color=blue + 220 [label="Enter block"]; + 221 [label="Access variable R|/x|"]; + 222 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 223 [label="Access variable R|/y|"]; + 224 [label="Smart cast: R|/y|"]; + 225 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 226 [label="Const: Int(1)"]; + 227 [label="Exit block"]; + } + 228 [label="Exit function " style="filled" fillcolor=red]; + } + 229 [label="Postponed exit from lambda"]; + 230 [label="Function call: R|/unknown|(...)" style="filled" fillcolor=yellow]; + 231 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; + 232 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 233 [label="Access variable R|/x|"]; + 234 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 235 [label="Access variable R|/y|"]; + 236 [label="Smart cast: R|/y|"]; + 237 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 238 [label="Exit block"]; + } + 239 [label="Exit function completedCallUnknown" style="filled" fillcolor=red]; + } + 202 -> {203}; 203 -> {204}; - 204 -> {205}; + 204 -> {205 213 214}; + 204 -> {205} [style=dashed]; 205 -> {206}; 206 -> {207}; 207 -> {208}; 208 -> {209}; 209 -> {210}; 210 -> {211}; - 211 -> {202} [color=green style=dashed]; - 211 -> {212} [color=green]; - 211 -> {229} [color=red]; + 211 -> {212}; 212 -> {213}; - 213 -> {214}; + 213 -> {204} [color=green style=dashed]; + 213 -> {214} [color=green]; + 213 -> {231} [color=red]; 214 -> {215}; 215 -> {216}; - 216 -> {217 227 228}; - 216 -> {217} [style=dashed]; + 216 -> {217}; 217 -> {218}; - 218 -> {219}; + 218 -> {219 229 230}; + 218 -> {219} [style=dashed]; 219 -> {220}; 220 -> {221}; 221 -> {222}; @@ -643,11 +648,11 @@ digraph flowFromInplaceLambda_kt { 224 -> {225}; 225 -> {226}; 226 -> {227}; - 227 -> {216} [color=green style=dashed]; - 227 -> {228} [color=green]; - 227 -> {229} [color=red]; + 227 -> {228}; 228 -> {229}; - 229 -> {230}; + 229 -> {218} [color=green style=dashed]; + 229 -> {230} [color=green]; + 229 -> {231} [color=red]; 230 -> {231}; 231 -> {232}; 232 -> {233}; @@ -655,84 +660,84 @@ digraph flowFromInplaceLambda_kt { 234 -> {235}; 235 -> {236}; 236 -> {237}; - - subgraph cluster_48 { - color=red - 238 [label="Enter function completedCallNoContract" style="filled" fillcolor=red]; - subgraph cluster_49 { - color=blue - 239 [label="Enter block"]; - 240 [label="Postponed enter to lambda"]; - subgraph cluster_50 { - color=blue - 241 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_51 { - color=blue - 242 [label="Enter block"]; - 243 [label="Access variable R|/y|"]; - 244 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 245 [label="Access variable R|/x|"]; - 246 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 247 [label="Exit block"]; - } - 248 [label="Exit function " style="filled" fillcolor=red]; - } - 249 [label="Postponed exit from lambda"]; - 250 [label="Function call: R|/noContract|(...)" style="filled" fillcolor=yellow]; - 251 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 252 [label="Access variable R|/y|"]; - 253 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; - 254 [label="Postponed enter to lambda"]; - subgraph cluster_52 { - color=blue - 255 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_53 { - color=blue - 256 [label="Enter block"]; - 257 [label="Access variable R|/x|"]; - 258 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 259 [label="Access variable R|/y|"]; - 260 [label="Smart cast: R|/y|"]; - 261 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 262 [label="Const: Int(1)"]; - 263 [label="Exit block"]; - } - 264 [label="Exit function " style="filled" fillcolor=red]; - } - 265 [label="Postponed exit from lambda"]; - 266 [label="Function call: R|/noContract|(...)" style="filled" fillcolor=yellow]; - 267 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; - 268 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 269 [label="Access variable R|/x|"]; - 270 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 271 [label="Access variable R|/y|"]; - 272 [label="Smart cast: R|/y|"]; - 273 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 274 [label="Exit block"]; - } - 275 [label="Exit function completedCallNoContract" style="filled" fillcolor=red]; - } + 237 -> {238}; 238 -> {239}; - 239 -> {240}; - 240 -> {241 249 250}; - 240 -> {241} [style=dashed]; + + subgraph cluster_49 { + color=red + 240 [label="Enter function completedCallNoContract" style="filled" fillcolor=red]; + subgraph cluster_50 { + color=blue + 241 [label="Enter block"]; + 242 [label="Postponed enter to lambda"]; + subgraph cluster_51 { + color=blue + 243 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_52 { + color=blue + 244 [label="Enter block"]; + 245 [label="Access variable R|/y|"]; + 246 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + 247 [label="Access variable R|/x|"]; + 248 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 249 [label="Exit block"]; + } + 250 [label="Exit function " style="filled" fillcolor=red]; + } + 251 [label="Postponed exit from lambda"]; + 252 [label="Function call: R|/noContract|(...)" style="filled" fillcolor=yellow]; + 253 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 254 [label="Access variable R|/y|"]; + 255 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; + 256 [label="Postponed enter to lambda"]; + subgraph cluster_53 { + color=blue + 257 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_54 { + color=blue + 258 [label="Enter block"]; + 259 [label="Access variable R|/x|"]; + 260 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 261 [label="Access variable R|/y|"]; + 262 [label="Smart cast: R|/y|"]; + 263 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 264 [label="Const: Int(1)"]; + 265 [label="Exit block"]; + } + 266 [label="Exit function " style="filled" fillcolor=red]; + } + 267 [label="Postponed exit from lambda"]; + 268 [label="Function call: R|/noContract|(...)" style="filled" fillcolor=yellow]; + 269 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; + 270 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 271 [label="Access variable R|/x|"]; + 272 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 273 [label="Access variable R|/y|"]; + 274 [label="Smart cast: R|/y|"]; + 275 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 276 [label="Exit block"]; + } + 277 [label="Exit function completedCallNoContract" style="filled" fillcolor=red]; + } + 240 -> {241}; 241 -> {242}; - 242 -> {243}; + 242 -> {243 251 252}; + 242 -> {243} [style=dashed]; 243 -> {244}; 244 -> {245}; 245 -> {246}; 246 -> {247}; 247 -> {248}; - 249 -> {250} [color=green]; - 249 -> {267} [color=red]; - 250 -> {251}; - 251 -> {252}; + 248 -> {249}; + 249 -> {250}; + 251 -> {252} [color=green]; + 251 -> {269} [color=red]; 252 -> {253}; 253 -> {254}; - 254 -> {255 265 266}; - 254 -> {255} [style=dashed]; + 254 -> {255}; 255 -> {256}; - 256 -> {257}; + 256 -> {257 267 268}; + 256 -> {257} [style=dashed]; 257 -> {258}; 258 -> {259}; 259 -> {260}; @@ -740,10 +745,10 @@ digraph flowFromInplaceLambda_kt { 261 -> {262}; 262 -> {263}; 263 -> {264}; - 265 -> {266} [color=green]; - 265 -> {267} [color=red]; - 266 -> {267}; - 267 -> {268}; + 264 -> {265}; + 265 -> {266}; + 267 -> {268} [color=green]; + 267 -> {269} [color=red]; 268 -> {269}; 269 -> {270}; 270 -> {271}; @@ -751,75 +756,75 @@ digraph flowFromInplaceLambda_kt { 272 -> {273}; 273 -> {274}; 274 -> {275}; - - subgraph cluster_54 { - color=red - 276 [label="Enter function incompleteCallExactlyOnce" style="filled" fillcolor=red]; - subgraph cluster_55 { - color=blue - 277 [label="Enter block"]; - 278 [label="Postponed enter to lambda"]; - subgraph cluster_56 { - color=blue - 279 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_57 { - color=blue - 280 [label="Enter block"]; - 281 [label="Access variable R|/x|"]; - 282 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 283 [label="Access variable R|/y|"]; - 284 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 285 [label="Access variable R|/x|"]; - 286 [label="Smart cast: R|/x|"]; - 287 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 288 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; - 289 [label="Exit block"]; - } - 290 [label="Exit function " style="filled" fillcolor=red]; - } - 291 [label="Postponed exit from lambda"]; - 292 [label="Function call: R|/exactlyOnce|(...)" style="filled" fillcolor=yellow]; - 293 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 294 [label="Postponed enter to lambda"]; - subgraph cluster_58 { - color=blue - 295 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_59 { - color=blue - 296 [label="Enter block"]; - 297 [label="Access variable R|/y|"]; - 298 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; - 299 [label="Access variable R|/x|"]; - 300 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 301 [label="Access variable R|/y|"]; - 302 [label="Smart cast: R|/y|"]; - 303 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 304 [label="Const: Int(1)"]; - 305 [label="Exit block"]; - } - 306 [label="Exit function " style="filled" fillcolor=red]; - } - 307 [label="Postponed exit from lambda"]; - 308 [label="Function call: R|/exactlyOnce|(...)" style="filled" fillcolor=yellow]; - 309 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; - 310 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 311 [label="Access variable R|/x|"]; - 312 [label="Smart cast: R|/x|"]; - 313 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 314 [label="Access variable R|/y|"]; - 315 [label="Smart cast: R|/y|"]; - 316 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 317 [label="Exit block"]; - } - 318 [label="Exit function incompleteCallExactlyOnce" style="filled" fillcolor=red]; - } + 275 -> {276}; 276 -> {277}; - 277 -> {278}; - 278 -> {279 292}; - 278 -> {291} [style=dotted]; - 278 -> {279} [style=dashed]; + + subgraph cluster_55 { + color=red + 278 [label="Enter function incompleteCallExactlyOnce" style="filled" fillcolor=red]; + subgraph cluster_56 { + color=blue + 279 [label="Enter block"]; + 280 [label="Postponed enter to lambda"]; + subgraph cluster_57 { + color=blue + 281 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_58 { + color=blue + 282 [label="Enter block"]; + 283 [label="Access variable R|/x|"]; + 284 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 285 [label="Access variable R|/y|"]; + 286 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + 287 [label="Access variable R|/x|"]; + 288 [label="Smart cast: R|/x|"]; + 289 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 290 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; + 291 [label="Exit block"]; + } + 292 [label="Exit function " style="filled" fillcolor=red]; + } + 293 [label="Postponed exit from lambda"]; + 294 [label="Function call: R|/exactlyOnce|(...)" style="filled" fillcolor=yellow]; + 295 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 296 [label="Postponed enter to lambda"]; + subgraph cluster_59 { + color=blue + 297 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_60 { + color=blue + 298 [label="Enter block"]; + 299 [label="Access variable R|/y|"]; + 300 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; + 301 [label="Access variable R|/x|"]; + 302 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 303 [label="Access variable R|/y|"]; + 304 [label="Smart cast: R|/y|"]; + 305 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 306 [label="Const: Int(1)"]; + 307 [label="Exit block"]; + } + 308 [label="Exit function " style="filled" fillcolor=red]; + } + 309 [label="Postponed exit from lambda"]; + 310 [label="Function call: R|/exactlyOnce|(...)" style="filled" fillcolor=yellow]; + 311 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; + 312 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 313 [label="Access variable R|/x|"]; + 314 [label="Smart cast: R|/x|"]; + 315 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 316 [label="Access variable R|/y|"]; + 317 [label="Smart cast: R|/y|"]; + 318 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 319 [label="Exit block"]; + } + 320 [label="Exit function incompleteCallExactlyOnce" style="filled" fillcolor=red]; + } + 278 -> {279}; 279 -> {280}; - 280 -> {281}; + 280 -> {281 294}; + 280 -> {293} [style=dotted]; + 280 -> {281} [style=dashed]; 281 -> {282}; 282 -> {283}; 283 -> {284}; @@ -830,15 +835,15 @@ digraph flowFromInplaceLambda_kt { 288 -> {289}; 289 -> {290}; 290 -> {291}; - 291 -> {292} [color=green]; - 291 -> {309} [color=red]; + 291 -> {292}; 292 -> {293}; - 293 -> {294}; - 294 -> {295 308}; - 294 -> {307} [style=dotted]; - 294 -> {295} [style=dashed]; + 293 -> {294} [color=green]; + 293 -> {311} [color=red]; + 294 -> {295}; 295 -> {296}; - 296 -> {297}; + 296 -> {297 310}; + 296 -> {309} [style=dotted]; + 296 -> {297} [style=dashed]; 297 -> {298}; 298 -> {299}; 299 -> {300}; @@ -849,10 +854,10 @@ digraph flowFromInplaceLambda_kt { 304 -> {305}; 305 -> {306}; 306 -> {307}; - 307 -> {308} [color=green]; - 307 -> {309} [color=red]; + 307 -> {308}; 308 -> {309}; - 309 -> {310}; + 309 -> {310} [color=green]; + 309 -> {311} [color=red]; 310 -> {311}; 311 -> {312}; 312 -> {313}; @@ -861,75 +866,75 @@ digraph flowFromInplaceLambda_kt { 315 -> {316}; 316 -> {317}; 317 -> {318}; - - subgraph cluster_60 { - color=red - 319 [label="Enter function incompleteCallAtLeastOnce" style="filled" fillcolor=red]; - subgraph cluster_61 { - color=blue - 320 [label="Enter block"]; - 321 [label="Postponed enter to lambda"]; - subgraph cluster_62 { - color=blue - 322 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_63 { - color=blue - 323 [label="Enter block"]; - 324 [label="Access variable R|/x|"]; - 325 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 326 [label="Access variable R|/y|"]; - 327 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 328 [label="Access variable R|/x|"]; - 329 [label="Smart cast: R|/x|"]; - 330 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 331 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; - 332 [label="Exit block"]; - } - 333 [label="Exit function " style="filled" fillcolor=red]; - } - 334 [label="Postponed exit from lambda"]; - 335 [label="Function call: R|/atLeastOnce|(...)" style="filled" fillcolor=yellow]; - 336 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 337 [label="Postponed enter to lambda"]; - subgraph cluster_64 { - color=blue - 338 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_65 { - color=blue - 339 [label="Enter block"]; - 340 [label="Access variable R|/y|"]; - 341 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; - 342 [label="Access variable R|/x|"]; - 343 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 344 [label="Access variable R|/y|"]; - 345 [label="Smart cast: R|/y|"]; - 346 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 347 [label="Const: Int(1)"]; - 348 [label="Exit block"]; - } - 349 [label="Exit function " style="filled" fillcolor=red]; - } - 350 [label="Postponed exit from lambda"]; - 351 [label="Function call: R|/atLeastOnce|(...)" style="filled" fillcolor=yellow]; - 352 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; - 353 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 354 [label="Access variable R|/x|"]; - 355 [label="Smart cast: R|/x|"]; - 356 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 357 [label="Access variable R|/y|"]; - 358 [label="Smart cast: R|/y|"]; - 359 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 360 [label="Exit block"]; - } - 361 [label="Exit function incompleteCallAtLeastOnce" style="filled" fillcolor=red]; - } + 318 -> {319}; 319 -> {320}; - 320 -> {321}; - 321 -> {322 335}; - 321 -> {334} [style=dotted]; - 321 -> {322} [style=dashed]; + + subgraph cluster_61 { + color=red + 321 [label="Enter function incompleteCallAtLeastOnce" style="filled" fillcolor=red]; + subgraph cluster_62 { + color=blue + 322 [label="Enter block"]; + 323 [label="Postponed enter to lambda"]; + subgraph cluster_63 { + color=blue + 324 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_64 { + color=blue + 325 [label="Enter block"]; + 326 [label="Access variable R|/x|"]; + 327 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 328 [label="Access variable R|/y|"]; + 329 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + 330 [label="Access variable R|/x|"]; + 331 [label="Smart cast: R|/x|"]; + 332 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 333 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; + 334 [label="Exit block"]; + } + 335 [label="Exit function " style="filled" fillcolor=red]; + } + 336 [label="Postponed exit from lambda"]; + 337 [label="Function call: R|/atLeastOnce|(...)" style="filled" fillcolor=yellow]; + 338 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 339 [label="Postponed enter to lambda"]; + subgraph cluster_65 { + color=blue + 340 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_66 { + color=blue + 341 [label="Enter block"]; + 342 [label="Access variable R|/y|"]; + 343 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; + 344 [label="Access variable R|/x|"]; + 345 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 346 [label="Access variable R|/y|"]; + 347 [label="Smart cast: R|/y|"]; + 348 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 349 [label="Const: Int(1)"]; + 350 [label="Exit block"]; + } + 351 [label="Exit function " style="filled" fillcolor=red]; + } + 352 [label="Postponed exit from lambda"]; + 353 [label="Function call: R|/atLeastOnce|(...)" style="filled" fillcolor=yellow]; + 354 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; + 355 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 356 [label="Access variable R|/x|"]; + 357 [label="Smart cast: R|/x|"]; + 358 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 359 [label="Access variable R|/y|"]; + 360 [label="Smart cast: R|/y|"]; + 361 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 362 [label="Exit block"]; + } + 363 [label="Exit function incompleteCallAtLeastOnce" style="filled" fillcolor=red]; + } + 321 -> {322}; 322 -> {323}; - 323 -> {324}; + 323 -> {324 337}; + 323 -> {336} [style=dotted]; + 323 -> {324} [style=dashed]; 324 -> {325}; 325 -> {326}; 326 -> {327}; @@ -940,16 +945,16 @@ digraph flowFromInplaceLambda_kt { 331 -> {332}; 332 -> {333}; 333 -> {334}; - 334 -> {321} [color=green style=dashed]; - 334 -> {335} [color=green]; - 334 -> {352} [color=red]; + 334 -> {335}; 335 -> {336}; - 336 -> {337}; - 337 -> {338 351}; - 337 -> {350} [style=dotted]; - 337 -> {338} [style=dashed]; + 336 -> {323} [color=green style=dashed]; + 336 -> {337} [color=green]; + 336 -> {354} [color=red]; + 337 -> {338}; 338 -> {339}; - 339 -> {340}; + 339 -> {340 353}; + 339 -> {352} [style=dotted]; + 339 -> {340} [style=dashed]; 340 -> {341}; 341 -> {342}; 342 -> {343}; @@ -960,11 +965,11 @@ digraph flowFromInplaceLambda_kt { 347 -> {348}; 348 -> {349}; 349 -> {350}; - 350 -> {337} [color=green style=dashed]; - 350 -> {351} [color=green]; - 350 -> {352} [color=red]; + 350 -> {351}; 351 -> {352}; - 352 -> {353}; + 352 -> {339} [color=green style=dashed]; + 352 -> {353} [color=green]; + 352 -> {354} [color=red]; 353 -> {354}; 354 -> {355}; 355 -> {356}; @@ -973,72 +978,72 @@ digraph flowFromInplaceLambda_kt { 358 -> {359}; 359 -> {360}; 360 -> {361}; - - subgraph cluster_66 { - color=red - 362 [label="Enter function incompleteCallAtMostOnce" style="filled" fillcolor=red]; - subgraph cluster_67 { - color=blue - 363 [label="Enter block"]; - 364 [label="Postponed enter to lambda"]; - subgraph cluster_68 { - color=blue - 365 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_69 { - color=blue - 366 [label="Enter block"]; - 367 [label="Access variable R|/x|"]; - 368 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 369 [label="Access variable R|/y|"]; - 370 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 371 [label="Access variable R|/x|"]; - 372 [label="Smart cast: R|/x|"]; - 373 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 374 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; - 375 [label="Exit block"]; - } - 376 [label="Exit function " style="filled" fillcolor=red]; - } - 377 [label="Postponed exit from lambda"]; - 378 [label="Function call: R|/atMostOnce|(...)" style="filled" fillcolor=yellow]; - 379 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 380 [label="Postponed enter to lambda"]; - subgraph cluster_70 { - color=blue - 381 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_71 { - color=blue - 382 [label="Enter block"]; - 383 [label="Access variable R|/y|"]; - 384 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; - 385 [label="Access variable R|/x|"]; - 386 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 387 [label="Access variable R|/y|"]; - 388 [label="Smart cast: R|/y|"]; - 389 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 390 [label="Const: Int(1)"]; - 391 [label="Exit block"]; - } - 392 [label="Exit function " style="filled" fillcolor=red]; - } - 393 [label="Postponed exit from lambda"]; - 394 [label="Function call: R|/atMostOnce|(...)" style="filled" fillcolor=yellow]; - 395 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; - 396 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 397 [label="Access variable R|/x|"]; - 398 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 399 [label="Access variable R|/y|"]; - 400 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 401 [label="Exit block"]; - } - 402 [label="Exit function incompleteCallAtMostOnce" style="filled" fillcolor=red]; - } + 361 -> {362}; 362 -> {363}; - 363 -> {364}; - 364 -> {365 377 378}; - 364 -> {365} [style=dashed]; + + subgraph cluster_67 { + color=red + 364 [label="Enter function incompleteCallAtMostOnce" style="filled" fillcolor=red]; + subgraph cluster_68 { + color=blue + 365 [label="Enter block"]; + 366 [label="Postponed enter to lambda"]; + subgraph cluster_69 { + color=blue + 367 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_70 { + color=blue + 368 [label="Enter block"]; + 369 [label="Access variable R|/x|"]; + 370 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 371 [label="Access variable R|/y|"]; + 372 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + 373 [label="Access variable R|/x|"]; + 374 [label="Smart cast: R|/x|"]; + 375 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 376 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; + 377 [label="Exit block"]; + } + 378 [label="Exit function " style="filled" fillcolor=red]; + } + 379 [label="Postponed exit from lambda"]; + 380 [label="Function call: R|/atMostOnce|(...)" style="filled" fillcolor=yellow]; + 381 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 382 [label="Postponed enter to lambda"]; + subgraph cluster_71 { + color=blue + 383 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_72 { + color=blue + 384 [label="Enter block"]; + 385 [label="Access variable R|/y|"]; + 386 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; + 387 [label="Access variable R|/x|"]; + 388 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 389 [label="Access variable R|/y|"]; + 390 [label="Smart cast: R|/y|"]; + 391 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 392 [label="Const: Int(1)"]; + 393 [label="Exit block"]; + } + 394 [label="Exit function " style="filled" fillcolor=red]; + } + 395 [label="Postponed exit from lambda"]; + 396 [label="Function call: R|/atMostOnce|(...)" style="filled" fillcolor=yellow]; + 397 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; + 398 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 399 [label="Access variable R|/x|"]; + 400 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 401 [label="Access variable R|/y|"]; + 402 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + 403 [label="Exit block"]; + } + 404 [label="Exit function incompleteCallAtMostOnce" style="filled" fillcolor=red]; + } + 364 -> {365}; 365 -> {366}; - 366 -> {367}; + 366 -> {367 379 380}; + 366 -> {367} [style=dashed]; 367 -> {368}; 368 -> {369}; 369 -> {370}; @@ -1049,14 +1054,14 @@ digraph flowFromInplaceLambda_kt { 374 -> {375}; 375 -> {376}; 376 -> {377}; - 377 -> {378} [color=green]; - 377 -> {395} [color=red]; + 377 -> {378}; 378 -> {379}; - 379 -> {380}; - 380 -> {381 393 394}; - 380 -> {381} [style=dashed]; + 379 -> {380} [color=green]; + 379 -> {397} [color=red]; + 380 -> {381}; 381 -> {382}; - 382 -> {383}; + 382 -> {383 395 396}; + 382 -> {383} [style=dashed]; 383 -> {384}; 384 -> {385}; 385 -> {386}; @@ -1067,82 +1072,82 @@ digraph flowFromInplaceLambda_kt { 390 -> {391}; 391 -> {392}; 392 -> {393}; - 393 -> {394} [color=green]; - 393 -> {395} [color=red]; + 393 -> {394}; 394 -> {395}; - 395 -> {396}; + 395 -> {396} [color=green]; + 395 -> {397} [color=red]; 396 -> {397}; 397 -> {398}; 398 -> {399}; 399 -> {400}; 400 -> {401}; 401 -> {402}; - - subgraph cluster_72 { - color=red - 403 [label="Enter function incompleteCallUnknown" style="filled" fillcolor=red]; - subgraph cluster_73 { - color=blue - 404 [label="Enter block"]; - 405 [label="Postponed enter to lambda"]; - subgraph cluster_74 { - color=blue - 406 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_75 { - color=blue - 407 [label="Enter block"]; - 408 [label="Access variable R|/x|"]; - 409 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 410 [label="Access variable R|/y|"]; - 411 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 412 [label="Access variable R|/x|"]; - 413 [label="Smart cast: R|/x|"]; - 414 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 415 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; - 416 [label="Exit block"]; - } - 417 [label="Exit function " style="filled" fillcolor=red]; - } - 418 [label="Postponed exit from lambda"]; - 419 [label="Function call: R|/unknown|(...)" style="filled" fillcolor=yellow]; - 420 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 421 [label="Postponed enter to lambda"]; - subgraph cluster_76 { - color=blue - 422 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_77 { - color=blue - 423 [label="Enter block"]; - 424 [label="Access variable R|/y|"]; - 425 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; - 426 [label="Access variable R|/x|"]; - 427 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 428 [label="Access variable R|/y|"]; - 429 [label="Smart cast: R|/y|"]; - 430 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 431 [label="Const: Int(1)"]; - 432 [label="Exit block"]; - } - 433 [label="Exit function " style="filled" fillcolor=red]; - } - 434 [label="Postponed exit from lambda"]; - 435 [label="Function call: R|/unknown|(...)" style="filled" fillcolor=yellow]; - 436 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; - 437 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 438 [label="Access variable R|/x|"]; - 439 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 440 [label="Access variable R|/y|"]; - 441 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 442 [label="Exit block"]; - } - 443 [label="Exit function incompleteCallUnknown" style="filled" fillcolor=red]; - } + 402 -> {403}; 403 -> {404}; - 404 -> {405}; - 405 -> {406 418 419}; - 405 -> {406} [style=dashed]; + + subgraph cluster_73 { + color=red + 405 [label="Enter function incompleteCallUnknown" style="filled" fillcolor=red]; + subgraph cluster_74 { + color=blue + 406 [label="Enter block"]; + 407 [label="Postponed enter to lambda"]; + subgraph cluster_75 { + color=blue + 408 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_76 { + color=blue + 409 [label="Enter block"]; + 410 [label="Access variable R|/x|"]; + 411 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 412 [label="Access variable R|/y|"]; + 413 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + 414 [label="Access variable R|/x|"]; + 415 [label="Smart cast: R|/x|"]; + 416 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 417 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; + 418 [label="Exit block"]; + } + 419 [label="Exit function " style="filled" fillcolor=red]; + } + 420 [label="Postponed exit from lambda"]; + 421 [label="Function call: R|/unknown|(...)" style="filled" fillcolor=yellow]; + 422 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 423 [label="Postponed enter to lambda"]; + subgraph cluster_77 { + color=blue + 424 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_78 { + color=blue + 425 [label="Enter block"]; + 426 [label="Access variable R|/y|"]; + 427 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; + 428 [label="Access variable R|/x|"]; + 429 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 430 [label="Access variable R|/y|"]; + 431 [label="Smart cast: R|/y|"]; + 432 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 433 [label="Const: Int(1)"]; + 434 [label="Exit block"]; + } + 435 [label="Exit function " style="filled" fillcolor=red]; + } + 436 [label="Postponed exit from lambda"]; + 437 [label="Function call: R|/unknown|(...)" style="filled" fillcolor=yellow]; + 438 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; + 439 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 440 [label="Access variable R|/x|"]; + 441 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 442 [label="Access variable R|/y|"]; + 443 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + 444 [label="Exit block"]; + } + 445 [label="Exit function incompleteCallUnknown" style="filled" fillcolor=red]; + } + 405 -> {406}; 406 -> {407}; - 407 -> {408}; + 407 -> {408 420 421}; + 407 -> {408} [style=dashed]; 408 -> {409}; 409 -> {410}; 410 -> {411}; @@ -1153,15 +1158,15 @@ digraph flowFromInplaceLambda_kt { 415 -> {416}; 416 -> {417}; 417 -> {418}; - 418 -> {405} [color=green style=dashed]; - 418 -> {419} [color=green]; - 418 -> {436} [color=red]; + 418 -> {419}; 419 -> {420}; - 420 -> {421}; - 421 -> {422 434 435}; - 421 -> {422} [style=dashed]; + 420 -> {407} [color=green style=dashed]; + 420 -> {421} [color=green]; + 420 -> {438} [color=red]; + 421 -> {422}; 422 -> {423}; - 423 -> {424}; + 423 -> {424 436 437}; + 423 -> {424} [style=dashed]; 424 -> {425}; 425 -> {426}; 426 -> {427}; @@ -1172,83 +1177,83 @@ digraph flowFromInplaceLambda_kt { 431 -> {432}; 432 -> {433}; 433 -> {434}; - 434 -> {421} [color=green style=dashed]; - 434 -> {435} [color=green]; - 434 -> {436} [color=red]; + 434 -> {435}; 435 -> {436}; - 436 -> {437}; + 436 -> {423} [color=green style=dashed]; + 436 -> {437} [color=green]; + 436 -> {438} [color=red]; 437 -> {438}; 438 -> {439}; 439 -> {440}; 440 -> {441}; 441 -> {442}; 442 -> {443}; - - subgraph cluster_78 { - color=red - 444 [label="Enter function incompleteCallNoContract" style="filled" fillcolor=red]; - subgraph cluster_79 { - color=blue - 445 [label="Enter block"]; - 446 [label="Postponed enter to lambda"]; - subgraph cluster_80 { - color=blue - 447 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_81 { - color=blue - 448 [label="Enter block"]; - 449 [label="Access variable R|/x|"]; - 450 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 451 [label="Access variable R|/y|"]; - 452 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 453 [label="Access variable R|/x|"]; - 454 [label="Smart cast: R|/x|"]; - 455 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 456 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; - 457 [label="Exit block"]; - } - 458 [label="Exit function " style="filled" fillcolor=red]; - } - 459 [label="Postponed exit from lambda"]; - 460 [label="Function call: R|/noContract|(...)" style="filled" fillcolor=yellow]; - 461 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 462 [label="Postponed enter to lambda"]; - subgraph cluster_82 { - color=blue - 463 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_83 { - color=blue - 464 [label="Enter block"]; - 465 [label="Access variable R|/y|"]; - 466 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; - 467 [label="Access variable R|/x|"]; - 468 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 469 [label="Access variable R|/y|"]; - 470 [label="Smart cast: R|/y|"]; - 471 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 472 [label="Const: Int(1)"]; - 473 [label="Exit block"]; - } - 474 [label="Exit function " style="filled" fillcolor=red]; - } - 475 [label="Postponed exit from lambda"]; - 476 [label="Function call: R|/noContract|(...)" style="filled" fillcolor=yellow]; - 477 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; - 478 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 479 [label="Access variable R|/x|"]; - 480 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 481 [label="Access variable R|/y|"]; - 482 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; - 483 [label="Exit block"]; - } - 484 [label="Exit function incompleteCallNoContract" style="filled" fillcolor=red]; - } + 443 -> {444}; 444 -> {445}; - 445 -> {446}; - 446 -> {447 459 460}; - 446 -> {447} [style=dashed]; + + subgraph cluster_79 { + color=red + 446 [label="Enter function incompleteCallNoContract" style="filled" fillcolor=red]; + subgraph cluster_80 { + color=blue + 447 [label="Enter block"]; + 448 [label="Postponed enter to lambda"]; + subgraph cluster_81 { + color=blue + 449 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_82 { + color=blue + 450 [label="Enter block"]; + 451 [label="Access variable R|/x|"]; + 452 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 453 [label="Access variable R|/y|"]; + 454 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + 455 [label="Access variable R|/x|"]; + 456 [label="Smart cast: R|/x|"]; + 457 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 458 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; + 459 [label="Exit block"]; + } + 460 [label="Exit function " style="filled" fillcolor=red]; + } + 461 [label="Postponed exit from lambda"]; + 462 [label="Function call: R|/noContract|(...)" style="filled" fillcolor=yellow]; + 463 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 464 [label="Postponed enter to lambda"]; + subgraph cluster_83 { + color=blue + 465 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_84 { + color=blue + 466 [label="Enter block"]; + 467 [label="Access variable R|/y|"]; + 468 [label="Type operator: (R|/y| as R|kotlin/Int|)"]; + 469 [label="Access variable R|/x|"]; + 470 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 471 [label="Access variable R|/y|"]; + 472 [label="Smart cast: R|/y|"]; + 473 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 474 [label="Const: Int(1)"]; + 475 [label="Exit block"]; + } + 476 [label="Exit function " style="filled" fillcolor=red]; + } + 477 [label="Postponed exit from lambda"]; + 478 [label="Function call: R|/noContract|(...)" style="filled" fillcolor=yellow]; + 479 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; + 480 [label="Function call: R|/select|(...).R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 481 [label="Access variable R|/x|"]; + 482 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 483 [label="Access variable R|/y|"]; + 484 [label="Function call: R|/y|.#()" style="filled" fillcolor=yellow]; + 485 [label="Exit block"]; + } + 486 [label="Exit function incompleteCallNoContract" style="filled" fillcolor=red]; + } + 446 -> {447}; 447 -> {448}; - 448 -> {449}; + 448 -> {449 461 462}; + 448 -> {449} [style=dashed]; 449 -> {450}; 450 -> {451}; 451 -> {452}; @@ -1258,14 +1263,14 @@ digraph flowFromInplaceLambda_kt { 455 -> {456}; 456 -> {457}; 457 -> {458}; - 459 -> {460} [color=green]; - 459 -> {477} [color=red]; - 460 -> {461}; - 461 -> {462}; - 462 -> {463 475 476}; - 462 -> {463} [style=dashed]; + 458 -> {459}; + 459 -> {460}; + 461 -> {462} [color=green]; + 461 -> {479} [color=red]; + 462 -> {463}; 463 -> {464}; - 464 -> {465}; + 464 -> {465 477 478}; + 464 -> {465} [style=dashed]; 465 -> {466}; 466 -> {467}; 467 -> {468}; @@ -1275,155 +1280,157 @@ digraph flowFromInplaceLambda_kt { 471 -> {472}; 472 -> {473}; 473 -> {474}; - 475 -> {476} [color=green]; - 475 -> {477} [color=red]; - 476 -> {477}; - 477 -> {478}; + 474 -> {475}; + 475 -> {476}; + 477 -> {478} [color=green]; + 477 -> {479} [color=red]; 478 -> {479}; 479 -> {480}; 480 -> {481}; 481 -> {482}; 482 -> {483}; 483 -> {484}; - - subgraph cluster_84 { - color=red - 485 [label="Enter function expectedType" style="filled" fillcolor=red]; - subgraph cluster_85 { - color=blue - 486 [label="Enter block"]; - 487 [label="Postponed enter to lambda"]; - subgraph cluster_86 { - color=blue - 488 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_87 { - color=blue - 489 [label="Enter block"]; - 490 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; - 491 [label="Exit block"]; - } - 492 [label="Exit function " style="filled" fillcolor=red]; - } - 493 [label="Postponed exit from lambda"]; - 494 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 495 [label="Postponed enter to lambda"]; - subgraph cluster_88 { - color=blue - 496 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_89 { - color=blue - 497 [label="Enter block"]; - 498 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; - 499 [label="Exit block"]; - } - 500 [label="Exit function " style="filled" fillcolor=red]; - } - 501 [label="Postponed exit from lambda"]; - 502 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 503 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; - 504 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 505 [label="Access variable R|/x|"]; - 506 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 507 [label="Exit block"]; - } - 508 [label="Exit function expectedType" style="filled" fillcolor=red]; - } + 484 -> {485}; 485 -> {486}; - 486 -> {487}; - 487 -> {488 494}; - 487 -> {493} [style=dotted]; - 487 -> {488} [style=dashed]; + + subgraph cluster_85 { + color=red + 487 [label="Enter function expectedType" style="filled" fillcolor=red]; + subgraph cluster_86 { + color=blue + 488 [label="Enter block"]; + 489 [label="Postponed enter to lambda"]; + subgraph cluster_87 { + color=blue + 490 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_88 { + color=blue + 491 [label="Enter block"]; + 492 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; + 493 [label="Exit block"]; + } + 494 [label="Exit function " style="filled" fillcolor=red]; + } + 495 [label="Postponed exit from lambda"]; + 496 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 497 [label="Postponed enter to lambda"]; + subgraph cluster_89 { + color=blue + 498 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_90 { + color=blue + 499 [label="Enter block"]; + 500 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; + 501 [label="Exit block"]; + } + 502 [label="Exit function " style="filled" fillcolor=red]; + } + 503 [label="Postponed exit from lambda"]; + 504 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 505 [label="Function call: R|/select|(...)" style="filled" fillcolor=yellow]; + 506 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 507 [label="Access variable R|/x|"]; + 508 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 509 [label="Exit block"]; + } + 510 [label="Exit function expectedType" style="filled" fillcolor=red]; + } + 487 -> {488}; 488 -> {489}; - 489 -> {490}; + 489 -> {490 496}; + 489 -> {495} [style=dotted]; + 489 -> {490} [style=dashed]; 490 -> {491}; 491 -> {492}; 492 -> {493}; - 493 -> {494} [color=green]; - 493 -> {503} [color=red]; + 493 -> {494}; 494 -> {495}; - 495 -> {496 502}; - 495 -> {501} [style=dotted]; - 495 -> {496} [style=dashed]; + 495 -> {496} [color=green]; + 495 -> {505} [color=red]; 496 -> {497}; - 497 -> {498}; + 497 -> {498 504}; + 497 -> {503} [style=dotted]; + 497 -> {498} [style=dashed]; 498 -> {499}; 499 -> {500}; 500 -> {501}; - 501 -> {502} [color=green]; - 501 -> {503} [color=red]; + 501 -> {502}; 502 -> {503}; - 503 -> {504}; + 503 -> {504} [color=green]; + 503 -> {505} [color=red]; 504 -> {505}; 505 -> {506}; 506 -> {507}; 507 -> {508}; - - subgraph cluster_90 { - color=red - 509 [label="Enter function expectedTypeNested" style="filled" fillcolor=red]; - subgraph cluster_91 { - color=blue - 510 [label="Enter block"]; - 511 [label="Postponed enter to lambda"]; - subgraph cluster_92 { - color=blue - 512 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_93 { - color=blue - 513 [label="Enter block"]; - 514 [label="Postponed enter to lambda"]; - subgraph cluster_94 { - color=blue - 515 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_95 { - color=blue - 516 [label="Enter block"]; - 517 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; - 518 [label="Exit block"]; - } - 519 [label="Exit function " style="filled" fillcolor=red]; - } - 520 [label="Postponed exit from lambda"]; - 521 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 522 [label="Exit block"]; - } - 523 [label="Exit function " style="filled" fillcolor=red]; - } - 524 [label="Postponed exit from lambda"]; - 525 [label="Function call: R|/noContract|(...)" style="filled" fillcolor=yellow]; - 526 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 527 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 528 [label="Access variable R|/x|"]; - 529 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 530 [label="Exit block"]; - } - 531 [label="Exit function expectedTypeNested" style="filled" fillcolor=red]; - } + 508 -> {509}; 509 -> {510}; - 510 -> {511}; - 511 -> {512 524 525}; - 511 -> {512} [style=dashed]; + + subgraph cluster_91 { + color=red + 511 [label="Enter function expectedTypeNested" style="filled" fillcolor=red]; + subgraph cluster_92 { + color=blue + 512 [label="Enter block"]; + 513 [label="Postponed enter to lambda"]; + subgraph cluster_93 { + color=blue + 514 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_94 { + color=blue + 515 [label="Enter block"]; + 516 [label="Postponed enter to lambda"]; + subgraph cluster_95 { + color=blue + 517 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_96 { + color=blue + 518 [label="Enter block"]; + 519 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; + 520 [label="Exit block"]; + } + 521 [label="Exit function " style="filled" fillcolor=red]; + } + 522 [label="Postponed exit from lambda"]; + 523 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 524 [label="Exit block"]; + } + 525 [label="Exit function " style="filled" fillcolor=red]; + } + 526 [label="Postponed exit from lambda"]; + 527 [label="Function call: R|/noContract|(...)" style="filled" fillcolor=yellow]; + 528 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 529 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 530 [label="Access variable R|/x|"]; + 531 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 532 [label="Exit block"]; + } + 533 [label="Exit function expectedTypeNested" style="filled" fillcolor=red]; + } + 511 -> {512}; 512 -> {513}; - 513 -> {514}; - 514 -> {515 521}; - 514 -> {520} [style=dotted]; - 514 -> {515} [style=dashed]; + 513 -> {514 526 527}; + 513 -> {514} [style=dashed]; + 514 -> {515}; 515 -> {516}; - 516 -> {517}; + 516 -> {517 523}; + 516 -> {522} [style=dotted]; + 516 -> {517} [style=dashed]; 517 -> {518}; 518 -> {519}; 519 -> {520}; - 520 -> {521} [color=green]; - 520 -> {526} [color=red]; + 520 -> {521}; 521 -> {522}; - 522 -> {523}; - 524 -> {525} [color=green]; - 524 -> {526} [color=red]; - 525 -> {526}; - 526 -> {527}; + 522 -> {523} [color=green]; + 522 -> {528} [color=red]; + 523 -> {524}; + 524 -> {525}; + 526 -> {527} [color=green]; + 526 -> {528} [color=red]; 527 -> {528}; 528 -> {529}; 529 -> {530}; 530 -> {531}; + 531 -> {532}; + 532 -> {533}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda2.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda2.dot index 402eb7b7de3..a4594859584 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda2.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda2.dot @@ -5,500 +5,505 @@ digraph flowFromInplaceLambda2_kt { subgraph cluster_0 { color=red - 0 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter block"]; - 2 [label="Exit block"]; - } - 3 [label="Exit function foo" style="filled" fillcolor=red]; + 0 [label="Enter file flowFromInplaceLambda2.kt" style="filled" fillcolor=red]; + 1 [label="Exit file flowFromInplaceLambda2.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_2 { + color=blue + 3 [label="Enter block"]; + 4 [label="Exit block"]; + } + 5 [label="Exit function foo" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; - - subgraph cluster_2 { - color=red - 4 [label="Enter function id" style="filled" fillcolor=red]; - subgraph cluster_3 { - color=blue - 5 [label="Enter block"]; - 6 [label="Access variable R|/x|"]; - 7 [label="Jump: ^id R|/x|"]; - 8 [label="Stub" style="filled" fillcolor=gray]; - 9 [label="Exit block" style="filled" fillcolor=gray]; - } - 10 [label="Exit function id" style="filled" fillcolor=red]; - } + 3 -> {4}; 4 -> {5}; - 5 -> {6}; + + subgraph cluster_3 { + color=red + 6 [label="Enter function id" style="filled" fillcolor=red]; + subgraph cluster_4 { + color=blue + 7 [label="Enter block"]; + 8 [label="Access variable R|/x|"]; + 9 [label="Jump: ^id R|/x|"]; + 10 [label="Stub" style="filled" fillcolor=gray]; + 11 [label="Exit block" style="filled" fillcolor=gray]; + } + 12 [label="Exit function id" style="filled" fillcolor=red]; + } 6 -> {7}; - 7 -> {10}; - 7 -> {8} [style=dotted]; - 8 -> {9} [style=dotted]; + 7 -> {8}; + 8 -> {9}; + 9 -> {12}; 9 -> {10} [style=dotted]; + 10 -> {11} [style=dotted]; + 11 -> {12} [style=dotted]; - subgraph cluster_4 { + subgraph cluster_5 { color=red - 11 [label="Enter function n" style="filled" fillcolor=red]; - subgraph cluster_5 { + 13 [label="Enter function n" style="filled" fillcolor=red]; + subgraph cluster_6 { color=blue - 12 [label="Enter block"]; - 13 [label="Const: Null(null)"]; - 14 [label="Jump: ^n Null(null)"]; - 15 [label="Stub" style="filled" fillcolor=gray]; - 16 [label="Exit block" style="filled" fillcolor=gray]; + 14 [label="Enter block"]; + 15 [label="Const: Null(null)"]; + 16 [label="Jump: ^n Null(null)"]; + 17 [label="Stub" style="filled" fillcolor=gray]; + 18 [label="Exit block" style="filled" fillcolor=gray]; } - 17 [label="Exit function n" style="filled" fillcolor=red]; + 19 [label="Exit function n" style="filled" fillcolor=red]; } - 11 -> {12}; - 12 -> {13}; 13 -> {14}; - 14 -> {17}; - 14 -> {15} [style=dotted]; - 15 -> {16} [style=dotted]; + 14 -> {15}; + 15 -> {16}; + 16 -> {19}; 16 -> {17} [style=dotted]; + 17 -> {18} [style=dotted]; + 18 -> {19} [style=dotted]; - subgraph cluster_6 { + subgraph cluster_7 { color=red - 18 [label="Enter function someCompletedCall" style="filled" fillcolor=red]; - subgraph cluster_7 { + 20 [label="Enter function someCompletedCall" style="filled" fillcolor=red]; + subgraph cluster_8 { color=blue - 19 [label="Enter block"]; - 20 [label="Access variable R|/arg|"]; - 21 [label="Jump: ^someCompletedCall R|/arg|"]; - 22 [label="Stub" style="filled" fillcolor=gray]; - 23 [label="Exit block" style="filled" fillcolor=gray]; + 21 [label="Enter block"]; + 22 [label="Access variable R|/arg|"]; + 23 [label="Jump: ^someCompletedCall R|/arg|"]; + 24 [label="Stub" style="filled" fillcolor=gray]; + 25 [label="Exit block" style="filled" fillcolor=gray]; } - 24 [label="Exit function someCompletedCall" style="filled" fillcolor=red]; + 26 [label="Exit function someCompletedCall" style="filled" fillcolor=red]; } - 18 -> {19}; - 19 -> {20}; 20 -> {21}; - 21 -> {24}; - 21 -> {22} [style=dotted]; - 22 -> {23} [style=dotted]; + 21 -> {22}; + 22 -> {23}; + 23 -> {26}; 23 -> {24} [style=dotted]; + 24 -> {25} [style=dotted]; + 25 -> {26} [style=dotted]; - subgraph cluster_8 { + subgraph cluster_9 { color=red - 25 [label="Enter function test1" style="filled" fillcolor=red]; - subgraph cluster_9 { + 27 [label="Enter function test1" style="filled" fillcolor=red]; + subgraph cluster_10 { color=blue - 26 [label="Enter block"]; - 27 [label="Postponed enter to lambda"]; - subgraph cluster_10 { + 28 [label="Enter block"]; + 29 [label="Postponed enter to lambda"]; + subgraph cluster_11 { color=blue - 28 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_11 { + 30 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_12 { color=blue - 29 [label="Enter block"]; - 30 [label="Access variable R|/x|"]; - 31 [label="Type operator: (R|/x| as R|kotlin/String|)"]; - 32 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 33 [label="Exit block"]; + 31 [label="Enter block"]; + 32 [label="Access variable R|/x|"]; + 33 [label="Type operator: (R|/x| as R|kotlin/String|)"]; + 34 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 35 [label="Exit block"]; } - 34 [label="Exit function " style="filled" fillcolor=red]; + 36 [label="Exit function " style="filled" fillcolor=red]; } - 35 [label="Postponed exit from lambda"]; - 36 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 37 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 38 [label="Const: Int(1)"]; - 39 [label="Postponed enter to lambda"]; - subgraph cluster_12 { + 37 [label="Postponed exit from lambda"]; + 38 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 39 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 40 [label="Const: Int(1)"]; + 41 [label="Postponed enter to lambda"]; + subgraph cluster_13 { color=blue - 40 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_13 { + 42 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_14 { color=blue - 41 [label="Enter block"]; - 42 [label="Access variable R|/x|"]; - 43 [label="Access variable R|kotlin/String.length#|"]; - 44 [label="Const: Int(123)"]; - 45 [label="Exit block"]; + 43 [label="Enter block"]; + 44 [label="Access variable R|/x|"]; + 45 [label="Access variable R|kotlin/String.length#|"]; + 46 [label="Const: Int(123)"]; + 47 [label="Exit block"]; } - 46 [label="Exit function " style="filled" fillcolor=red]; + 48 [label="Exit function " style="filled" fillcolor=red]; } - 47 [label="Postponed exit from lambda"]; - 48 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 49 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; - 50 [label="Access variable R|/x|"]; - 51 [label="Smart cast: R|/x|"]; - 52 [label="Access variable R|kotlin/String.length|"]; - 53 [label="Exit block"]; + 49 [label="Postponed exit from lambda"]; + 50 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 51 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; + 52 [label="Access variable R|/x|"]; + 53 [label="Smart cast: R|/x|"]; + 54 [label="Access variable R|kotlin/String.length|"]; + 55 [label="Exit block"]; } - 54 [label="Exit function test1" style="filled" fillcolor=red]; + 56 [label="Exit function test1" style="filled" fillcolor=red]; } - 25 -> {26}; - 26 -> {27}; - 27 -> {28 36}; - 27 -> {35} [style=dotted]; - 27 -> {28} [style=dashed]; + 27 -> {28}; 28 -> {29}; - 29 -> {30}; + 29 -> {30 38}; + 29 -> {37} [style=dotted]; + 29 -> {30} [style=dashed]; 30 -> {31}; 31 -> {32}; 32 -> {33}; 33 -> {34}; 34 -> {35}; - 35 -> {36} [color=green]; - 35 -> {49} [color=red]; + 35 -> {36}; 36 -> {37}; - 37 -> {38}; + 37 -> {38} [color=green]; + 37 -> {51} [color=red]; 38 -> {39}; - 39 -> {40 48}; - 39 -> {47} [style=dotted]; - 39 -> {40} [style=dashed]; + 39 -> {40}; 40 -> {41}; - 41 -> {42}; + 41 -> {42 50}; + 41 -> {49} [style=dotted]; + 41 -> {42} [style=dashed]; 42 -> {43}; 43 -> {44}; 44 -> {45}; 45 -> {46}; 46 -> {47}; - 47 -> {48} [color=green]; - 47 -> {49} [color=red]; + 47 -> {48}; 48 -> {49}; - 49 -> {50}; + 49 -> {50} [color=green]; + 49 -> {51} [color=red]; 50 -> {51}; 51 -> {52}; 52 -> {53}; 53 -> {54}; - - subgraph cluster_14 { - color=red - 55 [label="Enter function test2" style="filled" fillcolor=red]; - subgraph cluster_15 { - color=blue - 56 [label="Enter block"]; - 57 [label="Postponed enter to lambda"]; - subgraph cluster_16 { - color=blue - 58 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_17 { - color=blue - 59 [label="Enter block"]; - 60 [label="Access variable R|/x|"]; - 61 [label="Type operator: (R|/x| as R|kotlin/String|)"]; - 62 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 63 [label="Exit block"]; - } - 64 [label="Exit function " style="filled" fillcolor=red]; - } - 65 [label="Postponed exit from lambda"]; - 66 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 67 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 68 [label="Const: Int(1)"]; - 69 [label="Function call: R|/someCompletedCall|(...)" style="filled" fillcolor=yellow]; - 70 [label="Postponed enter to lambda"]; - subgraph cluster_18 { - color=blue - 71 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_19 { - color=blue - 72 [label="Enter block"]; - 73 [label="Access variable R|/x|"]; - 74 [label="Access variable R|kotlin/String.length#|"]; - 75 [label="Const: Int(123)"]; - 76 [label="Exit block"]; - } - 77 [label="Exit function " style="filled" fillcolor=red]; - } - 78 [label="Postponed exit from lambda"]; - 79 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 80 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; - 81 [label="Access variable R|/x|"]; - 82 [label="Smart cast: R|/x|"]; - 83 [label="Access variable R|kotlin/String.length|"]; - 84 [label="Exit block"]; - } - 85 [label="Exit function test2" style="filled" fillcolor=red]; - } + 54 -> {55}; 55 -> {56}; - 56 -> {57}; - 57 -> {58 66}; - 57 -> {65} [style=dotted]; - 57 -> {58} [style=dashed]; + + subgraph cluster_15 { + color=red + 57 [label="Enter function test2" style="filled" fillcolor=red]; + subgraph cluster_16 { + color=blue + 58 [label="Enter block"]; + 59 [label="Postponed enter to lambda"]; + subgraph cluster_17 { + color=blue + 60 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_18 { + color=blue + 61 [label="Enter block"]; + 62 [label="Access variable R|/x|"]; + 63 [label="Type operator: (R|/x| as R|kotlin/String|)"]; + 64 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 65 [label="Exit block"]; + } + 66 [label="Exit function " style="filled" fillcolor=red]; + } + 67 [label="Postponed exit from lambda"]; + 68 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 69 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 70 [label="Const: Int(1)"]; + 71 [label="Function call: R|/someCompletedCall|(...)" style="filled" fillcolor=yellow]; + 72 [label="Postponed enter to lambda"]; + subgraph cluster_19 { + color=blue + 73 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_20 { + color=blue + 74 [label="Enter block"]; + 75 [label="Access variable R|/x|"]; + 76 [label="Access variable R|kotlin/String.length#|"]; + 77 [label="Const: Int(123)"]; + 78 [label="Exit block"]; + } + 79 [label="Exit function " style="filled" fillcolor=red]; + } + 80 [label="Postponed exit from lambda"]; + 81 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 82 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; + 83 [label="Access variable R|/x|"]; + 84 [label="Smart cast: R|/x|"]; + 85 [label="Access variable R|kotlin/String.length|"]; + 86 [label="Exit block"]; + } + 87 [label="Exit function test2" style="filled" fillcolor=red]; + } + 57 -> {58}; 58 -> {59}; - 59 -> {60}; + 59 -> {60 68}; + 59 -> {67} [style=dotted]; + 59 -> {60} [style=dashed]; 60 -> {61}; 61 -> {62}; 62 -> {63}; 63 -> {64}; 64 -> {65}; - 65 -> {66} [color=green]; - 65 -> {80} [color=red]; + 65 -> {66}; 66 -> {67}; - 67 -> {68}; + 67 -> {68} [color=green]; + 67 -> {82} [color=red]; 68 -> {69}; 69 -> {70}; - 70 -> {71 79}; - 70 -> {78} [style=dotted]; - 70 -> {71} [style=dashed]; + 70 -> {71}; 71 -> {72}; - 72 -> {73}; + 72 -> {73 81}; + 72 -> {80} [style=dotted]; + 72 -> {73} [style=dashed]; 73 -> {74}; 74 -> {75}; 75 -> {76}; 76 -> {77}; 77 -> {78}; - 78 -> {79} [color=green]; - 78 -> {80} [color=red]; + 78 -> {79}; 79 -> {80}; - 80 -> {81}; + 80 -> {81} [color=green]; + 80 -> {82} [color=red]; 81 -> {82}; 82 -> {83}; 83 -> {84}; 84 -> {85}; + 85 -> {86}; + 86 -> {87}; - subgraph cluster_20 { + subgraph cluster_21 { color=red - 86 [label="Enter function test3" style="filled" fillcolor=red]; - subgraph cluster_21 { + 88 [label="Enter function test3" style="filled" fillcolor=red]; + subgraph cluster_22 { color=blue - 87 [label="Enter block"]; - 88 [label="Postponed enter to lambda"]; - subgraph cluster_22 { + 89 [label="Enter block"]; + 90 [label="Postponed enter to lambda"]; + subgraph cluster_23 { color=blue - 89 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_23 { + 91 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_24 { color=blue - 90 [label="Enter block"]; - 91 [label="Access variable R|/x|"]; - 92 [label="Type operator: (R|/x| as R|kotlin/String|)"]; - 93 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 94 [label="Exit block"]; + 92 [label="Enter block"]; + 93 [label="Access variable R|/x|"]; + 94 [label="Type operator: (R|/x| as R|kotlin/String|)"]; + 95 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 96 [label="Exit block"]; } - 95 [label="Exit function " style="filled" fillcolor=red]; + 97 [label="Exit function " style="filled" fillcolor=red]; } - 96 [label="Postponed exit from lambda"]; - 97 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 98 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - subgraph cluster_24 { + 98 [label="Postponed exit from lambda"]; + 99 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 100 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + subgraph cluster_25 { color=blue - 99 [label="Enter when"]; - subgraph cluster_25 { - color=blue - 100 [label="Enter when branch condition "]; - 101 [label="Const: Boolean(true)"]; - 102 [label="Exit when branch condition"]; - } + 101 [label="Enter when"]; subgraph cluster_26 { color=blue - 103 [label="Enter when branch condition else"]; + 102 [label="Enter when branch condition "]; + 103 [label="Const: Boolean(true)"]; 104 [label="Exit when branch condition"]; } - 105 [label="Enter when branch result"]; subgraph cluster_27 { color=blue - 106 [label="Enter block"]; - 107 [label="Const: Int(2)"]; - 108 [label="Exit block"]; + 105 [label="Enter when branch condition else"]; + 106 [label="Exit when branch condition"]; } - 109 [label="Exit when branch result"]; - 110 [label="Enter when branch result"]; + 107 [label="Enter when branch result"]; subgraph cluster_28 { color=blue - 111 [label="Enter block"]; - 112 [label="Const: Int(1)"]; - 113 [label="Exit block"]; + 108 [label="Enter block"]; + 109 [label="Const: Int(2)"]; + 110 [label="Exit block"]; } - 114 [label="Exit when branch result"]; - 115 [label="Exit when"]; - } - 116 [label="Postponed enter to lambda"]; - subgraph cluster_29 { - color=blue - 117 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_30 { + 111 [label="Exit when branch result"]; + 112 [label="Enter when branch result"]; + subgraph cluster_29 { color=blue - 118 [label="Enter block"]; - 119 [label="Access variable R|/x|"]; - 120 [label="Access variable R|kotlin/String.length#|"]; - 121 [label="Const: Int(123)"]; - 122 [label="Exit block"]; + 113 [label="Enter block"]; + 114 [label="Const: Int(1)"]; + 115 [label="Exit block"]; } - 123 [label="Exit function " style="filled" fillcolor=red]; + 116 [label="Exit when branch result"]; + 117 [label="Exit when"]; } - 124 [label="Postponed exit from lambda"]; - 125 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 126 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; - 127 [label="Access variable R|/x|"]; - 128 [label="Smart cast: R|/x|"]; - 129 [label="Access variable R|kotlin/String.length|"]; - 130 [label="Exit block"]; + 118 [label="Postponed enter to lambda"]; + subgraph cluster_30 { + color=blue + 119 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_31 { + color=blue + 120 [label="Enter block"]; + 121 [label="Access variable R|/x|"]; + 122 [label="Access variable R|kotlin/String.length#|"]; + 123 [label="Const: Int(123)"]; + 124 [label="Exit block"]; + } + 125 [label="Exit function " style="filled" fillcolor=red]; + } + 126 [label="Postponed exit from lambda"]; + 127 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 128 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; + 129 [label="Access variable R|/x|"]; + 130 [label="Smart cast: R|/x|"]; + 131 [label="Access variable R|kotlin/String.length|"]; + 132 [label="Exit block"]; } - 131 [label="Exit function test3" style="filled" fillcolor=red]; + 133 [label="Exit function test3" style="filled" fillcolor=red]; } - 86 -> {87}; - 87 -> {88}; - 88 -> {89 97}; - 88 -> {96} [style=dotted]; - 88 -> {89} [style=dashed]; + 88 -> {89}; 89 -> {90}; - 90 -> {91}; + 90 -> {91 99}; + 90 -> {98} [style=dotted]; + 90 -> {91} [style=dashed]; 91 -> {92}; 92 -> {93}; 93 -> {94}; 94 -> {95}; 95 -> {96}; - 96 -> {97} [color=green]; - 96 -> {126} [color=red]; + 96 -> {97}; 97 -> {98}; - 98 -> {99}; + 98 -> {99} [color=green]; + 98 -> {128} [color=red]; 99 -> {100}; 100 -> {101}; 101 -> {102}; - 102 -> {103 110}; + 102 -> {103}; 103 -> {104}; - 104 -> {105}; + 104 -> {105 112}; 105 -> {106}; 106 -> {107}; 107 -> {108}; 108 -> {109}; - 109 -> {115}; + 109 -> {110}; 110 -> {111}; - 111 -> {112}; + 111 -> {117}; 112 -> {113}; 113 -> {114}; 114 -> {115}; 115 -> {116}; - 116 -> {117 125}; - 116 -> {124} [style=dotted]; - 116 -> {117} [style=dashed]; + 116 -> {117}; 117 -> {118}; - 118 -> {119}; + 118 -> {119 127}; + 118 -> {126} [style=dotted]; + 118 -> {119} [style=dashed]; 119 -> {120}; 120 -> {121}; 121 -> {122}; 122 -> {123}; 123 -> {124}; - 124 -> {125} [color=green]; - 124 -> {126} [color=red]; + 124 -> {125}; 125 -> {126}; - 126 -> {127}; + 126 -> {127} [color=green]; + 126 -> {128} [color=red]; 127 -> {128}; 128 -> {129}; 129 -> {130}; 130 -> {131}; + 131 -> {132}; + 132 -> {133}; - subgraph cluster_31 { + subgraph cluster_32 { color=red - 132 [label="Enter function test4" style="filled" fillcolor=red]; - subgraph cluster_32 { + 134 [label="Enter function test4" style="filled" fillcolor=red]; + subgraph cluster_33 { color=blue - 133 [label="Enter block"]; - 134 [label="Access variable R|/x|"]; - 135 [label="Variable declaration: lvar p: R|kotlin/String?|"]; - subgraph cluster_33 { + 135 [label="Enter block"]; + 136 [label="Access variable R|/x|"]; + 137 [label="Variable declaration: lvar p: R|kotlin/String?|"]; + subgraph cluster_34 { color=blue - 136 [label="Enter when"]; - subgraph cluster_34 { - color=blue - 137 [label="Enter when branch condition "]; - 138 [label="Access variable R|/p|"]; - 139 [label="Const: Null(null)"]; - 140 [label="Equality operator !="]; - 141 [label="Exit when branch condition"]; - } - 142 [label="Synthetic else branch"]; - 143 [label="Enter when branch result"]; + 138 [label="Enter when"]; subgraph cluster_35 { color=blue - 144 [label="Enter block"]; - subgraph cluster_36 { + 139 [label="Enter when branch condition "]; + 140 [label="Access variable R|/p|"]; + 141 [label="Const: Null(null)"]; + 142 [label="Equality operator !="]; + 143 [label="Exit when branch condition"]; + } + 144 [label="Synthetic else branch"]; + 145 [label="Enter when branch result"]; + subgraph cluster_36 { + color=blue + 146 [label="Enter block"]; + subgraph cluster_37 { color=blue - 145 [label="Enter when"]; - subgraph cluster_37 { - color=blue - 146 [label="Enter when branch condition "]; - 147 [label="Const: Boolean(true)"]; - 148 [label="Exit when branch condition"]; - } + 147 [label="Enter when"]; subgraph cluster_38 { color=blue - 149 [label="Enter when branch condition else"]; + 148 [label="Enter when branch condition "]; + 149 [label="Const: Boolean(true)"]; 150 [label="Exit when branch condition"]; } - 151 [label="Enter when branch result"]; subgraph cluster_39 { color=blue - 152 [label="Enter block"]; - 153 [label="Postponed enter to lambda"]; - subgraph cluster_40 { - color=blue - 154 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_41 { - color=blue - 155 [label="Enter block"]; - 156 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 157 [label="Exit block"]; - } - 158 [label="Exit function " style="filled" fillcolor=red]; - } - 159 [label="Postponed exit from lambda"]; - 160 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 161 [label="Exit block"]; + 151 [label="Enter when branch condition else"]; + 152 [label="Exit when branch condition"]; } - 162 [label="Exit when branch result"]; - 163 [label="Enter when branch result"]; - subgraph cluster_42 { + 153 [label="Enter when branch result"]; + subgraph cluster_40 { color=blue - 164 [label="Enter block"]; - 165 [label="Postponed enter to lambda"]; - subgraph cluster_43 { + 154 [label="Enter block"]; + 155 [label="Postponed enter to lambda"]; + subgraph cluster_41 { color=blue - 166 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_44 { + 156 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_42 { color=blue - 167 [label="Enter block"]; - 168 [label="Const: Null(null)"]; - 169 [label="Assignment: R|/p|"]; - 170 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 171 [label="Exit block"]; + 157 [label="Enter block"]; + 158 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 159 [label="Exit block"]; } - 172 [label="Exit function " style="filled" fillcolor=red]; + 160 [label="Exit function " style="filled" fillcolor=red]; } - 173 [label="Postponed exit from lambda"]; - 174 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 175 [label="Exit block"]; + 161 [label="Postponed exit from lambda"]; + 162 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 163 [label="Exit block"]; } - 176 [label="Exit when branch result"]; - 177 [label="Exit when"]; + 164 [label="Exit when branch result"]; + 165 [label="Enter when branch result"]; + subgraph cluster_43 { + color=blue + 166 [label="Enter block"]; + 167 [label="Postponed enter to lambda"]; + subgraph cluster_44 { + color=blue + 168 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_45 { + color=blue + 169 [label="Enter block"]; + 170 [label="Const: Null(null)"]; + 171 [label="Assignment: R|/p|"]; + 172 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 173 [label="Exit block"]; + } + 174 [label="Exit function " style="filled" fillcolor=red]; + } + 175 [label="Postponed exit from lambda"]; + 176 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 177 [label="Exit block"]; + } + 178 [label="Exit when branch result"]; + 179 [label="Exit when"]; } - 178 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 179 [label="Const: Int(1)"]; - 180 [label="Postponed enter to lambda"]; - subgraph cluster_45 { + 180 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 181 [label="Const: Int(1)"]; + 182 [label="Postponed enter to lambda"]; + subgraph cluster_46 { color=blue - 181 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_46 { + 183 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_47 { color=blue - 182 [label="Enter block"]; - 183 [label="Access variable R|/p|"]; - 184 [label="Smart cast: R|/p|"]; - 185 [label="Access variable R|kotlin/String.length#|"]; - 186 [label="Const: Int(123)"]; - 187 [label="Exit block"]; + 184 [label="Enter block"]; + 185 [label="Access variable R|/p|"]; + 186 [label="Smart cast: R|/p|"]; + 187 [label="Access variable R|kotlin/String.length#|"]; + 188 [label="Const: Int(123)"]; + 189 [label="Exit block"]; } - 188 [label="Exit function " style="filled" fillcolor=red]; + 190 [label="Exit function " style="filled" fillcolor=red]; } - 189 [label="Postponed exit from lambda"]; - 190 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 191 [label="Merge postponed lambda exits"]; - 192 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; - 193 [label="Access variable R|/p|"]; - 194 [label="Access variable R|kotlin/String.length#|"]; - 195 [label="Exit block"]; + 191 [label="Postponed exit from lambda"]; + 192 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 193 [label="Merge postponed lambda exits"]; + 194 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; + 195 [label="Access variable R|/p|"]; + 196 [label="Access variable R|kotlin/String.length#|"]; + 197 [label="Exit block"]; } - 196 [label="Exit when branch result"]; - 197 [label="Exit when"]; + 198 [label="Exit when branch result"]; + 199 [label="Exit when"]; } - 198 [label="Exit block"]; + 200 [label="Exit block"]; } - 199 [label="Exit function test4" style="filled" fillcolor=red]; + 201 [label="Exit function test4" style="filled" fillcolor=red]; } - 132 -> {133}; - 133 -> {134}; 134 -> {135}; 135 -> {136}; 136 -> {137}; @@ -506,390 +511,390 @@ digraph flowFromInplaceLambda2_kt { 138 -> {139}; 139 -> {140}; 140 -> {141}; - 141 -> {142 143}; - 142 -> {197}; - 143 -> {144}; - 144 -> {145}; + 141 -> {142}; + 142 -> {143}; + 143 -> {144 145}; + 144 -> {199}; 145 -> {146}; 146 -> {147}; 147 -> {148}; - 148 -> {149 163}; + 148 -> {149}; 149 -> {150}; - 150 -> {151}; + 150 -> {151 165}; 151 -> {152}; 152 -> {153}; - 153 -> {154 160}; - 153 -> {159} [style=dotted]; - 153 -> {154} [style=dashed]; + 153 -> {154}; 154 -> {155}; - 155 -> {156}; + 155 -> {156 162}; + 155 -> {161} [style=dotted]; + 155 -> {156} [style=dashed]; 156 -> {157}; 157 -> {158}; 158 -> {159}; - 159 -> {160} [color=green]; - 159 -> {191} [color=red]; + 159 -> {160}; 160 -> {161}; - 161 -> {162}; - 162 -> {177}; + 161 -> {162} [color=green]; + 161 -> {193} [color=red]; + 162 -> {163}; 163 -> {164}; - 164 -> {165}; - 165 -> {166 174}; - 165 -> {173} [style=dotted]; - 165 -> {166} [style=dashed]; + 164 -> {179}; + 165 -> {166}; 166 -> {167}; - 167 -> {168}; + 167 -> {168 176}; + 167 -> {175} [style=dotted]; + 167 -> {168} [style=dashed]; 168 -> {169}; 169 -> {170}; 170 -> {171}; 171 -> {172}; 172 -> {173}; - 173 -> {174} [color=green]; - 173 -> {191} [color=red]; + 173 -> {174}; 174 -> {175}; - 175 -> {176}; + 175 -> {176} [color=green]; + 175 -> {193} [color=red]; 176 -> {177}; - 177 -> {178 191}; + 177 -> {178}; 178 -> {179}; - 179 -> {180}; - 180 -> {181 190}; - 180 -> {189} [style=dotted]; - 180 -> {181} [style=dashed]; + 179 -> {180 193}; + 180 -> {181}; 181 -> {182}; - 182 -> {183}; + 182 -> {183 192}; + 182 -> {191} [style=dotted]; + 182 -> {183} [style=dashed]; 183 -> {184}; 184 -> {185}; 185 -> {186}; 186 -> {187}; 187 -> {188}; 188 -> {189}; - 189 -> {190} [color=green]; - 189 -> {192} [color=red]; - 190 -> {192}; - 191 -> {192} [color=red]; - 192 -> {193}; - 193 -> {194}; + 189 -> {190}; + 190 -> {191}; + 191 -> {192} [color=green]; + 191 -> {194} [color=red]; + 192 -> {194}; + 193 -> {194} [color=red]; 194 -> {195}; 195 -> {196}; 196 -> {197}; 197 -> {198}; 198 -> {199}; - - subgraph cluster_47 { - color=red - 200 [label="Enter function test5" style="filled" fillcolor=red]; - subgraph cluster_48 { - color=blue - 201 [label="Enter block"]; - 202 [label="Access variable R|/y|"]; - 203 [label="Enter safe call"]; - 204 [label="Postponed enter to lambda"]; - subgraph cluster_49 { - color=blue - 205 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_50 { - color=blue - 206 [label="Enter block"]; - 207 [label="Access variable R|/x|"]; - 208 [label="Type operator: (R|/x| as R|kotlin/String|)"]; - 209 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 210 [label="Exit block"]; - } - 211 [label="Exit function " style="filled" fillcolor=red]; - } - 212 [label="Postponed exit from lambda"]; - 213 [label="Function call: $subj$.R|kotlin/let|(...)" style="filled" fillcolor=yellow]; - 214 [label="Exit safe call"]; - 215 [label="Const: Int(1)"]; - 216 [label="Postponed enter to lambda"]; - subgraph cluster_51 { - color=blue - 217 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_52 { - color=blue - 218 [label="Enter block"]; - 219 [label="Const: String()"]; - 220 [label="Exit block"]; - } - 221 [label="Exit function " style="filled" fillcolor=red]; - } - 222 [label="Postponed exit from lambda"]; - 223 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 224 [label="Merge postponed lambda exits"]; - 225 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; - 226 [label="Access variable R|/x|"]; - 227 [label="Access variable R|kotlin/String.length#|"]; - 228 [label="Exit block"]; - } - 229 [label="Exit function test5" style="filled" fillcolor=red]; - } + 199 -> {200}; 200 -> {201}; - 201 -> {202}; - 202 -> {203 214}; + + subgraph cluster_48 { + color=red + 202 [label="Enter function test5" style="filled" fillcolor=red]; + subgraph cluster_49 { + color=blue + 203 [label="Enter block"]; + 204 [label="Access variable R|/y|"]; + 205 [label="Enter safe call"]; + 206 [label="Postponed enter to lambda"]; + subgraph cluster_50 { + color=blue + 207 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_51 { + color=blue + 208 [label="Enter block"]; + 209 [label="Access variable R|/x|"]; + 210 [label="Type operator: (R|/x| as R|kotlin/String|)"]; + 211 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 212 [label="Exit block"]; + } + 213 [label="Exit function " style="filled" fillcolor=red]; + } + 214 [label="Postponed exit from lambda"]; + 215 [label="Function call: $subj$.R|kotlin/let|(...)" style="filled" fillcolor=yellow]; + 216 [label="Exit safe call"]; + 217 [label="Const: Int(1)"]; + 218 [label="Postponed enter to lambda"]; + subgraph cluster_52 { + color=blue + 219 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_53 { + color=blue + 220 [label="Enter block"]; + 221 [label="Const: String()"]; + 222 [label="Exit block"]; + } + 223 [label="Exit function " style="filled" fillcolor=red]; + } + 224 [label="Postponed exit from lambda"]; + 225 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 226 [label="Merge postponed lambda exits"]; + 227 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; + 228 [label="Access variable R|/x|"]; + 229 [label="Access variable R|kotlin/String.length#|"]; + 230 [label="Exit block"]; + } + 231 [label="Exit function test5" style="filled" fillcolor=red]; + } + 202 -> {203}; 203 -> {204}; - 204 -> {205 213}; - 204 -> {212} [style=dotted]; - 204 -> {205} [style=dashed]; + 204 -> {205 216}; 205 -> {206}; - 206 -> {207}; + 206 -> {207 215}; + 206 -> {214} [style=dotted]; + 206 -> {207} [style=dashed]; 207 -> {208}; 208 -> {209}; 209 -> {210}; 210 -> {211}; 211 -> {212}; - 212 -> {213} [color=green]; - 212 -> {224} [color=red]; + 212 -> {213}; 213 -> {214}; - 214 -> {215 224}; + 214 -> {215} [color=green]; + 214 -> {226} [color=red]; 215 -> {216}; - 216 -> {217 223}; - 216 -> {222} [style=dotted]; - 216 -> {217} [style=dashed]; + 216 -> {217 226}; 217 -> {218}; - 218 -> {219}; + 218 -> {219 225}; + 218 -> {224} [style=dotted]; + 218 -> {219} [style=dashed]; 219 -> {220}; 220 -> {221}; 221 -> {222}; - 222 -> {223} [color=green]; - 222 -> {225} [color=red]; - 223 -> {225}; - 224 -> {225} [color=red]; - 225 -> {226}; - 226 -> {227}; + 222 -> {223}; + 223 -> {224}; + 224 -> {225} [color=green]; + 224 -> {227} [color=red]; + 225 -> {227}; + 226 -> {227} [color=red]; 227 -> {228}; 228 -> {229}; + 229 -> {230}; + 230 -> {231}; - subgraph cluster_53 { + subgraph cluster_54 { color=red - 230 [label="Enter function test6" style="filled" fillcolor=red]; - subgraph cluster_54 { + 232 [label="Enter function test6" style="filled" fillcolor=red]; + subgraph cluster_55 { color=blue - 231 [label="Enter block"]; - subgraph cluster_55 { + 233 [label="Enter block"]; + subgraph cluster_56 { color=blue - 232 [label="Enter when"]; - subgraph cluster_56 { - color=blue - 233 [label="Enter when branch condition "]; - 234 [label="Const: Boolean(true)"]; - 235 [label="Exit when branch condition"]; - } + 234 [label="Enter when"]; subgraph cluster_57 { color=blue - 236 [label="Enter when branch condition else"]; + 235 [label="Enter when branch condition "]; + 236 [label="Const: Boolean(true)"]; 237 [label="Exit when branch condition"]; } - 238 [label="Enter when branch result"]; subgraph cluster_58 { color=blue - 239 [label="Enter block"]; - 240 [label="Postponed enter to lambda"]; - subgraph cluster_59 { - color=blue - 241 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_60 { - color=blue - 242 [label="Enter block"]; - 243 [label="Access variable R|/x|"]; - 244 [label="Type operator: (R|/x| as R|kotlin/String|)"]; - 245 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 246 [label="Exit block"]; - } - 247 [label="Exit function " style="filled" fillcolor=red]; - } - 248 [label="Postponed exit from lambda"]; - 249 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 250 [label="Exit block"]; + 238 [label="Enter when branch condition else"]; + 239 [label="Exit when branch condition"]; } - 251 [label="Exit when branch result"]; - 252 [label="Enter when branch result"]; - subgraph cluster_61 { + 240 [label="Enter when branch result"]; + subgraph cluster_59 { color=blue - 253 [label="Enter block"]; - 254 [label="Postponed enter to lambda"]; - subgraph cluster_62 { + 241 [label="Enter block"]; + 242 [label="Postponed enter to lambda"]; + subgraph cluster_60 { color=blue - 255 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_63 { + 243 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_61 { color=blue - 256 [label="Enter block"]; - 257 [label="Access variable R|/x|"]; - 258 [label="Type operator: (R|/x| as R|kotlin/String|)"]; - 259 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 260 [label="Exit block"]; + 244 [label="Enter block"]; + 245 [label="Access variable R|/x|"]; + 246 [label="Type operator: (R|/x| as R|kotlin/String|)"]; + 247 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 248 [label="Exit block"]; } - 261 [label="Exit function " style="filled" fillcolor=red]; + 249 [label="Exit function " style="filled" fillcolor=red]; } - 262 [label="Postponed exit from lambda"]; - 263 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 264 [label="Exit block"]; + 250 [label="Postponed exit from lambda"]; + 251 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 252 [label="Exit block"]; } - 265 [label="Exit when branch result"]; - 266 [label="Exit when"]; + 253 [label="Exit when branch result"]; + 254 [label="Enter when branch result"]; + subgraph cluster_62 { + color=blue + 255 [label="Enter block"]; + 256 [label="Postponed enter to lambda"]; + subgraph cluster_63 { + color=blue + 257 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_64 { + color=blue + 258 [label="Enter block"]; + 259 [label="Access variable R|/x|"]; + 260 [label="Type operator: (R|/x| as R|kotlin/String|)"]; + 261 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 262 [label="Exit block"]; + } + 263 [label="Exit function " style="filled" fillcolor=red]; + } + 264 [label="Postponed exit from lambda"]; + 265 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 266 [label="Exit block"]; + } + 267 [label="Exit when branch result"]; + 268 [label="Exit when"]; } - 267 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 268 [label="Const: Int(1)"]; - 269 [label="Postponed enter to lambda"]; - subgraph cluster_64 { + 269 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 270 [label="Const: Int(1)"]; + 271 [label="Postponed enter to lambda"]; + subgraph cluster_65 { color=blue - 270 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_65 { + 272 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_66 { color=blue - 271 [label="Enter block"]; - 272 [label="Access variable R|/x|"]; - 273 [label="Access variable R|kotlin/String.length#|"]; - 274 [label="Const: Int(123)"]; - 275 [label="Exit block"]; + 273 [label="Enter block"]; + 274 [label="Access variable R|/x|"]; + 275 [label="Access variable R|kotlin/String.length#|"]; + 276 [label="Const: Int(123)"]; + 277 [label="Exit block"]; } - 276 [label="Exit function " style="filled" fillcolor=red]; + 278 [label="Exit function " style="filled" fillcolor=red]; } - 277 [label="Postponed exit from lambda"]; - 278 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 279 [label="Merge postponed lambda exits"]; - 280 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; - 281 [label="Access variable R|/x|"]; - 282 [label="Access variable R|kotlin/String.length#|"]; - 283 [label="Exit block"]; + 279 [label="Postponed exit from lambda"]; + 280 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 281 [label="Merge postponed lambda exits"]; + 282 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; + 283 [label="Access variable R|/x|"]; + 284 [label="Access variable R|kotlin/String.length#|"]; + 285 [label="Exit block"]; } - 284 [label="Exit function test6" style="filled" fillcolor=red]; + 286 [label="Exit function test6" style="filled" fillcolor=red]; } - 230 -> {231}; - 231 -> {232}; 232 -> {233}; 233 -> {234}; 234 -> {235}; - 235 -> {236 252}; + 235 -> {236}; 236 -> {237}; - 237 -> {238}; + 237 -> {238 254}; 238 -> {239}; 239 -> {240}; - 240 -> {241 249}; - 240 -> {248} [style=dotted]; - 240 -> {241} [style=dashed]; + 240 -> {241}; 241 -> {242}; - 242 -> {243}; + 242 -> {243 251}; + 242 -> {250} [style=dotted]; + 242 -> {243} [style=dashed]; 243 -> {244}; 244 -> {245}; 245 -> {246}; 246 -> {247}; 247 -> {248}; - 248 -> {249} [color=green]; - 248 -> {279} [color=red]; + 248 -> {249}; 249 -> {250}; - 250 -> {251}; - 251 -> {266}; + 250 -> {251} [color=green]; + 250 -> {281} [color=red]; + 251 -> {252}; 252 -> {253}; - 253 -> {254}; - 254 -> {255 263}; - 254 -> {262} [style=dotted]; - 254 -> {255} [style=dashed]; + 253 -> {268}; + 254 -> {255}; 255 -> {256}; - 256 -> {257}; + 256 -> {257 265}; + 256 -> {264} [style=dotted]; + 256 -> {257} [style=dashed]; 257 -> {258}; 258 -> {259}; 259 -> {260}; 260 -> {261}; 261 -> {262}; - 262 -> {263} [color=green]; - 262 -> {279} [color=red]; + 262 -> {263}; 263 -> {264}; - 264 -> {265}; + 264 -> {265} [color=green]; + 264 -> {281} [color=red]; 265 -> {266}; - 266 -> {267 279}; + 266 -> {267}; 267 -> {268}; - 268 -> {269}; - 269 -> {270 278}; - 269 -> {277} [style=dotted]; - 269 -> {270} [style=dashed]; + 268 -> {269 281}; + 269 -> {270}; 270 -> {271}; - 271 -> {272}; + 271 -> {272 280}; + 271 -> {279} [style=dotted]; + 271 -> {272} [style=dashed]; 272 -> {273}; 273 -> {274}; 274 -> {275}; 275 -> {276}; 276 -> {277}; - 277 -> {278} [color=green]; - 277 -> {280} [color=red]; - 278 -> {280}; - 279 -> {280} [color=red]; - 280 -> {281}; - 281 -> {282}; + 277 -> {278}; + 278 -> {279}; + 279 -> {280} [color=green]; + 279 -> {282} [color=red]; + 280 -> {282}; + 281 -> {282} [color=red]; 282 -> {283}; 283 -> {284}; + 284 -> {285}; + 285 -> {286}; - subgraph cluster_66 { + subgraph cluster_67 { color=red - 285 [label="Enter function test7" style="filled" fillcolor=red]; - subgraph cluster_67 { + 287 [label="Enter function test7" style="filled" fillcolor=red]; + subgraph cluster_68 { color=blue - 286 [label="Enter block"]; - 287 [label="Access variable R|/x|"]; - 288 [label="Variable declaration: lvar p: R|kotlin/String?|"]; - subgraph cluster_68 { + 288 [label="Enter block"]; + 289 [label="Access variable R|/x|"]; + 290 [label="Variable declaration: lvar p: R|kotlin/String?|"]; + subgraph cluster_69 { color=blue - 289 [label="Enter when"]; - subgraph cluster_69 { - color=blue - 290 [label="Enter when branch condition "]; - 291 [label="Access variable R|/p|"]; - 292 [label="Const: Null(null)"]; - 293 [label="Equality operator !="]; - 294 [label="Exit when branch condition"]; - } - 295 [label="Synthetic else branch"]; - 296 [label="Enter when branch result"]; + 291 [label="Enter when"]; subgraph cluster_70 { color=blue - 297 [label="Enter block"]; - 298 [label="Postponed enter to lambda"]; - subgraph cluster_71 { - color=blue - 299 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_72 { - color=blue - 300 [label="Enter block"]; - 301 [label="Const: Null(null)"]; - 302 [label="Assignment: R|/p|"]; - 303 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 304 [label="Exit block"]; - } - 305 [label="Exit function " style="filled" fillcolor=red]; - } - 306 [label="Postponed exit from lambda"]; - 307 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 308 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; - 309 [label="Const: Int(1)"]; - 310 [label="Postponed enter to lambda"]; - subgraph cluster_73 { - color=blue - 311 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_74 { - color=blue - 312 [label="Enter block"]; - 313 [label="Access variable R|/p|"]; - 314 [label="Smart cast: R|/p|"]; - 315 [label="Access variable R|kotlin/String.length#|"]; - 316 [label="Const: Int(123)"]; - 317 [label="Exit block"]; - } - 318 [label="Exit function " style="filled" fillcolor=red]; - } - 319 [label="Postponed exit from lambda"]; - 320 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 321 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; - 322 [label="Access variable R|/p|"]; - 323 [label="Smart cast: R|/p|"]; - 324 [label="Access variable R|kotlin/String.length#|"]; - 325 [label="Exit block"]; + 292 [label="Enter when branch condition "]; + 293 [label="Access variable R|/p|"]; + 294 [label="Const: Null(null)"]; + 295 [label="Equality operator !="]; + 296 [label="Exit when branch condition"]; } - 326 [label="Exit when branch result"]; - 327 [label="Exit when"]; + 297 [label="Synthetic else branch"]; + 298 [label="Enter when branch result"]; + subgraph cluster_71 { + color=blue + 299 [label="Enter block"]; + 300 [label="Postponed enter to lambda"]; + subgraph cluster_72 { + color=blue + 301 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_73 { + color=blue + 302 [label="Enter block"]; + 303 [label="Const: Null(null)"]; + 304 [label="Assignment: R|/p|"]; + 305 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 306 [label="Exit block"]; + } + 307 [label="Exit function " style="filled" fillcolor=red]; + } + 308 [label="Postponed exit from lambda"]; + 309 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 310 [label="Function call: R|/id|(...)" style="filled" fillcolor=yellow]; + 311 [label="Const: Int(1)"]; + 312 [label="Postponed enter to lambda"]; + subgraph cluster_74 { + color=blue + 313 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_75 { + color=blue + 314 [label="Enter block"]; + 315 [label="Access variable R|/p|"]; + 316 [label="Smart cast: R|/p|"]; + 317 [label="Access variable R|kotlin/String.length#|"]; + 318 [label="Const: Int(123)"]; + 319 [label="Exit block"]; + } + 320 [label="Exit function " style="filled" fillcolor=red]; + } + 321 [label="Postponed exit from lambda"]; + 322 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 323 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; + 324 [label="Access variable R|/p|"]; + 325 [label="Smart cast: R|/p|"]; + 326 [label="Access variable R|kotlin/String.length#|"]; + 327 [label="Exit block"]; + } + 328 [label="Exit when branch result"]; + 329 [label="Exit when"]; } - 328 [label="Exit block"]; + 330 [label="Exit block"]; } - 329 [label="Exit function test7" style="filled" fillcolor=red]; + 331 [label="Exit function test7" style="filled" fillcolor=red]; } - 285 -> {286}; - 286 -> {287}; 287 -> {288}; 288 -> {289}; 289 -> {290}; @@ -897,40 +902,40 @@ digraph flowFromInplaceLambda2_kt { 291 -> {292}; 292 -> {293}; 293 -> {294}; - 294 -> {295 296}; - 295 -> {327}; - 296 -> {297}; - 297 -> {298}; - 298 -> {299 307}; - 298 -> {306} [style=dotted]; - 298 -> {299} [style=dashed]; + 294 -> {295}; + 295 -> {296}; + 296 -> {297 298}; + 297 -> {329}; + 298 -> {299}; 299 -> {300}; - 300 -> {301}; + 300 -> {301 309}; + 300 -> {308} [style=dotted]; + 300 -> {301} [style=dashed]; 301 -> {302}; 302 -> {303}; 303 -> {304}; 304 -> {305}; 305 -> {306}; - 306 -> {307} [color=green]; - 306 -> {321} [color=red]; + 306 -> {307}; 307 -> {308}; - 308 -> {309}; + 308 -> {309} [color=green]; + 308 -> {323} [color=red]; 309 -> {310}; - 310 -> {311 320}; - 310 -> {319} [style=dotted]; - 310 -> {311} [style=dashed]; + 310 -> {311}; 311 -> {312}; - 312 -> {313}; + 312 -> {313 322}; + 312 -> {321} [style=dotted]; + 312 -> {313} [style=dashed]; 313 -> {314}; 314 -> {315}; 315 -> {316}; 316 -> {317}; 317 -> {318}; 318 -> {319}; - 319 -> {320} [color=green]; - 319 -> {321} [color=red]; + 319 -> {320}; 320 -> {321}; - 321 -> {322}; + 321 -> {322} [color=green]; + 321 -> {323} [color=red]; 322 -> {323}; 323 -> {324}; 324 -> {325}; @@ -938,5 +943,7 @@ digraph flowFromInplaceLambda2_kt { 326 -> {327}; 327 -> {328}; 328 -> {329}; + 329 -> {330}; + 330 -> {331}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda3.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda3.dot index cb1ff70ba07..d39c99907bd 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda3.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromInplaceLambda3.dot @@ -5,331 +5,336 @@ digraph flowFromInplaceLambda3_kt { subgraph cluster_0 { color=red - 0 [label="Enter function unknown" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter block"]; - subgraph cluster_2 { - color=blue - 2 [label="Enter block"]; - 3 [label="Exit block"]; - } - 4 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 5 [label="Exit block"]; - } - 6 [label="Exit function unknown" style="filled" fillcolor=red]; + 0 [label="Enter file flowFromInplaceLambda3.kt" style="filled" fillcolor=red]; + 1 [label="Exit file flowFromInplaceLambda3.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function unknown" style="filled" fillcolor=red]; + subgraph cluster_2 { + color=blue + 3 [label="Enter block"]; + subgraph cluster_3 { + color=blue + 4 [label="Enter block"]; + 5 [label="Exit block"]; + } + 6 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 7 [label="Exit block"]; + } + 8 [label="Exit function unknown" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; 3 -> {4}; 4 -> {5}; 5 -> {6}; - - subgraph cluster_3 { - color=red - 7 [label="Enter function atLeastOnce" style="filled" fillcolor=red]; - subgraph cluster_4 { - color=blue - 8 [label="Enter block"]; - subgraph cluster_5 { - color=blue - 9 [label="Enter block"]; - 10 [label="Exit block"]; - } - 11 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 12 [label="Exit block"]; - } - 13 [label="Exit function atLeastOnce" style="filled" fillcolor=red]; - } + 6 -> {7}; 7 -> {8}; - 8 -> {9}; + + subgraph cluster_4 { + color=red + 9 [label="Enter function atLeastOnce" style="filled" fillcolor=red]; + subgraph cluster_5 { + color=blue + 10 [label="Enter block"]; + subgraph cluster_6 { + color=blue + 11 [label="Enter block"]; + 12 [label="Exit block"]; + } + 13 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 14 [label="Exit block"]; + } + 15 [label="Exit function atLeastOnce" style="filled" fillcolor=red]; + } 9 -> {10}; 10 -> {11}; 11 -> {12}; 12 -> {13}; - - subgraph cluster_6 { - color=red - 14 [label="Enter function exactlyOnce" style="filled" fillcolor=red]; - subgraph cluster_7 { - color=blue - 15 [label="Enter block"]; - subgraph cluster_8 { - color=blue - 16 [label="Enter block"]; - 17 [label="Exit block"]; - } - 18 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 19 [label="Exit block"]; - } - 20 [label="Exit function exactlyOnce" style="filled" fillcolor=red]; - } + 13 -> {14}; 14 -> {15}; - 15 -> {16}; + + subgraph cluster_7 { + color=red + 16 [label="Enter function exactlyOnce" style="filled" fillcolor=red]; + subgraph cluster_8 { + color=blue + 17 [label="Enter block"]; + subgraph cluster_9 { + color=blue + 18 [label="Enter block"]; + 19 [label="Exit block"]; + } + 20 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 21 [label="Exit block"]; + } + 22 [label="Exit function exactlyOnce" style="filled" fillcolor=red]; + } 16 -> {17}; 17 -> {18}; 18 -> {19}; 19 -> {20}; - - subgraph cluster_9 { - color=red - 21 [label="Enter function atMostOnce" style="filled" fillcolor=red]; - subgraph cluster_10 { - color=blue - 22 [label="Enter block"]; - subgraph cluster_11 { - color=blue - 23 [label="Enter block"]; - 24 [label="Exit block"]; - } - 25 [label="Exit block"]; - } - 26 [label="Exit function atMostOnce" style="filled" fillcolor=red]; - } + 20 -> {21}; 21 -> {22}; - 22 -> {23}; + + subgraph cluster_10 { + color=red + 23 [label="Enter function atMostOnce" style="filled" fillcolor=red]; + subgraph cluster_11 { + color=blue + 24 [label="Enter block"]; + subgraph cluster_12 { + color=blue + 25 [label="Enter block"]; + 26 [label="Exit block"]; + } + 27 [label="Exit block"]; + } + 28 [label="Exit function atMostOnce" style="filled" fillcolor=red]; + } 23 -> {24}; 24 -> {25}; 25 -> {26}; - - subgraph cluster_12 { - color=red - 27 [label="Enter function test1" style="filled" fillcolor=red]; - subgraph cluster_13 { - color=blue - 28 [label="Enter block"]; - 29 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; - 30 [label="Const: String()"]; - 31 [label="Assignment: R|/x|"]; - 32 [label="Access variable R|/x|"]; - 33 [label="Smart cast: R|/x|"]; - 34 [label="Access variable R|kotlin/String.length|"]; - 35 [label="Postponed enter to lambda"]; - subgraph cluster_14 { - color=blue - 36 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_15 { - color=blue - 37 [label="Enter block"]; - 38 [label="Const: Int(1)"]; - 39 [label="Assignment: R|/x|"]; - 40 [label="Exit block"]; - } - 41 [label="Exit function " style="filled" fillcolor=red]; - } - 42 [label="Postponed exit from lambda"]; - 43 [label="Function call: R|/unknown|(...)" style="filled" fillcolor=yellow]; - 44 [label="Access variable R|/x|"]; - 45 [label="Smart cast: R|/x|"]; - 46 [label="Access variable #"]; - 47 [label="Access variable R|/x|"]; - 48 [label="Smart cast: R|/x|"]; - 49 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 50 [label="Exit block"]; - } - 51 [label="Exit function test1" style="filled" fillcolor=red]; - } + 26 -> {27}; 27 -> {28}; - 28 -> {29}; + + subgraph cluster_13 { + color=red + 29 [label="Enter function test1" style="filled" fillcolor=red]; + subgraph cluster_14 { + color=blue + 30 [label="Enter block"]; + 31 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; + 32 [label="Const: String()"]; + 33 [label="Assignment: R|/x|"]; + 34 [label="Access variable R|/x|"]; + 35 [label="Smart cast: R|/x|"]; + 36 [label="Access variable R|kotlin/String.length|"]; + 37 [label="Postponed enter to lambda"]; + subgraph cluster_15 { + color=blue + 38 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_16 { + color=blue + 39 [label="Enter block"]; + 40 [label="Const: Int(1)"]; + 41 [label="Assignment: R|/x|"]; + 42 [label="Exit block"]; + } + 43 [label="Exit function " style="filled" fillcolor=red]; + } + 44 [label="Postponed exit from lambda"]; + 45 [label="Function call: R|/unknown|(...)" style="filled" fillcolor=yellow]; + 46 [label="Access variable R|/x|"]; + 47 [label="Smart cast: R|/x|"]; + 48 [label="Access variable #"]; + 49 [label="Access variable R|/x|"]; + 50 [label="Smart cast: R|/x|"]; + 51 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 52 [label="Exit block"]; + } + 53 [label="Exit function test1" style="filled" fillcolor=red]; + } 29 -> {30}; 30 -> {31}; 31 -> {32}; 32 -> {33}; 33 -> {34}; 34 -> {35}; - 35 -> {36 42 43}; - 35 -> {36} [style=dashed]; + 35 -> {36}; 36 -> {37}; - 37 -> {38}; + 37 -> {38 44 45}; + 37 -> {38} [style=dashed]; 38 -> {39}; 39 -> {40}; 40 -> {41}; 41 -> {42}; 42 -> {43}; - 42 -> {35} [color=green style=dashed]; 43 -> {44}; 44 -> {45}; + 44 -> {37} [color=green style=dashed]; 45 -> {46}; 46 -> {47}; 47 -> {48}; 48 -> {49}; 49 -> {50}; 50 -> {51}; - - subgraph cluster_16 { - color=red - 52 [label="Enter function test1m" style="filled" fillcolor=red]; - subgraph cluster_17 { - color=blue - 53 [label="Enter block"]; - 54 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; - 55 [label="Const: String()"]; - 56 [label="Assignment: R|/x|"]; - 57 [label="Access variable R|/x|"]; - 58 [label="Smart cast: R|/x|"]; - 59 [label="Access variable R|kotlin/String.length|"]; - 60 [label="Postponed enter to lambda"]; - subgraph cluster_18 { - color=blue - 61 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_19 { - color=blue - 62 [label="Enter block"]; - 63 [label="Const: String()"]; - 64 [label="Assignment: R|/x|"]; - 65 [label="Exit block"]; - } - 66 [label="Exit function " style="filled" fillcolor=red]; - } - 67 [label="Postponed exit from lambda"]; - 68 [label="Function call: R|/unknown|(...)" style="filled" fillcolor=yellow]; - 69 [label="Access variable R|/x|"]; - 70 [label="Smart cast: R|/x|"]; - 71 [label="Access variable R|kotlin/String.length|"]; - 72 [label="Exit block"]; - } - 73 [label="Exit function test1m" style="filled" fillcolor=red]; - } + 51 -> {52}; 52 -> {53}; - 53 -> {54}; + + subgraph cluster_17 { + color=red + 54 [label="Enter function test1m" style="filled" fillcolor=red]; + subgraph cluster_18 { + color=blue + 55 [label="Enter block"]; + 56 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; + 57 [label="Const: String()"]; + 58 [label="Assignment: R|/x|"]; + 59 [label="Access variable R|/x|"]; + 60 [label="Smart cast: R|/x|"]; + 61 [label="Access variable R|kotlin/String.length|"]; + 62 [label="Postponed enter to lambda"]; + subgraph cluster_19 { + color=blue + 63 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_20 { + color=blue + 64 [label="Enter block"]; + 65 [label="Const: String()"]; + 66 [label="Assignment: R|/x|"]; + 67 [label="Exit block"]; + } + 68 [label="Exit function " style="filled" fillcolor=red]; + } + 69 [label="Postponed exit from lambda"]; + 70 [label="Function call: R|/unknown|(...)" style="filled" fillcolor=yellow]; + 71 [label="Access variable R|/x|"]; + 72 [label="Smart cast: R|/x|"]; + 73 [label="Access variable R|kotlin/String.length|"]; + 74 [label="Exit block"]; + } + 75 [label="Exit function test1m" style="filled" fillcolor=red]; + } 54 -> {55}; 55 -> {56}; 56 -> {57}; 57 -> {58}; 58 -> {59}; 59 -> {60}; - 60 -> {61 67 68}; - 60 -> {61} [style=dashed]; + 60 -> {61}; 61 -> {62}; - 62 -> {63}; + 62 -> {63 69 70}; + 62 -> {63} [style=dashed]; 63 -> {64}; 64 -> {65}; 65 -> {66}; 66 -> {67}; 67 -> {68}; - 67 -> {60} [color=green style=dashed]; 68 -> {69}; 69 -> {70}; + 69 -> {62} [color=green style=dashed]; 70 -> {71}; 71 -> {72}; 72 -> {73}; - - subgraph cluster_20 { - color=red - 74 [label="Enter function test2" style="filled" fillcolor=red]; - subgraph cluster_21 { - color=blue - 75 [label="Enter block"]; - 76 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; - 77 [label="Const: String()"]; - 78 [label="Assignment: R|/x|"]; - 79 [label="Access variable R|/x|"]; - 80 [label="Smart cast: R|/x|"]; - 81 [label="Access variable R|kotlin/String.length|"]; - 82 [label="Postponed enter to lambda"]; - subgraph cluster_22 { - color=blue - 83 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_23 { - color=blue - 84 [label="Enter block"]; - 85 [label="Const: Int(1)"]; - 86 [label="Assignment: R|/x|"]; - 87 [label="Exit block"]; - } - 88 [label="Exit function " style="filled" fillcolor=red]; - } - 89 [label="Postponed exit from lambda"]; - 90 [label="Function call: R|/atLeastOnce|(...)" style="filled" fillcolor=yellow]; - 91 [label="Access variable R|/x|"]; - 92 [label="Smart cast: R|/x|"]; - 93 [label="Access variable #"]; - 94 [label="Access variable R|/x|"]; - 95 [label="Smart cast: R|/x|"]; - 96 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 97 [label="Exit block"]; - } - 98 [label="Exit function test2" style="filled" fillcolor=red]; - } + 73 -> {74}; 74 -> {75}; - 75 -> {76}; + + subgraph cluster_21 { + color=red + 76 [label="Enter function test2" style="filled" fillcolor=red]; + subgraph cluster_22 { + color=blue + 77 [label="Enter block"]; + 78 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; + 79 [label="Const: String()"]; + 80 [label="Assignment: R|/x|"]; + 81 [label="Access variable R|/x|"]; + 82 [label="Smart cast: R|/x|"]; + 83 [label="Access variable R|kotlin/String.length|"]; + 84 [label="Postponed enter to lambda"]; + subgraph cluster_23 { + color=blue + 85 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_24 { + color=blue + 86 [label="Enter block"]; + 87 [label="Const: Int(1)"]; + 88 [label="Assignment: R|/x|"]; + 89 [label="Exit block"]; + } + 90 [label="Exit function " style="filled" fillcolor=red]; + } + 91 [label="Postponed exit from lambda"]; + 92 [label="Function call: R|/atLeastOnce|(...)" style="filled" fillcolor=yellow]; + 93 [label="Access variable R|/x|"]; + 94 [label="Smart cast: R|/x|"]; + 95 [label="Access variable #"]; + 96 [label="Access variable R|/x|"]; + 97 [label="Smart cast: R|/x|"]; + 98 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 99 [label="Exit block"]; + } + 100 [label="Exit function test2" style="filled" fillcolor=red]; + } 76 -> {77}; 77 -> {78}; 78 -> {79}; 79 -> {80}; 80 -> {81}; 81 -> {82}; - 82 -> {83 90}; - 82 -> {89} [style=dotted]; - 82 -> {83} [style=dashed]; + 82 -> {83}; 83 -> {84}; - 84 -> {85}; + 84 -> {85 92}; + 84 -> {91} [style=dotted]; + 84 -> {85} [style=dashed]; 85 -> {86}; 86 -> {87}; 87 -> {88}; 88 -> {89}; 89 -> {90}; - 89 -> {82} [color=green style=dashed]; 90 -> {91}; 91 -> {92}; + 91 -> {84} [color=green style=dashed]; 92 -> {93}; 93 -> {94}; 94 -> {95}; 95 -> {96}; 96 -> {97}; 97 -> {98}; - - subgraph cluster_24 { - color=red - 99 [label="Enter function test3" style="filled" fillcolor=red]; - subgraph cluster_25 { - color=blue - 100 [label="Enter block"]; - 101 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; - 102 [label="Const: String()"]; - 103 [label="Assignment: R|/x|"]; - 104 [label="Access variable R|/x|"]; - 105 [label="Smart cast: R|/x|"]; - 106 [label="Access variable R|kotlin/String.length|"]; - 107 [label="Postponed enter to lambda"]; - subgraph cluster_26 { - color=blue - 108 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_27 { - color=blue - 109 [label="Enter block"]; - 110 [label="Const: Int(1)"]; - 111 [label="Assignment: R|/x|"]; - 112 [label="Exit block"]; - } - 113 [label="Exit function " style="filled" fillcolor=red]; - } - 114 [label="Postponed exit from lambda"]; - 115 [label="Function call: R|/exactlyOnce|(...)" style="filled" fillcolor=yellow]; - 116 [label="Access variable R|/x|"]; - 117 [label="Smart cast: R|/x|"]; - 118 [label="Access variable #"]; - 119 [label="Access variable R|/x|"]; - 120 [label="Smart cast: R|/x|"]; - 121 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 122 [label="Exit block"]; - } - 123 [label="Exit function test3" style="filled" fillcolor=red]; - } + 98 -> {99}; 99 -> {100}; - 100 -> {101}; + + subgraph cluster_25 { + color=red + 101 [label="Enter function test3" style="filled" fillcolor=red]; + subgraph cluster_26 { + color=blue + 102 [label="Enter block"]; + 103 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; + 104 [label="Const: String()"]; + 105 [label="Assignment: R|/x|"]; + 106 [label="Access variable R|/x|"]; + 107 [label="Smart cast: R|/x|"]; + 108 [label="Access variable R|kotlin/String.length|"]; + 109 [label="Postponed enter to lambda"]; + subgraph cluster_27 { + color=blue + 110 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_28 { + color=blue + 111 [label="Enter block"]; + 112 [label="Const: Int(1)"]; + 113 [label="Assignment: R|/x|"]; + 114 [label="Exit block"]; + } + 115 [label="Exit function " style="filled" fillcolor=red]; + } + 116 [label="Postponed exit from lambda"]; + 117 [label="Function call: R|/exactlyOnce|(...)" style="filled" fillcolor=yellow]; + 118 [label="Access variable R|/x|"]; + 119 [label="Smart cast: R|/x|"]; + 120 [label="Access variable #"]; + 121 [label="Access variable R|/x|"]; + 122 [label="Smart cast: R|/x|"]; + 123 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 124 [label="Exit block"]; + } + 125 [label="Exit function test3" style="filled" fillcolor=red]; + } 101 -> {102}; 102 -> {103}; 103 -> {104}; 104 -> {105}; 105 -> {106}; 106 -> {107}; - 107 -> {108 115}; - 107 -> {114} [style=dotted]; - 107 -> {108} [style=dashed]; + 107 -> {108}; 108 -> {109}; - 109 -> {110}; + 109 -> {110 117}; + 109 -> {116} [style=dotted]; + 109 -> {110} [style=dashed]; 110 -> {111}; 111 -> {112}; 112 -> {113}; @@ -343,56 +348,56 @@ digraph flowFromInplaceLambda3_kt { 120 -> {121}; 121 -> {122}; 122 -> {123}; - - subgraph cluster_28 { - color=red - 124 [label="Enter function test4" style="filled" fillcolor=red]; - subgraph cluster_29 { - color=blue - 125 [label="Enter block"]; - 126 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; - 127 [label="Const: String()"]; - 128 [label="Assignment: R|/x|"]; - 129 [label="Access variable R|/x|"]; - 130 [label="Smart cast: R|/x|"]; - 131 [label="Access variable R|kotlin/String.length|"]; - 132 [label="Postponed enter to lambda"]; - subgraph cluster_30 { - color=blue - 133 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_31 { - color=blue - 134 [label="Enter block"]; - 135 [label="Const: Int(1)"]; - 136 [label="Assignment: R|/x|"]; - 137 [label="Exit block"]; - } - 138 [label="Exit function " style="filled" fillcolor=red]; - } - 139 [label="Postponed exit from lambda"]; - 140 [label="Function call: R|/atMostOnce|(...)" style="filled" fillcolor=yellow]; - 141 [label="Access variable R|/x|"]; - 142 [label="Smart cast: R|/x|"]; - 143 [label="Access variable #"]; - 144 [label="Access variable R|/x|"]; - 145 [label="Smart cast: R|/x|"]; - 146 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 147 [label="Exit block"]; - } - 148 [label="Exit function test4" style="filled" fillcolor=red]; - } + 123 -> {124}; 124 -> {125}; - 125 -> {126}; + + subgraph cluster_29 { + color=red + 126 [label="Enter function test4" style="filled" fillcolor=red]; + subgraph cluster_30 { + color=blue + 127 [label="Enter block"]; + 128 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; + 129 [label="Const: String()"]; + 130 [label="Assignment: R|/x|"]; + 131 [label="Access variable R|/x|"]; + 132 [label="Smart cast: R|/x|"]; + 133 [label="Access variable R|kotlin/String.length|"]; + 134 [label="Postponed enter to lambda"]; + subgraph cluster_31 { + color=blue + 135 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_32 { + color=blue + 136 [label="Enter block"]; + 137 [label="Const: Int(1)"]; + 138 [label="Assignment: R|/x|"]; + 139 [label="Exit block"]; + } + 140 [label="Exit function " style="filled" fillcolor=red]; + } + 141 [label="Postponed exit from lambda"]; + 142 [label="Function call: R|/atMostOnce|(...)" style="filled" fillcolor=yellow]; + 143 [label="Access variable R|/x|"]; + 144 [label="Smart cast: R|/x|"]; + 145 [label="Access variable #"]; + 146 [label="Access variable R|/x|"]; + 147 [label="Smart cast: R|/x|"]; + 148 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 149 [label="Exit block"]; + } + 150 [label="Exit function test4" style="filled" fillcolor=red]; + } 126 -> {127}; 127 -> {128}; 128 -> {129}; 129 -> {130}; 130 -> {131}; 131 -> {132}; - 132 -> {133 139 140}; - 132 -> {133} [style=dashed]; + 132 -> {133}; 133 -> {134}; - 134 -> {135}; + 134 -> {135 141 142}; + 134 -> {135} [style=dashed]; 135 -> {136}; 136 -> {137}; 137 -> {138}; @@ -406,5 +411,7 @@ digraph flowFromInplaceLambda3_kt { 145 -> {146}; 146 -> {147}; 147 -> {148}; + 148 -> {149}; + 149 -> {150}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromTwoInplaceLambdas.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromTwoInplaceLambdas.dot index bf5c97321ce..c872529bdc8 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromTwoInplaceLambdas.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromTwoInplaceLambdas.dot @@ -5,119 +5,124 @@ digraph flowFromTwoInplaceLambdas_kt { subgraph cluster_0 { color=red - 0 [label="Enter function n" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter block"]; - 2 [label="Const: Null(null)"]; - 3 [label="Jump: ^n Null(null)"]; - 4 [label="Stub" style="filled" fillcolor=gray]; - 5 [label="Exit block" style="filled" fillcolor=gray]; - } - 6 [label="Exit function n" style="filled" fillcolor=red]; + 0 [label="Enter file flowFromTwoInplaceLambdas.kt" style="filled" fillcolor=red]; + 1 [label="Exit file flowFromTwoInplaceLambdas.kt" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; - 2 -> {3}; - 3 -> {6}; - 3 -> {4} [style=dotted]; - 4 -> {5} [style=dotted]; - 5 -> {6} [style=dotted]; + 0 -> {1} [color=green]; - subgraph cluster_2 { + subgraph cluster_1 { color=red - 7 [label="Enter function run2" style="filled" fillcolor=red]; - subgraph cluster_3 { + 2 [label="Enter function n" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 8 [label="Enter block"]; - subgraph cluster_4 { - color=blue - 9 [label="Enter block"]; - 10 [label="Exit block"]; - } - 11 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 12 [label="Function call: R|/y|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 13 [label="Exit block"]; + 3 [label="Enter block"]; + 4 [label="Const: Null(null)"]; + 5 [label="Jump: ^n Null(null)"]; + 6 [label="Stub" style="filled" fillcolor=gray]; + 7 [label="Exit block" style="filled" fillcolor=gray]; } - 14 [label="Exit function run2" style="filled" fillcolor=red]; + 8 [label="Exit function n" style="filled" fillcolor=red]; + } + 2 -> {3}; + 3 -> {4}; + 4 -> {5}; + 5 -> {8}; + 5 -> {6} [style=dotted]; + 6 -> {7} [style=dotted]; + 7 -> {8} [style=dotted]; + + subgraph cluster_3 { + color=red + 9 [label="Enter function run2" style="filled" fillcolor=red]; + subgraph cluster_4 { + color=blue + 10 [label="Enter block"]; + subgraph cluster_5 { + color=blue + 11 [label="Enter block"]; + 12 [label="Exit block"]; + } + 13 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 14 [label="Function call: R|/y|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 15 [label="Exit block"]; + } + 16 [label="Exit function run2" style="filled" fillcolor=red]; } - 7 -> {8}; - 8 -> {9}; 9 -> {10}; 10 -> {11}; 11 -> {12}; 12 -> {13}; 13 -> {14}; + 14 -> {15}; + 15 -> {16}; - subgraph cluster_5 { + subgraph cluster_6 { color=red - 15 [label="Enter function test1" style="filled" fillcolor=red]; - subgraph cluster_6 { + 17 [label="Enter function test1" style="filled" fillcolor=red]; + subgraph cluster_7 { color=blue - 16 [label="Enter block"]; - 17 [label="Access variable R|/x|"]; - 18 [label="Variable declaration: lvar p: R|kotlin/String?|"]; - subgraph cluster_7 { + 18 [label="Enter block"]; + 19 [label="Access variable R|/x|"]; + 20 [label="Variable declaration: lvar p: R|kotlin/String?|"]; + subgraph cluster_8 { color=blue - 19 [label="Enter when"]; - subgraph cluster_8 { - color=blue - 20 [label="Enter when branch condition "]; - 21 [label="Access variable R|/p|"]; - 22 [label="Const: Null(null)"]; - 23 [label="Equality operator !="]; - 24 [label="Exit when branch condition"]; - } - 25 [label="Synthetic else branch"]; - 26 [label="Enter when branch result"]; + 21 [label="Enter when"]; subgraph cluster_9 { color=blue - 27 [label="Enter block"]; - 28 [label="Postponed enter to lambda"]; - subgraph cluster_10 { - color=blue - 29 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_11 { - color=blue - 30 [label="Enter block"]; - 31 [label="Access variable R|/p|"]; - 32 [label="Smart cast: R|/p|"]; - 33 [label="Access variable R|kotlin/String.length#|"]; - 34 [label="Const: Int(123)"]; - 35 [label="Exit block"]; - } - 36 [label="Exit function " style="filled" fillcolor=red]; - } - subgraph cluster_12 { - color=blue - 37 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_13 { - color=blue - 38 [label="Enter block"]; - 39 [label="Const: Null(null)"]; - 40 [label="Assignment: R|/p|"]; - 41 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 42 [label="Exit block"]; - } - 43 [label="Exit function " style="filled" fillcolor=red]; - } - 44 [label="Postponed exit from lambda"]; - 45 [label="Postponed exit from lambda"]; - 46 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; - 47 [label="Access variable R|/p|"]; - 48 [label="Smart cast: R|/p|"]; - 49 [label="Access variable R|kotlin/String.length#|"]; - 50 [label="Exit block"]; + 22 [label="Enter when branch condition "]; + 23 [label="Access variable R|/p|"]; + 24 [label="Const: Null(null)"]; + 25 [label="Equality operator !="]; + 26 [label="Exit when branch condition"]; } - 51 [label="Exit when branch result"]; - 52 [label="Exit when"]; + 27 [label="Synthetic else branch"]; + 28 [label="Enter when branch result"]; + subgraph cluster_10 { + color=blue + 29 [label="Enter block"]; + 30 [label="Postponed enter to lambda"]; + subgraph cluster_11 { + color=blue + 31 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_12 { + color=blue + 32 [label="Enter block"]; + 33 [label="Access variable R|/p|"]; + 34 [label="Smart cast: R|/p|"]; + 35 [label="Access variable R|kotlin/String.length#|"]; + 36 [label="Const: Int(123)"]; + 37 [label="Exit block"]; + } + 38 [label="Exit function " style="filled" fillcolor=red]; + } + subgraph cluster_13 { + color=blue + 39 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_14 { + color=blue + 40 [label="Enter block"]; + 41 [label="Const: Null(null)"]; + 42 [label="Assignment: R|/p|"]; + 43 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 44 [label="Exit block"]; + } + 45 [label="Exit function " style="filled" fillcolor=red]; + } + 46 [label="Postponed exit from lambda"]; + 47 [label="Postponed exit from lambda"]; + 48 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; + 49 [label="Access variable R|/p|"]; + 50 [label="Smart cast: R|/p|"]; + 51 [label="Access variable R|kotlin/String.length#|"]; + 52 [label="Exit block"]; + } + 53 [label="Exit when branch result"]; + 54 [label="Exit when"]; } - 53 [label="Exit block"]; + 55 [label="Exit block"]; } - 54 [label="Exit function test1" style="filled" fillcolor=red]; + 56 [label="Exit function test1" style="filled" fillcolor=red]; } - 15 -> {16}; - 16 -> {17}; 17 -> {18}; 18 -> {19}; 19 -> {20}; @@ -125,31 +130,31 @@ digraph flowFromTwoInplaceLambdas_kt { 21 -> {22}; 22 -> {23}; 23 -> {24}; - 24 -> {25 26}; - 25 -> {52}; - 26 -> {27}; - 27 -> {28}; - 28 -> {29 37 46}; - 28 -> {44 45} [style=dotted]; - 28 -> {29 37} [style=dashed]; + 24 -> {25}; + 25 -> {26}; + 26 -> {27 28}; + 27 -> {54}; + 28 -> {29}; 29 -> {30}; - 30 -> {31}; + 30 -> {31 39 48}; + 30 -> {46 47} [style=dotted]; + 30 -> {31 39} [style=dashed]; 31 -> {32}; 32 -> {33}; 33 -> {34}; 34 -> {35}; 35 -> {36}; - 36 -> {44}; + 36 -> {37}; 37 -> {38}; - 38 -> {39}; + 38 -> {46}; 39 -> {40}; 40 -> {41}; 41 -> {42}; 42 -> {43}; - 43 -> {45}; - 44 -> {46}; - 45 -> {46}; - 46 -> {47}; + 43 -> {44}; + 44 -> {45}; + 45 -> {47}; + 46 -> {48}; 47 -> {48}; 48 -> {49}; 49 -> {50}; @@ -157,76 +162,76 @@ digraph flowFromTwoInplaceLambdas_kt { 51 -> {52}; 52 -> {53}; 53 -> {54}; + 54 -> {55}; + 55 -> {56}; - subgraph cluster_14 { + subgraph cluster_15 { color=red - 55 [label="Enter function test1_tail" style="filled" fillcolor=red]; - subgraph cluster_15 { + 57 [label="Enter function test1_tail" style="filled" fillcolor=red]; + subgraph cluster_16 { color=blue - 56 [label="Enter block"]; - 57 [label="Access variable R|/x|"]; - 58 [label="Variable declaration: lvar p: R|kotlin/String?|"]; - subgraph cluster_16 { + 58 [label="Enter block"]; + 59 [label="Access variable R|/x|"]; + 60 [label="Variable declaration: lvar p: R|kotlin/String?|"]; + subgraph cluster_17 { color=blue - 59 [label="Enter when"]; - subgraph cluster_17 { - color=blue - 60 [label="Enter when branch condition "]; - 61 [label="Access variable R|/p|"]; - 62 [label="Const: Null(null)"]; - 63 [label="Equality operator !="]; - 64 [label="Exit when branch condition"]; - } - 65 [label="Synthetic else branch"]; - 66 [label="Enter when branch result"]; + 61 [label="Enter when"]; subgraph cluster_18 { color=blue - 67 [label="Enter block"]; - 68 [label="Postponed enter to lambda"]; - subgraph cluster_19 { - color=blue - 69 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_20 { - color=blue - 70 [label="Enter block"]; - 71 [label="Access variable R|/p|"]; - 72 [label="Smart cast: R|/p|"]; - 73 [label="Access variable R|kotlin/String.length#|"]; - 74 [label="Const: Int(123)"]; - 75 [label="Exit block"]; - } - 76 [label="Exit function " style="filled" fillcolor=red]; - } - subgraph cluster_21 { - color=blue - 77 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_22 { - color=blue - 78 [label="Enter block"]; - 79 [label="Const: Null(null)"]; - 80 [label="Assignment: R|/p|"]; - 81 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 82 [label="Exit block"]; - } - 83 [label="Exit function " style="filled" fillcolor=red]; - } - 84 [label="Postponed exit from lambda"]; - 85 [label="Postponed exit from lambda"]; - 86 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; - 87 [label="Access variable R|/p|"]; - 88 [label="Smart cast: R|/p|"]; - 89 [label="Access variable R|kotlin/String.length#|"]; - 90 [label="Exit block"]; + 62 [label="Enter when branch condition "]; + 63 [label="Access variable R|/p|"]; + 64 [label="Const: Null(null)"]; + 65 [label="Equality operator !="]; + 66 [label="Exit when branch condition"]; } - 91 [label="Exit when branch result"]; - 92 [label="Exit when"]; + 67 [label="Synthetic else branch"]; + 68 [label="Enter when branch result"]; + subgraph cluster_19 { + color=blue + 69 [label="Enter block"]; + 70 [label="Postponed enter to lambda"]; + subgraph cluster_20 { + color=blue + 71 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_21 { + color=blue + 72 [label="Enter block"]; + 73 [label="Access variable R|/p|"]; + 74 [label="Smart cast: R|/p|"]; + 75 [label="Access variable R|kotlin/String.length#|"]; + 76 [label="Const: Int(123)"]; + 77 [label="Exit block"]; + } + 78 [label="Exit function " style="filled" fillcolor=red]; + } + subgraph cluster_22 { + color=blue + 79 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_23 { + color=blue + 80 [label="Enter block"]; + 81 [label="Const: Null(null)"]; + 82 [label="Assignment: R|/p|"]; + 83 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 84 [label="Exit block"]; + } + 85 [label="Exit function " style="filled" fillcolor=red]; + } + 86 [label="Postponed exit from lambda"]; + 87 [label="Postponed exit from lambda"]; + 88 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; + 89 [label="Access variable R|/p|"]; + 90 [label="Smart cast: R|/p|"]; + 91 [label="Access variable R|kotlin/String.length#|"]; + 92 [label="Exit block"]; + } + 93 [label="Exit when branch result"]; + 94 [label="Exit when"]; } - 93 [label="Exit block"]; + 95 [label="Exit block"]; } - 94 [label="Exit function test1_tail" style="filled" fillcolor=red]; + 96 [label="Exit function test1_tail" style="filled" fillcolor=red]; } - 55 -> {56}; - 56 -> {57}; 57 -> {58}; 58 -> {59}; 59 -> {60}; @@ -234,31 +239,31 @@ digraph flowFromTwoInplaceLambdas_kt { 61 -> {62}; 62 -> {63}; 63 -> {64}; - 64 -> {65 66}; - 65 -> {92}; - 66 -> {67}; - 67 -> {68}; - 68 -> {69 77 86}; - 68 -> {84 85} [style=dotted]; - 68 -> {69 77} [style=dashed]; + 64 -> {65}; + 65 -> {66}; + 66 -> {67 68}; + 67 -> {94}; + 68 -> {69}; 69 -> {70}; - 70 -> {71}; + 70 -> {71 79 88}; + 70 -> {86 87} [style=dotted]; + 70 -> {71 79} [style=dashed]; 71 -> {72}; 72 -> {73}; 73 -> {74}; 74 -> {75}; 75 -> {76}; - 76 -> {84}; + 76 -> {77}; 77 -> {78}; - 78 -> {79}; + 78 -> {86}; 79 -> {80}; 80 -> {81}; 81 -> {82}; 82 -> {83}; - 83 -> {85}; - 84 -> {86}; - 85 -> {86}; - 86 -> {87}; + 83 -> {84}; + 84 -> {85}; + 85 -> {87}; + 86 -> {88}; 87 -> {88}; 88 -> {89}; 89 -> {90}; @@ -266,264 +271,264 @@ digraph flowFromTwoInplaceLambdas_kt { 91 -> {92}; 92 -> {93}; 93 -> {94}; - - subgraph cluster_23 { - color=red - 95 [label="Enter function test2" style="filled" fillcolor=red]; - subgraph cluster_24 { - color=blue - 96 [label="Enter block"]; - 97 [label="Access variable R|/x|"]; - 98 [label="Variable declaration: lvar p: R|kotlin/Any?|"]; - 99 [label="Access variable R|/p|"]; - 100 [label="Access variable #"]; - 101 [label="Postponed enter to lambda"]; - subgraph cluster_25 { - color=blue - 102 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_26 { - color=blue - 103 [label="Enter block"]; - 104 [label="Access variable R|/p|"]; - 105 [label="Type operator: (R|/p| as R|kotlin/String|)"]; - 106 [label="Const: Int(123)"]; - 107 [label="Exit block"]; - } - 108 [label="Exit function " style="filled" fillcolor=red]; - } - subgraph cluster_27 { - color=blue - 109 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_28 { - color=blue - 110 [label="Enter block"]; - 111 [label="Const: Null(null)"]; - 112 [label="Assignment: R|/p|"]; - 113 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 114 [label="Exit block"]; - } - 115 [label="Exit function " style="filled" fillcolor=red]; - } - 116 [label="Postponed exit from lambda"]; - 117 [label="Postponed exit from lambda"]; - 118 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; - 119 [label="Access variable R|/p|"]; - 120 [label="Smart cast: R|/p|"]; - 121 [label="Access variable #"]; - 122 [label="Access variable R|/p|"]; - 123 [label="Smart cast: R|/p|"]; - 124 [label="Enter safe call"]; - 125 [label="Access variable #"]; - 126 [label="Exit safe call"]; - 127 [label="Exit block"]; - } - 128 [label="Exit function test2" style="filled" fillcolor=red]; - } + 94 -> {95}; 95 -> {96}; - 96 -> {97}; + + subgraph cluster_24 { + color=red + 97 [label="Enter function test2" style="filled" fillcolor=red]; + subgraph cluster_25 { + color=blue + 98 [label="Enter block"]; + 99 [label="Access variable R|/x|"]; + 100 [label="Variable declaration: lvar p: R|kotlin/Any?|"]; + 101 [label="Access variable R|/p|"]; + 102 [label="Access variable #"]; + 103 [label="Postponed enter to lambda"]; + subgraph cluster_26 { + color=blue + 104 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_27 { + color=blue + 105 [label="Enter block"]; + 106 [label="Access variable R|/p|"]; + 107 [label="Type operator: (R|/p| as R|kotlin/String|)"]; + 108 [label="Const: Int(123)"]; + 109 [label="Exit block"]; + } + 110 [label="Exit function " style="filled" fillcolor=red]; + } + subgraph cluster_28 { + color=blue + 111 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_29 { + color=blue + 112 [label="Enter block"]; + 113 [label="Const: Null(null)"]; + 114 [label="Assignment: R|/p|"]; + 115 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 116 [label="Exit block"]; + } + 117 [label="Exit function " style="filled" fillcolor=red]; + } + 118 [label="Postponed exit from lambda"]; + 119 [label="Postponed exit from lambda"]; + 120 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; + 121 [label="Access variable R|/p|"]; + 122 [label="Smart cast: R|/p|"]; + 123 [label="Access variable #"]; + 124 [label="Access variable R|/p|"]; + 125 [label="Smart cast: R|/p|"]; + 126 [label="Enter safe call"]; + 127 [label="Access variable #"]; + 128 [label="Exit safe call"]; + 129 [label="Exit block"]; + } + 130 [label="Exit function test2" style="filled" fillcolor=red]; + } 97 -> {98}; 98 -> {99}; 99 -> {100}; 100 -> {101}; - 101 -> {102 109 118}; - 101 -> {116 117} [style=dotted]; - 101 -> {102 109} [style=dashed]; + 101 -> {102}; 102 -> {103}; - 103 -> {104}; + 103 -> {104 111 120}; + 103 -> {118 119} [style=dotted]; + 103 -> {104 111} [style=dashed]; 104 -> {105}; 105 -> {106}; 106 -> {107}; 107 -> {108}; - 108 -> {116}; + 108 -> {109}; 109 -> {110}; - 110 -> {111}; + 110 -> {118}; 111 -> {112}; 112 -> {113}; 113 -> {114}; 114 -> {115}; - 115 -> {117}; - 116 -> {118}; - 117 -> {118}; - 118 -> {119}; + 115 -> {116}; + 116 -> {117}; + 117 -> {119}; + 118 -> {120}; 119 -> {120}; 120 -> {121}; 121 -> {122}; 122 -> {123}; - 123 -> {124 126}; + 123 -> {124}; 124 -> {125}; - 125 -> {126}; + 125 -> {126 128}; 126 -> {127}; 127 -> {128}; - - subgraph cluster_29 { - color=red - 129 [label="Enter function test3" style="filled" fillcolor=red]; - subgraph cluster_30 { - color=blue - 130 [label="Enter block"]; - 131 [label="Access variable R|/x|"]; - 132 [label="Variable declaration: lvar p: R|kotlin/Any?|"]; - 133 [label="Access variable R|/p|"]; - 134 [label="Access variable #"]; - 135 [label="Postponed enter to lambda"]; - subgraph cluster_31 { - color=blue - 136 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_32 { - color=blue - 137 [label="Enter block"]; - 138 [label="Const: String()"]; - 139 [label="Assignment: R|/p|"]; - 140 [label="Const: Int(123)"]; - 141 [label="Exit block"]; - } - 142 [label="Exit function " style="filled" fillcolor=red]; - } - subgraph cluster_33 { - color=blue - 143 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_34 { - color=blue - 144 [label="Enter block"]; - 145 [label="Const: Null(null)"]; - 146 [label="Assignment: R|/p|"]; - 147 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 148 [label="Exit block"]; - } - 149 [label="Exit function " style="filled" fillcolor=red]; - } - 150 [label="Postponed exit from lambda"]; - 151 [label="Postponed exit from lambda"]; - 152 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; - 153 [label="Access variable R|/p|"]; - 154 [label="Smart cast: R|/p|"]; - 155 [label="Access variable R|kotlin/String.length#|"]; - 156 [label="Access variable R|/p|"]; - 157 [label="Smart cast: R|/p|"]; - 158 [label="Enter safe call"]; - 159 [label="Access variable R|kotlin/String.length|"]; - 160 [label="Exit safe call"]; - 161 [label="Exit block"]; - } - 162 [label="Exit function test3" style="filled" fillcolor=red]; - } + 128 -> {129}; 129 -> {130}; - 130 -> {131}; + + subgraph cluster_30 { + color=red + 131 [label="Enter function test3" style="filled" fillcolor=red]; + subgraph cluster_31 { + color=blue + 132 [label="Enter block"]; + 133 [label="Access variable R|/x|"]; + 134 [label="Variable declaration: lvar p: R|kotlin/Any?|"]; + 135 [label="Access variable R|/p|"]; + 136 [label="Access variable #"]; + 137 [label="Postponed enter to lambda"]; + subgraph cluster_32 { + color=blue + 138 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_33 { + color=blue + 139 [label="Enter block"]; + 140 [label="Const: String()"]; + 141 [label="Assignment: R|/p|"]; + 142 [label="Const: Int(123)"]; + 143 [label="Exit block"]; + } + 144 [label="Exit function " style="filled" fillcolor=red]; + } + subgraph cluster_34 { + color=blue + 145 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_35 { + color=blue + 146 [label="Enter block"]; + 147 [label="Const: Null(null)"]; + 148 [label="Assignment: R|/p|"]; + 149 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 150 [label="Exit block"]; + } + 151 [label="Exit function " style="filled" fillcolor=red]; + } + 152 [label="Postponed exit from lambda"]; + 153 [label="Postponed exit from lambda"]; + 154 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; + 155 [label="Access variable R|/p|"]; + 156 [label="Smart cast: R|/p|"]; + 157 [label="Access variable R|kotlin/String.length#|"]; + 158 [label="Access variable R|/p|"]; + 159 [label="Smart cast: R|/p|"]; + 160 [label="Enter safe call"]; + 161 [label="Access variable R|kotlin/String.length|"]; + 162 [label="Exit safe call"]; + 163 [label="Exit block"]; + } + 164 [label="Exit function test3" style="filled" fillcolor=red]; + } 131 -> {132}; 132 -> {133}; 133 -> {134}; 134 -> {135}; - 135 -> {136 143 152}; - 135 -> {150 151} [style=dotted]; - 135 -> {136 143} [style=dashed]; + 135 -> {136}; 136 -> {137}; - 137 -> {138}; + 137 -> {138 145 154}; + 137 -> {152 153} [style=dotted]; + 137 -> {138 145} [style=dashed]; 138 -> {139}; 139 -> {140}; 140 -> {141}; 141 -> {142}; - 142 -> {150}; + 142 -> {143}; 143 -> {144}; - 144 -> {145}; + 144 -> {152}; 145 -> {146}; 146 -> {147}; 147 -> {148}; 148 -> {149}; - 149 -> {151}; - 150 -> {152}; - 151 -> {152}; - 152 -> {153}; + 149 -> {150}; + 150 -> {151}; + 151 -> {153}; + 152 -> {154}; 153 -> {154}; 154 -> {155}; 155 -> {156}; 156 -> {157}; - 157 -> {158 160}; + 157 -> {158}; 158 -> {159}; - 159 -> {160}; + 159 -> {160 162}; 160 -> {161}; 161 -> {162}; - - subgraph cluster_35 { - color=red - 163 [label="Enter class I1" style="filled" fillcolor=red]; - 164 [label="Exit class I1" style="filled" fillcolor=red]; - } - 163 -> {164} [color=green]; + 162 -> {163}; + 163 -> {164}; subgraph cluster_36 { color=red - 165 [label="Enter class I2" style="filled" fillcolor=red]; - 166 [label="Exit class I2" style="filled" fillcolor=red]; + 165 [label="Enter class I1" style="filled" fillcolor=red]; + 166 [label="Exit class I1" style="filled" fillcolor=red]; } 165 -> {166} [color=green]; subgraph cluster_37 { color=red - 167 [label="Enter function test4" style="filled" fillcolor=red]; - subgraph cluster_38 { - color=blue - 168 [label="Enter block"]; - 169 [label="Access variable R|/x|"]; - 170 [label="Access variable #"]; - 171 [label="Access variable R|/x|"]; - 172 [label="Access variable #"]; - 173 [label="Postponed enter to lambda"]; - subgraph cluster_39 { - color=blue - 174 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_40 { - color=blue - 175 [label="Enter block"]; - 176 [label="Access variable R|/x|"]; - 177 [label="Type operator: (R|/x| as R|I2|)"]; - 178 [label="Access variable R|/x|"]; - 179 [label="Smart cast: R|/x|"]; - 180 [label="Access variable #"]; - 181 [label="Const: Int(123)"]; - 182 [label="Exit block"]; - } - 183 [label="Exit function " style="filled" fillcolor=red]; - } - subgraph cluster_41 { - color=blue - 184 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_42 { - color=blue - 185 [label="Enter block"]; - 186 [label="Access variable R|/x|"]; - 187 [label="Type operator: (R|/x| as R|I1|)"]; - 188 [label="Access variable R|/x|"]; - 189 [label="Smart cast: R|/x|"]; - 190 [label="Access variable #"]; - 191 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 192 [label="Exit block"]; - } - 193 [label="Exit function " style="filled" fillcolor=red]; - } - 194 [label="Postponed exit from lambda"]; - 195 [label="Postponed exit from lambda"]; - 196 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; - 197 [label="Access variable R|/x|"]; - 198 [label="Smart cast: R|/x|"]; - 199 [label="Access variable R|/I1.x|"]; - 200 [label="Access variable R|/x|"]; - 201 [label="Smart cast: R|/x|"]; - 202 [label="Access variable R|/I2.y|"]; - 203 [label="Exit block"]; - } - 204 [label="Exit function test4" style="filled" fillcolor=red]; + 167 [label="Enter class I2" style="filled" fillcolor=red]; + 168 [label="Exit class I2" style="filled" fillcolor=red]; + } + 167 -> {168} [color=green]; + + subgraph cluster_38 { + color=red + 169 [label="Enter function test4" style="filled" fillcolor=red]; + subgraph cluster_39 { + color=blue + 170 [label="Enter block"]; + 171 [label="Access variable R|/x|"]; + 172 [label="Access variable #"]; + 173 [label="Access variable R|/x|"]; + 174 [label="Access variable #"]; + 175 [label="Postponed enter to lambda"]; + subgraph cluster_40 { + color=blue + 176 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_41 { + color=blue + 177 [label="Enter block"]; + 178 [label="Access variable R|/x|"]; + 179 [label="Type operator: (R|/x| as R|I2|)"]; + 180 [label="Access variable R|/x|"]; + 181 [label="Smart cast: R|/x|"]; + 182 [label="Access variable #"]; + 183 [label="Const: Int(123)"]; + 184 [label="Exit block"]; + } + 185 [label="Exit function " style="filled" fillcolor=red]; + } + subgraph cluster_42 { + color=blue + 186 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_43 { + color=blue + 187 [label="Enter block"]; + 188 [label="Access variable R|/x|"]; + 189 [label="Type operator: (R|/x| as R|I1|)"]; + 190 [label="Access variable R|/x|"]; + 191 [label="Smart cast: R|/x|"]; + 192 [label="Access variable #"]; + 193 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 194 [label="Exit block"]; + } + 195 [label="Exit function " style="filled" fillcolor=red]; + } + 196 [label="Postponed exit from lambda"]; + 197 [label="Postponed exit from lambda"]; + 198 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; + 199 [label="Access variable R|/x|"]; + 200 [label="Smart cast: R|/x|"]; + 201 [label="Access variable R|/I1.x|"]; + 202 [label="Access variable R|/x|"]; + 203 [label="Smart cast: R|/x|"]; + 204 [label="Access variable R|/I2.y|"]; + 205 [label="Exit block"]; + } + 206 [label="Exit function test4" style="filled" fillcolor=red]; } - 167 -> {168}; - 168 -> {169}; 169 -> {170}; 170 -> {171}; 171 -> {172}; 172 -> {173}; - 173 -> {174 184 196}; - 173 -> {194 195} [style=dotted]; - 173 -> {174 184} [style=dashed]; + 173 -> {174}; 174 -> {175}; - 175 -> {176}; + 175 -> {176 186 198}; + 175 -> {196 197} [style=dotted]; + 175 -> {176 186} [style=dashed]; 176 -> {177}; 177 -> {178}; 178 -> {179}; @@ -531,9 +536,9 @@ digraph flowFromTwoInplaceLambdas_kt { 180 -> {181}; 181 -> {182}; 182 -> {183}; - 183 -> {194}; + 183 -> {184}; 184 -> {185}; - 185 -> {186}; + 185 -> {196}; 186 -> {187}; 187 -> {188}; 188 -> {189}; @@ -541,10 +546,10 @@ digraph flowFromTwoInplaceLambdas_kt { 190 -> {191}; 191 -> {192}; 192 -> {193}; - 193 -> {195}; - 194 -> {196}; - 195 -> {196}; - 196 -> {197}; + 193 -> {194}; + 194 -> {195}; + 195 -> {197}; + 196 -> {198}; 197 -> {198}; 198 -> {199}; 199 -> {200}; @@ -552,261 +557,261 @@ digraph flowFromTwoInplaceLambdas_kt { 201 -> {202}; 202 -> {203}; 203 -> {204}; - - subgraph cluster_43 { - color=red - 205 [label="Enter function test5" style="filled" fillcolor=red]; - subgraph cluster_44 { - color=blue - 206 [label="Enter block"]; - 207 [label="Access variable R|/x|"]; - 208 [label="Variable declaration: lvar p: R|kotlin/Any?|"]; - 209 [label="Access variable R|/p|"]; - 210 [label="Access variable #"]; - 211 [label="Postponed enter to lambda"]; - subgraph cluster_45 { - color=blue - 212 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_46 { - color=blue - 213 [label="Enter block"]; - 214 [label="Access variable R|/q|"]; - 215 [label="Assignment: R|/p|"]; - 216 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; - 217 [label="Exit block"]; - } - 218 [label="Exit function " style="filled" fillcolor=red]; - } - subgraph cluster_47 { - color=blue - 219 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_48 { - color=blue - 220 [label="Enter block"]; - 221 [label="Access variable R|/p|"]; - 222 [label="Type operator: (R|/p| as R|kotlin/Int|)"]; - 223 [label="Const: Int(123)"]; - 224 [label="Exit block"]; - } - 225 [label="Exit function " style="filled" fillcolor=red]; - } - 226 [label="Postponed exit from lambda"]; - 227 [label="Postponed exit from lambda"]; - 228 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; - 229 [label="Access variable R|/p|"]; - 230 [label="Smart cast: R|/p|"]; - 231 [label="Access variable R|kotlin/String.length#|"]; - 232 [label="Access variable R|/p|"]; - 233 [label="Smart cast: R|/p|"]; - 234 [label="Enter safe call"]; - 235 [label="Access variable R|kotlin/String.length|"]; - 236 [label="Exit safe call"]; - 237 [label="Exit block"]; - } - 238 [label="Exit function test5" style="filled" fillcolor=red]; - } + 204 -> {205}; 205 -> {206}; - 206 -> {207}; + + subgraph cluster_44 { + color=red + 207 [label="Enter function test5" style="filled" fillcolor=red]; + subgraph cluster_45 { + color=blue + 208 [label="Enter block"]; + 209 [label="Access variable R|/x|"]; + 210 [label="Variable declaration: lvar p: R|kotlin/Any?|"]; + 211 [label="Access variable R|/p|"]; + 212 [label="Access variable #"]; + 213 [label="Postponed enter to lambda"]; + subgraph cluster_46 { + color=blue + 214 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_47 { + color=blue + 215 [label="Enter block"]; + 216 [label="Access variable R|/q|"]; + 217 [label="Assignment: R|/p|"]; + 218 [label="Function call: R|/n|()" style="filled" fillcolor=yellow]; + 219 [label="Exit block"]; + } + 220 [label="Exit function " style="filled" fillcolor=red]; + } + subgraph cluster_48 { + color=blue + 221 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_49 { + color=blue + 222 [label="Enter block"]; + 223 [label="Access variable R|/p|"]; + 224 [label="Type operator: (R|/p| as R|kotlin/Int|)"]; + 225 [label="Const: Int(123)"]; + 226 [label="Exit block"]; + } + 227 [label="Exit function " style="filled" fillcolor=red]; + } + 228 [label="Postponed exit from lambda"]; + 229 [label="Postponed exit from lambda"]; + 230 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; + 231 [label="Access variable R|/p|"]; + 232 [label="Smart cast: R|/p|"]; + 233 [label="Access variable R|kotlin/String.length#|"]; + 234 [label="Access variable R|/p|"]; + 235 [label="Smart cast: R|/p|"]; + 236 [label="Enter safe call"]; + 237 [label="Access variable R|kotlin/String.length|"]; + 238 [label="Exit safe call"]; + 239 [label="Exit block"]; + } + 240 [label="Exit function test5" style="filled" fillcolor=red]; + } 207 -> {208}; 208 -> {209}; 209 -> {210}; 210 -> {211}; - 211 -> {212 219 228}; - 211 -> {226 227} [style=dotted]; - 211 -> {212 219} [style=dashed]; + 211 -> {212}; 212 -> {213}; - 213 -> {214}; + 213 -> {214 221 230}; + 213 -> {228 229} [style=dotted]; + 213 -> {214 221} [style=dashed]; 214 -> {215}; 215 -> {216}; 216 -> {217}; 217 -> {218}; - 218 -> {226}; + 218 -> {219}; 219 -> {220}; - 220 -> {221}; + 220 -> {228}; 221 -> {222}; 222 -> {223}; 223 -> {224}; 224 -> {225}; - 225 -> {227}; - 226 -> {228}; - 227 -> {228}; - 228 -> {229}; + 225 -> {226}; + 226 -> {227}; + 227 -> {229}; + 228 -> {230}; 229 -> {230}; 230 -> {231}; 231 -> {232}; 232 -> {233}; - 233 -> {234 236}; + 233 -> {234}; 234 -> {235}; - 235 -> {236}; + 235 -> {236 238}; 236 -> {237}; 237 -> {238}; - - subgraph cluster_49 { - color=red - 239 [label="Enter function test6" style="filled" fillcolor=red]; - subgraph cluster_50 { - color=blue - 240 [label="Enter block"]; - 241 [label="Variable declaration: lval x: R|kotlin/String|"]; - 242 [label="Postponed enter to lambda"]; - subgraph cluster_51 { - color=blue - 243 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_52 { - color=blue - 244 [label="Enter block"]; - 245 [label="Access variable R|/x|"]; - 246 [label="Access variable R|kotlin/String.length|"]; - 247 [label="Exit block"]; - } - 248 [label="Exit function " style="filled" fillcolor=red]; - } - subgraph cluster_53 { - color=blue - 249 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_54 { - color=blue - 250 [label="Enter block"]; - 251 [label="Const: String()"]; - 252 [label="Assignment: R|/x|"]; - 253 [label="Access variable R|/x|"]; - 254 [label="Access variable R|kotlin/String.length|"]; - 255 [label="Exit block"]; - } - 256 [label="Exit function " style="filled" fillcolor=red]; - } - 257 [label="Postponed exit from lambda"]; - 258 [label="Postponed exit from lambda"]; - 259 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; - 260 [label="Access variable R|/x|"]; - 261 [label="Access variable R|kotlin/String.length|"]; - 262 [label="Exit block"]; - } - 263 [label="Exit function test6" style="filled" fillcolor=red]; - } + 238 -> {239}; 239 -> {240}; - 240 -> {241}; + + subgraph cluster_50 { + color=red + 241 [label="Enter function test6" style="filled" fillcolor=red]; + subgraph cluster_51 { + color=blue + 242 [label="Enter block"]; + 243 [label="Variable declaration: lval x: R|kotlin/String|"]; + 244 [label="Postponed enter to lambda"]; + subgraph cluster_52 { + color=blue + 245 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_53 { + color=blue + 246 [label="Enter block"]; + 247 [label="Access variable R|/x|"]; + 248 [label="Access variable R|kotlin/String.length|"]; + 249 [label="Exit block"]; + } + 250 [label="Exit function " style="filled" fillcolor=red]; + } + subgraph cluster_54 { + color=blue + 251 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_55 { + color=blue + 252 [label="Enter block"]; + 253 [label="Const: String()"]; + 254 [label="Assignment: R|/x|"]; + 255 [label="Access variable R|/x|"]; + 256 [label="Access variable R|kotlin/String.length|"]; + 257 [label="Exit block"]; + } + 258 [label="Exit function " style="filled" fillcolor=red]; + } + 259 [label="Postponed exit from lambda"]; + 260 [label="Postponed exit from lambda"]; + 261 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; + 262 [label="Access variable R|/x|"]; + 263 [label="Access variable R|kotlin/String.length|"]; + 264 [label="Exit block"]; + } + 265 [label="Exit function test6" style="filled" fillcolor=red]; + } 241 -> {242}; - 242 -> {243 249 259}; - 242 -> {257 258} [style=dotted]; - 242 -> {243 249} [style=dashed]; + 242 -> {243}; 243 -> {244}; - 244 -> {245}; + 244 -> {245 251 261}; + 244 -> {259 260} [style=dotted]; + 244 -> {245 251} [style=dashed]; 245 -> {246}; 246 -> {247}; 247 -> {248}; - 248 -> {257}; + 248 -> {249}; 249 -> {250}; - 250 -> {251}; + 250 -> {259}; 251 -> {252}; 252 -> {253}; 253 -> {254}; 254 -> {255}; 255 -> {256}; - 256 -> {258}; - 257 -> {259}; - 258 -> {259}; - 259 -> {260}; + 256 -> {257}; + 257 -> {258}; + 258 -> {260}; + 259 -> {261}; 260 -> {261}; 261 -> {262}; 262 -> {263}; + 263 -> {264}; + 264 -> {265}; - subgraph cluster_55 { + subgraph cluster_56 { color=red - 264 [label="Enter function test7" style="filled" fillcolor=red]; - subgraph cluster_56 { + 266 [label="Enter function test7" style="filled" fillcolor=red]; + subgraph cluster_57 { color=blue - 265 [label="Enter block"]; - 266 [label="Const: String()"]; - 267 [label="Variable declaration: lval x: R|kotlin/Any?|"]; - 268 [label="Variable declaration: lval y: R|kotlin/Any?|"]; - 269 [label="Postponed enter to lambda"]; - subgraph cluster_57 { + 267 [label="Enter block"]; + 268 [label="Const: String()"]; + 269 [label="Variable declaration: lval x: R|kotlin/Any?|"]; + 270 [label="Variable declaration: lval y: R|kotlin/Any?|"]; + 271 [label="Postponed enter to lambda"]; + subgraph cluster_58 { color=blue - 270 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_58 { + 272 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_59 { color=blue - 271 [label="Enter block"]; - 272 [label="Jump: ^@run2 Unit"]; - 273 [label="Stub" style="filled" fillcolor=gray]; - 274 [label="Exit block" style="filled" fillcolor=gray]; + 273 [label="Enter block"]; + 274 [label="Jump: ^@run2 Unit"]; + 275 [label="Stub" style="filled" fillcolor=gray]; + 276 [label="Exit block" style="filled" fillcolor=gray]; } - 275 [label="Exit function " style="filled" fillcolor=red]; + 277 [label="Exit function " style="filled" fillcolor=red]; } - subgraph cluster_59 { + subgraph cluster_60 { color=blue - 276 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_60 { + 278 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_61 { color=blue - 277 [label="Enter block"]; - 278 [label="Access variable R|/x|"]; - 279 [label="Assignment: R|/y|"]; - 280 [label="Exit block"]; + 279 [label="Enter block"]; + 280 [label="Access variable R|/x|"]; + 281 [label="Assignment: R|/y|"]; + 282 [label="Exit block"]; } - 281 [label="Exit function " style="filled" fillcolor=red]; + 283 [label="Exit function " style="filled" fillcolor=red]; } - 282 [label="Postponed exit from lambda"]; - 283 [label="Postponed exit from lambda"]; - 284 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; - subgraph cluster_61 { + 284 [label="Postponed exit from lambda"]; + 285 [label="Postponed exit from lambda"]; + 286 [label="Function call: R|/run2|(...)" style="filled" fillcolor=yellow]; + subgraph cluster_62 { color=blue - 285 [label="Enter when"]; - subgraph cluster_62 { - color=blue - 286 [label="Enter when branch condition "]; - 287 [label="Access variable R|/y|"]; - 288 [label="Type operator: (R|/y| is R|kotlin/String|)"]; - 289 [label="Exit when branch condition"]; - } - 290 [label="Synthetic else branch"]; - 291 [label="Enter when branch result"]; + 287 [label="Enter when"]; subgraph cluster_63 { color=blue - 292 [label="Enter block"]; - 293 [label="Access variable R|/x|"]; - 294 [label="Smart cast: R|/x|"]; - 295 [label="Access variable R|kotlin/String.length|"]; - 296 [label="Exit block"]; + 288 [label="Enter when branch condition "]; + 289 [label="Access variable R|/y|"]; + 290 [label="Type operator: (R|/y| is R|kotlin/String|)"]; + 291 [label="Exit when branch condition"]; } - 297 [label="Exit when branch result"]; - 298 [label="Exit when"]; + 292 [label="Synthetic else branch"]; + 293 [label="Enter when branch result"]; + subgraph cluster_64 { + color=blue + 294 [label="Enter block"]; + 295 [label="Access variable R|/x|"]; + 296 [label="Smart cast: R|/x|"]; + 297 [label="Access variable R|kotlin/String.length|"]; + 298 [label="Exit block"]; + } + 299 [label="Exit when branch result"]; + 300 [label="Exit when"]; } - 299 [label="Exit block"]; + 301 [label="Exit block"]; } - 300 [label="Exit function test7" style="filled" fillcolor=red]; + 302 [label="Exit function test7" style="filled" fillcolor=red]; } - 264 -> {265}; - 265 -> {266}; 266 -> {267}; 267 -> {268}; 268 -> {269}; - 269 -> {270 276 284}; - 269 -> {282 283} [style=dotted]; - 269 -> {270 276} [style=dashed]; + 269 -> {270}; 270 -> {271}; - 271 -> {272}; - 272 -> {275}; - 272 -> {273} [style=dotted]; - 273 -> {274} [style=dotted]; + 271 -> {272 278 286}; + 271 -> {284 285} [style=dotted]; + 271 -> {272 278} [style=dashed]; + 272 -> {273}; + 273 -> {274}; + 274 -> {277}; 274 -> {275} [style=dotted]; - 275 -> {282}; - 276 -> {277}; - 277 -> {278}; + 275 -> {276} [style=dotted]; + 276 -> {277} [style=dotted]; + 277 -> {284}; 278 -> {279}; 279 -> {280}; 280 -> {281}; - 281 -> {283}; - 282 -> {284}; - 283 -> {284}; - 284 -> {285}; + 281 -> {282}; + 282 -> {283}; + 283 -> {285}; + 284 -> {286}; 285 -> {286}; 286 -> {287}; 287 -> {288}; 288 -> {289}; - 289 -> {290 291}; - 290 -> {298}; - 291 -> {292}; - 292 -> {293}; + 289 -> {290}; + 290 -> {291}; + 291 -> {292 293}; + 292 -> {300}; 293 -> {294}; 294 -> {295}; 295 -> {296}; @@ -814,5 +819,7 @@ digraph flowFromTwoInplaceLambdas_kt { 297 -> {298}; 298 -> {299}; 299 -> {300}; + 300 -> {301}; + 301 -> {302}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/initBlock.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/initBlock.dot index 0ea42b2b419..71c8b44de20 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/initBlock.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/initBlock.dot @@ -5,78 +5,83 @@ digraph initBlock_kt { subgraph cluster_0 { color=red - 0 [label="Enter class Foo" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter init block" style="filled" fillcolor=red]; - subgraph cluster_2 { - color=blue - 2 [label="Enter block"]; - 3 [label="Const: Int(1)"]; - 4 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 5 [label="Exit block"]; - } - 6 [label="Exit init block" style="filled" fillcolor=red]; - } - subgraph cluster_3 { - color=blue - 7 [label="Enter function " style="filled" fillcolor=red]; - 8 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 9 [label="Exit function " style="filled" fillcolor=red]; - } - 10 [label="Exit class Foo" style="filled" fillcolor=red]; + 0 [label="Enter file initBlock.kt" style="filled" fillcolor=red]; + 1 [label="Exit file initBlock.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; - 0 -> {10} [style=dotted]; - 0 -> {1 7} [style=dashed]; - 1 -> {2}; - 2 -> {3}; + + subgraph cluster_1 { + color=red + 2 [label="Enter class Foo" style="filled" fillcolor=red]; + subgraph cluster_2 { + color=blue + 3 [label="Enter init block" style="filled" fillcolor=red]; + subgraph cluster_3 { + color=blue + 4 [label="Enter block"]; + 5 [label="Const: Int(1)"]; + 6 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 7 [label="Exit block"]; + } + 8 [label="Exit init block" style="filled" fillcolor=red]; + } + subgraph cluster_4 { + color=blue + 9 [label="Enter function " style="filled" fillcolor=red]; + 10 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 11 [label="Exit function " style="filled" fillcolor=red]; + } + 12 [label="Exit class Foo" style="filled" fillcolor=red]; + } + 2 -> {3} [color=green]; + 2 -> {12} [style=dotted]; + 2 -> {3 9} [style=dashed]; 3 -> {4}; 4 -> {5}; 5 -> {6}; - 6 -> {7} [color=green]; + 6 -> {7}; 7 -> {8}; - 8 -> {9}; - 9 -> {10} [color=green]; - - subgraph cluster_4 { - color=red - 11 [label="Enter class Bar" style="filled" fillcolor=red]; - subgraph cluster_5 { - color=blue - 12 [label="Enter init block" style="filled" fillcolor=red]; - subgraph cluster_6 { - color=blue - 13 [label="Enter block"]; - 14 [label="Const: Int(1)"]; - 15 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 16 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; - 17 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 18 [label="Stub" style="filled" fillcolor=gray]; - 19 [label="Const: Int(2)" style="filled" fillcolor=gray]; - 20 [label="Variable declaration: lval y: R|kotlin/Int|" style="filled" fillcolor=gray]; - 21 [label="Exit block" style="filled" fillcolor=gray]; - } - 22 [label="Exit init block" style="filled" fillcolor=gray]; - } - subgraph cluster_7 { - color=blue - 23 [label="Enter function " style="filled" fillcolor=gray]; - 24 [label="Delegated constructor call: super()" style="filled" fillcolor=gray]; - 25 [label="Exit function " style="filled" fillcolor=gray]; - } - 26 [label="Exit class Bar" style="filled" fillcolor=gray]; - } + 8 -> {9} [color=green]; + 9 -> {10}; + 10 -> {11}; 11 -> {12} [color=green]; - 11 -> {26} [style=dotted]; - 11 -> {12 23} [style=dashed]; - 12 -> {13}; - 13 -> {14}; + + subgraph cluster_5 { + color=red + 13 [label="Enter class Bar" style="filled" fillcolor=red]; + subgraph cluster_6 { + color=blue + 14 [label="Enter init block" style="filled" fillcolor=red]; + subgraph cluster_7 { + color=blue + 15 [label="Enter block"]; + 16 [label="Const: Int(1)"]; + 17 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 18 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; + 19 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 20 [label="Stub" style="filled" fillcolor=gray]; + 21 [label="Const: Int(2)" style="filled" fillcolor=gray]; + 22 [label="Variable declaration: lval y: R|kotlin/Int|" style="filled" fillcolor=gray]; + 23 [label="Exit block" style="filled" fillcolor=gray]; + } + 24 [label="Exit init block" style="filled" fillcolor=gray]; + } + subgraph cluster_8 { + color=blue + 25 [label="Enter function " style="filled" fillcolor=gray]; + 26 [label="Delegated constructor call: super()" style="filled" fillcolor=gray]; + 27 [label="Exit function " style="filled" fillcolor=gray]; + } + 28 [label="Exit class Bar" style="filled" fillcolor=gray]; + } + 13 -> {14} [color=green]; + 13 -> {28} [style=dotted]; + 13 -> {14 25} [style=dashed]; 14 -> {15}; 15 -> {16}; 16 -> {17}; - 17 -> {18} [style=dotted]; - 18 -> {19} [style=dotted]; + 17 -> {18}; + 18 -> {19}; 19 -> {20} [style=dotted]; 20 -> {21} [style=dotted]; 21 -> {22} [style=dotted]; @@ -84,5 +89,7 @@ digraph initBlock_kt { 23 -> {24} [style=dotted]; 24 -> {25} [style=dotted]; 25 -> {26} [style=dotted]; + 26 -> {27} [style=dotted]; + 27 -> {28} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/initBlockAndInPlaceLambda.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/initBlockAndInPlaceLambda.dot index 1af5c06bcdc..97a1172a3ed 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/initBlockAndInPlaceLambda.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/initBlockAndInPlaceLambda.dot @@ -5,73 +5,78 @@ digraph initBlockAndInPlaceLambda_kt { subgraph cluster_0 { color=red - 0 [label="Enter class B" style="filled" fillcolor=red]; - 1 [label="Exit class B" style="filled" fillcolor=red]; + 0 [label="Enter file initBlockAndInPlaceLambda.kt" style="filled" fillcolor=red]; + 1 [label="Exit file initBlockAndInPlaceLambda.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; subgraph cluster_1 { color=red - 2 [label="Enter class A" style="filled" fillcolor=red]; - 3 [label="Exit class A" style="filled" fillcolor=red]; + 2 [label="Enter class B" style="filled" fillcolor=red]; + 3 [label="Exit class B" style="filled" fillcolor=red]; } 2 -> {3} [color=green]; subgraph cluster_2 { color=red - 4 [label="Enter class C" style="filled" fillcolor=red]; - subgraph cluster_3 { - color=blue - 5 [label="Enter init block" style="filled" fillcolor=red]; - subgraph cluster_4 { - color=blue - 6 [label="Enter block"]; - 7 [label="Access variable R|/a|"]; - 8 [label="Access variable R|/A.b|"]; - 9 [label="Enter safe call"]; - 10 [label="Postponed enter to lambda"]; - subgraph cluster_5 { - color=blue - 11 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_6 { - color=blue - 12 [label="Enter block"]; - 13 [label="Access variable R|/a|"]; - 14 [label="Access variable R|/it|"]; - 15 [label="Function call: R|/C.C|(...)" style="filled" fillcolor=yellow]; - 16 [label="Exit block"]; - } - 17 [label="Exit function " style="filled" fillcolor=red]; - } - 18 [label="Postponed exit from lambda"]; - 19 [label="Function call: $subj$.R|kotlin/let|(...)" style="filled" fillcolor=yellow]; - 20 [label="Exit safe call"]; - 21 [label="Variable declaration: lval c: R|C?|"]; - 22 [label="Exit block"]; - } - 23 [label="Exit init block" style="filled" fillcolor=red]; - } - subgraph cluster_7 { - color=blue - 24 [label="Enter function " style="filled" fillcolor=red]; - 25 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 26 [label="Exit function " style="filled" fillcolor=red]; - } - 27 [label="Exit class C" style="filled" fillcolor=red]; + 4 [label="Enter class A" style="filled" fillcolor=red]; + 5 [label="Exit class A" style="filled" fillcolor=red]; } 4 -> {5} [color=green]; - 4 -> {27} [style=dotted]; - 4 -> {5 24} [style=dashed]; - 5 -> {6}; - 6 -> {7}; + + subgraph cluster_3 { + color=red + 6 [label="Enter class C" style="filled" fillcolor=red]; + subgraph cluster_4 { + color=blue + 7 [label="Enter init block" style="filled" fillcolor=red]; + subgraph cluster_5 { + color=blue + 8 [label="Enter block"]; + 9 [label="Access variable R|/a|"]; + 10 [label="Access variable R|/A.b|"]; + 11 [label="Enter safe call"]; + 12 [label="Postponed enter to lambda"]; + subgraph cluster_6 { + color=blue + 13 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_7 { + color=blue + 14 [label="Enter block"]; + 15 [label="Access variable R|/a|"]; + 16 [label="Access variable R|/it|"]; + 17 [label="Function call: R|/C.C|(...)" style="filled" fillcolor=yellow]; + 18 [label="Exit block"]; + } + 19 [label="Exit function " style="filled" fillcolor=red]; + } + 20 [label="Postponed exit from lambda"]; + 21 [label="Function call: $subj$.R|kotlin/let|(...)" style="filled" fillcolor=yellow]; + 22 [label="Exit safe call"]; + 23 [label="Variable declaration: lval c: R|C?|"]; + 24 [label="Exit block"]; + } + 25 [label="Exit init block" style="filled" fillcolor=red]; + } + subgraph cluster_8 { + color=blue + 26 [label="Enter function " style="filled" fillcolor=red]; + 27 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 28 [label="Exit function " style="filled" fillcolor=red]; + } + 29 [label="Exit class C" style="filled" fillcolor=red]; + } + 6 -> {7} [color=green]; + 6 -> {29} [style=dotted]; + 6 -> {7 26} [style=dashed]; 7 -> {8}; - 8 -> {9 20}; + 8 -> {9}; 9 -> {10}; - 10 -> {11 19}; - 10 -> {18} [style=dotted]; - 10 -> {11} [style=dashed]; + 10 -> {11 22}; 11 -> {12}; - 12 -> {13}; + 12 -> {13 21}; + 12 -> {20} [style=dotted]; + 12 -> {13} [style=dashed]; 13 -> {14}; 14 -> {15}; 15 -> {16}; @@ -82,9 +87,11 @@ digraph initBlockAndInPlaceLambda_kt { 20 -> {21}; 21 -> {22}; 22 -> {23}; - 23 -> {24} [color=green]; + 23 -> {24}; 24 -> {25}; - 25 -> {26}; - 26 -> {27} [color=green]; + 25 -> {26} [color=green]; + 26 -> {27}; + 27 -> {28}; + 28 -> {29} [color=green]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/innerClassInAnonymousObject.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/innerClassInAnonymousObject.dot index 9a4582e6c35..648cdc07542 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/innerClassInAnonymousObject.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/innerClassInAnonymousObject.dot @@ -5,69 +5,78 @@ digraph innerClassInAnonymousObject_kt { subgraph cluster_0 { color=red - 0 [label="Enter property" style="filled" fillcolor=red]; - 1 [label="Enter anonymous object"]; + 0 [label="Enter file innerClassInAnonymousObject.kt" style="filled" fillcolor=red]; subgraph cluster_1 { color=blue - 2 [label="Enter class " style="filled" fillcolor=red]; + 1 [label="Enter property" style="filled" fillcolor=red]; + 2 [label="Enter anonymous object"]; subgraph cluster_2 { color=blue - 3 [label="Enter function " style="filled" fillcolor=red]; - 4 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 5 [label="Exit function " style="filled" fillcolor=red]; + 3 [label="Enter class " style="filled" fillcolor=red]; + subgraph cluster_3 { + color=blue + 4 [label="Enter function " style="filled" fillcolor=red]; + 5 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 6 [label="Exit function " style="filled" fillcolor=red]; + } + 7 [label="Exit class " style="filled" fillcolor=red]; } - 6 [label="Exit class " style="filled" fillcolor=red]; + 8 [label="Exit anonymous object expression"]; + 9 [label="Exit property" style="filled" fillcolor=red]; } - 7 [label="Exit anonymous object expression"]; - 8 [label="Exit property" style="filled" fillcolor=red]; + 10 [label="Exit file innerClassInAnonymousObject.kt" style="filled" fillcolor=red]; } - subgraph cluster_3 { + subgraph cluster_4 { color=blue - 9 [label="Enter class Nested" style="filled" fillcolor=red]; - subgraph cluster_4 { + 11 [label="Enter class Nested" style="filled" fillcolor=red]; + subgraph cluster_5 { color=blue - 10 [label="Enter function " style="filled" fillcolor=red]; - 11 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 12 [label="Exit function " style="filled" fillcolor=red]; + 12 [label="Enter function " style="filled" fillcolor=red]; + 13 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 14 [label="Exit function " style="filled" fillcolor=red]; } - 13 [label="Exit class Nested" style="filled" fillcolor=red]; + 15 [label="Exit class Nested" style="filled" fillcolor=red]; } - subgraph cluster_5 { + subgraph cluster_6 { color=blue - 14 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_6 { + 16 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_7 { color=blue - 15 [label="Enter block"]; - 16 [label="Exit block"]; + 17 [label="Enter block"]; + 18 [label="Exit block"]; } - 17 [label="Exit function foo" style="filled" fillcolor=red]; + 19 [label="Exit function foo" style="filled" fillcolor=red]; } - 0 -> {1}; + 0 -> {1} [color=green]; + 0 -> {10} [style=dotted]; + 0 -> {1} [style=dashed]; 1 -> {2}; - 1 -> {7} [style=dotted]; - 1 -> {2} [style=dashed]; 2 -> {3}; - 2 -> {9} [color=red]; - 2 -> {6} [style=dotted]; + 2 -> {8} [style=dotted]; 2 -> {3} [style=dashed]; 3 -> {4}; + 3 -> {11} [color=red]; + 3 -> {7} [style=dotted]; + 3 -> {4} [style=dashed]; 4 -> {5}; 5 -> {6}; 6 -> {7}; - 6 -> {9} [color=green]; - 6 -> {9} [style=dashed]; 7 -> {8}; - 9 -> {10}; - 9 -> {14} [color=red]; - 9 -> {13} [style=dotted]; - 9 -> {10} [style=dashed]; - 10 -> {11}; + 7 -> {11} [color=green]; + 7 -> {11} [style=dashed]; + 8 -> {9}; + 9 -> {10} [color=green]; 11 -> {12}; - 12 -> {13} [color=green]; - 13 -> {14} [color=green]; - 13 -> {14} [style=dashed]; - 14 -> {15}; - 15 -> {16}; + 11 -> {16} [color=red]; + 11 -> {15} [style=dotted]; + 11 -> {12} [style=dashed]; + 12 -> {13}; + 13 -> {14}; + 14 -> {15} [color=green]; + 15 -> {16} [color=green]; + 15 -> {16} [style=dashed]; 16 -> {17}; + 17 -> {18}; + 18 -> {19}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/inplaceLambdaInControlFlowExpressions.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/inplaceLambdaInControlFlowExpressions.dot index 44b0a25ba0e..b0bda7a1440 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/inplaceLambdaInControlFlowExpressions.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/inplaceLambdaInControlFlowExpressions.dot @@ -5,188 +5,193 @@ digraph inplaceLambdaInControlFlowExpressions_kt { subgraph cluster_0 { color=red - 0 [label="Enter function materialize" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter block"]; - 2 [label="Const: Null(null)"]; - 3 [label="Check not null: Null(null)!!" style="filled" fillcolor=yellow]; - 4 [label="Stub" style="filled" fillcolor=gray]; - 5 [label="Jump: ^materialize Null(null)!!" style="filled" fillcolor=gray]; - 6 [label="Stub" style="filled" fillcolor=gray]; - 7 [label="Exit block" style="filled" fillcolor=gray]; - } - 8 [label="Exit function materialize" style="filled" fillcolor=gray]; + 0 [label="Enter file inplaceLambdaInControlFlowExpressions.kt" style="filled" fillcolor=red]; + 1 [label="Exit file inplaceLambdaInControlFlowExpressions.kt" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; - 2 -> {3}; - 3 -> {4} [style=dotted]; - 4 -> {5} [style=dotted]; - 5 -> {6 8} [style=dotted]; - 6 -> {7} [style=dotted]; - 7 -> {8} [style=dotted]; + 0 -> {1} [color=green]; - subgraph cluster_2 { + subgraph cluster_1 { color=red - 9 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_3 { + 2 [label="Enter function materialize" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 10 [label="Enter block"]; - subgraph cluster_4 { + 3 [label="Enter block"]; + 4 [label="Const: Null(null)"]; + 5 [label="Check not null: Null(null)!!" style="filled" fillcolor=yellow]; + 6 [label="Stub" style="filled" fillcolor=gray]; + 7 [label="Jump: ^materialize Null(null)!!" style="filled" fillcolor=gray]; + 8 [label="Stub" style="filled" fillcolor=gray]; + 9 [label="Exit block" style="filled" fillcolor=gray]; + } + 10 [label="Exit function materialize" style="filled" fillcolor=gray]; + } + 2 -> {3}; + 3 -> {4}; + 4 -> {5}; + 5 -> {6} [style=dotted]; + 6 -> {7} [style=dotted]; + 7 -> {8 10} [style=dotted]; + 8 -> {9} [style=dotted]; + 9 -> {10} [style=dotted]; + + subgraph cluster_3 { + color=red + 11 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_4 { + color=blue + 12 [label="Enter block"]; + subgraph cluster_5 { color=blue - 11 [label="Enter when"]; - subgraph cluster_5 { - color=blue - 12 [label="Enter when branch condition "]; - 13 [label="Const: Boolean(true)"]; - 14 [label="Exit when branch condition"]; - } + 13 [label="Enter when"]; subgraph cluster_6 { color=blue - 15 [label="Enter when branch condition else"]; + 14 [label="Enter when branch condition "]; + 15 [label="Const: Boolean(true)"]; 16 [label="Exit when branch condition"]; } - 17 [label="Enter when branch result"]; subgraph cluster_7 { color=blue - 18 [label="Enter block"]; - 19 [label="Const: String()"]; - 20 [label="Exit block"]; + 17 [label="Enter when branch condition else"]; + 18 [label="Exit when branch condition"]; } - 21 [label="Exit when branch result"]; - 22 [label="Enter when branch result"]; + 19 [label="Enter when branch result"]; subgraph cluster_8 { color=blue - 23 [label="Enter block"]; - 24 [label="Postponed enter to lambda"]; - subgraph cluster_9 { - color=blue - 25 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_10 { - color=blue - 26 [label="Enter block"]; - 27 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; - 28 [label="Exit block"]; - } - 29 [label="Exit function " style="filled" fillcolor=red]; - } - 30 [label="Postponed exit from lambda"]; - 31 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 32 [label="Exit block"]; + 20 [label="Enter block"]; + 21 [label="Const: String()"]; + 22 [label="Exit block"]; } - 33 [label="Exit when branch result"]; - 34 [label="Exit when"]; + 23 [label="Exit when branch result"]; + 24 [label="Enter when branch result"]; + subgraph cluster_9 { + color=blue + 25 [label="Enter block"]; + 26 [label="Postponed enter to lambda"]; + subgraph cluster_10 { + color=blue + 27 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_11 { + color=blue + 28 [label="Enter block"]; + 29 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; + 30 [label="Exit block"]; + } + 31 [label="Exit function " style="filled" fillcolor=red]; + } + 32 [label="Postponed exit from lambda"]; + 33 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 34 [label="Exit block"]; + } + 35 [label="Exit when branch result"]; + 36 [label="Exit when"]; } - 35 [label="Variable declaration: lval x: R|kotlin/String|"]; - 36 [label="Exit block"]; + 37 [label="Variable declaration: lval x: R|kotlin/String|"]; + 38 [label="Exit block"]; } - 37 [label="Exit function test_1" style="filled" fillcolor=red]; + 39 [label="Exit function test_1" style="filled" fillcolor=red]; } - 9 -> {10}; - 10 -> {11}; 11 -> {12}; 12 -> {13}; 13 -> {14}; - 14 -> {15 22}; + 14 -> {15}; 15 -> {16}; - 16 -> {17}; + 16 -> {17 24}; 17 -> {18}; 18 -> {19}; 19 -> {20}; 20 -> {21}; - 21 -> {34}; + 21 -> {22}; 22 -> {23}; - 23 -> {24}; - 24 -> {25 31}; - 24 -> {30} [style=dotted]; - 24 -> {25} [style=dashed]; + 23 -> {36}; + 24 -> {25}; 25 -> {26}; - 26 -> {27}; + 26 -> {27 33}; + 26 -> {32} [style=dotted]; + 26 -> {27} [style=dashed]; 27 -> {28}; 28 -> {29}; 29 -> {30}; - 30 -> {31} [color=green]; - 30 -> {34} [color=red]; + 30 -> {31}; 31 -> {32}; - 32 -> {33}; + 32 -> {33} [color=green]; + 32 -> {36} [color=red]; 33 -> {34}; 34 -> {35}; 35 -> {36}; 36 -> {37}; - - subgraph cluster_11 { - color=red - 38 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_12 { - color=blue - 39 [label="Enter block"]; - subgraph cluster_13 { - color=blue - 40 [label="Try expression enter"]; - subgraph cluster_14 { - color=blue - 41 [label="Try main block enter"]; - subgraph cluster_15 { - color=blue - 42 [label="Enter block"]; - 43 [label="Postponed enter to lambda"]; - subgraph cluster_16 { - color=blue - 44 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_17 { - color=blue - 45 [label="Enter block"]; - 46 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; - 47 [label="Exit block"]; - } - 48 [label="Exit function " style="filled" fillcolor=red]; - } - 49 [label="Postponed exit from lambda"]; - 50 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 51 [label="Exit block"]; - } - 52 [label="Try main block exit"]; - } - subgraph cluster_18 { - color=blue - 53 [label="Catch enter"]; - 54 [label="Variable declaration: e: R|kotlin/Exception|"]; - subgraph cluster_19 { - color=blue - 55 [label="Enter block"]; - 56 [label="Const: String()"]; - 57 [label="Exit block"]; - } - 58 [label="Catch exit"]; - } - 59 [label="Try expression exit"]; - } - 60 [label="Variable declaration: lval x: R|kotlin/String|"]; - 61 [label="Exit block"]; - } - 62 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 37 -> {38}; 38 -> {39}; - 39 -> {40}; - 40 -> {41 53}; + + subgraph cluster_12 { + color=red + 40 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_13 { + color=blue + 41 [label="Enter block"]; + subgraph cluster_14 { + color=blue + 42 [label="Try expression enter"]; + subgraph cluster_15 { + color=blue + 43 [label="Try main block enter"]; + subgraph cluster_16 { + color=blue + 44 [label="Enter block"]; + 45 [label="Postponed enter to lambda"]; + subgraph cluster_17 { + color=blue + 46 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_18 { + color=blue + 47 [label="Enter block"]; + 48 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; + 49 [label="Exit block"]; + } + 50 [label="Exit function " style="filled" fillcolor=red]; + } + 51 [label="Postponed exit from lambda"]; + 52 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 53 [label="Exit block"]; + } + 54 [label="Try main block exit"]; + } + subgraph cluster_19 { + color=blue + 55 [label="Catch enter"]; + 56 [label="Variable declaration: e: R|kotlin/Exception|"]; + subgraph cluster_20 { + color=blue + 57 [label="Enter block"]; + 58 [label="Const: String()"]; + 59 [label="Exit block"]; + } + 60 [label="Catch exit"]; + } + 61 [label="Try expression exit"]; + } + 62 [label="Variable declaration: lval x: R|kotlin/String|"]; + 63 [label="Exit block"]; + } + 64 [label="Exit function test_2" style="filled" fillcolor=red]; + } + 40 -> {41}; 41 -> {42}; - 42 -> {43}; - 43 -> {44 50}; - 43 -> {49} [style=dotted]; - 43 -> {44} [style=dashed]; + 42 -> {43 55}; + 43 -> {44}; 44 -> {45}; - 45 -> {46}; - 46 -> {47 53}; + 45 -> {46 52}; + 45 -> {51} [style=dotted]; + 45 -> {46} [style=dashed]; + 46 -> {47}; 47 -> {48}; - 48 -> {49}; - 49 -> {50} [color=green]; - 49 -> {59} [color=red]; - 50 -> {51 53}; - 51 -> {52}; - 52 -> {53 59}; + 48 -> {49 55}; + 49 -> {50}; + 50 -> {51}; + 51 -> {52} [color=green]; + 51 -> {61} [color=red]; + 52 -> {53 55}; 53 -> {54}; - 54 -> {55}; + 54 -> {55 61}; 55 -> {56}; 56 -> {57}; 57 -> {58}; @@ -194,48 +199,50 @@ digraph inplaceLambdaInControlFlowExpressions_kt { 59 -> {60}; 60 -> {61}; 61 -> {62}; - - subgraph cluster_20 { - color=red - 63 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_21 { - color=blue - 64 [label="Enter block"]; - 65 [label="Postponed enter to lambda"]; - subgraph cluster_22 { - color=blue - 66 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_23 { - color=blue - 67 [label="Enter block"]; - 68 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; - 69 [label="Exit block"]; - } - 70 [label="Exit function " style="filled" fillcolor=red]; - } - 71 [label="Postponed exit from lambda"]; - 72 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 73 [label="Check not null: R|kotlin/run|(...)!!" style="filled" fillcolor=yellow]; - 74 [label="Variable declaration: lval x: R|kotlin/String|"]; - 75 [label="Exit block"]; - } - 76 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 62 -> {63}; 63 -> {64}; - 64 -> {65}; - 65 -> {66 72}; - 65 -> {71} [style=dotted]; - 65 -> {66} [style=dashed]; + + subgraph cluster_21 { + color=red + 65 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_22 { + color=blue + 66 [label="Enter block"]; + 67 [label="Postponed enter to lambda"]; + subgraph cluster_23 { + color=blue + 68 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_24 { + color=blue + 69 [label="Enter block"]; + 70 [label="Function call: R|/materialize|()" style="filled" fillcolor=yellow]; + 71 [label="Exit block"]; + } + 72 [label="Exit function " style="filled" fillcolor=red]; + } + 73 [label="Postponed exit from lambda"]; + 74 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 75 [label="Check not null: R|kotlin/run|(...)!!" style="filled" fillcolor=yellow]; + 76 [label="Variable declaration: lval x: R|kotlin/String|"]; + 77 [label="Exit block"]; + } + 78 [label="Exit function test_3" style="filled" fillcolor=red]; + } + 65 -> {66}; 66 -> {67}; - 67 -> {68}; + 67 -> {68 74}; + 67 -> {73} [style=dotted]; + 67 -> {68} [style=dashed]; 68 -> {69}; 69 -> {70}; 70 -> {71}; - 71 -> {72} [color=green]; - 71 -> {73} [color=red]; + 71 -> {72}; 72 -> {73}; - 73 -> {74}; + 73 -> {74} [color=green]; + 73 -> {75} [color=red]; 74 -> {75}; 75 -> {76}; + 76 -> {77}; + 77 -> {78}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/jumps.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/jumps.dot index b96a9686290..d442ca45883 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/jumps.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/jumps.dot @@ -5,156 +5,161 @@ digraph jumps_kt { subgraph cluster_0 { color=red - 0 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_1 { + 0 [label="Enter file jumps.kt" style="filled" fillcolor=red]; + 1 [label="Exit file jumps.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 1 [label="Enter block"]; - subgraph cluster_2 { + 3 [label="Enter block"]; + subgraph cluster_3 { color=blue - 2 [label="Enter when"]; - subgraph cluster_3 { - color=blue - 3 [label="Enter when branch condition "]; - 4 [label="Access variable R|/x|"]; - 5 [label="Const: Null(null)"]; - 6 [label="Equality operator =="]; - 7 [label="Exit when branch condition"]; - } + 4 [label="Enter when"]; subgraph cluster_4 { color=blue - 8 [label="Enter when branch condition else"]; + 5 [label="Enter when branch condition "]; + 6 [label="Access variable R|/x|"]; + 7 [label="Const: Null(null)"]; + 8 [label="Equality operator =="]; 9 [label="Exit when branch condition"]; } - 10 [label="Enter when branch result"]; subgraph cluster_5 { color=blue - 11 [label="Enter block"]; - 12 [label="Access variable R|/x|"]; - 13 [label="Smart cast: R|/x|"]; - 14 [label="Exit block"]; + 10 [label="Enter when branch condition else"]; + 11 [label="Exit when branch condition"]; } - 15 [label="Exit when branch result"]; - 16 [label="Enter when branch result"]; + 12 [label="Enter when branch result"]; subgraph cluster_6 { color=blue - 17 [label="Enter block"]; - 18 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; - 19 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 20 [label="Stub" style="filled" fillcolor=gray]; - 21 [label="Exit block" style="filled" fillcolor=gray]; + 13 [label="Enter block"]; + 14 [label="Access variable R|/x|"]; + 15 [label="Smart cast: R|/x|"]; + 16 [label="Exit block"]; } - 22 [label="Exit when branch result" style="filled" fillcolor=gray]; - 23 [label="Exit when"]; + 17 [label="Exit when branch result"]; + 18 [label="Enter when branch result"]; + subgraph cluster_7 { + color=blue + 19 [label="Enter block"]; + 20 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; + 21 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 22 [label="Stub" style="filled" fillcolor=gray]; + 23 [label="Exit block" style="filled" fillcolor=gray]; + } + 24 [label="Exit when branch result" style="filled" fillcolor=gray]; + 25 [label="Exit when"]; } - 24 [label="Variable declaration: lval y: R|kotlin/Int|"]; - 25 [label="Access variable R|/y|"]; - 26 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 27 [label="Access variable R|/x|"]; - 28 [label="Smart cast: R|/x|"]; - 29 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 30 [label="Exit block"]; + 26 [label="Variable declaration: lval y: R|kotlin/Int|"]; + 27 [label="Access variable R|/y|"]; + 28 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 29 [label="Access variable R|/x|"]; + 30 [label="Smart cast: R|/x|"]; + 31 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 32 [label="Exit block"]; } - 31 [label="Exit function test_1" style="filled" fillcolor=red]; + 33 [label="Exit function test_1" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; 3 -> {4}; 4 -> {5}; 5 -> {6}; 6 -> {7}; - 7 -> {8 16}; + 7 -> {8}; 8 -> {9}; - 9 -> {10}; + 9 -> {10 18}; 10 -> {11}; 11 -> {12}; 12 -> {13}; 13 -> {14}; 14 -> {15}; - 15 -> {23}; + 15 -> {16}; 16 -> {17}; - 17 -> {18}; + 17 -> {25}; 18 -> {19}; - 19 -> {20} [style=dotted]; - 20 -> {21} [style=dotted]; + 19 -> {20}; + 20 -> {21}; 21 -> {22} [style=dotted]; 22 -> {23} [style=dotted]; - 23 -> {24}; - 24 -> {25}; + 23 -> {24} [style=dotted]; + 24 -> {25} [style=dotted]; 25 -> {26}; 26 -> {27}; 27 -> {28}; 28 -> {29}; 29 -> {30}; 30 -> {31}; + 31 -> {32}; + 32 -> {33}; - subgraph cluster_7 { + subgraph cluster_8 { color=red - 32 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_8 { + 34 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_9 { color=blue - 33 [label="Enter block"]; - subgraph cluster_9 { + 35 [label="Enter block"]; + subgraph cluster_10 { color=blue - 34 [label="Enter when"]; - subgraph cluster_10 { - color=blue - 35 [label="Enter when branch condition "]; - 36 [label="Access variable R|/x|"]; - 37 [label="Const: Null(null)"]; - 38 [label="Equality operator =="]; - 39 [label="Exit when branch condition"]; - } + 36 [label="Enter when"]; subgraph cluster_11 { color=blue - 40 [label="Enter when branch condition else"]; + 37 [label="Enter when branch condition "]; + 38 [label="Access variable R|/x|"]; + 39 [label="Const: Null(null)"]; + 40 [label="Equality operator =="]; 41 [label="Exit when branch condition"]; } - 42 [label="Enter when branch result"]; subgraph cluster_12 { color=blue - 43 [label="Enter block"]; - 44 [label="Access variable R|/x|"]; - 45 [label="Smart cast: R|/x|"]; - 46 [label="Exit block"]; + 42 [label="Enter when branch condition else"]; + 43 [label="Exit when branch condition"]; } - 47 [label="Exit when branch result"]; - 48 [label="Enter when branch result"]; + 44 [label="Enter when branch result"]; subgraph cluster_13 { color=blue - 49 [label="Enter block"]; - 50 [label="Access variable R|/x|"]; - 51 [label="Smart cast: R|/x|"]; - 52 [label="Exit block"]; + 45 [label="Enter block"]; + 46 [label="Access variable R|/x|"]; + 47 [label="Smart cast: R|/x|"]; + 48 [label="Exit block"]; } - 53 [label="Exit when branch result"]; - 54 [label="Exit when"]; + 49 [label="Exit when branch result"]; + 50 [label="Enter when branch result"]; + subgraph cluster_14 { + color=blue + 51 [label="Enter block"]; + 52 [label="Access variable R|/x|"]; + 53 [label="Smart cast: R|/x|"]; + 54 [label="Exit block"]; + } + 55 [label="Exit when branch result"]; + 56 [label="Exit when"]; } - 55 [label="Variable declaration: lval y: R|kotlin/Int?|"]; - 56 [label="Access variable R|/y|"]; - 57 [label="Function call: R|/y|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; - 58 [label="Exit block"]; + 57 [label="Variable declaration: lval y: R|kotlin/Int?|"]; + 58 [label="Access variable R|/y|"]; + 59 [label="Function call: R|/y|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; + 60 [label="Exit block"]; } - 59 [label="Exit function test_2" style="filled" fillcolor=red]; + 61 [label="Exit function test_2" style="filled" fillcolor=red]; } - 32 -> {33}; - 33 -> {34}; 34 -> {35}; 35 -> {36}; 36 -> {37}; 37 -> {38}; 38 -> {39}; - 39 -> {40 48}; + 39 -> {40}; 40 -> {41}; - 41 -> {42}; + 41 -> {42 50}; 42 -> {43}; 43 -> {44}; 44 -> {45}; 45 -> {46}; 46 -> {47}; - 47 -> {54}; + 47 -> {48}; 48 -> {49}; - 49 -> {50}; + 49 -> {56}; 50 -> {51}; 51 -> {52}; 52 -> {53}; @@ -164,260 +169,262 @@ digraph jumps_kt { 56 -> {57}; 57 -> {58}; 58 -> {59}; + 59 -> {60}; + 60 -> {61}; - subgraph cluster_14 { + subgraph cluster_15 { color=red - 60 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_15 { + 62 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_16 { color=blue - 61 [label="Enter block"]; - subgraph cluster_16 { + 63 [label="Enter block"]; + subgraph cluster_17 { color=blue - 62 [label="Enter while loop"]; - subgraph cluster_17 { - color=blue - 63 [label="Enter loop condition"]; - 64 [label="Const: Boolean(true)"]; - 65 [label="Exit loop condition"]; - } + 64 [label="Enter while loop"]; subgraph cluster_18 { color=blue - 66 [label="Enter loop block"]; - subgraph cluster_19 { - color=blue - 67 [label="Enter block"]; - 68 [label="Access variable R|/x|"]; - 69 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 70 [label="Jump: break@@@[Boolean(true)] "]; - 71 [label="Stub" style="filled" fillcolor=gray]; - 72 [label="Exit block" style="filled" fillcolor=gray]; - } - 73 [label="Exit loop block" style="filled" fillcolor=gray]; + 65 [label="Enter loop condition"]; + 66 [label="Const: Boolean(true)"]; + 67 [label="Exit loop condition"]; } - 74 [label="Exit while loop"]; + subgraph cluster_19 { + color=blue + 68 [label="Enter loop block"]; + subgraph cluster_20 { + color=blue + 69 [label="Enter block"]; + 70 [label="Access variable R|/x|"]; + 71 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 72 [label="Jump: break@@@[Boolean(true)] "]; + 73 [label="Stub" style="filled" fillcolor=gray]; + 74 [label="Exit block" style="filled" fillcolor=gray]; + } + 75 [label="Exit loop block" style="filled" fillcolor=gray]; + } + 76 [label="Exit while loop"]; } - 75 [label="Access variable R|/x|"]; - 76 [label="Smart cast: R|/x|"]; - 77 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 78 [label="Exit block"]; + 77 [label="Access variable R|/x|"]; + 78 [label="Smart cast: R|/x|"]; + 79 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 80 [label="Exit block"]; } - 79 [label="Exit function test_3" style="filled" fillcolor=red]; + 81 [label="Exit function test_3" style="filled" fillcolor=red]; } - 60 -> {61}; - 61 -> {62}; 62 -> {63}; 63 -> {64}; 64 -> {65}; 65 -> {66}; - 65 -> {74} [style=dotted]; 66 -> {67}; 67 -> {68}; + 67 -> {76} [style=dotted]; 68 -> {69}; 69 -> {70}; - 70 -> {74}; - 70 -> {71} [style=dotted]; - 71 -> {72} [style=dotted]; + 70 -> {71}; + 71 -> {72}; + 72 -> {76}; 72 -> {73} [style=dotted]; - 73 -> {63} [color=green style=dotted]; - 74 -> {75}; - 75 -> {76}; + 73 -> {74} [style=dotted]; + 74 -> {75} [style=dotted]; + 75 -> {65} [color=green style=dotted]; 76 -> {77}; 77 -> {78}; 78 -> {79}; - - subgraph cluster_20 { - color=red - 80 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_21 { - color=blue - 81 [label="Enter block"]; - subgraph cluster_22 { - color=blue - 82 [label="Enter do-while loop"]; - subgraph cluster_23 { - color=blue - 83 [label="Enter loop block"]; - subgraph cluster_24 { - color=blue - 84 [label="Enter block"]; - 85 [label="Access variable R|/x|"]; - 86 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - 87 [label="Jump: break@@@[Boolean(true)] "]; - 88 [label="Stub" style="filled" fillcolor=gray]; - 89 [label="Exit block" style="filled" fillcolor=gray]; - } - 90 [label="Exit loop block" style="filled" fillcolor=gray]; - } - subgraph cluster_25 { - color=blue - 91 [label="Enter loop condition" style="filled" fillcolor=gray]; - 92 [label="Const: Boolean(true)" style="filled" fillcolor=gray]; - 93 [label="Exit loop condition" style="filled" fillcolor=gray]; - } - 94 [label="Exit do-while loop"]; - } - 95 [label="Access variable R|/x|"]; - 96 [label="Smart cast: R|/x|"]; - 97 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 98 [label="Exit block"]; - } - 99 [label="Exit function test_4" style="filled" fillcolor=red]; - } + 79 -> {80}; 80 -> {81}; - 81 -> {82}; + + subgraph cluster_21 { + color=red + 82 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_22 { + color=blue + 83 [label="Enter block"]; + subgraph cluster_23 { + color=blue + 84 [label="Enter do-while loop"]; + subgraph cluster_24 { + color=blue + 85 [label="Enter loop block"]; + subgraph cluster_25 { + color=blue + 86 [label="Enter block"]; + 87 [label="Access variable R|/x|"]; + 88 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 89 [label="Jump: break@@@[Boolean(true)] "]; + 90 [label="Stub" style="filled" fillcolor=gray]; + 91 [label="Exit block" style="filled" fillcolor=gray]; + } + 92 [label="Exit loop block" style="filled" fillcolor=gray]; + } + subgraph cluster_26 { + color=blue + 93 [label="Enter loop condition" style="filled" fillcolor=gray]; + 94 [label="Const: Boolean(true)" style="filled" fillcolor=gray]; + 95 [label="Exit loop condition" style="filled" fillcolor=gray]; + } + 96 [label="Exit do-while loop"]; + } + 97 [label="Access variable R|/x|"]; + 98 [label="Smart cast: R|/x|"]; + 99 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 100 [label="Exit block"]; + } + 101 [label="Exit function test_4" style="filled" fillcolor=red]; + } 82 -> {83}; 83 -> {84}; 84 -> {85}; 85 -> {86}; 86 -> {87}; - 87 -> {94}; - 87 -> {88} [style=dotted]; - 88 -> {89} [style=dotted]; + 87 -> {88}; + 88 -> {89}; + 89 -> {96}; 89 -> {90} [style=dotted]; 90 -> {91} [style=dotted]; 91 -> {92} [style=dotted]; 92 -> {93} [style=dotted]; - 93 -> {83} [color=green style=dotted]; 93 -> {94} [style=dotted]; - 94 -> {95}; - 95 -> {96}; + 94 -> {95} [style=dotted]; + 95 -> {85} [color=green style=dotted]; + 95 -> {96} [style=dotted]; 96 -> {97}; 97 -> {98}; 98 -> {99}; + 99 -> {100}; + 100 -> {101}; - subgraph cluster_26 { + subgraph cluster_27 { color=red - 100 [label="Enter function test_5" style="filled" fillcolor=red]; - subgraph cluster_27 { + 102 [label="Enter function test_5" style="filled" fillcolor=red]; + subgraph cluster_28 { color=blue - 101 [label="Enter block"]; - subgraph cluster_28 { + 103 [label="Enter block"]; + subgraph cluster_29 { color=blue - 102 [label="Enter while loop"]; - subgraph cluster_29 { - color=blue - 103 [label="Enter loop condition"]; - 104 [label="Access variable R|/b|"]; - 105 [label="Exit loop condition"]; - } + 104 [label="Enter while loop"]; subgraph cluster_30 { color=blue - 106 [label="Enter loop block"]; - subgraph cluster_31 { + 105 [label="Enter loop condition"]; + 106 [label="Access variable R|/b|"]; + 107 [label="Exit loop condition"]; + } + subgraph cluster_31 { + color=blue + 108 [label="Enter loop block"]; + subgraph cluster_32 { color=blue - 107 [label="Enter block"]; - subgraph cluster_32 { + 109 [label="Enter block"]; + subgraph cluster_33 { color=blue - 108 [label="Enter when"]; - subgraph cluster_33 { - color=blue - 109 [label="Enter when branch condition "]; - 110 [label="Access variable R|/b|"]; - 111 [label="Exit when branch condition"]; - } - 112 [label="Synthetic else branch"]; - 113 [label="Enter when branch result"]; + 110 [label="Enter when"]; subgraph cluster_34 { color=blue - 114 [label="Enter block"]; - 115 [label="Jump: continue@@@[R|/b|] "]; - 116 [label="Stub" style="filled" fillcolor=gray]; - 117 [label="Exit block" style="filled" fillcolor=gray]; + 111 [label="Enter when branch condition "]; + 112 [label="Access variable R|/b|"]; + 113 [label="Exit when branch condition"]; } - 118 [label="Exit when branch result" style="filled" fillcolor=gray]; - 119 [label="Exit when"]; + 114 [label="Synthetic else branch"]; + 115 [label="Enter when branch result"]; + subgraph cluster_35 { + color=blue + 116 [label="Enter block"]; + 117 [label="Jump: continue@@@[R|/b|] "]; + 118 [label="Stub" style="filled" fillcolor=gray]; + 119 [label="Exit block" style="filled" fillcolor=gray]; + } + 120 [label="Exit when branch result" style="filled" fillcolor=gray]; + 121 [label="Exit when"]; } - 120 [label="Exit block"]; + 122 [label="Exit block"]; } - 121 [label="Exit loop block"]; + 123 [label="Exit loop block"]; } - 122 [label="Exit while loop"]; + 124 [label="Exit while loop"]; } - 123 [label="Exit block"]; + 125 [label="Exit block"]; } - 124 [label="Exit function test_5" style="filled" fillcolor=red]; + 126 [label="Exit function test_5" style="filled" fillcolor=red]; } - 100 -> {101}; - 101 -> {102}; 102 -> {103}; 103 -> {104}; 104 -> {105}; - 105 -> {106 122}; + 105 -> {106}; 106 -> {107}; - 107 -> {108}; + 107 -> {108 124}; 108 -> {109}; 109 -> {110}; 110 -> {111}; - 111 -> {112 113}; - 112 -> {119}; - 113 -> {114}; - 114 -> {115}; - 115 -> {103} [color=green style=dashed]; - 115 -> {116} [style=dotted]; - 116 -> {117} [style=dotted]; + 111 -> {112}; + 112 -> {113}; + 113 -> {114 115}; + 114 -> {121}; + 115 -> {116}; + 116 -> {117}; + 117 -> {105} [color=green style=dashed]; 117 -> {118} [style=dotted]; 118 -> {119} [style=dotted]; - 119 -> {120}; - 120 -> {121}; - 121 -> {103} [color=green style=dashed]; + 119 -> {120} [style=dotted]; + 120 -> {121} [style=dotted]; + 121 -> {122}; 122 -> {123}; - 123 -> {124}; - - subgraph cluster_35 { - color=red - 125 [label="Enter function run" style="filled" fillcolor=red]; - subgraph cluster_36 { - color=blue - 126 [label="Enter block"]; - 127 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 128 [label="Exit block"]; - } - 129 [label="Exit function run" style="filled" fillcolor=red]; - } + 123 -> {105} [color=green style=dashed]; + 124 -> {125}; 125 -> {126}; - 126 -> {127}; + + subgraph cluster_36 { + color=red + 127 [label="Enter function run" style="filled" fillcolor=red]; + subgraph cluster_37 { + color=blue + 128 [label="Enter block"]; + 129 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 130 [label="Exit block"]; + } + 131 [label="Exit function run" style="filled" fillcolor=red]; + } 127 -> {128}; 128 -> {129}; - - subgraph cluster_37 { - color=red - 130 [label="Enter function test_6" style="filled" fillcolor=red]; - subgraph cluster_38 { - color=blue - 131 [label="Enter block"]; - 132 [label="Postponed enter to lambda"]; - subgraph cluster_39 { - color=blue - 133 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_40 { - color=blue - 134 [label="Enter block"]; - 135 [label="Jump: ^@run Unit"]; - 136 [label="Stub" style="filled" fillcolor=gray]; - 137 [label="Exit block" style="filled" fillcolor=gray]; - } - 138 [label="Exit function " style="filled" fillcolor=red]; - } - 139 [label="Postponed exit from lambda"]; - 140 [label="Function call: R|/run|(...)" style="filled" fillcolor=yellow]; - 141 [label="Exit block"]; - } - 142 [label="Exit function test_6" style="filled" fillcolor=red]; - } + 129 -> {130}; 130 -> {131}; - 131 -> {132}; - 132 -> {133 139 140}; - 132 -> {133} [style=dashed]; + + subgraph cluster_38 { + color=red + 132 [label="Enter function test_6" style="filled" fillcolor=red]; + subgraph cluster_39 { + color=blue + 133 [label="Enter block"]; + 134 [label="Postponed enter to lambda"]; + subgraph cluster_40 { + color=blue + 135 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_41 { + color=blue + 136 [label="Enter block"]; + 137 [label="Jump: ^@run Unit"]; + 138 [label="Stub" style="filled" fillcolor=gray]; + 139 [label="Exit block" style="filled" fillcolor=gray]; + } + 140 [label="Exit function " style="filled" fillcolor=red]; + } + 141 [label="Postponed exit from lambda"]; + 142 [label="Function call: R|/run|(...)" style="filled" fillcolor=yellow]; + 143 [label="Exit block"]; + } + 144 [label="Exit function test_6" style="filled" fillcolor=red]; + } + 132 -> {133}; 133 -> {134}; - 134 -> {135}; - 135 -> {138}; - 135 -> {136} [style=dotted]; - 136 -> {137} [style=dotted]; + 134 -> {135 141 142}; + 134 -> {135} [style=dashed]; + 135 -> {136}; + 136 -> {137}; + 137 -> {140}; 137 -> {138} [style=dotted]; - 138 -> {139}; - 139 -> {140}; - 139 -> {132} [color=green style=dashed]; + 138 -> {139} [style=dotted]; + 139 -> {140} [style=dotted]; 140 -> {141}; 141 -> {142}; + 141 -> {134} [color=green style=dashed]; + 142 -> {143}; + 143 -> {144}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaAsReturnOfLambda.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaAsReturnOfLambda.dot index d66c7b8c040..07f8069d6e5 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaAsReturnOfLambda.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaAsReturnOfLambda.dot @@ -5,92 +5,101 @@ digraph lambdaAsReturnOfLambda_kt { subgraph cluster_0 { color=red - 0 [label="Enter property" style="filled" fillcolor=red]; - 1 [label="Postponed enter to lambda"]; + 0 [label="Enter file lambdaAsReturnOfLambda.kt" style="filled" fillcolor=red]; subgraph cluster_1 { color=blue - 2 [label="Enter function " style="filled" fillcolor=red]; + 1 [label="Enter property" style="filled" fillcolor=red]; + 2 [label="Postponed enter to lambda"]; subgraph cluster_2 { color=blue - 3 [label="Enter block"]; - 4 [label="Exit anonymous function expression"]; + 3 [label="Enter function " style="filled" fillcolor=red]; subgraph cluster_3 { color=blue - 5 [label="Enter function " style="filled" fillcolor=red]; + 4 [label="Enter block"]; + 5 [label="Exit anonymous function expression"]; subgraph cluster_4 { color=blue - 6 [label="Enter block"]; - 7 [label="Access variable R|/foo|"]; - 8 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; - 9 [label="Exit block"]; + 6 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_5 { + color=blue + 7 [label="Enter block"]; + 8 [label="Access variable R|/foo|"]; + 9 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; + 10 [label="Exit block"]; + } + 11 [label="Exit function " style="filled" fillcolor=red]; } - 10 [label="Exit function " style="filled" fillcolor=red]; - } - 11 [label="Jump: ^@run lambda@fun (foo: R|kotlin/String|): R|kotlin/Unit| { + 12 [label="Jump: ^@run lambda@fun (foo: R|kotlin/String|): R|kotlin/Unit| { R|/bar|(R|/foo|) } "]; - 12 [label="Stub" style="filled" fillcolor=gray]; - 13 [label="Exit block" style="filled" fillcolor=gray]; + 13 [label="Stub" style="filled" fillcolor=gray]; + 14 [label="Exit block" style="filled" fillcolor=gray]; + } + 15 [label="Exit function " style="filled" fillcolor=red]; } - 14 [label="Exit function " style="filled" fillcolor=red]; + 16 [label="Postponed exit from lambda"]; + 17 [label="Function call: R|/run| kotlin/Unit|>(...)" style="filled" fillcolor=yellow]; + 18 [label="Exit property" style="filled" fillcolor=red]; } - 15 [label="Postponed exit from lambda"]; - 16 [label="Function call: R|/run| kotlin/Unit|>(...)" style="filled" fillcolor=yellow]; - 17 [label="Exit property" style="filled" fillcolor=red]; + 19 [label="Exit file lambdaAsReturnOfLambda.kt" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2 15 16}; - 1 -> {2} [style=dashed]; - 2 -> {3}; + 0 -> {1} [color=green]; + 0 -> {19} [style=dotted]; + 0 -> {1} [style=dashed]; + 1 -> {2}; + 2 -> {3 16 17}; + 2 -> {3} [style=dashed]; 3 -> {4}; - 4 -> {5 11}; - 4 -> {5} [style=dashed]; - 5 -> {6}; + 4 -> {5}; + 5 -> {6 12}; + 5 -> {6} [style=dashed]; 6 -> {7}; 7 -> {8}; 8 -> {9}; 9 -> {10}; - 11 -> {14}; - 11 -> {12} [style=dotted]; + 10 -> {11}; + 12 -> {15}; 12 -> {13} [style=dotted]; 13 -> {14} [style=dotted]; - 15 -> {16}; + 14 -> {15} [style=dotted]; 16 -> {17}; + 17 -> {18}; + 18 -> {19} [color=green]; - subgraph cluster_5 { + subgraph cluster_6 { color=red - 18 [label="Enter function bar" style="filled" fillcolor=red]; - subgraph cluster_6 { + 20 [label="Enter function bar" style="filled" fillcolor=red]; + subgraph cluster_7 { color=blue - 19 [label="Enter block"]; - 20 [label="Exit block"]; + 21 [label="Enter block"]; + 22 [label="Exit block"]; } - 21 [label="Exit function bar" style="filled" fillcolor=red]; + 23 [label="Exit function bar" style="filled" fillcolor=red]; } - 18 -> {19}; - 19 -> {20}; 20 -> {21}; - - subgraph cluster_7 { - color=red - 22 [label="Enter function run" style="filled" fillcolor=red]; - subgraph cluster_8 { - color=blue - 23 [label="Enter block"]; - 24 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 25 [label="Jump: ^run R|/block|.R|SubstitutionOverride|()"]; - 26 [label="Stub" style="filled" fillcolor=gray]; - 27 [label="Exit block" style="filled" fillcolor=gray]; - } - 28 [label="Exit function run" style="filled" fillcolor=red]; - } + 21 -> {22}; 22 -> {23}; - 23 -> {24}; + + subgraph cluster_8 { + color=red + 24 [label="Enter function run" style="filled" fillcolor=red]; + subgraph cluster_9 { + color=blue + 25 [label="Enter block"]; + 26 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 27 [label="Jump: ^run R|/block|.R|SubstitutionOverride|()"]; + 28 [label="Stub" style="filled" fillcolor=gray]; + 29 [label="Exit block" style="filled" fillcolor=gray]; + } + 30 [label="Exit function run" style="filled" fillcolor=red]; + } 24 -> {25}; - 25 -> {28}; - 25 -> {26} [style=dotted]; - 26 -> {27} [style=dotted]; + 25 -> {26}; + 26 -> {27}; + 27 -> {30}; 27 -> {28} [style=dotted]; + 28 -> {29} [style=dotted]; + 29 -> {30} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaReturningObject.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaReturningObject.dot index 7ffd207553a..0402dc71aa0 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaReturningObject.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/lambdaReturningObject.dot @@ -5,109 +5,116 @@ digraph lambdaReturningObject_kt { subgraph cluster_0 { color=red - 0 [label="Enter class Out" style="filled" fillcolor=red]; - 1 [label="Exit class Out" style="filled" fillcolor=red]; + 0 [label="Enter file lambdaReturningObject.kt" style="filled" fillcolor=red]; + 1 [label="Exit file lambdaReturningObject.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; subgraph cluster_1 { color=red - 2 [label="Enter function bar" style="filled" fillcolor=red]; - subgraph cluster_2 { - color=blue - 3 [label="Enter block"]; - 4 [label="Exit block"]; - } - 5 [label="Exit function bar" style="filled" fillcolor=red]; + 2 [label="Enter class Out" style="filled" fillcolor=red]; + 3 [label="Exit class Out" style="filled" fillcolor=red]; } - 2 -> {3}; - 3 -> {4}; - 4 -> {5}; + 2 -> {3} [color=green]; - subgraph cluster_3 { + subgraph cluster_2 { color=red - 6 [label="Enter class IrTypeArgument" style="filled" fillcolor=red]; - 7 [label="Exit class IrTypeArgument" style="filled" fillcolor=red]; + 4 [label="Enter function bar" style="filled" fillcolor=red]; + subgraph cluster_3 { + color=blue + 5 [label="Enter block"]; + 6 [label="Exit block"]; + } + 7 [label="Exit function bar" style="filled" fillcolor=red]; } - 6 -> {7} [color=green]; + 4 -> {5}; + 5 -> {6}; + 6 -> {7}; subgraph cluster_4 { color=red - 8 [label="Enter class IrStarProjectionImpl" style="filled" fillcolor=red]; - subgraph cluster_5 { - color=blue - 9 [label="Enter function " style="filled" fillcolor=red]; - 10 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 11 [label="Exit function " style="filled" fillcolor=red]; - } - 12 [label="Exit class IrStarProjectionImpl" style="filled" fillcolor=red]; + 8 [label="Enter class IrTypeArgument" style="filled" fillcolor=red]; + 9 [label="Exit class IrTypeArgument" style="filled" fillcolor=red]; } 8 -> {9} [color=green]; - 8 -> {12} [style=dotted]; - 8 -> {9} [style=dashed]; - 9 -> {10}; - 10 -> {11}; - 11 -> {12} [color=green]; - subgraph cluster_6 { + subgraph cluster_5 { color=red - 13 [label="Enter function MyOut" style="filled" fillcolor=red]; - subgraph cluster_7 { + 10 [label="Enter class IrStarProjectionImpl" style="filled" fillcolor=red]; + subgraph cluster_6 { color=blue - 14 [label="Enter block"]; - 15 [label="Function call: R|kotlin/TODO|()" style="filled" fillcolor=yellow]; - 16 [label="Stub" style="filled" fillcolor=gray]; - 17 [label="Jump: ^MyOut R|kotlin/TODO|()" style="filled" fillcolor=gray]; + 11 [label="Enter function " style="filled" fillcolor=red]; + 12 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 13 [label="Exit function " style="filled" fillcolor=red]; + } + 14 [label="Exit class IrStarProjectionImpl" style="filled" fillcolor=red]; + } + 10 -> {11} [color=green]; + 10 -> {14} [style=dotted]; + 10 -> {11} [style=dashed]; + 11 -> {12}; + 12 -> {13}; + 13 -> {14} [color=green]; + + subgraph cluster_7 { + color=red + 15 [label="Enter function MyOut" style="filled" fillcolor=red]; + subgraph cluster_8 { + color=blue + 16 [label="Enter block"]; + 17 [label="Function call: R|kotlin/TODO|()" style="filled" fillcolor=yellow]; 18 [label="Stub" style="filled" fillcolor=gray]; - 19 [label="Exit block" style="filled" fillcolor=gray]; + 19 [label="Jump: ^MyOut R|kotlin/TODO|()" style="filled" fillcolor=gray]; + 20 [label="Stub" style="filled" fillcolor=gray]; + 21 [label="Exit block" style="filled" fillcolor=gray]; } - 20 [label="Exit function MyOut" style="filled" fillcolor=gray]; + 22 [label="Exit function MyOut" style="filled" fillcolor=gray]; } - 13 -> {14}; - 14 -> {15}; - 15 -> {16} [style=dotted]; - 16 -> {17} [style=dotted]; - 17 -> {18 20} [style=dotted]; + 15 -> {16}; + 16 -> {17}; + 17 -> {18} [style=dotted]; 18 -> {19} [style=dotted]; - 19 -> {20} [style=dotted]; + 19 -> {20 22} [style=dotted]; + 20 -> {21} [style=dotted]; + 21 -> {22} [style=dotted]; - subgraph cluster_8 { + subgraph cluster_9 { color=red - 21 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_9 { + 23 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_10 { color=blue - 22 [label="Enter block"]; - 23 [label="Postponed enter to lambda"]; - subgraph cluster_10 { + 24 [label="Enter block"]; + 25 [label="Postponed enter to lambda"]; + subgraph cluster_11 { color=blue - 24 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_11 { + 26 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_12 { color=blue - 25 [label="Enter block"]; - 26 [label="Access qualifier /IrStarProjectionImpl"]; - 27 [label="Exit block"]; + 27 [label="Enter block"]; + 28 [label="Access qualifier /IrStarProjectionImpl"]; + 29 [label="Exit block"]; } - 28 [label="Exit function " style="filled" fillcolor=red]; + 30 [label="Exit function " style="filled" fillcolor=red]; } - 29 [label="Postponed exit from lambda"]; - 30 [label="Function call: R|/MyOut|(...)" style="filled" fillcolor=yellow]; - 31 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; - 32 [label="Exit block"]; + 31 [label="Postponed exit from lambda"]; + 32 [label="Function call: R|/MyOut|(...)" style="filled" fillcolor=yellow]; + 33 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; + 34 [label="Exit block"]; } - 33 [label="Exit function foo" style="filled" fillcolor=red]; + 35 [label="Exit function foo" style="filled" fillcolor=red]; } - 21 -> {22}; - 22 -> {23}; - 23 -> {24 29 30}; - 23 -> {24} [style=dashed]; + 23 -> {24}; 24 -> {25}; - 25 -> {26}; + 25 -> {26 31 32}; + 25 -> {26} [style=dashed]; 26 -> {27}; 27 -> {28}; - 29 -> {30} [color=green]; - 29 -> {31} [color=red]; - 30 -> {31}; - 31 -> {32}; + 28 -> {29}; + 29 -> {30}; + 31 -> {32} [color=green]; + 31 -> {33} [color=red]; 32 -> {33}; + 33 -> {34}; + 34 -> {35}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/lambdas.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/lambdas.dot index 42e48f96b44..1217302d612 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/lambdas.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/lambdas.dot @@ -5,285 +5,292 @@ digraph lambdas_kt { subgraph cluster_0 { color=red - 0 [label="Enter function run" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter block"]; - 2 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 3 [label="Exit block"]; - } - 4 [label="Exit function run" style="filled" fillcolor=red]; + 0 [label="Enter file lambdas.kt" style="filled" fillcolor=red]; + 1 [label="Exit file lambdas.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function run" style="filled" fillcolor=red]; + subgraph cluster_2 { + color=blue + 3 [label="Enter block"]; + 4 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 5 [label="Exit block"]; + } + 6 [label="Exit function run" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; 3 -> {4}; + 4 -> {5}; + 5 -> {6}; - subgraph cluster_2 { + subgraph cluster_3 { color=red - 5 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_3 { + 7 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_4 { color=blue - 6 [label="Enter block"]; - subgraph cluster_4 { + 8 [label="Enter block"]; + subgraph cluster_5 { color=blue - 7 [label="Enter when"]; - subgraph cluster_5 { - color=blue - 8 [label="Enter when branch condition "]; - 9 [label="Access variable R|/x|"]; - 10 [label="Type operator: (R|/x| is R|kotlin/Int|)"]; - 11 [label="Exit when branch condition"]; - } - 12 [label="Synthetic else branch"]; - 13 [label="Enter when branch result"]; + 9 [label="Enter when"]; subgraph cluster_6 { color=blue - 14 [label="Enter block"]; - 15 [label="Postponed enter to lambda"]; - subgraph cluster_7 { - color=blue - 16 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_8 { - color=blue - 17 [label="Enter block"]; - 18 [label="Access variable R|/x|"]; - 19 [label="Smart cast: R|/x|"]; - 20 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 21 [label="Exit block"]; - } - 22 [label="Exit function " style="filled" fillcolor=red]; - } - 23 [label="Postponed exit from lambda"]; - 24 [label="Function call: R|/run|(...)" style="filled" fillcolor=yellow]; - 25 [label="Exit block"]; + 10 [label="Enter when branch condition "]; + 11 [label="Access variable R|/x|"]; + 12 [label="Type operator: (R|/x| is R|kotlin/Int|)"]; + 13 [label="Exit when branch condition"]; } - 26 [label="Exit when branch result"]; - 27 [label="Exit when"]; + 14 [label="Synthetic else branch"]; + 15 [label="Enter when branch result"]; + subgraph cluster_7 { + color=blue + 16 [label="Enter block"]; + 17 [label="Postponed enter to lambda"]; + subgraph cluster_8 { + color=blue + 18 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_9 { + color=blue + 19 [label="Enter block"]; + 20 [label="Access variable R|/x|"]; + 21 [label="Smart cast: R|/x|"]; + 22 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 23 [label="Exit block"]; + } + 24 [label="Exit function " style="filled" fillcolor=red]; + } + 25 [label="Postponed exit from lambda"]; + 26 [label="Function call: R|/run|(...)" style="filled" fillcolor=yellow]; + 27 [label="Exit block"]; + } + 28 [label="Exit when branch result"]; + 29 [label="Exit when"]; } - 28 [label="Exit block"]; + 30 [label="Exit block"]; } - 29 [label="Exit function test_1" style="filled" fillcolor=red]; + 31 [label="Exit function test_1" style="filled" fillcolor=red]; } - 5 -> {6}; - 6 -> {7}; 7 -> {8}; 8 -> {9}; 9 -> {10}; 10 -> {11}; - 11 -> {12 13}; - 12 -> {27}; - 13 -> {14}; - 14 -> {15}; - 15 -> {16 23 24}; - 15 -> {16} [style=dashed]; + 11 -> {12}; + 12 -> {13}; + 13 -> {14 15}; + 14 -> {29}; + 15 -> {16}; 16 -> {17}; - 17 -> {18}; + 17 -> {18 25 26}; + 17 -> {18} [style=dashed]; 18 -> {19}; 19 -> {20}; 20 -> {21}; 21 -> {22}; 22 -> {23}; 23 -> {24}; - 23 -> {15} [color=green style=dashed]; 24 -> {25}; 25 -> {26}; + 25 -> {17} [color=green style=dashed]; 26 -> {27}; 27 -> {28}; 28 -> {29}; + 29 -> {30}; + 30 -> {31}; - subgraph cluster_9 { + subgraph cluster_10 { color=red - 30 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_10 { + 32 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_11 { color=blue - 31 [label="Enter block"]; - subgraph cluster_11 { + 33 [label="Enter block"]; + subgraph cluster_12 { color=blue - 32 [label="Enter when"]; - subgraph cluster_12 { - color=blue - 33 [label="Enter when branch condition "]; - 34 [label="Access variable R|/x|"]; - 35 [label="Type operator: (R|/x| is R|kotlin/Int|)"]; - 36 [label="Exit when branch condition"]; - } - 37 [label="Synthetic else branch"]; - 38 [label="Enter when branch result"]; + 34 [label="Enter when"]; subgraph cluster_13 { color=blue - 39 [label="Enter block"]; - 40 [label="Exit anonymous function expression"]; - 41 [label="Variable declaration: lval lambda: R|() -> kotlin/Int|"]; - 42 [label="Exit block"]; + 35 [label="Enter when branch condition "]; + 36 [label="Access variable R|/x|"]; + 37 [label="Type operator: (R|/x| is R|kotlin/Int|)"]; + 38 [label="Exit when branch condition"]; } - 43 [label="Exit when branch result"]; - 44 [label="Exit when"]; + 39 [label="Synthetic else branch"]; + 40 [label="Enter when branch result"]; + subgraph cluster_14 { + color=blue + 41 [label="Enter block"]; + 42 [label="Exit anonymous function expression"]; + 43 [label="Variable declaration: lval lambda: R|() -> kotlin/Int|"]; + 44 [label="Exit block"]; + } + 45 [label="Exit when branch result"]; + 46 [label="Exit when"]; } - 45 [label="Exit block"]; + 47 [label="Exit block"]; } - 46 [label="Exit function test_2" style="filled" fillcolor=red]; + 48 [label="Exit function test_2" style="filled" fillcolor=red]; } - subgraph cluster_14 { + subgraph cluster_15 { color=blue - 47 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_15 { + 49 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_16 { color=blue - 48 [label="Enter block"]; - 49 [label="Access variable R|/x|"]; - 50 [label="Smart cast: R|/x|"]; - 51 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 52 [label="Exit block"]; + 50 [label="Enter block"]; + 51 [label="Access variable R|/x|"]; + 52 [label="Smart cast: R|/x|"]; + 53 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 54 [label="Exit block"]; } - 53 [label="Exit function " style="filled" fillcolor=red]; + 55 [label="Exit function " style="filled" fillcolor=red]; } - 30 -> {31}; - 31 -> {32}; 32 -> {33}; 33 -> {34}; 34 -> {35}; 35 -> {36}; - 36 -> {37 38}; - 37 -> {44}; - 38 -> {39}; - 39 -> {40}; - 40 -> {41 47}; - 40 -> {47} [style=dashed]; + 36 -> {37}; + 37 -> {38}; + 38 -> {39 40}; + 39 -> {46}; + 40 -> {41}; 41 -> {42}; - 42 -> {43}; + 42 -> {43 49}; + 42 -> {49} [style=dashed]; 43 -> {44}; 44 -> {45}; 45 -> {46}; + 46 -> {47}; 47 -> {48}; - 48 -> {49}; 49 -> {50}; 50 -> {51}; 51 -> {52}; 52 -> {53}; - - subgraph cluster_16 { - color=red - 54 [label="Enter function getInt" style="filled" fillcolor=red]; - subgraph cluster_17 { - color=blue - 55 [label="Enter block"]; - 56 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 57 [label="Const: Int(1)"]; - 58 [label="Jump: ^getInt Int(1)"]; - 59 [label="Stub" style="filled" fillcolor=gray]; - 60 [label="Exit block" style="filled" fillcolor=gray]; - } - 61 [label="Exit function getInt" style="filled" fillcolor=red]; - } + 53 -> {54}; 54 -> {55}; - 55 -> {56}; + + subgraph cluster_17 { + color=red + 56 [label="Enter function getInt" style="filled" fillcolor=red]; + subgraph cluster_18 { + color=blue + 57 [label="Enter block"]; + 58 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 59 [label="Const: Int(1)"]; + 60 [label="Jump: ^getInt Int(1)"]; + 61 [label="Stub" style="filled" fillcolor=gray]; + 62 [label="Exit block" style="filled" fillcolor=gray]; + } + 63 [label="Exit function getInt" style="filled" fillcolor=red]; + } 56 -> {57}; 57 -> {58}; - 58 -> {61}; - 58 -> {59} [style=dotted]; - 59 -> {60} [style=dotted]; + 58 -> {59}; + 59 -> {60}; + 60 -> {63}; 60 -> {61} [style=dotted]; + 61 -> {62} [style=dotted]; + 62 -> {63} [style=dotted]; - subgraph cluster_18 { + subgraph cluster_19 { color=red - 62 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_19 { + 64 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_20 { color=blue - 63 [label="Enter block"]; - 64 [label="Postponed enter to lambda"]; - subgraph cluster_20 { + 65 [label="Enter block"]; + 66 [label="Postponed enter to lambda"]; + subgraph cluster_21 { color=blue - 65 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_21 { + 67 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_22 { color=blue - 66 [label="Enter block"]; - 67 [label="Const: Int(1)"]; - 68 [label="Jump: ^test_3 Int(1)"]; - 69 [label="Stub" style="filled" fillcolor=gray]; - 70 [label="Exit block" style="filled" fillcolor=gray]; + 68 [label="Enter block"]; + 69 [label="Const: Int(1)"]; + 70 [label="Jump: ^test_3 Int(1)"]; + 71 [label="Stub" style="filled" fillcolor=gray]; + 72 [label="Exit block" style="filled" fillcolor=gray]; } - 71 [label="Exit function " style="filled" fillcolor=gray]; + 73 [label="Exit function " style="filled" fillcolor=gray]; } - 72 [label="Postponed exit from lambda"]; - 73 [label="Function call: R|/getInt|(...)" style="filled" fillcolor=yellow]; - 74 [label="Jump: ^test_3 R|/getInt|( = getInt@fun (): R|kotlin/Unit| { + 74 [label="Postponed exit from lambda"]; + 75 [label="Function call: R|/getInt|(...)" style="filled" fillcolor=yellow]; + 76 [label="Jump: ^test_3 R|/getInt|( = getInt@fun (): R|kotlin/Unit| { ^test_3 Int(1) } )"]; - 75 [label="Stub" style="filled" fillcolor=gray]; - 76 [label="Exit block" style="filled" fillcolor=gray]; + 77 [label="Stub" style="filled" fillcolor=gray]; + 78 [label="Exit block" style="filled" fillcolor=gray]; } - 77 [label="Exit function test_3" style="filled" fillcolor=red]; + 79 [label="Exit function test_3" style="filled" fillcolor=red]; } - 62 -> {63}; - 63 -> {64}; - 64 -> {65 72 73}; - 64 -> {65} [style=dashed]; + 64 -> {65}; 65 -> {66}; - 66 -> {67}; + 66 -> {67 74 75}; + 66 -> {67} [style=dashed]; 67 -> {68}; - 68 -> {77}; - 68 -> {69} [style=dotted]; - 69 -> {70} [style=dotted]; + 68 -> {69}; + 69 -> {70}; + 70 -> {79}; 70 -> {71} [style=dotted]; 71 -> {72} [style=dotted]; - 72 -> {73}; - 72 -> {64} [color=green style=dashed]; - 73 -> {74}; - 74 -> {77}; - 74 -> {75} [style=dotted]; - 75 -> {76} [style=dotted]; + 72 -> {73} [style=dotted]; + 73 -> {74} [style=dotted]; + 74 -> {75}; + 74 -> {66} [color=green style=dashed]; + 75 -> {76}; + 76 -> {79}; 76 -> {77} [style=dotted]; + 77 -> {78} [style=dotted]; + 78 -> {79} [style=dotted]; - subgraph cluster_22 { + subgraph cluster_23 { color=red - 78 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_23 { + 80 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_24 { color=blue - 79 [label="Enter block"]; - 80 [label="Postponed enter to lambda"]; - subgraph cluster_24 { + 81 [label="Enter block"]; + 82 [label="Postponed enter to lambda"]; + subgraph cluster_25 { color=blue - 81 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_25 { + 83 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_26 { color=blue - 82 [label="Enter block"]; - 83 [label="Const: Int(1)"]; - 84 [label="Jump: ^test_4 Int(1)"]; - 85 [label="Stub" style="filled" fillcolor=gray]; - 86 [label="Exit block" style="filled" fillcolor=gray]; + 84 [label="Enter block"]; + 85 [label="Const: Int(1)"]; + 86 [label="Jump: ^test_4 Int(1)"]; + 87 [label="Stub" style="filled" fillcolor=gray]; + 88 [label="Exit block" style="filled" fillcolor=gray]; } - 87 [label="Exit function " style="filled" fillcolor=gray]; + 89 [label="Exit function " style="filled" fillcolor=gray]; } - 88 [label="Postponed exit from lambda"]; - 89 [label="Function call: R|/getInt|(...)" style="filled" fillcolor=yellow]; - 90 [label="Jump: ^test_4 R|/getInt|(block = getInt@fun (): R|kotlin/Unit| { + 90 [label="Postponed exit from lambda"]; + 91 [label="Function call: R|/getInt|(...)" style="filled" fillcolor=yellow]; + 92 [label="Jump: ^test_4 R|/getInt|(block = getInt@fun (): R|kotlin/Unit| { ^test_4 Int(1) } )"]; - 91 [label="Stub" style="filled" fillcolor=gray]; - 92 [label="Exit block" style="filled" fillcolor=gray]; + 93 [label="Stub" style="filled" fillcolor=gray]; + 94 [label="Exit block" style="filled" fillcolor=gray]; } - 93 [label="Exit function test_4" style="filled" fillcolor=red]; + 95 [label="Exit function test_4" style="filled" fillcolor=red]; } - 78 -> {79}; - 79 -> {80}; - 80 -> {81 88 89}; - 80 -> {81} [style=dashed]; + 80 -> {81}; 81 -> {82}; - 82 -> {83}; + 82 -> {83 90 91}; + 82 -> {83} [style=dashed]; 83 -> {84}; - 84 -> {93}; - 84 -> {85} [style=dotted]; - 85 -> {86} [style=dotted]; + 84 -> {85}; + 85 -> {86}; + 86 -> {95}; 86 -> {87} [style=dotted]; 87 -> {88} [style=dotted]; - 88 -> {89}; - 88 -> {80} [color=green style=dashed]; - 89 -> {90}; - 90 -> {93}; - 90 -> {91} [style=dotted]; - 91 -> {92} [style=dotted]; + 88 -> {89} [style=dotted]; + 89 -> {90} [style=dotted]; + 90 -> {91}; + 90 -> {82} [color=green style=dashed]; + 91 -> {92}; + 92 -> {95}; 92 -> {93} [style=dotted]; + 93 -> {94} [style=dotted]; + 94 -> {95} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/localClassesWithImplicit.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/localClassesWithImplicit.dot index 97a0ba4c10c..12b09900119 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/localClassesWithImplicit.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/localClassesWithImplicit.dot @@ -5,180 +5,187 @@ digraph localClassesWithImplicit_kt { subgraph cluster_0 { color=red - 0 [label="Enter function myRun" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter block"]; - 2 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 3 [label="Jump: ^myRun R|/block|.R|SubstitutionOverride|()"]; - 4 [label="Stub" style="filled" fillcolor=gray]; - 5 [label="Exit block" style="filled" fillcolor=gray]; - } - 6 [label="Exit function myRun" style="filled" fillcolor=red]; + 0 [label="Enter file localClassesWithImplicit.kt" style="filled" fillcolor=red]; + 1 [label="Exit file localClassesWithImplicit.kt" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; - 2 -> {3}; - 3 -> {6}; - 3 -> {4} [style=dotted]; - 4 -> {5} [style=dotted]; - 5 -> {6} [style=dotted]; + 0 -> {1} [color=green]; - subgraph cluster_2 { + subgraph cluster_1 { color=red - 7 [label="Enter function test" style="filled" fillcolor=red]; - subgraph cluster_3 { + 2 [label="Enter function myRun" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 8 [label="Enter block"]; - subgraph cluster_4 { + 3 [label="Enter block"]; + 4 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 5 [label="Jump: ^myRun R|/block|.R|SubstitutionOverride|()"]; + 6 [label="Stub" style="filled" fillcolor=gray]; + 7 [label="Exit block" style="filled" fillcolor=gray]; + } + 8 [label="Exit function myRun" style="filled" fillcolor=red]; + } + 2 -> {3}; + 3 -> {4}; + 4 -> {5}; + 5 -> {8}; + 5 -> {6} [style=dotted]; + 6 -> {7} [style=dotted]; + 7 -> {8} [style=dotted]; + + subgraph cluster_3 { + color=red + 9 [label="Enter function test" style="filled" fillcolor=red]; + subgraph cluster_4 { + color=blue + 10 [label="Enter block"]; + subgraph cluster_5 { color=blue - 9 [label="Enter when"]; - subgraph cluster_5 { - color=blue - 10 [label="Enter when branch condition "]; - 11 [label="Access variable R|/a|"]; - 12 [label="Type operator: (R|/a| !is R|kotlin/String|)"]; - 13 [label="Exit when branch condition"]; - } - 14 [label="Synthetic else branch"]; - 15 [label="Enter when branch result"]; + 11 [label="Enter when"]; subgraph cluster_6 { color=blue - 16 [label="Enter block"]; - 17 [label="Jump: ^test Unit"]; - 18 [label="Stub" style="filled" fillcolor=gray]; - 19 [label="Exit block" style="filled" fillcolor=gray]; + 12 [label="Enter when branch condition "]; + 13 [label="Access variable R|/a|"]; + 14 [label="Type operator: (R|/a| !is R|kotlin/String|)"]; + 15 [label="Exit when branch condition"]; } - 20 [label="Exit when branch result" style="filled" fillcolor=gray]; - 21 [label="Exit when"]; - } - 22 [label="Local class declaration"]; - 23 [label="Enter anonymous object"]; - subgraph cluster_7 { - color=blue - 24 [label="Enter class " style="filled" fillcolor=red]; - subgraph cluster_8 { + 16 [label="Synthetic else branch"]; + 17 [label="Enter when branch result"]; + subgraph cluster_7 { color=blue - 25 [label="Enter function " style="filled" fillcolor=red]; - 26 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 27 [label="Exit function " style="filled" fillcolor=red]; + 18 [label="Enter block"]; + 19 [label="Jump: ^test Unit"]; + 20 [label="Stub" style="filled" fillcolor=gray]; + 21 [label="Exit block" style="filled" fillcolor=gray]; } - 28 [label="Exit class " style="filled" fillcolor=red]; + 22 [label="Exit when branch result" style="filled" fillcolor=gray]; + 23 [label="Exit when"]; } - 29 [label="Exit anonymous object expression"]; - 30 [label="Variable declaration: lval x: R||"]; - 31 [label="Exit block"]; - } - 32 [label="Exit function test" style="filled" fillcolor=red]; - } - subgraph cluster_9 { - color=blue - 33 [label="Enter function baz" style="filled" fillcolor=red]; - subgraph cluster_10 { - color=blue - 34 [label="Enter block"]; - 35 [label="Const: Int(1)"]; - 36 [label="Jump: ^baz Int(1)"]; - 37 [label="Stub" style="filled" fillcolor=gray]; - 38 [label="Exit block" style="filled" fillcolor=gray]; - } - 39 [label="Exit function baz" style="filled" fillcolor=red]; - } - subgraph cluster_11 { - color=blue - 40 [label="Enter function bar" style="filled" fillcolor=red]; - subgraph cluster_12 { - color=blue - 41 [label="Enter block"]; - 42 [label="Postponed enter to lambda"]; - subgraph cluster_13 { + 24 [label="Local class declaration"]; + 25 [label="Enter anonymous object"]; + subgraph cluster_8 { color=blue - 43 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_14 { + 26 [label="Enter class " style="filled" fillcolor=red]; + subgraph cluster_9 { color=blue - 44 [label="Enter block"]; - 45 [label="Access variable R|/a|"]; - 46 [label="Smart cast: R|/a|"]; - 47 [label="Access variable R|kotlin/String.length|"]; - 48 [label="Access variable R|/b|"]; - 49 [label="Access variable #"]; - 50 [label="Function call: this@R|/|.R|/.baz|()" style="filled" fillcolor=yellow]; - 51 [label="Exit block"]; + 27 [label="Enter function " style="filled" fillcolor=red]; + 28 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 29 [label="Exit function " style="filled" fillcolor=red]; } - 52 [label="Exit function " style="filled" fillcolor=red]; + 30 [label="Exit class " style="filled" fillcolor=red]; } - 53 [label="Postponed exit from lambda"]; - 54 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 55 [label="Jump: ^bar R|/myRun|( = myRun@fun (): R|kotlin/Int| { + 31 [label="Exit anonymous object expression"]; + 32 [label="Variable declaration: lval x: R||"]; + 33 [label="Exit block"]; + } + 34 [label="Exit function test" style="filled" fillcolor=red]; + } + subgraph cluster_10 { + color=blue + 35 [label="Enter function baz" style="filled" fillcolor=red]; + subgraph cluster_11 { + color=blue + 36 [label="Enter block"]; + 37 [label="Const: Int(1)"]; + 38 [label="Jump: ^baz Int(1)"]; + 39 [label="Stub" style="filled" fillcolor=gray]; + 40 [label="Exit block" style="filled" fillcolor=gray]; + } + 41 [label="Exit function baz" style="filled" fillcolor=red]; + } + subgraph cluster_12 { + color=blue + 42 [label="Enter function bar" style="filled" fillcolor=red]; + subgraph cluster_13 { + color=blue + 43 [label="Enter block"]; + 44 [label="Postponed enter to lambda"]; + subgraph cluster_14 { + color=blue + 45 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_15 { + color=blue + 46 [label="Enter block"]; + 47 [label="Access variable R|/a|"]; + 48 [label="Smart cast: R|/a|"]; + 49 [label="Access variable R|kotlin/String.length|"]; + 50 [label="Access variable R|/b|"]; + 51 [label="Access variable #"]; + 52 [label="Function call: this@R|/|.R|/.baz|()" style="filled" fillcolor=yellow]; + 53 [label="Exit block"]; + } + 54 [label="Exit function " style="filled" fillcolor=red]; + } + 55 [label="Postponed exit from lambda"]; + 56 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + 57 [label="Jump: ^bar R|/myRun|( = myRun@fun (): R|kotlin/Int| { R|/a|.R|kotlin/String.length| R|/b|.# ^ this@R|/|.R|/.baz|() } )"]; - 56 [label="Stub" style="filled" fillcolor=gray]; - 57 [label="Exit block" style="filled" fillcolor=gray]; + 58 [label="Stub" style="filled" fillcolor=gray]; + 59 [label="Exit block" style="filled" fillcolor=gray]; } - 58 [label="Exit function bar" style="filled" fillcolor=red]; + 60 [label="Exit function bar" style="filled" fillcolor=red]; } - subgraph cluster_15 { + subgraph cluster_16 { color=blue - 59 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_16 { + 61 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_17 { color=blue - 60 [label="Enter block"]; - 61 [label="Postponed enter to lambda"]; - subgraph cluster_17 { + 62 [label="Enter block"]; + 63 [label="Postponed enter to lambda"]; + subgraph cluster_18 { color=blue - 62 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_18 { + 64 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_19 { color=blue - 63 [label="Enter block"]; - 64 [label="Access variable R|/a|"]; - 65 [label="Smart cast: R|/a|"]; - 66 [label="Access variable R|kotlin/String.length|"]; - subgraph cluster_19 { + 65 [label="Enter block"]; + 66 [label="Access variable R|/a|"]; + 67 [label="Smart cast: R|/a|"]; + 68 [label="Access variable R|kotlin/String.length|"]; + subgraph cluster_20 { color=blue - 67 [label="Enter when"]; - subgraph cluster_20 { - color=blue - 68 [label="Enter when branch condition "]; - 69 [label="Access variable R|/b|"]; - 70 [label="Type operator: (R|/b| is R|kotlin/String|)"]; - 71 [label="Exit when branch condition"]; - } + 69 [label="Enter when"]; subgraph cluster_21 { color=blue - 72 [label="Enter when branch condition else"]; + 70 [label="Enter when branch condition "]; + 71 [label="Access variable R|/b|"]; + 72 [label="Type operator: (R|/b| is R|kotlin/String|)"]; 73 [label="Exit when branch condition"]; } - 74 [label="Enter when branch result"]; subgraph cluster_22 { color=blue - 75 [label="Enter block"]; - 76 [label="Const: Int(1)"]; - 77 [label="Exit block"]; + 74 [label="Enter when branch condition else"]; + 75 [label="Exit when branch condition"]; } - 78 [label="Exit when branch result"]; - 79 [label="Enter when branch result"]; + 76 [label="Enter when branch result"]; subgraph cluster_23 { color=blue - 80 [label="Enter block"]; - 81 [label="Access variable R|/b|"]; - 82 [label="Smart cast: R|/b|"]; - 83 [label="Access variable R|kotlin/String.length|"]; - 84 [label="Function call: this@R|/|.R|/.bar|()" style="filled" fillcolor=yellow]; - 85 [label="Exit block"]; + 77 [label="Enter block"]; + 78 [label="Const: Int(1)"]; + 79 [label="Exit block"]; } - 86 [label="Exit when branch result"]; - 87 [label="Exit when"]; + 80 [label="Exit when branch result"]; + 81 [label="Enter when branch result"]; + subgraph cluster_24 { + color=blue + 82 [label="Enter block"]; + 83 [label="Access variable R|/b|"]; + 84 [label="Smart cast: R|/b|"]; + 85 [label="Access variable R|kotlin/String.length|"]; + 86 [label="Function call: this@R|/|.R|/.bar|()" style="filled" fillcolor=yellow]; + 87 [label="Exit block"]; + } + 88 [label="Exit when branch result"]; + 89 [label="Exit when"]; } - 88 [label="Exit block"]; + 90 [label="Exit block"]; } - 89 [label="Exit function " style="filled" fillcolor=red]; + 91 [label="Exit function " style="filled" fillcolor=red]; } - 90 [label="Postponed exit from lambda"]; - 91 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 92 [label="Jump: ^foo R|/myRun|( = myRun@fun (): R|kotlin/Int| { + 92 [label="Postponed exit from lambda"]; + 93 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + 94 [label="Jump: ^foo R|/myRun|( = myRun@fun (): R|kotlin/Int| { R|/a|.R|kotlin/String.length| ^ when () { (R|/b| is R|kotlin/String|) -> { @@ -192,130 +199,130 @@ digraph localClassesWithImplicit_kt { } )"]; - 93 [label="Stub" style="filled" fillcolor=gray]; - 94 [label="Exit block" style="filled" fillcolor=gray]; + 95 [label="Stub" style="filled" fillcolor=gray]; + 96 [label="Exit block" style="filled" fillcolor=gray]; } - 95 [label="Exit function foo" style="filled" fillcolor=red]; + 97 [label="Exit function foo" style="filled" fillcolor=red]; } - subgraph cluster_24 { + subgraph cluster_25 { color=blue - 96 [label="Enter class A" style="filled" fillcolor=red]; - subgraph cluster_25 { + 98 [label="Enter class A" style="filled" fillcolor=red]; + subgraph cluster_26 { color=blue - 97 [label="Enter function " style="filled" fillcolor=red]; - 98 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 99 [label="Exit function " style="filled" fillcolor=red]; + 99 [label="Enter function " style="filled" fillcolor=red]; + 100 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 101 [label="Exit function " style="filled" fillcolor=red]; } - 100 [label="Exit class A" style="filled" fillcolor=red]; + 102 [label="Exit class A" style="filled" fillcolor=red]; } - subgraph cluster_26 { + subgraph cluster_27 { color=blue - 101 [label="Enter function baz" style="filled" fillcolor=red]; - subgraph cluster_27 { + 103 [label="Enter function baz" style="filled" fillcolor=red]; + subgraph cluster_28 { color=blue - 102 [label="Enter block"]; - 103 [label="Const: Int(1)"]; - 104 [label="Jump: ^baz Int(1)"]; - 105 [label="Stub" style="filled" fillcolor=gray]; - 106 [label="Exit block" style="filled" fillcolor=gray]; + 104 [label="Enter block"]; + 105 [label="Const: Int(1)"]; + 106 [label="Jump: ^baz Int(1)"]; + 107 [label="Stub" style="filled" fillcolor=gray]; + 108 [label="Exit block" style="filled" fillcolor=gray]; } - 107 [label="Exit function baz" style="filled" fillcolor=red]; + 109 [label="Exit function baz" style="filled" fillcolor=red]; } - subgraph cluster_28 { + subgraph cluster_29 { color=blue - 108 [label="Enter function bar" style="filled" fillcolor=red]; - subgraph cluster_29 { + 110 [label="Enter function bar" style="filled" fillcolor=red]; + subgraph cluster_30 { color=blue - 109 [label="Enter block"]; - 110 [label="Postponed enter to lambda"]; - subgraph cluster_30 { + 111 [label="Enter block"]; + 112 [label="Postponed enter to lambda"]; + subgraph cluster_31 { color=blue - 111 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_31 { + 113 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_32 { color=blue - 112 [label="Enter block"]; - 113 [label="Access variable R|/b|"]; - 114 [label="Access variable #"]; - 115 [label="Access variable R|/a|"]; - 116 [label="Smart cast: R|/a|"]; - 117 [label="Access variable R|kotlin/String.length|"]; - 118 [label="Function call: this@R|/A|.R|/baz|()" style="filled" fillcolor=yellow]; - 119 [label="Exit block"]; + 114 [label="Enter block"]; + 115 [label="Access variable R|/b|"]; + 116 [label="Access variable #"]; + 117 [label="Access variable R|/a|"]; + 118 [label="Smart cast: R|/a|"]; + 119 [label="Access variable R|kotlin/String.length|"]; + 120 [label="Function call: this@R|/A|.R|/baz|()" style="filled" fillcolor=yellow]; + 121 [label="Exit block"]; } - 120 [label="Exit function " style="filled" fillcolor=red]; + 122 [label="Exit function " style="filled" fillcolor=red]; } - 121 [label="Postponed exit from lambda"]; - 122 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 123 [label="Jump: ^bar R|/myRun|( = myRun@fun (): R|kotlin/Int| { + 123 [label="Postponed exit from lambda"]; + 124 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + 125 [label="Jump: ^bar R|/myRun|( = myRun@fun (): R|kotlin/Int| { R|/b|.# R|/a|.R|kotlin/String.length| ^ this@R|/A|.R|/baz|() } )"]; - 124 [label="Stub" style="filled" fillcolor=gray]; - 125 [label="Exit block" style="filled" fillcolor=gray]; + 126 [label="Stub" style="filled" fillcolor=gray]; + 127 [label="Exit block" style="filled" fillcolor=gray]; } - 126 [label="Exit function bar" style="filled" fillcolor=red]; + 128 [label="Exit function bar" style="filled" fillcolor=red]; } - subgraph cluster_32 { + subgraph cluster_33 { color=blue - 127 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_33 { + 129 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_34 { color=blue - 128 [label="Enter block"]; - 129 [label="Postponed enter to lambda"]; - subgraph cluster_34 { + 130 [label="Enter block"]; + 131 [label="Postponed enter to lambda"]; + subgraph cluster_35 { color=blue - 130 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_35 { + 132 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_36 { color=blue - 131 [label="Enter block"]; - 132 [label="Access variable R|/a|"]; - 133 [label="Smart cast: R|/a|"]; - 134 [label="Access variable R|kotlin/String.length|"]; - subgraph cluster_36 { + 133 [label="Enter block"]; + 134 [label="Access variable R|/a|"]; + 135 [label="Smart cast: R|/a|"]; + 136 [label="Access variable R|kotlin/String.length|"]; + subgraph cluster_37 { color=blue - 135 [label="Enter when"]; - subgraph cluster_37 { - color=blue - 136 [label="Enter when branch condition "]; - 137 [label="Access variable R|/b|"]; - 138 [label="Type operator: (R|/b| is R|kotlin/String|)"]; - 139 [label="Exit when branch condition"]; - } + 137 [label="Enter when"]; subgraph cluster_38 { color=blue - 140 [label="Enter when branch condition else"]; + 138 [label="Enter when branch condition "]; + 139 [label="Access variable R|/b|"]; + 140 [label="Type operator: (R|/b| is R|kotlin/String|)"]; 141 [label="Exit when branch condition"]; } - 142 [label="Enter when branch result"]; subgraph cluster_39 { color=blue - 143 [label="Enter block"]; - 144 [label="Const: Int(1)"]; - 145 [label="Exit block"]; + 142 [label="Enter when branch condition else"]; + 143 [label="Exit when branch condition"]; } - 146 [label="Exit when branch result"]; - 147 [label="Enter when branch result"]; + 144 [label="Enter when branch result"]; subgraph cluster_40 { color=blue - 148 [label="Enter block"]; - 149 [label="Access variable R|/b|"]; - 150 [label="Smart cast: R|/b|"]; - 151 [label="Access variable R|kotlin/String.length|"]; - 152 [label="Function call: this@R|/A|.R|/bar|()" style="filled" fillcolor=yellow]; - 153 [label="Exit block"]; + 145 [label="Enter block"]; + 146 [label="Const: Int(1)"]; + 147 [label="Exit block"]; } - 154 [label="Exit when branch result"]; - 155 [label="Exit when"]; + 148 [label="Exit when branch result"]; + 149 [label="Enter when branch result"]; + subgraph cluster_41 { + color=blue + 150 [label="Enter block"]; + 151 [label="Access variable R|/b|"]; + 152 [label="Smart cast: R|/b|"]; + 153 [label="Access variable R|kotlin/String.length|"]; + 154 [label="Function call: this@R|/A|.R|/bar|()" style="filled" fillcolor=yellow]; + 155 [label="Exit block"]; + } + 156 [label="Exit when branch result"]; + 157 [label="Exit when"]; } - 156 [label="Exit block"]; + 158 [label="Exit block"]; } - 157 [label="Exit function " style="filled" fillcolor=red]; + 159 [label="Exit function " style="filled" fillcolor=red]; } - 158 [label="Postponed exit from lambda"]; - 159 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 160 [label="Jump: ^foo R|/myRun|( = myRun@fun (): R|kotlin/Int| { + 160 [label="Postponed exit from lambda"]; + 161 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + 162 [label="Jump: ^foo R|/myRun|( = myRun@fun (): R|kotlin/Int| { R|/a|.R|kotlin/String.length| ^ when () { (R|/b| is R|kotlin/String|) -> { @@ -329,58 +336,56 @@ digraph localClassesWithImplicit_kt { } )"]; - 161 [label="Stub" style="filled" fillcolor=gray]; - 162 [label="Exit block" style="filled" fillcolor=gray]; + 163 [label="Stub" style="filled" fillcolor=gray]; + 164 [label="Exit block" style="filled" fillcolor=gray]; } - 163 [label="Exit function foo" style="filled" fillcolor=red]; + 165 [label="Exit function foo" style="filled" fillcolor=red]; } - 7 -> {8}; - 8 -> {9}; 9 -> {10}; 10 -> {11}; 11 -> {12}; 12 -> {13}; - 13 -> {14 15}; - 14 -> {21}; - 15 -> {16}; - 16 -> {17}; - 17 -> {32}; - 17 -> {18} [style=dotted]; - 18 -> {19} [style=dotted]; + 13 -> {14}; + 14 -> {15}; + 15 -> {16 17}; + 16 -> {23}; + 17 -> {18}; + 18 -> {19}; + 19 -> {34}; 19 -> {20} [style=dotted]; 20 -> {21} [style=dotted]; - 21 -> {22}; - 22 -> {23 96}; - 22 -> {96} [style=dashed]; + 21 -> {22} [style=dotted]; + 22 -> {23} [style=dotted]; 23 -> {24}; - 23 -> {29} [style=dotted]; - 23 -> {24} [style=dashed]; - 24 -> {25}; - 24 -> {33 40 59} [color=red]; - 24 -> {28} [style=dotted]; - 24 -> {25} [style=dashed]; + 24 -> {25 98}; + 24 -> {98} [style=dashed]; 25 -> {26}; + 25 -> {31} [style=dotted]; + 25 -> {26} [style=dashed]; 26 -> {27}; + 26 -> {35 42 61} [color=red]; + 26 -> {30} [style=dotted]; + 26 -> {27} [style=dashed]; 27 -> {28}; 28 -> {29}; - 28 -> {33 40 59} [color=green]; - 28 -> {33 40 59} [style=dashed]; 29 -> {30}; 30 -> {31}; + 30 -> {35 42 61} [color=green]; + 30 -> {35 42 61} [style=dashed]; 31 -> {32}; + 32 -> {33}; 33 -> {34}; - 34 -> {35}; 35 -> {36}; - 36 -> {39}; - 36 -> {37} [style=dotted]; - 37 -> {38} [style=dotted]; + 36 -> {37}; + 37 -> {38}; + 38 -> {41}; 38 -> {39} [style=dotted]; - 40 -> {41}; - 41 -> {42}; - 42 -> {43 53 54}; - 42 -> {43} [style=dashed]; + 39 -> {40} [style=dotted]; + 40 -> {41} [style=dotted]; + 42 -> {43}; 43 -> {44}; - 44 -> {45}; + 44 -> {45 55 56}; + 44 -> {45} [style=dashed]; 45 -> {46}; 46 -> {47}; 47 -> {48}; @@ -390,18 +395,18 @@ digraph localClassesWithImplicit_kt { 51 -> {52}; 52 -> {53}; 53 -> {54}; - 53 -> {42} [color=green style=dashed]; 54 -> {55}; - 55 -> {58}; - 55 -> {56} [style=dotted]; - 56 -> {57} [style=dotted]; + 55 -> {56}; + 55 -> {44} [color=green style=dashed]; + 56 -> {57}; + 57 -> {60}; 57 -> {58} [style=dotted]; - 59 -> {60}; - 60 -> {61}; - 61 -> {62 90 91}; - 61 -> {62} [style=dashed]; + 58 -> {59} [style=dotted]; + 59 -> {60} [style=dotted]; + 61 -> {62}; 62 -> {63}; - 63 -> {64}; + 63 -> {64 92 93}; + 63 -> {64} [style=dashed]; 64 -> {65}; 65 -> {66}; 66 -> {67}; @@ -409,16 +414,16 @@ digraph localClassesWithImplicit_kt { 68 -> {69}; 69 -> {70}; 70 -> {71}; - 71 -> {72 79}; + 71 -> {72}; 72 -> {73}; - 73 -> {74}; + 73 -> {74 81}; 74 -> {75}; 75 -> {76}; 76 -> {77}; 77 -> {78}; - 78 -> {87}; + 78 -> {79}; 79 -> {80}; - 80 -> {81}; + 80 -> {89}; 81 -> {82}; 82 -> {83}; 83 -> {84}; @@ -429,34 +434,34 @@ digraph localClassesWithImplicit_kt { 88 -> {89}; 89 -> {90}; 90 -> {91}; - 90 -> {61} [color=green style=dashed]; 91 -> {92}; - 92 -> {95}; - 92 -> {93} [style=dotted]; - 93 -> {94} [style=dotted]; + 92 -> {93}; + 92 -> {63} [color=green style=dashed]; + 93 -> {94}; + 94 -> {97}; 94 -> {95} [style=dotted]; - 96 -> {97}; - 96 -> {101 108 127} [color=red]; - 96 -> {100} [style=dotted]; - 96 -> {97} [style=dashed]; - 97 -> {98}; + 95 -> {96} [style=dotted]; + 96 -> {97} [style=dotted]; 98 -> {99}; - 99 -> {100} [color=green]; - 100 -> {101 108 127} [color=green]; - 100 -> {101 108 127} [style=dashed]; - 101 -> {102}; - 102 -> {103}; + 98 -> {103 110 129} [color=red]; + 98 -> {102} [style=dotted]; + 98 -> {99} [style=dashed]; + 99 -> {100}; + 100 -> {101}; + 101 -> {102} [color=green]; + 102 -> {103 110 129} [color=green]; + 102 -> {103 110 129} [style=dashed]; 103 -> {104}; - 104 -> {107}; - 104 -> {105} [style=dotted]; - 105 -> {106} [style=dotted]; + 104 -> {105}; + 105 -> {106}; + 106 -> {109}; 106 -> {107} [style=dotted]; - 108 -> {109}; - 109 -> {110}; - 110 -> {111 121 122}; - 110 -> {111} [style=dashed]; + 107 -> {108} [style=dotted]; + 108 -> {109} [style=dotted]; + 110 -> {111}; 111 -> {112}; - 112 -> {113}; + 112 -> {113 123 124}; + 112 -> {113} [style=dashed]; 113 -> {114}; 114 -> {115}; 115 -> {116}; @@ -466,18 +471,18 @@ digraph localClassesWithImplicit_kt { 119 -> {120}; 120 -> {121}; 121 -> {122}; - 121 -> {110} [color=green style=dashed]; 122 -> {123}; - 123 -> {126}; - 123 -> {124} [style=dotted]; - 124 -> {125} [style=dotted]; + 123 -> {124}; + 123 -> {112} [color=green style=dashed]; + 124 -> {125}; + 125 -> {128}; 125 -> {126} [style=dotted]; - 127 -> {128}; - 128 -> {129}; - 129 -> {130 158 159}; - 129 -> {130} [style=dashed]; + 126 -> {127} [style=dotted]; + 127 -> {128} [style=dotted]; + 129 -> {130}; 130 -> {131}; - 131 -> {132}; + 131 -> {132 160 161}; + 131 -> {132} [style=dashed]; 132 -> {133}; 133 -> {134}; 134 -> {135}; @@ -485,16 +490,16 @@ digraph localClassesWithImplicit_kt { 136 -> {137}; 137 -> {138}; 138 -> {139}; - 139 -> {140 147}; + 139 -> {140}; 140 -> {141}; - 141 -> {142}; + 141 -> {142 149}; 142 -> {143}; 143 -> {144}; 144 -> {145}; 145 -> {146}; - 146 -> {155}; + 146 -> {147}; 147 -> {148}; - 148 -> {149}; + 148 -> {157}; 149 -> {150}; 150 -> {151}; 151 -> {152}; @@ -505,11 +510,13 @@ digraph localClassesWithImplicit_kt { 156 -> {157}; 157 -> {158}; 158 -> {159}; - 158 -> {129} [color=green style=dashed]; 159 -> {160}; - 160 -> {163}; - 160 -> {161} [style=dotted]; - 161 -> {162} [style=dotted]; + 160 -> {161}; + 160 -> {131} [color=green style=dashed]; + 161 -> {162}; + 162 -> {165}; 162 -> {163} [style=dotted]; + 163 -> {164} [style=dotted]; + 164 -> {165} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/loops.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/loops.dot index 8fc834389da..68ca9f235e5 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/loops.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/loops.dot @@ -5,96 +5,101 @@ digraph loops_kt { subgraph cluster_0 { color=red - 0 [label="Enter function testWhile" style="filled" fillcolor=red]; - subgraph cluster_1 { + 0 [label="Enter file loops.kt" style="filled" fillcolor=red]; + 1 [label="Exit file loops.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function testWhile" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 1 [label="Enter block"]; - subgraph cluster_2 { + 3 [label="Enter block"]; + subgraph cluster_3 { color=blue - 2 [label="Enter while loop"]; - subgraph cluster_3 { - color=blue - 3 [label="Enter loop condition"]; - 4 [label="Access variable R|/b|"]; - 5 [label="Exit loop condition"]; - } + 4 [label="Enter while loop"]; subgraph cluster_4 { color=blue - 6 [label="Enter loop block"]; - subgraph cluster_5 { - color=blue - 7 [label="Enter block"]; - 8 [label="Access variable R|/x|"]; - 9 [label="Type operator: (R|/x| is R|kotlin/String|)"]; - 10 [label="Variable declaration: lval y: R|kotlin/Boolean|"]; - 11 [label="Exit block"]; - } - 12 [label="Exit loop block"]; + 5 [label="Enter loop condition"]; + 6 [label="Access variable R|/b|"]; + 7 [label="Exit loop condition"]; } - 13 [label="Exit while loop"]; + subgraph cluster_5 { + color=blue + 8 [label="Enter loop block"]; + subgraph cluster_6 { + color=blue + 9 [label="Enter block"]; + 10 [label="Access variable R|/x|"]; + 11 [label="Type operator: (R|/x| is R|kotlin/String|)"]; + 12 [label="Variable declaration: lval y: R|kotlin/Boolean|"]; + 13 [label="Exit block"]; + } + 14 [label="Exit loop block"]; + } + 15 [label="Exit while loop"]; } - 14 [label="Access variable R|/x|"]; - 15 [label="Type operator: (R|/x| is R|kotlin/String|)"]; - 16 [label="Exit block"]; + 16 [label="Access variable R|/x|"]; + 17 [label="Type operator: (R|/x| is R|kotlin/String|)"]; + 18 [label="Exit block"]; } - 17 [label="Exit function testWhile" style="filled" fillcolor=red]; + 19 [label="Exit function testWhile" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; 3 -> {4}; 4 -> {5}; - 5 -> {6 13}; + 5 -> {6}; 6 -> {7}; - 7 -> {8}; + 7 -> {8 15}; 8 -> {9}; 9 -> {10}; 10 -> {11}; 11 -> {12}; - 12 -> {3} [color=green style=dashed]; + 12 -> {13}; 13 -> {14}; - 14 -> {15}; + 14 -> {5} [color=green style=dashed]; 15 -> {16}; 16 -> {17}; - - subgraph cluster_6 { - color=red - 18 [label="Enter function testDoWhile" style="filled" fillcolor=red]; - subgraph cluster_7 { - color=blue - 19 [label="Enter block"]; - subgraph cluster_8 { - color=blue - 20 [label="Enter do-while loop"]; - subgraph cluster_9 { - color=blue - 21 [label="Enter loop block"]; - subgraph cluster_10 { - color=blue - 22 [label="Enter block"]; - 23 [label="Access variable R|/x|"]; - 24 [label="Type operator: (R|/x| is R|kotlin/String|)"]; - 25 [label="Variable declaration: lval y: R|kotlin/Boolean|"]; - 26 [label="Exit block"]; - } - 27 [label="Exit loop block"]; - } - subgraph cluster_11 { - color=blue - 28 [label="Enter loop condition"]; - 29 [label="Access variable R|/b|"]; - 30 [label="Exit loop condition"]; - } - 31 [label="Exit do-while loop"]; - } - 32 [label="Access variable R|/x|"]; - 33 [label="Type operator: (R|/x| is R|kotlin/String|)"]; - 34 [label="Exit block"]; - } - 35 [label="Exit function testDoWhile" style="filled" fillcolor=red]; - } + 17 -> {18}; 18 -> {19}; - 19 -> {20}; + + subgraph cluster_7 { + color=red + 20 [label="Enter function testDoWhile" style="filled" fillcolor=red]; + subgraph cluster_8 { + color=blue + 21 [label="Enter block"]; + subgraph cluster_9 { + color=blue + 22 [label="Enter do-while loop"]; + subgraph cluster_10 { + color=blue + 23 [label="Enter loop block"]; + subgraph cluster_11 { + color=blue + 24 [label="Enter block"]; + 25 [label="Access variable R|/x|"]; + 26 [label="Type operator: (R|/x| is R|kotlin/String|)"]; + 27 [label="Variable declaration: lval y: R|kotlin/Boolean|"]; + 28 [label="Exit block"]; + } + 29 [label="Exit loop block"]; + } + subgraph cluster_12 { + color=blue + 30 [label="Enter loop condition"]; + 31 [label="Access variable R|/b|"]; + 32 [label="Exit loop condition"]; + } + 33 [label="Exit do-while loop"]; + } + 34 [label="Access variable R|/x|"]; + 35 [label="Type operator: (R|/x| is R|kotlin/String|)"]; + 36 [label="Exit block"]; + } + 37 [label="Exit function testDoWhile" style="filled" fillcolor=red]; + } 20 -> {21}; 21 -> {22}; 22 -> {23}; @@ -106,69 +111,69 @@ digraph loops_kt { 28 -> {29}; 29 -> {30}; 30 -> {31}; - 30 -> {21} [color=green style=dashed]; 31 -> {32}; 32 -> {33}; + 32 -> {23} [color=green style=dashed]; 33 -> {34}; 34 -> {35}; + 35 -> {36}; + 36 -> {37}; - subgraph cluster_12 { + subgraph cluster_13 { color=red - 36 [label="Enter function testFor" style="filled" fillcolor=red]; - subgraph cluster_13 { + 38 [label="Enter function testFor" style="filled" fillcolor=red]; + subgraph cluster_14 { color=blue - 37 [label="Enter block"]; - subgraph cluster_14 { + 39 [label="Enter block"]; + subgraph cluster_15 { color=blue - 38 [label="Enter block"]; - 39 [label="Const: Int(0)"]; - 40 [label="Const: Int(5)"]; - 41 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...)" style="filled" fillcolor=yellow]; - 42 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...).R|kotlin/ranges/IntProgression.iterator|()" style="filled" fillcolor=yellow]; - 43 [label="Variable declaration: lval : R|kotlin/collections/IntIterator|"]; - subgraph cluster_15 { + 40 [label="Enter block"]; + 41 [label="Const: Int(0)"]; + 42 [label="Const: Int(5)"]; + 43 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...)" style="filled" fillcolor=yellow]; + 44 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...).R|kotlin/ranges/IntProgression.iterator|()" style="filled" fillcolor=yellow]; + 45 [label="Variable declaration: lval : R|kotlin/collections/IntIterator|"]; + subgraph cluster_16 { color=blue - 44 [label="Enter while loop"]; - subgraph cluster_16 { - color=blue - 45 [label="Enter loop condition"]; - 46 [label="Access variable R|/|"]; - 47 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 48 [label="Exit loop condition"]; - } + 46 [label="Enter while loop"]; subgraph cluster_17 { color=blue - 49 [label="Enter loop block"]; - subgraph cluster_18 { - color=blue - 50 [label="Enter block"]; - 51 [label="Access variable R|/|"]; - 52 [label="Function call: R|/|.R|kotlin/collections/IntIterator.next|()" style="filled" fillcolor=yellow]; - 53 [label="Variable declaration: lval i: R|kotlin/Int|"]; - subgraph cluster_19 { - color=blue - 54 [label="Enter block"]; - 55 [label="Access variable R|/x|"]; - 56 [label="Type operator: (R|/x| is R|kotlin/String|)"]; - 57 [label="Variable declaration: lval y: R|kotlin/Boolean|"]; - 58 [label="Exit block"]; - } - 59 [label="Exit block"]; - } - 60 [label="Exit loop block"]; + 47 [label="Enter loop condition"]; + 48 [label="Access variable R|/|"]; + 49 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 50 [label="Exit loop condition"]; } - 61 [label="Exit while loop"]; + subgraph cluster_18 { + color=blue + 51 [label="Enter loop block"]; + subgraph cluster_19 { + color=blue + 52 [label="Enter block"]; + 53 [label="Access variable R|/|"]; + 54 [label="Function call: R|/|.R|kotlin/collections/IntIterator.next|()" style="filled" fillcolor=yellow]; + 55 [label="Variable declaration: lval i: R|kotlin/Int|"]; + subgraph cluster_20 { + color=blue + 56 [label="Enter block"]; + 57 [label="Access variable R|/x|"]; + 58 [label="Type operator: (R|/x| is R|kotlin/String|)"]; + 59 [label="Variable declaration: lval y: R|kotlin/Boolean|"]; + 60 [label="Exit block"]; + } + 61 [label="Exit block"]; + } + 62 [label="Exit loop block"]; + } + 63 [label="Exit while loop"]; } - 62 [label="Exit block"]; + 64 [label="Exit block"]; } - 63 [label="Access variable R|/x|"]; - 64 [label="Type operator: (R|/x| is R|kotlin/String|)"]; - 65 [label="Exit block"]; + 65 [label="Access variable R|/x|"]; + 66 [label="Type operator: (R|/x| is R|kotlin/String|)"]; + 67 [label="Exit block"]; } - 66 [label="Exit function testFor" style="filled" fillcolor=red]; + 68 [label="Exit function testFor" style="filled" fillcolor=red]; } - 36 -> {37}; - 37 -> {38}; 38 -> {39}; 39 -> {40}; 40 -> {41}; @@ -179,9 +184,9 @@ digraph loops_kt { 45 -> {46}; 46 -> {47}; 47 -> {48}; - 48 -> {49 61}; + 48 -> {49}; 49 -> {50}; - 50 -> {51}; + 50 -> {51 63}; 51 -> {52}; 52 -> {53}; 53 -> {54}; @@ -191,227 +196,227 @@ digraph loops_kt { 57 -> {58}; 58 -> {59}; 59 -> {60}; - 60 -> {45} [color=green style=dashed]; + 60 -> {61}; 61 -> {62}; - 62 -> {63}; + 62 -> {47} [color=green style=dashed]; 63 -> {64}; 64 -> {65}; 65 -> {66}; + 66 -> {67}; + 67 -> {68}; - subgraph cluster_20 { + subgraph cluster_21 { color=red - 67 [label="Enter function testWhileTrue" style="filled" fillcolor=red]; - subgraph cluster_21 { + 69 [label="Enter function testWhileTrue" style="filled" fillcolor=red]; + subgraph cluster_22 { color=blue - 68 [label="Enter block"]; - subgraph cluster_22 { + 70 [label="Enter block"]; + subgraph cluster_23 { color=blue - 69 [label="Enter while loop"]; - subgraph cluster_23 { - color=blue - 70 [label="Enter loop condition"]; - 71 [label="Const: Boolean(true)"]; - 72 [label="Exit loop condition"]; - } + 71 [label="Enter while loop"]; subgraph cluster_24 { color=blue - 73 [label="Enter loop block"]; - subgraph cluster_25 { - color=blue - 74 [label="Enter block"]; - 75 [label="Const: Int(1)"]; - 76 [label="Exit block"]; - } - 77 [label="Exit loop block"]; + 72 [label="Enter loop condition"]; + 73 [label="Const: Boolean(true)"]; + 74 [label="Exit loop condition"]; } - 78 [label="Exit while loop" style="filled" fillcolor=gray]; + subgraph cluster_25 { + color=blue + 75 [label="Enter loop block"]; + subgraph cluster_26 { + color=blue + 76 [label="Enter block"]; + 77 [label="Const: Int(1)"]; + 78 [label="Exit block"]; + } + 79 [label="Exit loop block"]; + } + 80 [label="Exit while loop" style="filled" fillcolor=gray]; } - 79 [label="Const: Int(1)" style="filled" fillcolor=gray]; - 80 [label="Exit block" style="filled" fillcolor=gray]; + 81 [label="Const: Int(1)" style="filled" fillcolor=gray]; + 82 [label="Exit block" style="filled" fillcolor=gray]; } - 81 [label="Exit function testWhileTrue" style="filled" fillcolor=gray]; + 83 [label="Exit function testWhileTrue" style="filled" fillcolor=gray]; } - 67 -> {68}; - 68 -> {69}; 69 -> {70}; 70 -> {71}; 71 -> {72}; 72 -> {73}; - 72 -> {78} [style=dotted]; 73 -> {74}; 74 -> {75}; + 74 -> {80} [style=dotted]; 75 -> {76}; 76 -> {77}; - 77 -> {70} [color=green style=dashed]; - 78 -> {79} [style=dotted]; - 79 -> {80} [style=dotted]; + 77 -> {78}; + 78 -> {79}; + 79 -> {72} [color=green style=dashed]; 80 -> {81} [style=dotted]; + 81 -> {82} [style=dotted]; + 82 -> {83} [style=dotted]; - subgraph cluster_26 { + subgraph cluster_27 { color=red - 82 [label="Enter function testWhileTrueWithBreak" style="filled" fillcolor=red]; - subgraph cluster_27 { + 84 [label="Enter function testWhileTrueWithBreak" style="filled" fillcolor=red]; + subgraph cluster_28 { color=blue - 83 [label="Enter block"]; - subgraph cluster_28 { + 85 [label="Enter block"]; + subgraph cluster_29 { color=blue - 84 [label="Enter while loop"]; - subgraph cluster_29 { - color=blue - 85 [label="Enter loop condition"]; - 86 [label="Const: Boolean(true)"]; - 87 [label="Exit loop condition"]; - } + 86 [label="Enter while loop"]; subgraph cluster_30 { color=blue - 88 [label="Enter loop block"]; - subgraph cluster_31 { + 87 [label="Enter loop condition"]; + 88 [label="Const: Boolean(true)"]; + 89 [label="Exit loop condition"]; + } + subgraph cluster_31 { + color=blue + 90 [label="Enter loop block"]; + subgraph cluster_32 { color=blue - 89 [label="Enter block"]; - subgraph cluster_32 { + 91 [label="Enter block"]; + subgraph cluster_33 { color=blue - 90 [label="Enter when"]; - subgraph cluster_33 { - color=blue - 91 [label="Enter when branch condition "]; - 92 [label="Access variable R|/b|"]; - 93 [label="Exit when branch condition"]; - } - 94 [label="Synthetic else branch"]; - 95 [label="Enter when branch result"]; + 92 [label="Enter when"]; subgraph cluster_34 { color=blue - 96 [label="Enter block"]; - 97 [label="Jump: break@@@[Boolean(true)] "]; - 98 [label="Stub" style="filled" fillcolor=gray]; - 99 [label="Exit block" style="filled" fillcolor=gray]; + 93 [label="Enter when branch condition "]; + 94 [label="Access variable R|/b|"]; + 95 [label="Exit when branch condition"]; } - 100 [label="Exit when branch result" style="filled" fillcolor=gray]; - 101 [label="Exit when"]; + 96 [label="Synthetic else branch"]; + 97 [label="Enter when branch result"]; + subgraph cluster_35 { + color=blue + 98 [label="Enter block"]; + 99 [label="Jump: break@@@[Boolean(true)] "]; + 100 [label="Stub" style="filled" fillcolor=gray]; + 101 [label="Exit block" style="filled" fillcolor=gray]; + } + 102 [label="Exit when branch result" style="filled" fillcolor=gray]; + 103 [label="Exit when"]; } - 102 [label="Exit block"]; + 104 [label="Exit block"]; } - 103 [label="Exit loop block"]; + 105 [label="Exit loop block"]; } - 104 [label="Exit while loop"]; + 106 [label="Exit while loop"]; } - 105 [label="Const: Int(1)"]; - 106 [label="Exit block"]; + 107 [label="Const: Int(1)"]; + 108 [label="Exit block"]; } - 107 [label="Exit function testWhileTrueWithBreak" style="filled" fillcolor=red]; + 109 [label="Exit function testWhileTrueWithBreak" style="filled" fillcolor=red]; } - 82 -> {83}; - 83 -> {84}; 84 -> {85}; 85 -> {86}; 86 -> {87}; 87 -> {88}; - 87 -> {104} [style=dotted]; 88 -> {89}; 89 -> {90}; + 89 -> {106} [style=dotted]; 90 -> {91}; 91 -> {92}; 92 -> {93}; - 93 -> {94 95}; - 94 -> {101}; - 95 -> {96}; - 96 -> {97}; - 97 -> {104}; - 97 -> {98} [style=dotted]; - 98 -> {99} [style=dotted]; + 93 -> {94}; + 94 -> {95}; + 95 -> {96 97}; + 96 -> {103}; + 97 -> {98}; + 98 -> {99}; + 99 -> {106}; 99 -> {100} [style=dotted]; 100 -> {101} [style=dotted]; - 101 -> {102}; - 102 -> {103}; - 103 -> {85} [color=green style=dashed]; + 101 -> {102} [style=dotted]; + 102 -> {103} [style=dotted]; + 103 -> {104}; 104 -> {105}; - 105 -> {106}; + 105 -> {87} [color=green style=dashed]; 106 -> {107}; + 107 -> {108}; + 108 -> {109}; - subgraph cluster_35 { + subgraph cluster_36 { color=red - 108 [label="Enter function testWhileFalse" style="filled" fillcolor=red]; - subgraph cluster_36 { + 110 [label="Enter function testWhileFalse" style="filled" fillcolor=red]; + subgraph cluster_37 { color=blue - 109 [label="Enter block"]; - subgraph cluster_37 { + 111 [label="Enter block"]; + subgraph cluster_38 { color=blue - 110 [label="Enter while loop"]; - subgraph cluster_38 { - color=blue - 111 [label="Enter loop condition"]; - 112 [label="Const: Boolean(false)"]; - 113 [label="Exit loop condition"]; - } + 112 [label="Enter while loop"]; subgraph cluster_39 { color=blue - 114 [label="Enter loop block" style="filled" fillcolor=gray]; - subgraph cluster_40 { - color=blue - 115 [label="Enter block" style="filled" fillcolor=gray]; - 116 [label="Const: Int(1)" style="filled" fillcolor=gray]; - 117 [label="Exit block" style="filled" fillcolor=gray]; - } - 118 [label="Exit loop block" style="filled" fillcolor=gray]; + 113 [label="Enter loop condition"]; + 114 [label="Const: Boolean(false)"]; + 115 [label="Exit loop condition"]; } - 119 [label="Exit while loop"]; + subgraph cluster_40 { + color=blue + 116 [label="Enter loop block" style="filled" fillcolor=gray]; + subgraph cluster_41 { + color=blue + 117 [label="Enter block" style="filled" fillcolor=gray]; + 118 [label="Const: Int(1)" style="filled" fillcolor=gray]; + 119 [label="Exit block" style="filled" fillcolor=gray]; + } + 120 [label="Exit loop block" style="filled" fillcolor=gray]; + } + 121 [label="Exit while loop"]; } - 120 [label="Const: Int(1)"]; - 121 [label="Exit block"]; + 122 [label="Const: Int(1)"]; + 123 [label="Exit block"]; } - 122 [label="Exit function testWhileFalse" style="filled" fillcolor=red]; + 124 [label="Exit function testWhileFalse" style="filled" fillcolor=red]; } - 108 -> {109}; - 109 -> {110}; 110 -> {111}; 111 -> {112}; 112 -> {113}; - 113 -> {119}; - 113 -> {114} [style=dotted]; - 114 -> {115} [style=dotted]; + 113 -> {114}; + 114 -> {115}; + 115 -> {121}; 115 -> {116} [style=dotted]; 116 -> {117} [style=dotted]; 117 -> {118} [style=dotted]; - 118 -> {111} [color=green style=dotted]; - 119 -> {120}; - 120 -> {121}; + 118 -> {119} [style=dotted]; + 119 -> {120} [style=dotted]; + 120 -> {113} [color=green style=dotted]; 121 -> {122}; - - subgraph cluster_41 { - color=red - 123 [label="Enter function testDoWhileTrue" style="filled" fillcolor=red]; - subgraph cluster_42 { - color=blue - 124 [label="Enter block"]; - subgraph cluster_43 { - color=blue - 125 [label="Enter do-while loop"]; - subgraph cluster_44 { - color=blue - 126 [label="Enter loop block"]; - subgraph cluster_45 { - color=blue - 127 [label="Enter block"]; - 128 [label="Const: Int(1)"]; - 129 [label="Exit block"]; - } - 130 [label="Exit loop block"]; - } - subgraph cluster_46 { - color=blue - 131 [label="Enter loop condition"]; - 132 [label="Const: Boolean(true)"]; - 133 [label="Exit loop condition"]; - } - 134 [label="Exit do-while loop" style="filled" fillcolor=gray]; - } - 135 [label="Const: Int(1)" style="filled" fillcolor=gray]; - 136 [label="Exit block" style="filled" fillcolor=gray]; - } - 137 [label="Exit function testDoWhileTrue" style="filled" fillcolor=gray]; - } + 122 -> {123}; 123 -> {124}; - 124 -> {125}; + + subgraph cluster_42 { + color=red + 125 [label="Enter function testDoWhileTrue" style="filled" fillcolor=red]; + subgraph cluster_43 { + color=blue + 126 [label="Enter block"]; + subgraph cluster_44 { + color=blue + 127 [label="Enter do-while loop"]; + subgraph cluster_45 { + color=blue + 128 [label="Enter loop block"]; + subgraph cluster_46 { + color=blue + 129 [label="Enter block"]; + 130 [label="Const: Int(1)"]; + 131 [label="Exit block"]; + } + 132 [label="Exit loop block"]; + } + subgraph cluster_47 { + color=blue + 133 [label="Enter loop condition"]; + 134 [label="Const: Boolean(true)"]; + 135 [label="Exit loop condition"]; + } + 136 [label="Exit do-while loop" style="filled" fillcolor=gray]; + } + 137 [label="Const: Int(1)" style="filled" fillcolor=gray]; + 138 [label="Exit block" style="filled" fillcolor=gray]; + } + 139 [label="Exit function testDoWhileTrue" style="filled" fillcolor=gray]; + } 125 -> {126}; 126 -> {127}; 127 -> {128}; @@ -420,128 +425,128 @@ digraph loops_kt { 130 -> {131}; 131 -> {132}; 132 -> {133}; - 133 -> {126} [color=green style=dashed]; - 133 -> {134} [style=dotted]; - 134 -> {135} [style=dotted]; + 133 -> {134}; + 134 -> {135}; + 135 -> {128} [color=green style=dashed]; 135 -> {136} [style=dotted]; 136 -> {137} [style=dotted]; + 137 -> {138} [style=dotted]; + 138 -> {139} [style=dotted]; - subgraph cluster_47 { + subgraph cluster_48 { color=red - 138 [label="Enter function testDoWhileTrueWithBreak" style="filled" fillcolor=red]; - subgraph cluster_48 { + 140 [label="Enter function testDoWhileTrueWithBreak" style="filled" fillcolor=red]; + subgraph cluster_49 { color=blue - 139 [label="Enter block"]; - subgraph cluster_49 { + 141 [label="Enter block"]; + subgraph cluster_50 { color=blue - 140 [label="Enter do-while loop"]; - subgraph cluster_50 { + 142 [label="Enter do-while loop"]; + subgraph cluster_51 { color=blue - 141 [label="Enter loop block"]; - subgraph cluster_51 { + 143 [label="Enter loop block"]; + subgraph cluster_52 { color=blue - 142 [label="Enter block"]; - subgraph cluster_52 { + 144 [label="Enter block"]; + subgraph cluster_53 { color=blue - 143 [label="Enter when"]; - subgraph cluster_53 { - color=blue - 144 [label="Enter when branch condition "]; - 145 [label="Access variable R|/b|"]; - 146 [label="Exit when branch condition"]; - } - 147 [label="Synthetic else branch"]; - 148 [label="Enter when branch result"]; + 145 [label="Enter when"]; subgraph cluster_54 { color=blue - 149 [label="Enter block"]; - 150 [label="Jump: break@@@[Boolean(true)] "]; - 151 [label="Stub" style="filled" fillcolor=gray]; - 152 [label="Exit block" style="filled" fillcolor=gray]; + 146 [label="Enter when branch condition "]; + 147 [label="Access variable R|/b|"]; + 148 [label="Exit when branch condition"]; } - 153 [label="Exit when branch result" style="filled" fillcolor=gray]; - 154 [label="Exit when"]; + 149 [label="Synthetic else branch"]; + 150 [label="Enter when branch result"]; + subgraph cluster_55 { + color=blue + 151 [label="Enter block"]; + 152 [label="Jump: break@@@[Boolean(true)] "]; + 153 [label="Stub" style="filled" fillcolor=gray]; + 154 [label="Exit block" style="filled" fillcolor=gray]; + } + 155 [label="Exit when branch result" style="filled" fillcolor=gray]; + 156 [label="Exit when"]; } - 155 [label="Exit block"]; + 157 [label="Exit block"]; } - 156 [label="Exit loop block"]; + 158 [label="Exit loop block"]; } - subgraph cluster_55 { + subgraph cluster_56 { color=blue - 157 [label="Enter loop condition"]; - 158 [label="Const: Boolean(true)"]; - 159 [label="Exit loop condition"]; + 159 [label="Enter loop condition"]; + 160 [label="Const: Boolean(true)"]; + 161 [label="Exit loop condition"]; } - 160 [label="Exit do-while loop"]; + 162 [label="Exit do-while loop"]; } - 161 [label="Const: Int(1)"]; - 162 [label="Exit block"]; + 163 [label="Const: Int(1)"]; + 164 [label="Exit block"]; } - 163 [label="Exit function testDoWhileTrueWithBreak" style="filled" fillcolor=red]; + 165 [label="Exit function testDoWhileTrueWithBreak" style="filled" fillcolor=red]; } - 138 -> {139}; - 139 -> {140}; 140 -> {141}; 141 -> {142}; 142 -> {143}; 143 -> {144}; 144 -> {145}; 145 -> {146}; - 146 -> {147 148}; - 147 -> {154}; - 148 -> {149}; - 149 -> {150}; - 150 -> {160}; - 150 -> {151} [style=dotted]; - 151 -> {152} [style=dotted]; + 146 -> {147}; + 147 -> {148}; + 148 -> {149 150}; + 149 -> {156}; + 150 -> {151}; + 151 -> {152}; + 152 -> {162}; 152 -> {153} [style=dotted]; 153 -> {154} [style=dotted]; - 154 -> {155}; - 155 -> {156}; + 154 -> {155} [style=dotted]; + 155 -> {156} [style=dotted]; 156 -> {157}; 157 -> {158}; 158 -> {159}; - 159 -> {141} [color=green style=dashed]; - 159 -> {160} [style=dotted]; + 159 -> {160}; 160 -> {161}; - 161 -> {162}; + 161 -> {143} [color=green style=dashed]; + 161 -> {162} [style=dotted]; 162 -> {163}; - - subgraph cluster_56 { - color=red - 164 [label="Enter function testDoWhileFalse" style="filled" fillcolor=red]; - subgraph cluster_57 { - color=blue - 165 [label="Enter block"]; - subgraph cluster_58 { - color=blue - 166 [label="Enter do-while loop"]; - subgraph cluster_59 { - color=blue - 167 [label="Enter loop block"]; - subgraph cluster_60 { - color=blue - 168 [label="Enter block"]; - 169 [label="Const: Int(1)"]; - 170 [label="Exit block"]; - } - 171 [label="Exit loop block"]; - } - subgraph cluster_61 { - color=blue - 172 [label="Enter loop condition"]; - 173 [label="Const: Boolean(false)"]; - 174 [label="Exit loop condition"]; - } - 175 [label="Exit do-while loop"]; - } - 176 [label="Const: Int(1)"]; - 177 [label="Exit block"]; - } - 178 [label="Exit function testDoWhileFalse" style="filled" fillcolor=red]; - } + 163 -> {164}; 164 -> {165}; - 165 -> {166}; + + subgraph cluster_57 { + color=red + 166 [label="Enter function testDoWhileFalse" style="filled" fillcolor=red]; + subgraph cluster_58 { + color=blue + 167 [label="Enter block"]; + subgraph cluster_59 { + color=blue + 168 [label="Enter do-while loop"]; + subgraph cluster_60 { + color=blue + 169 [label="Enter loop block"]; + subgraph cluster_61 { + color=blue + 170 [label="Enter block"]; + 171 [label="Const: Int(1)"]; + 172 [label="Exit block"]; + } + 173 [label="Exit loop block"]; + } + subgraph cluster_62 { + color=blue + 174 [label="Enter loop condition"]; + 175 [label="Const: Boolean(false)"]; + 176 [label="Exit loop condition"]; + } + 177 [label="Exit do-while loop"]; + } + 178 [label="Const: Int(1)"]; + 179 [label="Exit block"]; + } + 180 [label="Exit function testDoWhileFalse" style="filled" fillcolor=red]; + } 166 -> {167}; 167 -> {168}; 168 -> {169}; @@ -551,9 +556,11 @@ digraph loops_kt { 172 -> {173}; 173 -> {174}; 174 -> {175}; - 174 -> {167} [color=green style=dotted]; 175 -> {176}; 176 -> {177}; + 176 -> {169} [color=green style=dotted]; 177 -> {178}; + 178 -> {179}; + 179 -> {180}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/nestedClass.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/nestedClass.dot index 21e879a2cc6..3411d480b2b 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/nestedClass.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/nestedClass.dot @@ -5,102 +5,109 @@ digraph nestedClass_kt { subgraph cluster_0 { color=red - 0 [label="Enter class OuterClass" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter property" style="filled" fillcolor=red]; - 2 [label="Const: Int(1)"]; - 3 [label="Exit property" style="filled" fillcolor=red]; - } + 0 [label="Enter file nestedClass.kt" style="filled" fillcolor=red]; + 1 [label="Exit file nestedClass.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter class OuterClass" style="filled" fillcolor=red]; subgraph cluster_2 { color=blue - 4 [label="Enter property" style="filled" fillcolor=red]; - 5 [label="Access variable R|/OuterClass.outerProperty|"]; - 6 [label="Exit property" style="filled" fillcolor=red]; + 3 [label="Enter property" style="filled" fillcolor=red]; + 4 [label="Const: Int(1)"]; + 5 [label="Exit property" style="filled" fillcolor=red]; } subgraph cluster_3 { color=blue - 7 [label="Enter function " style="filled" fillcolor=red]; - 8 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 9 [label="Exit function " style="filled" fillcolor=red]; + 6 [label="Enter property" style="filled" fillcolor=red]; + 7 [label="Access variable R|/OuterClass.outerProperty|"]; + 8 [label="Exit property" style="filled" fillcolor=red]; } - 10 [label="Exit class OuterClass" style="filled" fillcolor=red]; + subgraph cluster_4 { + color=blue + 9 [label="Enter function " style="filled" fillcolor=red]; + 10 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 11 [label="Exit function " style="filled" fillcolor=red]; + } + 12 [label="Exit class OuterClass" style="filled" fillcolor=red]; } - 0 -> {1} [color=green]; - 0 -> {10} [style=dotted]; - 0 -> {1 4 7} [style=dashed]; - 1 -> {2}; - 2 -> {3}; - 3 -> {4} [color=green]; + 2 -> {3} [color=green]; + 2 -> {12} [style=dotted]; + 2 -> {3 6 9} [style=dashed]; + 3 -> {4}; 4 -> {5}; - 5 -> {6}; - 6 -> {7} [color=green]; + 5 -> {6} [color=green]; + 6 -> {7}; 7 -> {8}; - 8 -> {9}; - 9 -> {10} [color=green]; + 8 -> {9} [color=green]; + 9 -> {10}; + 10 -> {11}; + 11 -> {12} [color=green]; - subgraph cluster_4 { + subgraph cluster_5 { color=red - 11 [label="Enter function outerFunction" style="filled" fillcolor=red]; - subgraph cluster_5 { + 13 [label="Enter function outerFunction" style="filled" fillcolor=red]; + subgraph cluster_6 { color=blue - 12 [label="Enter block"]; - 13 [label="Exit block"]; + 14 [label="Enter block"]; + 15 [label="Exit block"]; } - 14 [label="Exit function outerFunction" style="filled" fillcolor=red]; + 16 [label="Exit function outerFunction" style="filled" fillcolor=red]; } - 11 -> {12}; - 12 -> {13}; 13 -> {14}; + 14 -> {15}; + 15 -> {16}; - subgraph cluster_6 { + subgraph cluster_7 { color=red - 15 [label="Enter class NestedClass" style="filled" fillcolor=red]; - subgraph cluster_7 { - color=blue - 16 [label="Enter property" style="filled" fillcolor=red]; - 17 [label="Const: Int(1)"]; - 18 [label="Exit property" style="filled" fillcolor=red]; - } + 17 [label="Enter class NestedClass" style="filled" fillcolor=red]; subgraph cluster_8 { color=blue - 19 [label="Enter property" style="filled" fillcolor=red]; - 20 [label="Access variable R|/OuterClass.NestedClass.nestedProperty|"]; - 21 [label="Exit property" style="filled" fillcolor=red]; + 18 [label="Enter property" style="filled" fillcolor=red]; + 19 [label="Const: Int(1)"]; + 20 [label="Exit property" style="filled" fillcolor=red]; } subgraph cluster_9 { color=blue - 22 [label="Enter function " style="filled" fillcolor=red]; - 23 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 24 [label="Exit function " style="filled" fillcolor=red]; + 21 [label="Enter property" style="filled" fillcolor=red]; + 22 [label="Access variable R|/OuterClass.NestedClass.nestedProperty|"]; + 23 [label="Exit property" style="filled" fillcolor=red]; } - 25 [label="Exit class NestedClass" style="filled" fillcolor=red]; - } - 15 -> {16} [color=green]; - 15 -> {25} [style=dotted]; - 15 -> {16 19 22} [style=dashed]; - 16 -> {17}; - 17 -> {18}; - 18 -> {19} [color=green]; - 19 -> {20}; - 20 -> {21}; - 21 -> {22} [color=green]; - 22 -> {23}; - 23 -> {24}; - 24 -> {25} [color=green]; - - subgraph cluster_10 { - color=red - 26 [label="Enter function nestedFUnction" style="filled" fillcolor=red]; - subgraph cluster_11 { + subgraph cluster_10 { color=blue - 27 [label="Enter block"]; - 28 [label="Exit block"]; + 24 [label="Enter function " style="filled" fillcolor=red]; + 25 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 26 [label="Exit function " style="filled" fillcolor=red]; } - 29 [label="Exit function nestedFUnction" style="filled" fillcolor=red]; + 27 [label="Exit class NestedClass" style="filled" fillcolor=red]; + } + 17 -> {18} [color=green]; + 17 -> {27} [style=dotted]; + 17 -> {18 21 24} [style=dashed]; + 18 -> {19}; + 19 -> {20}; + 20 -> {21} [color=green]; + 21 -> {22}; + 22 -> {23}; + 23 -> {24} [color=green]; + 24 -> {25}; + 25 -> {26}; + 26 -> {27} [color=green]; + + subgraph cluster_11 { + color=red + 28 [label="Enter function nestedFUnction" style="filled" fillcolor=red]; + subgraph cluster_12 { + color=blue + 29 [label="Enter block"]; + 30 [label="Exit block"]; + } + 31 [label="Exit function nestedFUnction" style="filled" fillcolor=red]; } - 26 -> {27}; - 27 -> {28}; 28 -> {29}; + 29 -> {30}; + 30 -> {31}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdaInConstructor.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdaInConstructor.dot index 648902e5294..677ee08df63 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdaInConstructor.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdaInConstructor.dot @@ -5,106 +5,113 @@ digraph postponedLambdaInConstructor_kt { subgraph cluster_0 { color=red - 0 [label="Enter class A" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter function " style="filled" fillcolor=red]; - 2 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 3 [label="Exit function " style="filled" fillcolor=red]; - } - 4 [label="Exit class A" style="filled" fillcolor=red]; + 0 [label="Enter file postponedLambdaInConstructor.kt" style="filled" fillcolor=red]; + 1 [label="Exit file postponedLambdaInConstructor.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; - 0 -> {4} [style=dotted]; - 0 -> {1} [style=dashed]; - 1 -> {2}; - 2 -> {3}; - 3 -> {4} [color=green]; - subgraph cluster_2 { + subgraph cluster_1 { color=red - 5 [label="Enter class B" style="filled" fillcolor=red]; - subgraph cluster_3 { + 2 [label="Enter class A" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 6 [label="Enter property" style="filled" fillcolor=red]; - 7 [label="Access variable R|/s|"]; - 8 [label="Exit property" style="filled" fillcolor=red]; + 3 [label="Enter function " style="filled" fillcolor=red]; + 4 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 5 [label="Exit function " style="filled" fillcolor=red]; } + 6 [label="Exit class A" style="filled" fillcolor=red]; + } + 2 -> {3} [color=green]; + 2 -> {6} [style=dotted]; + 2 -> {3} [style=dashed]; + 3 -> {4}; + 4 -> {5}; + 5 -> {6} [color=green]; + + subgraph cluster_3 { + color=red + 7 [label="Enter class B" style="filled" fillcolor=red]; subgraph cluster_4 { color=blue - 9 [label="Enter function " style="filled" fillcolor=red]; - 10 [label="Access variable R|/s|"]; - 11 [label="Postponed enter to lambda"]; - subgraph cluster_5 { - color=blue - 12 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_6 { - color=blue - 13 [label="Enter block"]; - 14 [label="Exit anonymous function expression"]; - subgraph cluster_7 { - color=blue - 15 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_8 { - color=blue - 16 [label="Enter block"]; - 17 [label="Access variable R|/it|"]; - 18 [label="Exit block"]; - } - 19 [label="Exit function " style="filled" fillcolor=red]; - } - 20 [label="Exit block"]; - } - 21 [label="Exit function " style="filled" fillcolor=red]; - } - 22 [label="Postponed exit from lambda"]; - 23 [label="Function call: R|/s|.R|kotlin/let| kotlin/String|>(...)" style="filled" fillcolor=yellow]; - 24 [label="Delegated constructor call: super(...)" style="filled" fillcolor=yellow]; - 25 [label="Exit function " style="filled" fillcolor=red]; + 8 [label="Enter property" style="filled" fillcolor=red]; + 9 [label="Access variable R|/s|"]; + 10 [label="Exit property" style="filled" fillcolor=red]; } - 26 [label="Exit class B" style="filled" fillcolor=red]; + subgraph cluster_5 { + color=blue + 11 [label="Enter function " style="filled" fillcolor=red]; + 12 [label="Access variable R|/s|"]; + 13 [label="Postponed enter to lambda"]; + subgraph cluster_6 { + color=blue + 14 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_7 { + color=blue + 15 [label="Enter block"]; + 16 [label="Exit anonymous function expression"]; + subgraph cluster_8 { + color=blue + 17 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_9 { + color=blue + 18 [label="Enter block"]; + 19 [label="Access variable R|/it|"]; + 20 [label="Exit block"]; + } + 21 [label="Exit function " style="filled" fillcolor=red]; + } + 22 [label="Exit block"]; + } + 23 [label="Exit function " style="filled" fillcolor=red]; + } + 24 [label="Postponed exit from lambda"]; + 25 [label="Function call: R|/s|.R|kotlin/let| kotlin/String|>(...)" style="filled" fillcolor=yellow]; + 26 [label="Delegated constructor call: super(...)" style="filled" fillcolor=yellow]; + 27 [label="Exit function " style="filled" fillcolor=red]; + } + 28 [label="Exit class B" style="filled" fillcolor=red]; } - 5 -> {6} [color=green]; - 5 -> {26} [style=dotted]; - 5 -> {6 9} [style=dashed]; - 6 -> {7}; - 7 -> {8}; - 8 -> {9} [color=green]; + 7 -> {8} [color=green]; + 7 -> {28} [style=dotted]; + 7 -> {8 11} [style=dashed]; + 8 -> {9}; 9 -> {10}; - 10 -> {11}; - 11 -> {12 23}; - 11 -> {22} [style=dotted]; - 11 -> {12} [style=dashed]; + 10 -> {11} [color=green]; + 11 -> {12}; 12 -> {13}; - 13 -> {14}; - 14 -> {15 20}; - 14 -> {15} [style=dashed]; + 13 -> {14 25}; + 13 -> {24} [style=dotted]; + 13 -> {14} [style=dashed]; + 14 -> {15}; 15 -> {16}; - 16 -> {17}; + 16 -> {17 22}; + 16 -> {17} [style=dashed]; 17 -> {18}; 18 -> {19}; + 19 -> {20}; 20 -> {21}; - 21 -> {22}; - 22 -> {23} [color=green]; - 22 -> {24} [color=red]; + 22 -> {23}; 23 -> {24}; - 24 -> {25}; - 25 -> {26} [color=green]; + 24 -> {25} [color=green]; + 24 -> {26} [color=red]; + 25 -> {26}; + 26 -> {27}; + 27 -> {28} [color=green]; - subgraph cluster_9 { + subgraph cluster_10 { color=red - 27 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_10 { + 29 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_11 { color=blue - 28 [label="Enter block"]; - 29 [label="Function call: this@R|/B|.R|/B.foo|()" style="filled" fillcolor=yellow]; - 30 [label="Exit block"]; + 30 [label="Enter block"]; + 31 [label="Function call: this@R|/B|.R|/B.foo|()" style="filled" fillcolor=yellow]; + 32 [label="Exit block"]; } - 31 [label="Exit function foo" style="filled" fillcolor=red]; + 33 [label="Exit function foo" style="filled" fillcolor=red]; } - 27 -> {28}; - 28 -> {29}; 29 -> {30}; 30 -> {31}; + 31 -> {32}; + 32 -> {33}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdaInReturn.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdaInReturn.dot index 016120eb4da..5dacd53e46d 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdaInReturn.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdaInReturn.dot @@ -5,14 +5,14 @@ digraph postponedLambdaInReturn_kt { subgraph cluster_0 { color=red - 0 [label="Enter class Lateinit" style="filled" fillcolor=red]; + 0 [label="Enter file postponedLambdaInReturn.kt" style="filled" fillcolor=red]; subgraph cluster_1 { color=blue - 1 [label="Enter function " style="filled" fillcolor=red]; - 2 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 3 [label="Exit function " style="filled" fillcolor=red]; + 1 [label="Enter property" style="filled" fillcolor=red]; + 2 [label="Const: Boolean(false)"]; + 3 [label="Exit property" style="filled" fillcolor=red]; } - 4 [label="Exit class Lateinit" style="filled" fillcolor=red]; + 4 [label="Exit file postponedLambdaInReturn.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; 0 -> {4} [style=dotted]; @@ -23,475 +23,484 @@ digraph postponedLambdaInReturn_kt { subgraph cluster_2 { color=red - 5 [label="Enter function build" style="filled" fillcolor=red]; + 5 [label="Enter class Lateinit" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue - 6 [label="Enter block"]; - subgraph cluster_4 { - color=blue - 7 [label="Enter block"]; - 8 [label="Exit block"]; - } - 9 [label="Function call: R|/Lateinit.Lateinit|()" style="filled" fillcolor=yellow]; - 10 [label="Access variable R|/builder|"]; - 11 [label="Function call: R|/Lateinit.Lateinit|().R|kotlin/apply||>(...)" style="filled" fillcolor=yellow]; - 12 [label="Access variable R|SubstitutionOverride|"]; - 13 [label="Jump: ^build R|/Lateinit.Lateinit|().R|kotlin/apply||>(R|/builder|).R|SubstitutionOverride|"]; - 14 [label="Stub" style="filled" fillcolor=gray]; - 15 [label="Exit block" style="filled" fillcolor=gray]; + 6 [label="Enter function " style="filled" fillcolor=red]; + 7 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 8 [label="Exit function " style="filled" fillcolor=red]; } - 16 [label="Exit function build" style="filled" fillcolor=red]; + 9 [label="Exit class Lateinit" style="filled" fillcolor=red]; } - 5 -> {6}; + 5 -> {6} [color=green]; + 5 -> {9} [style=dotted]; + 5 -> {6} [style=dashed]; 6 -> {7}; 7 -> {8}; - 8 -> {9}; - 9 -> {10}; + 8 -> {9} [color=green]; + + subgraph cluster_4 { + color=red + 10 [label="Enter function build" style="filled" fillcolor=red]; + subgraph cluster_5 { + color=blue + 11 [label="Enter block"]; + subgraph cluster_6 { + color=blue + 12 [label="Enter block"]; + 13 [label="Exit block"]; + } + 14 [label="Function call: R|/Lateinit.Lateinit|()" style="filled" fillcolor=yellow]; + 15 [label="Access variable R|/builder|"]; + 16 [label="Function call: R|/Lateinit.Lateinit|().R|kotlin/apply||>(...)" style="filled" fillcolor=yellow]; + 17 [label="Access variable R|SubstitutionOverride|"]; + 18 [label="Jump: ^build R|/Lateinit.Lateinit|().R|kotlin/apply||>(R|/builder|).R|SubstitutionOverride|"]; + 19 [label="Stub" style="filled" fillcolor=gray]; + 20 [label="Exit block" style="filled" fillcolor=gray]; + } + 21 [label="Exit function build" style="filled" fillcolor=red]; + } 10 -> {11}; 11 -> {12}; 12 -> {13}; - 13 -> {16}; - 13 -> {14} [style=dotted]; - 14 -> {15} [style=dotted]; - 15 -> {16} [style=dotted]; - - subgraph cluster_5 { - color=red - 17 [label="Enter property" style="filled" fillcolor=red]; - 18 [label="Const: Boolean(false)"]; - 19 [label="Exit property" style="filled" fillcolor=red]; - } + 13 -> {14}; + 14 -> {15}; + 15 -> {16}; + 16 -> {17}; 17 -> {18}; - 18 -> {19}; + 18 -> {21}; + 18 -> {19} [style=dotted]; + 19 -> {20} [style=dotted]; + 20 -> {21} [style=dotted]; - subgraph cluster_6 { + subgraph cluster_7 { color=red - 20 [label="Enter function test1" style="filled" fillcolor=red]; - subgraph cluster_7 { + 22 [label="Enter function test1" style="filled" fillcolor=red]; + subgraph cluster_8 { color=blue - 21 [label="Enter block"]; - 22 [label="Const: Null(null)"]; - 23 [label="Variable declaration: lvar y: R|kotlin/String?|"]; - 24 [label="Postponed enter to lambda"]; - subgraph cluster_8 { + 23 [label="Enter block"]; + 24 [label="Const: Null(null)"]; + 25 [label="Variable declaration: lvar y: R|kotlin/String?|"]; + 26 [label="Postponed enter to lambda"]; + subgraph cluster_9 { color=blue - 25 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_9 { + 27 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_10 { color=blue - 26 [label="Enter block"]; - subgraph cluster_10 { + 28 [label="Enter block"]; + subgraph cluster_11 { color=blue - 27 [label="Enter when"]; - subgraph cluster_11 { - color=blue - 28 [label="Enter when branch condition "]; - 29 [label="Access variable R|/p|"]; - 30 [label="Exit when branch condition"]; - } + 29 [label="Enter when"]; subgraph cluster_12 { color=blue - 31 [label="Enter when branch condition else"]; + 30 [label="Enter when branch condition "]; + 31 [label="Access variable R|/p|"]; 32 [label="Exit when branch condition"]; } - 33 [label="Enter when branch result"]; subgraph cluster_13 { color=blue - 34 [label="Enter block"]; - 35 [label="Const: String()"]; - 36 [label="Jump: ^@run String()"]; - 37 [label="Stub" style="filled" fillcolor=gray]; - 38 [label="Exit block" style="filled" fillcolor=gray]; + 33 [label="Enter when branch condition else"]; + 34 [label="Exit when branch condition"]; } - 39 [label="Exit when branch result" style="filled" fillcolor=gray]; - 40 [label="Enter when branch result"]; + 35 [label="Enter when branch result"]; subgraph cluster_14 { color=blue - 41 [label="Enter block"]; - 42 [label="Postponed enter to lambda"]; - subgraph cluster_15 { + 36 [label="Enter block"]; + 37 [label="Const: String()"]; + 38 [label="Jump: ^@run String()"]; + 39 [label="Stub" style="filled" fillcolor=gray]; + 40 [label="Exit block" style="filled" fillcolor=gray]; + } + 41 [label="Exit when branch result" style="filled" fillcolor=gray]; + 42 [label="Enter when branch result"]; + subgraph cluster_15 { + color=blue + 43 [label="Enter block"]; + 44 [label="Postponed enter to lambda"]; + subgraph cluster_16 { color=blue - 43 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_16 { + 45 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_17 { color=blue - 44 [label="Enter block"]; - 45 [label="Access variable R|/y|"]; - 46 [label="Type operator: (R|/y| as R|kotlin/String|)"]; - 47 [label="Const: String(...)"]; - 48 [label="Assignment: R|SubstitutionOverride|"]; - 49 [label="Exit block"]; + 46 [label="Enter block"]; + 47 [label="Access variable R|/y|"]; + 48 [label="Type operator: (R|/y| as R|kotlin/String|)"]; + 49 [label="Const: String(...)"]; + 50 [label="Assignment: R|SubstitutionOverride|"]; + 51 [label="Exit block"]; } - 50 [label="Exit function " style="filled" fillcolor=red]; + 52 [label="Exit function " style="filled" fillcolor=red]; } - 51 [label="Postponed exit from lambda"]; - 52 [label="Function call: R|/build|(...)" style="filled" fillcolor=yellow]; - 53 [label="Jump: ^@run R|/build|( = build@fun R|Lateinit|.(): R|kotlin/Unit| { + 53 [label="Postponed exit from lambda"]; + 54 [label="Function call: R|/build|(...)" style="filled" fillcolor=yellow]; + 55 [label="Jump: ^@run R|/build|( = build@fun R|Lateinit|.(): R|kotlin/Unit| { (R|/y| as R|kotlin/String|) this@R|special/anonymous|.R|SubstitutionOverride| = String(...) } )"]; - 54 [label="Stub" style="filled" fillcolor=gray]; - 55 [label="Exit block" style="filled" fillcolor=gray]; + 56 [label="Stub" style="filled" fillcolor=gray]; + 57 [label="Exit block" style="filled" fillcolor=gray]; } - 56 [label="Exit when branch result" style="filled" fillcolor=gray]; - 57 [label="Exit when" style="filled" fillcolor=gray]; + 58 [label="Exit when branch result" style="filled" fillcolor=gray]; + 59 [label="Exit when" style="filled" fillcolor=gray]; } - 58 [label="Exit block" style="filled" fillcolor=gray]; + 60 [label="Exit block" style="filled" fillcolor=gray]; } - 59 [label="Exit function " style="filled" fillcolor=red]; + 61 [label="Exit function " style="filled" fillcolor=red]; } - 60 [label="Postponed exit from lambda"]; - 61 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 62 [label="Variable declaration: lval x: R|kotlin/String|"]; - 63 [label="Access variable R|/y|"]; - 64 [label="Access variable R|kotlin/String.length#|"]; - 65 [label="Exit block"]; + 62 [label="Postponed exit from lambda"]; + 63 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 64 [label="Variable declaration: lval x: R|kotlin/String|"]; + 65 [label="Access variable R|/y|"]; + 66 [label="Access variable R|kotlin/String.length#|"]; + 67 [label="Exit block"]; } - 66 [label="Exit function test1" style="filled" fillcolor=red]; + 68 [label="Exit function test1" style="filled" fillcolor=red]; } - 20 -> {21}; - 21 -> {22}; 22 -> {23}; 23 -> {24}; - 24 -> {25 61}; - 24 -> {60} [style=dotted]; - 24 -> {25} [style=dashed]; + 24 -> {25}; 25 -> {26}; - 26 -> {27}; + 26 -> {27 63}; + 26 -> {62} [style=dotted]; + 26 -> {27} [style=dashed]; 27 -> {28}; 28 -> {29}; 29 -> {30}; - 30 -> {31 40}; + 30 -> {31}; 31 -> {32}; - 32 -> {33}; + 32 -> {33 42}; 33 -> {34}; 34 -> {35}; 35 -> {36}; - 36 -> {59}; - 36 -> {37} [style=dotted]; - 37 -> {38} [style=dotted]; + 36 -> {37}; + 37 -> {38}; + 38 -> {61}; 38 -> {39} [style=dotted]; - 39 -> {57} [style=dotted]; - 40 -> {41}; - 41 -> {42}; - 42 -> {43 52}; - 42 -> {51} [style=dotted]; - 42 -> {43} [style=dashed]; + 39 -> {40} [style=dotted]; + 40 -> {41} [style=dotted]; + 41 -> {59} [style=dotted]; + 42 -> {43}; 43 -> {44}; - 44 -> {45}; + 44 -> {45 54}; + 44 -> {53} [style=dotted]; + 44 -> {45} [style=dashed]; 45 -> {46}; 46 -> {47}; 47 -> {48}; 48 -> {49}; 49 -> {50}; 50 -> {51}; - 51 -> {52} [color=green]; + 51 -> {52}; 52 -> {53}; - 53 -> {59}; - 53 -> {54} [style=dotted]; - 54 -> {55} [style=dotted]; + 53 -> {54} [color=green]; + 54 -> {55}; + 55 -> {61}; 55 -> {56} [style=dotted]; 56 -> {57} [style=dotted]; 57 -> {58} [style=dotted]; 58 -> {59} [style=dotted]; - 59 -> {60}; - 60 -> {61}; + 59 -> {60} [style=dotted]; + 60 -> {61} [style=dotted]; 61 -> {62}; 62 -> {63}; 63 -> {64}; 64 -> {65}; 65 -> {66}; + 66 -> {67}; + 67 -> {68}; - subgraph cluster_17 { + subgraph cluster_18 { color=red - 67 [label="Enter function test2" style="filled" fillcolor=red]; - subgraph cluster_18 { + 69 [label="Enter function test2" style="filled" fillcolor=red]; + subgraph cluster_19 { color=blue - 68 [label="Enter block"]; - 69 [label="Postponed enter to lambda"]; - subgraph cluster_19 { + 70 [label="Enter block"]; + 71 [label="Postponed enter to lambda"]; + subgraph cluster_20 { color=blue - 70 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_20 { + 72 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_21 { color=blue - 71 [label="Enter block"]; - subgraph cluster_21 { + 73 [label="Enter block"]; + subgraph cluster_22 { color=blue - 72 [label="Enter while loop"]; - subgraph cluster_22 { - color=blue - 73 [label="Enter loop condition"]; - 74 [label="Const: Boolean(true)"]; - 75 [label="Exit loop condition"]; - } + 74 [label="Enter while loop"]; subgraph cluster_23 { color=blue - 76 [label="Enter loop block"]; - subgraph cluster_24 { + 75 [label="Enter loop condition"]; + 76 [label="Const: Boolean(true)"]; + 77 [label="Exit loop condition"]; + } + subgraph cluster_24 { + color=blue + 78 [label="Enter loop block"]; + subgraph cluster_25 { color=blue - 77 [label="Enter block"]; - subgraph cluster_25 { + 79 [label="Enter block"]; + subgraph cluster_26 { color=blue - 78 [label="Try expression enter"]; - subgraph cluster_26 { + 80 [label="Try expression enter"]; + subgraph cluster_27 { color=blue - 79 [label="Try main block enter"]; - subgraph cluster_27 { + 81 [label="Try main block enter"]; + subgraph cluster_28 { color=blue - 80 [label="Enter block"]; - 81 [label="Postponed enter to lambda"]; - subgraph cluster_28 { + 82 [label="Enter block"]; + 83 [label="Postponed enter to lambda"]; + subgraph cluster_29 { color=blue - 82 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_29 { + 84 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_30 { color=blue - 83 [label="Enter block"]; - 84 [label="Const: String(...)"]; - 85 [label="Assignment: R|SubstitutionOverride|"]; - 86 [label="Exit block"]; + 85 [label="Enter block"]; + 86 [label="Const: String(...)"]; + 87 [label="Assignment: R|SubstitutionOverride|"]; + 88 [label="Exit block"]; } - 87 [label="Exit function " style="filled" fillcolor=red]; + 89 [label="Exit function " style="filled" fillcolor=red]; } - 88 [label="Postponed exit from lambda"]; - 89 [label="Function call: R|/build|(...)" style="filled" fillcolor=yellow]; - 90 [label="Jump: ^@run R|/build|( = build@fun R|Lateinit|.(): R|kotlin/Unit| { + 90 [label="Postponed exit from lambda"]; + 91 [label="Function call: R|/build|(...)" style="filled" fillcolor=yellow]; + 92 [label="Jump: ^@run R|/build|( = build@fun R|Lateinit|.(): R|kotlin/Unit| { this@R|special/anonymous|.R|SubstitutionOverride| = String(...) } )"]; - 91 [label="Stub" style="filled" fillcolor=gray]; - 92 [label="Exit block" style="filled" fillcolor=gray]; + 93 [label="Stub" style="filled" fillcolor=gray]; + 94 [label="Exit block" style="filled" fillcolor=gray]; } - 93 [label="Try main block exit" style="filled" fillcolor=gray]; + 95 [label="Try main block exit" style="filled" fillcolor=gray]; } - subgraph cluster_30 { + subgraph cluster_31 { color=blue - 94 [label="Catch enter"]; - 95 [label="Variable declaration: e: R|kotlin/Throwable|"]; - subgraph cluster_31 { + 96 [label="Catch enter"]; + 97 [label="Variable declaration: e: R|kotlin/Throwable|"]; + subgraph cluster_32 { color=blue - 96 [label="Enter block"]; - 97 [label="Exit block"]; + 98 [label="Enter block"]; + 99 [label="Exit block"]; } - 98 [label="Catch exit"]; + 100 [label="Catch exit"]; } - 99 [label="Try expression exit"]; + 101 [label="Try expression exit"]; } - 100 [label="Exit block"]; + 102 [label="Exit block"]; } - 101 [label="Exit loop block"]; + 103 [label="Exit loop block"]; } - 102 [label="Exit while loop" style="filled" fillcolor=gray]; + 104 [label="Exit while loop" style="filled" fillcolor=gray]; } - 103 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=gray]; - 104 [label="Throw: throw R|java/lang/Exception.Exception|()" style="filled" fillcolor=gray]; - 105 [label="Stub" style="filled" fillcolor=gray]; - 106 [label="Exit block" style="filled" fillcolor=gray]; + 105 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=gray]; + 106 [label="Throw: throw R|java/lang/Exception.Exception|()" style="filled" fillcolor=gray]; + 107 [label="Stub" style="filled" fillcolor=gray]; + 108 [label="Exit block" style="filled" fillcolor=gray]; } - 107 [label="Exit function " style="filled" fillcolor=red]; + 109 [label="Exit function " style="filled" fillcolor=red]; } - 108 [label="Postponed exit from lambda"]; - 109 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 110 [label="Variable declaration: lval x: R|kotlin/String|"]; - 111 [label="Access variable R|/x|"]; - 112 [label="Access variable R|kotlin/String.length|"]; - 113 [label="Exit block"]; + 110 [label="Postponed exit from lambda"]; + 111 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 112 [label="Variable declaration: lval x: R|kotlin/String|"]; + 113 [label="Access variable R|/x|"]; + 114 [label="Access variable R|kotlin/String.length|"]; + 115 [label="Exit block"]; } - 114 [label="Exit function test2" style="filled" fillcolor=red]; + 116 [label="Exit function test2" style="filled" fillcolor=red]; } - 67 -> {68}; - 68 -> {69}; - 69 -> {70 109}; - 69 -> {108} [style=dotted]; - 69 -> {70} [style=dashed]; + 69 -> {70}; 70 -> {71}; - 71 -> {72}; + 71 -> {72 111}; + 71 -> {110} [style=dotted]; + 71 -> {72} [style=dashed]; 72 -> {73}; 73 -> {74}; 74 -> {75}; 75 -> {76}; - 75 -> {102} [style=dotted]; 76 -> {77}; 77 -> {78}; - 78 -> {79 94}; + 77 -> {104} [style=dotted]; + 78 -> {79}; 79 -> {80}; - 80 -> {81}; - 81 -> {82 89}; - 81 -> {88} [style=dotted]; - 81 -> {82} [style=dashed]; + 80 -> {81 96}; + 81 -> {82}; 82 -> {83}; - 83 -> {84}; + 83 -> {84 91}; + 83 -> {90} [style=dotted]; + 83 -> {84} [style=dashed]; 84 -> {85}; 85 -> {86}; 86 -> {87}; 87 -> {88}; - 88 -> {89} [color=green]; - 89 -> {90 94}; - 90 -> {107}; - 90 -> {91} [style=dotted]; - 91 -> {92} [style=dotted]; + 88 -> {89}; + 89 -> {90}; + 90 -> {91} [color=green]; + 91 -> {92 96}; + 92 -> {109}; 92 -> {93} [style=dotted]; - 93 -> {94 99} [style=dotted]; - 94 -> {95}; - 95 -> {96}; + 93 -> {94} [style=dotted]; + 94 -> {95} [style=dotted]; + 95 -> {96 101} [style=dotted]; 96 -> {97}; 97 -> {98}; 98 -> {99}; 99 -> {100}; 100 -> {101}; - 101 -> {73} [color=green style=dashed]; - 102 -> {103} [style=dotted]; - 103 -> {104} [style=dotted]; + 101 -> {102}; + 102 -> {103}; + 103 -> {75} [color=green style=dashed]; 104 -> {105} [style=dotted]; 105 -> {106} [style=dotted]; 106 -> {107} [style=dotted]; - 107 -> {108}; - 108 -> {109}; + 107 -> {108} [style=dotted]; + 108 -> {109} [style=dotted]; 109 -> {110}; 110 -> {111}; 111 -> {112}; 112 -> {113}; 113 -> {114}; + 114 -> {115}; + 115 -> {116}; - subgraph cluster_32 { + subgraph cluster_33 { color=red - 115 [label="Enter function test3" style="filled" fillcolor=red]; - subgraph cluster_33 { + 117 [label="Enter function test3" style="filled" fillcolor=red]; + subgraph cluster_34 { color=blue - 116 [label="Enter block"]; - 117 [label="Variable declaration: lvar y: R|kotlin/String?|"]; - 118 [label="Const: String()"]; - 119 [label="Assignment: R|/y|"]; - 120 [label="Postponed enter to lambda"]; - subgraph cluster_34 { + 118 [label="Enter block"]; + 119 [label="Variable declaration: lvar y: R|kotlin/String?|"]; + 120 [label="Const: String()"]; + 121 [label="Assignment: R|/y|"]; + 122 [label="Postponed enter to lambda"]; + subgraph cluster_35 { color=blue - 121 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_35 { + 123 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_36 { color=blue - 122 [label="Enter block"]; - subgraph cluster_36 { + 124 [label="Enter block"]; + subgraph cluster_37 { color=blue - 123 [label="Enter when"]; - subgraph cluster_37 { - color=blue - 124 [label="Enter when branch condition "]; - 125 [label="Access variable R|/p|"]; - 126 [label="Function call: R|/p|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 127 [label="Exit when branch condition"]; - } + 125 [label="Enter when"]; subgraph cluster_38 { color=blue - 128 [label="Enter when branch condition else"]; + 126 [label="Enter when branch condition "]; + 127 [label="Access variable R|/p|"]; + 128 [label="Function call: R|/p|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; 129 [label="Exit when branch condition"]; } - 130 [label="Enter when branch result"]; subgraph cluster_39 { color=blue - 131 [label="Enter block"]; - 132 [label="Const: String()"]; - 133 [label="Jump: ^@run String()"]; - 134 [label="Stub" style="filled" fillcolor=gray]; - 135 [label="Exit block" style="filled" fillcolor=gray]; + 130 [label="Enter when branch condition else"]; + 131 [label="Exit when branch condition"]; } - 136 [label="Exit when branch result" style="filled" fillcolor=gray]; - 137 [label="Enter when branch result"]; + 132 [label="Enter when branch result"]; subgraph cluster_40 { color=blue - 138 [label="Enter block"]; - 139 [label="Postponed enter to lambda"]; - subgraph cluster_41 { + 133 [label="Enter block"]; + 134 [label="Const: String()"]; + 135 [label="Jump: ^@run String()"]; + 136 [label="Stub" style="filled" fillcolor=gray]; + 137 [label="Exit block" style="filled" fillcolor=gray]; + } + 138 [label="Exit when branch result" style="filled" fillcolor=gray]; + 139 [label="Enter when branch result"]; + subgraph cluster_41 { + color=blue + 140 [label="Enter block"]; + 141 [label="Postponed enter to lambda"]; + subgraph cluster_42 { color=blue - 140 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_42 { + 142 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_43 { color=blue - 141 [label="Enter block"]; - 142 [label="Const: Null(null)"]; - 143 [label="Assignment: R|/y|"]; - 144 [label="Const: String(...)"]; - 145 [label="Assignment: R|SubstitutionOverride|"]; - 146 [label="Exit block"]; + 143 [label="Enter block"]; + 144 [label="Const: Null(null)"]; + 145 [label="Assignment: R|/y|"]; + 146 [label="Const: String(...)"]; + 147 [label="Assignment: R|SubstitutionOverride|"]; + 148 [label="Exit block"]; } - 147 [label="Exit function " style="filled" fillcolor=red]; + 149 [label="Exit function " style="filled" fillcolor=red]; } - 148 [label="Postponed exit from lambda"]; - 149 [label="Function call: R|/build|(...)" style="filled" fillcolor=yellow]; - 150 [label="Jump: ^@run R|/build|( = build@fun R|Lateinit|.(): R|kotlin/Unit| { + 150 [label="Postponed exit from lambda"]; + 151 [label="Function call: R|/build|(...)" style="filled" fillcolor=yellow]; + 152 [label="Jump: ^@run R|/build|( = build@fun R|Lateinit|.(): R|kotlin/Unit| { R|/y| = Null(null) this@R|special/anonymous|.R|SubstitutionOverride| = String(...) } )"]; - 151 [label="Stub" style="filled" fillcolor=gray]; - 152 [label="Exit block" style="filled" fillcolor=gray]; + 153 [label="Stub" style="filled" fillcolor=gray]; + 154 [label="Exit block" style="filled" fillcolor=gray]; } - 153 [label="Exit when branch result" style="filled" fillcolor=gray]; - 154 [label="Exit when" style="filled" fillcolor=gray]; + 155 [label="Exit when branch result" style="filled" fillcolor=gray]; + 156 [label="Exit when" style="filled" fillcolor=gray]; } - 155 [label="Exit block" style="filled" fillcolor=gray]; + 157 [label="Exit block" style="filled" fillcolor=gray]; } - 156 [label="Exit function " style="filled" fillcolor=red]; + 158 [label="Exit function " style="filled" fillcolor=red]; } - 157 [label="Postponed exit from lambda"]; - 158 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 159 [label="Variable declaration: lval x: R|kotlin/String|"]; - 160 [label="Access variable R|/y|"]; - 161 [label="Smart cast: R|/y|"]; - 162 [label="Access variable R|kotlin/String.length|"]; - 163 [label="Exit block"]; + 159 [label="Postponed exit from lambda"]; + 160 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 161 [label="Variable declaration: lval x: R|kotlin/String|"]; + 162 [label="Access variable R|/y|"]; + 163 [label="Smart cast: R|/y|"]; + 164 [label="Access variable R|kotlin/String.length|"]; + 165 [label="Exit block"]; } - 164 [label="Exit function test3" style="filled" fillcolor=red]; + 166 [label="Exit function test3" style="filled" fillcolor=red]; } - 115 -> {116}; - 116 -> {117}; 117 -> {118}; 118 -> {119}; 119 -> {120}; - 120 -> {121 158}; - 120 -> {157} [style=dotted]; - 120 -> {121} [style=dashed]; + 120 -> {121}; 121 -> {122}; - 122 -> {123}; + 122 -> {123 160}; + 122 -> {159} [style=dotted]; + 122 -> {123} [style=dashed]; 123 -> {124}; 124 -> {125}; 125 -> {126}; 126 -> {127}; - 127 -> {128 137}; + 127 -> {128}; 128 -> {129}; - 129 -> {130}; + 129 -> {130 139}; 130 -> {131}; 131 -> {132}; 132 -> {133}; - 133 -> {156}; - 133 -> {134} [style=dotted]; - 134 -> {135} [style=dotted]; + 133 -> {134}; + 134 -> {135}; + 135 -> {158}; 135 -> {136} [style=dotted]; - 136 -> {154} [style=dotted]; - 137 -> {138}; - 138 -> {139}; - 139 -> {140 149}; - 139 -> {148} [style=dotted]; - 139 -> {140} [style=dashed]; + 136 -> {137} [style=dotted]; + 137 -> {138} [style=dotted]; + 138 -> {156} [style=dotted]; + 139 -> {140}; 140 -> {141}; - 141 -> {142}; + 141 -> {142 151}; + 141 -> {150} [style=dotted]; + 141 -> {142} [style=dashed]; 142 -> {143}; 143 -> {144}; 144 -> {145}; 145 -> {146}; 146 -> {147}; 147 -> {148}; - 148 -> {149} [color=green]; + 148 -> {149}; 149 -> {150}; - 150 -> {156}; - 150 -> {151} [style=dotted]; - 151 -> {152} [style=dotted]; + 150 -> {151} [color=green]; + 151 -> {152}; + 152 -> {158}; 152 -> {153} [style=dotted]; 153 -> {154} [style=dotted]; 154 -> {155} [style=dotted]; 155 -> {156} [style=dotted]; - 156 -> {157}; - 157 -> {158}; + 156 -> {157} [style=dotted]; + 157 -> {158} [style=dotted]; 158 -> {159}; 159 -> {160}; 160 -> {161}; 161 -> {162}; 162 -> {163}; 163 -> {164}; + 164 -> {165}; + 165 -> {166}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdas.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdas.dot index c74b5ebcb07..834ed400386 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdas.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/postponedLambdas.dot @@ -5,56 +5,63 @@ digraph postponedLambdas_kt { subgraph cluster_0 { color=red - 0 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter block"]; - 2 [label="Exit block"]; - } - 3 [label="Exit function foo" style="filled" fillcolor=red]; + 0 [label="Enter file postponedLambdas.kt" style="filled" fillcolor=red]; + 1 [label="Exit file postponedLambdas.kt" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; - 2 -> {3}; + 0 -> {1} [color=green]; - subgraph cluster_2 { + subgraph cluster_1 { color=red - 4 [label="Enter function test" style="filled" fillcolor=red]; - subgraph cluster_3 { + 2 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 5 [label="Enter block"]; - 6 [label="Access variable R|/a|"]; - 7 [label="Access variable R|/b|"]; - 8 [label="Postponed enter to lambda"]; - subgraph cluster_4 { - color=blue - 9 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_5 { - color=blue - 10 [label="Enter block"]; - 11 [label="Const: String()"]; - 12 [label="Exit block"]; - } - 13 [label="Exit function " style="filled" fillcolor=red]; - } - 14 [label="Postponed exit from lambda"]; - 15 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; - 16 [label="Exit block"]; + 3 [label="Enter block"]; + 4 [label="Exit block"]; } - 17 [label="Exit function test" style="filled" fillcolor=red]; + 5 [label="Exit function foo" style="filled" fillcolor=red]; } + 2 -> {3}; + 3 -> {4}; 4 -> {5}; - 5 -> {6}; + + subgraph cluster_3 { + color=red + 6 [label="Enter function test" style="filled" fillcolor=red]; + subgraph cluster_4 { + color=blue + 7 [label="Enter block"]; + 8 [label="Access variable R|/a|"]; + 9 [label="Access variable R|/b|"]; + 10 [label="Postponed enter to lambda"]; + subgraph cluster_5 { + color=blue + 11 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_6 { + color=blue + 12 [label="Enter block"]; + 13 [label="Const: String()"]; + 14 [label="Exit block"]; + } + 15 [label="Exit function " style="filled" fillcolor=red]; + } + 16 [label="Postponed exit from lambda"]; + 17 [label="Function call: R|/foo|(...)" style="filled" fillcolor=yellow]; + 18 [label="Exit block"]; + } + 19 [label="Exit function test" style="filled" fillcolor=red]; + } 6 -> {7}; 7 -> {8}; - 8 -> {9 14 15}; - 8 -> {9} [style=dashed]; + 8 -> {9}; 9 -> {10}; - 10 -> {11}; + 10 -> {11 16 17}; + 10 -> {11} [style=dashed]; 11 -> {12}; 12 -> {13}; + 13 -> {14}; 14 -> {15}; - 15 -> {16}; 16 -> {17}; + 17 -> {18}; + 18 -> {19}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/propertiesAndInitBlocks.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/propertiesAndInitBlocks.dot index 06734c403af..933407d250a 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/propertiesAndInitBlocks.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/propertiesAndInitBlocks.dot @@ -5,304 +5,313 @@ digraph propertiesAndInitBlocks_kt { subgraph cluster_0 { color=red - 0 [label="Enter function run" style="filled" fillcolor=red]; + 0 [label="Enter file propertiesAndInitBlocks.kt" style="filled" fillcolor=red]; subgraph cluster_1 { color=blue - 1 [label="Enter block"]; - 2 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 3 [label="Exit block"]; + 1 [label="Enter property" style="filled" fillcolor=red]; + 2 [label="Const: Int(1)"]; + 3 [label="Exit property" style="filled" fillcolor=red]; } - 4 [label="Exit function run" style="filled" fillcolor=red]; + subgraph cluster_2 { + color=blue + 4 [label="Enter property" style="filled" fillcolor=red]; + 5 [label="Const: Int(1)"]; + 6 [label="Exit property" style="filled" fillcolor=red]; + } + subgraph cluster_3 { + color=blue + 7 [label="Enter property" style="filled" fillcolor=red]; + 8 [label="Postponed enter to lambda"]; + subgraph cluster_4 { + color=blue + 9 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_5 { + color=blue + 10 [label="Enter block"]; + 11 [label="Local function declaration"]; + 12 [label="Local class declaration"]; + 13 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; + 14 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 15 [label="Stub" style="filled" fillcolor=gray]; + 16 [label="Exit block" style="filled" fillcolor=gray]; + } + 17 [label="Exit function " style="filled" fillcolor=gray]; + } + subgraph cluster_6 { + color=blue + 18 [label="Enter class InitializerLocalClass" style="filled" fillcolor=red]; + subgraph cluster_7 { + color=blue + 19 [label="Enter init block" style="filled" fillcolor=red]; + subgraph cluster_8 { + color=blue + 20 [label="Enter block"]; + 21 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; + 22 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 23 [label="Stub" style="filled" fillcolor=gray]; + 24 [label="Const: Int(1)" style="filled" fillcolor=gray]; + 25 [label="Exit block" style="filled" fillcolor=gray]; + } + 26 [label="Exit init block" style="filled" fillcolor=gray]; + } + subgraph cluster_9 { + color=blue + 27 [label="Enter function " style="filled" fillcolor=gray]; + 28 [label="Delegated constructor call: super()" style="filled" fillcolor=gray]; + 29 [label="Exit function " style="filled" fillcolor=gray]; + } + 30 [label="Exit class InitializerLocalClass" style="filled" fillcolor=gray]; + } + subgraph cluster_10 { + color=blue + 31 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_11 { + color=blue + 32 [label="Enter block"]; + 33 [label="Const: Int(1)"]; + 34 [label="Const: Int(1)"]; + 35 [label="Function call: Int(1).R|kotlin/Int.plus|(...)" style="filled" fillcolor=yellow]; + 36 [label="Variable declaration: lval c: R|kotlin/Int|"]; + 37 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; + 38 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 39 [label="Stub" style="filled" fillcolor=gray]; + 40 [label="Exit block" style="filled" fillcolor=gray]; + } + 41 [label="Exit function foo" style="filled" fillcolor=gray]; + } + 42 [label="Postponed exit from lambda"]; + 43 [label="Function call: R|/run|(...)" style="filled" fillcolor=yellow]; + 44 [label="Exit property" style="filled" fillcolor=red]; + } + subgraph cluster_12 { + color=blue + 45 [label="Enter property" style="filled" fillcolor=red]; + subgraph cluster_13 { + color=blue + 46 [label="Try expression enter"]; + subgraph cluster_14 { + color=blue + 47 [label="Try main block enter"]; + subgraph cluster_15 { + color=blue + 48 [label="Enter block"]; + 49 [label="Const: Int(1)"]; + 50 [label="Exit block"]; + } + 51 [label="Try main block exit"]; + } + subgraph cluster_16 { + color=blue + 52 [label="Catch enter"]; + 53 [label="Variable declaration: e: R|kotlin/Exception|"]; + subgraph cluster_17 { + color=blue + 54 [label="Enter block"]; + 55 [label="Const: Int(2)"]; + 56 [label="Exit block"]; + } + 57 [label="Catch exit"]; + } + subgraph cluster_18 { + color=blue + 58 [label="Enter finally"]; + subgraph cluster_19 { + color=blue + 59 [label="Enter block"]; + 60 [label="Const: Int(0)"]; + 61 [label="Exit block"]; + } + 62 [label="Exit finally"]; + } + 63 [label="Try expression exit"]; + } + 64 [label="Exit property" style="filled" fillcolor=red]; + } + 65 [label="Exit file propertiesAndInitBlocks.kt" style="filled" fillcolor=red]; } - 0 -> {1}; + 0 -> {1} [color=green]; + 0 -> {65} [style=dotted]; + 0 -> {1 4 7 45} [style=dashed]; 1 -> {2}; 2 -> {3}; - 3 -> {4}; - - subgraph cluster_2 { - color=red - 5 [label="Enter property" style="filled" fillcolor=red]; - 6 [label="Const: Int(1)"]; - 7 [label="Exit property" style="filled" fillcolor=red]; - } + 3 -> {4} [color=green]; + 4 -> {5}; 5 -> {6}; - 6 -> {7}; - - subgraph cluster_3 { - color=red - 8 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_4 { - color=blue - 9 [label="Enter block"]; - 10 [label="Const: Int(1)"]; - 11 [label="Jump: ^ Int(1)"]; - 12 [label="Stub" style="filled" fillcolor=gray]; - 13 [label="Exit block" style="filled" fillcolor=gray]; - } - 14 [label="Exit function " style="filled" fillcolor=red]; - } - 8 -> {9}; + 6 -> {7} [color=green]; + 7 -> {8}; + 8 -> {9 42 43}; + 8 -> {9} [style=dashed]; 9 -> {10}; 10 -> {11}; - 11 -> {14}; - 11 -> {12} [style=dotted]; - 12 -> {13} [style=dotted]; - 13 -> {14} [style=dotted]; - - subgraph cluster_5 { - color=red - 15 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_6 { - color=blue - 16 [label="Enter block"]; - 17 [label="Const: Int(1)"]; - 18 [label="Assignment: F|/x2|"]; - 19 [label="Exit block"]; - } - 20 [label="Exit function " style="filled" fillcolor=red]; - } - 15 -> {16}; - 16 -> {17}; - 17 -> {18}; + 11 -> {12 31}; + 11 -> {31} [style=dashed]; + 12 -> {13 18}; + 12 -> {18} [style=dashed]; + 13 -> {14}; + 14 -> {15} [style=dotted]; + 15 -> {16} [style=dotted]; + 16 -> {17} [style=dotted]; + 17 -> {42} [style=dotted]; 18 -> {19}; + 18 -> {27} [color=red]; + 18 -> {30} [style=dotted]; + 18 -> {19 27} [style=dashed]; 19 -> {20}; - - subgraph cluster_7 { - color=red - 21 [label="Enter property" style="filled" fillcolor=red]; - 22 [label="Const: Int(1)"]; - 23 [label="Exit property" style="filled" fillcolor=red]; - } + 20 -> {21}; 21 -> {22}; - 22 -> {23}; - - subgraph cluster_8 { - color=red - 24 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_9 { - color=blue - 25 [label="Enter block"]; - 26 [label="Local class declaration"]; - 27 [label="Exit block"]; - } - 28 [label="Exit function " style="filled" fillcolor=red]; - } - subgraph cluster_10 { - color=blue - 29 [label="Enter class GetterLocalClass" style="filled" fillcolor=red]; - subgraph cluster_11 { - color=blue - 30 [label="Enter init block" style="filled" fillcolor=red]; - subgraph cluster_12 { - color=blue - 31 [label="Enter block"]; - 32 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; - 33 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 34 [label="Stub" style="filled" fillcolor=gray]; - 35 [label="Exit block" style="filled" fillcolor=gray]; - } - 36 [label="Exit init block" style="filled" fillcolor=gray]; - } - subgraph cluster_13 { - color=blue - 37 [label="Enter function " style="filled" fillcolor=gray]; - 38 [label="Delegated constructor call: super()" style="filled" fillcolor=gray]; - 39 [label="Exit function " style="filled" fillcolor=gray]; - } - 40 [label="Exit class GetterLocalClass" style="filled" fillcolor=gray]; - } - 24 -> {25}; - 25 -> {26}; - 26 -> {27 29}; - 26 -> {29} [style=dashed]; - 27 -> {28}; - 29 -> {30}; - 29 -> {37} [color=red]; - 29 -> {40} [style=dotted]; - 29 -> {30 37} [style=dashed]; - 30 -> {31}; + 22 -> {23} [style=dotted]; + 23 -> {24} [style=dotted]; + 24 -> {25} [style=dotted]; + 25 -> {26} [style=dotted]; + 26 -> {27} [style=dotted]; + 27 -> {28} [style=dotted]; + 28 -> {29} [style=dotted]; + 29 -> {30} [style=dotted]; 31 -> {32}; 32 -> {33}; - 33 -> {34} [style=dotted]; - 34 -> {35} [style=dotted]; - 35 -> {36} [style=dotted]; - 36 -> {37} [style=dotted]; - 37 -> {38} [style=dotted]; + 33 -> {34}; + 34 -> {35}; + 35 -> {36}; + 36 -> {37}; + 37 -> {38}; 38 -> {39} [style=dotted]; 39 -> {40} [style=dotted]; - - subgraph cluster_14 { - color=red - 41 [label="Enter property" style="filled" fillcolor=red]; - 42 [label="Postponed enter to lambda"]; - subgraph cluster_15 { - color=blue - 43 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_16 { - color=blue - 44 [label="Enter block"]; - 45 [label="Local function declaration"]; - 46 [label="Local class declaration"]; - 47 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; - 48 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 49 [label="Stub" style="filled" fillcolor=gray]; - 50 [label="Exit block" style="filled" fillcolor=gray]; - } - 51 [label="Exit function " style="filled" fillcolor=gray]; - } - subgraph cluster_17 { - color=blue - 52 [label="Enter class InitializerLocalClass" style="filled" fillcolor=red]; - subgraph cluster_18 { - color=blue - 53 [label="Enter init block" style="filled" fillcolor=red]; - subgraph cluster_19 { - color=blue - 54 [label="Enter block"]; - 55 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; - 56 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 57 [label="Stub" style="filled" fillcolor=gray]; - 58 [label="Const: Int(1)" style="filled" fillcolor=gray]; - 59 [label="Exit block" style="filled" fillcolor=gray]; - } - 60 [label="Exit init block" style="filled" fillcolor=gray]; - } - subgraph cluster_20 { - color=blue - 61 [label="Enter function " style="filled" fillcolor=gray]; - 62 [label="Delegated constructor call: super()" style="filled" fillcolor=gray]; - 63 [label="Exit function " style="filled" fillcolor=gray]; - } - 64 [label="Exit class InitializerLocalClass" style="filled" fillcolor=gray]; - } - subgraph cluster_21 { - color=blue - 65 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_22 { - color=blue - 66 [label="Enter block"]; - 67 [label="Const: Int(1)"]; - 68 [label="Const: Int(1)"]; - 69 [label="Function call: Int(1).R|kotlin/Int.plus|(...)" style="filled" fillcolor=yellow]; - 70 [label="Variable declaration: lval c: R|kotlin/Int|"]; - 71 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; - 72 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 73 [label="Stub" style="filled" fillcolor=gray]; - 74 [label="Exit block" style="filled" fillcolor=gray]; - } - 75 [label="Exit function foo" style="filled" fillcolor=gray]; - } - 76 [label="Postponed exit from lambda"]; - 77 [label="Function call: R|/run|(...)" style="filled" fillcolor=yellow]; - 78 [label="Exit property" style="filled" fillcolor=red]; - } - 41 -> {42}; - 42 -> {43 76 77}; - 42 -> {43} [style=dashed]; + 40 -> {41} [style=dotted]; + 42 -> {43}; + 42 -> {8} [color=green style=dashed]; 43 -> {44}; - 44 -> {45}; - 45 -> {46 65}; - 45 -> {65} [style=dashed]; + 44 -> {45} [color=green]; + 45 -> {46}; 46 -> {47 52}; - 46 -> {52} [style=dashed]; + 46 -> {58} [label="onUncaughtException"]; 47 -> {48}; - 48 -> {49} [style=dotted]; - 49 -> {50} [style=dotted]; - 50 -> {51} [style=dotted]; - 51 -> {76} [style=dotted]; + 48 -> {49}; + 49 -> {50}; + 50 -> {51}; + 51 -> {52 58}; 52 -> {53}; - 52 -> {61} [color=red]; - 52 -> {64} [style=dotted]; - 52 -> {53 61} [style=dashed]; + 52 -> {58} [label="onUncaughtException"]; 53 -> {54}; 54 -> {55}; 55 -> {56}; - 56 -> {57} [style=dotted]; - 57 -> {58} [style=dotted]; - 58 -> {59} [style=dotted]; - 59 -> {60} [style=dotted]; - 60 -> {61} [style=dotted]; - 61 -> {62} [style=dotted]; - 62 -> {63} [style=dotted]; - 63 -> {64} [style=dotted]; - 65 -> {66}; + 56 -> {57}; + 57 -> {58}; + 58 -> {59}; + 59 -> {60}; + 60 -> {61}; + 61 -> {62}; + 62 -> {63}; + 63 -> {64}; + 64 -> {65} [color=green]; + + subgraph cluster_20 { + color=red + 66 [label="Enter function run" style="filled" fillcolor=red]; + subgraph cluster_21 { + color=blue + 67 [label="Enter block"]; + 68 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 69 [label="Exit block"]; + } + 70 [label="Exit function run" style="filled" fillcolor=red]; + } 66 -> {67}; 67 -> {68}; 68 -> {69}; 69 -> {70}; - 70 -> {71}; - 71 -> {72}; - 72 -> {73} [style=dotted]; - 73 -> {74} [style=dotted]; - 74 -> {75} [style=dotted]; - 76 -> {77}; - 76 -> {42} [color=green style=dashed]; - 77 -> {78}; - subgraph cluster_23 { + subgraph cluster_22 { color=red - 79 [label="Enter property" style="filled" fillcolor=red]; - subgraph cluster_24 { + 71 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_23 { color=blue - 80 [label="Try expression enter"]; - subgraph cluster_25 { - color=blue - 81 [label="Try main block enter"]; - subgraph cluster_26 { - color=blue - 82 [label="Enter block"]; - 83 [label="Const: Int(1)"]; - 84 [label="Exit block"]; - } - 85 [label="Try main block exit"]; - } - subgraph cluster_27 { - color=blue - 86 [label="Catch enter"]; - 87 [label="Variable declaration: e: R|kotlin/Exception|"]; - subgraph cluster_28 { - color=blue - 88 [label="Enter block"]; - 89 [label="Const: Int(2)"]; - 90 [label="Exit block"]; - } - 91 [label="Catch exit"]; - } - subgraph cluster_29 { - color=blue - 92 [label="Enter finally"]; - subgraph cluster_30 { - color=blue - 93 [label="Enter block"]; - 94 [label="Const: Int(0)"]; - 95 [label="Exit block"]; - } - 96 [label="Exit finally"]; - } - 97 [label="Try expression exit"]; + 72 [label="Enter block"]; + 73 [label="Const: Int(1)"]; + 74 [label="Jump: ^ Int(1)"]; + 75 [label="Stub" style="filled" fillcolor=gray]; + 76 [label="Exit block" style="filled" fillcolor=gray]; } - 98 [label="Exit property" style="filled" fillcolor=red]; + 77 [label="Exit function " style="filled" fillcolor=red]; } + 71 -> {72}; + 72 -> {73}; + 73 -> {74}; + 74 -> {77}; + 74 -> {75} [style=dotted]; + 75 -> {76} [style=dotted]; + 76 -> {77} [style=dotted]; + + subgraph cluster_24 { + color=red + 78 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_25 { + color=blue + 79 [label="Enter block"]; + 80 [label="Const: Int(1)"]; + 81 [label="Assignment: F|/x2|"]; + 82 [label="Exit block"]; + } + 83 [label="Exit function " style="filled" fillcolor=red]; + } + 78 -> {79}; 79 -> {80}; - 80 -> {81 86}; - 80 -> {92} [label="onUncaughtException"]; + 80 -> {81}; 81 -> {82}; 82 -> {83}; - 83 -> {84}; + + subgraph cluster_26 { + color=red + 84 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_27 { + color=blue + 85 [label="Enter block"]; + 86 [label="Local class declaration"]; + 87 [label="Exit block"]; + } + 88 [label="Exit function " style="filled" fillcolor=red]; + } + subgraph cluster_28 { + color=blue + 89 [label="Enter class GetterLocalClass" style="filled" fillcolor=red]; + subgraph cluster_29 { + color=blue + 90 [label="Enter init block" style="filled" fillcolor=red]; + subgraph cluster_30 { + color=blue + 91 [label="Enter block"]; + 92 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; + 93 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 94 [label="Stub" style="filled" fillcolor=gray]; + 95 [label="Exit block" style="filled" fillcolor=gray]; + } + 96 [label="Exit init block" style="filled" fillcolor=gray]; + } + subgraph cluster_31 { + color=blue + 97 [label="Enter function " style="filled" fillcolor=gray]; + 98 [label="Delegated constructor call: super()" style="filled" fillcolor=gray]; + 99 [label="Exit function " style="filled" fillcolor=gray]; + } + 100 [label="Exit class GetterLocalClass" style="filled" fillcolor=gray]; + } 84 -> {85}; - 85 -> {86 92}; - 86 -> {87}; - 86 -> {92} [label="onUncaughtException"]; + 85 -> {86}; + 86 -> {87 89}; + 86 -> {89} [style=dashed]; 87 -> {88}; - 88 -> {89}; 89 -> {90}; + 89 -> {97} [color=red]; + 89 -> {100} [style=dotted]; + 89 -> {90 97} [style=dashed]; 90 -> {91}; 91 -> {92}; 92 -> {93}; - 93 -> {94}; - 94 -> {95}; - 95 -> {96}; - 96 -> {97}; - 97 -> {98}; + 93 -> {94} [style=dotted]; + 94 -> {95} [style=dotted]; + 95 -> {96} [style=dotted]; + 96 -> {97} [style=dotted]; + 97 -> {98} [style=dotted]; + 98 -> {99} [style=dotted]; + 99 -> {100} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/returnValuesFromLambda.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/returnValuesFromLambda.dot index f9d6f170793..22e27e3ffff 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/returnValuesFromLambda.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/returnValuesFromLambda.dot @@ -5,205 +5,210 @@ digraph returnValuesFromLambda_kt { subgraph cluster_0 { color=red - 0 [label="Enter class A" style="filled" fillcolor=red]; - 1 [label="Exit class A" style="filled" fillcolor=red]; + 0 [label="Enter file returnValuesFromLambda.kt" style="filled" fillcolor=red]; + 1 [label="Exit file returnValuesFromLambda.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; subgraph cluster_1 { color=red - 2 [label="Enter class B" style="filled" fillcolor=red]; - subgraph cluster_2 { - color=blue - 3 [label="Enter function " style="filled" fillcolor=red]; - 4 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 5 [label="Exit function " style="filled" fillcolor=red]; - } - 6 [label="Exit class B" style="filled" fillcolor=red]; + 2 [label="Enter class A" style="filled" fillcolor=red]; + 3 [label="Exit class A" style="filled" fillcolor=red]; } 2 -> {3} [color=green]; - 2 -> {6} [style=dotted]; - 2 -> {3} [style=dashed]; - 3 -> {4}; - 4 -> {5}; - 5 -> {6} [color=green]; - subgraph cluster_3 { + subgraph cluster_2 { color=red - 7 [label="Enter class C" style="filled" fillcolor=red]; - subgraph cluster_4 { + 4 [label="Enter class B" style="filled" fillcolor=red]; + subgraph cluster_3 { color=blue - 8 [label="Enter function " style="filled" fillcolor=red]; - 9 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 10 [label="Exit function " style="filled" fillcolor=red]; + 5 [label="Enter function " style="filled" fillcolor=red]; + 6 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 7 [label="Exit function " style="filled" fillcolor=red]; } - 11 [label="Exit class C" style="filled" fillcolor=red]; + 8 [label="Exit class B" style="filled" fillcolor=red]; } + 4 -> {5} [color=green]; + 4 -> {8} [style=dotted]; + 4 -> {5} [style=dashed]; + 5 -> {6}; + 6 -> {7}; 7 -> {8} [color=green]; - 7 -> {11} [style=dotted]; - 7 -> {8} [style=dashed]; - 8 -> {9}; - 9 -> {10}; - 10 -> {11} [color=green]; - subgraph cluster_5 { + subgraph cluster_4 { color=red - 12 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_6 { + 9 [label="Enter class C" style="filled" fillcolor=red]; + subgraph cluster_5 { color=blue - 13 [label="Enter block"]; - 14 [label="Postponed enter to lambda"]; - subgraph cluster_7 { + 10 [label="Enter function " style="filled" fillcolor=red]; + 11 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 12 [label="Exit function " style="filled" fillcolor=red]; + } + 13 [label="Exit class C" style="filled" fillcolor=red]; + } + 9 -> {10} [color=green]; + 9 -> {13} [style=dotted]; + 9 -> {10} [style=dashed]; + 10 -> {11}; + 11 -> {12}; + 12 -> {13} [color=green]; + + subgraph cluster_6 { + color=red + 14 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_7 { + color=blue + 15 [label="Enter block"]; + 16 [label="Postponed enter to lambda"]; + subgraph cluster_8 { color=blue - 15 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_8 { + 17 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_9 { color=blue - 16 [label="Enter block"]; - subgraph cluster_9 { + 18 [label="Enter block"]; + subgraph cluster_10 { color=blue - 17 [label="Enter when"]; - subgraph cluster_10 { - color=blue - 18 [label="Enter when branch condition "]; - 19 [label="Access variable R|/b|"]; - 20 [label="Exit when branch condition"]; - } - 21 [label="Synthetic else branch"]; - 22 [label="Enter when branch result"]; + 19 [label="Enter when"]; subgraph cluster_11 { color=blue - 23 [label="Enter block"]; - 24 [label="Function call: R|/B.B|()" style="filled" fillcolor=yellow]; - 25 [label="Jump: ^@run R|/B.B|()"]; - 26 [label="Stub" style="filled" fillcolor=gray]; - 27 [label="Exit block" style="filled" fillcolor=gray]; + 20 [label="Enter when branch condition "]; + 21 [label="Access variable R|/b|"]; + 22 [label="Exit when branch condition"]; } - 28 [label="Exit when branch result" style="filled" fillcolor=gray]; - 29 [label="Exit when"]; + 23 [label="Synthetic else branch"]; + 24 [label="Enter when branch result"]; + subgraph cluster_12 { + color=blue + 25 [label="Enter block"]; + 26 [label="Function call: R|/B.B|()" style="filled" fillcolor=yellow]; + 27 [label="Jump: ^@run R|/B.B|()"]; + 28 [label="Stub" style="filled" fillcolor=gray]; + 29 [label="Exit block" style="filled" fillcolor=gray]; + } + 30 [label="Exit when branch result" style="filled" fillcolor=gray]; + 31 [label="Exit when"]; } - 30 [label="Function call: R|/C.C|()" style="filled" fillcolor=yellow]; - 31 [label="Exit block"]; + 32 [label="Function call: R|/C.C|()" style="filled" fillcolor=yellow]; + 33 [label="Exit block"]; } - 32 [label="Exit function " style="filled" fillcolor=red]; + 34 [label="Exit function " style="filled" fillcolor=red]; } - 33 [label="Postponed exit from lambda"]; - 34 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 35 [label="Variable declaration: lval x: R|A|"]; - 36 [label="Exit block"]; + 35 [label="Postponed exit from lambda"]; + 36 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 37 [label="Variable declaration: lval x: R|A|"]; + 38 [label="Exit block"]; } - 37 [label="Exit function test_1" style="filled" fillcolor=red]; + 39 [label="Exit function test_1" style="filled" fillcolor=red]; } - 12 -> {13}; - 13 -> {14}; - 14 -> {15 34}; - 14 -> {33} [style=dotted]; - 14 -> {15} [style=dashed]; + 14 -> {15}; 15 -> {16}; - 16 -> {17}; + 16 -> {17 36}; + 16 -> {35} [style=dotted]; + 16 -> {17} [style=dashed]; 17 -> {18}; 18 -> {19}; 19 -> {20}; - 20 -> {21 22}; - 21 -> {29}; - 22 -> {23}; - 23 -> {24}; + 20 -> {21}; + 21 -> {22}; + 22 -> {23 24}; + 23 -> {31}; 24 -> {25}; - 25 -> {32}; - 25 -> {26} [style=dotted]; - 26 -> {27} [style=dotted]; + 25 -> {26}; + 26 -> {27}; + 27 -> {34}; 27 -> {28} [style=dotted]; 28 -> {29} [style=dotted]; - 29 -> {30}; - 30 -> {31}; + 29 -> {30} [style=dotted]; + 30 -> {31} [style=dotted]; 31 -> {32}; 32 -> {33}; 33 -> {34}; 34 -> {35}; 35 -> {36}; 36 -> {37}; - - subgraph cluster_12 { - color=red - 38 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_13 { - color=blue - 39 [label="Enter block"]; - 40 [label="Postponed enter to lambda"]; - subgraph cluster_14 { - color=blue - 41 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_15 { - color=blue - 42 [label="Enter block"]; - 43 [label="Function call: R|/C.C|()" style="filled" fillcolor=yellow]; - 44 [label="Jump: ^@run R|/C.C|()"]; - 45 [label="Stub" style="filled" fillcolor=gray]; - 46 [label="Exit block" style="filled" fillcolor=gray]; - } - 47 [label="Exit function " style="filled" fillcolor=red]; - } - 48 [label="Postponed exit from lambda"]; - 49 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 50 [label="Variable declaration: lval x: R|C|"]; - 51 [label="Exit block"]; - } - 52 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 37 -> {38}; 38 -> {39}; - 39 -> {40}; - 40 -> {41 49}; - 40 -> {48} [style=dotted]; - 40 -> {41} [style=dashed]; + + subgraph cluster_13 { + color=red + 40 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_14 { + color=blue + 41 [label="Enter block"]; + 42 [label="Postponed enter to lambda"]; + subgraph cluster_15 { + color=blue + 43 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_16 { + color=blue + 44 [label="Enter block"]; + 45 [label="Function call: R|/C.C|()" style="filled" fillcolor=yellow]; + 46 [label="Jump: ^@run R|/C.C|()"]; + 47 [label="Stub" style="filled" fillcolor=gray]; + 48 [label="Exit block" style="filled" fillcolor=gray]; + } + 49 [label="Exit function " style="filled" fillcolor=red]; + } + 50 [label="Postponed exit from lambda"]; + 51 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 52 [label="Variable declaration: lval x: R|C|"]; + 53 [label="Exit block"]; + } + 54 [label="Exit function test_2" style="filled" fillcolor=red]; + } + 40 -> {41}; 41 -> {42}; - 42 -> {43}; + 42 -> {43 51}; + 42 -> {50} [style=dotted]; + 42 -> {43} [style=dashed]; 43 -> {44}; - 44 -> {47}; - 44 -> {45} [style=dotted]; - 45 -> {46} [style=dotted]; + 44 -> {45}; + 45 -> {46}; + 46 -> {49}; 46 -> {47} [style=dotted]; - 47 -> {48}; - 48 -> {49}; + 47 -> {48} [style=dotted]; + 48 -> {49} [style=dotted]; 49 -> {50}; 50 -> {51}; 51 -> {52}; - - subgraph cluster_16 { - color=red - 53 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_17 { - color=blue - 54 [label="Enter block"]; - 55 [label="Postponed enter to lambda"]; - subgraph cluster_18 { - color=blue - 56 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_19 { - color=blue - 57 [label="Enter block"]; - 58 [label="Jump: ^test_3 Unit"]; - 59 [label="Stub" style="filled" fillcolor=gray]; - 60 [label="Exit block" style="filled" fillcolor=gray]; - } - 61 [label="Exit function " style="filled" fillcolor=gray]; - } - 62 [label="Postponed exit from lambda" style="filled" fillcolor=gray]; - 63 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=gray]; - 64 [label="Stub" style="filled" fillcolor=gray]; - 65 [label="Variable declaration: lval x: R|kotlin/Nothing|" style="filled" fillcolor=gray]; - 66 [label="Exit block" style="filled" fillcolor=gray]; - } - 67 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 52 -> {53}; 53 -> {54}; - 54 -> {55}; + + subgraph cluster_17 { + color=red + 55 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_18 { + color=blue + 56 [label="Enter block"]; + 57 [label="Postponed enter to lambda"]; + subgraph cluster_19 { + color=blue + 58 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_20 { + color=blue + 59 [label="Enter block"]; + 60 [label="Jump: ^test_3 Unit"]; + 61 [label="Stub" style="filled" fillcolor=gray]; + 62 [label="Exit block" style="filled" fillcolor=gray]; + } + 63 [label="Exit function " style="filled" fillcolor=gray]; + } + 64 [label="Postponed exit from lambda" style="filled" fillcolor=gray]; + 65 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=gray]; + 66 [label="Stub" style="filled" fillcolor=gray]; + 67 [label="Variable declaration: lval x: R|kotlin/Nothing|" style="filled" fillcolor=gray]; + 68 [label="Exit block" style="filled" fillcolor=gray]; + } + 69 [label="Exit function test_3" style="filled" fillcolor=red]; + } 55 -> {56}; - 55 -> {62 63} [style=dotted]; - 55 -> {56} [style=dashed]; 56 -> {57}; 57 -> {58}; - 58 -> {67}; - 58 -> {59} [style=dotted]; - 59 -> {60} [style=dotted]; + 57 -> {64 65} [style=dotted]; + 57 -> {58} [style=dashed]; + 58 -> {59}; + 59 -> {60}; + 60 -> {69}; 60 -> {61} [style=dotted]; 61 -> {62} [style=dotted]; 62 -> {63} [style=dotted]; @@ -211,5 +216,7 @@ digraph returnValuesFromLambda_kt { 64 -> {65} [style=dotted]; 65 -> {66} [style=dotted]; 66 -> {67} [style=dotted]; + 67 -> {68} [style=dotted]; + 68 -> {69} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/safeCalls.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/safeCalls.dot index 40f9499aa25..3e837454847 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/safeCalls.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/safeCalls.dot @@ -5,145 +5,150 @@ digraph safeCalls_kt { subgraph cluster_0 { color=red - 0 [label="Enter class A" style="filled" fillcolor=red]; - 1 [label="Exit class A" style="filled" fillcolor=red]; + 0 [label="Enter file safeCalls.kt" style="filled" fillcolor=red]; + 1 [label="Exit file safeCalls.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; subgraph cluster_1 { color=red - 2 [label="Enter function foo" style="filled" fillcolor=red]; - 3 [label="Exit function foo" style="filled" fillcolor=red]; + 2 [label="Enter class A" style="filled" fillcolor=red]; + 3 [label="Exit class A" style="filled" fillcolor=red]; } - 2 -> {3}; + 2 -> {3} [color=green]; subgraph cluster_2 { color=red - 4 [label="Enter function bar" style="filled" fillcolor=red]; - 5 [label="Exit function bar" style="filled" fillcolor=red]; + 4 [label="Enter function foo" style="filled" fillcolor=red]; + 5 [label="Exit function foo" style="filled" fillcolor=red]; } 4 -> {5}; subgraph cluster_3 { color=red - 6 [label="Enter class B" style="filled" fillcolor=red]; - 7 [label="Exit class B" style="filled" fillcolor=red]; + 6 [label="Enter function bar" style="filled" fillcolor=red]; + 7 [label="Exit function bar" style="filled" fillcolor=red]; } - 6 -> {7} [color=green]; + 6 -> {7}; subgraph cluster_4 { color=red - 8 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_5 { + 8 [label="Enter class B" style="filled" fillcolor=red]; + 9 [label="Exit class B" style="filled" fillcolor=red]; + } + 8 -> {9} [color=green]; + + subgraph cluster_5 { + color=red + 10 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_6 { color=blue - 9 [label="Enter block"]; - 10 [label="Access variable R|/x|"]; - 11 [label="Enter safe call"]; - 12 [label="Function call: $subj$.R|/A.foo|()" style="filled" fillcolor=yellow]; + 11 [label="Enter block"]; + 12 [label="Access variable R|/x|"]; 13 [label="Enter safe call"]; - 14 [label="Const: String()"]; - 15 [label="Function call: $subj$.R|/A.bar|(...)" style="filled" fillcolor=yellow]; - 16 [label="Exit safe call"]; - 17 [label="Exit safe call"]; - 18 [label="Exit block"]; + 14 [label="Function call: $subj$.R|/A.foo|()" style="filled" fillcolor=yellow]; + 15 [label="Enter safe call"]; + 16 [label="Const: String()"]; + 17 [label="Function call: $subj$.R|/A.bar|(...)" style="filled" fillcolor=yellow]; + 18 [label="Exit safe call"]; + 19 [label="Exit safe call"]; + 20 [label="Exit block"]; } - 19 [label="Exit function test_1" style="filled" fillcolor=red]; + 21 [label="Exit function test_1" style="filled" fillcolor=red]; } - 8 -> {9}; - 9 -> {10}; - 10 -> {11 16}; + 10 -> {11}; 11 -> {12}; - 12 -> {13 16}; + 12 -> {13 18}; 13 -> {14}; - 14 -> {15}; - 15 -> {17}; + 14 -> {15 18}; + 15 -> {16}; 16 -> {17}; - 17 -> {18}; + 17 -> {19}; 18 -> {19}; - - subgraph cluster_6 { - color=red - 20 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_7 { - color=blue - 21 [label="Enter block"]; - 22 [label="Access variable R|/x|"]; - 23 [label="Enter safe call"]; - 24 [label="Access variable R|/B.foo|"]; - 25 [label="Enter safe call"]; - 26 [label="Access variable R|/B.bar|"]; - 27 [label="Exit safe call"]; - 28 [label="Exit safe call"]; - 29 [label="Exit block"]; - } - 30 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 19 -> {20}; 20 -> {21}; - 21 -> {22}; - 22 -> {23 27}; - 23 -> {24}; - 24 -> {25 27}; - 25 -> {26}; - 26 -> {28}; - 27 -> {28}; - 28 -> {29}; - 29 -> {30}; - subgraph cluster_8 { + subgraph cluster_7 { color=red - 31 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_9 { + 22 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_8 { color=blue - 32 [label="Enter block"]; - subgraph cluster_10 { + 23 [label="Enter block"]; + 24 [label="Access variable R|/x|"]; + 25 [label="Enter safe call"]; + 26 [label="Access variable R|/B.foo|"]; + 27 [label="Enter safe call"]; + 28 [label="Access variable R|/B.bar|"]; + 29 [label="Exit safe call"]; + 30 [label="Exit safe call"]; + 31 [label="Exit block"]; + } + 32 [label="Exit function test_2" style="filled" fillcolor=red]; + } + 22 -> {23}; + 23 -> {24}; + 24 -> {25 29}; + 25 -> {26}; + 26 -> {27 29}; + 27 -> {28}; + 28 -> {30}; + 29 -> {30}; + 30 -> {31}; + 31 -> {32}; + + subgraph cluster_9 { + color=red + 33 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_10 { + color=blue + 34 [label="Enter block"]; + subgraph cluster_11 { color=blue - 33 [label="Enter when"]; - subgraph cluster_11 { - color=blue - 34 [label="Enter when branch condition "]; - 35 [label="Access variable R|/x|"]; - 36 [label="Enter safe call"]; - 37 [label="Access variable R|/y|"]; - 38 [label="Type operator: (R|/y| as R|kotlin/String|)"]; - 39 [label="Function call: $subj$.R|/A.bar|(...)" style="filled" fillcolor=yellow]; - 40 [label="Exit safe call"]; - 41 [label="Const: Null(null)"]; - 42 [label="Equality operator !="]; - 43 [label="Exit when branch condition"]; - } - 44 [label="Synthetic else branch"]; - 45 [label="Enter when branch result"]; + 35 [label="Enter when"]; subgraph cluster_12 { color=blue - 46 [label="Enter block"]; - 47 [label="Access variable R|/y|"]; - 48 [label="Smart cast: R|/y|"]; - 49 [label="Access variable R|kotlin/String.length|"]; - 50 [label="Exit block"]; + 36 [label="Enter when branch condition "]; + 37 [label="Access variable R|/x|"]; + 38 [label="Enter safe call"]; + 39 [label="Access variable R|/y|"]; + 40 [label="Type operator: (R|/y| as R|kotlin/String|)"]; + 41 [label="Function call: $subj$.R|/A.bar|(...)" style="filled" fillcolor=yellow]; + 42 [label="Exit safe call"]; + 43 [label="Const: Null(null)"]; + 44 [label="Equality operator !="]; + 45 [label="Exit when branch condition"]; } - 51 [label="Exit when branch result"]; - 52 [label="Exit when"]; + 46 [label="Synthetic else branch"]; + 47 [label="Enter when branch result"]; + subgraph cluster_13 { + color=blue + 48 [label="Enter block"]; + 49 [label="Access variable R|/y|"]; + 50 [label="Smart cast: R|/y|"]; + 51 [label="Access variable R|kotlin/String.length|"]; + 52 [label="Exit block"]; + } + 53 [label="Exit when branch result"]; + 54 [label="Exit when"]; } - 53 [label="Exit block"]; + 55 [label="Exit block"]; } - 54 [label="Exit function test_3" style="filled" fillcolor=red]; + 56 [label="Exit function test_3" style="filled" fillcolor=red]; } - 31 -> {32}; - 32 -> {33}; 33 -> {34}; 34 -> {35}; - 35 -> {36 40}; + 35 -> {36}; 36 -> {37}; - 37 -> {38}; + 37 -> {38 42}; 38 -> {39}; 39 -> {40}; 40 -> {41}; 41 -> {42}; 42 -> {43}; - 43 -> {44 45}; - 44 -> {52}; - 45 -> {46}; - 46 -> {47}; + 43 -> {44}; + 44 -> {45}; + 45 -> {46 47}; + 46 -> {54}; 47 -> {48}; 48 -> {49}; 49 -> {50}; @@ -151,5 +156,7 @@ digraph safeCalls_kt { 51 -> {52}; 52 -> {53}; 53 -> {54}; + 54 -> {55}; + 55 -> {56}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/simple.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/simple.dot index 00c23850d1b..a4d74f356b6 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/simple.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/simple.dot @@ -5,37 +5,42 @@ digraph simple_kt { subgraph cluster_0 { color=red - 0 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter block"]; - 2 [label="Exit block"]; - } - 3 [label="Exit function foo" style="filled" fillcolor=red]; + 0 [label="Enter file simple.kt" style="filled" fillcolor=red]; + 1 [label="Exit file simple.kt" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; - 2 -> {3}; + 0 -> {1} [color=green]; - subgraph cluster_2 { + subgraph cluster_1 { color=red - 4 [label="Enter function test" style="filled" fillcolor=red]; - subgraph cluster_3 { + 2 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 5 [label="Enter block"]; - 6 [label="Const: Int(1)"]; - 7 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 8 [label="Access variable R|/x|"]; - 9 [label="Const: Int(1)"]; - 10 [label="Function call: R|/x|.R|kotlin/Int.plus|(...)" style="filled" fillcolor=yellow]; - 11 [label="Variable declaration: lval y: R|kotlin/Int|"]; - 12 [label="Function call: R|/foo|()" style="filled" fillcolor=yellow]; - 13 [label="Exit block"]; + 3 [label="Enter block"]; + 4 [label="Exit block"]; } - 14 [label="Exit function test" style="filled" fillcolor=red]; + 5 [label="Exit function foo" style="filled" fillcolor=red]; } + 2 -> {3}; + 3 -> {4}; 4 -> {5}; - 5 -> {6}; + + subgraph cluster_3 { + color=red + 6 [label="Enter function test" style="filled" fillcolor=red]; + subgraph cluster_4 { + color=blue + 7 [label="Enter block"]; + 8 [label="Const: Int(1)"]; + 9 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 10 [label="Access variable R|/x|"]; + 11 [label="Const: Int(1)"]; + 12 [label="Function call: R|/x|.R|kotlin/Int.plus|(...)" style="filled" fillcolor=yellow]; + 13 [label="Variable declaration: lval y: R|kotlin/Int|"]; + 14 [label="Function call: R|/foo|()" style="filled" fillcolor=yellow]; + 15 [label="Exit block"]; + } + 16 [label="Exit function test" style="filled" fillcolor=red]; + } 6 -> {7}; 7 -> {8}; 8 -> {9}; @@ -44,5 +49,7 @@ digraph simple_kt { 11 -> {12}; 12 -> {13}; 13 -> {14}; + 14 -> {15}; + 15 -> {16}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/tryCatch.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/tryCatch.dot index 477d6435e87..b7509d2895a 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/tryCatch.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/tryCatch.dot @@ -5,75 +5,80 @@ digraph tryCatch_kt { subgraph cluster_0 { color=red - 0 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter block"]; - subgraph cluster_2 { - color=blue - 2 [label="Try expression enter"]; - subgraph cluster_3 { - color=blue - 3 [label="Try main block enter"]; - subgraph cluster_4 { - color=blue - 4 [label="Enter block"]; - 5 [label="Const: Int(1)"]; - 6 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 7 [label="Exit block"]; - } - 8 [label="Try main block exit"]; - } - subgraph cluster_5 { - color=blue - 9 [label="Catch enter"]; - 10 [label="Variable declaration: e: R|kotlin/RuntimeException|"]; - subgraph cluster_6 { - color=blue - 11 [label="Enter block"]; - 12 [label="Const: Int(2)"]; - 13 [label="Variable declaration: lval y: R|kotlin/Int|"]; - 14 [label="Exit block"]; - } - 15 [label="Catch exit"]; - } - subgraph cluster_7 { - color=blue - 16 [label="Catch enter"]; - 17 [label="Variable declaration: e: R|kotlin/Exception|"]; - subgraph cluster_8 { - color=blue - 18 [label="Enter block"]; - 19 [label="Const: Int(3)"]; - 20 [label="Variable declaration: lval z: R|kotlin/Int|"]; - 21 [label="Exit block"]; - } - 22 [label="Catch exit"]; - } - 23 [label="Try expression exit"]; - } - 24 [label="Exit block"]; - } - 25 [label="Exit function test_1" style="filled" fillcolor=red]; + 0 [label="Enter file tryCatch.kt" style="filled" fillcolor=red]; + 1 [label="Exit file tryCatch.kt" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; - 2 -> {3 9 16}; + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_2 { + color=blue + 3 [label="Enter block"]; + subgraph cluster_3 { + color=blue + 4 [label="Try expression enter"]; + subgraph cluster_4 { + color=blue + 5 [label="Try main block enter"]; + subgraph cluster_5 { + color=blue + 6 [label="Enter block"]; + 7 [label="Const: Int(1)"]; + 8 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 9 [label="Exit block"]; + } + 10 [label="Try main block exit"]; + } + subgraph cluster_6 { + color=blue + 11 [label="Catch enter"]; + 12 [label="Variable declaration: e: R|kotlin/RuntimeException|"]; + subgraph cluster_7 { + color=blue + 13 [label="Enter block"]; + 14 [label="Const: Int(2)"]; + 15 [label="Variable declaration: lval y: R|kotlin/Int|"]; + 16 [label="Exit block"]; + } + 17 [label="Catch exit"]; + } + subgraph cluster_8 { + color=blue + 18 [label="Catch enter"]; + 19 [label="Variable declaration: e: R|kotlin/Exception|"]; + subgraph cluster_9 { + color=blue + 20 [label="Enter block"]; + 21 [label="Const: Int(3)"]; + 22 [label="Variable declaration: lval z: R|kotlin/Int|"]; + 23 [label="Exit block"]; + } + 24 [label="Catch exit"]; + } + 25 [label="Try expression exit"]; + } + 26 [label="Exit block"]; + } + 27 [label="Exit function test_1" style="filled" fillcolor=red]; + } + 2 -> {3}; 3 -> {4}; - 4 -> {5}; + 4 -> {5 11 18}; 5 -> {6}; 6 -> {7}; 7 -> {8}; - 8 -> {9 16 23}; + 8 -> {9}; 9 -> {10}; - 10 -> {11}; + 10 -> {11 18 25}; 11 -> {12}; 12 -> {13}; 13 -> {14}; 14 -> {15}; - 15 -> {23}; + 15 -> {16}; 16 -> {17}; - 17 -> {18}; + 17 -> {25}; 18 -> {19}; 19 -> {20}; 20 -> {21}; @@ -81,56 +86,56 @@ digraph tryCatch_kt { 22 -> {23}; 23 -> {24}; 24 -> {25}; - - subgraph cluster_9 { - color=red - 26 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_10 { - color=blue - 27 [label="Enter block"]; - subgraph cluster_11 { - color=blue - 28 [label="Try expression enter"]; - subgraph cluster_12 { - color=blue - 29 [label="Try main block enter"]; - subgraph cluster_13 { - color=blue - 30 [label="Enter block"]; - 31 [label="Const: Int(1)"]; - 32 [label="Exit block"]; - } - 33 [label="Try main block exit"]; - } - subgraph cluster_14 { - color=blue - 34 [label="Catch enter"]; - 35 [label="Variable declaration: e: R|kotlin/Exception|"]; - subgraph cluster_15 { - color=blue - 36 [label="Enter block"]; - 37 [label="Const: Int(2)"]; - 38 [label="Exit block"]; - } - 39 [label="Catch exit"]; - } - 40 [label="Try expression exit"]; - } - 41 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 42 [label="Exit block"]; - } - 43 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 25 -> {26}; 26 -> {27}; - 27 -> {28}; - 28 -> {29 34}; + + subgraph cluster_10 { + color=red + 28 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_11 { + color=blue + 29 [label="Enter block"]; + subgraph cluster_12 { + color=blue + 30 [label="Try expression enter"]; + subgraph cluster_13 { + color=blue + 31 [label="Try main block enter"]; + subgraph cluster_14 { + color=blue + 32 [label="Enter block"]; + 33 [label="Const: Int(1)"]; + 34 [label="Exit block"]; + } + 35 [label="Try main block exit"]; + } + subgraph cluster_15 { + color=blue + 36 [label="Catch enter"]; + 37 [label="Variable declaration: e: R|kotlin/Exception|"]; + subgraph cluster_16 { + color=blue + 38 [label="Enter block"]; + 39 [label="Const: Int(2)"]; + 40 [label="Exit block"]; + } + 41 [label="Catch exit"]; + } + 42 [label="Try expression exit"]; + } + 43 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 44 [label="Exit block"]; + } + 45 [label="Exit function test_2" style="filled" fillcolor=red]; + } + 28 -> {29}; 29 -> {30}; - 30 -> {31}; + 30 -> {31 36}; 31 -> {32}; 32 -> {33}; - 33 -> {34 40}; + 33 -> {34}; 34 -> {35}; - 35 -> {36}; + 35 -> {36 42}; 36 -> {37}; 37 -> {38}; 38 -> {39}; @@ -138,195 +143,197 @@ digraph tryCatch_kt { 40 -> {41}; 41 -> {42}; 42 -> {43}; + 43 -> {44}; + 44 -> {45}; - subgraph cluster_16 { + subgraph cluster_17 { color=red - 44 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_17 { + 46 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_18 { color=blue - 45 [label="Enter block"]; - subgraph cluster_18 { + 47 [label="Enter block"]; + subgraph cluster_19 { color=blue - 46 [label="Enter while loop"]; - subgraph cluster_19 { - color=blue - 47 [label="Enter loop condition"]; - 48 [label="Const: Boolean(true)"]; - 49 [label="Exit loop condition"]; - } + 48 [label="Enter while loop"]; subgraph cluster_20 { color=blue - 50 [label="Enter loop block"]; - subgraph cluster_21 { + 49 [label="Enter loop condition"]; + 50 [label="Const: Boolean(true)"]; + 51 [label="Exit loop condition"]; + } + subgraph cluster_21 { + color=blue + 52 [label="Enter loop block"]; + subgraph cluster_22 { color=blue - 51 [label="Enter block"]; - subgraph cluster_22 { + 53 [label="Enter block"]; + subgraph cluster_23 { color=blue - 52 [label="Try expression enter"]; - subgraph cluster_23 { + 54 [label="Try expression enter"]; + subgraph cluster_24 { color=blue - 53 [label="Try main block enter"]; - subgraph cluster_24 { + 55 [label="Try main block enter"]; + subgraph cluster_25 { color=blue - 54 [label="Enter block"]; - subgraph cluster_25 { + 56 [label="Enter block"]; + subgraph cluster_26 { color=blue - 55 [label="Enter when"]; - subgraph cluster_26 { - color=blue - 56 [label="Enter when branch condition "]; - 57 [label="Access variable R|/b|"]; - 58 [label="Exit when branch condition"]; - } - 59 [label="Synthetic else branch"]; - 60 [label="Enter when branch result"]; + 57 [label="Enter when"]; subgraph cluster_27 { color=blue - 61 [label="Enter block"]; - 62 [label="Jump: ^test_3 Unit"]; - 63 [label="Stub" style="filled" fillcolor=gray]; - 64 [label="Exit block" style="filled" fillcolor=gray]; + 58 [label="Enter when branch condition "]; + 59 [label="Access variable R|/b|"]; + 60 [label="Exit when branch condition"]; } - 65 [label="Exit when branch result" style="filled" fillcolor=gray]; - 66 [label="Exit when"]; - } - 67 [label="Const: Int(1)"]; - 68 [label="Variable declaration: lval x: R|kotlin/Int|"]; - subgraph cluster_28 { - color=blue - 69 [label="Enter when"]; - subgraph cluster_29 { + 61 [label="Synthetic else branch"]; + 62 [label="Enter when branch result"]; + subgraph cluster_28 { color=blue - 70 [label="Enter when branch condition "]; - 71 [label="Access variable R|/b|"]; - 72 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 73 [label="Exit when branch condition"]; + 63 [label="Enter block"]; + 64 [label="Jump: ^test_3 Unit"]; + 65 [label="Stub" style="filled" fillcolor=gray]; + 66 [label="Exit block" style="filled" fillcolor=gray]; } - 74 [label="Synthetic else branch"]; - 75 [label="Enter when branch result"]; + 67 [label="Exit when branch result" style="filled" fillcolor=gray]; + 68 [label="Exit when"]; + } + 69 [label="Const: Int(1)"]; + 70 [label="Variable declaration: lval x: R|kotlin/Int|"]; + subgraph cluster_29 { + color=blue + 71 [label="Enter when"]; subgraph cluster_30 { color=blue - 76 [label="Enter block"]; - 77 [label="Jump: break@@@[Boolean(true)] "]; - 78 [label="Stub" style="filled" fillcolor=gray]; - 79 [label="Exit block" style="filled" fillcolor=gray]; + 72 [label="Enter when branch condition "]; + 73 [label="Access variable R|/b|"]; + 74 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 75 [label="Exit when branch condition"]; } - 80 [label="Exit when branch result" style="filled" fillcolor=gray]; - 81 [label="Exit when"]; + 76 [label="Synthetic else branch"]; + 77 [label="Enter when branch result"]; + subgraph cluster_31 { + color=blue + 78 [label="Enter block"]; + 79 [label="Jump: break@@@[Boolean(true)] "]; + 80 [label="Stub" style="filled" fillcolor=gray]; + 81 [label="Exit block" style="filled" fillcolor=gray]; + } + 82 [label="Exit when branch result" style="filled" fillcolor=gray]; + 83 [label="Exit when"]; } - 82 [label="Exit block"]; + 84 [label="Exit block"]; } - 83 [label="Try main block exit"]; + 85 [label="Try main block exit"]; } - subgraph cluster_31 { + subgraph cluster_32 { color=blue - 84 [label="Catch enter"]; - 85 [label="Variable declaration: e: R|kotlin/RuntimeException|"]; - subgraph cluster_32 { + 86 [label="Catch enter"]; + 87 [label="Variable declaration: e: R|kotlin/RuntimeException|"]; + subgraph cluster_33 { color=blue - 86 [label="Enter block"]; - 87 [label="Jump: break@@@[Boolean(true)] "]; - 88 [label="Stub" style="filled" fillcolor=gray]; - 89 [label="Exit block" style="filled" fillcolor=gray]; + 88 [label="Enter block"]; + 89 [label="Jump: break@@@[Boolean(true)] "]; + 90 [label="Stub" style="filled" fillcolor=gray]; + 91 [label="Exit block" style="filled" fillcolor=gray]; } - 90 [label="Catch exit" style="filled" fillcolor=gray]; + 92 [label="Catch exit" style="filled" fillcolor=gray]; } - subgraph cluster_33 { + subgraph cluster_34 { color=blue - 91 [label="Catch enter"]; - 92 [label="Variable declaration: e: R|kotlin/Exception|"]; - subgraph cluster_34 { + 93 [label="Catch enter"]; + 94 [label="Variable declaration: e: R|kotlin/Exception|"]; + subgraph cluster_35 { color=blue - 93 [label="Enter block"]; - 94 [label="Jump: continue@@@[Boolean(true)] "]; - 95 [label="Stub" style="filled" fillcolor=gray]; - 96 [label="Exit block" style="filled" fillcolor=gray]; + 95 [label="Enter block"]; + 96 [label="Jump: continue@@@[Boolean(true)] "]; + 97 [label="Stub" style="filled" fillcolor=gray]; + 98 [label="Exit block" style="filled" fillcolor=gray]; } - 97 [label="Catch exit" style="filled" fillcolor=gray]; + 99 [label="Catch exit" style="filled" fillcolor=gray]; } - 98 [label="Try expression exit"]; + 100 [label="Try expression exit"]; } - 99 [label="Const: Int(2)"]; - 100 [label="Variable declaration: lval y: R|kotlin/Int|"]; - 101 [label="Exit block"]; + 101 [label="Const: Int(2)"]; + 102 [label="Variable declaration: lval y: R|kotlin/Int|"]; + 103 [label="Exit block"]; } - 102 [label="Exit loop block"]; + 104 [label="Exit loop block"]; } - 103 [label="Exit while loop"]; + 105 [label="Exit while loop"]; } - 104 [label="Const: Int(3)"]; - 105 [label="Variable declaration: lval z: R|kotlin/Int|"]; - 106 [label="Exit block"]; + 106 [label="Const: Int(3)"]; + 107 [label="Variable declaration: lval z: R|kotlin/Int|"]; + 108 [label="Exit block"]; } - 107 [label="Exit function test_3" style="filled" fillcolor=red]; + 109 [label="Exit function test_3" style="filled" fillcolor=red]; } - 44 -> {45}; - 45 -> {46}; 46 -> {47}; 47 -> {48}; 48 -> {49}; 49 -> {50}; - 49 -> {103} [style=dotted]; 50 -> {51}; 51 -> {52}; - 52 -> {53 84 91}; + 51 -> {105} [style=dotted]; + 52 -> {53}; 53 -> {54}; - 54 -> {55}; + 54 -> {55 86 93}; 55 -> {56}; 56 -> {57}; 57 -> {58}; - 58 -> {59 60}; - 59 -> {66}; - 60 -> {61}; - 61 -> {62}; - 62 -> {107}; - 62 -> {63} [style=dotted]; - 63 -> {64} [style=dotted]; + 58 -> {59}; + 59 -> {60}; + 60 -> {61 62}; + 61 -> {68}; + 62 -> {63}; + 63 -> {64}; + 64 -> {109}; 64 -> {65} [style=dotted]; 65 -> {66} [style=dotted]; - 66 -> {67}; - 67 -> {68}; + 66 -> {67} [style=dotted]; + 67 -> {68} [style=dotted]; 68 -> {69}; 69 -> {70}; 70 -> {71}; 71 -> {72}; - 72 -> {73 84 91}; - 73 -> {74 75}; - 74 -> {81}; - 75 -> {76}; - 76 -> {77}; - 77 -> {103}; - 77 -> {78} [style=dotted]; - 78 -> {79} [style=dotted]; + 72 -> {73}; + 73 -> {74}; + 74 -> {75 86 93}; + 75 -> {76 77}; + 76 -> {83}; + 77 -> {78}; + 78 -> {79}; + 79 -> {105}; 79 -> {80} [style=dotted]; 80 -> {81} [style=dotted]; - 81 -> {82}; - 82 -> {83}; - 83 -> {84 91 98}; + 81 -> {82} [style=dotted]; + 82 -> {83} [style=dotted]; + 83 -> {84}; 84 -> {85}; - 85 -> {86}; + 85 -> {86 93 100}; 86 -> {87}; - 87 -> {103}; - 87 -> {88} [style=dotted]; - 88 -> {89} [style=dotted]; + 87 -> {88}; + 88 -> {89}; + 89 -> {105}; 89 -> {90} [style=dotted]; - 90 -> {98} [style=dotted]; - 91 -> {92}; - 92 -> {93}; + 90 -> {91} [style=dotted]; + 91 -> {92} [style=dotted]; + 92 -> {100} [style=dotted]; 93 -> {94}; - 94 -> {47} [color=green style=dashed]; - 94 -> {95} [style=dotted]; - 95 -> {96} [style=dotted]; + 94 -> {95}; + 95 -> {96}; + 96 -> {49} [color=green style=dashed]; 96 -> {97} [style=dotted]; 97 -> {98} [style=dotted]; - 98 -> {99}; - 99 -> {100}; + 98 -> {99} [style=dotted]; + 99 -> {100} [style=dotted]; 100 -> {101}; 101 -> {102}; - 102 -> {47} [color=green style=dashed]; + 102 -> {103}; 103 -> {104}; - 104 -> {105}; + 104 -> {49} [color=green style=dashed]; 105 -> {106}; 106 -> {107}; + 107 -> {108}; + 108 -> {109}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/variableInitializedInTryBlock.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/variableInitializedInTryBlock.dot index 07cf3973bbb..d391b09216a 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/variableInitializedInTryBlock.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/variableInitializedInTryBlock.dot @@ -5,127 +5,134 @@ digraph variableInitializedInTryBlock_kt { subgraph cluster_0 { color=red - 0 [label="Enter function test" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter block"]; - 2 [label="Variable declaration: lval b: R|kotlin/Boolean|"]; - subgraph cluster_2 { - color=blue - 3 [label="Try expression enter"]; - subgraph cluster_3 { - color=blue - 4 [label="Try main block enter"]; - subgraph cluster_4 { - color=blue - 5 [label="Enter block"]; - 6 [label="Function call: R|/getStringOrNull|()" style="filled" fillcolor=yellow]; - 7 [label="Exit lhs of ?:"]; - 8 [label="Enter rhs of ?:"]; - 9 [label="Jump: ^test Unit"]; - 10 [label="Stub" style="filled" fillcolor=gray]; - 11 [label="Lhs of ?: is not null"]; - 12 [label="Exit ?:"]; - 13 [label="Variable declaration: lval s: R|kotlin/String|"]; - 14 [label="Access variable R|/s|"]; - 15 [label="Access variable R|kotlin/String.length|"]; - 16 [label="Const: Int(0)"]; - 17 [label="Equality operator !="]; - 18 [label="Assignment: R|/b|"]; - 19 [label="Exit block"]; - } - 20 [label="Try main block exit"]; - } - subgraph cluster_5 { - color=blue - 21 [label="Enter finally"]; - subgraph cluster_6 { - color=blue - 22 [label="Enter block"]; - 23 [label="Function call: R|/test|()" style="filled" fillcolor=yellow]; - 24 [label="Exit block"]; - } - 25 [label="Exit finally"]; - } - 26 [label="Try expression exit"]; - } - 27 [label="Access variable R|/b|"]; - 28 [label="Function call: R|/takeBoolean|(...)" style="filled" fillcolor=yellow]; - 29 [label="Exit block"]; - } - 30 [label="Exit function test" style="filled" fillcolor=red]; + 0 [label="Enter file variableInitializedInTryBlock.kt" style="filled" fillcolor=red]; + 1 [label="Exit file variableInitializedInTryBlock.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function test" style="filled" fillcolor=red]; + subgraph cluster_2 { + color=blue + 3 [label="Enter block"]; + 4 [label="Variable declaration: lval b: R|kotlin/Boolean|"]; + subgraph cluster_3 { + color=blue + 5 [label="Try expression enter"]; + subgraph cluster_4 { + color=blue + 6 [label="Try main block enter"]; + subgraph cluster_5 { + color=blue + 7 [label="Enter block"]; + 8 [label="Function call: R|/getStringOrNull|()" style="filled" fillcolor=yellow]; + 9 [label="Exit lhs of ?:"]; + 10 [label="Enter rhs of ?:"]; + 11 [label="Jump: ^test Unit"]; + 12 [label="Stub" style="filled" fillcolor=gray]; + 13 [label="Lhs of ?: is not null"]; + 14 [label="Exit ?:"]; + 15 [label="Variable declaration: lval s: R|kotlin/String|"]; + 16 [label="Access variable R|/s|"]; + 17 [label="Access variable R|kotlin/String.length|"]; + 18 [label="Const: Int(0)"]; + 19 [label="Equality operator !="]; + 20 [label="Assignment: R|/b|"]; + 21 [label="Exit block"]; + } + 22 [label="Try main block exit"]; + } + subgraph cluster_6 { + color=blue + 23 [label="Enter finally"]; + subgraph cluster_7 { + color=blue + 24 [label="Enter block"]; + 25 [label="Function call: R|/test|()" style="filled" fillcolor=yellow]; + 26 [label="Exit block"]; + } + 27 [label="Exit finally"]; + } + 28 [label="Try expression exit"]; + } + 29 [label="Access variable R|/b|"]; + 30 [label="Function call: R|/takeBoolean|(...)" style="filled" fillcolor=yellow]; + 31 [label="Exit block"]; + } + 32 [label="Exit function test" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; 3 -> {4}; - 3 -> {21} [label="onUncaughtException"]; 4 -> {5}; 5 -> {6}; + 5 -> {23} [label="onUncaughtException"]; 6 -> {7}; - 6 -> {21} [label="onUncaughtException"]; - 7 -> {8 11}; + 7 -> {8}; 8 -> {9}; - 9 -> {21} [label="return@/test"]; - 9 -> {10} [style=dotted]; - 10 -> {12} [style=dotted]; - 11 -> {12}; - 12 -> {13}; + 8 -> {23} [label="onUncaughtException"]; + 9 -> {10 13}; + 10 -> {11}; + 11 -> {23} [label="return@/test"]; + 11 -> {12} [style=dotted]; + 12 -> {14} [style=dotted]; 13 -> {14}; 14 -> {15}; - 14 -> {21} [label="onUncaughtException"]; 15 -> {16}; - 15 -> {21} [label="onUncaughtException"]; 16 -> {17}; + 16 -> {23} [label="onUncaughtException"]; 17 -> {18}; - 17 -> {21} [label="onUncaughtException"]; + 17 -> {23} [label="onUncaughtException"]; 18 -> {19}; 19 -> {20}; + 19 -> {23} [label="onUncaughtException"]; 20 -> {21}; 21 -> {22}; 22 -> {23}; 23 -> {24}; 24 -> {25}; 25 -> {26}; - 25 -> {30} [label="return@/test"]; 26 -> {27}; 27 -> {28}; + 27 -> {32} [label="return@/test"]; 28 -> {29}; 29 -> {30}; - - subgraph cluster_7 { - color=red - 31 [label="Enter function takeBoolean" style="filled" fillcolor=red]; - subgraph cluster_8 { - color=blue - 32 [label="Enter block"]; - 33 [label="Exit block"]; - } - 34 [label="Exit function takeBoolean" style="filled" fillcolor=red]; - } + 30 -> {31}; 31 -> {32}; - 32 -> {33}; - 33 -> {34}; - subgraph cluster_9 { + subgraph cluster_8 { color=red - 35 [label="Enter function getStringOrNull" style="filled" fillcolor=red]; - subgraph cluster_10 { + 33 [label="Enter function takeBoolean" style="filled" fillcolor=red]; + subgraph cluster_9 { color=blue - 36 [label="Enter block"]; - 37 [label="Const: String(hello)"]; - 38 [label="Jump: ^getStringOrNull String(hello)"]; - 39 [label="Stub" style="filled" fillcolor=gray]; - 40 [label="Exit block" style="filled" fillcolor=gray]; + 34 [label="Enter block"]; + 35 [label="Exit block"]; } - 41 [label="Exit function getStringOrNull" style="filled" fillcolor=red]; + 36 [label="Exit function takeBoolean" style="filled" fillcolor=red]; } + 33 -> {34}; + 34 -> {35}; 35 -> {36}; - 36 -> {37}; + + subgraph cluster_10 { + color=red + 37 [label="Enter function getStringOrNull" style="filled" fillcolor=red]; + subgraph cluster_11 { + color=blue + 38 [label="Enter block"]; + 39 [label="Const: String(hello)"]; + 40 [label="Jump: ^getStringOrNull String(hello)"]; + 41 [label="Stub" style="filled" fillcolor=gray]; + 42 [label="Exit block" style="filled" fillcolor=gray]; + } + 43 [label="Exit function getStringOrNull" style="filled" fillcolor=red]; + } 37 -> {38}; - 38 -> {41}; - 38 -> {39} [style=dotted]; - 39 -> {40} [style=dotted]; + 38 -> {39}; + 39 -> {40}; + 40 -> {43}; 40 -> {41} [style=dotted]; + 41 -> {42} [style=dotted]; + 42 -> {43} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/when.dot b/compiler/fir/analysis-tests/testData/resolve/cfg/when.dot index e5b6b512903..876011205db 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/when.dot +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/when.dot @@ -5,210 +5,215 @@ digraph when_kt { subgraph cluster_0 { color=red - 0 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_1 { + 0 [label="Enter file when.kt" style="filled" fillcolor=red]; + 1 [label="Exit file when.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 1 [label="Enter block"]; - subgraph cluster_2 { + 3 [label="Enter block"]; + subgraph cluster_3 { color=blue - 2 [label="Enter when"]; - subgraph cluster_3 { - color=blue - 3 [label="Enter when branch condition "]; - 4 [label="Access variable R|/x|"]; - 5 [label="Const: Int(1)"]; - 6 [label="Equality operator =="]; - 7 [label="Exit when branch condition"]; - } + 4 [label="Enter when"]; subgraph cluster_4 { color=blue - 8 [label="Enter when branch condition "]; - 9 [label="Access variable R|/x|"]; - 10 [label="Const: Int(2)"]; - 11 [label="Function call: R|/x|.R|kotlin/Int.rem|(...)" style="filled" fillcolor=yellow]; - 12 [label="Const: Int(0)"]; - 13 [label="Equality operator =="]; - 14 [label="Exit when branch condition"]; + 5 [label="Enter when branch condition "]; + 6 [label="Access variable R|/x|"]; + 7 [label="Const: Int(1)"]; + 8 [label="Equality operator =="]; + 9 [label="Exit when branch condition"]; } subgraph cluster_5 { color=blue - 15 [label="Enter when branch condition "]; - 16 [label="Const: Int(1)"]; - 17 [label="Const: Int(1)"]; - 18 [label="Function call: Int(1).R|kotlin/Int.minus|(...)" style="filled" fillcolor=yellow]; - 19 [label="Const: Int(0)"]; - 20 [label="Equality operator =="]; - 21 [label="Exit when branch condition"]; + 10 [label="Enter when branch condition "]; + 11 [label="Access variable R|/x|"]; + 12 [label="Const: Int(2)"]; + 13 [label="Function call: R|/x|.R|kotlin/Int.rem|(...)" style="filled" fillcolor=yellow]; + 14 [label="Const: Int(0)"]; + 15 [label="Equality operator =="]; + 16 [label="Exit when branch condition"]; } subgraph cluster_6 { color=blue - 22 [label="Enter when branch condition else"]; + 17 [label="Enter when branch condition "]; + 18 [label="Const: Int(1)"]; + 19 [label="Const: Int(1)"]; + 20 [label="Function call: Int(1).R|kotlin/Int.minus|(...)" style="filled" fillcolor=yellow]; + 21 [label="Const: Int(0)"]; + 22 [label="Equality operator =="]; 23 [label="Exit when branch condition"]; } - 24 [label="Enter when branch result"]; subgraph cluster_7 { color=blue - 25 [label="Enter block"]; - 26 [label="Const: Int(5)"]; - 27 [label="Exit block"]; + 24 [label="Enter when branch condition else"]; + 25 [label="Exit when branch condition"]; } - 28 [label="Exit when branch result"]; - 29 [label="Enter when branch result"]; + 26 [label="Enter when branch result"]; subgraph cluster_8 { color=blue - 30 [label="Enter block"]; - 31 [label="Jump: ^test_1 Unit"]; - 32 [label="Stub" style="filled" fillcolor=gray]; - 33 [label="Exit block" style="filled" fillcolor=gray]; + 27 [label="Enter block"]; + 28 [label="Const: Int(5)"]; + 29 [label="Exit block"]; } - 34 [label="Exit when branch result" style="filled" fillcolor=gray]; - 35 [label="Enter when branch result"]; + 30 [label="Exit when branch result"]; + 31 [label="Enter when branch result"]; subgraph cluster_9 { color=blue - 36 [label="Enter block"]; - 37 [label="Const: Int(20)"]; - 38 [label="Exit block"]; + 32 [label="Enter block"]; + 33 [label="Jump: ^test_1 Unit"]; + 34 [label="Stub" style="filled" fillcolor=gray]; + 35 [label="Exit block" style="filled" fillcolor=gray]; } - 39 [label="Exit when branch result"]; - 40 [label="Enter when branch result"]; + 36 [label="Exit when branch result" style="filled" fillcolor=gray]; + 37 [label="Enter when branch result"]; subgraph cluster_10 { color=blue - 41 [label="Enter block"]; - 42 [label="Const: Int(10)"]; - 43 [label="Exit block"]; + 38 [label="Enter block"]; + 39 [label="Const: Int(20)"]; + 40 [label="Exit block"]; } - 44 [label="Exit when branch result"]; - 45 [label="Exit when"]; + 41 [label="Exit when branch result"]; + 42 [label="Enter when branch result"]; + subgraph cluster_11 { + color=blue + 43 [label="Enter block"]; + 44 [label="Const: Int(10)"]; + 45 [label="Exit block"]; + } + 46 [label="Exit when branch result"]; + 47 [label="Exit when"]; } - 46 [label="Variable declaration: lval y: R|kotlin/Int|"]; - 47 [label="Exit block"]; + 48 [label="Variable declaration: lval y: R|kotlin/Int|"]; + 49 [label="Exit block"]; } - 48 [label="Exit function test_1" style="filled" fillcolor=red]; + 50 [label="Exit function test_1" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; 3 -> {4}; 4 -> {5}; 5 -> {6}; 6 -> {7}; - 7 -> {8 40}; + 7 -> {8}; 8 -> {9}; - 9 -> {10}; + 9 -> {10 42}; 10 -> {11}; 11 -> {12}; 12 -> {13}; 13 -> {14}; - 14 -> {15 35}; + 14 -> {15}; 15 -> {16}; - 16 -> {17}; + 16 -> {17 37}; 17 -> {18}; 18 -> {19}; 19 -> {20}; 20 -> {21}; - 21 -> {22 29}; + 21 -> {22}; 22 -> {23}; - 23 -> {24}; + 23 -> {24 31}; 24 -> {25}; 25 -> {26}; 26 -> {27}; 27 -> {28}; - 28 -> {45}; + 28 -> {29}; 29 -> {30}; - 30 -> {31}; - 31 -> {48}; - 31 -> {32} [style=dotted]; - 32 -> {33} [style=dotted]; + 30 -> {47}; + 31 -> {32}; + 32 -> {33}; + 33 -> {50}; 33 -> {34} [style=dotted]; - 34 -> {45} [style=dotted]; - 35 -> {36}; - 36 -> {37}; + 34 -> {35} [style=dotted]; + 35 -> {36} [style=dotted]; + 36 -> {47} [style=dotted]; 37 -> {38}; 38 -> {39}; - 39 -> {45}; + 39 -> {40}; 40 -> {41}; - 41 -> {42}; + 41 -> {47}; 42 -> {43}; 43 -> {44}; 44 -> {45}; 45 -> {46}; 46 -> {47}; 47 -> {48}; - - subgraph cluster_11 { - color=red - 49 [label="Enter class A" style="filled" fillcolor=red]; - 50 [label="Exit class A" style="filled" fillcolor=red]; - } - 49 -> {50} [color=green]; + 48 -> {49}; + 49 -> {50}; subgraph cluster_12 { color=red - 51 [label="Enter class B" style="filled" fillcolor=red]; - 52 [label="Exit class B" style="filled" fillcolor=red]; + 51 [label="Enter class A" style="filled" fillcolor=red]; + 52 [label="Exit class A" style="filled" fillcolor=red]; } 51 -> {52} [color=green]; subgraph cluster_13 { color=red - 53 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_14 { - color=blue - 54 [label="Enter block"]; - subgraph cluster_15 { - color=blue - 55 [label="Enter when"]; - subgraph cluster_16 { - color=blue - 56 [label="Enter when branch condition "]; - subgraph cluster_17 { - color=blue - 57 [label="Enter &&"]; - 58 [label="Access variable R|/x|"]; - 59 [label="Type operator: (R|/x| is R|A|)"]; - 60 [label="Exit left part of &&"]; - 61 [label="Enter right part of &&"]; - 62 [label="Access variable R|/x|"]; - 63 [label="Smart cast: R|/x|"]; - 64 [label="Type operator: (R|/x| is R|B|)"]; - 65 [label="Exit &&"]; - } - 66 [label="Exit when branch condition"]; - } - 67 [label="Synthetic else branch"]; - 68 [label="Enter when branch result"]; - subgraph cluster_18 { - color=blue - 69 [label="Enter block"]; - 70 [label="Access variable R|/x|"]; - 71 [label="Smart cast: R|/x|"]; - 72 [label="Type operator: (R|/x| is R|A|)"]; - 73 [label="Exit block"]; - } - 74 [label="Exit when branch result"]; - 75 [label="Exit when"]; - } - 76 [label="Exit block"]; - } - 77 [label="Exit function test_2" style="filled" fillcolor=red]; + 53 [label="Enter class B" style="filled" fillcolor=red]; + 54 [label="Exit class B" style="filled" fillcolor=red]; + } + 53 -> {54} [color=green]; + + subgraph cluster_14 { + color=red + 55 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_15 { + color=blue + 56 [label="Enter block"]; + subgraph cluster_16 { + color=blue + 57 [label="Enter when"]; + subgraph cluster_17 { + color=blue + 58 [label="Enter when branch condition "]; + subgraph cluster_18 { + color=blue + 59 [label="Enter &&"]; + 60 [label="Access variable R|/x|"]; + 61 [label="Type operator: (R|/x| is R|A|)"]; + 62 [label="Exit left part of &&"]; + 63 [label="Enter right part of &&"]; + 64 [label="Access variable R|/x|"]; + 65 [label="Smart cast: R|/x|"]; + 66 [label="Type operator: (R|/x| is R|B|)"]; + 67 [label="Exit &&"]; + } + 68 [label="Exit when branch condition"]; + } + 69 [label="Synthetic else branch"]; + 70 [label="Enter when branch result"]; + subgraph cluster_19 { + color=blue + 71 [label="Enter block"]; + 72 [label="Access variable R|/x|"]; + 73 [label="Smart cast: R|/x|"]; + 74 [label="Type operator: (R|/x| is R|A|)"]; + 75 [label="Exit block"]; + } + 76 [label="Exit when branch result"]; + 77 [label="Exit when"]; + } + 78 [label="Exit block"]; + } + 79 [label="Exit function test_2" style="filled" fillcolor=red]; } - 53 -> {54}; - 54 -> {55}; 55 -> {56}; 56 -> {57}; 57 -> {58}; 58 -> {59}; 59 -> {60}; - 60 -> {61 65}; + 60 -> {61}; 61 -> {62}; - 62 -> {63}; + 62 -> {63 67}; 63 -> {64}; 64 -> {65}; 65 -> {66}; - 66 -> {67 68}; - 67 -> {75}; - 68 -> {69}; - 69 -> {70}; + 66 -> {67}; + 67 -> {68}; + 68 -> {69 70}; + 69 -> {77}; 70 -> {71}; 71 -> {72}; 72 -> {73}; @@ -216,5 +221,7 @@ digraph when_kt { 74 -> {75}; 75 -> {76}; 76 -> {77}; + 77 -> {78}; + 78 -> {79}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/classCallInLambda.dot b/compiler/fir/analysis-tests/testData/resolve/classCallInLambda.dot index aeede79de74..5b0b8bf971d 100644 --- a/compiler/fir/analysis-tests/testData/resolve/classCallInLambda.dot +++ b/compiler/fir/analysis-tests/testData/resolve/classCallInLambda.dot @@ -5,52 +5,59 @@ digraph classCallInLambda_kt { subgraph cluster_0 { color=red - 0 [label="Enter function test" style="filled" fillcolor=red]; - subgraph cluster_1 { + 0 [label="Enter file classCallInLambda.kt" style="filled" fillcolor=red]; + 1 [label="Exit file classCallInLambda.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function test" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 1 [label="Enter block"]; - 2 [label="Access variable R|/x|"]; - 3 [label="Postponed enter to lambda"]; - subgraph cluster_2 { + 3 [label="Enter block"]; + 4 [label="Access variable R|/x|"]; + 5 [label="Postponed enter to lambda"]; + subgraph cluster_3 { color=blue - 4 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_3 { + 6 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_4 { color=blue - 5 [label="Enter block"]; - 6 [label="Access variable R|/it|"]; - 7 [label="::class call"]; - 8 [label="Exit block"]; + 7 [label="Enter block"]; + 8 [label="Access variable R|/it|"]; + 9 [label="::class call"]; + 10 [label="Exit block"]; } - 9 [label="Exit function " style="filled" fillcolor=red]; + 11 [label="Exit function " style="filled" fillcolor=red]; } - 10 [label="Postponed exit from lambda"]; - 11 [label="Function call: R|/x|.R|kotlin/let||>(...)" style="filled" fillcolor=yellow]; - 12 [label="Jump: ^test R|/x|.R|kotlin/let||>( = let@fun (it: R|kotlin/String|): R|kotlin/reflect/KClass| { + 12 [label="Postponed exit from lambda"]; + 13 [label="Function call: R|/x|.R|kotlin/let||>(...)" style="filled" fillcolor=yellow]; + 14 [label="Jump: ^test R|/x|.R|kotlin/let||>( = let@fun (it: R|kotlin/String|): R|kotlin/reflect/KClass| { ^ (R|/it|) } )"]; - 13 [label="Stub" style="filled" fillcolor=gray]; - 14 [label="Exit block" style="filled" fillcolor=gray]; + 15 [label="Stub" style="filled" fillcolor=gray]; + 16 [label="Exit block" style="filled" fillcolor=gray]; } - 15 [label="Exit function test" style="filled" fillcolor=red]; + 17 [label="Exit function test" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; - 3 -> {4 11}; - 3 -> {10} [style=dotted]; - 3 -> {4} [style=dashed]; + 3 -> {4}; 4 -> {5}; - 5 -> {6}; + 5 -> {6 13}; + 5 -> {12} [style=dotted]; + 5 -> {6} [style=dashed]; 6 -> {7}; 7 -> {8}; 8 -> {9}; 9 -> {10}; 10 -> {11}; 11 -> {12}; - 12 -> {15}; - 12 -> {13} [style=dotted]; - 13 -> {14} [style=dotted]; + 12 -> {13}; + 13 -> {14}; + 14 -> {17}; 14 -> {15} [style=dotted]; + 15 -> {16} [style=dotted]; + 16 -> {17} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/elvisReturnSimple.dot b/compiler/fir/analysis-tests/testData/resolve/elvisReturnSimple.dot index a513e08b0e3..1dfaa8a72f8 100644 --- a/compiler/fir/analysis-tests/testData/resolve/elvisReturnSimple.dot +++ b/compiler/fir/analysis-tests/testData/resolve/elvisReturnSimple.dot @@ -5,96 +5,103 @@ digraph elvisReturnSimple_kt { subgraph cluster_0 { color=red - 0 [label="Enter function stringReturnInLeftLen" style="filled" fillcolor=red]; - subgraph cluster_1 { + 0 [label="Enter file elvisReturnSimple.kt" style="filled" fillcolor=red]; + 1 [label="Exit file elvisReturnSimple.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function stringReturnInLeftLen" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 1 [label="Enter block"]; - subgraph cluster_2 { + 3 [label="Enter block"]; + subgraph cluster_3 { color=blue - 2 [label="Enter when"]; - subgraph cluster_3 { - color=blue - 3 [label="Enter when branch condition "]; - 4 [label="Access variable R|/s|"]; - 5 [label="Const: Null(null)"]; - 6 [label="Equality operator !="]; - 7 [label="Exit when branch condition"]; - } + 4 [label="Enter when"]; subgraph cluster_4 { color=blue - 8 [label="Enter when branch condition else"]; + 5 [label="Enter when branch condition "]; + 6 [label="Access variable R|/s|"]; + 7 [label="Const: Null(null)"]; + 8 [label="Equality operator !="]; 9 [label="Exit when branch condition"]; } - 10 [label="Enter when branch result"]; subgraph cluster_5 { color=blue - 11 [label="Enter block"]; - 12 [label="Const: Null(null)"]; - 13 [label="Exit block"]; + 10 [label="Enter when branch condition else"]; + 11 [label="Exit when branch condition"]; } - 14 [label="Exit when branch result"]; - 15 [label="Enter when branch result"]; + 12 [label="Enter when branch result"]; subgraph cluster_6 { color=blue - 16 [label="Enter block"]; - 17 [label="Access variable R|/s|"]; - 18 [label="Smart cast: R|/s|"]; - 19 [label="Access variable R|kotlin/String.length|"]; - 20 [label="Jump: ^stringReturnInLeftLen R|/s|.R|kotlin/String.length|"]; - 21 [label="Stub" style="filled" fillcolor=gray]; - 22 [label="Exit block" style="filled" fillcolor=gray]; + 13 [label="Enter block"]; + 14 [label="Const: Null(null)"]; + 15 [label="Exit block"]; } - 23 [label="Exit when branch result" style="filled" fillcolor=gray]; - 24 [label="Exit when"]; + 16 [label="Exit when branch result"]; + 17 [label="Enter when branch result"]; + subgraph cluster_7 { + color=blue + 18 [label="Enter block"]; + 19 [label="Access variable R|/s|"]; + 20 [label="Smart cast: R|/s|"]; + 21 [label="Access variable R|kotlin/String.length|"]; + 22 [label="Jump: ^stringReturnInLeftLen R|/s|.R|kotlin/String.length|"]; + 23 [label="Stub" style="filled" fillcolor=gray]; + 24 [label="Exit block" style="filled" fillcolor=gray]; + } + 25 [label="Exit when branch result" style="filled" fillcolor=gray]; + 26 [label="Exit when"]; } - 25 [label="Exit lhs of ?:"]; - 26 [label="Enter rhs of ?:"]; - 27 [label="Const: Int(0)"]; - 28 [label="Jump: ^stringReturnInLeftLen Int(0)"]; - 29 [label="Stub" style="filled" fillcolor=gray]; - 30 [label="Lhs of ?: is not null" style="filled" fillcolor=gray]; - 31 [label="Exit ?:" style="filled" fillcolor=gray]; - 32 [label="Variable declaration: lval s1: R|kotlin/Nothing|" style="filled" fillcolor=gray]; - 33 [label="Exit block" style="filled" fillcolor=gray]; + 27 [label="Exit lhs of ?:"]; + 28 [label="Enter rhs of ?:"]; + 29 [label="Const: Int(0)"]; + 30 [label="Jump: ^stringReturnInLeftLen Int(0)"]; + 31 [label="Stub" style="filled" fillcolor=gray]; + 32 [label="Lhs of ?: is not null" style="filled" fillcolor=gray]; + 33 [label="Exit ?:" style="filled" fillcolor=gray]; + 34 [label="Variable declaration: lval s1: R|kotlin/Nothing|" style="filled" fillcolor=gray]; + 35 [label="Exit block" style="filled" fillcolor=gray]; } - 34 [label="Exit function stringReturnInLeftLen" style="filled" fillcolor=red]; + 36 [label="Exit function stringReturnInLeftLen" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; 3 -> {4}; 4 -> {5}; 5 -> {6}; 6 -> {7}; - 7 -> {8 15}; + 7 -> {8}; 8 -> {9}; - 9 -> {10}; + 9 -> {10 17}; 10 -> {11}; 11 -> {12}; 12 -> {13}; 13 -> {14}; - 14 -> {24}; + 14 -> {15}; 15 -> {16}; - 16 -> {17}; + 16 -> {26}; 17 -> {18}; 18 -> {19}; 19 -> {20}; - 20 -> {34}; - 20 -> {21} [style=dotted]; - 21 -> {22} [style=dotted]; + 20 -> {21}; + 21 -> {22}; + 22 -> {36}; 22 -> {23} [style=dotted]; 23 -> {24} [style=dotted]; - 24 -> {25}; - 25 -> {26}; - 25 -> {30} [style=dotted]; + 24 -> {25} [style=dotted]; + 25 -> {26} [style=dotted]; 26 -> {27}; 27 -> {28}; - 28 -> {34}; - 28 -> {29} [style=dotted]; - 29 -> {31} [style=dotted]; + 27 -> {32} [style=dotted]; + 28 -> {29}; + 29 -> {30}; + 30 -> {36}; 30 -> {31} [style=dotted]; - 31 -> {32} [style=dotted]; + 31 -> {33} [style=dotted]; 32 -> {33} [style=dotted]; 33 -> {34} [style=dotted]; + 34 -> {35} [style=dotted]; + 35 -> {36} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/positive/exhaustiveWhenAndDNNType.dot b/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/positive/exhaustiveWhenAndDNNType.dot index af04cc2f986..e69d8a2fda0 100644 --- a/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/positive/exhaustiveWhenAndDNNType.dot +++ b/compiler/fir/analysis-tests/testData/resolve/exhaustiveness/positive/exhaustiveWhenAndDNNType.dot @@ -5,113 +5,118 @@ digraph exhaustiveWhenAndDNNType_kt { subgraph cluster_0 { color=red - 0 [label="Enter class SomeEnum" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter function " style="filled" fillcolor=red]; - 2 [label="Delegated constructor call: super|>()" style="filled" fillcolor=yellow]; - 3 [label="Exit function " style="filled" fillcolor=red]; - } - 4 [label="Exit class SomeEnum" style="filled" fillcolor=red]; + 0 [label="Enter file exhaustiveWhenAndDNNType.kt" style="filled" fillcolor=red]; + 1 [label="Exit file exhaustiveWhenAndDNNType.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; - 0 -> {4} [style=dotted]; - 0 -> {1} [style=dashed]; - 1 -> {2}; - 2 -> {3}; - 3 -> {4} [color=green]; - subgraph cluster_2 { + subgraph cluster_1 { color=red - 5 [label="Enter class B" style="filled" fillcolor=red]; - subgraph cluster_3 { + 2 [label="Enter class SomeEnum" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 6 [label="Enter function " style="filled" fillcolor=red]; - 7 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 8 [label="Exit function " style="filled" fillcolor=red]; + 3 [label="Enter function " style="filled" fillcolor=red]; + 4 [label="Delegated constructor call: super|>()" style="filled" fillcolor=yellow]; + 5 [label="Exit function " style="filled" fillcolor=red]; } - 9 [label="Exit class B" style="filled" fillcolor=red]; + 6 [label="Exit class SomeEnum" style="filled" fillcolor=red]; } + 2 -> {3} [color=green]; + 2 -> {6} [style=dotted]; + 2 -> {3} [style=dashed]; + 3 -> {4}; + 4 -> {5}; 5 -> {6} [color=green]; - 5 -> {9} [style=dotted]; - 5 -> {6} [style=dashed]; - 6 -> {7}; - 7 -> {8}; - 8 -> {9} [color=green]; - subgraph cluster_4 { + subgraph cluster_3 { color=red - 10 [label="Enter function takeB" style="filled" fillcolor=red]; - subgraph cluster_5 { + 7 [label="Enter class B" style="filled" fillcolor=red]; + subgraph cluster_4 { color=blue - 11 [label="Enter block"]; - 12 [label="Exit block"]; + 8 [label="Enter function " style="filled" fillcolor=red]; + 9 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 10 [label="Exit function " style="filled" fillcolor=red]; } - 13 [label="Exit function takeB" style="filled" fillcolor=red]; + 11 [label="Exit class B" style="filled" fillcolor=red]; } - 10 -> {11}; - 11 -> {12}; - 12 -> {13}; + 7 -> {8} [color=green]; + 7 -> {11} [style=dotted]; + 7 -> {8} [style=dashed]; + 8 -> {9}; + 9 -> {10}; + 10 -> {11} [color=green]; - subgraph cluster_6 { + subgraph cluster_5 { color=red - 14 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_7 { + 12 [label="Enter function takeB" style="filled" fillcolor=red]; + subgraph cluster_6 { color=blue - 15 [label="Enter block"]; - 16 [label="Access qualifier /SomeEnum"]; - 17 [label="Access variable R|/SomeEnum.A1|"]; - 18 [label="Variable declaration: lval flag: R|SomeEnum|"]; - subgraph cluster_8 { + 13 [label="Enter block"]; + 14 [label="Exit block"]; + } + 15 [label="Exit function takeB" style="filled" fillcolor=red]; + } + 12 -> {13}; + 13 -> {14}; + 14 -> {15}; + + subgraph cluster_7 { + color=red + 16 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_8 { + color=blue + 17 [label="Enter block"]; + 18 [label="Access qualifier /SomeEnum"]; + 19 [label="Access variable R|/SomeEnum.A1|"]; + 20 [label="Variable declaration: lval flag: R|SomeEnum|"]; + subgraph cluster_9 { color=blue - 19 [label="Enter when"]; - 20 [label="Access variable R|/flag|"]; - 21 [label="Check not null: R|/flag|!!" style="filled" fillcolor=yellow]; - subgraph cluster_9 { - color=blue - 22 [label="Enter when branch condition "]; - 23 [label="Exit $subj"]; - 24 [label="Access qualifier /SomeEnum"]; - 25 [label="Access variable R|/SomeEnum.A1|"]; - 26 [label="Equality operator =="]; - 27 [label="Exit when branch condition"]; - } + 21 [label="Enter when"]; + 22 [label="Access variable R|/flag|"]; + 23 [label="Check not null: R|/flag|!!" style="filled" fillcolor=yellow]; subgraph cluster_10 { color=blue - 28 [label="Enter when branch condition "]; - 29 [label="Exit $subj"]; - 30 [label="Access qualifier /SomeEnum"]; - 31 [label="Access variable R|/SomeEnum.A2|"]; - 32 [label="Equality operator =="]; - 33 [label="Exit when branch condition"]; + 24 [label="Enter when branch condition "]; + 25 [label="Exit $subj"]; + 26 [label="Access qualifier /SomeEnum"]; + 27 [label="Access variable R|/SomeEnum.A1|"]; + 28 [label="Equality operator =="]; + 29 [label="Exit when branch condition"]; } - 34 [label="Enter when branch result"]; subgraph cluster_11 { color=blue - 35 [label="Enter block"]; - 36 [label="Function call: R|/B.B|()" style="filled" fillcolor=yellow]; - 37 [label="Exit block"]; + 30 [label="Enter when branch condition "]; + 31 [label="Exit $subj"]; + 32 [label="Access qualifier /SomeEnum"]; + 33 [label="Access variable R|/SomeEnum.A2|"]; + 34 [label="Equality operator =="]; + 35 [label="Exit when branch condition"]; } - 38 [label="Exit when branch result"]; - 39 [label="Enter when branch result"]; + 36 [label="Enter when branch result"]; subgraph cluster_12 { color=blue - 40 [label="Enter block"]; - 41 [label="Function call: R|/B.B|()" style="filled" fillcolor=yellow]; - 42 [label="Exit block"]; + 37 [label="Enter block"]; + 38 [label="Function call: R|/B.B|()" style="filled" fillcolor=yellow]; + 39 [label="Exit block"]; } - 43 [label="Exit when branch result"]; - 44 [label="Exit when"]; + 40 [label="Exit when branch result"]; + 41 [label="Enter when branch result"]; + subgraph cluster_13 { + color=blue + 42 [label="Enter block"]; + 43 [label="Function call: R|/B.B|()" style="filled" fillcolor=yellow]; + 44 [label="Exit block"]; + } + 45 [label="Exit when branch result"]; + 46 [label="Exit when"]; } - 45 [label="Variable declaration: lval b: R|B|"]; - 46 [label="Access variable R|/b|"]; - 47 [label="Function call: R|/takeB|(...)" style="filled" fillcolor=yellow]; - 48 [label="Exit block"]; + 47 [label="Variable declaration: lval b: R|B|"]; + 48 [label="Access variable R|/b|"]; + 49 [label="Function call: R|/takeB|(...)" style="filled" fillcolor=yellow]; + 50 [label="Exit block"]; } - 49 [label="Exit function test_1" style="filled" fillcolor=red]; + 51 [label="Exit function test_1" style="filled" fillcolor=red]; } - 14 -> {15}; - 15 -> {16}; 16 -> {17}; 17 -> {18}; 18 -> {19}; @@ -123,9 +128,9 @@ digraph exhaustiveWhenAndDNNType_kt { 24 -> {25}; 25 -> {26}; 26 -> {27}; - 27 -> {28 39}; + 27 -> {28}; 28 -> {29}; - 29 -> {30}; + 29 -> {30 41}; 30 -> {31}; 31 -> {32}; 32 -> {33}; @@ -134,9 +139,9 @@ digraph exhaustiveWhenAndDNNType_kt { 35 -> {36}; 36 -> {37}; 37 -> {38}; - 38 -> {44}; + 38 -> {39}; 39 -> {40}; - 40 -> {41}; + 40 -> {46}; 41 -> {42}; 42 -> {43}; 43 -> {44}; @@ -145,66 +150,66 @@ digraph exhaustiveWhenAndDNNType_kt { 46 -> {47}; 47 -> {48}; 48 -> {49}; + 49 -> {50}; + 50 -> {51}; - subgraph cluster_13 { + subgraph cluster_14 { color=red - 50 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_14 { + 52 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_15 { color=blue - 51 [label="Enter block"]; - 52 [label="Access qualifier /SomeEnum"]; - 53 [label="Access variable R|/SomeEnum.A1|"]; - 54 [label="Variable declaration: lval flag: R|SomeEnum|"]; - subgraph cluster_15 { + 53 [label="Enter block"]; + 54 [label="Access qualifier /SomeEnum"]; + 55 [label="Access variable R|/SomeEnum.A1|"]; + 56 [label="Variable declaration: lval flag: R|SomeEnum|"]; + subgraph cluster_16 { color=blue - 55 [label="Enter when"]; - 56 [label="Access variable R|/flag|"]; - 57 [label="Check not null: R|/flag|!!" style="filled" fillcolor=yellow]; - subgraph cluster_16 { - color=blue - 58 [label="Enter when branch condition "]; - 59 [label="Exit $subj"]; - 60 [label="Access qualifier /SomeEnum"]; - 61 [label="Access variable R|/SomeEnum.A1|"]; - 62 [label="Equality operator =="]; - 63 [label="Exit when branch condition"]; - } + 57 [label="Enter when"]; + 58 [label="Access variable R|/flag|"]; + 59 [label="Check not null: R|/flag|!!" style="filled" fillcolor=yellow]; subgraph cluster_17 { color=blue - 64 [label="Enter when branch condition "]; - 65 [label="Exit $subj"]; - 66 [label="Access qualifier /SomeEnum"]; - 67 [label="Access variable R|/SomeEnum.A2|"]; - 68 [label="Equality operator =="]; - 69 [label="Exit when branch condition"]; + 60 [label="Enter when branch condition "]; + 61 [label="Exit $subj"]; + 62 [label="Access qualifier /SomeEnum"]; + 63 [label="Access variable R|/SomeEnum.A1|"]; + 64 [label="Equality operator =="]; + 65 [label="Exit when branch condition"]; } - 70 [label="Enter when branch result"]; subgraph cluster_18 { color=blue - 71 [label="Enter block"]; - 72 [label="Function call: R|/B.B|()" style="filled" fillcolor=yellow]; - 73 [label="Exit block"]; + 66 [label="Enter when branch condition "]; + 67 [label="Exit $subj"]; + 68 [label="Access qualifier /SomeEnum"]; + 69 [label="Access variable R|/SomeEnum.A2|"]; + 70 [label="Equality operator =="]; + 71 [label="Exit when branch condition"]; } - 74 [label="Exit when branch result"]; - 75 [label="Enter when branch result"]; + 72 [label="Enter when branch result"]; subgraph cluster_19 { color=blue - 76 [label="Enter block"]; - 77 [label="Function call: R|/B.B|()" style="filled" fillcolor=yellow]; - 78 [label="Exit block"]; + 73 [label="Enter block"]; + 74 [label="Function call: R|/B.B|()" style="filled" fillcolor=yellow]; + 75 [label="Exit block"]; } - 79 [label="Exit when branch result"]; - 80 [label="Exit when"]; + 76 [label="Exit when branch result"]; + 77 [label="Enter when branch result"]; + subgraph cluster_20 { + color=blue + 78 [label="Enter block"]; + 79 [label="Function call: R|/B.B|()" style="filled" fillcolor=yellow]; + 80 [label="Exit block"]; + } + 81 [label="Exit when branch result"]; + 82 [label="Exit when"]; } - 81 [label="Variable declaration: lval b: R|B|"]; - 82 [label="Access variable R|/b|"]; - 83 [label="Function call: R|/takeB|(...)" style="filled" fillcolor=yellow]; - 84 [label="Exit block"]; + 83 [label="Variable declaration: lval b: R|B|"]; + 84 [label="Access variable R|/b|"]; + 85 [label="Function call: R|/takeB|(...)" style="filled" fillcolor=yellow]; + 86 [label="Exit block"]; } - 85 [label="Exit function test_2" style="filled" fillcolor=red]; + 87 [label="Exit function test_2" style="filled" fillcolor=red]; } - 50 -> {51}; - 51 -> {52}; 52 -> {53}; 53 -> {54}; 54 -> {55}; @@ -216,9 +221,9 @@ digraph exhaustiveWhenAndDNNType_kt { 60 -> {61}; 61 -> {62}; 62 -> {63}; - 63 -> {64 75}; + 63 -> {64}; 64 -> {65}; - 65 -> {66}; + 65 -> {66 77}; 66 -> {67}; 67 -> {68}; 68 -> {69}; @@ -227,9 +232,9 @@ digraph exhaustiveWhenAndDNNType_kt { 71 -> {72}; 72 -> {73}; 73 -> {74}; - 74 -> {80}; + 74 -> {75}; 75 -> {76}; - 76 -> {77}; + 76 -> {82}; 77 -> {78}; 78 -> {79}; 79 -> {80}; @@ -238,65 +243,65 @@ digraph exhaustiveWhenAndDNNType_kt { 82 -> {83}; 83 -> {84}; 84 -> {85}; + 85 -> {86}; + 86 -> {87}; - subgraph cluster_20 { + subgraph cluster_21 { color=red - 86 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_21 { + 88 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_22 { color=blue - 87 [label="Enter block"]; - 88 [label="Access qualifier /SomeEnum"]; - 89 [label="Access variable R|/SomeEnum.A1|"]; - 90 [label="Variable declaration: lval flag: R|SomeEnum|"]; - subgraph cluster_22 { + 89 [label="Enter block"]; + 90 [label="Access qualifier /SomeEnum"]; + 91 [label="Access variable R|/SomeEnum.A1|"]; + 92 [label="Variable declaration: lval flag: R|SomeEnum|"]; + subgraph cluster_23 { color=blue - 91 [label="Enter when"]; - 92 [label="Access variable R|/flag|"]; - subgraph cluster_23 { - color=blue - 93 [label="Enter when branch condition "]; - 94 [label="Exit $subj"]; - 95 [label="Access qualifier /SomeEnum"]; - 96 [label="Access variable R|/SomeEnum.A1|"]; - 97 [label="Equality operator =="]; - 98 [label="Exit when branch condition"]; - } + 93 [label="Enter when"]; + 94 [label="Access variable R|/flag|"]; subgraph cluster_24 { color=blue - 99 [label="Enter when branch condition "]; - 100 [label="Exit $subj"]; - 101 [label="Access qualifier /SomeEnum"]; - 102 [label="Access variable R|/SomeEnum.A2|"]; - 103 [label="Equality operator =="]; - 104 [label="Exit when branch condition"]; + 95 [label="Enter when branch condition "]; + 96 [label="Exit $subj"]; + 97 [label="Access qualifier /SomeEnum"]; + 98 [label="Access variable R|/SomeEnum.A1|"]; + 99 [label="Equality operator =="]; + 100 [label="Exit when branch condition"]; } - 105 [label="Enter when branch result"]; subgraph cluster_25 { color=blue - 106 [label="Enter block"]; - 107 [label="Function call: R|/B.B|()" style="filled" fillcolor=yellow]; - 108 [label="Exit block"]; + 101 [label="Enter when branch condition "]; + 102 [label="Exit $subj"]; + 103 [label="Access qualifier /SomeEnum"]; + 104 [label="Access variable R|/SomeEnum.A2|"]; + 105 [label="Equality operator =="]; + 106 [label="Exit when branch condition"]; } - 109 [label="Exit when branch result"]; - 110 [label="Enter when branch result"]; + 107 [label="Enter when branch result"]; subgraph cluster_26 { color=blue - 111 [label="Enter block"]; - 112 [label="Function call: R|/B.B|()" style="filled" fillcolor=yellow]; - 113 [label="Exit block"]; + 108 [label="Enter block"]; + 109 [label="Function call: R|/B.B|()" style="filled" fillcolor=yellow]; + 110 [label="Exit block"]; } - 114 [label="Exit when branch result"]; - 115 [label="Exit when"]; + 111 [label="Exit when branch result"]; + 112 [label="Enter when branch result"]; + subgraph cluster_27 { + color=blue + 113 [label="Enter block"]; + 114 [label="Function call: R|/B.B|()" style="filled" fillcolor=yellow]; + 115 [label="Exit block"]; + } + 116 [label="Exit when branch result"]; + 117 [label="Exit when"]; } - 116 [label="Variable declaration: lval b: R|B|"]; - 117 [label="Access variable R|/b|"]; - 118 [label="Function call: R|/takeB|(...)" style="filled" fillcolor=yellow]; - 119 [label="Exit block"]; + 118 [label="Variable declaration: lval b: R|B|"]; + 119 [label="Access variable R|/b|"]; + 120 [label="Function call: R|/takeB|(...)" style="filled" fillcolor=yellow]; + 121 [label="Exit block"]; } - 120 [label="Exit function test_3" style="filled" fillcolor=red]; + 122 [label="Exit function test_3" style="filled" fillcolor=red]; } - 86 -> {87}; - 87 -> {88}; 88 -> {89}; 89 -> {90}; 90 -> {91}; @@ -307,9 +312,9 @@ digraph exhaustiveWhenAndDNNType_kt { 95 -> {96}; 96 -> {97}; 97 -> {98}; - 98 -> {99 110}; + 98 -> {99}; 99 -> {100}; - 100 -> {101}; + 100 -> {101 112}; 101 -> {102}; 102 -> {103}; 103 -> {104}; @@ -318,9 +323,9 @@ digraph exhaustiveWhenAndDNNType_kt { 106 -> {107}; 107 -> {108}; 108 -> {109}; - 109 -> {115}; + 109 -> {110}; 110 -> {111}; - 111 -> {112}; + 111 -> {117}; 112 -> {113}; 113 -> {114}; 114 -> {115}; @@ -329,5 +334,7 @@ digraph exhaustiveWhenAndDNNType_kt { 117 -> {118}; 118 -> {119}; 119 -> {120}; + 120 -> {121}; + 121 -> {122}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/problems/secondaryConstructorCfg.dot b/compiler/fir/analysis-tests/testData/resolve/problems/secondaryConstructorCfg.dot index 58cf14a0d00..c5f94143ca7 100644 --- a/compiler/fir/analysis-tests/testData/resolve/problems/secondaryConstructorCfg.dot +++ b/compiler/fir/analysis-tests/testData/resolve/problems/secondaryConstructorCfg.dot @@ -5,88 +5,95 @@ digraph secondaryConstructorCfg_kt { subgraph cluster_0 { color=red - 0 [label="Enter class B" style="filled" fillcolor=red]; - subgraph cluster_1 { + 0 [label="Enter file secondaryConstructorCfg.kt" style="filled" fillcolor=red]; + 1 [label="Exit file secondaryConstructorCfg.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter class B" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 1 [label="Enter function " style="filled" fillcolor=red]; - 2 [label="Access variable R|/p0|"]; - 3 [label="Delegated constructor call: this(...)" style="filled" fillcolor=yellow]; - subgraph cluster_2 { - color=blue - 4 [label="Enter property" style="filled" fillcolor=red]; - 5 [label="Access variable R|/p0|"]; - 6 [label="Exit property" style="filled" fillcolor=red]; - } + 3 [label="Enter function " style="filled" fillcolor=red]; + 4 [label="Access variable R|/p0|"]; + 5 [label="Delegated constructor call: this(...)" style="filled" fillcolor=yellow]; subgraph cluster_3 { color=blue - 7 [label="Enter property" style="filled" fillcolor=red]; - 8 [label="Access variable R|/p0|"]; - 9 [label="Access variable R|kotlin/String.length|"]; - 10 [label="Exit property" style="filled" fillcolor=red]; + 6 [label="Enter property" style="filled" fillcolor=red]; + 7 [label="Access variable R|/p0|"]; + 8 [label="Exit property" style="filled" fillcolor=red]; } subgraph cluster_4 { color=blue - 11 [label="Enter init block" style="filled" fillcolor=red]; - subgraph cluster_5 { - color=blue - 12 [label="Enter block"]; - 13 [label="Access variable R|/p0|"]; - 14 [label="Access variable R|kotlin/String.length|"]; - 15 [label="Assignment: R|/B.p1|"]; - 16 [label="Const: String()"]; - 17 [label="Assignment: R|/B.p3|"]; - 18 [label="Exit block"]; - } - 19 [label="Exit init block" style="filled" fillcolor=red]; + 9 [label="Enter property" style="filled" fillcolor=red]; + 10 [label="Access variable R|/p0|"]; + 11 [label="Access variable R|kotlin/String.length|"]; + 12 [label="Exit property" style="filled" fillcolor=red]; } - subgraph cluster_6 { + subgraph cluster_5 { color=blue - 20 [label="Enter function " style="filled" fillcolor=red]; - 21 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 22 [label="Exit function " style="filled" fillcolor=red]; + 13 [label="Enter init block" style="filled" fillcolor=red]; + subgraph cluster_6 { + color=blue + 14 [label="Enter block"]; + 15 [label="Access variable R|/p0|"]; + 16 [label="Access variable R|kotlin/String.length|"]; + 17 [label="Assignment: R|/B.p1|"]; + 18 [label="Const: String()"]; + 19 [label="Assignment: R|/B.p3|"]; + 20 [label="Exit block"]; + } + 21 [label="Exit init block" style="filled" fillcolor=red]; } subgraph cluster_7 { color=blue - 23 [label="Enter block"]; - 24 [label="Access variable R|/p1|"]; - 25 [label="Assignment: R|/B.p3|"]; - 26 [label="Exit block"]; + 22 [label="Enter function " style="filled" fillcolor=red]; + 23 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 24 [label="Exit function " style="filled" fillcolor=red]; } - 27 [label="Exit function " style="filled" fillcolor=red]; + subgraph cluster_8 { + color=blue + 25 [label="Enter block"]; + 26 [label="Access variable R|/p1|"]; + 27 [label="Assignment: R|/B.p3|"]; + 28 [label="Exit block"]; + } + 29 [label="Exit function " style="filled" fillcolor=red]; } - 28 [label="Exit class B" style="filled" fillcolor=red]; + 30 [label="Exit class B" style="filled" fillcolor=red]; } - 0 -> {1 4} [color=green]; - 0 -> {28} [style=dotted]; - 0 -> {1 4 7 11 20} [style=dashed]; - 1 -> {2}; - 2 -> {3}; - 3 -> {4} [color=green label="return@/B.B"]; - 3 -> {23} [color=red]; + 2 -> {3 6} [color=green]; + 2 -> {30} [style=dotted]; + 2 -> {3 6 9 13 22} [style=dashed]; + 3 -> {4}; 4 -> {5}; - 5 -> {6}; - 6 -> {7} [color=green]; + 5 -> {6} [color=green label="return@/B.B"]; + 5 -> {25} [color=red]; + 6 -> {7}; 7 -> {8}; - 8 -> {9}; + 8 -> {9} [color=green]; 9 -> {10}; - 10 -> {11} [color=green]; + 10 -> {11}; 11 -> {12}; - 12 -> {13}; + 12 -> {13} [color=green]; 13 -> {14}; 14 -> {15}; 15 -> {16}; 16 -> {17}; 17 -> {18}; 18 -> {19}; - 19 -> {20} [color=green]; + 19 -> {20}; 20 -> {21}; - 21 -> {22}; - 22 -> {23} [color=green label="return@/B.B"]; - 22 -> {28} [color=green]; + 21 -> {22} [color=green]; + 22 -> {23}; 23 -> {24}; - 24 -> {25}; + 24 -> {25} [color=green label="return@/B.B"]; + 24 -> {30} [color=green]; 25 -> {26}; 26 -> {27}; - 27 -> {28} [color=green]; + 27 -> {28}; + 28 -> {29}; + 29 -> {30} [color=green]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/bangbang.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/bangbang.dot index 189f4e2f1cc..545da88d0d7 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/bangbang.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/bangbang.dot @@ -5,36 +5,41 @@ digraph bangbang_kt { subgraph cluster_0 { color=red - 0 [label="Enter class A" style="filled" fillcolor=red]; - 1 [label="Exit class A" style="filled" fillcolor=red]; + 0 [label="Enter file bangbang.kt" style="filled" fillcolor=red]; + 1 [label="Exit file bangbang.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; subgraph cluster_1 { color=red - 2 [label="Enter function foo" style="filled" fillcolor=red]; - 3 [label="Exit function foo" style="filled" fillcolor=red]; + 2 [label="Enter class A" style="filled" fillcolor=red]; + 3 [label="Exit class A" style="filled" fillcolor=red]; } - 2 -> {3}; + 2 -> {3} [color=green]; subgraph cluster_2 { color=red - 4 [label="Enter function test_0" style="filled" fillcolor=red]; - subgraph cluster_3 { - color=blue - 5 [label="Enter block"]; - 6 [label="Access variable R|/a|"]; - 7 [label="Check not null: R|/a|!!" style="filled" fillcolor=yellow]; - 8 [label="Function call: R|/a|!!.R|/A.foo|()" style="filled" fillcolor=yellow]; - 9 [label="Access variable R|/a|"]; - 10 [label="Smart cast: R|/a|"]; - 11 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 12 [label="Exit block"]; - } - 13 [label="Exit function test_0" style="filled" fillcolor=red]; + 4 [label="Enter function foo" style="filled" fillcolor=red]; + 5 [label="Exit function foo" style="filled" fillcolor=red]; } 4 -> {5}; - 5 -> {6}; + + subgraph cluster_3 { + color=red + 6 [label="Enter function test_0" style="filled" fillcolor=red]; + subgraph cluster_4 { + color=blue + 7 [label="Enter block"]; + 8 [label="Access variable R|/a|"]; + 9 [label="Check not null: R|/a|!!" style="filled" fillcolor=yellow]; + 10 [label="Function call: R|/a|!!.R|/A.foo|()" style="filled" fillcolor=yellow]; + 11 [label="Access variable R|/a|"]; + 12 [label="Smart cast: R|/a|"]; + 13 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 14 [label="Exit block"]; + } + 15 [label="Exit function test_0" style="filled" fillcolor=red]; + } 6 -> {7}; 7 -> {8}; 8 -> {9}; @@ -42,55 +47,55 @@ digraph bangbang_kt { 10 -> {11}; 11 -> {12}; 12 -> {13}; + 13 -> {14}; + 14 -> {15}; - subgraph cluster_4 { + subgraph cluster_5 { color=red - 14 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_5 { + 16 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_6 { color=blue - 15 [label="Enter block"]; - subgraph cluster_6 { + 17 [label="Enter block"]; + subgraph cluster_7 { color=blue - 16 [label="Enter when"]; - subgraph cluster_7 { - color=blue - 17 [label="Enter when branch condition "]; - 18 [label="Access variable R|/a|"]; - 19 [label="Check not null: R|/a|!!" style="filled" fillcolor=yellow]; - 20 [label="Function call: R|/a|!!.R|/A.foo|()" style="filled" fillcolor=yellow]; - 21 [label="Exit when branch condition"]; - } - 22 [label="Synthetic else branch"]; - 23 [label="Enter when branch result"]; + 18 [label="Enter when"]; subgraph cluster_8 { color=blue - 24 [label="Enter block"]; - 25 [label="Access variable R|/a|"]; - 26 [label="Smart cast: R|/a|"]; - 27 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 28 [label="Exit block"]; + 19 [label="Enter when branch condition "]; + 20 [label="Access variable R|/a|"]; + 21 [label="Check not null: R|/a|!!" style="filled" fillcolor=yellow]; + 22 [label="Function call: R|/a|!!.R|/A.foo|()" style="filled" fillcolor=yellow]; + 23 [label="Exit when branch condition"]; } - 29 [label="Exit when branch result"]; - 30 [label="Exit when"]; + 24 [label="Synthetic else branch"]; + 25 [label="Enter when branch result"]; + subgraph cluster_9 { + color=blue + 26 [label="Enter block"]; + 27 [label="Access variable R|/a|"]; + 28 [label="Smart cast: R|/a|"]; + 29 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 30 [label="Exit block"]; + } + 31 [label="Exit when branch result"]; + 32 [label="Exit when"]; } - 31 [label="Access variable R|/a|"]; - 32 [label="Smart cast: R|/a|"]; - 33 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 34 [label="Exit block"]; + 33 [label="Access variable R|/a|"]; + 34 [label="Smart cast: R|/a|"]; + 35 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 36 [label="Exit block"]; } - 35 [label="Exit function test_1" style="filled" fillcolor=red]; + 37 [label="Exit function test_1" style="filled" fillcolor=red]; } - 14 -> {15}; - 15 -> {16}; 16 -> {17}; 17 -> {18}; 18 -> {19}; 19 -> {20}; 20 -> {21}; - 21 -> {22 23}; - 22 -> {30}; - 23 -> {24}; - 24 -> {25}; + 21 -> {22}; + 22 -> {23}; + 23 -> {24 25}; + 24 -> {32}; 25 -> {26}; 26 -> {27}; 27 -> {28}; @@ -101,68 +106,68 @@ digraph bangbang_kt { 32 -> {33}; 33 -> {34}; 34 -> {35}; - - subgraph cluster_9 { - color=red - 36 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_10 { - color=blue - 37 [label="Enter block"]; - subgraph cluster_11 { - color=blue - 38 [label="Enter when"]; - subgraph cluster_12 { - color=blue - 39 [label="Enter when branch condition "]; - subgraph cluster_13 { - color=blue - 40 [label="Enter &&"]; - 41 [label="Access variable R|/a|"]; - 42 [label="Check not null: R|/a|!!" style="filled" fillcolor=yellow]; - 43 [label="Function call: R|/a|!!.R|/A.foo|()" style="filled" fillcolor=yellow]; - 44 [label="Exit left part of &&"]; - 45 [label="Enter right part of &&"]; - 46 [label="Access variable R|/b|"]; - 47 [label="Exit &&"]; - } - 48 [label="Exit when branch condition"]; - } - 49 [label="Synthetic else branch"]; - 50 [label="Enter when branch result"]; - subgraph cluster_14 { - color=blue - 51 [label="Enter block"]; - 52 [label="Access variable R|/a|"]; - 53 [label="Smart cast: R|/a|"]; - 54 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 55 [label="Exit block"]; - } - 56 [label="Exit when branch result"]; - 57 [label="Exit when"]; - } - 58 [label="Access variable R|/a|"]; - 59 [label="Smart cast: R|/a|"]; - 60 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 61 [label="Exit block"]; - } - 62 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 35 -> {36}; 36 -> {37}; - 37 -> {38}; + + subgraph cluster_10 { + color=red + 38 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_11 { + color=blue + 39 [label="Enter block"]; + subgraph cluster_12 { + color=blue + 40 [label="Enter when"]; + subgraph cluster_13 { + color=blue + 41 [label="Enter when branch condition "]; + subgraph cluster_14 { + color=blue + 42 [label="Enter &&"]; + 43 [label="Access variable R|/a|"]; + 44 [label="Check not null: R|/a|!!" style="filled" fillcolor=yellow]; + 45 [label="Function call: R|/a|!!.R|/A.foo|()" style="filled" fillcolor=yellow]; + 46 [label="Exit left part of &&"]; + 47 [label="Enter right part of &&"]; + 48 [label="Access variable R|/b|"]; + 49 [label="Exit &&"]; + } + 50 [label="Exit when branch condition"]; + } + 51 [label="Synthetic else branch"]; + 52 [label="Enter when branch result"]; + subgraph cluster_15 { + color=blue + 53 [label="Enter block"]; + 54 [label="Access variable R|/a|"]; + 55 [label="Smart cast: R|/a|"]; + 56 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 57 [label="Exit block"]; + } + 58 [label="Exit when branch result"]; + 59 [label="Exit when"]; + } + 60 [label="Access variable R|/a|"]; + 61 [label="Smart cast: R|/a|"]; + 62 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 63 [label="Exit block"]; + } + 64 [label="Exit function test_2" style="filled" fillcolor=red]; + } 38 -> {39}; 39 -> {40}; 40 -> {41}; 41 -> {42}; 42 -> {43}; 43 -> {44}; - 44 -> {45 47}; + 44 -> {45}; 45 -> {46}; - 46 -> {47}; + 46 -> {47 49}; 47 -> {48}; - 48 -> {49 50}; - 49 -> {57}; - 50 -> {51}; - 51 -> {52}; + 48 -> {49}; + 49 -> {50}; + 50 -> {51 52}; + 51 -> {59}; 52 -> {53}; 53 -> {54}; 54 -> {55}; @@ -173,67 +178,67 @@ digraph bangbang_kt { 59 -> {60}; 60 -> {61}; 61 -> {62}; - - subgraph cluster_15 { - color=red - 63 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_16 { - color=blue - 64 [label="Enter block"]; - subgraph cluster_17 { - color=blue - 65 [label="Enter when"]; - subgraph cluster_18 { - color=blue - 66 [label="Enter when branch condition "]; - subgraph cluster_19 { - color=blue - 67 [label="Enter &&"]; - 68 [label="Access variable R|/b|"]; - 69 [label="Exit left part of &&"]; - 70 [label="Enter right part of &&"]; - 71 [label="Access variable R|/a|"]; - 72 [label="Check not null: R|/a|!!" style="filled" fillcolor=yellow]; - 73 [label="Function call: R|/a|!!.R|/A.foo|()" style="filled" fillcolor=yellow]; - 74 [label="Exit &&"]; - } - 75 [label="Exit when branch condition"]; - } - 76 [label="Synthetic else branch"]; - 77 [label="Enter when branch result"]; - subgraph cluster_20 { - color=blue - 78 [label="Enter block"]; - 79 [label="Access variable R|/a|"]; - 80 [label="Smart cast: R|/a|"]; - 81 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 82 [label="Exit block"]; - } - 83 [label="Exit when branch result"]; - 84 [label="Exit when"]; - } - 85 [label="Access variable R|/a|"]; - 86 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; - 87 [label="Exit block"]; - } - 88 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 62 -> {63}; 63 -> {64}; - 64 -> {65}; + + subgraph cluster_16 { + color=red + 65 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_17 { + color=blue + 66 [label="Enter block"]; + subgraph cluster_18 { + color=blue + 67 [label="Enter when"]; + subgraph cluster_19 { + color=blue + 68 [label="Enter when branch condition "]; + subgraph cluster_20 { + color=blue + 69 [label="Enter &&"]; + 70 [label="Access variable R|/b|"]; + 71 [label="Exit left part of &&"]; + 72 [label="Enter right part of &&"]; + 73 [label="Access variable R|/a|"]; + 74 [label="Check not null: R|/a|!!" style="filled" fillcolor=yellow]; + 75 [label="Function call: R|/a|!!.R|/A.foo|()" style="filled" fillcolor=yellow]; + 76 [label="Exit &&"]; + } + 77 [label="Exit when branch condition"]; + } + 78 [label="Synthetic else branch"]; + 79 [label="Enter when branch result"]; + subgraph cluster_21 { + color=blue + 80 [label="Enter block"]; + 81 [label="Access variable R|/a|"]; + 82 [label="Smart cast: R|/a|"]; + 83 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 84 [label="Exit block"]; + } + 85 [label="Exit when branch result"]; + 86 [label="Exit when"]; + } + 87 [label="Access variable R|/a|"]; + 88 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + 89 [label="Exit block"]; + } + 90 [label="Exit function test_3" style="filled" fillcolor=red]; + } 65 -> {66}; 66 -> {67}; 67 -> {68}; 68 -> {69}; - 69 -> {70 74}; + 69 -> {70}; 70 -> {71}; - 71 -> {72}; + 71 -> {72 76}; 72 -> {73}; 73 -> {74}; 74 -> {75}; - 75 -> {76 77}; - 76 -> {84}; - 77 -> {78}; - 78 -> {79}; + 75 -> {76}; + 76 -> {77}; + 77 -> {78 79}; + 78 -> {86}; 79 -> {80}; 80 -> {81}; 81 -> {82}; @@ -243,68 +248,68 @@ digraph bangbang_kt { 85 -> {86}; 86 -> {87}; 87 -> {88}; - - subgraph cluster_21 { - color=red - 89 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_22 { - color=blue - 90 [label="Enter block"]; - subgraph cluster_23 { - color=blue - 91 [label="Enter when"]; - subgraph cluster_24 { - color=blue - 92 [label="Enter when branch condition "]; - subgraph cluster_25 { - color=blue - 93 [label="Enter ||"]; - 94 [label="Access variable R|/a|"]; - 95 [label="Check not null: R|/a|!!" style="filled" fillcolor=yellow]; - 96 [label="Function call: R|/a|!!.R|/A.foo|()" style="filled" fillcolor=yellow]; - 97 [label="Exit left part of ||"]; - 98 [label="Enter right part of ||"]; - 99 [label="Access variable R|/b|"]; - 100 [label="Exit ||"]; - } - 101 [label="Exit when branch condition"]; - } - 102 [label="Synthetic else branch"]; - 103 [label="Enter when branch result"]; - subgraph cluster_26 { - color=blue - 104 [label="Enter block"]; - 105 [label="Access variable R|/a|"]; - 106 [label="Smart cast: R|/a|"]; - 107 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 108 [label="Exit block"]; - } - 109 [label="Exit when branch result"]; - 110 [label="Exit when"]; - } - 111 [label="Access variable R|/a|"]; - 112 [label="Smart cast: R|/a|"]; - 113 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 114 [label="Exit block"]; - } - 115 [label="Exit function test_4" style="filled" fillcolor=red]; - } + 88 -> {89}; 89 -> {90}; - 90 -> {91}; + + subgraph cluster_22 { + color=red + 91 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_23 { + color=blue + 92 [label="Enter block"]; + subgraph cluster_24 { + color=blue + 93 [label="Enter when"]; + subgraph cluster_25 { + color=blue + 94 [label="Enter when branch condition "]; + subgraph cluster_26 { + color=blue + 95 [label="Enter ||"]; + 96 [label="Access variable R|/a|"]; + 97 [label="Check not null: R|/a|!!" style="filled" fillcolor=yellow]; + 98 [label="Function call: R|/a|!!.R|/A.foo|()" style="filled" fillcolor=yellow]; + 99 [label="Exit left part of ||"]; + 100 [label="Enter right part of ||"]; + 101 [label="Access variable R|/b|"]; + 102 [label="Exit ||"]; + } + 103 [label="Exit when branch condition"]; + } + 104 [label="Synthetic else branch"]; + 105 [label="Enter when branch result"]; + subgraph cluster_27 { + color=blue + 106 [label="Enter block"]; + 107 [label="Access variable R|/a|"]; + 108 [label="Smart cast: R|/a|"]; + 109 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 110 [label="Exit block"]; + } + 111 [label="Exit when branch result"]; + 112 [label="Exit when"]; + } + 113 [label="Access variable R|/a|"]; + 114 [label="Smart cast: R|/a|"]; + 115 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 116 [label="Exit block"]; + } + 117 [label="Exit function test_4" style="filled" fillcolor=red]; + } 91 -> {92}; 92 -> {93}; 93 -> {94}; 94 -> {95}; 95 -> {96}; 96 -> {97}; - 97 -> {98 100}; + 97 -> {98}; 98 -> {99}; - 99 -> {100}; + 99 -> {100 102}; 100 -> {101}; - 101 -> {102 103}; - 102 -> {110}; - 103 -> {104}; - 104 -> {105}; + 101 -> {102}; + 102 -> {103}; + 103 -> {104 105}; + 104 -> {112}; 105 -> {106}; 106 -> {107}; 107 -> {108}; @@ -315,66 +320,66 @@ digraph bangbang_kt { 112 -> {113}; 113 -> {114}; 114 -> {115}; - - subgraph cluster_27 { - color=red - 116 [label="Enter function test_5" style="filled" fillcolor=red]; - subgraph cluster_28 { - color=blue - 117 [label="Enter block"]; - subgraph cluster_29 { - color=blue - 118 [label="Enter when"]; - subgraph cluster_30 { - color=blue - 119 [label="Enter when branch condition "]; - subgraph cluster_31 { - color=blue - 120 [label="Enter ||"]; - 121 [label="Access variable R|/b|"]; - 122 [label="Exit left part of ||"]; - 123 [label="Enter right part of ||"]; - 124 [label="Access variable R|/a|"]; - 125 [label="Check not null: R|/a|!!" style="filled" fillcolor=yellow]; - 126 [label="Function call: R|/a|!!.R|/A.foo|()" style="filled" fillcolor=yellow]; - 127 [label="Exit ||"]; - } - 128 [label="Exit when branch condition"]; - } - 129 [label="Synthetic else branch"]; - 130 [label="Enter when branch result"]; - subgraph cluster_32 { - color=blue - 131 [label="Enter block"]; - 132 [label="Access variable R|/a|"]; - 133 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; - 134 [label="Exit block"]; - } - 135 [label="Exit when branch result"]; - 136 [label="Exit when"]; - } - 137 [label="Access variable R|/a|"]; - 138 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; - 139 [label="Exit block"]; - } - 140 [label="Exit function test_5" style="filled" fillcolor=red]; - } + 115 -> {116}; 116 -> {117}; - 117 -> {118}; + + subgraph cluster_28 { + color=red + 118 [label="Enter function test_5" style="filled" fillcolor=red]; + subgraph cluster_29 { + color=blue + 119 [label="Enter block"]; + subgraph cluster_30 { + color=blue + 120 [label="Enter when"]; + subgraph cluster_31 { + color=blue + 121 [label="Enter when branch condition "]; + subgraph cluster_32 { + color=blue + 122 [label="Enter ||"]; + 123 [label="Access variable R|/b|"]; + 124 [label="Exit left part of ||"]; + 125 [label="Enter right part of ||"]; + 126 [label="Access variable R|/a|"]; + 127 [label="Check not null: R|/a|!!" style="filled" fillcolor=yellow]; + 128 [label="Function call: R|/a|!!.R|/A.foo|()" style="filled" fillcolor=yellow]; + 129 [label="Exit ||"]; + } + 130 [label="Exit when branch condition"]; + } + 131 [label="Synthetic else branch"]; + 132 [label="Enter when branch result"]; + subgraph cluster_33 { + color=blue + 133 [label="Enter block"]; + 134 [label="Access variable R|/a|"]; + 135 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + 136 [label="Exit block"]; + } + 137 [label="Exit when branch result"]; + 138 [label="Exit when"]; + } + 139 [label="Access variable R|/a|"]; + 140 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + 141 [label="Exit block"]; + } + 142 [label="Exit function test_5" style="filled" fillcolor=red]; + } 118 -> {119}; 119 -> {120}; 120 -> {121}; 121 -> {122}; - 122 -> {123 127}; + 122 -> {123}; 123 -> {124}; - 124 -> {125}; + 124 -> {125 129}; 125 -> {126}; 126 -> {127}; 127 -> {128}; - 128 -> {129 130}; - 129 -> {136}; - 130 -> {131}; - 131 -> {132}; + 128 -> {129}; + 129 -> {130}; + 130 -> {131 132}; + 131 -> {138}; 132 -> {133}; 133 -> {134}; 134 -> {135}; @@ -383,45 +388,47 @@ digraph bangbang_kt { 137 -> {138}; 138 -> {139}; 139 -> {140}; - - subgraph cluster_33 { - color=red - 141 [label="Enter function test_6" style="filled" fillcolor=red]; - subgraph cluster_34 { - color=blue - 142 [label="Enter block"]; - 143 [label="Access variable R|/x|"]; - 144 [label="Check not null: R|/x|!!" style="filled" fillcolor=yellow]; - 145 [label="Function call: R|/x|!!.R|/A.foo|()" style="filled" fillcolor=yellow]; - 146 [label="Exit block"]; - } - 147 [label="Exit function test_6" style="filled" fillcolor=red]; - } + 140 -> {141}; 141 -> {142}; - 142 -> {143}; + + subgraph cluster_34 { + color=red + 143 [label="Enter function test_6" style="filled" fillcolor=red]; + subgraph cluster_35 { + color=blue + 144 [label="Enter block"]; + 145 [label="Access variable R|/x|"]; + 146 [label="Check not null: R|/x|!!" style="filled" fillcolor=yellow]; + 147 [label="Function call: R|/x|!!.R|/A.foo|()" style="filled" fillcolor=yellow]; + 148 [label="Exit block"]; + } + 149 [label="Exit function test_6" style="filled" fillcolor=red]; + } 143 -> {144}; 144 -> {145}; 145 -> {146}; 146 -> {147}; - - subgraph cluster_35 { - color=red - 148 [label="Enter function test_7" style="filled" fillcolor=red]; - subgraph cluster_36 { - color=blue - 149 [label="Enter block"]; - 150 [label="Access variable R|/x|"]; - 151 [label="Check not null: R|/x|!!" style="filled" fillcolor=yellow]; - 152 [label="Function call: R|/x|!!.R|/A.foo|()" style="filled" fillcolor=yellow]; - 153 [label="Exit block"]; - } - 154 [label="Exit function test_7" style="filled" fillcolor=red]; - } + 147 -> {148}; 148 -> {149}; - 149 -> {150}; + + subgraph cluster_36 { + color=red + 150 [label="Enter function test_7" style="filled" fillcolor=red]; + subgraph cluster_37 { + color=blue + 151 [label="Enter block"]; + 152 [label="Access variable R|/x|"]; + 153 [label="Check not null: R|/x|!!" style="filled" fillcolor=yellow]; + 154 [label="Function call: R|/x|!!.R|/A.foo|()" style="filled" fillcolor=yellow]; + 155 [label="Exit block"]; + } + 156 [label="Exit function test_7" style="filled" fillcolor=red]; + } 150 -> {151}; 151 -> {152}; 152 -> {153}; 153 -> {154}; + 154 -> {155}; + 155 -> {156}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/booleanOperators.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/booleanOperators.dot index 6e393571da5..099ff5ef5b0 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/booleanOperators.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/booleanOperators.dot @@ -5,119 +5,124 @@ digraph booleanOperators_kt { subgraph cluster_0 { color=red - 0 [label="Enter class A" style="filled" fillcolor=red]; - 1 [label="Exit class A" style="filled" fillcolor=red]; + 0 [label="Enter file booleanOperators.kt" style="filled" fillcolor=red]; + 1 [label="Exit file booleanOperators.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; subgraph cluster_1 { color=red - 2 [label="Enter function foo" style="filled" fillcolor=red]; - 3 [label="Exit function foo" style="filled" fillcolor=red]; + 2 [label="Enter class A" style="filled" fillcolor=red]; + 3 [label="Exit class A" style="filled" fillcolor=red]; } - 2 -> {3}; + 2 -> {3} [color=green]; subgraph cluster_2 { color=red - 4 [label="Enter function bool" style="filled" fillcolor=red]; - 5 [label="Exit function bool" style="filled" fillcolor=red]; + 4 [label="Enter function foo" style="filled" fillcolor=red]; + 5 [label="Exit function foo" style="filled" fillcolor=red]; } 4 -> {5}; subgraph cluster_3 { color=red - 6 [label="Enter class B" style="filled" fillcolor=red]; - 7 [label="Exit class B" style="filled" fillcolor=red]; + 6 [label="Enter function bool" style="filled" fillcolor=red]; + 7 [label="Exit function bool" style="filled" fillcolor=red]; } - 6 -> {7} [color=green]; + 6 -> {7}; subgraph cluster_4 { color=red - 8 [label="Enter function bar" style="filled" fillcolor=red]; - 9 [label="Exit function bar" style="filled" fillcolor=red]; + 8 [label="Enter class B" style="filled" fillcolor=red]; + 9 [label="Exit class B" style="filled" fillcolor=red]; } - 8 -> {9}; + 8 -> {9} [color=green]; subgraph cluster_5 { color=red - 10 [label="Enter class C" style="filled" fillcolor=red]; - 11 [label="Exit class C" style="filled" fillcolor=red]; + 10 [label="Enter function bar" style="filled" fillcolor=red]; + 11 [label="Exit function bar" style="filled" fillcolor=red]; } - 10 -> {11} [color=green]; + 10 -> {11}; subgraph cluster_6 { color=red - 12 [label="Enter function baz" style="filled" fillcolor=red]; - 13 [label="Exit function baz" style="filled" fillcolor=red]; + 12 [label="Enter class C" style="filled" fillcolor=red]; + 13 [label="Exit class C" style="filled" fillcolor=red]; } - 12 -> {13}; + 12 -> {13} [color=green]; subgraph cluster_7 { color=red - 14 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_8 { - color=blue - 15 [label="Enter block"]; - subgraph cluster_9 { - color=blue - 16 [label="Enter when"]; - subgraph cluster_10 { - color=blue - 17 [label="Enter when branch condition "]; - subgraph cluster_11 { - color=blue - 18 [label="Enter &&"]; - 19 [label="Access variable R|/x|"]; - 20 [label="Type operator: (R|/x| is R|B|)"]; - 21 [label="Exit left part of &&"]; - 22 [label="Enter right part of &&"]; - 23 [label="Access variable R|/x|"]; - 24 [label="Smart cast: R|/x|"]; - 25 [label="Type operator: (R|/x| is R|C|)"]; - 26 [label="Exit &&"]; - } - 27 [label="Exit when branch condition"]; - } - 28 [label="Synthetic else branch"]; - 29 [label="Enter when branch result"]; - subgraph cluster_12 { - color=blue - 30 [label="Enter block"]; - 31 [label="Access variable R|/x|"]; - 32 [label="Smart cast: R|/x|"]; - 33 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 34 [label="Access variable R|/x|"]; - 35 [label="Smart cast: R|/x|"]; - 36 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 37 [label="Access variable R|/x|"]; - 38 [label="Smart cast: R|/x|"]; - 39 [label="Function call: R|/x|.R|/C.baz|()" style="filled" fillcolor=yellow]; - 40 [label="Exit block"]; - } - 41 [label="Exit when branch result"]; - 42 [label="Exit when"]; - } - 43 [label="Exit block"]; - } - 44 [label="Exit function test_1" style="filled" fillcolor=red]; + 14 [label="Enter function baz" style="filled" fillcolor=red]; + 15 [label="Exit function baz" style="filled" fillcolor=red]; } 14 -> {15}; - 15 -> {16}; + + subgraph cluster_8 { + color=red + 16 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_9 { + color=blue + 17 [label="Enter block"]; + subgraph cluster_10 { + color=blue + 18 [label="Enter when"]; + subgraph cluster_11 { + color=blue + 19 [label="Enter when branch condition "]; + subgraph cluster_12 { + color=blue + 20 [label="Enter &&"]; + 21 [label="Access variable R|/x|"]; + 22 [label="Type operator: (R|/x| is R|B|)"]; + 23 [label="Exit left part of &&"]; + 24 [label="Enter right part of &&"]; + 25 [label="Access variable R|/x|"]; + 26 [label="Smart cast: R|/x|"]; + 27 [label="Type operator: (R|/x| is R|C|)"]; + 28 [label="Exit &&"]; + } + 29 [label="Exit when branch condition"]; + } + 30 [label="Synthetic else branch"]; + 31 [label="Enter when branch result"]; + subgraph cluster_13 { + color=blue + 32 [label="Enter block"]; + 33 [label="Access variable R|/x|"]; + 34 [label="Smart cast: R|/x|"]; + 35 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 36 [label="Access variable R|/x|"]; + 37 [label="Smart cast: R|/x|"]; + 38 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 39 [label="Access variable R|/x|"]; + 40 [label="Smart cast: R|/x|"]; + 41 [label="Function call: R|/x|.R|/C.baz|()" style="filled" fillcolor=yellow]; + 42 [label="Exit block"]; + } + 43 [label="Exit when branch result"]; + 44 [label="Exit when"]; + } + 45 [label="Exit block"]; + } + 46 [label="Exit function test_1" style="filled" fillcolor=red]; + } 16 -> {17}; 17 -> {18}; 18 -> {19}; 19 -> {20}; 20 -> {21}; - 21 -> {22 26}; + 21 -> {22}; 22 -> {23}; - 23 -> {24}; + 23 -> {24 28}; 24 -> {25}; 25 -> {26}; 26 -> {27}; - 27 -> {28 29}; - 28 -> {42}; - 29 -> {30}; - 30 -> {31}; + 27 -> {28}; + 28 -> {29}; + 29 -> {30 31}; + 30 -> {44}; 31 -> {32}; 32 -> {33}; 33 -> {34}; @@ -131,71 +136,71 @@ digraph booleanOperators_kt { 41 -> {42}; 42 -> {43}; 43 -> {44}; - - subgraph cluster_13 { - color=red - 45 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_14 { - color=blue - 46 [label="Enter block"]; - subgraph cluster_15 { - color=blue - 47 [label="Enter when"]; - subgraph cluster_16 { - color=blue - 48 [label="Enter when branch condition "]; - subgraph cluster_17 { - color=blue - 49 [label="Enter ||"]; - 50 [label="Access variable R|/x|"]; - 51 [label="Type operator: (R|/x| is R|B|)"]; - 52 [label="Exit left part of ||"]; - 53 [label="Enter right part of ||"]; - 54 [label="Access variable R|/x|"]; - 55 [label="Type operator: (R|/x| is R|C|)"]; - 56 [label="Exit ||"]; - } - 57 [label="Exit when branch condition"]; - } - 58 [label="Synthetic else branch"]; - 59 [label="Enter when branch result"]; - subgraph cluster_18 { - color=blue - 60 [label="Enter block"]; - 61 [label="Access variable R|/x|"]; - 62 [label="Smart cast: R|/x|"]; - 63 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 64 [label="Access variable R|/x|"]; - 65 [label="Smart cast: R|/x|"]; - 66 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 67 [label="Access variable R|/x|"]; - 68 [label="Smart cast: R|/x|"]; - 69 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 70 [label="Exit block"]; - } - 71 [label="Exit when branch result"]; - 72 [label="Exit when"]; - } - 73 [label="Exit block"]; - } - 74 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 44 -> {45}; 45 -> {46}; - 46 -> {47}; + + subgraph cluster_14 { + color=red + 47 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_15 { + color=blue + 48 [label="Enter block"]; + subgraph cluster_16 { + color=blue + 49 [label="Enter when"]; + subgraph cluster_17 { + color=blue + 50 [label="Enter when branch condition "]; + subgraph cluster_18 { + color=blue + 51 [label="Enter ||"]; + 52 [label="Access variable R|/x|"]; + 53 [label="Type operator: (R|/x| is R|B|)"]; + 54 [label="Exit left part of ||"]; + 55 [label="Enter right part of ||"]; + 56 [label="Access variable R|/x|"]; + 57 [label="Type operator: (R|/x| is R|C|)"]; + 58 [label="Exit ||"]; + } + 59 [label="Exit when branch condition"]; + } + 60 [label="Synthetic else branch"]; + 61 [label="Enter when branch result"]; + subgraph cluster_19 { + color=blue + 62 [label="Enter block"]; + 63 [label="Access variable R|/x|"]; + 64 [label="Smart cast: R|/x|"]; + 65 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 66 [label="Access variable R|/x|"]; + 67 [label="Smart cast: R|/x|"]; + 68 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 69 [label="Access variable R|/x|"]; + 70 [label="Smart cast: R|/x|"]; + 71 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 72 [label="Exit block"]; + } + 73 [label="Exit when branch result"]; + 74 [label="Exit when"]; + } + 75 [label="Exit block"]; + } + 76 [label="Exit function test_2" style="filled" fillcolor=red]; + } 47 -> {48}; 48 -> {49}; 49 -> {50}; 50 -> {51}; 51 -> {52}; - 52 -> {53 56}; + 52 -> {53}; 53 -> {54}; - 54 -> {55}; + 54 -> {55 58}; 55 -> {56}; 56 -> {57}; - 57 -> {58 59}; - 58 -> {72}; - 59 -> {60}; - 60 -> {61}; + 57 -> {58}; + 58 -> {59}; + 59 -> {60 61}; + 60 -> {74}; 61 -> {62}; 62 -> {63}; 63 -> {64}; @@ -209,52 +214,52 @@ digraph booleanOperators_kt { 71 -> {72}; 72 -> {73}; 73 -> {74}; + 74 -> {75}; + 75 -> {76}; - subgraph cluster_19 { + subgraph cluster_20 { color=red - 75 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_20 { + 77 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_21 { color=blue - 76 [label="Enter block"]; - subgraph cluster_21 { + 78 [label="Enter block"]; + subgraph cluster_22 { color=blue - 77 [label="Enter when"]; - subgraph cluster_22 { - color=blue - 78 [label="Enter when branch condition "]; - 79 [label="Access variable R|/x|"]; - 80 [label="Type operator: (R|/x| !is R|A|)"]; - 81 [label="Function call: (R|/x| !is R|A|).R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 82 [label="Exit when branch condition"]; - } - 83 [label="Synthetic else branch"]; - 84 [label="Enter when branch result"]; + 79 [label="Enter when"]; subgraph cluster_23 { color=blue - 85 [label="Enter block"]; - 86 [label="Access variable R|/x|"]; - 87 [label="Smart cast: R|/x|"]; - 88 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 89 [label="Exit block"]; + 80 [label="Enter when branch condition "]; + 81 [label="Access variable R|/x|"]; + 82 [label="Type operator: (R|/x| !is R|A|)"]; + 83 [label="Function call: (R|/x| !is R|A|).R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 84 [label="Exit when branch condition"]; } - 90 [label="Exit when branch result"]; - 91 [label="Exit when"]; + 85 [label="Synthetic else branch"]; + 86 [label="Enter when branch result"]; + subgraph cluster_24 { + color=blue + 87 [label="Enter block"]; + 88 [label="Access variable R|/x|"]; + 89 [label="Smart cast: R|/x|"]; + 90 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 91 [label="Exit block"]; + } + 92 [label="Exit when branch result"]; + 93 [label="Exit when"]; } - 92 [label="Exit block"]; + 94 [label="Exit block"]; } - 93 [label="Exit function test_3" style="filled" fillcolor=red]; + 95 [label="Exit function test_3" style="filled" fillcolor=red]; } - 75 -> {76}; - 76 -> {77}; 77 -> {78}; 78 -> {79}; 79 -> {80}; 80 -> {81}; 81 -> {82}; - 82 -> {83 84}; - 83 -> {91}; - 84 -> {85}; - 85 -> {86}; + 82 -> {83}; + 83 -> {84}; + 84 -> {85 86}; + 85 -> {93}; 86 -> {87}; 87 -> {88}; 88 -> {89}; @@ -262,72 +267,72 @@ digraph booleanOperators_kt { 90 -> {91}; 91 -> {92}; 92 -> {93}; - - subgraph cluster_24 { - color=red - 94 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_25 { - color=blue - 95 [label="Enter block"]; - subgraph cluster_26 { - color=blue - 96 [label="Enter when"]; - subgraph cluster_27 { - color=blue - 97 [label="Enter when branch condition "]; - subgraph cluster_28 { - color=blue - 98 [label="Enter ||"]; - 99 [label="Access variable R|/x|"]; - 100 [label="Type operator: (R|/x| !is R|kotlin/String|)"]; - 101 [label="Exit left part of ||"]; - 102 [label="Enter right part of ||"]; - 103 [label="Access variable R|/x|"]; - 104 [label="Smart cast: R|/x|"]; - 105 [label="Access variable R|kotlin/String.length|"]; - 106 [label="Const: Int(0)"]; - 107 [label="Equality operator =="]; - 108 [label="Exit ||"]; - } - 109 [label="Exit when branch condition"]; - } - 110 [label="Synthetic else branch"]; - 111 [label="Enter when branch result"]; - subgraph cluster_29 { - color=blue - 112 [label="Enter block"]; - 113 [label="Access variable R|/x|"]; - 114 [label="Access variable #"]; - 115 [label="Exit block"]; - } - 116 [label="Exit when branch result"]; - 117 [label="Exit when"]; - } - 118 [label="Access variable R|/x|"]; - 119 [label="Access variable #"]; - 120 [label="Exit block"]; - } - 121 [label="Exit function test_4" style="filled" fillcolor=red]; - } + 93 -> {94}; 94 -> {95}; - 95 -> {96}; + + subgraph cluster_25 { + color=red + 96 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_26 { + color=blue + 97 [label="Enter block"]; + subgraph cluster_27 { + color=blue + 98 [label="Enter when"]; + subgraph cluster_28 { + color=blue + 99 [label="Enter when branch condition "]; + subgraph cluster_29 { + color=blue + 100 [label="Enter ||"]; + 101 [label="Access variable R|/x|"]; + 102 [label="Type operator: (R|/x| !is R|kotlin/String|)"]; + 103 [label="Exit left part of ||"]; + 104 [label="Enter right part of ||"]; + 105 [label="Access variable R|/x|"]; + 106 [label="Smart cast: R|/x|"]; + 107 [label="Access variable R|kotlin/String.length|"]; + 108 [label="Const: Int(0)"]; + 109 [label="Equality operator =="]; + 110 [label="Exit ||"]; + } + 111 [label="Exit when branch condition"]; + } + 112 [label="Synthetic else branch"]; + 113 [label="Enter when branch result"]; + subgraph cluster_30 { + color=blue + 114 [label="Enter block"]; + 115 [label="Access variable R|/x|"]; + 116 [label="Access variable #"]; + 117 [label="Exit block"]; + } + 118 [label="Exit when branch result"]; + 119 [label="Exit when"]; + } + 120 [label="Access variable R|/x|"]; + 121 [label="Access variable #"]; + 122 [label="Exit block"]; + } + 123 [label="Exit function test_4" style="filled" fillcolor=red]; + } 96 -> {97}; 97 -> {98}; 98 -> {99}; 99 -> {100}; 100 -> {101}; - 101 -> {102 108}; + 101 -> {102}; 102 -> {103}; - 103 -> {104}; + 103 -> {104 110}; 104 -> {105}; 105 -> {106}; 106 -> {107}; 107 -> {108}; 108 -> {109}; - 109 -> {110 111}; - 110 -> {117}; - 111 -> {112}; - 112 -> {113}; + 109 -> {110}; + 110 -> {111}; + 111 -> {112 113}; + 112 -> {119}; 113 -> {114}; 114 -> {115}; 115 -> {116}; @@ -336,67 +341,67 @@ digraph booleanOperators_kt { 118 -> {119}; 119 -> {120}; 120 -> {121}; - - subgraph cluster_30 { - color=red - 122 [label="Enter function test_5" style="filled" fillcolor=red]; - subgraph cluster_31 { - color=blue - 123 [label="Enter block"]; - subgraph cluster_32 { - color=blue - 124 [label="Enter when"]; - subgraph cluster_33 { - color=blue - 125 [label="Enter when branch condition "]; - subgraph cluster_34 { - color=blue - 126 [label="Enter &&"]; - 127 [label="Access variable R|/x|"]; - 128 [label="Type operator: (R|/x| is R|A|)"]; - 129 [label="Exit left part of &&"]; - 130 [label="Enter right part of &&"]; - 131 [label="Access variable R|/x|"]; - 132 [label="Smart cast: R|/x|"]; - 133 [label="Function call: R|/x|.R|/A.bool|()" style="filled" fillcolor=yellow]; - 134 [label="Exit &&"]; - } - 135 [label="Exit when branch condition"]; - } - 136 [label="Synthetic else branch"]; - 137 [label="Enter when branch result"]; - subgraph cluster_35 { - color=blue - 138 [label="Enter block"]; - 139 [label="Access variable R|/x|"]; - 140 [label="Smart cast: R|/x|"]; - 141 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 142 [label="Exit block"]; - } - 143 [label="Exit when branch result"]; - 144 [label="Exit when"]; - } - 145 [label="Exit block"]; - } - 146 [label="Exit function test_5" style="filled" fillcolor=red]; - } + 121 -> {122}; 122 -> {123}; - 123 -> {124}; + + subgraph cluster_31 { + color=red + 124 [label="Enter function test_5" style="filled" fillcolor=red]; + subgraph cluster_32 { + color=blue + 125 [label="Enter block"]; + subgraph cluster_33 { + color=blue + 126 [label="Enter when"]; + subgraph cluster_34 { + color=blue + 127 [label="Enter when branch condition "]; + subgraph cluster_35 { + color=blue + 128 [label="Enter &&"]; + 129 [label="Access variable R|/x|"]; + 130 [label="Type operator: (R|/x| is R|A|)"]; + 131 [label="Exit left part of &&"]; + 132 [label="Enter right part of &&"]; + 133 [label="Access variable R|/x|"]; + 134 [label="Smart cast: R|/x|"]; + 135 [label="Function call: R|/x|.R|/A.bool|()" style="filled" fillcolor=yellow]; + 136 [label="Exit &&"]; + } + 137 [label="Exit when branch condition"]; + } + 138 [label="Synthetic else branch"]; + 139 [label="Enter when branch result"]; + subgraph cluster_36 { + color=blue + 140 [label="Enter block"]; + 141 [label="Access variable R|/x|"]; + 142 [label="Smart cast: R|/x|"]; + 143 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 144 [label="Exit block"]; + } + 145 [label="Exit when branch result"]; + 146 [label="Exit when"]; + } + 147 [label="Exit block"]; + } + 148 [label="Exit function test_5" style="filled" fillcolor=red]; + } 124 -> {125}; 125 -> {126}; 126 -> {127}; 127 -> {128}; 128 -> {129}; - 129 -> {130 134}; + 129 -> {130}; 130 -> {131}; - 131 -> {132}; + 131 -> {132 136}; 132 -> {133}; 133 -> {134}; 134 -> {135}; - 135 -> {136 137}; - 136 -> {144}; - 137 -> {138}; - 138 -> {139}; + 135 -> {136}; + 136 -> {137}; + 137 -> {138 139}; + 138 -> {146}; 139 -> {140}; 140 -> {141}; 141 -> {142}; @@ -404,52 +409,52 @@ digraph booleanOperators_kt { 143 -> {144}; 144 -> {145}; 145 -> {146}; + 146 -> {147}; + 147 -> {148}; - subgraph cluster_36 { + subgraph cluster_37 { color=red - 147 [label="Enter function test_6" style="filled" fillcolor=red]; - subgraph cluster_37 { + 149 [label="Enter function test_6" style="filled" fillcolor=red]; + subgraph cluster_38 { color=blue - 148 [label="Enter block"]; - subgraph cluster_38 { + 150 [label="Enter block"]; + subgraph cluster_39 { color=blue - 149 [label="Enter when"]; - subgraph cluster_39 { - color=blue - 150 [label="Enter when branch condition "]; - 151 [label="Access variable R|/x|"]; - 152 [label="Type operator: (R|/x| !is R|A|)"]; - 153 [label="Function call: (R|/x| !is R|A|).R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 154 [label="Exit when branch condition"]; - } - 155 [label="Synthetic else branch"]; - 156 [label="Enter when branch result"]; + 151 [label="Enter when"]; subgraph cluster_40 { color=blue - 157 [label="Enter block"]; - 158 [label="Access variable R|/x|"]; - 159 [label="Smart cast: R|/x|"]; - 160 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 161 [label="Exit block"]; + 152 [label="Enter when branch condition "]; + 153 [label="Access variable R|/x|"]; + 154 [label="Type operator: (R|/x| !is R|A|)"]; + 155 [label="Function call: (R|/x| !is R|A|).R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 156 [label="Exit when branch condition"]; } - 162 [label="Exit when branch result"]; - 163 [label="Exit when"]; + 157 [label="Synthetic else branch"]; + 158 [label="Enter when branch result"]; + subgraph cluster_41 { + color=blue + 159 [label="Enter block"]; + 160 [label="Access variable R|/x|"]; + 161 [label="Smart cast: R|/x|"]; + 162 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 163 [label="Exit block"]; + } + 164 [label="Exit when branch result"]; + 165 [label="Exit when"]; } - 164 [label="Exit block"]; + 166 [label="Exit block"]; } - 165 [label="Exit function test_6" style="filled" fillcolor=red]; + 167 [label="Exit function test_6" style="filled" fillcolor=red]; } - 147 -> {148}; - 148 -> {149}; 149 -> {150}; 150 -> {151}; 151 -> {152}; 152 -> {153}; 153 -> {154}; - 154 -> {155 156}; - 155 -> {163}; - 156 -> {157}; - 157 -> {158}; + 154 -> {155}; + 155 -> {156}; + 156 -> {157 158}; + 157 -> {165}; 158 -> {159}; 159 -> {160}; 160 -> {161}; @@ -457,376 +462,376 @@ digraph booleanOperators_kt { 162 -> {163}; 163 -> {164}; 164 -> {165}; - - subgraph cluster_41 { - color=red - 166 [label="Enter function test_7" style="filled" fillcolor=red]; - subgraph cluster_42 { - color=blue - 167 [label="Enter block"]; - subgraph cluster_43 { - color=blue - 168 [label="Enter when"]; - subgraph cluster_44 { - color=blue - 169 [label="Enter when branch condition "]; - subgraph cluster_45 { - color=blue - 170 [label="Enter ||"]; - 171 [label="Access variable R|/x|"]; - 172 [label="Type operator: (R|/x| is R|A|)"]; - 173 [label="Exit left part of ||"]; - 174 [label="Enter right part of ||"]; - 175 [label="Const: Boolean(false)"]; - 176 [label="Exit ||"]; - } - 177 [label="Exit when branch condition"]; - } - 178 [label="Synthetic else branch"]; - 179 [label="Enter when branch result"]; - subgraph cluster_46 { - color=blue - 180 [label="Enter block"]; - 181 [label="Access variable R|/x|"]; - 182 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 183 [label="Exit block"]; - } - 184 [label="Exit when branch result"]; - 185 [label="Exit when"]; - } - 186 [label="Exit block"]; - } - 187 [label="Exit function test_7" style="filled" fillcolor=red]; - } + 165 -> {166}; 166 -> {167}; - 167 -> {168}; + + subgraph cluster_42 { + color=red + 168 [label="Enter function test_7" style="filled" fillcolor=red]; + subgraph cluster_43 { + color=blue + 169 [label="Enter block"]; + subgraph cluster_44 { + color=blue + 170 [label="Enter when"]; + subgraph cluster_45 { + color=blue + 171 [label="Enter when branch condition "]; + subgraph cluster_46 { + color=blue + 172 [label="Enter ||"]; + 173 [label="Access variable R|/x|"]; + 174 [label="Type operator: (R|/x| is R|A|)"]; + 175 [label="Exit left part of ||"]; + 176 [label="Enter right part of ||"]; + 177 [label="Const: Boolean(false)"]; + 178 [label="Exit ||"]; + } + 179 [label="Exit when branch condition"]; + } + 180 [label="Synthetic else branch"]; + 181 [label="Enter when branch result"]; + subgraph cluster_47 { + color=blue + 182 [label="Enter block"]; + 183 [label="Access variable R|/x|"]; + 184 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 185 [label="Exit block"]; + } + 186 [label="Exit when branch result"]; + 187 [label="Exit when"]; + } + 188 [label="Exit block"]; + } + 189 [label="Exit function test_7" style="filled" fillcolor=red]; + } 168 -> {169}; 169 -> {170}; 170 -> {171}; 171 -> {172}; 172 -> {173}; - 173 -> {174 176}; + 173 -> {174}; 174 -> {175}; - 175 -> {176}; + 175 -> {176 178}; 176 -> {177}; - 177 -> {178 179}; - 178 -> {185}; - 179 -> {180}; - 180 -> {181}; + 177 -> {178}; + 178 -> {179}; + 179 -> {180 181}; + 180 -> {187}; 181 -> {182}; 182 -> {183}; 183 -> {184}; 184 -> {185}; 185 -> {186}; 186 -> {187}; - - subgraph cluster_47 { - color=red - 188 [label="Enter function test_8" style="filled" fillcolor=red]; - subgraph cluster_48 { - color=blue - 189 [label="Enter block"]; - subgraph cluster_49 { - color=blue - 190 [label="Enter when"]; - subgraph cluster_50 { - color=blue - 191 [label="Enter when branch condition "]; - subgraph cluster_51 { - color=blue - 192 [label="Enter ||"]; - 193 [label="Const: Boolean(false)"]; - 194 [label="Exit left part of ||"]; - 195 [label="Enter right part of ||"]; - 196 [label="Access variable R|/x|"]; - 197 [label="Type operator: (R|/x| is R|A|)"]; - 198 [label="Exit ||"]; - } - 199 [label="Exit when branch condition"]; - } - 200 [label="Synthetic else branch"]; - 201 [label="Enter when branch result"]; - subgraph cluster_52 { - color=blue - 202 [label="Enter block"]; - 203 [label="Access variable R|/x|"]; - 204 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 205 [label="Exit block"]; - } - 206 [label="Exit when branch result"]; - 207 [label="Exit when"]; - } - 208 [label="Exit block"]; - } - 209 [label="Exit function test_8" style="filled" fillcolor=red]; - } + 187 -> {188}; 188 -> {189}; - 189 -> {190}; + + subgraph cluster_48 { + color=red + 190 [label="Enter function test_8" style="filled" fillcolor=red]; + subgraph cluster_49 { + color=blue + 191 [label="Enter block"]; + subgraph cluster_50 { + color=blue + 192 [label="Enter when"]; + subgraph cluster_51 { + color=blue + 193 [label="Enter when branch condition "]; + subgraph cluster_52 { + color=blue + 194 [label="Enter ||"]; + 195 [label="Const: Boolean(false)"]; + 196 [label="Exit left part of ||"]; + 197 [label="Enter right part of ||"]; + 198 [label="Access variable R|/x|"]; + 199 [label="Type operator: (R|/x| is R|A|)"]; + 200 [label="Exit ||"]; + } + 201 [label="Exit when branch condition"]; + } + 202 [label="Synthetic else branch"]; + 203 [label="Enter when branch result"]; + subgraph cluster_53 { + color=blue + 204 [label="Enter block"]; + 205 [label="Access variable R|/x|"]; + 206 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 207 [label="Exit block"]; + } + 208 [label="Exit when branch result"]; + 209 [label="Exit when"]; + } + 210 [label="Exit block"]; + } + 211 [label="Exit function test_8" style="filled" fillcolor=red]; + } 190 -> {191}; 191 -> {192}; 192 -> {193}; 193 -> {194}; 194 -> {195}; - 194 -> {198} [style=dotted]; 195 -> {196}; 196 -> {197}; + 196 -> {200} [style=dotted]; 197 -> {198}; 198 -> {199}; - 199 -> {200 201}; - 200 -> {207}; - 201 -> {202}; - 202 -> {203}; + 199 -> {200}; + 200 -> {201}; + 201 -> {202 203}; + 202 -> {209}; 203 -> {204}; 204 -> {205}; 205 -> {206}; 206 -> {207}; 207 -> {208}; 208 -> {209}; - - subgraph cluster_53 { - color=red - 210 [label="Enter function test_9" style="filled" fillcolor=red]; - subgraph cluster_54 { - color=blue - 211 [label="Enter block"]; - subgraph cluster_55 { - color=blue - 212 [label="Enter when"]; - subgraph cluster_56 { - color=blue - 213 [label="Enter when branch condition "]; - subgraph cluster_57 { - color=blue - 214 [label="Enter ||"]; - 215 [label="Access variable R|/x|"]; - 216 [label="Type operator: (R|/x| is R|A|)"]; - 217 [label="Exit left part of ||"]; - 218 [label="Enter right part of ||"]; - 219 [label="Const: Boolean(true)"]; - 220 [label="Exit ||"]; - } - 221 [label="Exit when branch condition"]; - } - 222 [label="Synthetic else branch"]; - 223 [label="Enter when branch result"]; - subgraph cluster_58 { - color=blue - 224 [label="Enter block"]; - 225 [label="Access variable R|/x|"]; - 226 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 227 [label="Exit block"]; - } - 228 [label="Exit when branch result"]; - 229 [label="Exit when"]; - } - 230 [label="Exit block"]; - } - 231 [label="Exit function test_9" style="filled" fillcolor=red]; - } + 209 -> {210}; 210 -> {211}; - 211 -> {212}; + + subgraph cluster_54 { + color=red + 212 [label="Enter function test_9" style="filled" fillcolor=red]; + subgraph cluster_55 { + color=blue + 213 [label="Enter block"]; + subgraph cluster_56 { + color=blue + 214 [label="Enter when"]; + subgraph cluster_57 { + color=blue + 215 [label="Enter when branch condition "]; + subgraph cluster_58 { + color=blue + 216 [label="Enter ||"]; + 217 [label="Access variable R|/x|"]; + 218 [label="Type operator: (R|/x| is R|A|)"]; + 219 [label="Exit left part of ||"]; + 220 [label="Enter right part of ||"]; + 221 [label="Const: Boolean(true)"]; + 222 [label="Exit ||"]; + } + 223 [label="Exit when branch condition"]; + } + 224 [label="Synthetic else branch"]; + 225 [label="Enter when branch result"]; + subgraph cluster_59 { + color=blue + 226 [label="Enter block"]; + 227 [label="Access variable R|/x|"]; + 228 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 229 [label="Exit block"]; + } + 230 [label="Exit when branch result"]; + 231 [label="Exit when"]; + } + 232 [label="Exit block"]; + } + 233 [label="Exit function test_9" style="filled" fillcolor=red]; + } 212 -> {213}; 213 -> {214}; 214 -> {215}; 215 -> {216}; 216 -> {217}; - 217 -> {218 220}; + 217 -> {218}; 218 -> {219}; - 219 -> {220}; + 219 -> {220 222}; 220 -> {221}; - 221 -> {222 223}; - 222 -> {229}; - 223 -> {224}; - 224 -> {225}; + 221 -> {222}; + 222 -> {223}; + 223 -> {224 225}; + 224 -> {231}; 225 -> {226}; 226 -> {227}; 227 -> {228}; 228 -> {229}; 229 -> {230}; 230 -> {231}; - - subgraph cluster_59 { - color=red - 232 [label="Enter function test_10" style="filled" fillcolor=red]; - subgraph cluster_60 { - color=blue - 233 [label="Enter block"]; - subgraph cluster_61 { - color=blue - 234 [label="Enter when"]; - subgraph cluster_62 { - color=blue - 235 [label="Enter when branch condition "]; - subgraph cluster_63 { - color=blue - 236 [label="Enter ||"]; - 237 [label="Const: Boolean(true)"]; - 238 [label="Exit left part of ||"]; - 239 [label="Enter right part of ||" style="filled" fillcolor=gray]; - 240 [label="Access variable R|/x|" style="filled" fillcolor=gray]; - 241 [label="Type operator: (R|/x| is R|A|)" style="filled" fillcolor=gray]; - 242 [label="Exit ||"]; - } - 243 [label="Exit when branch condition"]; - } - 244 [label="Synthetic else branch"]; - 245 [label="Enter when branch result"]; - subgraph cluster_64 { - color=blue - 246 [label="Enter block"]; - 247 [label="Access variable R|/x|"]; - 248 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 249 [label="Exit block"]; - } - 250 [label="Exit when branch result"]; - 251 [label="Exit when"]; - } - 252 [label="Exit block"]; - } - 253 [label="Exit function test_10" style="filled" fillcolor=red]; - } + 231 -> {232}; 232 -> {233}; - 233 -> {234}; + + subgraph cluster_60 { + color=red + 234 [label="Enter function test_10" style="filled" fillcolor=red]; + subgraph cluster_61 { + color=blue + 235 [label="Enter block"]; + subgraph cluster_62 { + color=blue + 236 [label="Enter when"]; + subgraph cluster_63 { + color=blue + 237 [label="Enter when branch condition "]; + subgraph cluster_64 { + color=blue + 238 [label="Enter ||"]; + 239 [label="Const: Boolean(true)"]; + 240 [label="Exit left part of ||"]; + 241 [label="Enter right part of ||" style="filled" fillcolor=gray]; + 242 [label="Access variable R|/x|" style="filled" fillcolor=gray]; + 243 [label="Type operator: (R|/x| is R|A|)" style="filled" fillcolor=gray]; + 244 [label="Exit ||"]; + } + 245 [label="Exit when branch condition"]; + } + 246 [label="Synthetic else branch"]; + 247 [label="Enter when branch result"]; + subgraph cluster_65 { + color=blue + 248 [label="Enter block"]; + 249 [label="Access variable R|/x|"]; + 250 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 251 [label="Exit block"]; + } + 252 [label="Exit when branch result"]; + 253 [label="Exit when"]; + } + 254 [label="Exit block"]; + } + 255 [label="Exit function test_10" style="filled" fillcolor=red]; + } 234 -> {235}; 235 -> {236}; 236 -> {237}; 237 -> {238}; - 238 -> {242}; - 238 -> {239} [style=dotted]; - 239 -> {240} [style=dotted]; + 238 -> {239}; + 239 -> {240}; + 240 -> {244}; 240 -> {241} [style=dotted]; 241 -> {242} [style=dotted]; - 242 -> {243}; - 243 -> {244 245}; - 244 -> {251}; - 245 -> {246}; - 246 -> {247}; + 242 -> {243} [style=dotted]; + 243 -> {244} [style=dotted]; + 244 -> {245}; + 245 -> {246 247}; + 246 -> {253}; 247 -> {248}; 248 -> {249}; 249 -> {250}; 250 -> {251}; 251 -> {252}; 252 -> {253}; - - subgraph cluster_65 { - color=red - 254 [label="Enter function test_11" style="filled" fillcolor=red]; - subgraph cluster_66 { - color=blue - 255 [label="Enter block"]; - subgraph cluster_67 { - color=blue - 256 [label="Enter when"]; - subgraph cluster_68 { - color=blue - 257 [label="Enter when branch condition "]; - subgraph cluster_69 { - color=blue - 258 [label="Enter &&"]; - 259 [label="Const: Boolean(false)"]; - 260 [label="Exit left part of &&"]; - 261 [label="Enter right part of &&" style="filled" fillcolor=gray]; - 262 [label="Access variable R|/x|" style="filled" fillcolor=gray]; - 263 [label="Type operator: (R|/x| is R|A|)" style="filled" fillcolor=gray]; - 264 [label="Exit &&"]; - } - 265 [label="Exit when branch condition"]; - } - 266 [label="Synthetic else branch"]; - 267 [label="Enter when branch result"]; - subgraph cluster_70 { - color=blue - 268 [label="Enter block"]; - 269 [label="Access variable R|/x|"]; - 270 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 271 [label="Exit block"]; - } - 272 [label="Exit when branch result"]; - 273 [label="Exit when"]; - } - 274 [label="Exit block"]; - } - 275 [label="Exit function test_11" style="filled" fillcolor=red]; - } + 253 -> {254}; 254 -> {255}; - 255 -> {256}; + + subgraph cluster_66 { + color=red + 256 [label="Enter function test_11" style="filled" fillcolor=red]; + subgraph cluster_67 { + color=blue + 257 [label="Enter block"]; + subgraph cluster_68 { + color=blue + 258 [label="Enter when"]; + subgraph cluster_69 { + color=blue + 259 [label="Enter when branch condition "]; + subgraph cluster_70 { + color=blue + 260 [label="Enter &&"]; + 261 [label="Const: Boolean(false)"]; + 262 [label="Exit left part of &&"]; + 263 [label="Enter right part of &&" style="filled" fillcolor=gray]; + 264 [label="Access variable R|/x|" style="filled" fillcolor=gray]; + 265 [label="Type operator: (R|/x| is R|A|)" style="filled" fillcolor=gray]; + 266 [label="Exit &&"]; + } + 267 [label="Exit when branch condition"]; + } + 268 [label="Synthetic else branch"]; + 269 [label="Enter when branch result"]; + subgraph cluster_71 { + color=blue + 270 [label="Enter block"]; + 271 [label="Access variable R|/x|"]; + 272 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 273 [label="Exit block"]; + } + 274 [label="Exit when branch result"]; + 275 [label="Exit when"]; + } + 276 [label="Exit block"]; + } + 277 [label="Exit function test_11" style="filled" fillcolor=red]; + } 256 -> {257}; 257 -> {258}; 258 -> {259}; 259 -> {260}; - 260 -> {264}; - 260 -> {261} [style=dotted]; - 261 -> {262} [style=dotted]; + 260 -> {261}; + 261 -> {262}; + 262 -> {266}; 262 -> {263} [style=dotted]; 263 -> {264} [style=dotted]; - 264 -> {265}; - 265 -> {266 267}; - 266 -> {273}; - 267 -> {268}; - 268 -> {269}; + 264 -> {265} [style=dotted]; + 265 -> {266} [style=dotted]; + 266 -> {267}; + 267 -> {268 269}; + 268 -> {275}; 269 -> {270}; 270 -> {271}; 271 -> {272}; 272 -> {273}; 273 -> {274}; 274 -> {275}; - - subgraph cluster_71 { - color=red - 276 [label="Enter function test_12" style="filled" fillcolor=red]; - subgraph cluster_72 { - color=blue - 277 [label="Enter block"]; - subgraph cluster_73 { - color=blue - 278 [label="Enter when"]; - subgraph cluster_74 { - color=blue - 279 [label="Enter when branch condition "]; - subgraph cluster_75 { - color=blue - 280 [label="Enter &&"]; - 281 [label="Access variable R|/x|"]; - 282 [label="Type operator: (R|/x| is R|A|)"]; - 283 [label="Exit left part of &&"]; - 284 [label="Enter right part of &&"]; - 285 [label="Const: Boolean(false)"]; - 286 [label="Exit &&"]; - } - 287 [label="Exit when branch condition"]; - } - 288 [label="Synthetic else branch"]; - 289 [label="Enter when branch result"]; - subgraph cluster_76 { - color=blue - 290 [label="Enter block"]; - 291 [label="Access variable R|/x|"]; - 292 [label="Smart cast: R|/x|"]; - 293 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 294 [label="Exit block"]; - } - 295 [label="Exit when branch result"]; - 296 [label="Exit when"]; - } - 297 [label="Exit block"]; - } - 298 [label="Exit function test_12" style="filled" fillcolor=red]; - } + 275 -> {276}; 276 -> {277}; - 277 -> {278}; + + subgraph cluster_72 { + color=red + 278 [label="Enter function test_12" style="filled" fillcolor=red]; + subgraph cluster_73 { + color=blue + 279 [label="Enter block"]; + subgraph cluster_74 { + color=blue + 280 [label="Enter when"]; + subgraph cluster_75 { + color=blue + 281 [label="Enter when branch condition "]; + subgraph cluster_76 { + color=blue + 282 [label="Enter &&"]; + 283 [label="Access variable R|/x|"]; + 284 [label="Type operator: (R|/x| is R|A|)"]; + 285 [label="Exit left part of &&"]; + 286 [label="Enter right part of &&"]; + 287 [label="Const: Boolean(false)"]; + 288 [label="Exit &&"]; + } + 289 [label="Exit when branch condition"]; + } + 290 [label="Synthetic else branch"]; + 291 [label="Enter when branch result"]; + subgraph cluster_77 { + color=blue + 292 [label="Enter block"]; + 293 [label="Access variable R|/x|"]; + 294 [label="Smart cast: R|/x|"]; + 295 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 296 [label="Exit block"]; + } + 297 [label="Exit when branch result"]; + 298 [label="Exit when"]; + } + 299 [label="Exit block"]; + } + 300 [label="Exit function test_12" style="filled" fillcolor=red]; + } 278 -> {279}; 279 -> {280}; 280 -> {281}; 281 -> {282}; 282 -> {283}; - 283 -> {284 286}; + 283 -> {284}; 284 -> {285}; - 285 -> {286}; + 285 -> {286 288}; 286 -> {287}; - 287 -> {288 289}; - 288 -> {296}; - 289 -> {290}; - 290 -> {291}; + 287 -> {288}; + 288 -> {289}; + 289 -> {290 291}; + 290 -> {298}; 291 -> {292}; 292 -> {293}; 293 -> {294}; @@ -834,64 +839,64 @@ digraph booleanOperators_kt { 295 -> {296}; 296 -> {297}; 297 -> {298}; - - subgraph cluster_77 { - color=red - 299 [label="Enter function test_13" style="filled" fillcolor=red]; - subgraph cluster_78 { - color=blue - 300 [label="Enter block"]; - subgraph cluster_79 { - color=blue - 301 [label="Enter when"]; - subgraph cluster_80 { - color=blue - 302 [label="Enter when branch condition "]; - subgraph cluster_81 { - color=blue - 303 [label="Enter &&"]; - 304 [label="Const: Boolean(true)"]; - 305 [label="Exit left part of &&"]; - 306 [label="Enter right part of &&"]; - 307 [label="Access variable R|/x|"]; - 308 [label="Type operator: (R|/x| is R|A|)"]; - 309 [label="Exit &&"]; - } - 310 [label="Exit when branch condition"]; - } - 311 [label="Synthetic else branch"]; - 312 [label="Enter when branch result"]; - subgraph cluster_82 { - color=blue - 313 [label="Enter block"]; - 314 [label="Access variable R|/x|"]; - 315 [label="Smart cast: R|/x|"]; - 316 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 317 [label="Exit block"]; - } - 318 [label="Exit when branch result"]; - 319 [label="Exit when"]; - } - 320 [label="Exit block"]; - } - 321 [label="Exit function test_13" style="filled" fillcolor=red]; - } + 298 -> {299}; 299 -> {300}; - 300 -> {301}; + + subgraph cluster_78 { + color=red + 301 [label="Enter function test_13" style="filled" fillcolor=red]; + subgraph cluster_79 { + color=blue + 302 [label="Enter block"]; + subgraph cluster_80 { + color=blue + 303 [label="Enter when"]; + subgraph cluster_81 { + color=blue + 304 [label="Enter when branch condition "]; + subgraph cluster_82 { + color=blue + 305 [label="Enter &&"]; + 306 [label="Const: Boolean(true)"]; + 307 [label="Exit left part of &&"]; + 308 [label="Enter right part of &&"]; + 309 [label="Access variable R|/x|"]; + 310 [label="Type operator: (R|/x| is R|A|)"]; + 311 [label="Exit &&"]; + } + 312 [label="Exit when branch condition"]; + } + 313 [label="Synthetic else branch"]; + 314 [label="Enter when branch result"]; + subgraph cluster_83 { + color=blue + 315 [label="Enter block"]; + 316 [label="Access variable R|/x|"]; + 317 [label="Smart cast: R|/x|"]; + 318 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 319 [label="Exit block"]; + } + 320 [label="Exit when branch result"]; + 321 [label="Exit when"]; + } + 322 [label="Exit block"]; + } + 323 [label="Exit function test_13" style="filled" fillcolor=red]; + } 301 -> {302}; 302 -> {303}; 303 -> {304}; 304 -> {305}; 305 -> {306}; - 305 -> {309} [style=dotted]; 306 -> {307}; 307 -> {308}; + 307 -> {311} [style=dotted]; 308 -> {309}; 309 -> {310}; - 310 -> {311 312}; - 311 -> {319}; - 312 -> {313}; - 313 -> {314}; + 310 -> {311}; + 311 -> {312}; + 312 -> {313 314}; + 313 -> {321}; 314 -> {315}; 315 -> {316}; 316 -> {317}; @@ -899,63 +904,63 @@ digraph booleanOperators_kt { 318 -> {319}; 319 -> {320}; 320 -> {321}; - - subgraph cluster_83 { - color=red - 322 [label="Enter function test_14" style="filled" fillcolor=red]; - subgraph cluster_84 { - color=blue - 323 [label="Enter block"]; - subgraph cluster_85 { - color=blue - 324 [label="Enter when"]; - subgraph cluster_86 { - color=blue - 325 [label="Enter when branch condition "]; - subgraph cluster_87 { - color=blue - 326 [label="Enter &&"]; - 327 [label="Access variable R|/x|"]; - 328 [label="Type operator: (R|/x| is R|A|)"]; - 329 [label="Exit left part of &&"]; - 330 [label="Enter right part of &&"]; - 331 [label="Const: Boolean(false)"]; - 332 [label="Exit &&"]; - } - 333 [label="Exit when branch condition"]; - } - 334 [label="Synthetic else branch"]; - 335 [label="Enter when branch result"]; - subgraph cluster_88 { - color=blue - 336 [label="Enter block"]; - 337 [label="Access variable R|/x|"]; - 338 [label="Smart cast: R|/x|"]; - 339 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 340 [label="Exit block"]; - } - 341 [label="Exit when branch result"]; - 342 [label="Exit when"]; - } - 343 [label="Exit block"]; - } - 344 [label="Exit function test_14" style="filled" fillcolor=red]; - } + 321 -> {322}; 322 -> {323}; - 323 -> {324}; + + subgraph cluster_84 { + color=red + 324 [label="Enter function test_14" style="filled" fillcolor=red]; + subgraph cluster_85 { + color=blue + 325 [label="Enter block"]; + subgraph cluster_86 { + color=blue + 326 [label="Enter when"]; + subgraph cluster_87 { + color=blue + 327 [label="Enter when branch condition "]; + subgraph cluster_88 { + color=blue + 328 [label="Enter &&"]; + 329 [label="Access variable R|/x|"]; + 330 [label="Type operator: (R|/x| is R|A|)"]; + 331 [label="Exit left part of &&"]; + 332 [label="Enter right part of &&"]; + 333 [label="Const: Boolean(false)"]; + 334 [label="Exit &&"]; + } + 335 [label="Exit when branch condition"]; + } + 336 [label="Synthetic else branch"]; + 337 [label="Enter when branch result"]; + subgraph cluster_89 { + color=blue + 338 [label="Enter block"]; + 339 [label="Access variable R|/x|"]; + 340 [label="Smart cast: R|/x|"]; + 341 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 342 [label="Exit block"]; + } + 343 [label="Exit when branch result"]; + 344 [label="Exit when"]; + } + 345 [label="Exit block"]; + } + 346 [label="Exit function test_14" style="filled" fillcolor=red]; + } 324 -> {325}; 325 -> {326}; 326 -> {327}; 327 -> {328}; 328 -> {329}; - 329 -> {330 332}; + 329 -> {330}; 330 -> {331}; - 331 -> {332}; + 331 -> {332 334}; 332 -> {333}; - 333 -> {334 335}; - 334 -> {342}; - 335 -> {336}; - 336 -> {337}; + 333 -> {334}; + 334 -> {335}; + 335 -> {336 337}; + 336 -> {344}; 337 -> {338}; 338 -> {339}; 339 -> {340}; @@ -963,5 +968,7 @@ digraph booleanOperators_kt { 341 -> {342}; 342 -> {343}; 343 -> {344}; + 344 -> {345}; + 345 -> {346}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/equalsToBoolean.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/equalsToBoolean.dot index 85e40e5ed08..01d660cbd3a 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/equalsToBoolean.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/equalsToBoolean.dot @@ -5,69 +5,74 @@ digraph equalsToBoolean_kt { subgraph cluster_0 { color=red - 0 [label="Enter class A" style="filled" fillcolor=red]; - 1 [label="Exit class A" style="filled" fillcolor=red]; + 0 [label="Enter file equalsToBoolean.kt" style="filled" fillcolor=red]; + 1 [label="Exit file equalsToBoolean.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; subgraph cluster_1 { color=red - 2 [label="Enter function foo" style="filled" fillcolor=red]; - 3 [label="Exit function foo" style="filled" fillcolor=red]; + 2 [label="Enter class A" style="filled" fillcolor=red]; + 3 [label="Exit class A" style="filled" fillcolor=red]; } - 2 -> {3}; + 2 -> {3} [color=green]; subgraph cluster_2 { color=red - 4 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_3 { - color=blue - 5 [label="Enter block"]; - subgraph cluster_4 { - color=blue - 6 [label="Enter when"]; - subgraph cluster_5 { - color=blue - 7 [label="Enter when branch condition "]; - 8 [label="Access variable R|/b|"]; - 9 [label="Const: Boolean(true)"]; - 10 [label="Equality operator =="]; - 11 [label="Const: Boolean(true)"]; - 12 [label="Equality operator =="]; - 13 [label="Exit when branch condition"]; - } - subgraph cluster_6 { - color=blue - 14 [label="Enter when branch condition else"]; - 15 [label="Exit when branch condition"]; - } - 16 [label="Enter when branch result"]; - subgraph cluster_7 { - color=blue - 17 [label="Enter block"]; - 18 [label="Access variable R|/b|"]; - 19 [label="Function call: R|/b|.R|kotlin/Boolean.not#|()" style="filled" fillcolor=yellow]; - 20 [label="Exit block"]; - } - 21 [label="Exit when branch result"]; - 22 [label="Enter when branch result"]; - subgraph cluster_8 { - color=blue - 23 [label="Enter block"]; - 24 [label="Access variable R|/b|"]; - 25 [label="Smart cast: R|/b|"]; - 26 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 27 [label="Exit block"]; - } - 28 [label="Exit when branch result"]; - 29 [label="Exit when"]; - } - 30 [label="Exit block"]; - } - 31 [label="Exit function test_1" style="filled" fillcolor=red]; + 4 [label="Enter function foo" style="filled" fillcolor=red]; + 5 [label="Exit function foo" style="filled" fillcolor=red]; } 4 -> {5}; - 5 -> {6}; + + subgraph cluster_3 { + color=red + 6 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_4 { + color=blue + 7 [label="Enter block"]; + subgraph cluster_5 { + color=blue + 8 [label="Enter when"]; + subgraph cluster_6 { + color=blue + 9 [label="Enter when branch condition "]; + 10 [label="Access variable R|/b|"]; + 11 [label="Const: Boolean(true)"]; + 12 [label="Equality operator =="]; + 13 [label="Const: Boolean(true)"]; + 14 [label="Equality operator =="]; + 15 [label="Exit when branch condition"]; + } + subgraph cluster_7 { + color=blue + 16 [label="Enter when branch condition else"]; + 17 [label="Exit when branch condition"]; + } + 18 [label="Enter when branch result"]; + subgraph cluster_8 { + color=blue + 19 [label="Enter block"]; + 20 [label="Access variable R|/b|"]; + 21 [label="Function call: R|/b|.R|kotlin/Boolean.not#|()" style="filled" fillcolor=yellow]; + 22 [label="Exit block"]; + } + 23 [label="Exit when branch result"]; + 24 [label="Enter when branch result"]; + subgraph cluster_9 { + color=blue + 25 [label="Enter block"]; + 26 [label="Access variable R|/b|"]; + 27 [label="Smart cast: R|/b|"]; + 28 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 29 [label="Exit block"]; + } + 30 [label="Exit when branch result"]; + 31 [label="Exit when"]; + } + 32 [label="Exit block"]; + } + 33 [label="Exit function test_1" style="filled" fillcolor=red]; + } 6 -> {7}; 7 -> {8}; 8 -> {9}; @@ -75,17 +80,17 @@ digraph equalsToBoolean_kt { 10 -> {11}; 11 -> {12}; 12 -> {13}; - 13 -> {14 22}; + 13 -> {14}; 14 -> {15}; - 15 -> {16}; + 15 -> {16 24}; 16 -> {17}; 17 -> {18}; 18 -> {19}; 19 -> {20}; 20 -> {21}; - 21 -> {29}; + 21 -> {22}; 22 -> {23}; - 23 -> {24}; + 23 -> {31}; 24 -> {25}; 25 -> {26}; 26 -> {27}; @@ -93,58 +98,58 @@ digraph equalsToBoolean_kt { 28 -> {29}; 29 -> {30}; 30 -> {31}; + 31 -> {32}; + 32 -> {33}; - subgraph cluster_9 { + subgraph cluster_10 { color=red - 32 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_10 { + 34 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_11 { color=blue - 33 [label="Enter block"]; - subgraph cluster_11 { + 35 [label="Enter block"]; + subgraph cluster_12 { color=blue - 34 [label="Enter when"]; - subgraph cluster_12 { - color=blue - 35 [label="Enter when branch condition "]; - 36 [label="Access variable R|/b|"]; - 37 [label="Const: Boolean(true)"]; - 38 [label="Equality operator =="]; - 39 [label="Const: Boolean(true)"]; - 40 [label="Equality operator !="]; - 41 [label="Exit when branch condition"]; - } + 36 [label="Enter when"]; subgraph cluster_13 { color=blue - 42 [label="Enter when branch condition else"]; + 37 [label="Enter when branch condition "]; + 38 [label="Access variable R|/b|"]; + 39 [label="Const: Boolean(true)"]; + 40 [label="Equality operator =="]; + 41 [label="Const: Boolean(true)"]; + 42 [label="Equality operator !="]; 43 [label="Exit when branch condition"]; } - 44 [label="Enter when branch result"]; subgraph cluster_14 { color=blue - 45 [label="Enter block"]; - 46 [label="Access variable R|/b|"]; - 47 [label="Smart cast: R|/b|"]; - 48 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 49 [label="Exit block"]; + 44 [label="Enter when branch condition else"]; + 45 [label="Exit when branch condition"]; } - 50 [label="Exit when branch result"]; - 51 [label="Enter when branch result"]; + 46 [label="Enter when branch result"]; subgraph cluster_15 { color=blue - 52 [label="Enter block"]; - 53 [label="Access variable R|/b|"]; - 54 [label="Function call: R|/b|.R|kotlin/Boolean.not#|()" style="filled" fillcolor=yellow]; - 55 [label="Exit block"]; + 47 [label="Enter block"]; + 48 [label="Access variable R|/b|"]; + 49 [label="Smart cast: R|/b|"]; + 50 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 51 [label="Exit block"]; } - 56 [label="Exit when branch result"]; - 57 [label="Exit when"]; + 52 [label="Exit when branch result"]; + 53 [label="Enter when branch result"]; + subgraph cluster_16 { + color=blue + 54 [label="Enter block"]; + 55 [label="Access variable R|/b|"]; + 56 [label="Function call: R|/b|.R|kotlin/Boolean.not#|()" style="filled" fillcolor=yellow]; + 57 [label="Exit block"]; + } + 58 [label="Exit when branch result"]; + 59 [label="Exit when"]; } - 58 [label="Exit block"]; + 60 [label="Exit block"]; } - 59 [label="Exit function test_2" style="filled" fillcolor=red]; + 61 [label="Exit function test_2" style="filled" fillcolor=red]; } - 32 -> {33}; - 33 -> {34}; 34 -> {35}; 35 -> {36}; 36 -> {37}; @@ -152,76 +157,76 @@ digraph equalsToBoolean_kt { 38 -> {39}; 39 -> {40}; 40 -> {41}; - 41 -> {42 51}; + 41 -> {42}; 42 -> {43}; - 43 -> {44}; + 43 -> {44 53}; 44 -> {45}; 45 -> {46}; 46 -> {47}; 47 -> {48}; 48 -> {49}; 49 -> {50}; - 50 -> {57}; + 50 -> {51}; 51 -> {52}; - 52 -> {53}; + 52 -> {59}; 53 -> {54}; 54 -> {55}; 55 -> {56}; 56 -> {57}; 57 -> {58}; 58 -> {59}; + 59 -> {60}; + 60 -> {61}; - subgraph cluster_16 { + subgraph cluster_17 { color=red - 60 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_17 { + 62 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_18 { color=blue - 61 [label="Enter block"]; - subgraph cluster_18 { + 63 [label="Enter block"]; + subgraph cluster_19 { color=blue - 62 [label="Enter when"]; - subgraph cluster_19 { - color=blue - 63 [label="Enter when branch condition "]; - 64 [label="Access variable R|/b|"]; - 65 [label="Const: Boolean(true)"]; - 66 [label="Equality operator =="]; - 67 [label="Const: Boolean(false)"]; - 68 [label="Equality operator =="]; - 69 [label="Exit when branch condition"]; - } + 64 [label="Enter when"]; subgraph cluster_20 { color=blue - 70 [label="Enter when branch condition else"]; + 65 [label="Enter when branch condition "]; + 66 [label="Access variable R|/b|"]; + 67 [label="Const: Boolean(true)"]; + 68 [label="Equality operator =="]; + 69 [label="Const: Boolean(false)"]; + 70 [label="Equality operator =="]; 71 [label="Exit when branch condition"]; } - 72 [label="Enter when branch result"]; subgraph cluster_21 { color=blue - 73 [label="Enter block"]; - 74 [label="Access variable R|/b|"]; - 75 [label="Smart cast: R|/b|"]; - 76 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 77 [label="Exit block"]; + 72 [label="Enter when branch condition else"]; + 73 [label="Exit when branch condition"]; } - 78 [label="Exit when branch result"]; - 79 [label="Enter when branch result"]; + 74 [label="Enter when branch result"]; subgraph cluster_22 { color=blue - 80 [label="Enter block"]; - 81 [label="Access variable R|/b|"]; - 82 [label="Function call: R|/b|.R|kotlin/Boolean.not#|()" style="filled" fillcolor=yellow]; - 83 [label="Exit block"]; + 75 [label="Enter block"]; + 76 [label="Access variable R|/b|"]; + 77 [label="Smart cast: R|/b|"]; + 78 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 79 [label="Exit block"]; } - 84 [label="Exit when branch result"]; - 85 [label="Exit when"]; + 80 [label="Exit when branch result"]; + 81 [label="Enter when branch result"]; + subgraph cluster_23 { + color=blue + 82 [label="Enter block"]; + 83 [label="Access variable R|/b|"]; + 84 [label="Function call: R|/b|.R|kotlin/Boolean.not#|()" style="filled" fillcolor=yellow]; + 85 [label="Exit block"]; + } + 86 [label="Exit when branch result"]; + 87 [label="Exit when"]; } - 86 [label="Exit block"]; + 88 [label="Exit block"]; } - 87 [label="Exit function test_3" style="filled" fillcolor=red]; + 89 [label="Exit function test_3" style="filled" fillcolor=red]; } - 60 -> {61}; - 61 -> {62}; 62 -> {63}; 63 -> {64}; 64 -> {65}; @@ -229,76 +234,76 @@ digraph equalsToBoolean_kt { 66 -> {67}; 67 -> {68}; 68 -> {69}; - 69 -> {70 79}; + 69 -> {70}; 70 -> {71}; - 71 -> {72}; + 71 -> {72 81}; 72 -> {73}; 73 -> {74}; 74 -> {75}; 75 -> {76}; 76 -> {77}; 77 -> {78}; - 78 -> {85}; + 78 -> {79}; 79 -> {80}; - 80 -> {81}; + 80 -> {87}; 81 -> {82}; 82 -> {83}; 83 -> {84}; 84 -> {85}; 85 -> {86}; 86 -> {87}; + 87 -> {88}; + 88 -> {89}; - subgraph cluster_23 { + subgraph cluster_24 { color=red - 88 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_24 { + 90 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_25 { color=blue - 89 [label="Enter block"]; - subgraph cluster_25 { + 91 [label="Enter block"]; + subgraph cluster_26 { color=blue - 90 [label="Enter when"]; - subgraph cluster_26 { - color=blue - 91 [label="Enter when branch condition "]; - 92 [label="Access variable R|/b|"]; - 93 [label="Const: Boolean(true)"]; - 94 [label="Equality operator =="]; - 95 [label="Const: Boolean(false)"]; - 96 [label="Equality operator !="]; - 97 [label="Exit when branch condition"]; - } + 92 [label="Enter when"]; subgraph cluster_27 { color=blue - 98 [label="Enter when branch condition else"]; + 93 [label="Enter when branch condition "]; + 94 [label="Access variable R|/b|"]; + 95 [label="Const: Boolean(true)"]; + 96 [label="Equality operator =="]; + 97 [label="Const: Boolean(false)"]; + 98 [label="Equality operator !="]; 99 [label="Exit when branch condition"]; } - 100 [label="Enter when branch result"]; subgraph cluster_28 { color=blue - 101 [label="Enter block"]; - 102 [label="Access variable R|/b|"]; - 103 [label="Function call: R|/b|.R|kotlin/Boolean.not#|()" style="filled" fillcolor=yellow]; - 104 [label="Exit block"]; + 100 [label="Enter when branch condition else"]; + 101 [label="Exit when branch condition"]; } - 105 [label="Exit when branch result"]; - 106 [label="Enter when branch result"]; + 102 [label="Enter when branch result"]; subgraph cluster_29 { color=blue - 107 [label="Enter block"]; - 108 [label="Access variable R|/b|"]; - 109 [label="Smart cast: R|/b|"]; - 110 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 111 [label="Exit block"]; + 103 [label="Enter block"]; + 104 [label="Access variable R|/b|"]; + 105 [label="Function call: R|/b|.R|kotlin/Boolean.not#|()" style="filled" fillcolor=yellow]; + 106 [label="Exit block"]; } - 112 [label="Exit when branch result"]; - 113 [label="Exit when"]; + 107 [label="Exit when branch result"]; + 108 [label="Enter when branch result"]; + subgraph cluster_30 { + color=blue + 109 [label="Enter block"]; + 110 [label="Access variable R|/b|"]; + 111 [label="Smart cast: R|/b|"]; + 112 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 113 [label="Exit block"]; + } + 114 [label="Exit when branch result"]; + 115 [label="Exit when"]; } - 114 [label="Exit block"]; + 116 [label="Exit block"]; } - 115 [label="Exit function test_4" style="filled" fillcolor=red]; + 117 [label="Exit function test_4" style="filled" fillcolor=red]; } - 88 -> {89}; - 89 -> {90}; 90 -> {91}; 91 -> {92}; 92 -> {93}; @@ -306,17 +311,17 @@ digraph equalsToBoolean_kt { 94 -> {95}; 95 -> {96}; 96 -> {97}; - 97 -> {98 106}; + 97 -> {98}; 98 -> {99}; - 99 -> {100}; + 99 -> {100 108}; 100 -> {101}; 101 -> {102}; 102 -> {103}; 103 -> {104}; 104 -> {105}; - 105 -> {113}; + 105 -> {106}; 106 -> {107}; - 107 -> {108}; + 107 -> {115}; 108 -> {109}; 109 -> {110}; 110 -> {111}; @@ -324,58 +329,58 @@ digraph equalsToBoolean_kt { 112 -> {113}; 113 -> {114}; 114 -> {115}; + 115 -> {116}; + 116 -> {117}; - subgraph cluster_30 { + subgraph cluster_31 { color=red - 116 [label="Enter function test_5" style="filled" fillcolor=red]; - subgraph cluster_31 { + 118 [label="Enter function test_5" style="filled" fillcolor=red]; + subgraph cluster_32 { color=blue - 117 [label="Enter block"]; - subgraph cluster_32 { + 119 [label="Enter block"]; + subgraph cluster_33 { color=blue - 118 [label="Enter when"]; - subgraph cluster_33 { - color=blue - 119 [label="Enter when branch condition "]; - 120 [label="Access variable R|/b|"]; - 121 [label="Const: Boolean(true)"]; - 122 [label="Equality operator !="]; - 123 [label="Const: Boolean(true)"]; - 124 [label="Equality operator =="]; - 125 [label="Exit when branch condition"]; - } + 120 [label="Enter when"]; subgraph cluster_34 { color=blue - 126 [label="Enter when branch condition else"]; + 121 [label="Enter when branch condition "]; + 122 [label="Access variable R|/b|"]; + 123 [label="Const: Boolean(true)"]; + 124 [label="Equality operator !="]; + 125 [label="Const: Boolean(true)"]; + 126 [label="Equality operator =="]; 127 [label="Exit when branch condition"]; } - 128 [label="Enter when branch result"]; subgraph cluster_35 { color=blue - 129 [label="Enter block"]; - 130 [label="Access variable R|/b|"]; - 131 [label="Smart cast: R|/b|"]; - 132 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 133 [label="Exit block"]; + 128 [label="Enter when branch condition else"]; + 129 [label="Exit when branch condition"]; } - 134 [label="Exit when branch result"]; - 135 [label="Enter when branch result"]; + 130 [label="Enter when branch result"]; subgraph cluster_36 { color=blue - 136 [label="Enter block"]; - 137 [label="Access variable R|/b|"]; - 138 [label="Function call: R|/b|.R|kotlin/Boolean.not#|()" style="filled" fillcolor=yellow]; - 139 [label="Exit block"]; + 131 [label="Enter block"]; + 132 [label="Access variable R|/b|"]; + 133 [label="Smart cast: R|/b|"]; + 134 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 135 [label="Exit block"]; } - 140 [label="Exit when branch result"]; - 141 [label="Exit when"]; + 136 [label="Exit when branch result"]; + 137 [label="Enter when branch result"]; + subgraph cluster_37 { + color=blue + 138 [label="Enter block"]; + 139 [label="Access variable R|/b|"]; + 140 [label="Function call: R|/b|.R|kotlin/Boolean.not#|()" style="filled" fillcolor=yellow]; + 141 [label="Exit block"]; + } + 142 [label="Exit when branch result"]; + 143 [label="Exit when"]; } - 142 [label="Exit block"]; + 144 [label="Exit block"]; } - 143 [label="Exit function test_5" style="filled" fillcolor=red]; + 145 [label="Exit function test_5" style="filled" fillcolor=red]; } - 116 -> {117}; - 117 -> {118}; 118 -> {119}; 119 -> {120}; 120 -> {121}; @@ -383,76 +388,76 @@ digraph equalsToBoolean_kt { 122 -> {123}; 123 -> {124}; 124 -> {125}; - 125 -> {126 135}; + 125 -> {126}; 126 -> {127}; - 127 -> {128}; + 127 -> {128 137}; 128 -> {129}; 129 -> {130}; 130 -> {131}; 131 -> {132}; 132 -> {133}; 133 -> {134}; - 134 -> {141}; + 134 -> {135}; 135 -> {136}; - 136 -> {137}; + 136 -> {143}; 137 -> {138}; 138 -> {139}; 139 -> {140}; 140 -> {141}; 141 -> {142}; 142 -> {143}; + 143 -> {144}; + 144 -> {145}; - subgraph cluster_37 { + subgraph cluster_38 { color=red - 144 [label="Enter function test_6" style="filled" fillcolor=red]; - subgraph cluster_38 { + 146 [label="Enter function test_6" style="filled" fillcolor=red]; + subgraph cluster_39 { color=blue - 145 [label="Enter block"]; - subgraph cluster_39 { + 147 [label="Enter block"]; + subgraph cluster_40 { color=blue - 146 [label="Enter when"]; - subgraph cluster_40 { - color=blue - 147 [label="Enter when branch condition "]; - 148 [label="Access variable R|/b|"]; - 149 [label="Const: Boolean(true)"]; - 150 [label="Equality operator !="]; - 151 [label="Const: Boolean(true)"]; - 152 [label="Equality operator !="]; - 153 [label="Exit when branch condition"]; - } + 148 [label="Enter when"]; subgraph cluster_41 { color=blue - 154 [label="Enter when branch condition else"]; + 149 [label="Enter when branch condition "]; + 150 [label="Access variable R|/b|"]; + 151 [label="Const: Boolean(true)"]; + 152 [label="Equality operator !="]; + 153 [label="Const: Boolean(true)"]; + 154 [label="Equality operator !="]; 155 [label="Exit when branch condition"]; } - 156 [label="Enter when branch result"]; subgraph cluster_42 { color=blue - 157 [label="Enter block"]; - 158 [label="Access variable R|/b|"]; - 159 [label="Function call: R|/b|.R|kotlin/Boolean.not#|()" style="filled" fillcolor=yellow]; - 160 [label="Exit block"]; + 156 [label="Enter when branch condition else"]; + 157 [label="Exit when branch condition"]; } - 161 [label="Exit when branch result"]; - 162 [label="Enter when branch result"]; + 158 [label="Enter when branch result"]; subgraph cluster_43 { color=blue - 163 [label="Enter block"]; - 164 [label="Access variable R|/b|"]; - 165 [label="Smart cast: R|/b|"]; - 166 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 167 [label="Exit block"]; + 159 [label="Enter block"]; + 160 [label="Access variable R|/b|"]; + 161 [label="Function call: R|/b|.R|kotlin/Boolean.not#|()" style="filled" fillcolor=yellow]; + 162 [label="Exit block"]; } - 168 [label="Exit when branch result"]; - 169 [label="Exit when"]; + 163 [label="Exit when branch result"]; + 164 [label="Enter when branch result"]; + subgraph cluster_44 { + color=blue + 165 [label="Enter block"]; + 166 [label="Access variable R|/b|"]; + 167 [label="Smart cast: R|/b|"]; + 168 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 169 [label="Exit block"]; + } + 170 [label="Exit when branch result"]; + 171 [label="Exit when"]; } - 170 [label="Exit block"]; + 172 [label="Exit block"]; } - 171 [label="Exit function test_6" style="filled" fillcolor=red]; + 173 [label="Exit function test_6" style="filled" fillcolor=red]; } - 144 -> {145}; - 145 -> {146}; 146 -> {147}; 147 -> {148}; 148 -> {149}; @@ -460,17 +465,17 @@ digraph equalsToBoolean_kt { 150 -> {151}; 151 -> {152}; 152 -> {153}; - 153 -> {154 162}; + 153 -> {154}; 154 -> {155}; - 155 -> {156}; + 155 -> {156 164}; 156 -> {157}; 157 -> {158}; 158 -> {159}; 159 -> {160}; 160 -> {161}; - 161 -> {169}; + 161 -> {162}; 162 -> {163}; - 163 -> {164}; + 163 -> {171}; 164 -> {165}; 165 -> {166}; 166 -> {167}; @@ -478,58 +483,58 @@ digraph equalsToBoolean_kt { 168 -> {169}; 169 -> {170}; 170 -> {171}; + 171 -> {172}; + 172 -> {173}; - subgraph cluster_44 { + subgraph cluster_45 { color=red - 172 [label="Enter function test_7" style="filled" fillcolor=red]; - subgraph cluster_45 { + 174 [label="Enter function test_7" style="filled" fillcolor=red]; + subgraph cluster_46 { color=blue - 173 [label="Enter block"]; - subgraph cluster_46 { + 175 [label="Enter block"]; + subgraph cluster_47 { color=blue - 174 [label="Enter when"]; - subgraph cluster_47 { - color=blue - 175 [label="Enter when branch condition "]; - 176 [label="Access variable R|/b|"]; - 177 [label="Const: Boolean(true)"]; - 178 [label="Equality operator !="]; - 179 [label="Const: Boolean(false)"]; - 180 [label="Equality operator =="]; - 181 [label="Exit when branch condition"]; - } + 176 [label="Enter when"]; subgraph cluster_48 { color=blue - 182 [label="Enter when branch condition else"]; + 177 [label="Enter when branch condition "]; + 178 [label="Access variable R|/b|"]; + 179 [label="Const: Boolean(true)"]; + 180 [label="Equality operator !="]; + 181 [label="Const: Boolean(false)"]; + 182 [label="Equality operator =="]; 183 [label="Exit when branch condition"]; } - 184 [label="Enter when branch result"]; subgraph cluster_49 { color=blue - 185 [label="Enter block"]; - 186 [label="Access variable R|/b|"]; - 187 [label="Function call: R|/b|.R|kotlin/Boolean.not#|()" style="filled" fillcolor=yellow]; - 188 [label="Exit block"]; + 184 [label="Enter when branch condition else"]; + 185 [label="Exit when branch condition"]; } - 189 [label="Exit when branch result"]; - 190 [label="Enter when branch result"]; + 186 [label="Enter when branch result"]; subgraph cluster_50 { color=blue - 191 [label="Enter block"]; - 192 [label="Access variable R|/b|"]; - 193 [label="Smart cast: R|/b|"]; - 194 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 195 [label="Exit block"]; + 187 [label="Enter block"]; + 188 [label="Access variable R|/b|"]; + 189 [label="Function call: R|/b|.R|kotlin/Boolean.not#|()" style="filled" fillcolor=yellow]; + 190 [label="Exit block"]; } - 196 [label="Exit when branch result"]; - 197 [label="Exit when"]; + 191 [label="Exit when branch result"]; + 192 [label="Enter when branch result"]; + subgraph cluster_51 { + color=blue + 193 [label="Enter block"]; + 194 [label="Access variable R|/b|"]; + 195 [label="Smart cast: R|/b|"]; + 196 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 197 [label="Exit block"]; + } + 198 [label="Exit when branch result"]; + 199 [label="Exit when"]; } - 198 [label="Exit block"]; + 200 [label="Exit block"]; } - 199 [label="Exit function test_7" style="filled" fillcolor=red]; + 201 [label="Exit function test_7" style="filled" fillcolor=red]; } - 172 -> {173}; - 173 -> {174}; 174 -> {175}; 175 -> {176}; 176 -> {177}; @@ -537,17 +542,17 @@ digraph equalsToBoolean_kt { 178 -> {179}; 179 -> {180}; 180 -> {181}; - 181 -> {182 190}; + 181 -> {182}; 182 -> {183}; - 183 -> {184}; + 183 -> {184 192}; 184 -> {185}; 185 -> {186}; 186 -> {187}; 187 -> {188}; 188 -> {189}; - 189 -> {197}; + 189 -> {190}; 190 -> {191}; - 191 -> {192}; + 191 -> {199}; 192 -> {193}; 193 -> {194}; 194 -> {195}; @@ -555,58 +560,58 @@ digraph equalsToBoolean_kt { 196 -> {197}; 197 -> {198}; 198 -> {199}; + 199 -> {200}; + 200 -> {201}; - subgraph cluster_51 { + subgraph cluster_52 { color=red - 200 [label="Enter function test_8" style="filled" fillcolor=red]; - subgraph cluster_52 { + 202 [label="Enter function test_8" style="filled" fillcolor=red]; + subgraph cluster_53 { color=blue - 201 [label="Enter block"]; - subgraph cluster_53 { + 203 [label="Enter block"]; + subgraph cluster_54 { color=blue - 202 [label="Enter when"]; - subgraph cluster_54 { - color=blue - 203 [label="Enter when branch condition "]; - 204 [label="Access variable R|/b|"]; - 205 [label="Const: Boolean(true)"]; - 206 [label="Equality operator !="]; - 207 [label="Const: Boolean(false)"]; - 208 [label="Equality operator !="]; - 209 [label="Exit when branch condition"]; - } + 204 [label="Enter when"]; subgraph cluster_55 { color=blue - 210 [label="Enter when branch condition else"]; + 205 [label="Enter when branch condition "]; + 206 [label="Access variable R|/b|"]; + 207 [label="Const: Boolean(true)"]; + 208 [label="Equality operator !="]; + 209 [label="Const: Boolean(false)"]; + 210 [label="Equality operator !="]; 211 [label="Exit when branch condition"]; } - 212 [label="Enter when branch result"]; subgraph cluster_56 { color=blue - 213 [label="Enter block"]; - 214 [label="Access variable R|/b|"]; - 215 [label="Smart cast: R|/b|"]; - 216 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 217 [label="Exit block"]; + 212 [label="Enter when branch condition else"]; + 213 [label="Exit when branch condition"]; } - 218 [label="Exit when branch result"]; - 219 [label="Enter when branch result"]; + 214 [label="Enter when branch result"]; subgraph cluster_57 { color=blue - 220 [label="Enter block"]; - 221 [label="Access variable R|/b|"]; - 222 [label="Function call: R|/b|.R|kotlin/Boolean.not#|()" style="filled" fillcolor=yellow]; - 223 [label="Exit block"]; + 215 [label="Enter block"]; + 216 [label="Access variable R|/b|"]; + 217 [label="Smart cast: R|/b|"]; + 218 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 219 [label="Exit block"]; } - 224 [label="Exit when branch result"]; - 225 [label="Exit when"]; + 220 [label="Exit when branch result"]; + 221 [label="Enter when branch result"]; + subgraph cluster_58 { + color=blue + 222 [label="Enter block"]; + 223 [label="Access variable R|/b|"]; + 224 [label="Function call: R|/b|.R|kotlin/Boolean.not#|()" style="filled" fillcolor=yellow]; + 225 [label="Exit block"]; + } + 226 [label="Exit when branch result"]; + 227 [label="Exit when"]; } - 226 [label="Exit block"]; + 228 [label="Exit block"]; } - 227 [label="Exit function test_8" style="filled" fillcolor=red]; + 229 [label="Exit function test_8" style="filled" fillcolor=red]; } - 200 -> {201}; - 201 -> {202}; 202 -> {203}; 203 -> {204}; 204 -> {205}; @@ -614,23 +619,25 @@ digraph equalsToBoolean_kt { 206 -> {207}; 207 -> {208}; 208 -> {209}; - 209 -> {210 219}; + 209 -> {210}; 210 -> {211}; - 211 -> {212}; + 211 -> {212 221}; 212 -> {213}; 213 -> {214}; 214 -> {215}; 215 -> {216}; 216 -> {217}; 217 -> {218}; - 218 -> {225}; + 218 -> {219}; 219 -> {220}; - 220 -> {221}; + 220 -> {227}; 221 -> {222}; 222 -> {223}; 223 -> {224}; 224 -> {225}; 225 -> {226}; 226 -> {227}; + 227 -> {228}; + 228 -> {229}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/jumpFromRhsOfOperator.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/jumpFromRhsOfOperator.dot index 2f1dcb0480a..e7bd33e98f2 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/jumpFromRhsOfOperator.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/booleans/jumpFromRhsOfOperator.dot @@ -5,169 +5,174 @@ digraph jumpFromRhsOfOperator_kt { subgraph cluster_0 { color=red - 0 [label="Enter class A" style="filled" fillcolor=red]; - 1 [label="Exit class A" style="filled" fillcolor=red]; + 0 [label="Enter file jumpFromRhsOfOperator.kt" style="filled" fillcolor=red]; + 1 [label="Exit file jumpFromRhsOfOperator.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; subgraph cluster_1 { color=red - 2 [label="Enter function foo" style="filled" fillcolor=red]; - 3 [label="Exit function foo" style="filled" fillcolor=red]; + 2 [label="Enter class A" style="filled" fillcolor=red]; + 3 [label="Exit class A" style="filled" fillcolor=red]; } - 2 -> {3}; + 2 -> {3} [color=green]; subgraph cluster_2 { color=red - 4 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_3 { - color=blue - 5 [label="Enter block"]; - subgraph cluster_4 { - color=blue - 6 [label="Enter ||"]; - 7 [label="Access variable R|/a|"]; - 8 [label="Const: Null(null)"]; - 9 [label="Equality operator !="]; - 10 [label="Exit left part of ||"]; - 11 [label="Enter right part of ||"]; - 12 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; - 13 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 14 [label="Stub" style="filled" fillcolor=gray]; - 15 [label="Exit ||"]; - } - 16 [label="Access variable R|/a|"]; - 17 [label="Smart cast: R|/a|"]; - 18 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 19 [label="Exit block"]; - } - 20 [label="Exit function test_1" style="filled" fillcolor=red]; + 4 [label="Enter function foo" style="filled" fillcolor=red]; + 5 [label="Exit function foo" style="filled" fillcolor=red]; } 4 -> {5}; - 5 -> {6}; + + subgraph cluster_3 { + color=red + 6 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_4 { + color=blue + 7 [label="Enter block"]; + subgraph cluster_5 { + color=blue + 8 [label="Enter ||"]; + 9 [label="Access variable R|/a|"]; + 10 [label="Const: Null(null)"]; + 11 [label="Equality operator !="]; + 12 [label="Exit left part of ||"]; + 13 [label="Enter right part of ||"]; + 14 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; + 15 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 16 [label="Stub" style="filled" fillcolor=gray]; + 17 [label="Exit ||"]; + } + 18 [label="Access variable R|/a|"]; + 19 [label="Smart cast: R|/a|"]; + 20 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 21 [label="Exit block"]; + } + 22 [label="Exit function test_1" style="filled" fillcolor=red]; + } 6 -> {7}; 7 -> {8}; 8 -> {9}; 9 -> {10}; - 10 -> {11 15}; + 10 -> {11}; 11 -> {12}; - 12 -> {13}; - 13 -> {14} [style=dotted]; - 14 -> {15} [style=dotted]; - 15 -> {16}; - 16 -> {17}; + 12 -> {13 17}; + 13 -> {14}; + 14 -> {15}; + 15 -> {16} [style=dotted]; + 16 -> {17} [style=dotted]; 17 -> {18}; 18 -> {19}; 19 -> {20}; - - subgraph cluster_5 { - color=red - 21 [label="Enter function teat_2" style="filled" fillcolor=red]; - subgraph cluster_6 { - color=blue - 22 [label="Enter block"]; - subgraph cluster_7 { - color=blue - 23 [label="Enter &&"]; - 24 [label="Access variable R|/a|"]; - 25 [label="Const: Null(null)"]; - 26 [label="Equality operator =="]; - 27 [label="Exit left part of &&"]; - 28 [label="Enter right part of &&"]; - 29 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; - 30 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 31 [label="Stub" style="filled" fillcolor=gray]; - 32 [label="Exit &&"]; - } - 33 [label="Access variable R|/a|"]; - 34 [label="Smart cast: R|/a|"]; - 35 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 36 [label="Exit block"]; - } - 37 [label="Exit function teat_2" style="filled" fillcolor=red]; - } + 20 -> {21}; 21 -> {22}; - 22 -> {23}; + + subgraph cluster_6 { + color=red + 23 [label="Enter function teat_2" style="filled" fillcolor=red]; + subgraph cluster_7 { + color=blue + 24 [label="Enter block"]; + subgraph cluster_8 { + color=blue + 25 [label="Enter &&"]; + 26 [label="Access variable R|/a|"]; + 27 [label="Const: Null(null)"]; + 28 [label="Equality operator =="]; + 29 [label="Exit left part of &&"]; + 30 [label="Enter right part of &&"]; + 31 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; + 32 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 33 [label="Stub" style="filled" fillcolor=gray]; + 34 [label="Exit &&"]; + } + 35 [label="Access variable R|/a|"]; + 36 [label="Smart cast: R|/a|"]; + 37 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 38 [label="Exit block"]; + } + 39 [label="Exit function teat_2" style="filled" fillcolor=red]; + } 23 -> {24}; 24 -> {25}; 25 -> {26}; 26 -> {27}; - 27 -> {28 32}; + 27 -> {28}; 28 -> {29}; - 29 -> {30}; - 30 -> {31} [style=dotted]; - 31 -> {32} [style=dotted]; - 32 -> {33}; - 33 -> {34}; + 29 -> {30 34}; + 30 -> {31}; + 31 -> {32}; + 32 -> {33} [style=dotted]; + 33 -> {34} [style=dotted]; 34 -> {35}; 35 -> {36}; 36 -> {37}; - - subgraph cluster_8 { - color=red - 38 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_9 { - color=blue - 39 [label="Enter block"]; - subgraph cluster_10 { - color=blue - 40 [label="Enter when"]; - subgraph cluster_11 { - color=blue - 41 [label="Enter when branch condition "]; - subgraph cluster_12 { - color=blue - 42 [label="Enter ||"]; - 43 [label="Access variable R|/a|"]; - 44 [label="Const: Null(null)"]; - 45 [label="Equality operator !="]; - 46 [label="Exit left part of ||"]; - 47 [label="Enter right part of ||"]; - 48 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; - 49 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 50 [label="Stub" style="filled" fillcolor=gray]; - 51 [label="Exit ||"]; - } - 52 [label="Exit when branch condition"]; - } - 53 [label="Synthetic else branch"]; - 54 [label="Enter when branch result"]; - subgraph cluster_13 { - color=blue - 55 [label="Enter block"]; - 56 [label="Access variable R|/a|"]; - 57 [label="Smart cast: R|/a|"]; - 58 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 59 [label="Exit block"]; - } - 60 [label="Exit when branch result"]; - 61 [label="Exit when"]; - } - 62 [label="Access variable R|/a|"]; - 63 [label="Smart cast: R|/a|"]; - 64 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 65 [label="Exit block"]; - } - 66 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 37 -> {38}; 38 -> {39}; - 39 -> {40}; + + subgraph cluster_9 { + color=red + 40 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_10 { + color=blue + 41 [label="Enter block"]; + subgraph cluster_11 { + color=blue + 42 [label="Enter when"]; + subgraph cluster_12 { + color=blue + 43 [label="Enter when branch condition "]; + subgraph cluster_13 { + color=blue + 44 [label="Enter ||"]; + 45 [label="Access variable R|/a|"]; + 46 [label="Const: Null(null)"]; + 47 [label="Equality operator !="]; + 48 [label="Exit left part of ||"]; + 49 [label="Enter right part of ||"]; + 50 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; + 51 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 52 [label="Stub" style="filled" fillcolor=gray]; + 53 [label="Exit ||"]; + } + 54 [label="Exit when branch condition"]; + } + 55 [label="Synthetic else branch"]; + 56 [label="Enter when branch result"]; + subgraph cluster_14 { + color=blue + 57 [label="Enter block"]; + 58 [label="Access variable R|/a|"]; + 59 [label="Smart cast: R|/a|"]; + 60 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 61 [label="Exit block"]; + } + 62 [label="Exit when branch result"]; + 63 [label="Exit when"]; + } + 64 [label="Access variable R|/a|"]; + 65 [label="Smart cast: R|/a|"]; + 66 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 67 [label="Exit block"]; + } + 68 [label="Exit function test_3" style="filled" fillcolor=red]; + } 40 -> {41}; 41 -> {42}; 42 -> {43}; 43 -> {44}; 44 -> {45}; 45 -> {46}; - 46 -> {47 51}; + 46 -> {47}; 47 -> {48}; - 48 -> {49}; - 49 -> {50} [style=dotted]; - 50 -> {51} [style=dotted]; - 51 -> {52}; - 52 -> {53 54}; - 53 -> {61}; - 54 -> {55}; - 55 -> {56}; + 48 -> {49 53}; + 49 -> {50}; + 50 -> {51}; + 51 -> {52} [style=dotted]; + 52 -> {53} [style=dotted]; + 53 -> {54}; + 54 -> {55 56}; + 55 -> {63}; 56 -> {57}; 57 -> {58}; 58 -> {59}; @@ -178,72 +183,72 @@ digraph jumpFromRhsOfOperator_kt { 63 -> {64}; 64 -> {65}; 65 -> {66}; - - subgraph cluster_14 { - color=red - 67 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_15 { - color=blue - 68 [label="Enter block"]; - subgraph cluster_16 { - color=blue - 69 [label="Enter when"]; - subgraph cluster_17 { - color=blue - 70 [label="Enter when branch condition "]; - subgraph cluster_18 { - color=blue - 71 [label="Enter &&"]; - 72 [label="Access variable R|/a|"]; - 73 [label="Const: Null(null)"]; - 74 [label="Equality operator =="]; - 75 [label="Exit left part of &&"]; - 76 [label="Enter right part of &&"]; - 77 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; - 78 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 79 [label="Stub" style="filled" fillcolor=gray]; - 80 [label="Exit &&"]; - } - 81 [label="Exit when branch condition"]; - } - 82 [label="Synthetic else branch"]; - 83 [label="Enter when branch result"]; - subgraph cluster_19 { - color=blue - 84 [label="Enter block"]; - 85 [label="Access variable R|/a|"]; - 86 [label="Smart cast: R|/a|"]; - 87 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 88 [label="Exit block"]; - } - 89 [label="Exit when branch result"]; - 90 [label="Exit when"]; - } - 91 [label="Access variable R|/a|"]; - 92 [label="Smart cast: R|/a|"]; - 93 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 94 [label="Exit block"]; - } - 95 [label="Exit function test_4" style="filled" fillcolor=red]; - } + 66 -> {67}; 67 -> {68}; - 68 -> {69}; + + subgraph cluster_15 { + color=red + 69 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_16 { + color=blue + 70 [label="Enter block"]; + subgraph cluster_17 { + color=blue + 71 [label="Enter when"]; + subgraph cluster_18 { + color=blue + 72 [label="Enter when branch condition "]; + subgraph cluster_19 { + color=blue + 73 [label="Enter &&"]; + 74 [label="Access variable R|/a|"]; + 75 [label="Const: Null(null)"]; + 76 [label="Equality operator =="]; + 77 [label="Exit left part of &&"]; + 78 [label="Enter right part of &&"]; + 79 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; + 80 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 81 [label="Stub" style="filled" fillcolor=gray]; + 82 [label="Exit &&"]; + } + 83 [label="Exit when branch condition"]; + } + 84 [label="Synthetic else branch"]; + 85 [label="Enter when branch result"]; + subgraph cluster_20 { + color=blue + 86 [label="Enter block"]; + 87 [label="Access variable R|/a|"]; + 88 [label="Smart cast: R|/a|"]; + 89 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 90 [label="Exit block"]; + } + 91 [label="Exit when branch result"]; + 92 [label="Exit when"]; + } + 93 [label="Access variable R|/a|"]; + 94 [label="Smart cast: R|/a|"]; + 95 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 96 [label="Exit block"]; + } + 97 [label="Exit function test_4" style="filled" fillcolor=red]; + } 69 -> {70}; 70 -> {71}; 71 -> {72}; 72 -> {73}; 73 -> {74}; 74 -> {75}; - 75 -> {76 80}; + 75 -> {76}; 76 -> {77}; - 77 -> {78}; - 78 -> {79} [style=dotted]; - 79 -> {80} [style=dotted]; - 80 -> {81}; - 81 -> {82 83}; - 82 -> {90}; - 83 -> {84}; - 84 -> {85}; + 77 -> {78 82}; + 78 -> {79}; + 79 -> {80}; + 80 -> {81} [style=dotted]; + 81 -> {82} [style=dotted]; + 82 -> {83}; + 83 -> {84 85}; + 84 -> {92}; 85 -> {86}; 86 -> {87}; 87 -> {88}; @@ -254,158 +259,158 @@ digraph jumpFromRhsOfOperator_kt { 92 -> {93}; 93 -> {94}; 94 -> {95}; - - subgraph cluster_20 { - color=red - 96 [label="Enter function test_5" style="filled" fillcolor=red]; - subgraph cluster_21 { - color=blue - 97 [label="Enter block"]; - subgraph cluster_22 { - color=blue - 98 [label="Enter ||"]; - 99 [label="Access variable R|/a|"]; - 100 [label="Const: Null(null)"]; - 101 [label="Equality operator =="]; - 102 [label="Exit left part of ||"]; - 103 [label="Enter right part of ||"]; - 104 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; - 105 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 106 [label="Stub" style="filled" fillcolor=gray]; - 107 [label="Exit ||"]; - } - 108 [label="Access variable R|/a|"]; - 109 [label="Smart cast: R|/a|"]; - 110 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; - 111 [label="Exit block"]; - } - 112 [label="Exit function test_5" style="filled" fillcolor=red]; - } + 95 -> {96}; 96 -> {97}; - 97 -> {98}; + + subgraph cluster_21 { + color=red + 98 [label="Enter function test_5" style="filled" fillcolor=red]; + subgraph cluster_22 { + color=blue + 99 [label="Enter block"]; + subgraph cluster_23 { + color=blue + 100 [label="Enter ||"]; + 101 [label="Access variable R|/a|"]; + 102 [label="Const: Null(null)"]; + 103 [label="Equality operator =="]; + 104 [label="Exit left part of ||"]; + 105 [label="Enter right part of ||"]; + 106 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; + 107 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 108 [label="Stub" style="filled" fillcolor=gray]; + 109 [label="Exit ||"]; + } + 110 [label="Access variable R|/a|"]; + 111 [label="Smart cast: R|/a|"]; + 112 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + 113 [label="Exit block"]; + } + 114 [label="Exit function test_5" style="filled" fillcolor=red]; + } 98 -> {99}; 99 -> {100}; 100 -> {101}; 101 -> {102}; - 102 -> {103 107}; + 102 -> {103}; 103 -> {104}; - 104 -> {105}; - 105 -> {106} [style=dotted]; - 106 -> {107} [style=dotted]; - 107 -> {108}; - 108 -> {109}; + 104 -> {105 109}; + 105 -> {106}; + 106 -> {107}; + 107 -> {108} [style=dotted]; + 108 -> {109} [style=dotted]; 109 -> {110}; 110 -> {111}; 111 -> {112}; - - subgraph cluster_23 { - color=red - 113 [label="Enter function teat_6" style="filled" fillcolor=red]; - subgraph cluster_24 { - color=blue - 114 [label="Enter block"]; - subgraph cluster_25 { - color=blue - 115 [label="Enter &&"]; - 116 [label="Access variable R|/a|"]; - 117 [label="Const: Null(null)"]; - 118 [label="Equality operator !="]; - 119 [label="Exit left part of &&"]; - 120 [label="Enter right part of &&"]; - 121 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; - 122 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 123 [label="Stub" style="filled" fillcolor=gray]; - 124 [label="Exit &&"]; - } - 125 [label="Access variable R|/a|"]; - 126 [label="Smart cast: R|/a|"]; - 127 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; - 128 [label="Exit block"]; - } - 129 [label="Exit function teat_6" style="filled" fillcolor=red]; - } + 112 -> {113}; 113 -> {114}; - 114 -> {115}; + + subgraph cluster_24 { + color=red + 115 [label="Enter function teat_6" style="filled" fillcolor=red]; + subgraph cluster_25 { + color=blue + 116 [label="Enter block"]; + subgraph cluster_26 { + color=blue + 117 [label="Enter &&"]; + 118 [label="Access variable R|/a|"]; + 119 [label="Const: Null(null)"]; + 120 [label="Equality operator !="]; + 121 [label="Exit left part of &&"]; + 122 [label="Enter right part of &&"]; + 123 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; + 124 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 125 [label="Stub" style="filled" fillcolor=gray]; + 126 [label="Exit &&"]; + } + 127 [label="Access variable R|/a|"]; + 128 [label="Smart cast: R|/a|"]; + 129 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + 130 [label="Exit block"]; + } + 131 [label="Exit function teat_6" style="filled" fillcolor=red]; + } 115 -> {116}; 116 -> {117}; 117 -> {118}; 118 -> {119}; - 119 -> {120 124}; + 119 -> {120}; 120 -> {121}; - 121 -> {122}; - 122 -> {123} [style=dotted]; - 123 -> {124} [style=dotted]; - 124 -> {125}; - 125 -> {126}; + 121 -> {122 126}; + 122 -> {123}; + 123 -> {124}; + 124 -> {125} [style=dotted]; + 125 -> {126} [style=dotted]; 126 -> {127}; 127 -> {128}; 128 -> {129}; - - subgraph cluster_26 { - color=red - 130 [label="Enter function test_7" style="filled" fillcolor=red]; - subgraph cluster_27 { - color=blue - 131 [label="Enter block"]; - subgraph cluster_28 { - color=blue - 132 [label="Enter when"]; - subgraph cluster_29 { - color=blue - 133 [label="Enter when branch condition "]; - subgraph cluster_30 { - color=blue - 134 [label="Enter ||"]; - 135 [label="Access variable R|/a|"]; - 136 [label="Const: Null(null)"]; - 137 [label="Equality operator =="]; - 138 [label="Exit left part of ||"]; - 139 [label="Enter right part of ||"]; - 140 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; - 141 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 142 [label="Stub" style="filled" fillcolor=gray]; - 143 [label="Exit ||"]; - } - 144 [label="Exit when branch condition"]; - } - 145 [label="Synthetic else branch"]; - 146 [label="Enter when branch result"]; - subgraph cluster_31 { - color=blue - 147 [label="Enter block"]; - 148 [label="Access variable R|/a|"]; - 149 [label="Smart cast: R|/a|"]; - 150 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; - 151 [label="Exit block"]; - } - 152 [label="Exit when branch result"]; - 153 [label="Exit when"]; - } - 154 [label="Access variable R|/a|"]; - 155 [label="Smart cast: R|/a|"]; - 156 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; - 157 [label="Exit block"]; - } - 158 [label="Exit function test_7" style="filled" fillcolor=red]; - } + 129 -> {130}; 130 -> {131}; - 131 -> {132}; + + subgraph cluster_27 { + color=red + 132 [label="Enter function test_7" style="filled" fillcolor=red]; + subgraph cluster_28 { + color=blue + 133 [label="Enter block"]; + subgraph cluster_29 { + color=blue + 134 [label="Enter when"]; + subgraph cluster_30 { + color=blue + 135 [label="Enter when branch condition "]; + subgraph cluster_31 { + color=blue + 136 [label="Enter ||"]; + 137 [label="Access variable R|/a|"]; + 138 [label="Const: Null(null)"]; + 139 [label="Equality operator =="]; + 140 [label="Exit left part of ||"]; + 141 [label="Enter right part of ||"]; + 142 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; + 143 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 144 [label="Stub" style="filled" fillcolor=gray]; + 145 [label="Exit ||"]; + } + 146 [label="Exit when branch condition"]; + } + 147 [label="Synthetic else branch"]; + 148 [label="Enter when branch result"]; + subgraph cluster_32 { + color=blue + 149 [label="Enter block"]; + 150 [label="Access variable R|/a|"]; + 151 [label="Smart cast: R|/a|"]; + 152 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + 153 [label="Exit block"]; + } + 154 [label="Exit when branch result"]; + 155 [label="Exit when"]; + } + 156 [label="Access variable R|/a|"]; + 157 [label="Smart cast: R|/a|"]; + 158 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + 159 [label="Exit block"]; + } + 160 [label="Exit function test_7" style="filled" fillcolor=red]; + } 132 -> {133}; 133 -> {134}; 134 -> {135}; 135 -> {136}; 136 -> {137}; 137 -> {138}; - 138 -> {139 143}; + 138 -> {139}; 139 -> {140}; - 140 -> {141}; - 141 -> {142} [style=dotted]; - 142 -> {143} [style=dotted]; - 143 -> {144}; - 144 -> {145 146}; - 145 -> {153}; - 146 -> {147}; - 147 -> {148}; + 140 -> {141 145}; + 141 -> {142}; + 142 -> {143}; + 143 -> {144} [style=dotted]; + 144 -> {145} [style=dotted]; + 145 -> {146}; + 146 -> {147 148}; + 147 -> {155}; 148 -> {149}; 149 -> {150}; 150 -> {151}; @@ -416,72 +421,72 @@ digraph jumpFromRhsOfOperator_kt { 155 -> {156}; 156 -> {157}; 157 -> {158}; - - subgraph cluster_32 { - color=red - 159 [label="Enter function test_8" style="filled" fillcolor=red]; - subgraph cluster_33 { - color=blue - 160 [label="Enter block"]; - subgraph cluster_34 { - color=blue - 161 [label="Enter when"]; - subgraph cluster_35 { - color=blue - 162 [label="Enter when branch condition "]; - subgraph cluster_36 { - color=blue - 163 [label="Enter &&"]; - 164 [label="Access variable R|/a|"]; - 165 [label="Const: Null(null)"]; - 166 [label="Equality operator !="]; - 167 [label="Exit left part of &&"]; - 168 [label="Enter right part of &&"]; - 169 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; - 170 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 171 [label="Stub" style="filled" fillcolor=gray]; - 172 [label="Exit &&"]; - } - 173 [label="Exit when branch condition"]; - } - 174 [label="Synthetic else branch"]; - 175 [label="Enter when branch result"]; - subgraph cluster_37 { - color=blue - 176 [label="Enter block"]; - 177 [label="Access variable R|/a|"]; - 178 [label="Smart cast: R|/a|"]; - 179 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; - 180 [label="Exit block"]; - } - 181 [label="Exit when branch result"]; - 182 [label="Exit when"]; - } - 183 [label="Access variable R|/a|"]; - 184 [label="Smart cast: R|/a|"]; - 185 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; - 186 [label="Exit block"]; - } - 187 [label="Exit function test_8" style="filled" fillcolor=red]; - } + 158 -> {159}; 159 -> {160}; - 160 -> {161}; + + subgraph cluster_33 { + color=red + 161 [label="Enter function test_8" style="filled" fillcolor=red]; + subgraph cluster_34 { + color=blue + 162 [label="Enter block"]; + subgraph cluster_35 { + color=blue + 163 [label="Enter when"]; + subgraph cluster_36 { + color=blue + 164 [label="Enter when branch condition "]; + subgraph cluster_37 { + color=blue + 165 [label="Enter &&"]; + 166 [label="Access variable R|/a|"]; + 167 [label="Const: Null(null)"]; + 168 [label="Equality operator !="]; + 169 [label="Exit left part of &&"]; + 170 [label="Enter right part of &&"]; + 171 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; + 172 [label="Throw: throw R|java/lang/Exception.Exception|()"]; + 173 [label="Stub" style="filled" fillcolor=gray]; + 174 [label="Exit &&"]; + } + 175 [label="Exit when branch condition"]; + } + 176 [label="Synthetic else branch"]; + 177 [label="Enter when branch result"]; + subgraph cluster_38 { + color=blue + 178 [label="Enter block"]; + 179 [label="Access variable R|/a|"]; + 180 [label="Smart cast: R|/a|"]; + 181 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + 182 [label="Exit block"]; + } + 183 [label="Exit when branch result"]; + 184 [label="Exit when"]; + } + 185 [label="Access variable R|/a|"]; + 186 [label="Smart cast: R|/a|"]; + 187 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + 188 [label="Exit block"]; + } + 189 [label="Exit function test_8" style="filled" fillcolor=red]; + } 161 -> {162}; 162 -> {163}; 163 -> {164}; 164 -> {165}; 165 -> {166}; 166 -> {167}; - 167 -> {168 172}; + 167 -> {168}; 168 -> {169}; - 169 -> {170}; - 170 -> {171} [style=dotted]; - 171 -> {172} [style=dotted]; - 172 -> {173}; - 173 -> {174 175}; - 174 -> {182}; - 175 -> {176}; - 176 -> {177}; + 169 -> {170 174}; + 170 -> {171}; + 171 -> {172}; + 172 -> {173} [style=dotted]; + 173 -> {174} [style=dotted]; + 174 -> {175}; + 175 -> {176 177}; + 176 -> {184}; 177 -> {178}; 178 -> {179}; 179 -> {180}; @@ -492,5 +497,7 @@ digraph jumpFromRhsOfOperator_kt { 184 -> {185}; 185 -> {186}; 186 -> {187}; + 187 -> {188}; + 188 -> {189}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/boundSmartcasts.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/boundSmartcasts.dot index 5ce43db334c..9029e96f683 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/boundSmartcasts.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/boundSmartcasts.dot @@ -5,82 +5,87 @@ digraph boundSmartcasts_kt { subgraph cluster_0 { color=red - 0 [label="Enter class A" style="filled" fillcolor=red]; - 1 [label="Exit class A" style="filled" fillcolor=red]; + 0 [label="Enter file boundSmartcasts.kt" style="filled" fillcolor=red]; + 1 [label="Exit file boundSmartcasts.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; subgraph cluster_1 { color=red - 2 [label="Enter function foo" style="filled" fillcolor=red]; - 3 [label="Exit function foo" style="filled" fillcolor=red]; + 2 [label="Enter class A" style="filled" fillcolor=red]; + 3 [label="Exit class A" style="filled" fillcolor=red]; } - 2 -> {3}; + 2 -> {3} [color=green]; subgraph cluster_2 { color=red - 4 [label="Enter class B" style="filled" fillcolor=red]; - 5 [label="Exit class B" style="filled" fillcolor=red]; + 4 [label="Enter function foo" style="filled" fillcolor=red]; + 5 [label="Exit function foo" style="filled" fillcolor=red]; } - 4 -> {5} [color=green]; + 4 -> {5}; subgraph cluster_3 { color=red - 6 [label="Enter function bar" style="filled" fillcolor=red]; - 7 [label="Exit function bar" style="filled" fillcolor=red]; + 6 [label="Enter class B" style="filled" fillcolor=red]; + 7 [label="Exit class B" style="filled" fillcolor=red]; } - 6 -> {7}; + 6 -> {7} [color=green]; subgraph cluster_4 { color=red - 8 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_5 { - color=blue - 9 [label="Enter block"]; - 10 [label="Access variable R|/x|"]; - 11 [label="Variable declaration: lval y: R|kotlin/Any|"]; - subgraph cluster_6 { - color=blue - 12 [label="Enter when"]; - subgraph cluster_7 { - color=blue - 13 [label="Enter when branch condition "]; - 14 [label="Access variable R|/x|"]; - 15 [label="Type operator: (R|/x| is R|A|)"]; - 16 [label="Exit when branch condition"]; - } - 17 [label="Synthetic else branch"]; - 18 [label="Enter when branch result"]; - subgraph cluster_8 { - color=blue - 19 [label="Enter block"]; - 20 [label="Access variable R|/x|"]; - 21 [label="Smart cast: R|/x|"]; - 22 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 23 [label="Access variable R|/y|"]; - 24 [label="Smart cast: R|/y|"]; - 25 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 26 [label="Exit block"]; - } - 27 [label="Exit when branch result"]; - 28 [label="Exit when"]; - } - 29 [label="Exit block"]; - } - 30 [label="Exit function test_1" style="filled" fillcolor=red]; + 8 [label="Enter function bar" style="filled" fillcolor=red]; + 9 [label="Exit function bar" style="filled" fillcolor=red]; } 8 -> {9}; - 9 -> {10}; + + subgraph cluster_5 { + color=red + 10 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_6 { + color=blue + 11 [label="Enter block"]; + 12 [label="Access variable R|/x|"]; + 13 [label="Variable declaration: lval y: R|kotlin/Any|"]; + subgraph cluster_7 { + color=blue + 14 [label="Enter when"]; + subgraph cluster_8 { + color=blue + 15 [label="Enter when branch condition "]; + 16 [label="Access variable R|/x|"]; + 17 [label="Type operator: (R|/x| is R|A|)"]; + 18 [label="Exit when branch condition"]; + } + 19 [label="Synthetic else branch"]; + 20 [label="Enter when branch result"]; + subgraph cluster_9 { + color=blue + 21 [label="Enter block"]; + 22 [label="Access variable R|/x|"]; + 23 [label="Smart cast: R|/x|"]; + 24 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 25 [label="Access variable R|/y|"]; + 26 [label="Smart cast: R|/y|"]; + 27 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 28 [label="Exit block"]; + } + 29 [label="Exit when branch result"]; + 30 [label="Exit when"]; + } + 31 [label="Exit block"]; + } + 32 [label="Exit function test_1" style="filled" fillcolor=red]; + } 10 -> {11}; 11 -> {12}; 12 -> {13}; 13 -> {14}; 14 -> {15}; 15 -> {16}; - 16 -> {17 18}; - 17 -> {28}; - 18 -> {19}; - 19 -> {20}; + 16 -> {17}; + 17 -> {18}; + 18 -> {19 20}; + 19 -> {30}; 20 -> {21}; 21 -> {22}; 22 -> {23}; @@ -91,57 +96,57 @@ digraph boundSmartcasts_kt { 27 -> {28}; 28 -> {29}; 29 -> {30}; + 30 -> {31}; + 31 -> {32}; - subgraph cluster_9 { + subgraph cluster_10 { color=red - 31 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_10 { + 33 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_11 { color=blue - 32 [label="Enter block"]; - 33 [label="Access variable R|/x|"]; - 34 [label="Variable declaration: lval y: R|kotlin/Any|"]; - subgraph cluster_11 { + 34 [label="Enter block"]; + 35 [label="Access variable R|/x|"]; + 36 [label="Variable declaration: lval y: R|kotlin/Any|"]; + subgraph cluster_12 { color=blue - 35 [label="Enter when"]; - subgraph cluster_12 { - color=blue - 36 [label="Enter when branch condition "]; - 37 [label="Access variable R|/y|"]; - 38 [label="Type operator: (R|/y| is R|A|)"]; - 39 [label="Exit when branch condition"]; - } - 40 [label="Synthetic else branch"]; - 41 [label="Enter when branch result"]; + 37 [label="Enter when"]; subgraph cluster_13 { color=blue - 42 [label="Enter block"]; - 43 [label="Access variable R|/x|"]; - 44 [label="Smart cast: R|/x|"]; - 45 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 46 [label="Access variable R|/y|"]; - 47 [label="Smart cast: R|/y|"]; - 48 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 49 [label="Exit block"]; + 38 [label="Enter when branch condition "]; + 39 [label="Access variable R|/y|"]; + 40 [label="Type operator: (R|/y| is R|A|)"]; + 41 [label="Exit when branch condition"]; } - 50 [label="Exit when branch result"]; - 51 [label="Exit when"]; + 42 [label="Synthetic else branch"]; + 43 [label="Enter when branch result"]; + subgraph cluster_14 { + color=blue + 44 [label="Enter block"]; + 45 [label="Access variable R|/x|"]; + 46 [label="Smart cast: R|/x|"]; + 47 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 48 [label="Access variable R|/y|"]; + 49 [label="Smart cast: R|/y|"]; + 50 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 51 [label="Exit block"]; + } + 52 [label="Exit when branch result"]; + 53 [label="Exit when"]; } - 52 [label="Exit block"]; + 54 [label="Exit block"]; } - 53 [label="Exit function test_2" style="filled" fillcolor=red]; + 55 [label="Exit function test_2" style="filled" fillcolor=red]; } - 31 -> {32}; - 32 -> {33}; 33 -> {34}; 34 -> {35}; 35 -> {36}; 36 -> {37}; 37 -> {38}; 38 -> {39}; - 39 -> {40 41}; - 40 -> {51}; - 41 -> {42}; - 42 -> {43}; + 39 -> {40}; + 40 -> {41}; + 41 -> {42 43}; + 42 -> {53}; 43 -> {44}; 44 -> {45}; 45 -> {46}; @@ -152,82 +157,82 @@ digraph boundSmartcasts_kt { 50 -> {51}; 51 -> {52}; 52 -> {53}; + 53 -> {54}; + 54 -> {55}; - subgraph cluster_14 { + subgraph cluster_15 { color=red - 54 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_15 { + 56 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_16 { color=blue - 55 [label="Enter block"]; - 56 [label="Access variable R|/x|"]; - 57 [label="Variable declaration: lvar z: R|kotlin/Any|"]; - subgraph cluster_16 { + 57 [label="Enter block"]; + 58 [label="Access variable R|/x|"]; + 59 [label="Variable declaration: lvar z: R|kotlin/Any|"]; + subgraph cluster_17 { color=blue - 58 [label="Enter when"]; - subgraph cluster_17 { - color=blue - 59 [label="Enter when branch condition "]; - 60 [label="Access variable R|/x|"]; - 61 [label="Type operator: (R|/x| is R|A|)"]; - 62 [label="Exit when branch condition"]; - } - 63 [label="Synthetic else branch"]; - 64 [label="Enter when branch result"]; + 60 [label="Enter when"]; subgraph cluster_18 { color=blue - 65 [label="Enter block"]; - 66 [label="Access variable R|/z|"]; - 67 [label="Smart cast: R|/z|"]; - 68 [label="Function call: R|/z|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 69 [label="Exit block"]; + 61 [label="Enter when branch condition "]; + 62 [label="Access variable R|/x|"]; + 63 [label="Type operator: (R|/x| is R|A|)"]; + 64 [label="Exit when branch condition"]; } - 70 [label="Exit when branch result"]; - 71 [label="Exit when"]; - } - 72 [label="Access variable R|/y|"]; - 73 [label="Assignment: R|/z|"]; - subgraph cluster_19 { - color=blue - 74 [label="Enter when"]; - subgraph cluster_20 { + 65 [label="Synthetic else branch"]; + 66 [label="Enter when branch result"]; + subgraph cluster_19 { color=blue - 75 [label="Enter when branch condition "]; - 76 [label="Access variable R|/y|"]; - 77 [label="Type operator: (R|/y| is R|B|)"]; - 78 [label="Exit when branch condition"]; + 67 [label="Enter block"]; + 68 [label="Access variable R|/z|"]; + 69 [label="Smart cast: R|/z|"]; + 70 [label="Function call: R|/z|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 71 [label="Exit block"]; } - 79 [label="Synthetic else branch"]; - 80 [label="Enter when branch result"]; + 72 [label="Exit when branch result"]; + 73 [label="Exit when"]; + } + 74 [label="Access variable R|/y|"]; + 75 [label="Assignment: R|/z|"]; + subgraph cluster_20 { + color=blue + 76 [label="Enter when"]; subgraph cluster_21 { color=blue - 81 [label="Enter block"]; - 82 [label="Access variable R|/z|"]; - 83 [label="Smart cast: R|/z|"]; - 84 [label="Function call: R|/z|.#()" style="filled" fillcolor=yellow]; - 85 [label="Access variable R|/z|"]; - 86 [label="Smart cast: R|/z|"]; - 87 [label="Function call: R|/z|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 88 [label="Exit block"]; + 77 [label="Enter when branch condition "]; + 78 [label="Access variable R|/y|"]; + 79 [label="Type operator: (R|/y| is R|B|)"]; + 80 [label="Exit when branch condition"]; } - 89 [label="Exit when branch result"]; - 90 [label="Exit when"]; + 81 [label="Synthetic else branch"]; + 82 [label="Enter when branch result"]; + subgraph cluster_22 { + color=blue + 83 [label="Enter block"]; + 84 [label="Access variable R|/z|"]; + 85 [label="Smart cast: R|/z|"]; + 86 [label="Function call: R|/z|.#()" style="filled" fillcolor=yellow]; + 87 [label="Access variable R|/z|"]; + 88 [label="Smart cast: R|/z|"]; + 89 [label="Function call: R|/z|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 90 [label="Exit block"]; + } + 91 [label="Exit when branch result"]; + 92 [label="Exit when"]; } - 91 [label="Exit block"]; + 93 [label="Exit block"]; } - 92 [label="Exit function test_3" style="filled" fillcolor=red]; + 94 [label="Exit function test_3" style="filled" fillcolor=red]; } - 54 -> {55}; - 55 -> {56}; 56 -> {57}; 57 -> {58}; 58 -> {59}; 59 -> {60}; 60 -> {61}; 61 -> {62}; - 62 -> {63 64}; - 63 -> {71}; - 64 -> {65}; - 65 -> {66}; + 62 -> {63}; + 63 -> {64}; + 64 -> {65 66}; + 65 -> {73}; 66 -> {67}; 67 -> {68}; 68 -> {69}; @@ -240,10 +245,10 @@ digraph boundSmartcasts_kt { 75 -> {76}; 76 -> {77}; 77 -> {78}; - 78 -> {79 80}; - 79 -> {90}; - 80 -> {81}; - 81 -> {82}; + 78 -> {79}; + 79 -> {80}; + 80 -> {81 82}; + 81 -> {92}; 82 -> {83}; 83 -> {84}; 84 -> {85}; @@ -254,56 +259,56 @@ digraph boundSmartcasts_kt { 89 -> {90}; 90 -> {91}; 91 -> {92}; + 92 -> {93}; + 93 -> {94}; - subgraph cluster_22 { + subgraph cluster_23 { color=red - 93 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_23 { + 95 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_24 { color=blue - 94 [label="Enter block"]; - 95 [label="Const: Int(1)"]; - 96 [label="Variable declaration: lvar x: R|kotlin/Any|"]; - 97 [label="Access variable R|/x|"]; - 98 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 96 [label="Enter block"]; + 97 [label="Const: Int(1)"]; + 98 [label="Variable declaration: lvar x: R|kotlin/Any|"]; 99 [label="Access variable R|/x|"]; - 100 [label="Smart cast: R|/x|"]; - 101 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 102 [label="Access variable R|/y|"]; - 103 [label="Assignment: R|/x|"]; - 104 [label="Access variable R|/x|"]; - 105 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - subgraph cluster_24 { + 100 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; + 101 [label="Access variable R|/x|"]; + 102 [label="Smart cast: R|/x|"]; + 103 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 104 [label="Access variable R|/y|"]; + 105 [label="Assignment: R|/x|"]; + 106 [label="Access variable R|/x|"]; + 107 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_25 { color=blue - 106 [label="Enter when"]; - subgraph cluster_25 { - color=blue - 107 [label="Enter when branch condition "]; - 108 [label="Access variable R|/y|"]; - 109 [label="Type operator: (R|/y| is R|A|)"]; - 110 [label="Exit when branch condition"]; - } - 111 [label="Synthetic else branch"]; - 112 [label="Enter when branch result"]; + 108 [label="Enter when"]; subgraph cluster_26 { color=blue - 113 [label="Enter block"]; - 114 [label="Access variable R|/x|"]; - 115 [label="Smart cast: R|/x|"]; - 116 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 117 [label="Access variable R|/y|"]; - 118 [label="Smart cast: R|/y|"]; - 119 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 120 [label="Exit block"]; + 109 [label="Enter when branch condition "]; + 110 [label="Access variable R|/y|"]; + 111 [label="Type operator: (R|/y| is R|A|)"]; + 112 [label="Exit when branch condition"]; } - 121 [label="Exit when branch result"]; - 122 [label="Exit when"]; + 113 [label="Synthetic else branch"]; + 114 [label="Enter when branch result"]; + subgraph cluster_27 { + color=blue + 115 [label="Enter block"]; + 116 [label="Access variable R|/x|"]; + 117 [label="Smart cast: R|/x|"]; + 118 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 119 [label="Access variable R|/y|"]; + 120 [label="Smart cast: R|/y|"]; + 121 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 122 [label="Exit block"]; + } + 123 [label="Exit when branch result"]; + 124 [label="Exit when"]; } - 123 [label="Exit block"]; + 125 [label="Exit block"]; } - 124 [label="Exit function test_4" style="filled" fillcolor=red]; + 126 [label="Exit function test_4" style="filled" fillcolor=red]; } - 93 -> {94}; - 94 -> {95}; 95 -> {96}; 96 -> {97}; 97 -> {98}; @@ -319,10 +324,10 @@ digraph boundSmartcasts_kt { 107 -> {108}; 108 -> {109}; 109 -> {110}; - 110 -> {111 112}; - 111 -> {122}; - 112 -> {113}; - 113 -> {114}; + 110 -> {111}; + 111 -> {112}; + 112 -> {113 114}; + 113 -> {124}; 114 -> {115}; 115 -> {116}; 116 -> {117}; @@ -333,89 +338,89 @@ digraph boundSmartcasts_kt { 121 -> {122}; 122 -> {123}; 123 -> {124}; + 124 -> {125}; + 125 -> {126}; - subgraph cluster_27 { + subgraph cluster_28 { color=red - 125 [label="Enter class D" style="filled" fillcolor=red]; - subgraph cluster_28 { - color=blue - 126 [label="Enter property" style="filled" fillcolor=red]; - 127 [label="Access variable R|/any|"]; - 128 [label="Exit property" style="filled" fillcolor=red]; - } + 127 [label="Enter class D" style="filled" fillcolor=red]; subgraph cluster_29 { color=blue - 129 [label="Enter function " style="filled" fillcolor=red]; - 130 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 131 [label="Exit function " style="filled" fillcolor=red]; + 128 [label="Enter property" style="filled" fillcolor=red]; + 129 [label="Access variable R|/any|"]; + 130 [label="Exit property" style="filled" fillcolor=red]; } - 132 [label="Exit class D" style="filled" fillcolor=red]; + subgraph cluster_30 { + color=blue + 131 [label="Enter function " style="filled" fillcolor=red]; + 132 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 133 [label="Exit function " style="filled" fillcolor=red]; + } + 134 [label="Exit class D" style="filled" fillcolor=red]; } - 125 -> {126} [color=green]; - 125 -> {132} [style=dotted]; - 125 -> {126 129} [style=dashed]; - 126 -> {127}; - 127 -> {128}; - 128 -> {129} [color=green]; + 127 -> {128} [color=green]; + 127 -> {134} [style=dotted]; + 127 -> {128 131} [style=dashed]; + 128 -> {129}; 129 -> {130}; - 130 -> {131}; - 131 -> {132} [color=green]; + 130 -> {131} [color=green]; + 131 -> {132}; + 132 -> {133}; + 133 -> {134} [color=green]; - subgraph cluster_30 { + subgraph cluster_31 { color=red - 133 [label="Enter function baz" style="filled" fillcolor=red]; - subgraph cluster_31 { + 135 [label="Enter function baz" style="filled" fillcolor=red]; + subgraph cluster_32 { color=blue - 134 [label="Enter block"]; - 135 [label="Exit block"]; + 136 [label="Enter block"]; + 137 [label="Exit block"]; } - 136 [label="Exit function baz" style="filled" fillcolor=red]; + 138 [label="Exit function baz" style="filled" fillcolor=red]; } - 133 -> {134}; - 134 -> {135}; 135 -> {136}; - - subgraph cluster_32 { - color=red - 137 [label="Enter function test_5" style="filled" fillcolor=red]; - subgraph cluster_33 { - color=blue - 138 [label="Enter block"]; - 139 [label="Access variable R|/d|"]; - 140 [label="Access variable R|/D.any|"]; - 141 [label="Exit lhs of ?:"]; - 142 [label="Enter rhs of ?:"]; - 143 [label="Jump: ^test_5 Unit"]; - 144 [label="Stub" style="filled" fillcolor=gray]; - 145 [label="Lhs of ?: is not null"]; - 146 [label="Exit ?:"]; - 147 [label="Variable declaration: lval a: R|kotlin/Any|"]; - 148 [label="Access variable R|/a|"]; - 149 [label="Function call: R|/a|.R|/baz|()" style="filled" fillcolor=yellow]; - 150 [label="Access variable R|/d|"]; - 151 [label="Access variable R|/D.any|"]; - 152 [label="Smart cast: R|/d|.R|/D.any|"]; - 153 [label="Function call: R|/d|.R|/D.any|.R|/baz|()" style="filled" fillcolor=yellow]; - 154 [label="Access variable R|/a|"]; - 155 [label="Type operator: (R|/a| as R|A|)"]; - 156 [label="Access variable R|/a|"]; - 157 [label="Smart cast: R|/a|"]; - 158 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 159 [label="Exit block"]; - } - 160 [label="Exit function test_5" style="filled" fillcolor=red]; - } + 136 -> {137}; 137 -> {138}; - 138 -> {139}; + + subgraph cluster_33 { + color=red + 139 [label="Enter function test_5" style="filled" fillcolor=red]; + subgraph cluster_34 { + color=blue + 140 [label="Enter block"]; + 141 [label="Access variable R|/d|"]; + 142 [label="Access variable R|/D.any|"]; + 143 [label="Exit lhs of ?:"]; + 144 [label="Enter rhs of ?:"]; + 145 [label="Jump: ^test_5 Unit"]; + 146 [label="Stub" style="filled" fillcolor=gray]; + 147 [label="Lhs of ?: is not null"]; + 148 [label="Exit ?:"]; + 149 [label="Variable declaration: lval a: R|kotlin/Any|"]; + 150 [label="Access variable R|/a|"]; + 151 [label="Function call: R|/a|.R|/baz|()" style="filled" fillcolor=yellow]; + 152 [label="Access variable R|/d|"]; + 153 [label="Access variable R|/D.any|"]; + 154 [label="Smart cast: R|/d|.R|/D.any|"]; + 155 [label="Function call: R|/d|.R|/D.any|.R|/baz|()" style="filled" fillcolor=yellow]; + 156 [label="Access variable R|/a|"]; + 157 [label="Type operator: (R|/a| as R|A|)"]; + 158 [label="Access variable R|/a|"]; + 159 [label="Smart cast: R|/a|"]; + 160 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 161 [label="Exit block"]; + } + 162 [label="Exit function test_5" style="filled" fillcolor=red]; + } 139 -> {140}; 140 -> {141}; - 141 -> {142 145}; + 141 -> {142}; 142 -> {143}; - 143 -> {160}; - 143 -> {144} [style=dotted]; - 144 -> {146} [style=dotted]; - 145 -> {146}; - 146 -> {147}; + 143 -> {144 147}; + 144 -> {145}; + 145 -> {162}; + 145 -> {146} [style=dotted]; + 146 -> {148} [style=dotted]; 147 -> {148}; 148 -> {149}; 149 -> {150}; @@ -429,35 +434,35 @@ digraph boundSmartcasts_kt { 157 -> {158}; 158 -> {159}; 159 -> {160}; - - subgraph cluster_34 { - color=red - 161 [label="Enter function test_6" style="filled" fillcolor=red]; - subgraph cluster_35 { - color=blue - 162 [label="Enter block"]; - 163 [label="Access variable R|/d1|"]; - 164 [label="Access variable R|/D.any|"]; - 165 [label="Variable declaration: lval a: R|kotlin/Any?|"]; - 166 [label="Access variable R|/a|"]; - 167 [label="Type operator: (R|/a| as R|A|)"]; - 168 [label="Access variable R|/a|"]; - 169 [label="Smart cast: R|/a|"]; - 170 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 171 [label="Access variable R|/d1|"]; - 172 [label="Access variable R|/D.any|"]; - 173 [label="Smart cast: R|/d1|.R|/D.any|"]; - 174 [label="Function call: R|/d1|.R|/D.any|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 175 [label="Access variable R|/d1|"]; - 176 [label="Access variable R|/D.any|"]; - 177 [label="Smart cast: R|/d1|.R|/D.any|"]; - 178 [label="Function call: R|/d1|.R|/D.any|.R|/baz|()" style="filled" fillcolor=yellow]; - 179 [label="Exit block"]; - } - 180 [label="Exit function test_6" style="filled" fillcolor=red]; - } + 160 -> {161}; 161 -> {162}; - 162 -> {163}; + + subgraph cluster_35 { + color=red + 163 [label="Enter function test_6" style="filled" fillcolor=red]; + subgraph cluster_36 { + color=blue + 164 [label="Enter block"]; + 165 [label="Access variable R|/d1|"]; + 166 [label="Access variable R|/D.any|"]; + 167 [label="Variable declaration: lval a: R|kotlin/Any?|"]; + 168 [label="Access variable R|/a|"]; + 169 [label="Type operator: (R|/a| as R|A|)"]; + 170 [label="Access variable R|/a|"]; + 171 [label="Smart cast: R|/a|"]; + 172 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 173 [label="Access variable R|/d1|"]; + 174 [label="Access variable R|/D.any|"]; + 175 [label="Smart cast: R|/d1|.R|/D.any|"]; + 176 [label="Function call: R|/d1|.R|/D.any|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 177 [label="Access variable R|/d1|"]; + 178 [label="Access variable R|/D.any|"]; + 179 [label="Smart cast: R|/d1|.R|/D.any|"]; + 180 [label="Function call: R|/d1|.R|/D.any|.R|/baz|()" style="filled" fillcolor=yellow]; + 181 [label="Exit block"]; + } + 182 [label="Exit function test_6" style="filled" fillcolor=red]; + } 163 -> {164}; 164 -> {165}; 165 -> {166}; @@ -475,47 +480,47 @@ digraph boundSmartcasts_kt { 177 -> {178}; 178 -> {179}; 179 -> {180}; - - subgraph cluster_36 { - color=red - 181 [label="Enter function test_7" style="filled" fillcolor=red]; - subgraph cluster_37 { - color=blue - 182 [label="Enter block"]; - 183 [label="Access variable R|/d1|"]; - 184 [label="Enter safe call"]; - 185 [label="Access variable R|/D.any|"]; - 186 [label="Exit safe call"]; - 187 [label="Variable declaration: lval a: R|kotlin/Any?|"]; - 188 [label="Access variable R|/d2|"]; - 189 [label="Enter safe call"]; - 190 [label="Access variable R|/D.any|"]; - 191 [label="Exit safe call"]; - 192 [label="Variable declaration: lval b: R|kotlin/Any?|"]; - 193 [label="Access variable R|/a|"]; - 194 [label="Type operator: (R|/a| as R|A|)"]; - 195 [label="Access variable R|/a|"]; - 196 [label="Smart cast: R|/a|"]; - 197 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 198 [label="Access variable R|/b|"]; - 199 [label="Type operator: (R|/b| as R|B|)"]; - 200 [label="Access variable R|/b|"]; - 201 [label="Smart cast: R|/b|"]; - 202 [label="Function call: R|/b|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 203 [label="Exit block"]; - } - 204 [label="Exit function test_7" style="filled" fillcolor=red]; - } + 180 -> {181}; 181 -> {182}; - 182 -> {183}; - 183 -> {184 186}; + + subgraph cluster_37 { + color=red + 183 [label="Enter function test_7" style="filled" fillcolor=red]; + subgraph cluster_38 { + color=blue + 184 [label="Enter block"]; + 185 [label="Access variable R|/d1|"]; + 186 [label="Enter safe call"]; + 187 [label="Access variable R|/D.any|"]; + 188 [label="Exit safe call"]; + 189 [label="Variable declaration: lval a: R|kotlin/Any?|"]; + 190 [label="Access variable R|/d2|"]; + 191 [label="Enter safe call"]; + 192 [label="Access variable R|/D.any|"]; + 193 [label="Exit safe call"]; + 194 [label="Variable declaration: lval b: R|kotlin/Any?|"]; + 195 [label="Access variable R|/a|"]; + 196 [label="Type operator: (R|/a| as R|A|)"]; + 197 [label="Access variable R|/a|"]; + 198 [label="Smart cast: R|/a|"]; + 199 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 200 [label="Access variable R|/b|"]; + 201 [label="Type operator: (R|/b| as R|B|)"]; + 202 [label="Access variable R|/b|"]; + 203 [label="Smart cast: R|/b|"]; + 204 [label="Function call: R|/b|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 205 [label="Exit block"]; + } + 206 [label="Exit function test_7" style="filled" fillcolor=red]; + } + 183 -> {184}; 184 -> {185}; - 185 -> {186}; + 185 -> {186 188}; 186 -> {187}; 187 -> {188}; - 188 -> {189 191}; + 188 -> {189}; 189 -> {190}; - 190 -> {191}; + 190 -> {191 193}; 191 -> {192}; 192 -> {193}; 193 -> {194}; @@ -529,5 +534,7 @@ digraph boundSmartcasts_kt { 201 -> {202}; 202 -> {203}; 203 -> {204}; + 204 -> {205}; + 205 -> {206}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/boundSmartcastsInBranches.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/boundSmartcastsInBranches.dot index 0980b14a9ea..55c87751a10 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/boundSmartcastsInBranches.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/boundSmartcastsInBranches.dot @@ -5,111 +5,116 @@ digraph boundSmartcastsInBranches_kt { subgraph cluster_0 { color=red - 0 [label="Enter class A" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter property" style="filled" fillcolor=red]; - 2 [label="Const: String()"]; - 3 [label="Exit property" style="filled" fillcolor=red]; - } - subgraph cluster_2 { - color=blue - 4 [label="Enter function " style="filled" fillcolor=red]; - 5 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 6 [label="Exit function " style="filled" fillcolor=red]; - } - 7 [label="Exit class A" style="filled" fillcolor=red]; + 0 [label="Enter file boundSmartcastsInBranches.kt" style="filled" fillcolor=red]; + 1 [label="Exit file boundSmartcastsInBranches.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; - 0 -> {7} [style=dotted]; - 0 -> {1 4} [style=dashed]; - 1 -> {2}; - 2 -> {3}; - 3 -> {4} [color=green]; - 4 -> {5}; - 5 -> {6}; - 6 -> {7} [color=green]; - subgraph cluster_3 { + subgraph cluster_1 { color=red - 8 [label="Enter function test_0" style="filled" fillcolor=red]; - subgraph cluster_4 { + 2 [label="Enter class A" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 9 [label="Enter block"]; - 10 [label="Const: Null(null)"]; - 11 [label="Variable declaration: lvar goodA: R|A?|"]; - subgraph cluster_5 { + 3 [label="Enter property" style="filled" fillcolor=red]; + 4 [label="Const: String()"]; + 5 [label="Exit property" style="filled" fillcolor=red]; + } + subgraph cluster_3 { + color=blue + 6 [label="Enter function " style="filled" fillcolor=red]; + 7 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 8 [label="Exit function " style="filled" fillcolor=red]; + } + 9 [label="Exit class A" style="filled" fillcolor=red]; + } + 2 -> {3} [color=green]; + 2 -> {9} [style=dotted]; + 2 -> {3 6} [style=dashed]; + 3 -> {4}; + 4 -> {5}; + 5 -> {6} [color=green]; + 6 -> {7}; + 7 -> {8}; + 8 -> {9} [color=green]; + + subgraph cluster_4 { + color=red + 10 [label="Enter function test_0" style="filled" fillcolor=red]; + subgraph cluster_5 { + color=blue + 11 [label="Enter block"]; + 12 [label="Const: Null(null)"]; + 13 [label="Variable declaration: lvar goodA: R|A?|"]; + subgraph cluster_6 { color=blue - 12 [label="Enter block"]; - 13 [label="Access variable R|/list|"]; - 14 [label="Function call: R|/list|.R|SubstitutionOverride|>|()" style="filled" fillcolor=yellow]; - 15 [label="Variable declaration: lval : R|kotlin/collections/Iterator|"]; - subgraph cluster_6 { + 14 [label="Enter block"]; + 15 [label="Access variable R|/list|"]; + 16 [label="Function call: R|/list|.R|SubstitutionOverride|>|()" style="filled" fillcolor=yellow]; + 17 [label="Variable declaration: lval : R|kotlin/collections/Iterator|"]; + subgraph cluster_7 { color=blue - 16 [label="Enter while loop"]; - subgraph cluster_7 { - color=blue - 17 [label="Enter loop condition"]; - 18 [label="Access variable R|/|"]; - 19 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 20 [label="Exit loop condition"]; - } + 18 [label="Enter while loop"]; subgraph cluster_8 { color=blue - 21 [label="Enter loop block"]; - subgraph cluster_9 { + 19 [label="Enter loop condition"]; + 20 [label="Access variable R|/|"]; + 21 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 22 [label="Exit loop condition"]; + } + subgraph cluster_9 { + color=blue + 23 [label="Enter loop block"]; + subgraph cluster_10 { color=blue - 22 [label="Enter block"]; - 23 [label="Access variable R|/|"]; - 24 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 25 [label="Variable declaration: lval a: R|A|"]; - subgraph cluster_10 { + 24 [label="Enter block"]; + 25 [label="Access variable R|/|"]; + 26 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 27 [label="Variable declaration: lval a: R|A|"]; + subgraph cluster_11 { color=blue - 26 [label="Enter block"]; - subgraph cluster_11 { + 28 [label="Enter block"]; + subgraph cluster_12 { color=blue - 27 [label="Enter when"]; - subgraph cluster_12 { - color=blue - 28 [label="Enter when branch condition "]; - 29 [label="Access variable R|/goodA|"]; - 30 [label="Const: Null(null)"]; - 31 [label="Equality operator =="]; - 32 [label="Exit when branch condition"]; - } - 33 [label="Synthetic else branch"]; - 34 [label="Enter when branch result"]; + 29 [label="Enter when"]; subgraph cluster_13 { color=blue - 35 [label="Enter block"]; - 36 [label="Access variable R|/a|"]; - 37 [label="Assignment: R|/goodA|"]; - 38 [label="Jump: continue@@@[R|/|.R|SubstitutionOverride|()] "]; - 39 [label="Stub" style="filled" fillcolor=gray]; - 40 [label="Exit block" style="filled" fillcolor=gray]; + 30 [label="Enter when branch condition "]; + 31 [label="Access variable R|/goodA|"]; + 32 [label="Const: Null(null)"]; + 33 [label="Equality operator =="]; + 34 [label="Exit when branch condition"]; } - 41 [label="Exit when branch result" style="filled" fillcolor=gray]; - 42 [label="Exit when"]; + 35 [label="Synthetic else branch"]; + 36 [label="Enter when branch result"]; + subgraph cluster_14 { + color=blue + 37 [label="Enter block"]; + 38 [label="Access variable R|/a|"]; + 39 [label="Assignment: R|/goodA|"]; + 40 [label="Jump: continue@@@[R|/|.R|SubstitutionOverride|()] "]; + 41 [label="Stub" style="filled" fillcolor=gray]; + 42 [label="Exit block" style="filled" fillcolor=gray]; + } + 43 [label="Exit when branch result" style="filled" fillcolor=gray]; + 44 [label="Exit when"]; } - 43 [label="Access variable R|/goodA|"]; - 44 [label="Smart cast: R|/goodA|"]; - 45 [label="Access variable R|/A.s|"]; - 46 [label="Exit block"]; + 45 [label="Access variable R|/goodA|"]; + 46 [label="Smart cast: R|/goodA|"]; + 47 [label="Access variable R|/A.s|"]; + 48 [label="Exit block"]; } - 47 [label="Exit block"]; + 49 [label="Exit block"]; } - 48 [label="Exit loop block"]; + 50 [label="Exit loop block"]; } - 49 [label="Exit while loop"]; + 51 [label="Exit while loop"]; } - 50 [label="Exit block"]; + 52 [label="Exit block"]; } - 51 [label="Exit block"]; + 53 [label="Exit block"]; } - 52 [label="Exit function test_0" style="filled" fillcolor=red]; + 54 [label="Exit function test_0" style="filled" fillcolor=red]; } - 8 -> {9}; - 9 -> {10}; 10 -> {11}; 11 -> {12}; 12 -> {13}; @@ -120,9 +125,9 @@ digraph boundSmartcastsInBranches_kt { 17 -> {18}; 18 -> {19}; 19 -> {20}; - 20 -> {21 49}; + 20 -> {21}; 21 -> {22}; - 22 -> {23}; + 22 -> {23 51}; 23 -> {24}; 24 -> {25}; 25 -> {26}; @@ -132,93 +137,93 @@ digraph boundSmartcastsInBranches_kt { 29 -> {30}; 30 -> {31}; 31 -> {32}; - 32 -> {33 34}; - 33 -> {42}; - 34 -> {35}; - 35 -> {36}; + 32 -> {33}; + 33 -> {34}; + 34 -> {35 36}; + 35 -> {44}; 36 -> {37}; 37 -> {38}; - 38 -> {17} [color=green style=dashed]; - 38 -> {39} [style=dotted]; - 39 -> {40} [style=dotted]; + 38 -> {39}; + 39 -> {40}; + 40 -> {19} [color=green style=dashed]; 40 -> {41} [style=dotted]; 41 -> {42} [style=dotted]; - 42 -> {43}; - 43 -> {44}; + 42 -> {43} [style=dotted]; + 43 -> {44} [style=dotted]; 44 -> {45}; 45 -> {46}; 46 -> {47}; 47 -> {48}; - 48 -> {17} [color=green style=dashed]; + 48 -> {49}; 49 -> {50}; - 50 -> {51}; + 50 -> {19} [color=green style=dashed]; 51 -> {52}; + 52 -> {53}; + 53 -> {54}; - subgraph cluster_14 { + subgraph cluster_15 { color=red - 53 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_15 { + 55 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_16 { color=blue - 54 [label="Enter block"]; - 55 [label="Variable declaration: lval x: R|kotlin/Any|"]; - subgraph cluster_16 { + 56 [label="Enter block"]; + 57 [label="Variable declaration: lval x: R|kotlin/Any|"]; + subgraph cluster_17 { color=blue - 56 [label="Enter when"]; - subgraph cluster_17 { - color=blue - 57 [label="Enter when branch condition "]; - 58 [label="Access variable R|/b|"]; - 59 [label="Exit when branch condition"]; - } + 58 [label="Enter when"]; subgraph cluster_18 { color=blue - 60 [label="Enter when branch condition else"]; + 59 [label="Enter when branch condition "]; + 60 [label="Access variable R|/b|"]; 61 [label="Exit when branch condition"]; } - 62 [label="Enter when branch result"]; subgraph cluster_19 { color=blue - 63 [label="Enter block"]; - 64 [label="Access variable R|/a|"]; - 65 [label="Assignment: R|/x|"]; - 66 [label="Exit block"]; + 62 [label="Enter when branch condition else"]; + 63 [label="Exit when branch condition"]; } - 67 [label="Exit when branch result"]; - 68 [label="Enter when branch result"]; + 64 [label="Enter when branch result"]; subgraph cluster_20 { color=blue - 69 [label="Enter block"]; - 70 [label="Function call: R|/A.A|()" style="filled" fillcolor=yellow]; - 71 [label="Assignment: R|/x|"]; - 72 [label="Exit block"]; + 65 [label="Enter block"]; + 66 [label="Access variable R|/a|"]; + 67 [label="Assignment: R|/x|"]; + 68 [label="Exit block"]; } - 73 [label="Exit when branch result"]; - 74 [label="Exit when"]; + 69 [label="Exit when branch result"]; + 70 [label="Enter when branch result"]; + subgraph cluster_21 { + color=blue + 71 [label="Enter block"]; + 72 [label="Function call: R|/A.A|()" style="filled" fillcolor=yellow]; + 73 [label="Assignment: R|/x|"]; + 74 [label="Exit block"]; + } + 75 [label="Exit when branch result"]; + 76 [label="Exit when"]; } - 75 [label="Access variable R|/x|"]; - 76 [label="Smart cast: R|/x|"]; - 77 [label="Access variable R|/A.s|"]; - 78 [label="Exit block"]; + 77 [label="Access variable R|/x|"]; + 78 [label="Smart cast: R|/x|"]; + 79 [label="Access variable R|/A.s|"]; + 80 [label="Exit block"]; } - 79 [label="Exit function test_1" style="filled" fillcolor=red]; + 81 [label="Exit function test_1" style="filled" fillcolor=red]; } - 53 -> {54}; - 54 -> {55}; 55 -> {56}; 56 -> {57}; 57 -> {58}; 58 -> {59}; - 59 -> {60 68}; + 59 -> {60}; 60 -> {61}; - 61 -> {62}; + 61 -> {62 70}; 62 -> {63}; 63 -> {64}; 64 -> {65}; 65 -> {66}; 66 -> {67}; - 67 -> {74}; + 67 -> {68}; 68 -> {69}; - 69 -> {70}; + 69 -> {76}; 70 -> {71}; 71 -> {72}; 72 -> {73}; @@ -228,66 +233,66 @@ digraph boundSmartcastsInBranches_kt { 76 -> {77}; 77 -> {78}; 78 -> {79}; + 79 -> {80}; + 80 -> {81}; - subgraph cluster_21 { + subgraph cluster_22 { color=red - 80 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_22 { + 82 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_23 { color=blue - 81 [label="Enter block"]; - 82 [label="Variable declaration: lval x: R|kotlin/Any|"]; - subgraph cluster_23 { + 83 [label="Enter block"]; + 84 [label="Variable declaration: lval x: R|kotlin/Any|"]; + subgraph cluster_24 { color=blue - 83 [label="Enter when"]; - subgraph cluster_24 { - color=blue - 84 [label="Enter when branch condition "]; - 85 [label="Access variable R|/b|"]; - 86 [label="Exit when branch condition"]; - } + 85 [label="Enter when"]; subgraph cluster_25 { color=blue - 87 [label="Enter when branch condition else"]; + 86 [label="Enter when branch condition "]; + 87 [label="Access variable R|/b|"]; 88 [label="Exit when branch condition"]; } - 89 [label="Enter when branch result"]; subgraph cluster_26 { color=blue - 90 [label="Enter block"]; - 91 [label="Access variable R|/a|"]; - 92 [label="Assignment: R|/x|"]; - 93 [label="Access variable R|/a|"]; - 94 [label="Type operator: (R|/a| as R|A|)"]; - 95 [label="Exit block"]; + 89 [label="Enter when branch condition else"]; + 90 [label="Exit when branch condition"]; } - 96 [label="Exit when branch result"]; - 97 [label="Enter when branch result"]; + 91 [label="Enter when branch result"]; subgraph cluster_27 { color=blue - 98 [label="Enter block"]; - 99 [label="Function call: R|/A.A|()" style="filled" fillcolor=yellow]; - 100 [label="Assignment: R|/x|"]; - 101 [label="Exit block"]; + 92 [label="Enter block"]; + 93 [label="Access variable R|/a|"]; + 94 [label="Assignment: R|/x|"]; + 95 [label="Access variable R|/a|"]; + 96 [label="Type operator: (R|/a| as R|A|)"]; + 97 [label="Exit block"]; } - 102 [label="Exit when branch result"]; - 103 [label="Exit when"]; + 98 [label="Exit when branch result"]; + 99 [label="Enter when branch result"]; + subgraph cluster_28 { + color=blue + 100 [label="Enter block"]; + 101 [label="Function call: R|/A.A|()" style="filled" fillcolor=yellow]; + 102 [label="Assignment: R|/x|"]; + 103 [label="Exit block"]; + } + 104 [label="Exit when branch result"]; + 105 [label="Exit when"]; } - 104 [label="Access variable R|/x|"]; - 105 [label="Smart cast: R|/x|"]; - 106 [label="Access variable R|/A.s|"]; - 107 [label="Exit block"]; + 106 [label="Access variable R|/x|"]; + 107 [label="Smart cast: R|/x|"]; + 108 [label="Access variable R|/A.s|"]; + 109 [label="Exit block"]; } - 108 [label="Exit function test_2" style="filled" fillcolor=red]; + 110 [label="Exit function test_2" style="filled" fillcolor=red]; } - 80 -> {81}; - 81 -> {82}; 82 -> {83}; 83 -> {84}; 84 -> {85}; 85 -> {86}; - 86 -> {87 97}; + 86 -> {87}; 87 -> {88}; - 88 -> {89}; + 88 -> {89 99}; 89 -> {90}; 90 -> {91}; 91 -> {92}; @@ -295,9 +300,9 @@ digraph boundSmartcastsInBranches_kt { 93 -> {94}; 94 -> {95}; 95 -> {96}; - 96 -> {103}; + 96 -> {97}; 97 -> {98}; - 98 -> {99}; + 98 -> {105}; 99 -> {100}; 100 -> {101}; 101 -> {102}; @@ -307,67 +312,67 @@ digraph boundSmartcastsInBranches_kt { 105 -> {106}; 106 -> {107}; 107 -> {108}; + 108 -> {109}; + 109 -> {110}; - subgraph cluster_28 { + subgraph cluster_29 { color=red - 109 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_29 { + 111 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_30 { color=blue - 110 [label="Enter block"]; - 111 [label="Variable declaration: lval x: R|kotlin/Any|"]; - subgraph cluster_30 { + 112 [label="Enter block"]; + 113 [label="Variable declaration: lval x: R|kotlin/Any|"]; + subgraph cluster_31 { color=blue - 112 [label="Enter when"]; - subgraph cluster_31 { - color=blue - 113 [label="Enter when branch condition "]; - 114 [label="Access variable R|/b|"]; - 115 [label="Exit when branch condition"]; - } + 114 [label="Enter when"]; subgraph cluster_32 { color=blue - 116 [label="Enter when branch condition else"]; + 115 [label="Enter when branch condition "]; + 116 [label="Access variable R|/b|"]; 117 [label="Exit when branch condition"]; } - 118 [label="Enter when branch result"]; subgraph cluster_33 { color=blue - 119 [label="Enter block"]; - 120 [label="Access variable R|/a|"]; - 121 [label="Type operator: (R|/a| as R|A|)"]; - 122 [label="Access variable R|/a|"]; - 123 [label="Smart cast: R|/a|"]; - 124 [label="Assignment: R|/x|"]; - 125 [label="Exit block"]; + 118 [label="Enter when branch condition else"]; + 119 [label="Exit when branch condition"]; } - 126 [label="Exit when branch result"]; - 127 [label="Enter when branch result"]; + 120 [label="Enter when branch result"]; subgraph cluster_34 { color=blue - 128 [label="Enter block"]; - 129 [label="Function call: R|/A.A|()" style="filled" fillcolor=yellow]; - 130 [label="Assignment: R|/x|"]; - 131 [label="Exit block"]; + 121 [label="Enter block"]; + 122 [label="Access variable R|/a|"]; + 123 [label="Type operator: (R|/a| as R|A|)"]; + 124 [label="Access variable R|/a|"]; + 125 [label="Smart cast: R|/a|"]; + 126 [label="Assignment: R|/x|"]; + 127 [label="Exit block"]; } - 132 [label="Exit when branch result"]; - 133 [label="Exit when"]; + 128 [label="Exit when branch result"]; + 129 [label="Enter when branch result"]; + subgraph cluster_35 { + color=blue + 130 [label="Enter block"]; + 131 [label="Function call: R|/A.A|()" style="filled" fillcolor=yellow]; + 132 [label="Assignment: R|/x|"]; + 133 [label="Exit block"]; + } + 134 [label="Exit when branch result"]; + 135 [label="Exit when"]; } - 134 [label="Access variable R|/x|"]; - 135 [label="Smart cast: R|/x|"]; - 136 [label="Access variable R|/A.s|"]; - 137 [label="Exit block"]; + 136 [label="Access variable R|/x|"]; + 137 [label="Smart cast: R|/x|"]; + 138 [label="Access variable R|/A.s|"]; + 139 [label="Exit block"]; } - 138 [label="Exit function test_3" style="filled" fillcolor=red]; + 140 [label="Exit function test_3" style="filled" fillcolor=red]; } - 109 -> {110}; - 110 -> {111}; 111 -> {112}; 112 -> {113}; 113 -> {114}; 114 -> {115}; - 115 -> {116 127}; + 115 -> {116}; 116 -> {117}; - 117 -> {118}; + 117 -> {118 129}; 118 -> {119}; 119 -> {120}; 120 -> {121}; @@ -376,9 +381,9 @@ digraph boundSmartcastsInBranches_kt { 123 -> {124}; 124 -> {125}; 125 -> {126}; - 126 -> {133}; + 126 -> {127}; 127 -> {128}; - 128 -> {129}; + 128 -> {135}; 129 -> {130}; 130 -> {131}; 131 -> {132}; @@ -388,77 +393,77 @@ digraph boundSmartcastsInBranches_kt { 135 -> {136}; 136 -> {137}; 137 -> {138}; + 138 -> {139}; + 139 -> {140}; - subgraph cluster_35 { + subgraph cluster_36 { color=red - 139 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_36 { + 141 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_37 { color=blue - 140 [label="Enter block"]; - 141 [label="Variable declaration: lval x: R|kotlin/Any|"]; - subgraph cluster_37 { + 142 [label="Enter block"]; + 143 [label="Variable declaration: lval x: R|kotlin/Any|"]; + subgraph cluster_38 { color=blue - 142 [label="Enter when"]; - subgraph cluster_38 { - color=blue - 143 [label="Enter when branch condition "]; - 144 [label="Access variable R|/b|"]; - 145 [label="Exit when branch condition"]; - } + 144 [label="Enter when"]; subgraph cluster_39 { color=blue - 146 [label="Enter when branch condition else"]; + 145 [label="Enter when branch condition "]; + 146 [label="Access variable R|/b|"]; 147 [label="Exit when branch condition"]; } - 148 [label="Enter when branch result"]; subgraph cluster_40 { color=blue - 149 [label="Enter block"]; - 150 [label="Access variable R|/a|"]; - 151 [label="Assignment: R|/x|"]; - 152 [label="Exit block"]; + 148 [label="Enter when branch condition else"]; + 149 [label="Exit when branch condition"]; } - 153 [label="Exit when branch result"]; - 154 [label="Enter when branch result"]; + 150 [label="Enter when branch result"]; subgraph cluster_41 { color=blue - 155 [label="Enter block"]; - 156 [label="Access variable R|/a|"]; - 157 [label="Assignment: R|/x|"]; - 158 [label="Exit block"]; + 151 [label="Enter block"]; + 152 [label="Access variable R|/a|"]; + 153 [label="Assignment: R|/x|"]; + 154 [label="Exit block"]; } - 159 [label="Exit when branch result"]; - 160 [label="Exit when"]; + 155 [label="Exit when branch result"]; + 156 [label="Enter when branch result"]; + subgraph cluster_42 { + color=blue + 157 [label="Enter block"]; + 158 [label="Access variable R|/a|"]; + 159 [label="Assignment: R|/x|"]; + 160 [label="Exit block"]; + } + 161 [label="Exit when branch result"]; + 162 [label="Exit when"]; } - 161 [label="Access variable R|/x|"]; - 162 [label="Type operator: (R|/x| as R|A|)"]; 163 [label="Access variable R|/x|"]; - 164 [label="Smart cast: R|/x|"]; - 165 [label="Access variable R|/A.s|"]; - 166 [label="Access variable R|/a|"]; - 167 [label="Smart cast: R|/a|"]; - 168 [label="Access variable R|/A.s|"]; - 169 [label="Exit block"]; + 164 [label="Type operator: (R|/x| as R|A|)"]; + 165 [label="Access variable R|/x|"]; + 166 [label="Smart cast: R|/x|"]; + 167 [label="Access variable R|/A.s|"]; + 168 [label="Access variable R|/a|"]; + 169 [label="Smart cast: R|/a|"]; + 170 [label="Access variable R|/A.s|"]; + 171 [label="Exit block"]; } - 170 [label="Exit function test_4" style="filled" fillcolor=red]; + 172 [label="Exit function test_4" style="filled" fillcolor=red]; } - 139 -> {140}; - 140 -> {141}; 141 -> {142}; 142 -> {143}; 143 -> {144}; 144 -> {145}; - 145 -> {146 154}; + 145 -> {146}; 146 -> {147}; - 147 -> {148}; + 147 -> {148 156}; 148 -> {149}; 149 -> {150}; 150 -> {151}; 151 -> {152}; 152 -> {153}; - 153 -> {160}; + 153 -> {154}; 154 -> {155}; - 155 -> {156}; + 155 -> {162}; 156 -> {157}; 157 -> {158}; 158 -> {159}; @@ -473,77 +478,77 @@ digraph boundSmartcastsInBranches_kt { 167 -> {168}; 168 -> {169}; 169 -> {170}; + 170 -> {171}; + 171 -> {172}; - subgraph cluster_42 { + subgraph cluster_43 { color=red - 171 [label="Enter function test_5" style="filled" fillcolor=red]; - subgraph cluster_43 { + 173 [label="Enter function test_5" style="filled" fillcolor=red]; + subgraph cluster_44 { color=blue - 172 [label="Enter block"]; - 173 [label="Variable declaration: lval x: R|kotlin/Any|"]; - subgraph cluster_44 { + 174 [label="Enter block"]; + 175 [label="Variable declaration: lval x: R|kotlin/Any|"]; + subgraph cluster_45 { color=blue - 174 [label="Enter when"]; - subgraph cluster_45 { - color=blue - 175 [label="Enter when branch condition "]; - 176 [label="Access variable R|/b|"]; - 177 [label="Exit when branch condition"]; - } + 176 [label="Enter when"]; subgraph cluster_46 { color=blue - 178 [label="Enter when branch condition else"]; + 177 [label="Enter when branch condition "]; + 178 [label="Access variable R|/b|"]; 179 [label="Exit when branch condition"]; } - 180 [label="Enter when branch result"]; subgraph cluster_47 { color=blue - 181 [label="Enter block"]; - 182 [label="Access variable R|/a|"]; - 183 [label="Assignment: R|/x|"]; - 184 [label="Exit block"]; + 180 [label="Enter when branch condition else"]; + 181 [label="Exit when branch condition"]; } - 185 [label="Exit when branch result"]; - 186 [label="Enter when branch result"]; + 182 [label="Enter when branch result"]; subgraph cluster_48 { color=blue - 187 [label="Enter block"]; - 188 [label="Access variable R|/a|"]; - 189 [label="Assignment: R|/x|"]; - 190 [label="Exit block"]; + 183 [label="Enter block"]; + 184 [label="Access variable R|/a|"]; + 185 [label="Assignment: R|/x|"]; + 186 [label="Exit block"]; } - 191 [label="Exit when branch result"]; - 192 [label="Exit when"]; + 187 [label="Exit when branch result"]; + 188 [label="Enter when branch result"]; + subgraph cluster_49 { + color=blue + 189 [label="Enter block"]; + 190 [label="Access variable R|/a|"]; + 191 [label="Assignment: R|/x|"]; + 192 [label="Exit block"]; + } + 193 [label="Exit when branch result"]; + 194 [label="Exit when"]; } - 193 [label="Access variable R|/a|"]; - 194 [label="Type operator: (R|/a| as R|A|)"]; - 195 [label="Access variable R|/x|"]; - 196 [label="Smart cast: R|/x|"]; - 197 [label="Access variable R|/A.s|"]; - 198 [label="Access variable R|/a|"]; - 199 [label="Smart cast: R|/a|"]; - 200 [label="Access variable R|/A.s|"]; - 201 [label="Exit block"]; + 195 [label="Access variable R|/a|"]; + 196 [label="Type operator: (R|/a| as R|A|)"]; + 197 [label="Access variable R|/x|"]; + 198 [label="Smart cast: R|/x|"]; + 199 [label="Access variable R|/A.s|"]; + 200 [label="Access variable R|/a|"]; + 201 [label="Smart cast: R|/a|"]; + 202 [label="Access variable R|/A.s|"]; + 203 [label="Exit block"]; } - 202 [label="Exit function test_5" style="filled" fillcolor=red]; + 204 [label="Exit function test_5" style="filled" fillcolor=red]; } - 171 -> {172}; - 172 -> {173}; 173 -> {174}; 174 -> {175}; 175 -> {176}; 176 -> {177}; - 177 -> {178 186}; + 177 -> {178}; 178 -> {179}; - 179 -> {180}; + 179 -> {180 188}; 180 -> {181}; 181 -> {182}; 182 -> {183}; 183 -> {184}; 184 -> {185}; - 185 -> {192}; + 185 -> {186}; 186 -> {187}; - 187 -> {188}; + 187 -> {194}; 188 -> {189}; 189 -> {190}; 190 -> {191}; @@ -558,25 +563,25 @@ digraph boundSmartcastsInBranches_kt { 199 -> {200}; 200 -> {201}; 201 -> {202}; - - subgraph cluster_49 { - color=red - 203 [label="Enter function test_6" style="filled" fillcolor=red]; - subgraph cluster_50 { - color=blue - 204 [label="Enter block"]; - 205 [label="Variable declaration: lval x: R|kotlin/Any|"]; - 206 [label="Access variable R|/a|"]; - 207 [label="Assignment: R|/x|"]; - 208 [label="Access variable R|/x|"]; - 209 [label="Smart cast: R|/x|"]; - 210 [label="Access variable R|/A.s|"]; - 211 [label="Exit block"]; - } - 212 [label="Exit function test_6" style="filled" fillcolor=red]; - } + 202 -> {203}; 203 -> {204}; - 204 -> {205}; + + subgraph cluster_50 { + color=red + 205 [label="Enter function test_6" style="filled" fillcolor=red]; + subgraph cluster_51 { + color=blue + 206 [label="Enter block"]; + 207 [label="Variable declaration: lval x: R|kotlin/Any|"]; + 208 [label="Access variable R|/a|"]; + 209 [label="Assignment: R|/x|"]; + 210 [label="Access variable R|/x|"]; + 211 [label="Smart cast: R|/x|"]; + 212 [label="Access variable R|/A.s|"]; + 213 [label="Exit block"]; + } + 214 [label="Exit function test_6" style="filled" fillcolor=red]; + } 205 -> {206}; 206 -> {207}; 207 -> {208}; @@ -584,199 +589,199 @@ digraph boundSmartcastsInBranches_kt { 209 -> {210}; 210 -> {211}; 211 -> {212}; + 212 -> {213}; + 213 -> {214}; - subgraph cluster_51 { + subgraph cluster_52 { color=red - 213 [label="Enter function test_7" style="filled" fillcolor=red]; - subgraph cluster_52 { + 215 [label="Enter function test_7" style="filled" fillcolor=red]; + subgraph cluster_53 { color=blue - 214 [label="Enter block"]; - 215 [label="Const: Null(null)"]; - 216 [label="Variable declaration: lval z: R|kotlin/String?|"]; - 217 [label="Access variable R|/z|"]; - 218 [label="Variable declaration: lvar y: R|kotlin/String?|"]; - 219 [label="Access variable R|/y|"]; - 220 [label="Variable declaration: lval x: R|kotlin/String?|"]; - subgraph cluster_53 { + 216 [label="Enter block"]; + 217 [label="Const: Null(null)"]; + 218 [label="Variable declaration: lval z: R|kotlin/String?|"]; + 219 [label="Access variable R|/z|"]; + 220 [label="Variable declaration: lvar y: R|kotlin/String?|"]; + 221 [label="Access variable R|/y|"]; + 222 [label="Variable declaration: lval x: R|kotlin/String?|"]; + subgraph cluster_54 { color=blue - 221 [label="Enter when"]; - subgraph cluster_54 { - color=blue - 222 [label="Enter when branch condition "]; - 223 [label="Access variable R|/x|"]; - 224 [label="Const: Null(null)"]; - 225 [label="Equality operator !="]; - 226 [label="Exit when branch condition"]; - } - 227 [label="Synthetic else branch"]; - 228 [label="Enter when branch result"]; + 223 [label="Enter when"]; subgraph cluster_55 { color=blue - 229 [label="Enter block"]; - 230 [label="Access variable R|/x|"]; - 231 [label="Smart cast: R|/x|"]; - 232 [label="Access variable R|kotlin/String.length|"]; - 233 [label="Access variable R|/y|"]; - 234 [label="Access variable R|kotlin/String.length#|"]; - 235 [label="Access variable R|/z|"]; - 236 [label="Access variable R|kotlin/String.length#|"]; - 237 [label="Exit block"]; + 224 [label="Enter when branch condition "]; + 225 [label="Access variable R|/x|"]; + 226 [label="Const: Null(null)"]; + 227 [label="Equality operator !="]; + 228 [label="Exit when branch condition"]; } - 238 [label="Exit when branch result"]; - 239 [label="Exit when"]; - } - subgraph cluster_56 { - color=blue - 240 [label="Enter when"]; - subgraph cluster_57 { + 229 [label="Synthetic else branch"]; + 230 [label="Enter when branch result"]; + subgraph cluster_56 { color=blue - 241 [label="Enter when branch condition "]; - 242 [label="Access variable R|/y|"]; - 243 [label="Const: Null(null)"]; - 244 [label="Equality operator !="]; - 245 [label="Exit when branch condition"]; + 231 [label="Enter block"]; + 232 [label="Access variable R|/x|"]; + 233 [label="Smart cast: R|/x|"]; + 234 [label="Access variable R|kotlin/String.length|"]; + 235 [label="Access variable R|/y|"]; + 236 [label="Access variable R|kotlin/String.length#|"]; + 237 [label="Access variable R|/z|"]; + 238 [label="Access variable R|kotlin/String.length#|"]; + 239 [label="Exit block"]; } - 246 [label="Synthetic else branch"]; - 247 [label="Enter when branch result"]; + 240 [label="Exit when branch result"]; + 241 [label="Exit when"]; + } + subgraph cluster_57 { + color=blue + 242 [label="Enter when"]; subgraph cluster_58 { color=blue - 248 [label="Enter block"]; - 249 [label="Access variable R|/x|"]; - 250 [label="Access variable R|kotlin/String.length#|"]; - 251 [label="Access variable R|/y|"]; - 252 [label="Smart cast: R|/y|"]; - 253 [label="Access variable R|kotlin/String.length|"]; - 254 [label="Access variable R|/z|"]; - 255 [label="Access variable R|kotlin/String.length#|"]; - 256 [label="Exit block"]; + 243 [label="Enter when branch condition "]; + 244 [label="Access variable R|/y|"]; + 245 [label="Const: Null(null)"]; + 246 [label="Equality operator !="]; + 247 [label="Exit when branch condition"]; } - 257 [label="Exit when branch result"]; - 258 [label="Exit when"]; - } - subgraph cluster_59 { - color=blue - 259 [label="Enter when"]; - subgraph cluster_60 { + 248 [label="Synthetic else branch"]; + 249 [label="Enter when branch result"]; + subgraph cluster_59 { color=blue - 260 [label="Enter when branch condition "]; - 261 [label="Access variable R|/z|"]; - 262 [label="Const: Null(null)"]; - 263 [label="Equality operator !="]; - 264 [label="Exit when branch condition"]; + 250 [label="Enter block"]; + 251 [label="Access variable R|/x|"]; + 252 [label="Access variable R|kotlin/String.length#|"]; + 253 [label="Access variable R|/y|"]; + 254 [label="Smart cast: R|/y|"]; + 255 [label="Access variable R|kotlin/String.length|"]; + 256 [label="Access variable R|/z|"]; + 257 [label="Access variable R|kotlin/String.length#|"]; + 258 [label="Exit block"]; } - 265 [label="Synthetic else branch"]; - 266 [label="Enter when branch result"]; + 259 [label="Exit when branch result"]; + 260 [label="Exit when"]; + } + subgraph cluster_60 { + color=blue + 261 [label="Enter when"]; subgraph cluster_61 { color=blue - 267 [label="Enter block"]; - 268 [label="Access variable R|/x|"]; - 269 [label="Access variable R|kotlin/String.length#|"]; - 270 [label="Access variable R|/y|"]; - 271 [label="Access variable R|kotlin/String.length#|"]; - 272 [label="Access variable R|/z|"]; - 273 [label="Smart cast: R|/z|"]; - 274 [label="Access variable R|kotlin/String.length|"]; - 275 [label="Exit block"]; + 262 [label="Enter when branch condition "]; + 263 [label="Access variable R|/z|"]; + 264 [label="Const: Null(null)"]; + 265 [label="Equality operator !="]; + 266 [label="Exit when branch condition"]; } - 276 [label="Exit when branch result"]; - 277 [label="Exit when"]; - } - 278 [label="Const: Null(null)"]; - 279 [label="Assignment: R|/y|"]; - subgraph cluster_62 { - color=blue - 280 [label="Enter when"]; - subgraph cluster_63 { + 267 [label="Synthetic else branch"]; + 268 [label="Enter when branch result"]; + subgraph cluster_62 { color=blue - 281 [label="Enter when branch condition "]; - 282 [label="Access variable R|/x|"]; - 283 [label="Const: Null(null)"]; - 284 [label="Equality operator !="]; - 285 [label="Exit when branch condition"]; + 269 [label="Enter block"]; + 270 [label="Access variable R|/x|"]; + 271 [label="Access variable R|kotlin/String.length#|"]; + 272 [label="Access variable R|/y|"]; + 273 [label="Access variable R|kotlin/String.length#|"]; + 274 [label="Access variable R|/z|"]; + 275 [label="Smart cast: R|/z|"]; + 276 [label="Access variable R|kotlin/String.length|"]; + 277 [label="Exit block"]; } - 286 [label="Synthetic else branch"]; - 287 [label="Enter when branch result"]; + 278 [label="Exit when branch result"]; + 279 [label="Exit when"]; + } + 280 [label="Const: Null(null)"]; + 281 [label="Assignment: R|/y|"]; + subgraph cluster_63 { + color=blue + 282 [label="Enter when"]; subgraph cluster_64 { color=blue - 288 [label="Enter block"]; - 289 [label="Access variable R|/x|"]; - 290 [label="Smart cast: R|/x|"]; - 291 [label="Access variable R|kotlin/String.length|"]; - 292 [label="Access variable R|/y|"]; - 293 [label="Smart cast: R|/y|"]; - 294 [label="Access variable R|kotlin/String.length#|"]; - 295 [label="Access variable R|/z|"]; - 296 [label="Access variable R|kotlin/String.length#|"]; - 297 [label="Exit block"]; + 283 [label="Enter when branch condition "]; + 284 [label="Access variable R|/x|"]; + 285 [label="Const: Null(null)"]; + 286 [label="Equality operator !="]; + 287 [label="Exit when branch condition"]; } - 298 [label="Exit when branch result"]; - 299 [label="Exit when"]; - } - subgraph cluster_65 { - color=blue - 300 [label="Enter when"]; - subgraph cluster_66 { + 288 [label="Synthetic else branch"]; + 289 [label="Enter when branch result"]; + subgraph cluster_65 { color=blue - 301 [label="Enter when branch condition "]; - 302 [label="Access variable R|/y|"]; - 303 [label="Smart cast: R|/y|"]; - 304 [label="Const: Null(null)"]; - 305 [label="Equality operator !="]; - 306 [label="Exit when branch condition"]; + 290 [label="Enter block"]; + 291 [label="Access variable R|/x|"]; + 292 [label="Smart cast: R|/x|"]; + 293 [label="Access variable R|kotlin/String.length|"]; + 294 [label="Access variable R|/y|"]; + 295 [label="Smart cast: R|/y|"]; + 296 [label="Access variable R|kotlin/String.length#|"]; + 297 [label="Access variable R|/z|"]; + 298 [label="Access variable R|kotlin/String.length#|"]; + 299 [label="Exit block"]; } - 307 [label="Synthetic else branch"]; - 308 [label="Enter when branch result"]; + 300 [label="Exit when branch result"]; + 301 [label="Exit when"]; + } + subgraph cluster_66 { + color=blue + 302 [label="Enter when"]; subgraph cluster_67 { color=blue - 309 [label="Enter block"]; - 310 [label="Access variable R|/x|"]; - 311 [label="Access variable R|kotlin/String.length#|"]; - 312 [label="Access variable R|/y|"]; - 313 [label="Smart cast: R|/y|"]; - 314 [label="Stub" style="filled" fillcolor=gray]; - 315 [label="Access variable R|kotlin/String.length|" style="filled" fillcolor=gray]; - 316 [label="Access variable R|/z|" style="filled" fillcolor=gray]; - 317 [label="Access variable R|kotlin/String.length#|" style="filled" fillcolor=gray]; - 318 [label="Exit block" style="filled" fillcolor=gray]; + 303 [label="Enter when branch condition "]; + 304 [label="Access variable R|/y|"]; + 305 [label="Smart cast: R|/y|"]; + 306 [label="Const: Null(null)"]; + 307 [label="Equality operator !="]; + 308 [label="Exit when branch condition"]; } - 319 [label="Exit when branch result" style="filled" fillcolor=gray]; - 320 [label="Exit when"]; - } - subgraph cluster_68 { - color=blue - 321 [label="Enter when"]; - subgraph cluster_69 { + 309 [label="Synthetic else branch"]; + 310 [label="Enter when branch result"]; + subgraph cluster_68 { color=blue - 322 [label="Enter when branch condition "]; - 323 [label="Access variable R|/z|"]; - 324 [label="Const: Null(null)"]; - 325 [label="Equality operator !="]; - 326 [label="Exit when branch condition"]; + 311 [label="Enter block"]; + 312 [label="Access variable R|/x|"]; + 313 [label="Access variable R|kotlin/String.length#|"]; + 314 [label="Access variable R|/y|"]; + 315 [label="Smart cast: R|/y|"]; + 316 [label="Stub" style="filled" fillcolor=gray]; + 317 [label="Access variable R|kotlin/String.length|" style="filled" fillcolor=gray]; + 318 [label="Access variable R|/z|" style="filled" fillcolor=gray]; + 319 [label="Access variable R|kotlin/String.length#|" style="filled" fillcolor=gray]; + 320 [label="Exit block" style="filled" fillcolor=gray]; } - 327 [label="Synthetic else branch"]; - 328 [label="Enter when branch result"]; + 321 [label="Exit when branch result" style="filled" fillcolor=gray]; + 322 [label="Exit when"]; + } + subgraph cluster_69 { + color=blue + 323 [label="Enter when"]; subgraph cluster_70 { color=blue - 329 [label="Enter block"]; - 330 [label="Access variable R|/x|"]; - 331 [label="Access variable R|kotlin/String.length#|"]; - 332 [label="Access variable R|/y|"]; - 333 [label="Smart cast: R|/y|"]; - 334 [label="Access variable R|kotlin/String.length#|"]; - 335 [label="Access variable R|/z|"]; - 336 [label="Smart cast: R|/z|"]; - 337 [label="Access variable R|kotlin/String.length|"]; - 338 [label="Exit block"]; + 324 [label="Enter when branch condition "]; + 325 [label="Access variable R|/z|"]; + 326 [label="Const: Null(null)"]; + 327 [label="Equality operator !="]; + 328 [label="Exit when branch condition"]; } - 339 [label="Exit when branch result"]; - 340 [label="Exit when"]; + 329 [label="Synthetic else branch"]; + 330 [label="Enter when branch result"]; + subgraph cluster_71 { + color=blue + 331 [label="Enter block"]; + 332 [label="Access variable R|/x|"]; + 333 [label="Access variable R|kotlin/String.length#|"]; + 334 [label="Access variable R|/y|"]; + 335 [label="Smart cast: R|/y|"]; + 336 [label="Access variable R|kotlin/String.length#|"]; + 337 [label="Access variable R|/z|"]; + 338 [label="Smart cast: R|/z|"]; + 339 [label="Access variable R|kotlin/String.length|"]; + 340 [label="Exit block"]; + } + 341 [label="Exit when branch result"]; + 342 [label="Exit when"]; } - 341 [label="Exit block"]; + 343 [label="Exit block"]; } - 342 [label="Exit function test_7" style="filled" fillcolor=red]; + 344 [label="Exit function test_7" style="filled" fillcolor=red]; } - 213 -> {214}; - 214 -> {215}; 215 -> {216}; 216 -> {217}; 217 -> {218}; @@ -788,10 +793,10 @@ digraph boundSmartcastsInBranches_kt { 223 -> {224}; 224 -> {225}; 225 -> {226}; - 226 -> {227 228}; - 227 -> {239}; - 228 -> {229}; - 229 -> {230}; + 226 -> {227}; + 227 -> {228}; + 228 -> {229 230}; + 229 -> {241}; 230 -> {231}; 231 -> {232}; 232 -> {233}; @@ -807,10 +812,10 @@ digraph boundSmartcastsInBranches_kt { 242 -> {243}; 243 -> {244}; 244 -> {245}; - 245 -> {246 247}; - 246 -> {258}; - 247 -> {248}; - 248 -> {249}; + 245 -> {246}; + 246 -> {247}; + 247 -> {248 249}; + 248 -> {260}; 249 -> {250}; 250 -> {251}; 251 -> {252}; @@ -826,10 +831,10 @@ digraph boundSmartcastsInBranches_kt { 261 -> {262}; 262 -> {263}; 263 -> {264}; - 264 -> {265 266}; - 265 -> {277}; - 266 -> {267}; - 267 -> {268}; + 264 -> {265}; + 265 -> {266}; + 266 -> {267 268}; + 267 -> {279}; 268 -> {269}; 269 -> {270}; 270 -> {271}; @@ -847,10 +852,10 @@ digraph boundSmartcastsInBranches_kt { 282 -> {283}; 283 -> {284}; 284 -> {285}; - 285 -> {286 287}; - 286 -> {299}; - 287 -> {288}; - 288 -> {289}; + 285 -> {286}; + 286 -> {287}; + 287 -> {288 289}; + 288 -> {301}; 289 -> {290}; 290 -> {291}; 291 -> {292}; @@ -868,30 +873,30 @@ digraph boundSmartcastsInBranches_kt { 303 -> {304}; 304 -> {305}; 305 -> {306}; - 306 -> {307 308}; - 307 -> {320}; - 308 -> {309}; - 309 -> {310}; + 306 -> {307}; + 307 -> {308}; + 308 -> {309 310}; + 309 -> {322}; 310 -> {311}; 311 -> {312}; 312 -> {313}; - 313 -> {314} [style=dotted]; - 314 -> {315} [style=dotted]; + 313 -> {314}; + 314 -> {315}; 315 -> {316} [style=dotted]; 316 -> {317} [style=dotted]; 317 -> {318} [style=dotted]; 318 -> {319} [style=dotted]; 319 -> {320} [style=dotted]; - 320 -> {321}; - 321 -> {322}; + 320 -> {321} [style=dotted]; + 321 -> {322} [style=dotted]; 322 -> {323}; 323 -> {324}; 324 -> {325}; 325 -> {326}; - 326 -> {327 328}; - 327 -> {340}; - 328 -> {329}; - 329 -> {330}; + 326 -> {327}; + 327 -> {328}; + 328 -> {329 330}; + 329 -> {342}; 330 -> {331}; 331 -> {332}; 332 -> {333}; @@ -904,207 +909,207 @@ digraph boundSmartcastsInBranches_kt { 339 -> {340}; 340 -> {341}; 341 -> {342}; + 342 -> {343}; + 343 -> {344}; - subgraph cluster_71 { + subgraph cluster_72 { color=red - 343 [label="Enter function test_8" style="filled" fillcolor=red]; - subgraph cluster_72 { + 345 [label="Enter function test_8" style="filled" fillcolor=red]; + subgraph cluster_73 { color=blue - 344 [label="Enter block"]; - 345 [label="Const: Null(null)"]; - 346 [label="Variable declaration: lval z: R|kotlin/String?|"]; - 347 [label="Access variable R|/z|"]; - 348 [label="Variable declaration: lvar y: R|kotlin/String?|"]; - 349 [label="Access variable R|/y|"]; - 350 [label="Variable declaration: lval x: R|kotlin/String?|"]; - subgraph cluster_73 { + 346 [label="Enter block"]; + 347 [label="Const: Null(null)"]; + 348 [label="Variable declaration: lval z: R|kotlin/String?|"]; + 349 [label="Access variable R|/z|"]; + 350 [label="Variable declaration: lvar y: R|kotlin/String?|"]; + 351 [label="Access variable R|/y|"]; + 352 [label="Variable declaration: lval x: R|kotlin/String?|"]; + subgraph cluster_74 { color=blue - 351 [label="Enter when"]; - subgraph cluster_74 { - color=blue - 352 [label="Enter when branch condition "]; - 353 [label="Access variable R|/x|"]; - 354 [label="Const: Null(null)"]; - 355 [label="Equality operator !="]; - 356 [label="Exit when branch condition"]; - } - 357 [label="Synthetic else branch"]; - 358 [label="Enter when branch result"]; + 353 [label="Enter when"]; subgraph cluster_75 { color=blue - 359 [label="Enter block"]; - 360 [label="Access variable R|/x|"]; - 361 [label="Smart cast: R|/x|"]; - 362 [label="Access variable R|kotlin/String.length|"]; - 363 [label="Access variable R|/y|"]; - 364 [label="Smart cast: R|/y|"]; - 365 [label="Access variable R|kotlin/String.length|"]; - 366 [label="Access variable R|/z|"]; - 367 [label="Smart cast: R|/z|"]; - 368 [label="Access variable R|kotlin/String.length|"]; - 369 [label="Exit block"]; + 354 [label="Enter when branch condition "]; + 355 [label="Access variable R|/x|"]; + 356 [label="Const: Null(null)"]; + 357 [label="Equality operator !="]; + 358 [label="Exit when branch condition"]; } - 370 [label="Exit when branch result"]; - 371 [label="Exit when"]; - } - subgraph cluster_76 { - color=blue - 372 [label="Enter when"]; - subgraph cluster_77 { + 359 [label="Synthetic else branch"]; + 360 [label="Enter when branch result"]; + subgraph cluster_76 { color=blue - 373 [label="Enter when branch condition "]; - 374 [label="Access variable R|/y|"]; - 375 [label="Const: Null(null)"]; - 376 [label="Equality operator !="]; - 377 [label="Exit when branch condition"]; + 361 [label="Enter block"]; + 362 [label="Access variable R|/x|"]; + 363 [label="Smart cast: R|/x|"]; + 364 [label="Access variable R|kotlin/String.length|"]; + 365 [label="Access variable R|/y|"]; + 366 [label="Smart cast: R|/y|"]; + 367 [label="Access variable R|kotlin/String.length|"]; + 368 [label="Access variable R|/z|"]; + 369 [label="Smart cast: R|/z|"]; + 370 [label="Access variable R|kotlin/String.length|"]; + 371 [label="Exit block"]; } - 378 [label="Synthetic else branch"]; - 379 [label="Enter when branch result"]; + 372 [label="Exit when branch result"]; + 373 [label="Exit when"]; + } + subgraph cluster_77 { + color=blue + 374 [label="Enter when"]; subgraph cluster_78 { color=blue - 380 [label="Enter block"]; - 381 [label="Access variable R|/x|"]; - 382 [label="Smart cast: R|/x|"]; - 383 [label="Access variable R|kotlin/String.length|"]; - 384 [label="Access variable R|/y|"]; - 385 [label="Smart cast: R|/y|"]; - 386 [label="Access variable R|kotlin/String.length|"]; - 387 [label="Access variable R|/z|"]; - 388 [label="Smart cast: R|/z|"]; - 389 [label="Access variable R|kotlin/String.length|"]; - 390 [label="Exit block"]; + 375 [label="Enter when branch condition "]; + 376 [label="Access variable R|/y|"]; + 377 [label="Const: Null(null)"]; + 378 [label="Equality operator !="]; + 379 [label="Exit when branch condition"]; } - 391 [label="Exit when branch result"]; - 392 [label="Exit when"]; - } - subgraph cluster_79 { - color=blue - 393 [label="Enter when"]; - subgraph cluster_80 { + 380 [label="Synthetic else branch"]; + 381 [label="Enter when branch result"]; + subgraph cluster_79 { color=blue - 394 [label="Enter when branch condition "]; - 395 [label="Access variable R|/z|"]; - 396 [label="Const: Null(null)"]; - 397 [label="Equality operator !="]; - 398 [label="Exit when branch condition"]; + 382 [label="Enter block"]; + 383 [label="Access variable R|/x|"]; + 384 [label="Smart cast: R|/x|"]; + 385 [label="Access variable R|kotlin/String.length|"]; + 386 [label="Access variable R|/y|"]; + 387 [label="Smart cast: R|/y|"]; + 388 [label="Access variable R|kotlin/String.length|"]; + 389 [label="Access variable R|/z|"]; + 390 [label="Smart cast: R|/z|"]; + 391 [label="Access variable R|kotlin/String.length|"]; + 392 [label="Exit block"]; } - 399 [label="Synthetic else branch"]; - 400 [label="Enter when branch result"]; + 393 [label="Exit when branch result"]; + 394 [label="Exit when"]; + } + subgraph cluster_80 { + color=blue + 395 [label="Enter when"]; subgraph cluster_81 { color=blue - 401 [label="Enter block"]; - 402 [label="Access variable R|/x|"]; - 403 [label="Smart cast: R|/x|"]; - 404 [label="Access variable R|kotlin/String.length|"]; - 405 [label="Access variable R|/y|"]; - 406 [label="Smart cast: R|/y|"]; - 407 [label="Access variable R|kotlin/String.length|"]; - 408 [label="Access variable R|/z|"]; - 409 [label="Smart cast: R|/z|"]; - 410 [label="Access variable R|kotlin/String.length|"]; - 411 [label="Exit block"]; + 396 [label="Enter when branch condition "]; + 397 [label="Access variable R|/z|"]; + 398 [label="Const: Null(null)"]; + 399 [label="Equality operator !="]; + 400 [label="Exit when branch condition"]; } - 412 [label="Exit when branch result"]; - 413 [label="Exit when"]; - } - 414 [label="Const: Null(null)"]; - 415 [label="Assignment: R|/y|"]; - subgraph cluster_82 { - color=blue - 416 [label="Enter when"]; - subgraph cluster_83 { + 401 [label="Synthetic else branch"]; + 402 [label="Enter when branch result"]; + subgraph cluster_82 { color=blue - 417 [label="Enter when branch condition "]; - 418 [label="Access variable R|/x|"]; - 419 [label="Const: Null(null)"]; - 420 [label="Equality operator !="]; - 421 [label="Exit when branch condition"]; + 403 [label="Enter block"]; + 404 [label="Access variable R|/x|"]; + 405 [label="Smart cast: R|/x|"]; + 406 [label="Access variable R|kotlin/String.length|"]; + 407 [label="Access variable R|/y|"]; + 408 [label="Smart cast: R|/y|"]; + 409 [label="Access variable R|kotlin/String.length|"]; + 410 [label="Access variable R|/z|"]; + 411 [label="Smart cast: R|/z|"]; + 412 [label="Access variable R|kotlin/String.length|"]; + 413 [label="Exit block"]; } - 422 [label="Synthetic else branch"]; - 423 [label="Enter when branch result"]; + 414 [label="Exit when branch result"]; + 415 [label="Exit when"]; + } + 416 [label="Const: Null(null)"]; + 417 [label="Assignment: R|/y|"]; + subgraph cluster_83 { + color=blue + 418 [label="Enter when"]; subgraph cluster_84 { color=blue - 424 [label="Enter block"]; - 425 [label="Access variable R|/x|"]; - 426 [label="Smart cast: R|/x|"]; - 427 [label="Access variable R|kotlin/String.length|"]; - 428 [label="Access variable R|/y|"]; - 429 [label="Smart cast: R|/y|"]; - 430 [label="Access variable R|kotlin/String.length#|"]; - 431 [label="Access variable R|/z|"]; - 432 [label="Smart cast: R|/z|"]; - 433 [label="Access variable R|kotlin/String.length|"]; - 434 [label="Exit block"]; + 419 [label="Enter when branch condition "]; + 420 [label="Access variable R|/x|"]; + 421 [label="Const: Null(null)"]; + 422 [label="Equality operator !="]; + 423 [label="Exit when branch condition"]; } - 435 [label="Exit when branch result"]; - 436 [label="Exit when"]; - } - subgraph cluster_85 { - color=blue - 437 [label="Enter when"]; - subgraph cluster_86 { + 424 [label="Synthetic else branch"]; + 425 [label="Enter when branch result"]; + subgraph cluster_85 { color=blue - 438 [label="Enter when branch condition "]; - 439 [label="Access variable R|/y|"]; - 440 [label="Smart cast: R|/y|"]; - 441 [label="Const: Null(null)"]; - 442 [label="Equality operator !="]; - 443 [label="Exit when branch condition"]; + 426 [label="Enter block"]; + 427 [label="Access variable R|/x|"]; + 428 [label="Smart cast: R|/x|"]; + 429 [label="Access variable R|kotlin/String.length|"]; + 430 [label="Access variable R|/y|"]; + 431 [label="Smart cast: R|/y|"]; + 432 [label="Access variable R|kotlin/String.length#|"]; + 433 [label="Access variable R|/z|"]; + 434 [label="Smart cast: R|/z|"]; + 435 [label="Access variable R|kotlin/String.length|"]; + 436 [label="Exit block"]; } - 444 [label="Synthetic else branch"]; - 445 [label="Enter when branch result"]; + 437 [label="Exit when branch result"]; + 438 [label="Exit when"]; + } + subgraph cluster_86 { + color=blue + 439 [label="Enter when"]; subgraph cluster_87 { color=blue - 446 [label="Enter block"]; - 447 [label="Access variable R|/x|"]; - 448 [label="Access variable R|kotlin/String.length#|"]; - 449 [label="Access variable R|/y|"]; - 450 [label="Smart cast: R|/y|"]; - 451 [label="Stub" style="filled" fillcolor=gray]; - 452 [label="Access variable R|kotlin/String.length|" style="filled" fillcolor=gray]; - 453 [label="Access variable R|/z|" style="filled" fillcolor=gray]; - 454 [label="Access variable R|kotlin/String.length#|" style="filled" fillcolor=gray]; - 455 [label="Exit block" style="filled" fillcolor=gray]; + 440 [label="Enter when branch condition "]; + 441 [label="Access variable R|/y|"]; + 442 [label="Smart cast: R|/y|"]; + 443 [label="Const: Null(null)"]; + 444 [label="Equality operator !="]; + 445 [label="Exit when branch condition"]; } - 456 [label="Exit when branch result" style="filled" fillcolor=gray]; - 457 [label="Exit when"]; - } - subgraph cluster_88 { - color=blue - 458 [label="Enter when"]; - subgraph cluster_89 { + 446 [label="Synthetic else branch"]; + 447 [label="Enter when branch result"]; + subgraph cluster_88 { color=blue - 459 [label="Enter when branch condition "]; - 460 [label="Access variable R|/z|"]; - 461 [label="Const: Null(null)"]; - 462 [label="Equality operator !="]; - 463 [label="Exit when branch condition"]; + 448 [label="Enter block"]; + 449 [label="Access variable R|/x|"]; + 450 [label="Access variable R|kotlin/String.length#|"]; + 451 [label="Access variable R|/y|"]; + 452 [label="Smart cast: R|/y|"]; + 453 [label="Stub" style="filled" fillcolor=gray]; + 454 [label="Access variable R|kotlin/String.length|" style="filled" fillcolor=gray]; + 455 [label="Access variable R|/z|" style="filled" fillcolor=gray]; + 456 [label="Access variable R|kotlin/String.length#|" style="filled" fillcolor=gray]; + 457 [label="Exit block" style="filled" fillcolor=gray]; } - 464 [label="Synthetic else branch"]; - 465 [label="Enter when branch result"]; + 458 [label="Exit when branch result" style="filled" fillcolor=gray]; + 459 [label="Exit when"]; + } + subgraph cluster_89 { + color=blue + 460 [label="Enter when"]; subgraph cluster_90 { color=blue - 466 [label="Enter block"]; - 467 [label="Access variable R|/x|"]; - 468 [label="Smart cast: R|/x|"]; - 469 [label="Access variable R|kotlin/String.length|"]; - 470 [label="Access variable R|/y|"]; - 471 [label="Smart cast: R|/y|"]; - 472 [label="Access variable R|kotlin/String.length#|"]; - 473 [label="Access variable R|/z|"]; - 474 [label="Smart cast: R|/z|"]; - 475 [label="Access variable R|kotlin/String.length|"]; - 476 [label="Exit block"]; + 461 [label="Enter when branch condition "]; + 462 [label="Access variable R|/z|"]; + 463 [label="Const: Null(null)"]; + 464 [label="Equality operator !="]; + 465 [label="Exit when branch condition"]; } - 477 [label="Exit when branch result"]; - 478 [label="Exit when"]; + 466 [label="Synthetic else branch"]; + 467 [label="Enter when branch result"]; + subgraph cluster_91 { + color=blue + 468 [label="Enter block"]; + 469 [label="Access variable R|/x|"]; + 470 [label="Smart cast: R|/x|"]; + 471 [label="Access variable R|kotlin/String.length|"]; + 472 [label="Access variable R|/y|"]; + 473 [label="Smart cast: R|/y|"]; + 474 [label="Access variable R|kotlin/String.length#|"]; + 475 [label="Access variable R|/z|"]; + 476 [label="Smart cast: R|/z|"]; + 477 [label="Access variable R|kotlin/String.length|"]; + 478 [label="Exit block"]; + } + 479 [label="Exit when branch result"]; + 480 [label="Exit when"]; } - 479 [label="Exit block"]; + 481 [label="Exit block"]; } - 480 [label="Exit function test_8" style="filled" fillcolor=red]; + 482 [label="Exit function test_8" style="filled" fillcolor=red]; } - 343 -> {344}; - 344 -> {345}; 345 -> {346}; 346 -> {347}; 347 -> {348}; @@ -1116,10 +1121,10 @@ digraph boundSmartcastsInBranches_kt { 353 -> {354}; 354 -> {355}; 355 -> {356}; - 356 -> {357 358}; - 357 -> {371}; - 358 -> {359}; - 359 -> {360}; + 356 -> {357}; + 357 -> {358}; + 358 -> {359 360}; + 359 -> {373}; 360 -> {361}; 361 -> {362}; 362 -> {363}; @@ -1137,10 +1142,10 @@ digraph boundSmartcastsInBranches_kt { 374 -> {375}; 375 -> {376}; 376 -> {377}; - 377 -> {378 379}; - 378 -> {392}; - 379 -> {380}; - 380 -> {381}; + 377 -> {378}; + 378 -> {379}; + 379 -> {380 381}; + 380 -> {394}; 381 -> {382}; 382 -> {383}; 383 -> {384}; @@ -1158,10 +1163,10 @@ digraph boundSmartcastsInBranches_kt { 395 -> {396}; 396 -> {397}; 397 -> {398}; - 398 -> {399 400}; - 399 -> {413}; - 400 -> {401}; - 401 -> {402}; + 398 -> {399}; + 399 -> {400}; + 400 -> {401 402}; + 401 -> {415}; 402 -> {403}; 403 -> {404}; 404 -> {405}; @@ -1181,10 +1186,10 @@ digraph boundSmartcastsInBranches_kt { 418 -> {419}; 419 -> {420}; 420 -> {421}; - 421 -> {422 423}; - 422 -> {436}; - 423 -> {424}; - 424 -> {425}; + 421 -> {422}; + 422 -> {423}; + 423 -> {424 425}; + 424 -> {438}; 425 -> {426}; 426 -> {427}; 427 -> {428}; @@ -1203,30 +1208,30 @@ digraph boundSmartcastsInBranches_kt { 440 -> {441}; 441 -> {442}; 442 -> {443}; - 443 -> {444 445}; - 444 -> {457}; - 445 -> {446}; - 446 -> {447}; + 443 -> {444}; + 444 -> {445}; + 445 -> {446 447}; + 446 -> {459}; 447 -> {448}; 448 -> {449}; 449 -> {450}; - 450 -> {451} [style=dotted]; - 451 -> {452} [style=dotted]; + 450 -> {451}; + 451 -> {452}; 452 -> {453} [style=dotted]; 453 -> {454} [style=dotted]; 454 -> {455} [style=dotted]; 455 -> {456} [style=dotted]; 456 -> {457} [style=dotted]; - 457 -> {458}; - 458 -> {459}; + 457 -> {458} [style=dotted]; + 458 -> {459} [style=dotted]; 459 -> {460}; 460 -> {461}; 461 -> {462}; 462 -> {463}; - 463 -> {464 465}; - 464 -> {478}; - 465 -> {466}; - 466 -> {467}; + 463 -> {464}; + 464 -> {465}; + 465 -> {466 467}; + 466 -> {480}; 467 -> {468}; 468 -> {469}; 469 -> {470}; @@ -1240,86 +1245,86 @@ digraph boundSmartcastsInBranches_kt { 477 -> {478}; 478 -> {479}; 479 -> {480}; + 480 -> {481}; + 481 -> {482}; - subgraph cluster_91 { + subgraph cluster_92 { color=red - 481 [label="Enter function test_9" style="filled" fillcolor=red]; - subgraph cluster_92 { + 483 [label="Enter function test_9" style="filled" fillcolor=red]; + subgraph cluster_93 { color=blue - 482 [label="Enter block"]; - 483 [label="Const: Null(null)"]; - 484 [label="Variable declaration: lvar a: R|kotlin/String?|"]; - 485 [label="Variable declaration: lval b: R|kotlin/String?|"]; - subgraph cluster_93 { + 484 [label="Enter block"]; + 485 [label="Const: Null(null)"]; + 486 [label="Variable declaration: lvar a: R|kotlin/String?|"]; + 487 [label="Variable declaration: lval b: R|kotlin/String?|"]; + subgraph cluster_94 { color=blue - 486 [label="Enter when"]; - subgraph cluster_94 { - color=blue - 487 [label="Enter when branch condition "]; - 488 [label="Access variable R|/a|"]; - 489 [label="Const: Null(null)"]; - 490 [label="Equality operator !="]; - 491 [label="Exit when branch condition"]; - } + 488 [label="Enter when"]; subgraph cluster_95 { color=blue - 492 [label="Enter when branch condition else"]; + 489 [label="Enter when branch condition "]; + 490 [label="Access variable R|/a|"]; + 491 [label="Const: Null(null)"]; + 492 [label="Equality operator !="]; 493 [label="Exit when branch condition"]; } - 494 [label="Enter when branch result"]; subgraph cluster_96 { color=blue - 495 [label="Enter block"]; - 496 [label="Access variable R|/a|"]; - 497 [label="Smart cast: R|/a|"]; - 498 [label="Assignment: R|/b|"]; - 499 [label="Exit block"]; + 494 [label="Enter when branch condition else"]; + 495 [label="Exit when branch condition"]; } - 500 [label="Exit when branch result"]; - 501 [label="Enter when branch result"]; + 496 [label="Enter when branch result"]; subgraph cluster_97 { color=blue - 502 [label="Enter block"]; - 503 [label="Access variable R|/a|"]; - 504 [label="Smart cast: R|/a|"]; - 505 [label="Assignment: R|/b|"]; - 506 [label="Exit block"]; + 497 [label="Enter block"]; + 498 [label="Access variable R|/a|"]; + 499 [label="Smart cast: R|/a|"]; + 500 [label="Assignment: R|/b|"]; + 501 [label="Exit block"]; } - 507 [label="Exit when branch result"]; - 508 [label="Exit when"]; - } - 509 [label="Access variable R|/b|"]; - 510 [label="Access variable R|kotlin/String.length#|"]; - subgraph cluster_98 { - color=blue - 511 [label="Enter when"]; - subgraph cluster_99 { + 502 [label="Exit when branch result"]; + 503 [label="Enter when branch result"]; + subgraph cluster_98 { color=blue - 512 [label="Enter when branch condition "]; - 513 [label="Access variable R|/a|"]; - 514 [label="Const: Null(null)"]; - 515 [label="Equality operator !="]; - 516 [label="Exit when branch condition"]; + 504 [label="Enter block"]; + 505 [label="Access variable R|/a|"]; + 506 [label="Smart cast: R|/a|"]; + 507 [label="Assignment: R|/b|"]; + 508 [label="Exit block"]; } - 517 [label="Synthetic else branch"]; - 518 [label="Enter when branch result"]; + 509 [label="Exit when branch result"]; + 510 [label="Exit when"]; + } + 511 [label="Access variable R|/b|"]; + 512 [label="Access variable R|kotlin/String.length#|"]; + subgraph cluster_99 { + color=blue + 513 [label="Enter when"]; subgraph cluster_100 { color=blue - 519 [label="Enter block"]; - 520 [label="Access variable R|/b|"]; - 521 [label="Smart cast: R|/b|"]; - 522 [label="Access variable R|kotlin/String.length|"]; - 523 [label="Exit block"]; + 514 [label="Enter when branch condition "]; + 515 [label="Access variable R|/a|"]; + 516 [label="Const: Null(null)"]; + 517 [label="Equality operator !="]; + 518 [label="Exit when branch condition"]; } - 524 [label="Exit when branch result"]; - 525 [label="Exit when"]; + 519 [label="Synthetic else branch"]; + 520 [label="Enter when branch result"]; + subgraph cluster_101 { + color=blue + 521 [label="Enter block"]; + 522 [label="Access variable R|/b|"]; + 523 [label="Smart cast: R|/b|"]; + 524 [label="Access variable R|kotlin/String.length|"]; + 525 [label="Exit block"]; + } + 526 [label="Exit when branch result"]; + 527 [label="Exit when"]; } - 526 [label="Exit block"]; + 528 [label="Exit block"]; } - 527 [label="Exit function test_9" style="filled" fillcolor=red]; + 529 [label="Exit function test_9" style="filled" fillcolor=red]; } - 481 -> {482}; - 482 -> {483}; 483 -> {484}; 484 -> {485}; 485 -> {486}; @@ -1328,18 +1333,18 @@ digraph boundSmartcastsInBranches_kt { 488 -> {489}; 489 -> {490}; 490 -> {491}; - 491 -> {492 501}; + 491 -> {492}; 492 -> {493}; - 493 -> {494}; + 493 -> {494 503}; 494 -> {495}; 495 -> {496}; 496 -> {497}; 497 -> {498}; 498 -> {499}; 499 -> {500}; - 500 -> {508}; + 500 -> {501}; 501 -> {502}; - 502 -> {503}; + 502 -> {510}; 503 -> {504}; 504 -> {505}; 505 -> {506}; @@ -1353,10 +1358,10 @@ digraph boundSmartcastsInBranches_kt { 513 -> {514}; 514 -> {515}; 515 -> {516}; - 516 -> {517 518}; - 517 -> {525}; - 518 -> {519}; - 519 -> {520}; + 516 -> {517}; + 517 -> {518}; + 518 -> {519 520}; + 519 -> {527}; 520 -> {521}; 521 -> {522}; 522 -> {523}; @@ -1364,5 +1369,7 @@ digraph boundSmartcastsInBranches_kt { 524 -> {525}; 525 -> {526}; 526 -> {527}; + 527 -> {528}; + 528 -> {529}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/functionCallBound.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/functionCallBound.dot index c62fe43dcac..d5c8ccce7a4 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/functionCallBound.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/functionCallBound.dot @@ -5,117 +5,124 @@ digraph functionCallBound_kt { subgraph cluster_0 { color=red - 0 [label="Enter class Base" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter function " style="filled" fillcolor=red]; - 2 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 3 [label="Exit function " style="filled" fillcolor=red]; - } - 4 [label="Exit class Base" style="filled" fillcolor=red]; + 0 [label="Enter file functionCallBound.kt" style="filled" fillcolor=red]; + 1 [label="Exit file functionCallBound.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; - 0 -> {4} [style=dotted]; - 0 -> {1} [style=dashed]; - 1 -> {2}; - 2 -> {3}; - 3 -> {4} [color=green]; - subgraph cluster_2 { + subgraph cluster_1 { color=red - 5 [label="Enter class Sub" style="filled" fillcolor=red]; - subgraph cluster_3 { + 2 [label="Enter class Base" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 6 [label="Enter property" style="filled" fillcolor=red]; - 7 [label="Access variable R|/data|"]; - 8 [label="Exit property" style="filled" fillcolor=red]; + 3 [label="Enter function " style="filled" fillcolor=red]; + 4 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 5 [label="Exit function " style="filled" fillcolor=red]; } + 6 [label="Exit class Base" style="filled" fillcolor=red]; + } + 2 -> {3} [color=green]; + 2 -> {6} [style=dotted]; + 2 -> {3} [style=dashed]; + 3 -> {4}; + 4 -> {5}; + 5 -> {6} [color=green]; + + subgraph cluster_3 { + color=red + 7 [label="Enter class Sub" style="filled" fillcolor=red]; subgraph cluster_4 { color=blue - 9 [label="Enter function " style="filled" fillcolor=red]; - 10 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 11 [label="Exit function " style="filled" fillcolor=red]; + 8 [label="Enter property" style="filled" fillcolor=red]; + 9 [label="Access variable R|/data|"]; + 10 [label="Exit property" style="filled" fillcolor=red]; } - 12 [label="Exit class Sub" style="filled" fillcolor=red]; + subgraph cluster_5 { + color=blue + 11 [label="Enter function " style="filled" fillcolor=red]; + 12 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 13 [label="Exit function " style="filled" fillcolor=red]; + } + 14 [label="Exit class Sub" style="filled" fillcolor=red]; } - 5 -> {6} [color=green]; - 5 -> {12} [style=dotted]; - 5 -> {6 9} [style=dashed]; - 6 -> {7}; - 7 -> {8}; - 8 -> {9} [color=green]; + 7 -> {8} [color=green]; + 7 -> {14} [style=dotted]; + 7 -> {8 11} [style=dashed]; + 8 -> {9}; 9 -> {10}; - 10 -> {11}; - 11 -> {12} [color=green]; + 10 -> {11} [color=green]; + 11 -> {12}; + 12 -> {13}; + 13 -> {14} [color=green]; - subgraph cluster_5 { + subgraph cluster_6 { color=red - 13 [label="Enter function isOk" style="filled" fillcolor=red]; - subgraph cluster_6 { + 15 [label="Enter function isOk" style="filled" fillcolor=red]; + subgraph cluster_7 { color=blue - 14 [label="Enter block"]; - 15 [label="Const: Boolean(true)"]; - 16 [label="Jump: ^isOk Boolean(true)"]; - 17 [label="Stub" style="filled" fillcolor=gray]; - 18 [label="Exit block" style="filled" fillcolor=gray]; + 16 [label="Enter block"]; + 17 [label="Const: Boolean(true)"]; + 18 [label="Jump: ^isOk Boolean(true)"]; + 19 [label="Stub" style="filled" fillcolor=gray]; + 20 [label="Exit block" style="filled" fillcolor=gray]; } - 19 [label="Exit function isOk" style="filled" fillcolor=red]; + 21 [label="Exit function isOk" style="filled" fillcolor=red]; } - 13 -> {14}; - 14 -> {15}; 15 -> {16}; - 16 -> {19}; - 16 -> {17} [style=dotted]; - 17 -> {18} [style=dotted]; + 16 -> {17}; + 17 -> {18}; + 18 -> {21}; 18 -> {19} [style=dotted]; + 19 -> {20} [style=dotted]; + 20 -> {21} [style=dotted]; - subgraph cluster_7 { + subgraph cluster_8 { color=red - 20 [label="Enter function check" style="filled" fillcolor=red]; - subgraph cluster_8 { + 22 [label="Enter function check" style="filled" fillcolor=red]; + subgraph cluster_9 { color=blue - 21 [label="Enter block"]; - subgraph cluster_9 { + 23 [label="Enter block"]; + subgraph cluster_10 { color=blue - 22 [label="Enter when"]; - subgraph cluster_10 { - color=blue - 23 [label="Enter when branch condition "]; - 24 [label="Access variable R|/base|"]; - 25 [label="Type operator: (R|/base| as? R|Sub|)"]; - 26 [label="Enter safe call"]; - 27 [label="Function call: $subj$.R|/isOk|()" style="filled" fillcolor=yellow]; - 28 [label="Exit safe call"]; - 29 [label="Const: Boolean(true)"]; - 30 [label="Equality operator =="]; - 31 [label="Exit when branch condition"]; - } + 24 [label="Enter when"]; subgraph cluster_11 { color=blue - 32 [label="Enter when branch condition else"]; + 25 [label="Enter when branch condition "]; + 26 [label="Access variable R|/base|"]; + 27 [label="Type operator: (R|/base| as? R|Sub|)"]; + 28 [label="Enter safe call"]; + 29 [label="Function call: $subj$.R|/isOk|()" style="filled" fillcolor=yellow]; + 30 [label="Exit safe call"]; + 31 [label="Const: Boolean(true)"]; + 32 [label="Equality operator =="]; 33 [label="Exit when branch condition"]; } - 34 [label="Enter when branch result"]; subgraph cluster_12 { color=blue - 35 [label="Enter block"]; - 36 [label="Access variable R|/base|"]; - 37 [label="Exit block"]; + 34 [label="Enter when branch condition else"]; + 35 [label="Exit when branch condition"]; } - 38 [label="Exit when branch result"]; - 39 [label="Enter when branch result"]; + 36 [label="Enter when branch result"]; subgraph cluster_13 { color=blue - 40 [label="Enter block"]; - 41 [label="Access variable R|/base|"]; - 42 [label="Smart cast: R|/base|"]; - 43 [label="Access variable R|/Sub.data|"]; - 44 [label="Exit block"]; + 37 [label="Enter block"]; + 38 [label="Access variable R|/base|"]; + 39 [label="Exit block"]; } - 45 [label="Exit when branch result"]; - 46 [label="Exit when"]; + 40 [label="Exit when branch result"]; + 41 [label="Enter when branch result"]; + subgraph cluster_14 { + color=blue + 42 [label="Enter block"]; + 43 [label="Access variable R|/base|"]; + 44 [label="Smart cast: R|/base|"]; + 45 [label="Access variable R|/Sub.data|"]; + 46 [label="Exit block"]; + } + 47 [label="Exit when branch result"]; + 48 [label="Exit when"]; } - 47 [label="Jump: ^check when () { + 49 [label="Jump: ^check when () { ==((R|/base| as? R|Sub|)?.{ $subj$.R|/isOk|() }, Boolean(true)) -> { R|/base|.R|/Sub.data| } @@ -124,41 +131,41 @@ digraph functionCallBound_kt { } } "]; - 48 [label="Stub" style="filled" fillcolor=gray]; - 49 [label="Exit block" style="filled" fillcolor=gray]; + 50 [label="Stub" style="filled" fillcolor=gray]; + 51 [label="Exit block" style="filled" fillcolor=gray]; } - 50 [label="Exit function check" style="filled" fillcolor=red]; + 52 [label="Exit function check" style="filled" fillcolor=red]; } - 20 -> {21}; - 21 -> {22}; 22 -> {23}; 23 -> {24}; 24 -> {25}; - 25 -> {26 28}; + 25 -> {26}; 26 -> {27}; - 27 -> {28}; + 27 -> {28 30}; 28 -> {29}; 29 -> {30}; 30 -> {31}; - 31 -> {32 39}; + 31 -> {32}; 32 -> {33}; - 33 -> {34}; + 33 -> {34 41}; 34 -> {35}; 35 -> {36}; 36 -> {37}; 37 -> {38}; - 38 -> {46}; + 38 -> {39}; 39 -> {40}; - 40 -> {41}; + 40 -> {48}; 41 -> {42}; 42 -> {43}; 43 -> {44}; 44 -> {45}; 45 -> {46}; 46 -> {47}; - 47 -> {50}; - 47 -> {48} [style=dotted]; - 48 -> {49} [style=dotted]; + 47 -> {48}; + 48 -> {49}; + 49 -> {52}; 49 -> {50} [style=dotted]; + 50 -> {51} [style=dotted]; + 51 -> {52} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/casts.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/casts.dot index 99086338f07..5c8c78a7f59 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/casts.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/casts.dot @@ -5,74 +5,79 @@ digraph casts_kt { subgraph cluster_0 { color=red - 0 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter block"]; - 2 [label="Access variable R|/x|"]; - 3 [label="Type operator: (R|/x| as R|kotlin/String|)"]; - 4 [label="Access variable R|/x|"]; - 5 [label="Smart cast: R|/x|"]; - 6 [label="Access variable R|kotlin/String.length|"]; - 7 [label="Exit block"]; - } - 8 [label="Exit function test_1" style="filled" fillcolor=red]; + 0 [label="Enter file casts.kt" style="filled" fillcolor=red]; + 1 [label="Exit file casts.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_2 { + color=blue + 3 [label="Enter block"]; + 4 [label="Access variable R|/x|"]; + 5 [label="Type operator: (R|/x| as R|kotlin/String|)"]; + 6 [label="Access variable R|/x|"]; + 7 [label="Smart cast: R|/x|"]; + 8 [label="Access variable R|kotlin/String.length|"]; + 9 [label="Exit block"]; + } + 10 [label="Exit function test_1" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; 3 -> {4}; 4 -> {5}; 5 -> {6}; 6 -> {7}; 7 -> {8}; + 8 -> {9}; + 9 -> {10}; - subgraph cluster_2 { + subgraph cluster_3 { color=red - 9 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_3 { + 11 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_4 { color=blue - 10 [label="Enter block"]; - subgraph cluster_4 { + 12 [label="Enter block"]; + subgraph cluster_5 { color=blue - 11 [label="Enter when"]; - subgraph cluster_5 { - color=blue - 12 [label="Enter when branch condition "]; - 13 [label="Access variable R|/x|"]; - 14 [label="Type operator: (R|/x| as R|kotlin/Boolean|)"]; - 15 [label="Exit when branch condition"]; - } - 16 [label="Synthetic else branch"]; - 17 [label="Enter when branch result"]; + 13 [label="Enter when"]; subgraph cluster_6 { color=blue - 18 [label="Enter block"]; - 19 [label="Access variable R|/x|"]; - 20 [label="Smart cast: R|/x|"]; - 21 [label="Function call: R|/x|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 22 [label="Exit block"]; + 14 [label="Enter when branch condition "]; + 15 [label="Access variable R|/x|"]; + 16 [label="Type operator: (R|/x| as R|kotlin/Boolean|)"]; + 17 [label="Exit when branch condition"]; } - 23 [label="Exit when branch result"]; - 24 [label="Exit when"]; + 18 [label="Synthetic else branch"]; + 19 [label="Enter when branch result"]; + subgraph cluster_7 { + color=blue + 20 [label="Enter block"]; + 21 [label="Access variable R|/x|"]; + 22 [label="Smart cast: R|/x|"]; + 23 [label="Function call: R|/x|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 24 [label="Exit block"]; + } + 25 [label="Exit when branch result"]; + 26 [label="Exit when"]; } - 25 [label="Access variable R|/x|"]; - 26 [label="Smart cast: R|/x|"]; - 27 [label="Function call: R|/x|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 28 [label="Exit block"]; + 27 [label="Access variable R|/x|"]; + 28 [label="Smart cast: R|/x|"]; + 29 [label="Function call: R|/x|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 30 [label="Exit block"]; } - 29 [label="Exit function test_2" style="filled" fillcolor=red]; + 31 [label="Exit function test_2" style="filled" fillcolor=red]; } - 9 -> {10}; - 10 -> {11}; 11 -> {12}; 12 -> {13}; 13 -> {14}; 14 -> {15}; - 15 -> {16 17}; - 16 -> {24}; - 17 -> {18}; - 18 -> {19}; + 15 -> {16}; + 16 -> {17}; + 17 -> {18 19}; + 18 -> {26}; 19 -> {20}; 20 -> {21}; 21 -> {22}; @@ -83,132 +88,132 @@ digraph casts_kt { 26 -> {27}; 27 -> {28}; 28 -> {29}; - - subgraph cluster_7 { - color=red - 30 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_8 { - color=blue - 31 [label="Enter block"]; - subgraph cluster_9 { - color=blue - 32 [label="Enter when"]; - subgraph cluster_10 { - color=blue - 33 [label="Enter when branch condition "]; - subgraph cluster_11 { - color=blue - 34 [label="Enter &&"]; - 35 [label="Access variable R|/b|"]; - 36 [label="Exit left part of &&"]; - 37 [label="Enter right part of &&"]; - 38 [label="Access variable R|/x|"]; - 39 [label="Type operator: (R|/x| as R|kotlin/Boolean|)"]; - 40 [label="Exit &&"]; - } - 41 [label="Exit when branch condition"]; - } - 42 [label="Synthetic else branch"]; - 43 [label="Enter when branch result"]; - subgraph cluster_12 { - color=blue - 44 [label="Enter block"]; - 45 [label="Access variable R|/x|"]; - 46 [label="Smart cast: R|/x|"]; - 47 [label="Function call: R|/x|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 48 [label="Exit block"]; - } - 49 [label="Exit when branch result"]; - 50 [label="Exit when"]; - } - 51 [label="Access variable R|/x|"]; - 52 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - subgraph cluster_13 { - color=blue - 53 [label="Enter when"]; - subgraph cluster_14 { - color=blue - 54 [label="Enter when branch condition "]; - subgraph cluster_15 { - color=blue - 55 [label="Enter &&"]; - 56 [label="Access variable R|/b|"]; - 57 [label="Exit left part of &&"]; - 58 [label="Enter right part of &&"]; - 59 [label="Access variable R|/x|"]; - 60 [label="Type operator: (R|/x| as R|kotlin/Boolean|)"]; - 61 [label="Const: Boolean(true)"]; - 62 [label="Equality operator =="]; - 63 [label="Exit &&"]; - } - 64 [label="Exit when branch condition"]; - } - 65 [label="Synthetic else branch"]; - 66 [label="Enter when branch result"]; - subgraph cluster_16 { - color=blue - 67 [label="Enter block"]; - 68 [label="Access variable R|/x|"]; - 69 [label="Smart cast: R|/x|"]; - 70 [label="Function call: R|/x|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 71 [label="Exit block"]; - } - 72 [label="Exit when branch result"]; - 73 [label="Exit when"]; - } - 74 [label="Access variable R|/x|"]; - 75 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - subgraph cluster_17 { - color=blue - 76 [label="Enter when"]; - subgraph cluster_18 { - color=blue - 77 [label="Enter when branch condition "]; - subgraph cluster_19 { - color=blue - 78 [label="Enter ||"]; - 79 [label="Access variable R|/b|"]; - 80 [label="Exit left part of ||"]; - 81 [label="Enter right part of ||"]; - 82 [label="Access variable R|/x|"]; - 83 [label="Type operator: (R|/x| as R|kotlin/Boolean|)"]; - 84 [label="Exit ||"]; - } - 85 [label="Exit when branch condition"]; - } - 86 [label="Synthetic else branch"]; - 87 [label="Enter when branch result"]; - subgraph cluster_20 { - color=blue - 88 [label="Enter block"]; - 89 [label="Access variable R|/x|"]; - 90 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 91 [label="Exit block"]; - } - 92 [label="Exit when branch result"]; - 93 [label="Exit when"]; - } - 94 [label="Access variable R|/x|"]; - 95 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 96 [label="Exit block"]; - } - 97 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 29 -> {30}; 30 -> {31}; - 31 -> {32}; + + subgraph cluster_8 { + color=red + 32 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_9 { + color=blue + 33 [label="Enter block"]; + subgraph cluster_10 { + color=blue + 34 [label="Enter when"]; + subgraph cluster_11 { + color=blue + 35 [label="Enter when branch condition "]; + subgraph cluster_12 { + color=blue + 36 [label="Enter &&"]; + 37 [label="Access variable R|/b|"]; + 38 [label="Exit left part of &&"]; + 39 [label="Enter right part of &&"]; + 40 [label="Access variable R|/x|"]; + 41 [label="Type operator: (R|/x| as R|kotlin/Boolean|)"]; + 42 [label="Exit &&"]; + } + 43 [label="Exit when branch condition"]; + } + 44 [label="Synthetic else branch"]; + 45 [label="Enter when branch result"]; + subgraph cluster_13 { + color=blue + 46 [label="Enter block"]; + 47 [label="Access variable R|/x|"]; + 48 [label="Smart cast: R|/x|"]; + 49 [label="Function call: R|/x|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 50 [label="Exit block"]; + } + 51 [label="Exit when branch result"]; + 52 [label="Exit when"]; + } + 53 [label="Access variable R|/x|"]; + 54 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_14 { + color=blue + 55 [label="Enter when"]; + subgraph cluster_15 { + color=blue + 56 [label="Enter when branch condition "]; + subgraph cluster_16 { + color=blue + 57 [label="Enter &&"]; + 58 [label="Access variable R|/b|"]; + 59 [label="Exit left part of &&"]; + 60 [label="Enter right part of &&"]; + 61 [label="Access variable R|/x|"]; + 62 [label="Type operator: (R|/x| as R|kotlin/Boolean|)"]; + 63 [label="Const: Boolean(true)"]; + 64 [label="Equality operator =="]; + 65 [label="Exit &&"]; + } + 66 [label="Exit when branch condition"]; + } + 67 [label="Synthetic else branch"]; + 68 [label="Enter when branch result"]; + subgraph cluster_17 { + color=blue + 69 [label="Enter block"]; + 70 [label="Access variable R|/x|"]; + 71 [label="Smart cast: R|/x|"]; + 72 [label="Function call: R|/x|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 73 [label="Exit block"]; + } + 74 [label="Exit when branch result"]; + 75 [label="Exit when"]; + } + 76 [label="Access variable R|/x|"]; + 77 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_18 { + color=blue + 78 [label="Enter when"]; + subgraph cluster_19 { + color=blue + 79 [label="Enter when branch condition "]; + subgraph cluster_20 { + color=blue + 80 [label="Enter ||"]; + 81 [label="Access variable R|/b|"]; + 82 [label="Exit left part of ||"]; + 83 [label="Enter right part of ||"]; + 84 [label="Access variable R|/x|"]; + 85 [label="Type operator: (R|/x| as R|kotlin/Boolean|)"]; + 86 [label="Exit ||"]; + } + 87 [label="Exit when branch condition"]; + } + 88 [label="Synthetic else branch"]; + 89 [label="Enter when branch result"]; + subgraph cluster_21 { + color=blue + 90 [label="Enter block"]; + 91 [label="Access variable R|/x|"]; + 92 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 93 [label="Exit block"]; + } + 94 [label="Exit when branch result"]; + 95 [label="Exit when"]; + } + 96 [label="Access variable R|/x|"]; + 97 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 98 [label="Exit block"]; + } + 99 [label="Exit function test_3" style="filled" fillcolor=red]; + } 32 -> {33}; 33 -> {34}; 34 -> {35}; 35 -> {36}; - 36 -> {37 40}; + 36 -> {37}; 37 -> {38}; - 38 -> {39}; + 38 -> {39 42}; 39 -> {40}; 40 -> {41}; - 41 -> {42 43}; - 42 -> {50}; - 43 -> {44}; - 44 -> {45}; + 41 -> {42}; + 42 -> {43}; + 43 -> {44 45}; + 44 -> {52}; 45 -> {46}; 46 -> {47}; 47 -> {48}; @@ -221,17 +226,17 @@ digraph casts_kt { 54 -> {55}; 55 -> {56}; 56 -> {57}; - 57 -> {58 63}; + 57 -> {58}; 58 -> {59}; - 59 -> {60}; + 59 -> {60 65}; 60 -> {61}; 61 -> {62}; 62 -> {63}; 63 -> {64}; - 64 -> {65 66}; - 65 -> {73}; - 66 -> {67}; - 67 -> {68}; + 64 -> {65}; + 65 -> {66}; + 66 -> {67 68}; + 67 -> {75}; 68 -> {69}; 69 -> {70}; 70 -> {71}; @@ -244,15 +249,15 @@ digraph casts_kt { 77 -> {78}; 78 -> {79}; 79 -> {80}; - 80 -> {81 84}; + 80 -> {81}; 81 -> {82}; - 82 -> {83}; + 82 -> {83 86}; 83 -> {84}; 84 -> {85}; - 85 -> {86 87}; - 86 -> {93}; - 87 -> {88}; - 88 -> {89}; + 85 -> {86}; + 86 -> {87}; + 87 -> {88 89}; + 88 -> {95}; 89 -> {90}; 90 -> {91}; 91 -> {92}; @@ -261,116 +266,116 @@ digraph casts_kt { 94 -> {95}; 95 -> {96}; 96 -> {97}; + 97 -> {98}; + 98 -> {99}; - subgraph cluster_21 { + subgraph cluster_22 { color=red - 98 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_22 { + 100 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_23 { color=blue - 99 [label="Enter block"]; - subgraph cluster_23 { + 101 [label="Enter block"]; + subgraph cluster_24 { color=blue - 100 [label="Enter when"]; - subgraph cluster_24 { - color=blue - 101 [label="Enter when branch condition "]; - 102 [label="Access variable R|/b|"]; - 103 [label="Type operator: (R|/b| as? R|kotlin/Boolean|)"]; - 104 [label="Const: Null(null)"]; - 105 [label="Equality operator !="]; - 106 [label="Exit when branch condition"]; - } + 102 [label="Enter when"]; subgraph cluster_25 { color=blue - 107 [label="Enter when branch condition else"]; + 103 [label="Enter when branch condition "]; + 104 [label="Access variable R|/b|"]; + 105 [label="Type operator: (R|/b| as? R|kotlin/Boolean|)"]; + 106 [label="Const: Null(null)"]; + 107 [label="Equality operator !="]; 108 [label="Exit when branch condition"]; } - 109 [label="Enter when branch result"]; subgraph cluster_26 { color=blue - 110 [label="Enter block"]; - 111 [label="Access variable R|/b|"]; - 112 [label="Function call: R|/b|.#()" style="filled" fillcolor=yellow]; - 113 [label="Exit block"]; + 109 [label="Enter when branch condition else"]; + 110 [label="Exit when branch condition"]; } - 114 [label="Exit when branch result"]; - 115 [label="Enter when branch result"]; + 111 [label="Enter when branch result"]; subgraph cluster_27 { color=blue - 116 [label="Enter block"]; - 117 [label="Access variable R|/b|"]; - 118 [label="Smart cast: R|/b|"]; - 119 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 120 [label="Exit block"]; + 112 [label="Enter block"]; + 113 [label="Access variable R|/b|"]; + 114 [label="Function call: R|/b|.#()" style="filled" fillcolor=yellow]; + 115 [label="Exit block"]; } - 121 [label="Exit when branch result"]; - 122 [label="Exit when"]; - } - 123 [label="Access variable R|/b|"]; - 124 [label="Function call: R|/b|.#()" style="filled" fillcolor=yellow]; - subgraph cluster_28 { - color=blue - 125 [label="Enter when"]; - subgraph cluster_29 { + 116 [label="Exit when branch result"]; + 117 [label="Enter when branch result"]; + subgraph cluster_28 { color=blue - 126 [label="Enter when branch condition "]; - 127 [label="Access variable R|/b|"]; - 128 [label="Type operator: (R|/b| as? R|kotlin/Boolean|)"]; - 129 [label="Const: Null(null)"]; - 130 [label="Equality operator =="]; - 131 [label="Exit when branch condition"]; + 118 [label="Enter block"]; + 119 [label="Access variable R|/b|"]; + 120 [label="Smart cast: R|/b|"]; + 121 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 122 [label="Exit block"]; } + 123 [label="Exit when branch result"]; + 124 [label="Exit when"]; + } + 125 [label="Access variable R|/b|"]; + 126 [label="Function call: R|/b|.#()" style="filled" fillcolor=yellow]; + subgraph cluster_29 { + color=blue + 127 [label="Enter when"]; subgraph cluster_30 { color=blue - 132 [label="Enter when branch condition else"]; + 128 [label="Enter when branch condition "]; + 129 [label="Access variable R|/b|"]; + 130 [label="Type operator: (R|/b| as? R|kotlin/Boolean|)"]; + 131 [label="Const: Null(null)"]; + 132 [label="Equality operator =="]; 133 [label="Exit when branch condition"]; } - 134 [label="Enter when branch result"]; subgraph cluster_31 { color=blue - 135 [label="Enter block"]; - 136 [label="Access variable R|/b|"]; - 137 [label="Smart cast: R|/b|"]; - 138 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 139 [label="Exit block"]; + 134 [label="Enter when branch condition else"]; + 135 [label="Exit when branch condition"]; } - 140 [label="Exit when branch result"]; - 141 [label="Enter when branch result"]; + 136 [label="Enter when branch result"]; subgraph cluster_32 { color=blue - 142 [label="Enter block"]; - 143 [label="Access variable R|/b|"]; - 144 [label="Function call: R|/b|.#()" style="filled" fillcolor=yellow]; - 145 [label="Exit block"]; + 137 [label="Enter block"]; + 138 [label="Access variable R|/b|"]; + 139 [label="Smart cast: R|/b|"]; + 140 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 141 [label="Exit block"]; } - 146 [label="Exit when branch result"]; - 147 [label="Exit when"]; + 142 [label="Exit when branch result"]; + 143 [label="Enter when branch result"]; + subgraph cluster_33 { + color=blue + 144 [label="Enter block"]; + 145 [label="Access variable R|/b|"]; + 146 [label="Function call: R|/b|.#()" style="filled" fillcolor=yellow]; + 147 [label="Exit block"]; + } + 148 [label="Exit when branch result"]; + 149 [label="Exit when"]; } - 148 [label="Access variable R|/b|"]; - 149 [label="Function call: R|/b|.#()" style="filled" fillcolor=yellow]; - 150 [label="Exit block"]; + 150 [label="Access variable R|/b|"]; + 151 [label="Function call: R|/b|.#()" style="filled" fillcolor=yellow]; + 152 [label="Exit block"]; } - 151 [label="Exit function test_4" style="filled" fillcolor=red]; + 153 [label="Exit function test_4" style="filled" fillcolor=red]; } - 98 -> {99}; - 99 -> {100}; 100 -> {101}; 101 -> {102}; 102 -> {103}; 103 -> {104}; 104 -> {105}; 105 -> {106}; - 106 -> {107 115}; + 106 -> {107}; 107 -> {108}; - 108 -> {109}; + 108 -> {109 117}; 109 -> {110}; 110 -> {111}; 111 -> {112}; 112 -> {113}; 113 -> {114}; - 114 -> {122}; + 114 -> {115}; 115 -> {116}; - 116 -> {117}; + 116 -> {124}; 117 -> {118}; 118 -> {119}; 119 -> {120}; @@ -385,18 +390,18 @@ digraph casts_kt { 128 -> {129}; 129 -> {130}; 130 -> {131}; - 131 -> {132 141}; + 131 -> {132}; 132 -> {133}; - 133 -> {134}; + 133 -> {134 143}; 134 -> {135}; 135 -> {136}; 136 -> {137}; 137 -> {138}; 138 -> {139}; 139 -> {140}; - 140 -> {147}; + 140 -> {141}; 141 -> {142}; - 142 -> {143}; + 142 -> {149}; 143 -> {144}; 144 -> {145}; 145 -> {146}; @@ -405,5 +410,7 @@ digraph casts_kt { 148 -> {149}; 149 -> {150}; 150 -> {151}; + 151 -> {152}; + 152 -> {153}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/elvis.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/elvis.dot index c67b182620e..65bf08474fe 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/elvis.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/elvis.dot @@ -5,78 +5,83 @@ digraph elvis_kt { subgraph cluster_0 { color=red - 0 [label="Enter class A" style="filled" fillcolor=red]; - 1 [label="Exit class A" style="filled" fillcolor=red]; + 0 [label="Enter file elvis.kt" style="filled" fillcolor=red]; + 1 [label="Exit file elvis.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; subgraph cluster_1 { color=red - 2 [label="Enter function foo" style="filled" fillcolor=red]; - 3 [label="Exit function foo" style="filled" fillcolor=red]; + 2 [label="Enter class A" style="filled" fillcolor=red]; + 3 [label="Exit class A" style="filled" fillcolor=red]; } - 2 -> {3}; + 2 -> {3} [color=green]; subgraph cluster_2 { color=red - 4 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_3 { - color=blue - 5 [label="Enter block"]; - subgraph cluster_4 { - color=blue - 6 [label="Enter when"]; - subgraph cluster_5 { - color=blue - 7 [label="Enter when branch condition "]; - 8 [label="Access variable R|/x|"]; - 9 [label="Enter safe call"]; - 10 [label="Access variable R|/A.b|"]; - 11 [label="Exit safe call"]; - 12 [label="Exit lhs of ?:"]; - 13 [label="Enter rhs of ?:"]; - 14 [label="Jump: ^test_1 Unit"]; - 15 [label="Stub" style="filled" fillcolor=gray]; - 16 [label="Lhs of ?: is not null"]; - 17 [label="Exit ?:"]; - 18 [label="Exit when branch condition"]; - } - 19 [label="Synthetic else branch"]; - 20 [label="Enter when branch result"]; - subgraph cluster_6 { - color=blue - 21 [label="Enter block"]; - 22 [label="Access variable R|/x|"]; - 23 [label="Smart cast: R|/x|"]; - 24 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 25 [label="Exit block"]; - } - 26 [label="Exit when branch result"]; - 27 [label="Exit when"]; - } - 28 [label="Exit block"]; - } - 29 [label="Exit function test_1" style="filled" fillcolor=red]; + 4 [label="Enter function foo" style="filled" fillcolor=red]; + 5 [label="Exit function foo" style="filled" fillcolor=red]; } 4 -> {5}; - 5 -> {6}; + + subgraph cluster_3 { + color=red + 6 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_4 { + color=blue + 7 [label="Enter block"]; + subgraph cluster_5 { + color=blue + 8 [label="Enter when"]; + subgraph cluster_6 { + color=blue + 9 [label="Enter when branch condition "]; + 10 [label="Access variable R|/x|"]; + 11 [label="Enter safe call"]; + 12 [label="Access variable R|/A.b|"]; + 13 [label="Exit safe call"]; + 14 [label="Exit lhs of ?:"]; + 15 [label="Enter rhs of ?:"]; + 16 [label="Jump: ^test_1 Unit"]; + 17 [label="Stub" style="filled" fillcolor=gray]; + 18 [label="Lhs of ?: is not null"]; + 19 [label="Exit ?:"]; + 20 [label="Exit when branch condition"]; + } + 21 [label="Synthetic else branch"]; + 22 [label="Enter when branch result"]; + subgraph cluster_7 { + color=blue + 23 [label="Enter block"]; + 24 [label="Access variable R|/x|"]; + 25 [label="Smart cast: R|/x|"]; + 26 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 27 [label="Exit block"]; + } + 28 [label="Exit when branch result"]; + 29 [label="Exit when"]; + } + 30 [label="Exit block"]; + } + 31 [label="Exit function test_1" style="filled" fillcolor=red]; + } 6 -> {7}; 7 -> {8}; - 8 -> {9 13}; + 8 -> {9}; 9 -> {10}; - 10 -> {11}; + 10 -> {11 15}; 11 -> {12}; - 12 -> {13 16}; + 12 -> {13}; 13 -> {14}; - 14 -> {29}; - 14 -> {15} [style=dotted]; - 15 -> {17} [style=dotted]; - 16 -> {17}; - 17 -> {18}; - 18 -> {19 20}; - 19 -> {27}; - 20 -> {21}; - 21 -> {22}; + 14 -> {15 18}; + 15 -> {16}; + 16 -> {31}; + 16 -> {17} [style=dotted]; + 17 -> {19} [style=dotted]; + 18 -> {19}; + 19 -> {20}; + 20 -> {21 22}; + 21 -> {29}; 22 -> {23}; 23 -> {24}; 24 -> {25}; @@ -84,116 +89,118 @@ digraph elvis_kt { 26 -> {27}; 27 -> {28}; 28 -> {29}; + 29 -> {30}; + 30 -> {31}; - subgraph cluster_7 { + subgraph cluster_8 { color=red - 30 [label="Enter function test2" style="filled" fillcolor=red]; - subgraph cluster_8 { + 32 [label="Enter function test2" style="filled" fillcolor=red]; + subgraph cluster_9 { color=blue - 31 [label="Enter block"]; - subgraph cluster_9 { + 33 [label="Enter block"]; + subgraph cluster_10 { color=blue - 32 [label="Enter when"]; - subgraph cluster_10 { - color=blue - 33 [label="Enter when branch condition "]; - 34 [label="Access variable R|/b|"]; - 35 [label="Type operator: (R|/b| !is R|kotlin/String|)"]; - 36 [label="Exit when branch condition"]; - } - 37 [label="Synthetic else branch"]; - 38 [label="Enter when branch result"]; + 34 [label="Enter when"]; subgraph cluster_11 { color=blue - 39 [label="Enter block"]; - 40 [label="Const: String()"]; - 41 [label="Jump: ^test2 String()"]; - 42 [label="Stub" style="filled" fillcolor=gray]; - 43 [label="Exit block" style="filled" fillcolor=gray]; + 35 [label="Enter when branch condition "]; + 36 [label="Access variable R|/b|"]; + 37 [label="Type operator: (R|/b| !is R|kotlin/String|)"]; + 38 [label="Exit when branch condition"]; } - 44 [label="Exit when branch result" style="filled" fillcolor=gray]; - 45 [label="Exit when"]; - } - subgraph cluster_12 { - color=blue - 46 [label="Enter when"]; - subgraph cluster_13 { + 39 [label="Synthetic else branch"]; + 40 [label="Enter when branch result"]; + subgraph cluster_12 { color=blue - 47 [label="Enter when branch condition "]; - 48 [label="Access variable R|/a|"]; - 49 [label="Type operator: (R|/a| !is R|kotlin/String?|)"]; - 50 [label="Exit when branch condition"]; + 41 [label="Enter block"]; + 42 [label="Const: String()"]; + 43 [label="Jump: ^test2 String()"]; + 44 [label="Stub" style="filled" fillcolor=gray]; + 45 [label="Exit block" style="filled" fillcolor=gray]; } - 51 [label="Synthetic else branch"]; - 52 [label="Enter when branch result"]; + 46 [label="Exit when branch result" style="filled" fillcolor=gray]; + 47 [label="Exit when"]; + } + subgraph cluster_13 { + color=blue + 48 [label="Enter when"]; subgraph cluster_14 { color=blue - 53 [label="Enter block"]; - 54 [label="Const: String()"]; - 55 [label="Jump: ^test2 String()"]; - 56 [label="Stub" style="filled" fillcolor=gray]; - 57 [label="Exit block" style="filled" fillcolor=gray]; + 49 [label="Enter when branch condition "]; + 50 [label="Access variable R|/a|"]; + 51 [label="Type operator: (R|/a| !is R|kotlin/String?|)"]; + 52 [label="Exit when branch condition"]; } - 58 [label="Exit when branch result" style="filled" fillcolor=gray]; - 59 [label="Exit when"]; + 53 [label="Synthetic else branch"]; + 54 [label="Enter when branch result"]; + subgraph cluster_15 { + color=blue + 55 [label="Enter block"]; + 56 [label="Const: String()"]; + 57 [label="Jump: ^test2 String()"]; + 58 [label="Stub" style="filled" fillcolor=gray]; + 59 [label="Exit block" style="filled" fillcolor=gray]; + } + 60 [label="Exit when branch result" style="filled" fillcolor=gray]; + 61 [label="Exit when"]; } - 60 [label="Access variable R|/a|"]; - 61 [label="Smart cast: R|/a|"]; - 62 [label="Exit lhs of ?:"]; - 63 [label="Enter rhs of ?:"]; - 64 [label="Access variable R|/b|"]; - 65 [label="Smart cast: R|/b|"]; - 66 [label="Lhs of ?: is not null"]; - 67 [label="Exit ?:"]; - 68 [label="Jump: ^test2 R|/a| ?: R|/b|"]; - 69 [label="Stub" style="filled" fillcolor=gray]; - 70 [label="Exit block" style="filled" fillcolor=gray]; + 62 [label="Access variable R|/a|"]; + 63 [label="Smart cast: R|/a|"]; + 64 [label="Exit lhs of ?:"]; + 65 [label="Enter rhs of ?:"]; + 66 [label="Access variable R|/b|"]; + 67 [label="Smart cast: R|/b|"]; + 68 [label="Lhs of ?: is not null"]; + 69 [label="Exit ?:"]; + 70 [label="Jump: ^test2 R|/a| ?: R|/b|"]; + 71 [label="Stub" style="filled" fillcolor=gray]; + 72 [label="Exit block" style="filled" fillcolor=gray]; } - 71 [label="Exit function test2" style="filled" fillcolor=red]; + 73 [label="Exit function test2" style="filled" fillcolor=red]; } - 30 -> {31}; - 31 -> {32}; 32 -> {33}; 33 -> {34}; 34 -> {35}; 35 -> {36}; - 36 -> {37 38}; - 37 -> {45}; - 38 -> {39}; - 39 -> {40}; + 36 -> {37}; + 37 -> {38}; + 38 -> {39 40}; + 39 -> {47}; 40 -> {41}; - 41 -> {71}; - 41 -> {42} [style=dotted]; - 42 -> {43} [style=dotted]; + 41 -> {42}; + 42 -> {43}; + 43 -> {73}; 43 -> {44} [style=dotted]; 44 -> {45} [style=dotted]; - 45 -> {46}; - 46 -> {47}; + 45 -> {46} [style=dotted]; + 46 -> {47} [style=dotted]; 47 -> {48}; 48 -> {49}; 49 -> {50}; - 50 -> {51 52}; - 51 -> {59}; - 52 -> {53}; - 53 -> {54}; + 50 -> {51}; + 51 -> {52}; + 52 -> {53 54}; + 53 -> {61}; 54 -> {55}; - 55 -> {71}; - 55 -> {56} [style=dotted]; - 56 -> {57} [style=dotted]; + 55 -> {56}; + 56 -> {57}; + 57 -> {73}; 57 -> {58} [style=dotted]; 58 -> {59} [style=dotted]; - 59 -> {60}; - 60 -> {61}; + 59 -> {60} [style=dotted]; + 60 -> {61} [style=dotted]; 61 -> {62}; - 62 -> {63 66}; + 62 -> {63}; 63 -> {64}; - 64 -> {65}; - 65 -> {67}; + 64 -> {65 68}; + 65 -> {66}; 66 -> {67}; - 67 -> {68}; - 68 -> {71}; - 68 -> {69} [style=dotted]; - 69 -> {70} [style=dotted]; + 67 -> {69}; + 68 -> {69}; + 69 -> {70}; + 70 -> {73}; 70 -> {71} [style=dotted]; + 71 -> {72} [style=dotted]; + 72 -> {73} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/returns.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/returns.dot index 984bd46efce..735372d2589 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/returns.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/returns.dot @@ -5,65 +5,70 @@ digraph returns_kt { subgraph cluster_0 { color=red - 0 [label="Enter function test_0" style="filled" fillcolor=red]; - subgraph cluster_1 { + 0 [label="Enter file returns.kt" style="filled" fillcolor=red]; + 1 [label="Exit file returns.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function test_0" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 1 [label="Enter block"]; - subgraph cluster_2 { + 3 [label="Enter block"]; + subgraph cluster_3 { color=blue - 2 [label="Enter when"]; - subgraph cluster_3 { - color=blue - 3 [label="Enter when branch condition "]; - 4 [label="Access variable R|/x|"]; - 5 [label="Type operator: (R|/x| is R|kotlin/String|)"]; - 6 [label="Exit when branch condition"]; - } + 4 [label="Enter when"]; subgraph cluster_4 { color=blue - 7 [label="Enter when branch condition else"]; + 5 [label="Enter when branch condition "]; + 6 [label="Access variable R|/x|"]; + 7 [label="Type operator: (R|/x| is R|kotlin/String|)"]; 8 [label="Exit when branch condition"]; } - 9 [label="Enter when branch result"]; subgraph cluster_5 { color=blue - 10 [label="Enter block"]; - 11 [label="Exit block"]; + 9 [label="Enter when branch condition else"]; + 10 [label="Exit when branch condition"]; } - 12 [label="Exit when branch result"]; - 13 [label="Enter when branch result"]; + 11 [label="Enter when branch result"]; subgraph cluster_6 { color=blue - 14 [label="Enter block"]; - 15 [label="Access variable R|/x|"]; - 16 [label="Smart cast: R|/x|"]; - 17 [label="Access variable R|kotlin/String.length|"]; - 18 [label="Exit block"]; + 12 [label="Enter block"]; + 13 [label="Exit block"]; } - 19 [label="Exit when branch result"]; - 20 [label="Exit when"]; + 14 [label="Exit when branch result"]; + 15 [label="Enter when branch result"]; + subgraph cluster_7 { + color=blue + 16 [label="Enter block"]; + 17 [label="Access variable R|/x|"]; + 18 [label="Smart cast: R|/x|"]; + 19 [label="Access variable R|kotlin/String.length|"]; + 20 [label="Exit block"]; + } + 21 [label="Exit when branch result"]; + 22 [label="Exit when"]; } - 21 [label="Access variable R|/x|"]; - 22 [label="Access variable #"]; - 23 [label="Exit block"]; + 23 [label="Access variable R|/x|"]; + 24 [label="Access variable #"]; + 25 [label="Exit block"]; } - 24 [label="Exit function test_0" style="filled" fillcolor=red]; + 26 [label="Exit function test_0" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; 3 -> {4}; 4 -> {5}; 5 -> {6}; - 6 -> {7 13}; + 6 -> {7}; 7 -> {8}; - 8 -> {9}; + 8 -> {9 15}; 9 -> {10}; 10 -> {11}; 11 -> {12}; - 12 -> {20}; + 12 -> {13}; 13 -> {14}; - 14 -> {15}; + 14 -> {22}; 15 -> {16}; 16 -> {17}; 17 -> {18}; @@ -73,74 +78,74 @@ digraph returns_kt { 21 -> {22}; 22 -> {23}; 23 -> {24}; + 24 -> {25}; + 25 -> {26}; - subgraph cluster_7 { + subgraph cluster_8 { color=red - 25 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_8 { + 27 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_9 { color=blue - 26 [label="Enter block"]; - subgraph cluster_9 { + 28 [label="Enter block"]; + subgraph cluster_10 { color=blue - 27 [label="Enter when"]; - subgraph cluster_10 { - color=blue - 28 [label="Enter when branch condition "]; - 29 [label="Access variable R|/x|"]; - 30 [label="Type operator: (R|/x| is R|kotlin/String|)"]; - 31 [label="Exit when branch condition"]; - } + 29 [label="Enter when"]; subgraph cluster_11 { color=blue - 32 [label="Enter when branch condition else"]; + 30 [label="Enter when branch condition "]; + 31 [label="Access variable R|/x|"]; + 32 [label="Type operator: (R|/x| is R|kotlin/String|)"]; 33 [label="Exit when branch condition"]; } - 34 [label="Enter when branch result"]; subgraph cluster_12 { color=blue - 35 [label="Enter block"]; - 36 [label="Jump: ^test_1 Unit"]; - 37 [label="Stub" style="filled" fillcolor=gray]; - 38 [label="Exit block" style="filled" fillcolor=gray]; + 34 [label="Enter when branch condition else"]; + 35 [label="Exit when branch condition"]; } - 39 [label="Exit when branch result" style="filled" fillcolor=gray]; - 40 [label="Enter when branch result"]; + 36 [label="Enter when branch result"]; subgraph cluster_13 { color=blue - 41 [label="Enter block"]; - 42 [label="Access variable R|/x|"]; - 43 [label="Smart cast: R|/x|"]; - 44 [label="Access variable R|kotlin/String.length|"]; - 45 [label="Exit block"]; + 37 [label="Enter block"]; + 38 [label="Jump: ^test_1 Unit"]; + 39 [label="Stub" style="filled" fillcolor=gray]; + 40 [label="Exit block" style="filled" fillcolor=gray]; } - 46 [label="Exit when branch result"]; - 47 [label="Exit when"]; + 41 [label="Exit when branch result" style="filled" fillcolor=gray]; + 42 [label="Enter when branch result"]; + subgraph cluster_14 { + color=blue + 43 [label="Enter block"]; + 44 [label="Access variable R|/x|"]; + 45 [label="Smart cast: R|/x|"]; + 46 [label="Access variable R|kotlin/String.length|"]; + 47 [label="Exit block"]; + } + 48 [label="Exit when branch result"]; + 49 [label="Exit when"]; } - 48 [label="Access variable R|/x|"]; - 49 [label="Smart cast: R|/x|"]; - 50 [label="Access variable R|kotlin/String.length|"]; - 51 [label="Exit block"]; + 50 [label="Access variable R|/x|"]; + 51 [label="Smart cast: R|/x|"]; + 52 [label="Access variable R|kotlin/String.length|"]; + 53 [label="Exit block"]; } - 52 [label="Exit function test_1" style="filled" fillcolor=red]; + 54 [label="Exit function test_1" style="filled" fillcolor=red]; } - 25 -> {26}; - 26 -> {27}; 27 -> {28}; 28 -> {29}; 29 -> {30}; 30 -> {31}; - 31 -> {32 40}; + 31 -> {32}; 32 -> {33}; - 33 -> {34}; + 33 -> {34 42}; 34 -> {35}; 35 -> {36}; - 36 -> {52}; - 36 -> {37} [style=dotted]; - 37 -> {38} [style=dotted]; + 36 -> {37}; + 37 -> {38}; + 38 -> {54}; 38 -> {39} [style=dotted]; - 39 -> {47} [style=dotted]; - 40 -> {41}; - 41 -> {42}; + 39 -> {40} [style=dotted]; + 40 -> {41} [style=dotted]; + 41 -> {49} [style=dotted]; 42 -> {43}; 43 -> {44}; 44 -> {45}; @@ -151,150 +156,150 @@ digraph returns_kt { 49 -> {50}; 50 -> {51}; 51 -> {52}; - - subgraph cluster_14 { - color=red - 53 [label="Enter class A" style="filled" fillcolor=red]; - 54 [label="Exit class A" style="filled" fillcolor=red]; - } - 53 -> {54} [color=green]; + 52 -> {53}; + 53 -> {54}; subgraph cluster_15 { color=red - 55 [label="Enter function foo" style="filled" fillcolor=red]; - 56 [label="Exit function foo" style="filled" fillcolor=red]; + 55 [label="Enter class A" style="filled" fillcolor=red]; + 56 [label="Exit class A" style="filled" fillcolor=red]; } - 55 -> {56}; + 55 -> {56} [color=green]; subgraph cluster_16 { color=red - 57 [label="Enter class B" style="filled" fillcolor=red]; - 58 [label="Exit class B" style="filled" fillcolor=red]; + 57 [label="Enter function foo" style="filled" fillcolor=red]; + 58 [label="Exit function foo" style="filled" fillcolor=red]; } - 57 -> {58} [color=green]; + 57 -> {58}; subgraph cluster_17 { color=red - 59 [label="Enter function bar" style="filled" fillcolor=red]; - 60 [label="Exit function bar" style="filled" fillcolor=red]; + 59 [label="Enter class B" style="filled" fillcolor=red]; + 60 [label="Exit class B" style="filled" fillcolor=red]; } - 59 -> {60}; + 59 -> {60} [color=green]; subgraph cluster_18 { color=red - 61 [label="Enter class C" style="filled" fillcolor=red]; - 62 [label="Exit class C" style="filled" fillcolor=red]; + 61 [label="Enter function bar" style="filled" fillcolor=red]; + 62 [label="Exit function bar" style="filled" fillcolor=red]; } - 61 -> {62} [color=green]; + 61 -> {62}; subgraph cluster_19 { color=red - 63 [label="Enter function baz" style="filled" fillcolor=red]; - 64 [label="Exit function baz" style="filled" fillcolor=red]; + 63 [label="Enter class C" style="filled" fillcolor=red]; + 64 [label="Exit class C" style="filled" fillcolor=red]; } - 63 -> {64}; + 63 -> {64} [color=green]; subgraph cluster_20 { color=red - 65 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_21 { + 65 [label="Enter function baz" style="filled" fillcolor=red]; + 66 [label="Exit function baz" style="filled" fillcolor=red]; + } + 65 -> {66}; + + subgraph cluster_21 { + color=red + 67 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_22 { color=blue - 66 [label="Enter block"]; - subgraph cluster_22 { + 68 [label="Enter block"]; + subgraph cluster_23 { color=blue - 67 [label="Enter when"]; - subgraph cluster_23 { - color=blue - 68 [label="Enter when branch condition "]; - 69 [label="Access variable R|/x|"]; - 70 [label="Type operator: (R|/x| is R|B|)"]; - 71 [label="Exit when branch condition"]; - } + 69 [label="Enter when"]; subgraph cluster_24 { color=blue - 72 [label="Enter when branch condition "]; - 73 [label="Access variable R|/x|"]; - 74 [label="Type operator: (R|/x| is R|C|)"]; - 75 [label="Exit when branch condition"]; + 70 [label="Enter when branch condition "]; + 71 [label="Access variable R|/x|"]; + 72 [label="Type operator: (R|/x| is R|B|)"]; + 73 [label="Exit when branch condition"]; } subgraph cluster_25 { color=blue - 76 [label="Enter when branch condition else"]; + 74 [label="Enter when branch condition "]; + 75 [label="Access variable R|/x|"]; + 76 [label="Type operator: (R|/x| is R|C|)"]; 77 [label="Exit when branch condition"]; } - 78 [label="Enter when branch result"]; subgraph cluster_26 { color=blue - 79 [label="Enter block"]; - 80 [label="Jump: ^test_2 Unit"]; - 81 [label="Stub" style="filled" fillcolor=gray]; - 82 [label="Exit block" style="filled" fillcolor=gray]; + 78 [label="Enter when branch condition else"]; + 79 [label="Exit when branch condition"]; } - 83 [label="Exit when branch result" style="filled" fillcolor=gray]; - 84 [label="Enter when branch result"]; + 80 [label="Enter when branch result"]; subgraph cluster_27 { color=blue - 85 [label="Enter block"]; - 86 [label="Access variable R|/x|"]; - 87 [label="Smart cast: R|/x|"]; - 88 [label="Function call: R|/x|.R|/C.baz|()" style="filled" fillcolor=yellow]; - 89 [label="Exit block"]; + 81 [label="Enter block"]; + 82 [label="Jump: ^test_2 Unit"]; + 83 [label="Stub" style="filled" fillcolor=gray]; + 84 [label="Exit block" style="filled" fillcolor=gray]; } - 90 [label="Exit when branch result"]; - 91 [label="Enter when branch result"]; + 85 [label="Exit when branch result" style="filled" fillcolor=gray]; + 86 [label="Enter when branch result"]; subgraph cluster_28 { color=blue - 92 [label="Enter block"]; - 93 [label="Access variable R|/x|"]; - 94 [label="Smart cast: R|/x|"]; - 95 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 96 [label="Exit block"]; + 87 [label="Enter block"]; + 88 [label="Access variable R|/x|"]; + 89 [label="Smart cast: R|/x|"]; + 90 [label="Function call: R|/x|.R|/C.baz|()" style="filled" fillcolor=yellow]; + 91 [label="Exit block"]; } - 97 [label="Exit when branch result"]; - 98 [label="Exit when"]; + 92 [label="Exit when branch result"]; + 93 [label="Enter when branch result"]; + subgraph cluster_29 { + color=blue + 94 [label="Enter block"]; + 95 [label="Access variable R|/x|"]; + 96 [label="Smart cast: R|/x|"]; + 97 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 98 [label="Exit block"]; + } + 99 [label="Exit when branch result"]; + 100 [label="Exit when"]; } - 99 [label="Access variable R|/x|"]; - 100 [label="Smart cast: R|/x|"]; - 101 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 102 [label="Access variable R|/x|"]; - 103 [label="Smart cast: R|/x|"]; - 104 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 105 [label="Access variable R|/x|"]; - 106 [label="Smart cast: R|/x|"]; - 107 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 108 [label="Exit block"]; + 101 [label="Access variable R|/x|"]; + 102 [label="Smart cast: R|/x|"]; + 103 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 104 [label="Access variable R|/x|"]; + 105 [label="Smart cast: R|/x|"]; + 106 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 107 [label="Access variable R|/x|"]; + 108 [label="Smart cast: R|/x|"]; + 109 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 110 [label="Exit block"]; } - 109 [label="Exit function test_2" style="filled" fillcolor=red]; + 111 [label="Exit function test_2" style="filled" fillcolor=red]; } - 65 -> {66}; - 66 -> {67}; 67 -> {68}; 68 -> {69}; 69 -> {70}; 70 -> {71}; - 71 -> {72 91}; + 71 -> {72}; 72 -> {73}; - 73 -> {74}; + 73 -> {74 93}; 74 -> {75}; - 75 -> {76 84}; + 75 -> {76}; 76 -> {77}; - 77 -> {78}; + 77 -> {78 86}; 78 -> {79}; 79 -> {80}; - 80 -> {109}; - 80 -> {81} [style=dotted]; - 81 -> {82} [style=dotted]; + 80 -> {81}; + 81 -> {82}; + 82 -> {111}; 82 -> {83} [style=dotted]; - 83 -> {98} [style=dotted]; - 84 -> {85}; - 85 -> {86}; + 83 -> {84} [style=dotted]; + 84 -> {85} [style=dotted]; + 85 -> {100} [style=dotted]; 86 -> {87}; 87 -> {88}; 88 -> {89}; 89 -> {90}; - 90 -> {98}; + 90 -> {91}; 91 -> {92}; - 92 -> {93}; + 92 -> {100}; 93 -> {94}; 94 -> {95}; 95 -> {96}; @@ -311,84 +316,84 @@ digraph returns_kt { 106 -> {107}; 107 -> {108}; 108 -> {109}; + 109 -> {110}; + 110 -> {111}; - subgraph cluster_29 { + subgraph cluster_30 { color=red - 110 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_30 { + 112 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_31 { color=blue - 111 [label="Enter block"]; - subgraph cluster_31 { + 113 [label="Enter block"]; + subgraph cluster_32 { color=blue - 112 [label="Enter when"]; - subgraph cluster_32 { - color=blue - 113 [label="Enter when branch condition "]; - 114 [label="Access variable R|/x|"]; - 115 [label="Type operator: (R|/x| is R|B|)"]; - 116 [label="Exit when branch condition"]; - } + 114 [label="Enter when"]; subgraph cluster_33 { color=blue - 117 [label="Enter when branch condition "]; - 118 [label="Access variable R|/x|"]; - 119 [label="Type operator: (R|/x| is R|C|)"]; - 120 [label="Exit when branch condition"]; + 115 [label="Enter when branch condition "]; + 116 [label="Access variable R|/x|"]; + 117 [label="Type operator: (R|/x| is R|B|)"]; + 118 [label="Exit when branch condition"]; } - 121 [label="Synthetic else branch"]; - 122 [label="Enter when branch result"]; subgraph cluster_34 { color=blue - 123 [label="Enter block"]; - 124 [label="Access variable R|/x|"]; - 125 [label="Smart cast: R|/x|"]; - 126 [label="Function call: R|/x|.R|/C.baz|()" style="filled" fillcolor=yellow]; - 127 [label="Exit block"]; + 119 [label="Enter when branch condition "]; + 120 [label="Access variable R|/x|"]; + 121 [label="Type operator: (R|/x| is R|C|)"]; + 122 [label="Exit when branch condition"]; } - 128 [label="Exit when branch result"]; - 129 [label="Enter when branch result"]; + 123 [label="Synthetic else branch"]; + 124 [label="Enter when branch result"]; subgraph cluster_35 { color=blue - 130 [label="Enter block"]; - 131 [label="Access variable R|/x|"]; - 132 [label="Smart cast: R|/x|"]; - 133 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 134 [label="Exit block"]; + 125 [label="Enter block"]; + 126 [label="Access variable R|/x|"]; + 127 [label="Smart cast: R|/x|"]; + 128 [label="Function call: R|/x|.R|/C.baz|()" style="filled" fillcolor=yellow]; + 129 [label="Exit block"]; } - 135 [label="Exit when branch result"]; - 136 [label="Exit when"]; + 130 [label="Exit when branch result"]; + 131 [label="Enter when branch result"]; + subgraph cluster_36 { + color=blue + 132 [label="Enter block"]; + 133 [label="Access variable R|/x|"]; + 134 [label="Smart cast: R|/x|"]; + 135 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 136 [label="Exit block"]; + } + 137 [label="Exit when branch result"]; + 138 [label="Exit when"]; } - 137 [label="Access variable R|/x|"]; - 138 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; 139 [label="Access variable R|/x|"]; - 140 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 140 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; 141 [label="Access variable R|/x|"]; - 142 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 143 [label="Exit block"]; + 142 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 143 [label="Access variable R|/x|"]; + 144 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 145 [label="Exit block"]; } - 144 [label="Exit function test_3" style="filled" fillcolor=red]; + 146 [label="Exit function test_3" style="filled" fillcolor=red]; } - 110 -> {111}; - 111 -> {112}; 112 -> {113}; 113 -> {114}; 114 -> {115}; 115 -> {116}; - 116 -> {117 129}; + 116 -> {117}; 117 -> {118}; - 118 -> {119}; + 118 -> {119 131}; 119 -> {120}; - 120 -> {121 122}; - 121 -> {136}; - 122 -> {123}; - 123 -> {124}; + 120 -> {121}; + 121 -> {122}; + 122 -> {123 124}; + 123 -> {138}; 124 -> {125}; 125 -> {126}; 126 -> {127}; 127 -> {128}; - 128 -> {136}; + 128 -> {129}; 129 -> {130}; - 130 -> {131}; + 130 -> {138}; 131 -> {132}; 132 -> {133}; 133 -> {134}; @@ -402,116 +407,118 @@ digraph returns_kt { 141 -> {142}; 142 -> {143}; 143 -> {144}; - - subgraph cluster_36 { - color=red - 145 [label="Enter function runHigherOrder" style="filled" fillcolor=red]; - subgraph cluster_37 { - color=blue - 146 [label="Enter block"]; - 147 [label="Function call: R|/f|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 148 [label="Jump: ^runHigherOrder R|/f|.R|SubstitutionOverride|()"]; - 149 [label="Stub" style="filled" fillcolor=gray]; - 150 [label="Exit block" style="filled" fillcolor=gray]; - } - 151 [label="Exit function runHigherOrder" style="filled" fillcolor=red]; - } + 144 -> {145}; 145 -> {146}; - 146 -> {147}; + + subgraph cluster_37 { + color=red + 147 [label="Enter function runHigherOrder" style="filled" fillcolor=red]; + subgraph cluster_38 { + color=blue + 148 [label="Enter block"]; + 149 [label="Function call: R|/f|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 150 [label="Jump: ^runHigherOrder R|/f|.R|SubstitutionOverride|()"]; + 151 [label="Stub" style="filled" fillcolor=gray]; + 152 [label="Exit block" style="filled" fillcolor=gray]; + } + 153 [label="Exit function runHigherOrder" style="filled" fillcolor=red]; + } 147 -> {148}; - 148 -> {151}; - 148 -> {149} [style=dotted]; - 149 -> {150} [style=dotted]; + 148 -> {149}; + 149 -> {150}; + 150 -> {153}; 150 -> {151} [style=dotted]; + 151 -> {152} [style=dotted]; + 152 -> {153} [style=dotted]; - subgraph cluster_38 { + subgraph cluster_39 { color=red - 152 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_39 { + 154 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_40 { color=blue - 153 [label="Enter block"]; - 154 [label="Access variable R|kotlin/String.length|"]; - 155 [label="Jump: ^ this@R|/ext|.R|kotlin/String.length|"]; - 156 [label="Stub" style="filled" fillcolor=gray]; - 157 [label="Exit block" style="filled" fillcolor=gray]; + 155 [label="Enter block"]; + 156 [label="Access variable R|kotlin/String.length|"]; + 157 [label="Jump: ^ this@R|/ext|.R|kotlin/String.length|"]; + 158 [label="Stub" style="filled" fillcolor=gray]; + 159 [label="Exit block" style="filled" fillcolor=gray]; } - 158 [label="Exit function " style="filled" fillcolor=red]; + 160 [label="Exit function " style="filled" fillcolor=red]; } - 152 -> {153}; - 153 -> {154}; 154 -> {155}; - 155 -> {158}; - 155 -> {156} [style=dotted]; - 156 -> {157} [style=dotted]; + 155 -> {156}; + 156 -> {157}; + 157 -> {160}; 157 -> {158} [style=dotted]; + 158 -> {159} [style=dotted]; + 159 -> {160} [style=dotted]; - subgraph cluster_40 { + subgraph cluster_41 { color=red - 159 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_41 { + 161 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_42 { color=blue - 160 [label="Enter block"]; - 161 [label="Access variable R|/a|"]; - 162 [label="Type operator: (R|/a| as? R|kotlin/String|)"]; - 163 [label="Variable declaration: lval s: R|kotlin/String?|"]; - 164 [label="Access variable R|/s|"]; - 165 [label="Enter safe call"]; - 166 [label="Access variable R|/ext|"]; - 167 [label="Exit safe call"]; - 168 [label="Exit lhs of ?:"]; - 169 [label="Enter rhs of ?:"]; - 170 [label="Jump: ^test_4 Unit"]; - 171 [label="Stub" style="filled" fillcolor=gray]; - 172 [label="Lhs of ?: is not null"]; - 173 [label="Exit ?:"]; - 174 [label="Variable declaration: lval length: R|kotlin/Int|"]; - 175 [label="Postponed enter to lambda"]; - subgraph cluster_42 { + 162 [label="Enter block"]; + 163 [label="Access variable R|/a|"]; + 164 [label="Type operator: (R|/a| as? R|kotlin/String|)"]; + 165 [label="Variable declaration: lval s: R|kotlin/String?|"]; + 166 [label="Access variable R|/s|"]; + 167 [label="Enter safe call"]; + 168 [label="Access variable R|/ext|"]; + 169 [label="Exit safe call"]; + 170 [label="Exit lhs of ?:"]; + 171 [label="Enter rhs of ?:"]; + 172 [label="Jump: ^test_4 Unit"]; + 173 [label="Stub" style="filled" fillcolor=gray]; + 174 [label="Lhs of ?: is not null"]; + 175 [label="Exit ?:"]; + 176 [label="Variable declaration: lval length: R|kotlin/Int|"]; + 177 [label="Postponed enter to lambda"]; + subgraph cluster_43 { color=blue - 176 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_43 { + 178 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_44 { color=blue - 177 [label="Enter block"]; - 178 [label="Access variable R|/s|"]; - 179 [label="Smart cast: R|/s|"]; - 180 [label="Access variable R|kotlin/String.length|"]; - 181 [label="Exit block"]; + 179 [label="Enter block"]; + 180 [label="Access variable R|/s|"]; + 181 [label="Smart cast: R|/s|"]; + 182 [label="Access variable R|kotlin/String.length|"]; + 183 [label="Exit block"]; } - 182 [label="Exit function " style="filled" fillcolor=red]; + 184 [label="Exit function " style="filled" fillcolor=red]; } - 183 [label="Postponed exit from lambda"]; - 184 [label="Function call: R|/runHigherOrder|(...)" style="filled" fillcolor=yellow]; - 185 [label="Exit block"]; + 185 [label="Postponed exit from lambda"]; + 186 [label="Function call: R|/runHigherOrder|(...)" style="filled" fillcolor=yellow]; + 187 [label="Exit block"]; } - 186 [label="Exit function test_4" style="filled" fillcolor=red]; + 188 [label="Exit function test_4" style="filled" fillcolor=red]; } - 159 -> {160}; - 160 -> {161}; 161 -> {162}; 162 -> {163}; 163 -> {164}; - 164 -> {165 169}; + 164 -> {165}; 165 -> {166}; - 166 -> {167}; + 166 -> {167 171}; 167 -> {168}; - 168 -> {169 172}; + 168 -> {169}; 169 -> {170}; - 170 -> {186}; - 170 -> {171} [style=dotted]; - 171 -> {173} [style=dotted]; - 172 -> {173}; - 173 -> {174}; + 170 -> {171 174}; + 171 -> {172}; + 172 -> {188}; + 172 -> {173} [style=dotted]; + 173 -> {175} [style=dotted]; 174 -> {175}; - 175 -> {176 183 184}; - 175 -> {176} [style=dashed]; + 175 -> {176}; 176 -> {177}; - 177 -> {178}; + 177 -> {178 185 186}; + 177 -> {178} [style=dashed]; 178 -> {179}; 179 -> {180}; 180 -> {181}; 181 -> {182}; + 182 -> {183}; 183 -> {184}; - 184 -> {185}; 185 -> {186}; + 186 -> {187}; + 187 -> {188}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/simpleIf.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/simpleIf.dot index 4ed34296155..ef4622a9ef0 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/simpleIf.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/simpleIf.dot @@ -5,49 +5,54 @@ digraph simpleIf_kt { subgraph cluster_0 { color=red - 0 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_1 { + 0 [label="Enter file simpleIf.kt" style="filled" fillcolor=red]; + 1 [label="Exit file simpleIf.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 1 [label="Enter block"]; - subgraph cluster_2 { + 3 [label="Enter block"]; + subgraph cluster_3 { color=blue - 2 [label="Enter when"]; - subgraph cluster_3 { - color=blue - 3 [label="Enter when branch condition "]; - 4 [label="Access variable R|/x|"]; - 5 [label="Type operator: (R|/x| is R|kotlin/String|)"]; - 6 [label="Exit when branch condition"]; - } - 7 [label="Synthetic else branch"]; - 8 [label="Enter when branch result"]; + 4 [label="Enter when"]; subgraph cluster_4 { color=blue - 9 [label="Enter block"]; - 10 [label="Access variable R|/x|"]; - 11 [label="Smart cast: R|/x|"]; - 12 [label="Access variable R|kotlin/String.length|"]; - 13 [label="Exit block"]; + 5 [label="Enter when branch condition "]; + 6 [label="Access variable R|/x|"]; + 7 [label="Type operator: (R|/x| is R|kotlin/String|)"]; + 8 [label="Exit when branch condition"]; } - 14 [label="Exit when branch result"]; - 15 [label="Exit when"]; + 9 [label="Synthetic else branch"]; + 10 [label="Enter when branch result"]; + subgraph cluster_5 { + color=blue + 11 [label="Enter block"]; + 12 [label="Access variable R|/x|"]; + 13 [label="Smart cast: R|/x|"]; + 14 [label="Access variable R|kotlin/String.length|"]; + 15 [label="Exit block"]; + } + 16 [label="Exit when branch result"]; + 17 [label="Exit when"]; } - 16 [label="Access variable R|/x|"]; - 17 [label="Access variable #"]; - 18 [label="Exit block"]; + 18 [label="Access variable R|/x|"]; + 19 [label="Access variable #"]; + 20 [label="Exit block"]; } - 19 [label="Exit function test_1" style="filled" fillcolor=red]; + 21 [label="Exit function test_1" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; 3 -> {4}; 4 -> {5}; 5 -> {6}; - 6 -> {7 8}; - 7 -> {15}; - 8 -> {9}; - 9 -> {10}; + 6 -> {7}; + 7 -> {8}; + 8 -> {9 10}; + 9 -> {17}; 10 -> {11}; 11 -> {12}; 12 -> {13}; @@ -57,56 +62,56 @@ digraph simpleIf_kt { 16 -> {17}; 17 -> {18}; 18 -> {19}; + 19 -> {20}; + 20 -> {21}; - subgraph cluster_5 { + subgraph cluster_6 { color=red - 20 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_6 { + 22 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_7 { color=blue - 21 [label="Enter block"]; - 22 [label="Access variable R|/x|"]; - 23 [label="Type operator: (R|/x| is R|kotlin/String|)"]; - 24 [label="Variable declaration: lval b: R|kotlin/Boolean|"]; - subgraph cluster_7 { + 23 [label="Enter block"]; + 24 [label="Access variable R|/x|"]; + 25 [label="Type operator: (R|/x| is R|kotlin/String|)"]; + 26 [label="Variable declaration: lval b: R|kotlin/Boolean|"]; + subgraph cluster_8 { color=blue - 25 [label="Enter when"]; - subgraph cluster_8 { - color=blue - 26 [label="Enter when branch condition "]; - 27 [label="Access variable R|/b|"]; - 28 [label="Exit when branch condition"]; - } - 29 [label="Synthetic else branch"]; - 30 [label="Enter when branch result"]; + 27 [label="Enter when"]; subgraph cluster_9 { color=blue - 31 [label="Enter block"]; - 32 [label="Access variable R|/x|"]; - 33 [label="Smart cast: R|/x|"]; - 34 [label="Access variable R|kotlin/String.length|"]; - 35 [label="Exit block"]; + 28 [label="Enter when branch condition "]; + 29 [label="Access variable R|/b|"]; + 30 [label="Exit when branch condition"]; } - 36 [label="Exit when branch result"]; - 37 [label="Exit when"]; + 31 [label="Synthetic else branch"]; + 32 [label="Enter when branch result"]; + subgraph cluster_10 { + color=blue + 33 [label="Enter block"]; + 34 [label="Access variable R|/x|"]; + 35 [label="Smart cast: R|/x|"]; + 36 [label="Access variable R|kotlin/String.length|"]; + 37 [label="Exit block"]; + } + 38 [label="Exit when branch result"]; + 39 [label="Exit when"]; } - 38 [label="Access variable R|/x|"]; - 39 [label="Access variable #"]; - 40 [label="Exit block"]; + 40 [label="Access variable R|/x|"]; + 41 [label="Access variable #"]; + 42 [label="Exit block"]; } - 41 [label="Exit function test_2" style="filled" fillcolor=red]; + 43 [label="Exit function test_2" style="filled" fillcolor=red]; } - 20 -> {21}; - 21 -> {22}; 22 -> {23}; 23 -> {24}; 24 -> {25}; 25 -> {26}; 26 -> {27}; 27 -> {28}; - 28 -> {29 30}; - 29 -> {37}; - 30 -> {31}; - 31 -> {32}; + 28 -> {29}; + 29 -> {30}; + 30 -> {31 32}; + 31 -> {39}; 32 -> {33}; 33 -> {34}; 34 -> {35}; @@ -116,83 +121,83 @@ digraph simpleIf_kt { 38 -> {39}; 39 -> {40}; 40 -> {41}; + 41 -> {42}; + 42 -> {43}; - subgraph cluster_10 { + subgraph cluster_11 { color=red - 42 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_11 { + 44 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_12 { color=blue - 43 [label="Enter block"]; - subgraph cluster_12 { + 45 [label="Enter block"]; + subgraph cluster_13 { color=blue - 44 [label="Enter when"]; - subgraph cluster_13 { - color=blue - 45 [label="Enter when branch condition "]; - 46 [label="Access variable R|/x|"]; - 47 [label="Type operator: (R|/x| !is R|kotlin/String|)"]; - 48 [label="Exit when branch condition"]; - } + 46 [label="Enter when"]; subgraph cluster_14 { color=blue - 49 [label="Enter when branch condition "]; - 50 [label="Access variable R|/x|"]; - 51 [label="Smart cast: R|/x|"]; - 52 [label="Type operator: (R|/x| !is R|kotlin/Int|)"]; - 53 [label="Exit when branch condition"]; + 47 [label="Enter when branch condition "]; + 48 [label="Access variable R|/x|"]; + 49 [label="Type operator: (R|/x| !is R|kotlin/String|)"]; + 50 [label="Exit when branch condition"]; } subgraph cluster_15 { color=blue - 54 [label="Enter when branch condition else"]; + 51 [label="Enter when branch condition "]; + 52 [label="Access variable R|/x|"]; + 53 [label="Smart cast: R|/x|"]; + 54 [label="Type operator: (R|/x| !is R|kotlin/Int|)"]; 55 [label="Exit when branch condition"]; } - 56 [label="Enter when branch result"]; subgraph cluster_16 { color=blue - 57 [label="Enter block"]; - 58 [label="Access variable R|/x|"]; - 59 [label="Smart cast: R|/x|"]; - 60 [label="Access variable R|kotlin/String.length|"]; - 61 [label="Access variable R|/x|"]; - 62 [label="Smart cast: R|/x|"]; - 63 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 64 [label="Exit block"]; + 56 [label="Enter when branch condition else"]; + 57 [label="Exit when branch condition"]; } - 65 [label="Exit when branch result"]; - 66 [label="Enter when branch result"]; + 58 [label="Enter when branch result"]; subgraph cluster_17 { color=blue - 67 [label="Enter block"]; - 68 [label="Exit block"]; + 59 [label="Enter block"]; + 60 [label="Access variable R|/x|"]; + 61 [label="Smart cast: R|/x|"]; + 62 [label="Access variable R|kotlin/String.length|"]; + 63 [label="Access variable R|/x|"]; + 64 [label="Smart cast: R|/x|"]; + 65 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 66 [label="Exit block"]; } - 69 [label="Exit when branch result"]; - 70 [label="Enter when branch result"]; + 67 [label="Exit when branch result"]; + 68 [label="Enter when branch result"]; subgraph cluster_18 { color=blue - 71 [label="Enter block"]; - 72 [label="Exit block"]; + 69 [label="Enter block"]; + 70 [label="Exit block"]; } - 73 [label="Exit when branch result"]; - 74 [label="Exit when"]; + 71 [label="Exit when branch result"]; + 72 [label="Enter when branch result"]; + subgraph cluster_19 { + color=blue + 73 [label="Enter block"]; + 74 [label="Exit block"]; + } + 75 [label="Exit when branch result"]; + 76 [label="Exit when"]; } - 75 [label="Exit block"]; + 77 [label="Exit block"]; } - 76 [label="Exit function test_3" style="filled" fillcolor=red]; + 78 [label="Exit function test_3" style="filled" fillcolor=red]; } - 42 -> {43}; - 43 -> {44}; 44 -> {45}; 45 -> {46}; 46 -> {47}; 47 -> {48}; - 48 -> {49 70}; + 48 -> {49}; 49 -> {50}; - 50 -> {51}; + 50 -> {51 72}; 51 -> {52}; 52 -> {53}; - 53 -> {54 66}; + 53 -> {54}; 54 -> {55}; - 55 -> {56}; + 55 -> {56 68}; 56 -> {57}; 57 -> {58}; 58 -> {59}; @@ -202,16 +207,18 @@ digraph simpleIf_kt { 62 -> {63}; 63 -> {64}; 64 -> {65}; - 65 -> {74}; + 65 -> {66}; 66 -> {67}; - 67 -> {68}; + 67 -> {76}; 68 -> {69}; - 69 -> {74}; + 69 -> {70}; 70 -> {71}; - 71 -> {72}; + 71 -> {76}; 72 -> {73}; 73 -> {74}; 74 -> {75}; 75 -> {76}; + 76 -> {77}; + 77 -> {78}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/smartcastFromArgument.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/smartcastFromArgument.dot index ebbfa54eb7f..8ea4767f566 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/smartcastFromArgument.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/smartcastFromArgument.dot @@ -5,97 +5,102 @@ digraph smartcastFromArgument_kt { subgraph cluster_0 { color=red - 0 [label="Enter class A" style="filled" fillcolor=red]; - 1 [label="Exit class A" style="filled" fillcolor=red]; + 0 [label="Enter file smartcastFromArgument.kt" style="filled" fillcolor=red]; + 1 [label="Exit file smartcastFromArgument.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; subgraph cluster_1 { color=red - 2 [label="Enter function foo" style="filled" fillcolor=red]; - 3 [label="Exit function foo" style="filled" fillcolor=red]; + 2 [label="Enter class A" style="filled" fillcolor=red]; + 3 [label="Exit class A" style="filled" fillcolor=red]; } - 2 -> {3}; + 2 -> {3} [color=green]; subgraph cluster_2 { color=red - 4 [label="Enter function takeA" style="filled" fillcolor=red]; - subgraph cluster_3 { - color=blue - 5 [label="Enter block"]; - 6 [label="Const: Boolean(true)"]; - 7 [label="Jump: ^takeA Boolean(true)"]; - 8 [label="Stub" style="filled" fillcolor=gray]; - 9 [label="Exit block" style="filled" fillcolor=gray]; - } - 10 [label="Exit function takeA" style="filled" fillcolor=red]; + 4 [label="Enter function foo" style="filled" fillcolor=red]; + 5 [label="Exit function foo" style="filled" fillcolor=red]; } 4 -> {5}; - 5 -> {6}; - 6 -> {7}; - 7 -> {10}; - 7 -> {8} [style=dotted]; - 8 -> {9} [style=dotted]; - 9 -> {10} [style=dotted]; - subgraph cluster_4 { + subgraph cluster_3 { color=red - 11 [label="Enter function test" style="filled" fillcolor=red]; - subgraph cluster_5 { + 6 [label="Enter function takeA" style="filled" fillcolor=red]; + subgraph cluster_4 { color=blue - 12 [label="Enter block"]; - subgraph cluster_6 { + 7 [label="Enter block"]; + 8 [label="Const: Boolean(true)"]; + 9 [label="Jump: ^takeA Boolean(true)"]; + 10 [label="Stub" style="filled" fillcolor=gray]; + 11 [label="Exit block" style="filled" fillcolor=gray]; + } + 12 [label="Exit function takeA" style="filled" fillcolor=red]; + } + 6 -> {7}; + 7 -> {8}; + 8 -> {9}; + 9 -> {12}; + 9 -> {10} [style=dotted]; + 10 -> {11} [style=dotted]; + 11 -> {12} [style=dotted]; + + subgraph cluster_5 { + color=red + 13 [label="Enter function test" style="filled" fillcolor=red]; + subgraph cluster_6 { + color=blue + 14 [label="Enter block"]; + subgraph cluster_7 { color=blue - 13 [label="Enter when"]; - subgraph cluster_7 { - color=blue - 14 [label="Enter when branch condition "]; - 15 [label="Access variable R|/a|"]; - 16 [label="Type operator: (R|/a| as? R|A|)"]; - 17 [label="Exit lhs of ?:"]; - 18 [label="Enter rhs of ?:"]; - 19 [label="Jump: ^test Unit"]; - 20 [label="Stub" style="filled" fillcolor=gray]; - 21 [label="Lhs of ?: is not null"]; - 22 [label="Exit ?:"]; - 23 [label="Function call: R|/takeA|(...)" style="filled" fillcolor=yellow]; - 24 [label="Exit when branch condition"]; - } - 25 [label="Synthetic else branch"]; - 26 [label="Enter when branch result"]; + 15 [label="Enter when"]; subgraph cluster_8 { color=blue - 27 [label="Enter block"]; - 28 [label="Access variable R|/a|"]; - 29 [label="Smart cast: R|/a|"]; - 30 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 31 [label="Exit block"]; + 16 [label="Enter when branch condition "]; + 17 [label="Access variable R|/a|"]; + 18 [label="Type operator: (R|/a| as? R|A|)"]; + 19 [label="Exit lhs of ?:"]; + 20 [label="Enter rhs of ?:"]; + 21 [label="Jump: ^test Unit"]; + 22 [label="Stub" style="filled" fillcolor=gray]; + 23 [label="Lhs of ?: is not null"]; + 24 [label="Exit ?:"]; + 25 [label="Function call: R|/takeA|(...)" style="filled" fillcolor=yellow]; + 26 [label="Exit when branch condition"]; } - 32 [label="Exit when branch result"]; - 33 [label="Exit when"]; + 27 [label="Synthetic else branch"]; + 28 [label="Enter when branch result"]; + subgraph cluster_9 { + color=blue + 29 [label="Enter block"]; + 30 [label="Access variable R|/a|"]; + 31 [label="Smart cast: R|/a|"]; + 32 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 33 [label="Exit block"]; + } + 34 [label="Exit when branch result"]; + 35 [label="Exit when"]; } - 34 [label="Exit block"]; + 36 [label="Exit block"]; } - 35 [label="Exit function test" style="filled" fillcolor=red]; + 37 [label="Exit function test" style="filled" fillcolor=red]; } - 11 -> {12}; - 12 -> {13}; 13 -> {14}; 14 -> {15}; 15 -> {16}; 16 -> {17}; - 17 -> {18 21}; + 17 -> {18}; 18 -> {19}; - 19 -> {35}; - 19 -> {20} [style=dotted]; - 20 -> {22} [style=dotted]; - 21 -> {22}; - 22 -> {23}; + 19 -> {20 23}; + 20 -> {21}; + 21 -> {37}; + 21 -> {22} [style=dotted]; + 22 -> {24} [style=dotted]; 23 -> {24}; - 24 -> {25 26}; - 25 -> {33}; - 26 -> {27}; - 27 -> {28}; + 24 -> {25}; + 25 -> {26}; + 26 -> {27 28}; + 27 -> {35}; 28 -> {29}; 29 -> {30}; 30 -> {31}; @@ -103,5 +108,7 @@ digraph smartcastFromArgument_kt { 32 -> {33}; 33 -> {34}; 34 -> {35}; + 35 -> {36}; + 36 -> {37}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/when.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/when.dot index 5d045fcd045..b35f8b87188 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/when.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/when.dot @@ -5,182 +5,187 @@ digraph when_kt { subgraph cluster_0 { color=red - 0 [label="Enter class A" style="filled" fillcolor=red]; - 1 [label="Exit class A" style="filled" fillcolor=red]; + 0 [label="Enter file when.kt" style="filled" fillcolor=red]; + 1 [label="Exit file when.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; subgraph cluster_1 { color=red - 2 [label="Enter function foo" style="filled" fillcolor=red]; - 3 [label="Exit function foo" style="filled" fillcolor=red]; + 2 [label="Enter class A" style="filled" fillcolor=red]; + 3 [label="Exit class A" style="filled" fillcolor=red]; } - 2 -> {3}; + 2 -> {3} [color=green]; subgraph cluster_2 { color=red - 4 [label="Enter class B" style="filled" fillcolor=red]; - 5 [label="Exit class B" style="filled" fillcolor=red]; + 4 [label="Enter function foo" style="filled" fillcolor=red]; + 5 [label="Exit function foo" style="filled" fillcolor=red]; } - 4 -> {5} [color=green]; + 4 -> {5}; subgraph cluster_3 { color=red - 6 [label="Enter function bar" style="filled" fillcolor=red]; - 7 [label="Exit function bar" style="filled" fillcolor=red]; + 6 [label="Enter class B" style="filled" fillcolor=red]; + 7 [label="Exit class B" style="filled" fillcolor=red]; } - 6 -> {7}; + 6 -> {7} [color=green]; subgraph cluster_4 { color=red - 8 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_5 { + 8 [label="Enter function bar" style="filled" fillcolor=red]; + 9 [label="Exit function bar" style="filled" fillcolor=red]; + } + 8 -> {9}; + + subgraph cluster_5 { + color=red + 10 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_6 { color=blue - 9 [label="Enter block"]; - subgraph cluster_6 { + 11 [label="Enter block"]; + subgraph cluster_7 { color=blue - 10 [label="Enter when"]; - subgraph cluster_7 { - color=blue - 11 [label="Enter when branch condition "]; - 12 [label="Access variable R|/x|"]; - 13 [label="Type operator: (R|/x| is R|A|)"]; - 14 [label="Exit when branch condition"]; - } + 12 [label="Enter when"]; subgraph cluster_8 { color=blue - 15 [label="Enter when branch condition "]; - 16 [label="Access variable R|/x|"]; - 17 [label="Type operator: (R|/x| is R|B|)"]; - 18 [label="Exit when branch condition"]; + 13 [label="Enter when branch condition "]; + 14 [label="Access variable R|/x|"]; + 15 [label="Type operator: (R|/x| is R|A|)"]; + 16 [label="Exit when branch condition"]; } - 19 [label="Synthetic else branch"]; - 20 [label="Enter when branch result"]; subgraph cluster_9 { color=blue - 21 [label="Enter block"]; - 22 [label="Access variable R|/x|"]; - 23 [label="Smart cast: R|/x|"]; - 24 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 25 [label="Exit block"]; + 17 [label="Enter when branch condition "]; + 18 [label="Access variable R|/x|"]; + 19 [label="Type operator: (R|/x| is R|B|)"]; + 20 [label="Exit when branch condition"]; } - 26 [label="Exit when branch result"]; - 27 [label="Enter when branch result"]; + 21 [label="Synthetic else branch"]; + 22 [label="Enter when branch result"]; subgraph cluster_10 { color=blue - 28 [label="Enter block"]; - 29 [label="Access variable R|/x|"]; - 30 [label="Smart cast: R|/x|"]; - 31 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 32 [label="Exit block"]; + 23 [label="Enter block"]; + 24 [label="Access variable R|/x|"]; + 25 [label="Smart cast: R|/x|"]; + 26 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 27 [label="Exit block"]; } - 33 [label="Exit when branch result"]; - 34 [label="Exit when"]; - } - subgraph cluster_11 { - color=blue - 35 [label="Enter when"]; - subgraph cluster_12 { + 28 [label="Exit when branch result"]; + 29 [label="Enter when branch result"]; + subgraph cluster_11 { color=blue - 36 [label="Enter when branch condition "]; - 37 [label="Access variable R|/x|"]; - 38 [label="Type operator: (R|/x| !is R|A|)"]; - 39 [label="Exit when branch condition"]; + 30 [label="Enter block"]; + 31 [label="Access variable R|/x|"]; + 32 [label="Smart cast: R|/x|"]; + 33 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 34 [label="Exit block"]; } + 35 [label="Exit when branch result"]; + 36 [label="Exit when"]; + } + subgraph cluster_12 { + color=blue + 37 [label="Enter when"]; subgraph cluster_13 { color=blue - 40 [label="Enter when branch condition "]; - 41 [label="Access variable R|/x|"]; - 42 [label="Smart cast: R|/x|"]; - 43 [label="Type operator: (R|/x| !is R|B|)"]; - 44 [label="Exit when branch condition"]; + 38 [label="Enter when branch condition "]; + 39 [label="Access variable R|/x|"]; + 40 [label="Type operator: (R|/x| !is R|A|)"]; + 41 [label="Exit when branch condition"]; } subgraph cluster_14 { color=blue - 45 [label="Enter when branch condition "]; - 46 [label="Access variable R|/x|"]; - 47 [label="Smart cast: R|/x|"]; - 48 [label="Type operator: (R|/x| is R|kotlin/Int|)"]; - 49 [label="Exit when branch condition"]; + 42 [label="Enter when branch condition "]; + 43 [label="Access variable R|/x|"]; + 44 [label="Smart cast: R|/x|"]; + 45 [label="Type operator: (R|/x| !is R|B|)"]; + 46 [label="Exit when branch condition"]; } subgraph cluster_15 { color=blue - 50 [label="Enter when branch condition else"]; + 47 [label="Enter when branch condition "]; + 48 [label="Access variable R|/x|"]; + 49 [label="Smart cast: R|/x|"]; + 50 [label="Type operator: (R|/x| is R|kotlin/Int|)"]; 51 [label="Exit when branch condition"]; } - 52 [label="Enter when branch result"]; subgraph cluster_16 { color=blue - 53 [label="Enter block"]; - 54 [label="Access variable R|/x|"]; - 55 [label="Smart cast: R|/x|"]; - 56 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 57 [label="Access variable R|/x|"]; - 58 [label="Smart cast: R|/x|"]; - 59 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 60 [label="Exit block"]; + 52 [label="Enter when branch condition else"]; + 53 [label="Exit when branch condition"]; } - 61 [label="Exit when branch result"]; - 62 [label="Enter when branch result"]; + 54 [label="Enter when branch result"]; subgraph cluster_17 { color=blue - 63 [label="Enter block"]; - 64 [label="Access variable R|/x|"]; - 65 [label="Smart cast: R|/x|"]; - 66 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 67 [label="Access variable R|/x|"]; - 68 [label="Smart cast: R|/x|"]; - 69 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 70 [label="Access variable R|/x|"]; - 71 [label="Smart cast: R|/x|"]; - 72 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 73 [label="Exit block"]; + 55 [label="Enter block"]; + 56 [label="Access variable R|/x|"]; + 57 [label="Smart cast: R|/x|"]; + 58 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 59 [label="Access variable R|/x|"]; + 60 [label="Smart cast: R|/x|"]; + 61 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 62 [label="Exit block"]; } - 74 [label="Exit when branch result"]; - 75 [label="Enter when branch result"]; + 63 [label="Exit when branch result"]; + 64 [label="Enter when branch result"]; subgraph cluster_18 { color=blue - 76 [label="Enter block"]; - 77 [label="Access variable R|/x|"]; - 78 [label="Smart cast: R|/x|"]; - 79 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 80 [label="Exit block"]; + 65 [label="Enter block"]; + 66 [label="Access variable R|/x|"]; + 67 [label="Smart cast: R|/x|"]; + 68 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 69 [label="Access variable R|/x|"]; + 70 [label="Smart cast: R|/x|"]; + 71 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 72 [label="Access variable R|/x|"]; + 73 [label="Smart cast: R|/x|"]; + 74 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 75 [label="Exit block"]; } - 81 [label="Exit when branch result"]; - 82 [label="Enter when branch result"]; + 76 [label="Exit when branch result"]; + 77 [label="Enter when branch result"]; subgraph cluster_19 { color=blue - 83 [label="Enter block"]; - 84 [label="Exit block"]; + 78 [label="Enter block"]; + 79 [label="Access variable R|/x|"]; + 80 [label="Smart cast: R|/x|"]; + 81 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 82 [label="Exit block"]; } - 85 [label="Exit when branch result"]; - 86 [label="Exit when"]; + 83 [label="Exit when branch result"]; + 84 [label="Enter when branch result"]; + subgraph cluster_20 { + color=blue + 85 [label="Enter block"]; + 86 [label="Exit block"]; + } + 87 [label="Exit when branch result"]; + 88 [label="Exit when"]; } - 87 [label="Exit block"]; + 89 [label="Exit block"]; } - 88 [label="Exit function test_1" style="filled" fillcolor=red]; + 90 [label="Exit function test_1" style="filled" fillcolor=red]; } - 8 -> {9}; - 9 -> {10}; 10 -> {11}; 11 -> {12}; 12 -> {13}; 13 -> {14}; - 14 -> {15 27}; + 14 -> {15}; 15 -> {16}; - 16 -> {17}; + 16 -> {17 29}; 17 -> {18}; - 18 -> {19 20}; - 19 -> {34}; - 20 -> {21}; - 21 -> {22}; + 18 -> {19}; + 19 -> {20}; + 20 -> {21 22}; + 21 -> {36}; 22 -> {23}; 23 -> {24}; 24 -> {25}; 25 -> {26}; - 26 -> {34}; + 26 -> {27}; 27 -> {28}; - 28 -> {29}; + 28 -> {36}; 29 -> {30}; 30 -> {31}; 31 -> {32}; @@ -191,19 +196,19 @@ digraph when_kt { 36 -> {37}; 37 -> {38}; 38 -> {39}; - 39 -> {40 82}; + 39 -> {40}; 40 -> {41}; - 41 -> {42}; + 41 -> {42 84}; 42 -> {43}; 43 -> {44}; - 44 -> {45 75}; + 44 -> {45}; 45 -> {46}; - 46 -> {47}; + 46 -> {47 77}; 47 -> {48}; 48 -> {49}; - 49 -> {50 62}; + 49 -> {50}; 50 -> {51}; - 51 -> {52}; + 51 -> {52 64}; 52 -> {53}; 53 -> {54}; 54 -> {55}; @@ -213,9 +218,9 @@ digraph when_kt { 58 -> {59}; 59 -> {60}; 60 -> {61}; - 61 -> {86}; + 61 -> {62}; 62 -> {63}; - 63 -> {64}; + 63 -> {88}; 64 -> {65}; 65 -> {66}; 66 -> {67}; @@ -226,172 +231,172 @@ digraph when_kt { 71 -> {72}; 72 -> {73}; 73 -> {74}; - 74 -> {86}; + 74 -> {75}; 75 -> {76}; - 76 -> {77}; + 76 -> {88}; 77 -> {78}; 78 -> {79}; 79 -> {80}; 80 -> {81}; - 81 -> {86}; + 81 -> {82}; 82 -> {83}; - 83 -> {84}; + 83 -> {88}; 84 -> {85}; 85 -> {86}; 86 -> {87}; 87 -> {88}; + 88 -> {89}; + 89 -> {90}; - subgraph cluster_20 { + subgraph cluster_21 { color=red - 89 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_21 { + 91 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_22 { color=blue - 90 [label="Enter block"]; - subgraph cluster_22 { + 92 [label="Enter block"]; + subgraph cluster_23 { color=blue - 91 [label="Enter when"]; - 92 [label="Access variable R|/x|"]; - subgraph cluster_23 { - color=blue - 93 [label="Enter when branch condition "]; - 94 [label="Exit $subj"]; - 95 [label="Type operator: ($subj$ is R|A|)"]; - 96 [label="Exit when branch condition"]; - } + 93 [label="Enter when"]; + 94 [label="Access variable R|/x|"]; subgraph cluster_24 { color=blue - 97 [label="Enter when branch condition "]; - 98 [label="Exit $subj"]; - 99 [label="Type operator: ($subj$ is R|B|)"]; - 100 [label="Exit when branch condition"]; + 95 [label="Enter when branch condition "]; + 96 [label="Exit $subj"]; + 97 [label="Type operator: ($subj$ is R|A|)"]; + 98 [label="Exit when branch condition"]; } - 101 [label="Synthetic else branch"]; - 102 [label="Enter when branch result"]; subgraph cluster_25 { color=blue - 103 [label="Enter block"]; - 104 [label="Access variable R|/x|"]; - 105 [label="Smart cast: R|/x|"]; - 106 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 107 [label="Exit block"]; + 99 [label="Enter when branch condition "]; + 100 [label="Exit $subj"]; + 101 [label="Type operator: ($subj$ is R|B|)"]; + 102 [label="Exit when branch condition"]; } - 108 [label="Exit when branch result"]; - 109 [label="Enter when branch result"]; + 103 [label="Synthetic else branch"]; + 104 [label="Enter when branch result"]; subgraph cluster_26 { color=blue - 110 [label="Enter block"]; - 111 [label="Access variable R|/x|"]; - 112 [label="Smart cast: R|/x|"]; - 113 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 114 [label="Exit block"]; + 105 [label="Enter block"]; + 106 [label="Access variable R|/x|"]; + 107 [label="Smart cast: R|/x|"]; + 108 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 109 [label="Exit block"]; } - 115 [label="Exit when branch result"]; - 116 [label="Exit when"]; - } - subgraph cluster_27 { - color=blue - 117 [label="Enter when"]; - 118 [label="Access variable R|/x|"]; - subgraph cluster_28 { + 110 [label="Exit when branch result"]; + 111 [label="Enter when branch result"]; + subgraph cluster_27 { color=blue - 119 [label="Enter when branch condition "]; - 120 [label="Exit $subj"]; - 121 [label="Type operator: ($subj$ !is R|A|)"]; - 122 [label="Exit when branch condition"]; + 112 [label="Enter block"]; + 113 [label="Access variable R|/x|"]; + 114 [label="Smart cast: R|/x|"]; + 115 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 116 [label="Exit block"]; } + 117 [label="Exit when branch result"]; + 118 [label="Exit when"]; + } + subgraph cluster_28 { + color=blue + 119 [label="Enter when"]; + 120 [label="Access variable R|/x|"]; subgraph cluster_29 { color=blue - 123 [label="Enter when branch condition "]; - 124 [label="Exit $subj"]; - 125 [label="Type operator: ($subj$ !is R|B|)"]; - 126 [label="Exit when branch condition"]; + 121 [label="Enter when branch condition "]; + 122 [label="Exit $subj"]; + 123 [label="Type operator: ($subj$ !is R|A|)"]; + 124 [label="Exit when branch condition"]; } subgraph cluster_30 { color=blue - 127 [label="Enter when branch condition "]; - 128 [label="Exit $subj"]; - 129 [label="Type operator: ($subj$ is R|kotlin/Int|)"]; - 130 [label="Exit when branch condition"]; + 125 [label="Enter when branch condition "]; + 126 [label="Exit $subj"]; + 127 [label="Type operator: ($subj$ !is R|B|)"]; + 128 [label="Exit when branch condition"]; } subgraph cluster_31 { color=blue - 131 [label="Enter when branch condition else"]; + 129 [label="Enter when branch condition "]; + 130 [label="Exit $subj"]; + 131 [label="Type operator: ($subj$ is R|kotlin/Int|)"]; 132 [label="Exit when branch condition"]; } - 133 [label="Enter when branch result"]; subgraph cluster_32 { color=blue - 134 [label="Enter block"]; - 135 [label="Access variable R|/x|"]; - 136 [label="Smart cast: R|/x|"]; - 137 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 138 [label="Access variable R|/x|"]; - 139 [label="Smart cast: R|/x|"]; - 140 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 141 [label="Exit block"]; + 133 [label="Enter when branch condition else"]; + 134 [label="Exit when branch condition"]; } - 142 [label="Exit when branch result"]; - 143 [label="Enter when branch result"]; + 135 [label="Enter when branch result"]; subgraph cluster_33 { color=blue - 144 [label="Enter block"]; - 145 [label="Access variable R|/x|"]; - 146 [label="Smart cast: R|/x|"]; - 147 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 148 [label="Access variable R|/x|"]; - 149 [label="Smart cast: R|/x|"]; - 150 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 151 [label="Access variable R|/x|"]; - 152 [label="Smart cast: R|/x|"]; - 153 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 154 [label="Exit block"]; + 136 [label="Enter block"]; + 137 [label="Access variable R|/x|"]; + 138 [label="Smart cast: R|/x|"]; + 139 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 140 [label="Access variable R|/x|"]; + 141 [label="Smart cast: R|/x|"]; + 142 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 143 [label="Exit block"]; } - 155 [label="Exit when branch result"]; - 156 [label="Enter when branch result"]; + 144 [label="Exit when branch result"]; + 145 [label="Enter when branch result"]; subgraph cluster_34 { color=blue - 157 [label="Enter block"]; - 158 [label="Access variable R|/x|"]; - 159 [label="Smart cast: R|/x|"]; - 160 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 161 [label="Exit block"]; + 146 [label="Enter block"]; + 147 [label="Access variable R|/x|"]; + 148 [label="Smart cast: R|/x|"]; + 149 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 150 [label="Access variable R|/x|"]; + 151 [label="Smart cast: R|/x|"]; + 152 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 153 [label="Access variable R|/x|"]; + 154 [label="Smart cast: R|/x|"]; + 155 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 156 [label="Exit block"]; } - 162 [label="Exit when branch result"]; - 163 [label="Enter when branch result"]; + 157 [label="Exit when branch result"]; + 158 [label="Enter when branch result"]; subgraph cluster_35 { color=blue - 164 [label="Enter block"]; - 165 [label="Exit block"]; + 159 [label="Enter block"]; + 160 [label="Access variable R|/x|"]; + 161 [label="Smart cast: R|/x|"]; + 162 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 163 [label="Exit block"]; } - 166 [label="Exit when branch result"]; - 167 [label="Exit when"]; + 164 [label="Exit when branch result"]; + 165 [label="Enter when branch result"]; + subgraph cluster_36 { + color=blue + 166 [label="Enter block"]; + 167 [label="Exit block"]; + } + 168 [label="Exit when branch result"]; + 169 [label="Exit when"]; } - 168 [label="Exit block"]; + 170 [label="Exit block"]; } - 169 [label="Exit function test_2" style="filled" fillcolor=red]; + 171 [label="Exit function test_2" style="filled" fillcolor=red]; } - 89 -> {90}; - 90 -> {91}; 91 -> {92}; 92 -> {93}; 93 -> {94}; 94 -> {95}; 95 -> {96}; - 96 -> {97 109}; + 96 -> {97}; 97 -> {98}; - 98 -> {99}; + 98 -> {99 111}; 99 -> {100}; - 100 -> {101 102}; - 101 -> {116}; - 102 -> {103}; - 103 -> {104}; + 100 -> {101}; + 101 -> {102}; + 102 -> {103 104}; + 103 -> {118}; 104 -> {105}; 105 -> {106}; 106 -> {107}; 107 -> {108}; - 108 -> {116}; + 108 -> {109}; 109 -> {110}; - 110 -> {111}; + 110 -> {118}; 111 -> {112}; 112 -> {113}; 113 -> {114}; @@ -403,17 +408,17 @@ digraph when_kt { 119 -> {120}; 120 -> {121}; 121 -> {122}; - 122 -> {123 163}; + 122 -> {123}; 123 -> {124}; - 124 -> {125}; + 124 -> {125 165}; 125 -> {126}; - 126 -> {127 156}; + 126 -> {127}; 127 -> {128}; - 128 -> {129}; + 128 -> {129 158}; 129 -> {130}; - 130 -> {131 143}; + 130 -> {131}; 131 -> {132}; - 132 -> {133}; + 132 -> {133 145}; 133 -> {134}; 134 -> {135}; 135 -> {136}; @@ -423,9 +428,9 @@ digraph when_kt { 139 -> {140}; 140 -> {141}; 141 -> {142}; - 142 -> {167}; + 142 -> {143}; 143 -> {144}; - 144 -> {145}; + 144 -> {169}; 145 -> {146}; 146 -> {147}; 147 -> {148}; @@ -436,192 +441,192 @@ digraph when_kt { 152 -> {153}; 153 -> {154}; 154 -> {155}; - 155 -> {167}; + 155 -> {156}; 156 -> {157}; - 157 -> {158}; + 157 -> {169}; 158 -> {159}; 159 -> {160}; 160 -> {161}; 161 -> {162}; - 162 -> {167}; + 162 -> {163}; 163 -> {164}; - 164 -> {165}; + 164 -> {169}; 165 -> {166}; 166 -> {167}; 167 -> {168}; 168 -> {169}; + 169 -> {170}; + 170 -> {171}; - subgraph cluster_36 { + subgraph cluster_37 { color=red - 170 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_37 { + 172 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_38 { color=blue - 171 [label="Enter block"]; - subgraph cluster_38 { + 173 [label="Enter block"]; + subgraph cluster_39 { color=blue - 172 [label="Enter when"]; - 173 [label="Access variable R|/x|"]; - 174 [label="Variable declaration: lval y: R|kotlin/Any?|"]; - subgraph cluster_39 { - color=blue - 175 [label="Enter when branch condition "]; - 176 [label="Exit $subj"]; - 177 [label="Type operator: ($subj$ is R|A|)"]; - 178 [label="Exit when branch condition"]; - } + 174 [label="Enter when"]; + 175 [label="Access variable R|/x|"]; + 176 [label="Variable declaration: lval y: R|kotlin/Any?|"]; subgraph cluster_40 { color=blue - 179 [label="Enter when branch condition "]; - 180 [label="Exit $subj"]; - 181 [label="Type operator: ($subj$ is R|B|)"]; - 182 [label="Exit when branch condition"]; + 177 [label="Enter when branch condition "]; + 178 [label="Exit $subj"]; + 179 [label="Type operator: ($subj$ is R|A|)"]; + 180 [label="Exit when branch condition"]; } - 183 [label="Synthetic else branch"]; - 184 [label="Enter when branch result"]; subgraph cluster_41 { color=blue - 185 [label="Enter block"]; - 186 [label="Access variable R|/x|"]; - 187 [label="Smart cast: R|/x|"]; - 188 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 189 [label="Access variable R|/y|"]; - 190 [label="Smart cast: R|/y|"]; - 191 [label="Function call: R|/y|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 192 [label="Exit block"]; + 181 [label="Enter when branch condition "]; + 182 [label="Exit $subj"]; + 183 [label="Type operator: ($subj$ is R|B|)"]; + 184 [label="Exit when branch condition"]; } - 193 [label="Exit when branch result"]; - 194 [label="Enter when branch result"]; + 185 [label="Synthetic else branch"]; + 186 [label="Enter when branch result"]; subgraph cluster_42 { color=blue - 195 [label="Enter block"]; - 196 [label="Access variable R|/x|"]; - 197 [label="Smart cast: R|/x|"]; - 198 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 199 [label="Access variable R|/y|"]; - 200 [label="Smart cast: R|/y|"]; - 201 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 202 [label="Exit block"]; + 187 [label="Enter block"]; + 188 [label="Access variable R|/x|"]; + 189 [label="Smart cast: R|/x|"]; + 190 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 191 [label="Access variable R|/y|"]; + 192 [label="Smart cast: R|/y|"]; + 193 [label="Function call: R|/y|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 194 [label="Exit block"]; } - 203 [label="Exit when branch result"]; - 204 [label="Exit when"]; - } - subgraph cluster_43 { - color=blue - 205 [label="Enter when"]; - 206 [label="Access variable R|/x|"]; - 207 [label="Variable declaration: lval y: R|kotlin/Any?|"]; - subgraph cluster_44 { + 195 [label="Exit when branch result"]; + 196 [label="Enter when branch result"]; + subgraph cluster_43 { color=blue - 208 [label="Enter when branch condition "]; - 209 [label="Exit $subj"]; - 210 [label="Type operator: ($subj$ !is R|A|)"]; - 211 [label="Exit when branch condition"]; + 197 [label="Enter block"]; + 198 [label="Access variable R|/x|"]; + 199 [label="Smart cast: R|/x|"]; + 200 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 201 [label="Access variable R|/y|"]; + 202 [label="Smart cast: R|/y|"]; + 203 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 204 [label="Exit block"]; } + 205 [label="Exit when branch result"]; + 206 [label="Exit when"]; + } + subgraph cluster_44 { + color=blue + 207 [label="Enter when"]; + 208 [label="Access variable R|/x|"]; + 209 [label="Variable declaration: lval y: R|kotlin/Any?|"]; subgraph cluster_45 { color=blue - 212 [label="Enter when branch condition "]; - 213 [label="Exit $subj"]; - 214 [label="Type operator: ($subj$ !is R|B|)"]; - 215 [label="Exit when branch condition"]; + 210 [label="Enter when branch condition "]; + 211 [label="Exit $subj"]; + 212 [label="Type operator: ($subj$ !is R|A|)"]; + 213 [label="Exit when branch condition"]; } subgraph cluster_46 { color=blue - 216 [label="Enter when branch condition "]; - 217 [label="Exit $subj"]; - 218 [label="Type operator: ($subj$ is R|kotlin/Int|)"]; - 219 [label="Exit when branch condition"]; + 214 [label="Enter when branch condition "]; + 215 [label="Exit $subj"]; + 216 [label="Type operator: ($subj$ !is R|B|)"]; + 217 [label="Exit when branch condition"]; } subgraph cluster_47 { color=blue - 220 [label="Enter when branch condition else"]; + 218 [label="Enter when branch condition "]; + 219 [label="Exit $subj"]; + 220 [label="Type operator: ($subj$ is R|kotlin/Int|)"]; 221 [label="Exit when branch condition"]; } - 222 [label="Enter when branch result"]; subgraph cluster_48 { color=blue - 223 [label="Enter block"]; - 224 [label="Access variable R|/x|"]; - 225 [label="Smart cast: R|/x|"]; - 226 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 227 [label="Access variable R|/x|"]; - 228 [label="Smart cast: R|/x|"]; - 229 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 230 [label="Access variable R|/y|"]; - 231 [label="Smart cast: R|/y|"]; - 232 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 233 [label="Access variable R|/y|"]; - 234 [label="Smart cast: R|/y|"]; - 235 [label="Function call: R|/y|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 236 [label="Exit block"]; + 222 [label="Enter when branch condition else"]; + 223 [label="Exit when branch condition"]; } - 237 [label="Exit when branch result"]; - 238 [label="Enter when branch result"]; + 224 [label="Enter when branch result"]; subgraph cluster_49 { color=blue - 239 [label="Enter block"]; - 240 [label="Access variable R|/x|"]; - 241 [label="Smart cast: R|/x|"]; - 242 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 243 [label="Access variable R|/x|"]; - 244 [label="Smart cast: R|/x|"]; - 245 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 246 [label="Access variable R|/x|"]; - 247 [label="Smart cast: R|/x|"]; - 248 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 249 [label="Access variable R|/y|"]; - 250 [label="Smart cast: R|/y|"]; - 251 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 252 [label="Access variable R|/y|"]; - 253 [label="Smart cast: R|/y|"]; - 254 [label="Function call: R|/y|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 255 [label="Access variable R|/y|"]; - 256 [label="Smart cast: R|/y|"]; - 257 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 258 [label="Exit block"]; + 225 [label="Enter block"]; + 226 [label="Access variable R|/x|"]; + 227 [label="Smart cast: R|/x|"]; + 228 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 229 [label="Access variable R|/x|"]; + 230 [label="Smart cast: R|/x|"]; + 231 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 232 [label="Access variable R|/y|"]; + 233 [label="Smart cast: R|/y|"]; + 234 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 235 [label="Access variable R|/y|"]; + 236 [label="Smart cast: R|/y|"]; + 237 [label="Function call: R|/y|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 238 [label="Exit block"]; } - 259 [label="Exit when branch result"]; - 260 [label="Enter when branch result"]; + 239 [label="Exit when branch result"]; + 240 [label="Enter when branch result"]; subgraph cluster_50 { color=blue - 261 [label="Enter block"]; - 262 [label="Access variable R|/x|"]; - 263 [label="Smart cast: R|/x|"]; - 264 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 265 [label="Access variable R|/y|"]; - 266 [label="Smart cast: R|/y|"]; - 267 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 268 [label="Exit block"]; + 241 [label="Enter block"]; + 242 [label="Access variable R|/x|"]; + 243 [label="Smart cast: R|/x|"]; + 244 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 245 [label="Access variable R|/x|"]; + 246 [label="Smart cast: R|/x|"]; + 247 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 248 [label="Access variable R|/x|"]; + 249 [label="Smart cast: R|/x|"]; + 250 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 251 [label="Access variable R|/y|"]; + 252 [label="Smart cast: R|/y|"]; + 253 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 254 [label="Access variable R|/y|"]; + 255 [label="Smart cast: R|/y|"]; + 256 [label="Function call: R|/y|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 257 [label="Access variable R|/y|"]; + 258 [label="Smart cast: R|/y|"]; + 259 [label="Function call: R|/y|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 260 [label="Exit block"]; } - 269 [label="Exit when branch result"]; - 270 [label="Enter when branch result"]; + 261 [label="Exit when branch result"]; + 262 [label="Enter when branch result"]; subgraph cluster_51 { color=blue - 271 [label="Enter block"]; - 272 [label="Exit block"]; + 263 [label="Enter block"]; + 264 [label="Access variable R|/x|"]; + 265 [label="Smart cast: R|/x|"]; + 266 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 267 [label="Access variable R|/y|"]; + 268 [label="Smart cast: R|/y|"]; + 269 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 270 [label="Exit block"]; } - 273 [label="Exit when branch result"]; - 274 [label="Exit when"]; + 271 [label="Exit when branch result"]; + 272 [label="Enter when branch result"]; + subgraph cluster_52 { + color=blue + 273 [label="Enter block"]; + 274 [label="Exit block"]; + } + 275 [label="Exit when branch result"]; + 276 [label="Exit when"]; } - 275 [label="Exit block"]; + 277 [label="Exit block"]; } - 276 [label="Exit function test_3" style="filled" fillcolor=red]; + 278 [label="Exit function test_3" style="filled" fillcolor=red]; } - 170 -> {171}; - 171 -> {172}; 172 -> {173}; 173 -> {174}; 174 -> {175}; 175 -> {176}; 176 -> {177}; 177 -> {178}; - 178 -> {179 194}; + 178 -> {179}; 179 -> {180}; - 180 -> {181}; + 180 -> {181 196}; 181 -> {182}; - 182 -> {183 184}; - 183 -> {204}; - 184 -> {185}; - 185 -> {186}; + 182 -> {183}; + 183 -> {184}; + 184 -> {185 186}; + 185 -> {206}; 186 -> {187}; 187 -> {188}; 188 -> {189}; @@ -629,9 +634,9 @@ digraph when_kt { 190 -> {191}; 191 -> {192}; 192 -> {193}; - 193 -> {204}; + 193 -> {194}; 194 -> {195}; - 195 -> {196}; + 195 -> {206}; 196 -> {197}; 197 -> {198}; 198 -> {199}; @@ -647,17 +652,17 @@ digraph when_kt { 208 -> {209}; 209 -> {210}; 210 -> {211}; - 211 -> {212 270}; + 211 -> {212}; 212 -> {213}; - 213 -> {214}; + 213 -> {214 272}; 214 -> {215}; - 215 -> {216 260}; + 215 -> {216}; 216 -> {217}; - 217 -> {218}; + 217 -> {218 262}; 218 -> {219}; - 219 -> {220 238}; + 219 -> {220}; 220 -> {221}; - 221 -> {222}; + 221 -> {222 240}; 222 -> {223}; 223 -> {224}; 224 -> {225}; @@ -673,9 +678,9 @@ digraph when_kt { 234 -> {235}; 235 -> {236}; 236 -> {237}; - 237 -> {274}; + 237 -> {238}; 238 -> {239}; - 239 -> {240}; + 239 -> {276}; 240 -> {241}; 241 -> {242}; 242 -> {243}; @@ -695,9 +700,9 @@ digraph when_kt { 256 -> {257}; 257 -> {258}; 258 -> {259}; - 259 -> {274}; + 259 -> {260}; 260 -> {261}; - 261 -> {262}; + 261 -> {276}; 262 -> {263}; 263 -> {264}; 264 -> {265}; @@ -705,55 +710,55 @@ digraph when_kt { 266 -> {267}; 267 -> {268}; 268 -> {269}; - 269 -> {274}; + 269 -> {270}; 270 -> {271}; - 271 -> {272}; + 271 -> {276}; 272 -> {273}; 273 -> {274}; 274 -> {275}; 275 -> {276}; + 276 -> {277}; + 277 -> {278}; - subgraph cluster_52 { + subgraph cluster_53 { color=red - 277 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_53 { + 279 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_54 { color=blue - 278 [label="Enter block"]; - subgraph cluster_54 { + 280 [label="Enter block"]; + subgraph cluster_55 { color=blue - 279 [label="Enter when"]; - 280 [label="Access variable R|/x|"]; - 281 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; - subgraph cluster_55 { - color=blue - 282 [label="Enter when branch condition "]; - 283 [label="Exit $subj"]; - 284 [label="Const: Int(1)"]; - 285 [label="Equality operator =="]; - 286 [label="Exit when branch condition"]; - } - 287 [label="Synthetic else branch"]; - 288 [label="Enter when branch result"]; + 281 [label="Enter when"]; + 282 [label="Access variable R|/x|"]; + 283 [label="Type operator: (R|/x| as R|kotlin/Int|)"]; subgraph cluster_56 { color=blue - 289 [label="Enter block"]; - 290 [label="Access variable R|/x|"]; - 291 [label="Smart cast: R|/x|"]; - 292 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 293 [label="Exit block"]; + 284 [label="Enter when branch condition "]; + 285 [label="Exit $subj"]; + 286 [label="Const: Int(1)"]; + 287 [label="Equality operator =="]; + 288 [label="Exit when branch condition"]; } - 294 [label="Exit when branch result"]; - 295 [label="Exit when"]; + 289 [label="Synthetic else branch"]; + 290 [label="Enter when branch result"]; + subgraph cluster_57 { + color=blue + 291 [label="Enter block"]; + 292 [label="Access variable R|/x|"]; + 293 [label="Smart cast: R|/x|"]; + 294 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 295 [label="Exit block"]; + } + 296 [label="Exit when branch result"]; + 297 [label="Exit when"]; } - 296 [label="Access variable R|/x|"]; - 297 [label="Smart cast: R|/x|"]; - 298 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 299 [label="Exit block"]; + 298 [label="Access variable R|/x|"]; + 299 [label="Smart cast: R|/x|"]; + 300 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 301 [label="Exit block"]; } - 300 [label="Exit function test_4" style="filled" fillcolor=red]; + 302 [label="Exit function test_4" style="filled" fillcolor=red]; } - 277 -> {278}; - 278 -> {279}; 279 -> {280}; 280 -> {281}; 281 -> {282}; @@ -761,10 +766,10 @@ digraph when_kt { 283 -> {284}; 284 -> {285}; 285 -> {286}; - 286 -> {287 288}; - 287 -> {295}; - 288 -> {289}; - 289 -> {290}; + 286 -> {287}; + 287 -> {288}; + 288 -> {289 290}; + 289 -> {297}; 290 -> {291}; 291 -> {292}; 292 -> {293}; @@ -775,5 +780,7 @@ digraph when_kt { 297 -> {298}; 298 -> {299}; 299 -> {300}; + 300 -> {301}; + 301 -> {302}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/whenSubjectExpression.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/whenSubjectExpression.dot index 5c161bf49ea..fbbdb7cd184 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/whenSubjectExpression.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/whenSubjectExpression.dot @@ -5,198 +5,205 @@ digraph whenSubjectExpression_kt { subgraph cluster_0 { color=red - 0 [label="Enter function whenWithSubjectExpression" style="filled" fillcolor=red]; - subgraph cluster_1 { + 0 [label="Enter file whenSubjectExpression.kt" style="filled" fillcolor=red]; + 1 [label="Exit file whenSubjectExpression.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function whenWithSubjectExpression" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 1 [label="Enter block"]; - subgraph cluster_2 { + 3 [label="Enter block"]; + subgraph cluster_3 { color=blue - 2 [label="Enter when"]; - 3 [label="Access variable R|/x|"]; - subgraph cluster_3 { - color=blue - 4 [label="Enter when branch condition "]; - 5 [label="Exit $subj"]; - 6 [label="Type operator: ($subj$ !is R|kotlin/Double|)"]; - 7 [label="Exit when branch condition"]; - } + 4 [label="Enter when"]; + 5 [label="Access variable R|/x|"]; subgraph cluster_4 { color=blue - 8 [label="Enter when branch condition "]; - 9 [label="Exit $subj"]; - 10 [label="Const: Double(0.0)"]; - 11 [label="Equality operator =="]; - 12 [label="Exit when branch condition"]; + 6 [label="Enter when branch condition "]; + 7 [label="Exit $subj"]; + 8 [label="Type operator: ($subj$ !is R|kotlin/Double|)"]; + 9 [label="Exit when branch condition"]; } subgraph cluster_5 { color=blue - 13 [label="Enter when branch condition else"]; + 10 [label="Enter when branch condition "]; + 11 [label="Exit $subj"]; + 12 [label="Const: Double(0.0)"]; + 13 [label="Equality operator =="]; 14 [label="Exit when branch condition"]; } - 15 [label="Enter when branch result"]; subgraph cluster_6 { color=blue - 16 [label="Enter block"]; - 17 [label="Access variable R|/x|"]; - 18 [label="Smart cast: R|/x|"]; - 19 [label="Function call: R|/x|.R|kotlin/Double.toInt|()" style="filled" fillcolor=yellow]; - 20 [label="Exit block"]; + 15 [label="Enter when branch condition else"]; + 16 [label="Exit when branch condition"]; } - 21 [label="Exit when branch result"]; - 22 [label="Enter when branch result"]; + 17 [label="Enter when branch result"]; subgraph cluster_7 { color=blue - 23 [label="Enter block"]; - 24 [label="Const: Int(0)"]; - 25 [label="Exit block"]; + 18 [label="Enter block"]; + 19 [label="Access variable R|/x|"]; + 20 [label="Smart cast: R|/x|"]; + 21 [label="Function call: R|/x|.R|kotlin/Double.toInt|()" style="filled" fillcolor=yellow]; + 22 [label="Exit block"]; } - 26 [label="Exit when branch result"]; - 27 [label="Enter when branch result"]; + 23 [label="Exit when branch result"]; + 24 [label="Enter when branch result"]; subgraph cluster_8 { color=blue - 28 [label="Enter block"]; - 29 [label="Const: Int(-1)"]; - 30 [label="Exit block"]; + 25 [label="Enter block"]; + 26 [label="Const: Int(0)"]; + 27 [label="Exit block"]; } - 31 [label="Exit when branch result"]; - 32 [label="Exit when"]; + 28 [label="Exit when branch result"]; + 29 [label="Enter when branch result"]; + subgraph cluster_9 { + color=blue + 30 [label="Enter block"]; + 31 [label="Const: Int(-1)"]; + 32 [label="Exit block"]; + } + 33 [label="Exit when branch result"]; + 34 [label="Exit when"]; } - 33 [label="Exit block"]; + 35 [label="Exit block"]; } - 34 [label="Exit function whenWithSubjectExpression" style="filled" fillcolor=red]; + 36 [label="Exit function whenWithSubjectExpression" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; 3 -> {4}; 4 -> {5}; 5 -> {6}; 6 -> {7}; - 7 -> {8 27}; + 7 -> {8}; 8 -> {9}; - 9 -> {10}; + 9 -> {10 29}; 10 -> {11}; 11 -> {12}; - 12 -> {13 22}; + 12 -> {13}; 13 -> {14}; - 14 -> {15}; + 14 -> {15 24}; 15 -> {16}; 16 -> {17}; 17 -> {18}; 18 -> {19}; 19 -> {20}; 20 -> {21}; - 21 -> {32}; + 21 -> {22}; 22 -> {23}; - 23 -> {24}; + 23 -> {34}; 24 -> {25}; 25 -> {26}; - 26 -> {32}; + 26 -> {27}; 27 -> {28}; - 28 -> {29}; + 28 -> {34}; 29 -> {30}; 30 -> {31}; 31 -> {32}; 32 -> {33}; 33 -> {34}; + 34 -> {35}; + 35 -> {36}; - subgraph cluster_9 { + subgraph cluster_10 { color=red - 35 [label="Enter function whenWithSubjectVariable" style="filled" fillcolor=red]; - subgraph cluster_10 { + 37 [label="Enter function whenWithSubjectVariable" style="filled" fillcolor=red]; + subgraph cluster_11 { color=blue - 36 [label="Enter block"]; - subgraph cluster_11 { + 38 [label="Enter block"]; + subgraph cluster_12 { color=blue - 37 [label="Enter when"]; - 38 [label="Access variable R|/x|"]; - 39 [label="Variable declaration: lval y: R|kotlin/Any|"]; - subgraph cluster_12 { - color=blue - 40 [label="Enter when branch condition "]; - 41 [label="Exit $subj"]; - 42 [label="Type operator: ($subj$ !is R|kotlin/Double|)"]; - 43 [label="Exit when branch condition"]; - } + 39 [label="Enter when"]; + 40 [label="Access variable R|/x|"]; + 41 [label="Variable declaration: lval y: R|kotlin/Any|"]; subgraph cluster_13 { color=blue - 44 [label="Enter when branch condition "]; - 45 [label="Exit $subj"]; - 46 [label="Const: Double(0.0)"]; - 47 [label="Equality operator =="]; - 48 [label="Exit when branch condition"]; + 42 [label="Enter when branch condition "]; + 43 [label="Exit $subj"]; + 44 [label="Type operator: ($subj$ !is R|kotlin/Double|)"]; + 45 [label="Exit when branch condition"]; } subgraph cluster_14 { color=blue - 49 [label="Enter when branch condition else"]; + 46 [label="Enter when branch condition "]; + 47 [label="Exit $subj"]; + 48 [label="Const: Double(0.0)"]; + 49 [label="Equality operator =="]; 50 [label="Exit when branch condition"]; } - 51 [label="Enter when branch result"]; subgraph cluster_15 { color=blue - 52 [label="Enter block"]; - 53 [label="Access variable R|/y|"]; - 54 [label="Smart cast: R|/y|"]; - 55 [label="Function call: R|/y|.R|kotlin/Double.toInt|()" style="filled" fillcolor=yellow]; - 56 [label="Exit block"]; + 51 [label="Enter when branch condition else"]; + 52 [label="Exit when branch condition"]; } - 57 [label="Exit when branch result"]; - 58 [label="Enter when branch result"]; + 53 [label="Enter when branch result"]; subgraph cluster_16 { color=blue - 59 [label="Enter block"]; - 60 [label="Const: Int(0)"]; - 61 [label="Exit block"]; + 54 [label="Enter block"]; + 55 [label="Access variable R|/y|"]; + 56 [label="Smart cast: R|/y|"]; + 57 [label="Function call: R|/y|.R|kotlin/Double.toInt|()" style="filled" fillcolor=yellow]; + 58 [label="Exit block"]; } - 62 [label="Exit when branch result"]; - 63 [label="Enter when branch result"]; + 59 [label="Exit when branch result"]; + 60 [label="Enter when branch result"]; subgraph cluster_17 { color=blue - 64 [label="Enter block"]; - 65 [label="Const: Int(-1)"]; - 66 [label="Exit block"]; + 61 [label="Enter block"]; + 62 [label="Const: Int(0)"]; + 63 [label="Exit block"]; } - 67 [label="Exit when branch result"]; - 68 [label="Exit when"]; + 64 [label="Exit when branch result"]; + 65 [label="Enter when branch result"]; + subgraph cluster_18 { + color=blue + 66 [label="Enter block"]; + 67 [label="Const: Int(-1)"]; + 68 [label="Exit block"]; + } + 69 [label="Exit when branch result"]; + 70 [label="Exit when"]; } - 69 [label="Exit block"]; + 71 [label="Exit block"]; } - 70 [label="Exit function whenWithSubjectVariable" style="filled" fillcolor=red]; + 72 [label="Exit function whenWithSubjectVariable" style="filled" fillcolor=red]; } - 35 -> {36}; - 36 -> {37}; 37 -> {38}; 38 -> {39}; 39 -> {40}; 40 -> {41}; 41 -> {42}; 42 -> {43}; - 43 -> {44 63}; + 43 -> {44}; 44 -> {45}; - 45 -> {46}; + 45 -> {46 65}; 46 -> {47}; 47 -> {48}; - 48 -> {49 58}; + 48 -> {49}; 49 -> {50}; - 50 -> {51}; + 50 -> {51 60}; 51 -> {52}; 52 -> {53}; 53 -> {54}; 54 -> {55}; 55 -> {56}; 56 -> {57}; - 57 -> {68}; + 57 -> {58}; 58 -> {59}; - 59 -> {60}; + 59 -> {70}; 60 -> {61}; 61 -> {62}; - 62 -> {68}; + 62 -> {63}; 63 -> {64}; - 64 -> {65}; + 64 -> {70}; 65 -> {66}; 66 -> {67}; 67 -> {68}; 68 -> {69}; 69 -> {70}; + 70 -> {71}; + 71 -> {72}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/equalsAndIdentity.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/equalsAndIdentity.dot index ef7e82df050..75934a7e7d4 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/equalsAndIdentity.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/equalsAndIdentity.dot @@ -5,91 +5,96 @@ digraph equalsAndIdentity_kt { subgraph cluster_0 { color=red - 0 [label="Enter class A" style="filled" fillcolor=red]; - 1 [label="Exit class A" style="filled" fillcolor=red]; + 0 [label="Enter file equalsAndIdentity.kt" style="filled" fillcolor=red]; + 1 [label="Exit file equalsAndIdentity.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; subgraph cluster_1 { color=red - 2 [label="Enter function foo" style="filled" fillcolor=red]; - 3 [label="Exit function foo" style="filled" fillcolor=red]; + 2 [label="Enter class A" style="filled" fillcolor=red]; + 3 [label="Exit class A" style="filled" fillcolor=red]; } - 2 -> {3}; + 2 -> {3} [color=green]; subgraph cluster_2 { color=red - 4 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_3 { - color=blue - 5 [label="Enter block"]; - subgraph cluster_4 { - color=blue - 6 [label="Enter when"]; - subgraph cluster_5 { - color=blue - 7 [label="Enter when branch condition "]; - 8 [label="Access variable R|/x|"]; - 9 [label="Access variable R|/y|"]; - 10 [label="Equality operator =="]; - 11 [label="Exit when branch condition"]; - } - 12 [label="Synthetic else branch"]; - 13 [label="Enter when branch result"]; - subgraph cluster_6 { - color=blue - 14 [label="Enter block"]; - 15 [label="Access variable R|/x|"]; - 16 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 17 [label="Access variable R|/y|"]; - 18 [label="Smart cast: R|/y|"]; - 19 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 20 [label="Exit block"]; - } - 21 [label="Exit when branch result"]; - 22 [label="Exit when"]; - } - subgraph cluster_7 { - color=blue - 23 [label="Enter when"]; - subgraph cluster_8 { - color=blue - 24 [label="Enter when branch condition "]; - 25 [label="Access variable R|/x|"]; - 26 [label="Access variable R|/y|"]; - 27 [label="Equality operator ==="]; - 28 [label="Exit when branch condition"]; - } - 29 [label="Synthetic else branch"]; - 30 [label="Enter when branch result"]; - subgraph cluster_9 { - color=blue - 31 [label="Enter block"]; - 32 [label="Access variable R|/x|"]; - 33 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 34 [label="Access variable R|/y|"]; - 35 [label="Smart cast: R|/y|"]; - 36 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 37 [label="Exit block"]; - } - 38 [label="Exit when branch result"]; - 39 [label="Exit when"]; - } - 40 [label="Exit block"]; - } - 41 [label="Exit function test_1" style="filled" fillcolor=red]; + 4 [label="Enter function foo" style="filled" fillcolor=red]; + 5 [label="Exit function foo" style="filled" fillcolor=red]; } 4 -> {5}; - 5 -> {6}; + + subgraph cluster_3 { + color=red + 6 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_4 { + color=blue + 7 [label="Enter block"]; + subgraph cluster_5 { + color=blue + 8 [label="Enter when"]; + subgraph cluster_6 { + color=blue + 9 [label="Enter when branch condition "]; + 10 [label="Access variable R|/x|"]; + 11 [label="Access variable R|/y|"]; + 12 [label="Equality operator =="]; + 13 [label="Exit when branch condition"]; + } + 14 [label="Synthetic else branch"]; + 15 [label="Enter when branch result"]; + subgraph cluster_7 { + color=blue + 16 [label="Enter block"]; + 17 [label="Access variable R|/x|"]; + 18 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 19 [label="Access variable R|/y|"]; + 20 [label="Smart cast: R|/y|"]; + 21 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 22 [label="Exit block"]; + } + 23 [label="Exit when branch result"]; + 24 [label="Exit when"]; + } + subgraph cluster_8 { + color=blue + 25 [label="Enter when"]; + subgraph cluster_9 { + color=blue + 26 [label="Enter when branch condition "]; + 27 [label="Access variable R|/x|"]; + 28 [label="Access variable R|/y|"]; + 29 [label="Equality operator ==="]; + 30 [label="Exit when branch condition"]; + } + 31 [label="Synthetic else branch"]; + 32 [label="Enter when branch result"]; + subgraph cluster_10 { + color=blue + 33 [label="Enter block"]; + 34 [label="Access variable R|/x|"]; + 35 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 36 [label="Access variable R|/y|"]; + 37 [label="Smart cast: R|/y|"]; + 38 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 39 [label="Exit block"]; + } + 40 [label="Exit when branch result"]; + 41 [label="Exit when"]; + } + 42 [label="Exit block"]; + } + 43 [label="Exit function test_1" style="filled" fillcolor=red]; + } 6 -> {7}; 7 -> {8}; 8 -> {9}; 9 -> {10}; 10 -> {11}; - 11 -> {12 13}; - 12 -> {22}; - 13 -> {14}; - 14 -> {15}; + 11 -> {12}; + 12 -> {13}; + 13 -> {14 15}; + 14 -> {24}; 15 -> {16}; 16 -> {17}; 17 -> {18}; @@ -103,10 +108,10 @@ digraph equalsAndIdentity_kt { 25 -> {26}; 26 -> {27}; 27 -> {28}; - 28 -> {29 30}; - 29 -> {39}; - 30 -> {31}; - 31 -> {32}; + 28 -> {29}; + 29 -> {30}; + 30 -> {31 32}; + 31 -> {41}; 32 -> {33}; 33 -> {34}; 34 -> {35}; @@ -116,78 +121,78 @@ digraph equalsAndIdentity_kt { 38 -> {39}; 39 -> {40}; 40 -> {41}; + 41 -> {42}; + 42 -> {43}; - subgraph cluster_10 { + subgraph cluster_11 { color=red - 42 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_11 { + 44 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_12 { color=blue - 43 [label="Enter block"]; - subgraph cluster_12 { + 45 [label="Enter block"]; + subgraph cluster_13 { color=blue - 44 [label="Enter when"]; - subgraph cluster_13 { - color=blue - 45 [label="Enter when branch condition "]; - 46 [label="Access variable R|/x|"]; - 47 [label="Access variable R|/y|"]; - 48 [label="Equality operator =="]; - 49 [label="Exit when branch condition"]; - } - 50 [label="Synthetic else branch"]; - 51 [label="Enter when branch result"]; + 46 [label="Enter when"]; subgraph cluster_14 { color=blue - 52 [label="Enter block"]; - 53 [label="Access variable R|/x|"]; - 54 [label="Function call: R|/x|.R|/A.foo#|()" style="filled" fillcolor=yellow]; - 55 [label="Access variable R|/y|"]; - 56 [label="Function call: R|/y|.R|/A.foo#|()" style="filled" fillcolor=yellow]; - 57 [label="Exit block"]; + 47 [label="Enter when branch condition "]; + 48 [label="Access variable R|/x|"]; + 49 [label="Access variable R|/y|"]; + 50 [label="Equality operator =="]; + 51 [label="Exit when branch condition"]; } - 58 [label="Exit when branch result"]; - 59 [label="Exit when"]; - } - subgraph cluster_15 { - color=blue - 60 [label="Enter when"]; - subgraph cluster_16 { + 52 [label="Synthetic else branch"]; + 53 [label="Enter when branch result"]; + subgraph cluster_15 { color=blue - 61 [label="Enter when branch condition "]; - 62 [label="Access variable R|/x|"]; - 63 [label="Access variable R|/y|"]; - 64 [label="Equality operator ==="]; - 65 [label="Exit when branch condition"]; + 54 [label="Enter block"]; + 55 [label="Access variable R|/x|"]; + 56 [label="Function call: R|/x|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + 57 [label="Access variable R|/y|"]; + 58 [label="Function call: R|/y|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + 59 [label="Exit block"]; } - 66 [label="Synthetic else branch"]; - 67 [label="Enter when branch result"]; + 60 [label="Exit when branch result"]; + 61 [label="Exit when"]; + } + subgraph cluster_16 { + color=blue + 62 [label="Enter when"]; subgraph cluster_17 { color=blue - 68 [label="Enter block"]; - 69 [label="Access variable R|/x|"]; - 70 [label="Function call: R|/x|.R|/A.foo#|()" style="filled" fillcolor=yellow]; - 71 [label="Access variable R|/y|"]; - 72 [label="Function call: R|/y|.R|/A.foo#|()" style="filled" fillcolor=yellow]; - 73 [label="Exit block"]; + 63 [label="Enter when branch condition "]; + 64 [label="Access variable R|/x|"]; + 65 [label="Access variable R|/y|"]; + 66 [label="Equality operator ==="]; + 67 [label="Exit when branch condition"]; } - 74 [label="Exit when branch result"]; - 75 [label="Exit when"]; + 68 [label="Synthetic else branch"]; + 69 [label="Enter when branch result"]; + subgraph cluster_18 { + color=blue + 70 [label="Enter block"]; + 71 [label="Access variable R|/x|"]; + 72 [label="Function call: R|/x|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + 73 [label="Access variable R|/y|"]; + 74 [label="Function call: R|/y|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + 75 [label="Exit block"]; + } + 76 [label="Exit when branch result"]; + 77 [label="Exit when"]; } - 76 [label="Exit block"]; + 78 [label="Exit block"]; } - 77 [label="Exit function test_2" style="filled" fillcolor=red]; + 79 [label="Exit function test_2" style="filled" fillcolor=red]; } - 42 -> {43}; - 43 -> {44}; 44 -> {45}; 45 -> {46}; 46 -> {47}; 47 -> {48}; 48 -> {49}; - 49 -> {50 51}; - 50 -> {59}; - 51 -> {52}; - 52 -> {53}; + 49 -> {50}; + 50 -> {51}; + 51 -> {52 53}; + 52 -> {61}; 53 -> {54}; 54 -> {55}; 55 -> {56}; @@ -200,10 +205,10 @@ digraph equalsAndIdentity_kt { 62 -> {63}; 63 -> {64}; 64 -> {65}; - 65 -> {66 67}; - 66 -> {75}; - 67 -> {68}; - 68 -> {69}; + 65 -> {66}; + 66 -> {67}; + 67 -> {68 69}; + 68 -> {77}; 69 -> {70}; 70 -> {71}; 71 -> {72}; @@ -212,123 +217,123 @@ digraph equalsAndIdentity_kt { 74 -> {75}; 75 -> {76}; 76 -> {77}; + 77 -> {78}; + 78 -> {79}; - subgraph cluster_18 { + subgraph cluster_19 { color=red - 78 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_19 { + 80 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_20 { color=blue - 79 [label="Enter block"]; - subgraph cluster_20 { + 81 [label="Enter block"]; + subgraph cluster_21 { color=blue - 80 [label="Enter when"]; - subgraph cluster_21 { - color=blue - 81 [label="Enter when branch condition "]; - 82 [label="Access variable R|/y|"]; - 83 [label="Const: Null(null)"]; - 84 [label="Equality operator =="]; - 85 [label="Exit when branch condition"]; - } - 86 [label="Synthetic else branch"]; - 87 [label="Enter when branch result"]; + 82 [label="Enter when"]; subgraph cluster_22 { color=blue - 88 [label="Enter block"]; - 89 [label="Jump: ^test_3 Unit"]; - 90 [label="Stub" style="filled" fillcolor=gray]; - 91 [label="Exit block" style="filled" fillcolor=gray]; + 83 [label="Enter when branch condition "]; + 84 [label="Access variable R|/y|"]; + 85 [label="Const: Null(null)"]; + 86 [label="Equality operator =="]; + 87 [label="Exit when branch condition"]; } - 92 [label="Exit when branch result" style="filled" fillcolor=gray]; - 93 [label="Exit when"]; - } - subgraph cluster_23 { - color=blue - 94 [label="Enter when"]; - subgraph cluster_24 { + 88 [label="Synthetic else branch"]; + 89 [label="Enter when branch result"]; + subgraph cluster_23 { color=blue - 95 [label="Enter when branch condition "]; - 96 [label="Access variable R|/x|"]; - 97 [label="Access variable R|/y|"]; - 98 [label="Smart cast: R|/y|"]; - 99 [label="Equality operator =="]; - 100 [label="Exit when branch condition"]; + 90 [label="Enter block"]; + 91 [label="Jump: ^test_3 Unit"]; + 92 [label="Stub" style="filled" fillcolor=gray]; + 93 [label="Exit block" style="filled" fillcolor=gray]; } - 101 [label="Synthetic else branch"]; - 102 [label="Enter when branch result"]; + 94 [label="Exit when branch result" style="filled" fillcolor=gray]; + 95 [label="Exit when"]; + } + subgraph cluster_24 { + color=blue + 96 [label="Enter when"]; subgraph cluster_25 { color=blue - 103 [label="Enter block"]; - 104 [label="Access variable R|/x|"]; - 105 [label="Smart cast: R|/x|"]; - 106 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 107 [label="Access variable R|/y|"]; - 108 [label="Smart cast: R|/y|"]; - 109 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 110 [label="Exit block"]; + 97 [label="Enter when branch condition "]; + 98 [label="Access variable R|/x|"]; + 99 [label="Access variable R|/y|"]; + 100 [label="Smart cast: R|/y|"]; + 101 [label="Equality operator =="]; + 102 [label="Exit when branch condition"]; } - 111 [label="Exit when branch result"]; - 112 [label="Exit when"]; - } - subgraph cluster_26 { - color=blue - 113 [label="Enter when"]; - subgraph cluster_27 { + 103 [label="Synthetic else branch"]; + 104 [label="Enter when branch result"]; + subgraph cluster_26 { color=blue - 114 [label="Enter when branch condition "]; - 115 [label="Access variable R|/x|"]; - 116 [label="Access variable R|/y|"]; - 117 [label="Smart cast: R|/y|"]; - 118 [label="Equality operator ==="]; - 119 [label="Exit when branch condition"]; + 105 [label="Enter block"]; + 106 [label="Access variable R|/x|"]; + 107 [label="Smart cast: R|/x|"]; + 108 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 109 [label="Access variable R|/y|"]; + 110 [label="Smart cast: R|/y|"]; + 111 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 112 [label="Exit block"]; } - 120 [label="Synthetic else branch"]; - 121 [label="Enter when branch result"]; + 113 [label="Exit when branch result"]; + 114 [label="Exit when"]; + } + subgraph cluster_27 { + color=blue + 115 [label="Enter when"]; subgraph cluster_28 { color=blue - 122 [label="Enter block"]; - 123 [label="Access variable R|/x|"]; - 124 [label="Smart cast: R|/x|"]; - 125 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 126 [label="Access variable R|/y|"]; - 127 [label="Smart cast: R|/y|"]; - 128 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 129 [label="Exit block"]; + 116 [label="Enter when branch condition "]; + 117 [label="Access variable R|/x|"]; + 118 [label="Access variable R|/y|"]; + 119 [label="Smart cast: R|/y|"]; + 120 [label="Equality operator ==="]; + 121 [label="Exit when branch condition"]; } - 130 [label="Exit when branch result"]; - 131 [label="Exit when"]; + 122 [label="Synthetic else branch"]; + 123 [label="Enter when branch result"]; + subgraph cluster_29 { + color=blue + 124 [label="Enter block"]; + 125 [label="Access variable R|/x|"]; + 126 [label="Smart cast: R|/x|"]; + 127 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 128 [label="Access variable R|/y|"]; + 129 [label="Smart cast: R|/y|"]; + 130 [label="Function call: R|/y|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 131 [label="Exit block"]; + } + 132 [label="Exit when branch result"]; + 133 [label="Exit when"]; } - 132 [label="Exit block"]; + 134 [label="Exit block"]; } - 133 [label="Exit function test_3" style="filled" fillcolor=red]; + 135 [label="Exit function test_3" style="filled" fillcolor=red]; } - 78 -> {79}; - 79 -> {80}; 80 -> {81}; 81 -> {82}; 82 -> {83}; 83 -> {84}; 84 -> {85}; - 85 -> {86 87}; - 86 -> {93}; - 87 -> {88}; - 88 -> {89}; - 89 -> {133}; - 89 -> {90} [style=dotted]; - 90 -> {91} [style=dotted]; + 85 -> {86}; + 86 -> {87}; + 87 -> {88 89}; + 88 -> {95}; + 89 -> {90}; + 90 -> {91}; + 91 -> {135}; 91 -> {92} [style=dotted]; 92 -> {93} [style=dotted]; - 93 -> {94}; - 94 -> {95}; + 93 -> {94} [style=dotted]; + 94 -> {95} [style=dotted]; 95 -> {96}; 96 -> {97}; 97 -> {98}; 98 -> {99}; 99 -> {100}; - 100 -> {101 102}; - 101 -> {112}; - 102 -> {103}; - 103 -> {104}; + 100 -> {101}; + 101 -> {102}; + 102 -> {103 104}; + 103 -> {114}; 104 -> {105}; 105 -> {106}; 106 -> {107}; @@ -344,10 +349,10 @@ digraph equalsAndIdentity_kt { 116 -> {117}; 117 -> {118}; 118 -> {119}; - 119 -> {120 121}; - 120 -> {131}; - 121 -> {122}; - 122 -> {123}; + 119 -> {120}; + 120 -> {121}; + 121 -> {122 123}; + 122 -> {133}; 123 -> {124}; 124 -> {125}; 125 -> {126}; @@ -358,5 +363,7 @@ digraph equalsAndIdentity_kt { 130 -> {131}; 131 -> {132}; 132 -> {133}; + 133 -> {134}; + 134 -> {135}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/incorrectSmartcastToNothing.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/incorrectSmartcastToNothing.dot index dbb309c6dac..31412cf3f3b 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/incorrectSmartcastToNothing.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/incorrectSmartcastToNothing.dot @@ -5,147 +5,156 @@ digraph incorrectSmartcastToNothing_kt { subgraph cluster_0 { color=red - 0 [label="Enter property" style="filled" fillcolor=red]; - 1 [label="Const: String(foo)"]; - 2 [label="Function call: R|java/io/File.File|(...)" style="filled" fillcolor=yellow]; - 3 [label="Exit property" style="filled" fillcolor=red]; + 0 [label="Enter file incorrectSmartcastToNothing.kt" style="filled" fillcolor=red]; + subgraph cluster_1 { + color=blue + 1 [label="Enter property" style="filled" fillcolor=red]; + 2 [label="Const: String(foo)"]; + 3 [label="Function call: R|java/io/File.File|(...)" style="filled" fillcolor=yellow]; + 4 [label="Exit property" style="filled" fillcolor=red]; + } + 5 [label="Exit file incorrectSmartcastToNothing.kt" style="filled" fillcolor=red]; } - 0 -> {1}; + 0 -> {1} [color=green]; + 0 -> {5} [style=dotted]; + 0 -> {1} [style=dashed]; 1 -> {2}; 2 -> {3}; + 3 -> {4}; + 4 -> {5} [color=green]; - subgraph cluster_1 { + subgraph cluster_2 { color=red - 4 [label="Enter function test" style="filled" fillcolor=red]; - subgraph cluster_2 { + 6 [label="Enter function test" style="filled" fillcolor=red]; + subgraph cluster_3 { color=blue - 5 [label="Enter block"]; - subgraph cluster_3 { + 7 [label="Enter block"]; + subgraph cluster_4 { color=blue - 6 [label="Enter when"]; - subgraph cluster_4 { - color=blue - 7 [label="Enter when branch condition "]; - 8 [label="Access variable R|/cacheExtSetting|"]; - 9 [label="Const: Null(null)"]; - 10 [label="Equality operator =="]; - 11 [label="Exit when branch condition"]; - } + 8 [label="Enter when"]; subgraph cluster_5 { color=blue - 12 [label="Enter when branch condition "]; - 13 [label="Access variable R|/cacheExtSetting|"]; - 14 [label="Smart cast: R|/cacheExtSetting|"]; - 15 [label="Function call: R|/cacheExtSetting|.R|kotlin/text/isBlank|()" style="filled" fillcolor=yellow]; - 16 [label="Exit when branch condition"]; + 9 [label="Enter when branch condition "]; + 10 [label="Access variable R|/cacheExtSetting|"]; + 11 [label="Const: Null(null)"]; + 12 [label="Equality operator =="]; + 13 [label="Exit when branch condition"]; } subgraph cluster_6 { color=blue - 17 [label="Enter when branch condition else"]; + 14 [label="Enter when branch condition "]; + 15 [label="Access variable R|/cacheExtSetting|"]; + 16 [label="Smart cast: R|/cacheExtSetting|"]; + 17 [label="Function call: R|/cacheExtSetting|.R|kotlin/text/isBlank|()" style="filled" fillcolor=yellow]; 18 [label="Exit when branch condition"]; } - 19 [label="Enter when branch result"]; subgraph cluster_7 { color=blue - 20 [label="Enter block"]; - 21 [label="Access variable R|/cacheExtSetting|"]; - 22 [label="Smart cast: R|/cacheExtSetting|"]; - 23 [label="Function call: R|java/io/File.File|(...)" style="filled" fillcolor=yellow]; - 24 [label="Exit block"]; + 19 [label="Enter when branch condition else"]; + 20 [label="Exit when branch condition"]; } - 25 [label="Exit when branch result"]; - 26 [label="Enter when branch result"]; + 21 [label="Enter when branch result"]; subgraph cluster_8 { color=blue - 27 [label="Enter block"]; - 28 [label="Const: Null(null)"]; - 29 [label="Exit block"]; + 22 [label="Enter block"]; + 23 [label="Access variable R|/cacheExtSetting|"]; + 24 [label="Smart cast: R|/cacheExtSetting|"]; + 25 [label="Function call: R|java/io/File.File|(...)" style="filled" fillcolor=yellow]; + 26 [label="Exit block"]; } - 30 [label="Exit when branch result"]; - 31 [label="Enter when branch result"]; + 27 [label="Exit when branch result"]; + 28 [label="Enter when branch result"]; subgraph cluster_9 { color=blue - 32 [label="Enter block"]; - 33 [label="Access variable R|/cache|"]; - 34 [label="Enter safe call"]; - 35 [label="Postponed enter to lambda"]; - subgraph cluster_10 { - color=blue - 36 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_11 { - color=blue - 37 [label="Enter block"]; - 38 [label="Access variable R|/it|"]; - 39 [label="Const: String(main.kts.compiled.cache)"]; - 40 [label="Function call: R|java/io/File.File|(...)" style="filled" fillcolor=yellow]; - 41 [label="Exit block"]; - } - 42 [label="Exit function " style="filled" fillcolor=red]; - } - 43 [label="Postponed exit from lambda"]; - 44 [label="Function call: $subj$.R|kotlin/let|(...)" style="filled" fillcolor=yellow]; - 45 [label="Exit safe call"]; - 46 [label="Exit block"]; + 29 [label="Enter block"]; + 30 [label="Const: Null(null)"]; + 31 [label="Exit block"]; } - 47 [label="Exit when branch result"]; - 48 [label="Merge postponed lambda exits"]; - 49 [label="Exit when"]; + 32 [label="Exit when branch result"]; + 33 [label="Enter when branch result"]; + subgraph cluster_10 { + color=blue + 34 [label="Enter block"]; + 35 [label="Access variable R|/cache|"]; + 36 [label="Enter safe call"]; + 37 [label="Postponed enter to lambda"]; + subgraph cluster_11 { + color=blue + 38 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_12 { + color=blue + 39 [label="Enter block"]; + 40 [label="Access variable R|/it|"]; + 41 [label="Const: String(main.kts.compiled.cache)"]; + 42 [label="Function call: R|java/io/File.File|(...)" style="filled" fillcolor=yellow]; + 43 [label="Exit block"]; + } + 44 [label="Exit function " style="filled" fillcolor=red]; + } + 45 [label="Postponed exit from lambda"]; + 46 [label="Function call: $subj$.R|kotlin/let|(...)" style="filled" fillcolor=yellow]; + 47 [label="Exit safe call"]; + 48 [label="Exit block"]; + } + 49 [label="Exit when branch result"]; + 50 [label="Merge postponed lambda exits"]; + 51 [label="Exit when"]; } - 50 [label="Variable declaration: lval cacheBaseDir: R|java/io/File?|"]; - 51 [label="Exit block"]; + 52 [label="Variable declaration: lval cacheBaseDir: R|java/io/File?|"]; + 53 [label="Exit block"]; } - 52 [label="Exit function test" style="filled" fillcolor=red]; + 54 [label="Exit function test" style="filled" fillcolor=red]; } - 4 -> {5}; - 5 -> {6}; 6 -> {7}; 7 -> {8}; 8 -> {9}; 9 -> {10}; 10 -> {11}; - 11 -> {12 31}; + 11 -> {12}; 12 -> {13}; - 13 -> {14}; + 13 -> {14 33}; 14 -> {15}; 15 -> {16}; - 16 -> {17 26}; + 16 -> {17}; 17 -> {18}; - 18 -> {19}; + 18 -> {19 28}; 19 -> {20}; 20 -> {21}; 21 -> {22}; 22 -> {23}; 23 -> {24}; 24 -> {25}; - 25 -> {49}; + 25 -> {26}; 26 -> {27}; - 27 -> {28}; + 27 -> {51}; 28 -> {29}; 29 -> {30}; - 30 -> {49}; + 30 -> {31}; 31 -> {32}; - 32 -> {33}; - 33 -> {34 45}; + 32 -> {51}; + 33 -> {34}; 34 -> {35}; - 35 -> {36 44}; - 35 -> {43} [style=dotted]; - 35 -> {36} [style=dashed]; + 35 -> {36 47}; 36 -> {37}; - 37 -> {38}; + 37 -> {38 46}; + 37 -> {45} [style=dotted]; + 37 -> {38} [style=dashed]; 38 -> {39}; 39 -> {40}; 40 -> {41}; 41 -> {42}; 42 -> {43}; - 43 -> {44} [color=green]; - 43 -> {48} [color=red]; + 43 -> {44}; 44 -> {45}; - 45 -> {46 48}; + 45 -> {46} [color=green]; + 45 -> {50} [color=red]; 46 -> {47}; - 47 -> {49}; - 48 -> {49} [color=red]; - 49 -> {50}; - 50 -> {51}; + 47 -> {48 50}; + 48 -> {49}; + 49 -> {51}; + 50 -> {51} [color=red]; 51 -> {52}; + 52 -> {53}; + 53 -> {54}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/inPlaceLambdas.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/inPlaceLambdas.dot index 2e7960b73ef..f8d12baa843 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/inPlaceLambdas.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/inPlaceLambdas.dot @@ -5,93 +5,98 @@ digraph inPlaceLambdas_kt { subgraph cluster_0 { color=red - 0 [label="Enter class A" style="filled" fillcolor=red]; - 1 [label="Exit class A" style="filled" fillcolor=red]; + 0 [label="Enter file inPlaceLambdas.kt" style="filled" fillcolor=red]; + 1 [label="Exit file inPlaceLambdas.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; subgraph cluster_1 { color=red - 2 [label="Enter function foo" style="filled" fillcolor=red]; - 3 [label="Exit function foo" style="filled" fillcolor=red]; + 2 [label="Enter class A" style="filled" fillcolor=red]; + 3 [label="Exit class A" style="filled" fillcolor=red]; } - 2 -> {3}; + 2 -> {3} [color=green]; subgraph cluster_2 { color=red - 4 [label="Enter class B" style="filled" fillcolor=red]; - 5 [label="Exit class B" style="filled" fillcolor=red]; + 4 [label="Enter function foo" style="filled" fillcolor=red]; + 5 [label="Exit function foo" style="filled" fillcolor=red]; } - 4 -> {5} [color=green]; + 4 -> {5}; subgraph cluster_3 { color=red - 6 [label="Enter function bar" style="filled" fillcolor=red]; - 7 [label="Exit function bar" style="filled" fillcolor=red]; + 6 [label="Enter class B" style="filled" fillcolor=red]; + 7 [label="Exit class B" style="filled" fillcolor=red]; } - 6 -> {7}; + 6 -> {7} [color=green]; subgraph cluster_4 { color=red - 8 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_5 { - color=blue - 9 [label="Enter block"]; - subgraph cluster_6 { - color=blue - 10 [label="Enter when"]; - subgraph cluster_7 { - color=blue - 11 [label="Enter when branch condition "]; - 12 [label="Access variable R|/x|"]; - 13 [label="Type operator: (R|/x| is R|A|)"]; - 14 [label="Exit when branch condition"]; - } - 15 [label="Synthetic else branch"]; - 16 [label="Enter when branch result"]; - subgraph cluster_8 { - color=blue - 17 [label="Enter block"]; - 18 [label="Postponed enter to lambda"]; - subgraph cluster_9 { - color=blue - 19 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_10 { - color=blue - 20 [label="Enter block"]; - 21 [label="Access variable R|/x|"]; - 22 [label="Smart cast: R|/x|"]; - 23 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 24 [label="Exit block"]; - } - 25 [label="Exit function " style="filled" fillcolor=red]; - } - 26 [label="Postponed exit from lambda"]; - 27 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 28 [label="Exit block"]; - } - 29 [label="Exit when branch result"]; - 30 [label="Exit when"]; - } - 31 [label="Exit block"]; - } - 32 [label="Exit function test_1" style="filled" fillcolor=red]; + 8 [label="Enter function bar" style="filled" fillcolor=red]; + 9 [label="Exit function bar" style="filled" fillcolor=red]; } 8 -> {9}; - 9 -> {10}; + + subgraph cluster_5 { + color=red + 10 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_6 { + color=blue + 11 [label="Enter block"]; + subgraph cluster_7 { + color=blue + 12 [label="Enter when"]; + subgraph cluster_8 { + color=blue + 13 [label="Enter when branch condition "]; + 14 [label="Access variable R|/x|"]; + 15 [label="Type operator: (R|/x| is R|A|)"]; + 16 [label="Exit when branch condition"]; + } + 17 [label="Synthetic else branch"]; + 18 [label="Enter when branch result"]; + subgraph cluster_9 { + color=blue + 19 [label="Enter block"]; + 20 [label="Postponed enter to lambda"]; + subgraph cluster_10 { + color=blue + 21 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_11 { + color=blue + 22 [label="Enter block"]; + 23 [label="Access variable R|/x|"]; + 24 [label="Smart cast: R|/x|"]; + 25 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 26 [label="Exit block"]; + } + 27 [label="Exit function " style="filled" fillcolor=red]; + } + 28 [label="Postponed exit from lambda"]; + 29 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 30 [label="Exit block"]; + } + 31 [label="Exit when branch result"]; + 32 [label="Exit when"]; + } + 33 [label="Exit block"]; + } + 34 [label="Exit function test_1" style="filled" fillcolor=red]; + } 10 -> {11}; 11 -> {12}; 12 -> {13}; 13 -> {14}; - 14 -> {15 16}; - 15 -> {30}; - 16 -> {17}; - 17 -> {18}; - 18 -> {19 27}; - 18 -> {26} [style=dotted]; - 18 -> {19} [style=dashed]; + 14 -> {15}; + 15 -> {16}; + 16 -> {17 18}; + 17 -> {32}; + 18 -> {19}; 19 -> {20}; - 20 -> {21}; + 20 -> {21 29}; + 20 -> {28} [style=dotted]; + 20 -> {21} [style=dashed]; 21 -> {22}; 22 -> {23}; 23 -> {24}; @@ -103,42 +108,42 @@ digraph inPlaceLambdas_kt { 29 -> {30}; 30 -> {31}; 31 -> {32}; - - subgraph cluster_11 { - color=red - 33 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_12 { - color=blue - 34 [label="Enter block"]; - 35 [label="Postponed enter to lambda"]; - subgraph cluster_13 { - color=blue - 36 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_14 { - color=blue - 37 [label="Enter block"]; - 38 [label="Access variable R|/x|"]; - 39 [label="Type operator: (R|/x| as R|B|)"]; - 40 [label="Exit block"]; - } - 41 [label="Exit function " style="filled" fillcolor=red]; - } - 42 [label="Postponed exit from lambda"]; - 43 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 44 [label="Access variable R|/x|"]; - 45 [label="Smart cast: R|/x|"]; - 46 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 47 [label="Exit block"]; - } - 48 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 32 -> {33}; 33 -> {34}; - 34 -> {35}; - 35 -> {36 43}; - 35 -> {42} [style=dotted]; - 35 -> {36} [style=dashed]; + + subgraph cluster_12 { + color=red + 35 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_13 { + color=blue + 36 [label="Enter block"]; + 37 [label="Postponed enter to lambda"]; + subgraph cluster_14 { + color=blue + 38 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_15 { + color=blue + 39 [label="Enter block"]; + 40 [label="Access variable R|/x|"]; + 41 [label="Type operator: (R|/x| as R|B|)"]; + 42 [label="Exit block"]; + } + 43 [label="Exit function " style="filled" fillcolor=red]; + } + 44 [label="Postponed exit from lambda"]; + 45 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 46 [label="Access variable R|/x|"]; + 47 [label="Smart cast: R|/x|"]; + 48 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 49 [label="Exit block"]; + } + 50 [label="Exit function test_2" style="filled" fillcolor=red]; + } + 35 -> {36}; 36 -> {37}; - 37 -> {38}; + 37 -> {38 45}; + 37 -> {44} [style=dotted]; + 37 -> {38} [style=dashed]; 38 -> {39}; 39 -> {40}; 40 -> {41}; @@ -149,74 +154,74 @@ digraph inPlaceLambdas_kt { 45 -> {46}; 46 -> {47}; 47 -> {48}; + 48 -> {49}; + 49 -> {50}; - subgraph cluster_15 { + subgraph cluster_16 { color=red - 49 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_16 { + 51 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_17 { color=blue - 50 [label="Enter block"]; - subgraph cluster_17 { + 52 [label="Enter block"]; + subgraph cluster_18 { color=blue - 51 [label="Enter when"]; - subgraph cluster_18 { - color=blue - 52 [label="Enter when branch condition "]; - 53 [label="Access variable R|/x|"]; - 54 [label="Type operator: (R|/x| is R|A|)"]; - 55 [label="Exit when branch condition"]; - } - 56 [label="Synthetic else branch"]; - 57 [label="Enter when branch result"]; + 53 [label="Enter when"]; subgraph cluster_19 { color=blue - 58 [label="Enter block"]; - 59 [label="Postponed enter to lambda"]; - subgraph cluster_20 { - color=blue - 60 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_21 { - color=blue - 61 [label="Enter block"]; - 62 [label="Access variable R|/x|"]; - 63 [label="Smart cast: R|/x|"]; - 64 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 65 [label="Access variable R|/x|"]; - 66 [label="Smart cast: R|/x|"]; - 67 [label="Type operator: (R|/x| as R|B|)"]; - 68 [label="Exit block"]; - } - 69 [label="Exit function " style="filled" fillcolor=red]; - } - 70 [label="Postponed exit from lambda"]; - 71 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 72 [label="Access variable R|/x|"]; - 73 [label="Smart cast: R|/x|"]; - 74 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 75 [label="Exit block"]; + 54 [label="Enter when branch condition "]; + 55 [label="Access variable R|/x|"]; + 56 [label="Type operator: (R|/x| is R|A|)"]; + 57 [label="Exit when branch condition"]; } - 76 [label="Exit when branch result"]; - 77 [label="Exit when"]; + 58 [label="Synthetic else branch"]; + 59 [label="Enter when branch result"]; + subgraph cluster_20 { + color=blue + 60 [label="Enter block"]; + 61 [label="Postponed enter to lambda"]; + subgraph cluster_21 { + color=blue + 62 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_22 { + color=blue + 63 [label="Enter block"]; + 64 [label="Access variable R|/x|"]; + 65 [label="Smart cast: R|/x|"]; + 66 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 67 [label="Access variable R|/x|"]; + 68 [label="Smart cast: R|/x|"]; + 69 [label="Type operator: (R|/x| as R|B|)"]; + 70 [label="Exit block"]; + } + 71 [label="Exit function " style="filled" fillcolor=red]; + } + 72 [label="Postponed exit from lambda"]; + 73 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 74 [label="Access variable R|/x|"]; + 75 [label="Smart cast: R|/x|"]; + 76 [label="Function call: R|/x|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 77 [label="Exit block"]; + } + 78 [label="Exit when branch result"]; + 79 [label="Exit when"]; } - 78 [label="Exit block"]; + 80 [label="Exit block"]; } - 79 [label="Exit function test_3" style="filled" fillcolor=red]; + 81 [label="Exit function test_3" style="filled" fillcolor=red]; } - 49 -> {50}; - 50 -> {51}; 51 -> {52}; 52 -> {53}; 53 -> {54}; 54 -> {55}; - 55 -> {56 57}; - 56 -> {77}; - 57 -> {58}; - 58 -> {59}; - 59 -> {60 71}; - 59 -> {70} [style=dotted]; - 59 -> {60} [style=dashed]; + 55 -> {56}; + 56 -> {57}; + 57 -> {58 59}; + 58 -> {79}; + 59 -> {60}; 60 -> {61}; - 61 -> {62}; + 61 -> {62 73}; + 61 -> {72} [style=dotted]; + 61 -> {62} [style=dashed]; 62 -> {63}; 63 -> {64}; 64 -> {65}; @@ -234,5 +239,7 @@ digraph inPlaceLambdas_kt { 76 -> {77}; 77 -> {78}; 78 -> {79}; + 79 -> {80}; + 80 -> {81}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/lambdaInWhenBranch.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/lambdaInWhenBranch.dot index debcdd888e2..58f51580afd 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/lambdaInWhenBranch.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/lambdaInWhenBranch.dot @@ -5,235 +5,240 @@ digraph lambdaInWhenBranch_kt { subgraph cluster_0 { color=red - 0 [label="Enter class Sealed" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter function " style="filled" fillcolor=red]; - 2 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 3 [label="Exit function " style="filled" fillcolor=red]; - } - 4 [label="Exit class Sealed" style="filled" fillcolor=red]; + 0 [label="Enter file lambdaInWhenBranch.kt" style="filled" fillcolor=red]; + 1 [label="Exit file lambdaInWhenBranch.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; - 0 -> {4} [style=dotted]; - 0 -> {1} [style=dashed]; - 1 -> {2}; - 2 -> {3}; - 3 -> {4} [color=green]; - subgraph cluster_2 { + subgraph cluster_1 { color=red - 5 [label="Enter class SubClass1" style="filled" fillcolor=red]; - subgraph cluster_3 { + 2 [label="Enter class Sealed" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 6 [label="Enter property" style="filled" fillcolor=red]; - 7 [label="Access variable R|/t|"]; - 8 [label="Exit property" style="filled" fillcolor=red]; + 3 [label="Enter function " style="filled" fillcolor=red]; + 4 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 5 [label="Exit function " style="filled" fillcolor=red]; } + 6 [label="Exit class Sealed" style="filled" fillcolor=red]; + } + 2 -> {3} [color=green]; + 2 -> {6} [style=dotted]; + 2 -> {3} [style=dashed]; + 3 -> {4}; + 4 -> {5}; + 5 -> {6} [color=green]; + + subgraph cluster_3 { + color=red + 7 [label="Enter class SubClass1" style="filled" fillcolor=red]; subgraph cluster_4 { color=blue - 9 [label="Enter function " style="filled" fillcolor=red]; - 10 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 11 [label="Exit function " style="filled" fillcolor=red]; + 8 [label="Enter property" style="filled" fillcolor=red]; + 9 [label="Access variable R|/t|"]; + 10 [label="Exit property" style="filled" fillcolor=red]; } - 12 [label="Exit class SubClass1" style="filled" fillcolor=red]; + subgraph cluster_5 { + color=blue + 11 [label="Enter function " style="filled" fillcolor=red]; + 12 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 13 [label="Exit function " style="filled" fillcolor=red]; + } + 14 [label="Exit class SubClass1" style="filled" fillcolor=red]; } - 5 -> {6} [color=green]; - 5 -> {12} [style=dotted]; - 5 -> {6 9} [style=dashed]; - 6 -> {7}; - 7 -> {8}; - 8 -> {9} [color=green]; + 7 -> {8} [color=green]; + 7 -> {14} [style=dotted]; + 7 -> {8 11} [style=dashed]; + 8 -> {9}; 9 -> {10}; - 10 -> {11}; - 11 -> {12} [color=green]; - - subgraph cluster_5 { - color=red - 13 [label="Enter function component1" style="filled" fillcolor=red]; - 14 [label="Exit function component1" style="filled" fillcolor=red]; - } - 13 -> {14}; + 10 -> {11} [color=green]; + 11 -> {12}; + 12 -> {13}; + 13 -> {14} [color=green]; subgraph cluster_6 { color=red - 15 [label="Enter function copy" style="filled" fillcolor=red]; - 16 [label="Enter default value of t"]; - subgraph cluster_7 { - color=blue - 17 [label="Enter default value of t" style="filled" fillcolor=red]; - 18 [label="Access variable R|/SubClass1.t|"]; - 19 [label="Exit default value of t" style="filled" fillcolor=red]; - } - 20 [label="Exit default value of t"]; - 21 [label="Exit function copy" style="filled" fillcolor=red]; + 15 [label="Enter function component1" style="filled" fillcolor=red]; + 16 [label="Exit function component1" style="filled" fillcolor=red]; } 15 -> {16}; - 16 -> {17 20}; - 16 -> {17} [style=dashed]; + + subgraph cluster_7 { + color=red + 17 [label="Enter function copy" style="filled" fillcolor=red]; + 18 [label="Enter default value of t"]; + subgraph cluster_8 { + color=blue + 19 [label="Enter default value of t" style="filled" fillcolor=red]; + 20 [label="Access variable R|/SubClass1.t|"]; + 21 [label="Exit default value of t" style="filled" fillcolor=red]; + } + 22 [label="Exit default value of t"]; + 23 [label="Exit function copy" style="filled" fillcolor=red]; + } 17 -> {18}; - 18 -> {19}; + 18 -> {19 22}; + 18 -> {19} [style=dashed]; 19 -> {20}; 20 -> {21}; + 21 -> {22}; + 22 -> {23}; - subgraph cluster_8 { + subgraph cluster_9 { color=red - 22 [label="Enter class SubClass2" style="filled" fillcolor=red]; - subgraph cluster_9 { + 24 [label="Enter class SubClass2" style="filled" fillcolor=red]; + subgraph cluster_10 { color=blue - 23 [label="Enter function " style="filled" fillcolor=red]; - 24 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 25 [label="Exit function " style="filled" fillcolor=red]; + 25 [label="Enter function " style="filled" fillcolor=red]; + 26 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 27 [label="Exit function " style="filled" fillcolor=red]; } - 26 [label="Exit class SubClass2" style="filled" fillcolor=red]; + 28 [label="Exit class SubClass2" style="filled" fillcolor=red]; } - 22 -> {23} [color=green]; - 22 -> {26} [style=dotted]; - 22 -> {23} [style=dashed]; - 23 -> {24}; - 24 -> {25}; - 25 -> {26} [color=green]; - - subgraph cluster_10 { - color=red - 27 [label="Enter function copy" style="filled" fillcolor=red]; - 28 [label="Exit function copy" style="filled" fillcolor=red]; - } - 27 -> {28}; + 24 -> {25} [color=green]; + 24 -> {28} [style=dotted]; + 24 -> {25} [style=dashed]; + 25 -> {26}; + 26 -> {27}; + 27 -> {28} [color=green]; subgraph cluster_11 { color=red - 29 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_12 { - color=blue - 30 [label="Enter block"]; - subgraph cluster_13 { - color=blue - 31 [label="Enter when"]; - 32 [label="Access variable R|/p|"]; - subgraph cluster_14 { - color=blue - 33 [label="Enter when branch condition "]; - 34 [label="Exit $subj"]; - 35 [label="Type operator: ($subj$ is R|SubClass1|)"]; - 36 [label="Exit when branch condition"]; - } - subgraph cluster_15 { - color=blue - 37 [label="Enter when branch condition "]; - 38 [label="Exit $subj"]; - 39 [label="Type operator: ($subj$ is R|SubClass2|)"]; - 40 [label="Exit when branch condition"]; - } - 41 [label="Enter when branch result"]; - subgraph cluster_16 { - color=blue - 42 [label="Enter block"]; - 43 [label="Const: String()"]; - 44 [label="Exit block"]; - } - 45 [label="Exit when branch result"]; - 46 [label="Enter when branch result"]; - subgraph cluster_17 { - color=blue - 47 [label="Enter block"]; - 48 [label="Const: String()"]; - 49 [label="Postponed enter to lambda"]; - subgraph cluster_18 { - color=blue - 50 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_19 { - color=blue - 51 [label="Enter block"]; - 52 [label="Access variable R|/it|"]; - 53 [label="Exit block"]; - } - 54 [label="Exit function " style="filled" fillcolor=red]; - } - 55 [label="Postponed exit from lambda"]; - 56 [label="Function call: String().R|kotlin/let|(...)" style="filled" fillcolor=yellow]; - 57 [label="Exit block"]; - } - 58 [label="Exit when branch result"]; - 59 [label="Exit when"]; - } - 60 [label="Access variable R|/p|"]; - 61 [label="Access variable #"]; - subgraph cluster_20 { - color=blue - 62 [label="Enter when"]; - 63 [label="Access variable R|/p|"]; - subgraph cluster_21 { - color=blue - 64 [label="Enter when branch condition "]; - 65 [label="Exit $subj"]; - 66 [label="Type operator: ($subj$ is R|SubClass1|)"]; - 67 [label="Exit when branch condition"]; - } - subgraph cluster_22 { - color=blue - 68 [label="Enter when branch condition "]; - 69 [label="Exit $subj"]; - 70 [label="Type operator: ($subj$ is R|SubClass2|)"]; - 71 [label="Exit when branch condition"]; - } - 72 [label="Enter when branch result"]; - subgraph cluster_23 { - color=blue - 73 [label="Enter block"]; - 74 [label="Const: String(2)"]; - 75 [label="Exit block"]; - } - 76 [label="Exit when branch result"]; - 77 [label="Enter when branch result"]; - subgraph cluster_24 { - color=blue - 78 [label="Enter block"]; - 79 [label="Access variable R|/p|"]; - 80 [label="Smart cast: R|/p|"]; - 81 [label="Access variable R|/SubClass1.t|"]; - 82 [label="Exit block"]; - } - 83 [label="Exit when branch result"]; - 84 [label="Exit when"]; - } - 85 [label="Access variable R|kotlin/String.length|"]; - 86 [label="Exit block"]; - } - 87 [label="Exit function foo" style="filled" fillcolor=red]; + 29 [label="Enter function copy" style="filled" fillcolor=red]; + 30 [label="Exit function copy" style="filled" fillcolor=red]; } 29 -> {30}; - 30 -> {31}; + + subgraph cluster_12 { + color=red + 31 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_13 { + color=blue + 32 [label="Enter block"]; + subgraph cluster_14 { + color=blue + 33 [label="Enter when"]; + 34 [label="Access variable R|/p|"]; + subgraph cluster_15 { + color=blue + 35 [label="Enter when branch condition "]; + 36 [label="Exit $subj"]; + 37 [label="Type operator: ($subj$ is R|SubClass1|)"]; + 38 [label="Exit when branch condition"]; + } + subgraph cluster_16 { + color=blue + 39 [label="Enter when branch condition "]; + 40 [label="Exit $subj"]; + 41 [label="Type operator: ($subj$ is R|SubClass2|)"]; + 42 [label="Exit when branch condition"]; + } + 43 [label="Enter when branch result"]; + subgraph cluster_17 { + color=blue + 44 [label="Enter block"]; + 45 [label="Const: String()"]; + 46 [label="Exit block"]; + } + 47 [label="Exit when branch result"]; + 48 [label="Enter when branch result"]; + subgraph cluster_18 { + color=blue + 49 [label="Enter block"]; + 50 [label="Const: String()"]; + 51 [label="Postponed enter to lambda"]; + subgraph cluster_19 { + color=blue + 52 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_20 { + color=blue + 53 [label="Enter block"]; + 54 [label="Access variable R|/it|"]; + 55 [label="Exit block"]; + } + 56 [label="Exit function " style="filled" fillcolor=red]; + } + 57 [label="Postponed exit from lambda"]; + 58 [label="Function call: String().R|kotlin/let|(...)" style="filled" fillcolor=yellow]; + 59 [label="Exit block"]; + } + 60 [label="Exit when branch result"]; + 61 [label="Exit when"]; + } + 62 [label="Access variable R|/p|"]; + 63 [label="Access variable #"]; + subgraph cluster_21 { + color=blue + 64 [label="Enter when"]; + 65 [label="Access variable R|/p|"]; + subgraph cluster_22 { + color=blue + 66 [label="Enter when branch condition "]; + 67 [label="Exit $subj"]; + 68 [label="Type operator: ($subj$ is R|SubClass1|)"]; + 69 [label="Exit when branch condition"]; + } + subgraph cluster_23 { + color=blue + 70 [label="Enter when branch condition "]; + 71 [label="Exit $subj"]; + 72 [label="Type operator: ($subj$ is R|SubClass2|)"]; + 73 [label="Exit when branch condition"]; + } + 74 [label="Enter when branch result"]; + subgraph cluster_24 { + color=blue + 75 [label="Enter block"]; + 76 [label="Const: String(2)"]; + 77 [label="Exit block"]; + } + 78 [label="Exit when branch result"]; + 79 [label="Enter when branch result"]; + subgraph cluster_25 { + color=blue + 80 [label="Enter block"]; + 81 [label="Access variable R|/p|"]; + 82 [label="Smart cast: R|/p|"]; + 83 [label="Access variable R|/SubClass1.t|"]; + 84 [label="Exit block"]; + } + 85 [label="Exit when branch result"]; + 86 [label="Exit when"]; + } + 87 [label="Access variable R|kotlin/String.length|"]; + 88 [label="Exit block"]; + } + 89 [label="Exit function foo" style="filled" fillcolor=red]; + } 31 -> {32}; 32 -> {33}; 33 -> {34}; 34 -> {35}; 35 -> {36}; - 36 -> {37 46}; + 36 -> {37}; 37 -> {38}; - 38 -> {39}; + 38 -> {39 48}; 39 -> {40}; 40 -> {41}; 41 -> {42}; 42 -> {43}; 43 -> {44}; 44 -> {45}; - 45 -> {59}; + 45 -> {46}; 46 -> {47}; - 47 -> {48}; + 47 -> {61}; 48 -> {49}; - 49 -> {50 56}; - 49 -> {55} [style=dotted]; - 49 -> {50} [style=dashed]; + 49 -> {50}; 50 -> {51}; - 51 -> {52}; + 51 -> {52 58}; + 51 -> {57} [style=dotted]; + 51 -> {52} [style=dashed]; 52 -> {53}; 53 -> {54}; 54 -> {55}; - 55 -> {56} [color=green]; - 55 -> {59} [color=red]; + 55 -> {56}; 56 -> {57}; - 57 -> {58}; + 57 -> {58} [color=green]; + 57 -> {61} [color=red]; 58 -> {59}; 59 -> {60}; 60 -> {61}; @@ -243,18 +248,18 @@ digraph lambdaInWhenBranch_kt { 64 -> {65}; 65 -> {66}; 66 -> {67}; - 67 -> {68 77}; + 67 -> {68}; 68 -> {69}; - 69 -> {70}; + 69 -> {70 79}; 70 -> {71}; 71 -> {72}; 72 -> {73}; 73 -> {74}; 74 -> {75}; 75 -> {76}; - 76 -> {84}; + 76 -> {77}; 77 -> {78}; - 78 -> {79}; + 78 -> {86}; 79 -> {80}; 80 -> {81}; 81 -> {82}; @@ -263,5 +268,7 @@ digraph lambdaInWhenBranch_kt { 84 -> {85}; 85 -> {86}; 86 -> {87}; + 87 -> {88}; + 88 -> {89}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/smartcastOnLambda.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/smartcastOnLambda.dot index d44c3239dfa..0ab9079fb61 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/smartcastOnLambda.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/smartcastOnLambda.dot @@ -5,51 +5,58 @@ digraph smartcastOnLambda_kt { subgraph cluster_0 { color=red - 0 [label="Enter function test" style="filled" fillcolor=red]; - subgraph cluster_1 { + 0 [label="Enter file smartcastOnLambda.kt" style="filled" fillcolor=red]; + 1 [label="Exit file smartcastOnLambda.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function test" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 1 [label="Enter block"]; - subgraph cluster_2 { + 3 [label="Enter block"]; + subgraph cluster_3 { color=blue - 2 [label="Enter when"]; - subgraph cluster_3 { - color=blue - 3 [label="Enter when branch condition "]; - 4 [label="Access variable R|/func|"]; - 5 [label="Const: Null(null)"]; - 6 [label="Equality operator !="]; - 7 [label="Exit when branch condition"]; - } - 8 [label="Synthetic else branch"]; - 9 [label="Enter when branch result"]; + 4 [label="Enter when"]; subgraph cluster_4 { color=blue - 10 [label="Enter block"]; - 11 [label="Function call: R|/func|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 12 [label="Exit block"]; + 5 [label="Enter when branch condition "]; + 6 [label="Access variable R|/func|"]; + 7 [label="Const: Null(null)"]; + 8 [label="Equality operator !="]; + 9 [label="Exit when branch condition"]; } - 13 [label="Exit when branch result"]; - 14 [label="Exit when"]; + 10 [label="Synthetic else branch"]; + 11 [label="Enter when branch result"]; + subgraph cluster_5 { + color=blue + 12 [label="Enter block"]; + 13 [label="Function call: R|/func|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 14 [label="Exit block"]; + } + 15 [label="Exit when branch result"]; + 16 [label="Exit when"]; } - 15 [label="Exit block"]; + 17 [label="Exit block"]; } - 16 [label="Exit function test" style="filled" fillcolor=red]; + 18 [label="Exit function test" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; 3 -> {4}; 4 -> {5}; 5 -> {6}; 6 -> {7}; - 7 -> {8 9}; - 8 -> {14}; - 9 -> {10}; - 10 -> {11}; + 7 -> {8}; + 8 -> {9}; + 9 -> {10 11}; + 10 -> {16}; 11 -> {12}; 12 -> {13}; 13 -> {14}; 14 -> {15}; 15 -> {16}; + 16 -> {17}; + 17 -> {18}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/loops/dataFlowInfoFromWhileCondition.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/loops/dataFlowInfoFromWhileCondition.dot index f25606a40a8..c8c72728cc8 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/loops/dataFlowInfoFromWhileCondition.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/loops/dataFlowInfoFromWhileCondition.dot @@ -5,80 +5,85 @@ digraph dataFlowInfoFromWhileCondition_kt { subgraph cluster_0 { color=red - 0 [label="Enter class A" style="filled" fillcolor=red]; - 1 [label="Exit class A" style="filled" fillcolor=red]; + 0 [label="Enter file dataFlowInfoFromWhileCondition.kt" style="filled" fillcolor=red]; + 1 [label="Exit file dataFlowInfoFromWhileCondition.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; subgraph cluster_1 { color=red - 2 [label="Enter function foo" style="filled" fillcolor=red]; - 3 [label="Exit function foo" style="filled" fillcolor=red]; + 2 [label="Enter class A" style="filled" fillcolor=red]; + 3 [label="Exit class A" style="filled" fillcolor=red]; } - 2 -> {3}; + 2 -> {3} [color=green]; subgraph cluster_2 { color=red - 4 [label="Enter class B" style="filled" fillcolor=red]; - 5 [label="Exit class B" style="filled" fillcolor=red]; + 4 [label="Enter function foo" style="filled" fillcolor=red]; + 5 [label="Exit function foo" style="filled" fillcolor=red]; } - 4 -> {5} [color=green]; + 4 -> {5}; subgraph cluster_3 { color=red - 6 [label="Enter class C" style="filled" fillcolor=red]; - 7 [label="Exit class C" style="filled" fillcolor=red]; + 6 [label="Enter class B" style="filled" fillcolor=red]; + 7 [label="Exit class B" style="filled" fillcolor=red]; } 6 -> {7} [color=green]; subgraph cluster_4 { color=red - 8 [label="Enter function test" style="filled" fillcolor=red]; - subgraph cluster_5 { - color=blue - 9 [label="Enter block"]; - 10 [label="Const: Null(null)"]; - 11 [label="Variable declaration: lvar a: R|A?|"]; - subgraph cluster_6 { - color=blue - 12 [label="Enter while loop"]; - subgraph cluster_7 { - color=blue - 13 [label="Enter loop condition"]; - subgraph cluster_8 { - color=blue - 14 [label="Enter ||"]; - 15 [label="Access variable R|/a|"]; - 16 [label="Type operator: (R|/a| is R|B|)"]; - 17 [label="Exit left part of ||"]; - 18 [label="Enter right part of ||"]; - 19 [label="Access variable R|/a|"]; - 20 [label="Type operator: (R|/a| is R|C|)"]; - 21 [label="Exit ||"]; - } - 22 [label="Exit loop condition"]; - } - subgraph cluster_9 { - color=blue - 23 [label="Enter loop block"]; - subgraph cluster_10 { - color=blue - 24 [label="Enter block"]; - 25 [label="Access variable R|/a|"]; - 26 [label="Smart cast: R|/a|"]; - 27 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 28 [label="Exit block"]; - } - 29 [label="Exit loop block"]; - } - 30 [label="Exit while loop"]; - } - 31 [label="Exit block"]; - } - 32 [label="Exit function test" style="filled" fillcolor=red]; + 8 [label="Enter class C" style="filled" fillcolor=red]; + 9 [label="Exit class C" style="filled" fillcolor=red]; + } + 8 -> {9} [color=green]; + + subgraph cluster_5 { + color=red + 10 [label="Enter function test" style="filled" fillcolor=red]; + subgraph cluster_6 { + color=blue + 11 [label="Enter block"]; + 12 [label="Const: Null(null)"]; + 13 [label="Variable declaration: lvar a: R|A?|"]; + subgraph cluster_7 { + color=blue + 14 [label="Enter while loop"]; + subgraph cluster_8 { + color=blue + 15 [label="Enter loop condition"]; + subgraph cluster_9 { + color=blue + 16 [label="Enter ||"]; + 17 [label="Access variable R|/a|"]; + 18 [label="Type operator: (R|/a| is R|B|)"]; + 19 [label="Exit left part of ||"]; + 20 [label="Enter right part of ||"]; + 21 [label="Access variable R|/a|"]; + 22 [label="Type operator: (R|/a| is R|C|)"]; + 23 [label="Exit ||"]; + } + 24 [label="Exit loop condition"]; + } + subgraph cluster_10 { + color=blue + 25 [label="Enter loop block"]; + subgraph cluster_11 { + color=blue + 26 [label="Enter block"]; + 27 [label="Access variable R|/a|"]; + 28 [label="Smart cast: R|/a|"]; + 29 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 30 [label="Exit block"]; + } + 31 [label="Exit loop block"]; + } + 32 [label="Exit while loop"]; + } + 33 [label="Exit block"]; + } + 34 [label="Exit function test" style="filled" fillcolor=red]; } - 8 -> {9}; - 9 -> {10}; 10 -> {11}; 11 -> {12}; 12 -> {13}; @@ -86,20 +91,22 @@ digraph dataFlowInfoFromWhileCondition_kt { 14 -> {15}; 15 -> {16}; 16 -> {17}; - 17 -> {18 21}; + 17 -> {18}; 18 -> {19}; - 19 -> {20}; + 19 -> {20 23}; 20 -> {21}; 21 -> {22}; - 22 -> {23 30}; + 22 -> {23}; 23 -> {24}; - 24 -> {25}; + 24 -> {25 32}; 25 -> {26}; 26 -> {27}; 27 -> {28}; 28 -> {29}; - 29 -> {13} [color=green style=dashed]; + 29 -> {30}; 30 -> {31}; - 31 -> {32}; + 31 -> {15} [color=green style=dashed]; + 32 -> {33}; + 33 -> {34}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/loops/endlessLoops.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/loops/endlessLoops.dot index c1634ba453c..9f4a91c5955 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/loops/endlessLoops.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/loops/endlessLoops.dot @@ -5,559 +5,564 @@ digraph endlessLoops_kt { subgraph cluster_0 { color=red - 0 [label="Enter class A" style="filled" fillcolor=red]; - 1 [label="Exit class A" style="filled" fillcolor=red]; + 0 [label="Enter file endlessLoops.kt" style="filled" fillcolor=red]; + 1 [label="Exit file endlessLoops.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; subgraph cluster_1 { color=red - 2 [label="Enter function foo" style="filled" fillcolor=red]; - 3 [label="Exit function foo" style="filled" fillcolor=red]; + 2 [label="Enter class A" style="filled" fillcolor=red]; + 3 [label="Exit class A" style="filled" fillcolor=red]; } - 2 -> {3}; + 2 -> {3} [color=green]; subgraph cluster_2 { color=red - 4 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_3 { - color=blue - 5 [label="Enter block"]; - subgraph cluster_4 { - color=blue - 6 [label="Enter while loop"]; - subgraph cluster_5 { - color=blue - 7 [label="Enter loop condition"]; - 8 [label="Const: Boolean(true)"]; - 9 [label="Exit loop condition"]; - } - subgraph cluster_6 { - color=blue - 10 [label="Enter loop block"]; - subgraph cluster_7 { - color=blue - 11 [label="Enter block"]; - 12 [label="Access variable R|/x|"]; - 13 [label="Type operator: (R|/x| as R|A|)"]; - subgraph cluster_8 { - color=blue - 14 [label="Enter when"]; - subgraph cluster_9 { - color=blue - 15 [label="Enter when branch condition "]; - 16 [label="Access variable R|/b|"]; - 17 [label="Exit when branch condition"]; - } - 18 [label="Synthetic else branch"]; - 19 [label="Enter when branch result"]; - subgraph cluster_10 { - color=blue - 20 [label="Enter block"]; - 21 [label="Jump: break@@@[Boolean(true)] "]; - 22 [label="Stub" style="filled" fillcolor=gray]; - 23 [label="Exit block" style="filled" fillcolor=gray]; - } - 24 [label="Exit when branch result" style="filled" fillcolor=gray]; - 25 [label="Exit when"]; - } - 26 [label="Exit block"]; - } - 27 [label="Exit loop block"]; - } - 28 [label="Exit while loop"]; - } - 29 [label="Access variable R|/x|"]; - 30 [label="Smart cast: R|/x|"]; - 31 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 32 [label="Exit block"]; - } - 33 [label="Exit function test_1" style="filled" fillcolor=red]; + 4 [label="Enter function foo" style="filled" fillcolor=red]; + 5 [label="Exit function foo" style="filled" fillcolor=red]; } 4 -> {5}; - 5 -> {6}; + + subgraph cluster_3 { + color=red + 6 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_4 { + color=blue + 7 [label="Enter block"]; + subgraph cluster_5 { + color=blue + 8 [label="Enter while loop"]; + subgraph cluster_6 { + color=blue + 9 [label="Enter loop condition"]; + 10 [label="Const: Boolean(true)"]; + 11 [label="Exit loop condition"]; + } + subgraph cluster_7 { + color=blue + 12 [label="Enter loop block"]; + subgraph cluster_8 { + color=blue + 13 [label="Enter block"]; + 14 [label="Access variable R|/x|"]; + 15 [label="Type operator: (R|/x| as R|A|)"]; + subgraph cluster_9 { + color=blue + 16 [label="Enter when"]; + subgraph cluster_10 { + color=blue + 17 [label="Enter when branch condition "]; + 18 [label="Access variable R|/b|"]; + 19 [label="Exit when branch condition"]; + } + 20 [label="Synthetic else branch"]; + 21 [label="Enter when branch result"]; + subgraph cluster_11 { + color=blue + 22 [label="Enter block"]; + 23 [label="Jump: break@@@[Boolean(true)] "]; + 24 [label="Stub" style="filled" fillcolor=gray]; + 25 [label="Exit block" style="filled" fillcolor=gray]; + } + 26 [label="Exit when branch result" style="filled" fillcolor=gray]; + 27 [label="Exit when"]; + } + 28 [label="Exit block"]; + } + 29 [label="Exit loop block"]; + } + 30 [label="Exit while loop"]; + } + 31 [label="Access variable R|/x|"]; + 32 [label="Smart cast: R|/x|"]; + 33 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 34 [label="Exit block"]; + } + 35 [label="Exit function test_1" style="filled" fillcolor=red]; + } 6 -> {7}; 7 -> {8}; 8 -> {9}; 9 -> {10}; - 9 -> {28} [style=dotted]; 10 -> {11}; 11 -> {12}; + 11 -> {30} [style=dotted]; 12 -> {13}; 13 -> {14}; 14 -> {15}; 15 -> {16}; 16 -> {17}; - 17 -> {18 19}; - 18 -> {25}; - 19 -> {20}; - 20 -> {21}; - 21 -> {28}; - 21 -> {22} [style=dotted]; - 22 -> {23} [style=dotted]; + 17 -> {18}; + 18 -> {19}; + 19 -> {20 21}; + 20 -> {27}; + 21 -> {22}; + 22 -> {23}; + 23 -> {30}; 23 -> {24} [style=dotted]; 24 -> {25} [style=dotted]; - 25 -> {26}; - 26 -> {27}; - 27 -> {7} [color=green style=dashed]; + 25 -> {26} [style=dotted]; + 26 -> {27} [style=dotted]; + 27 -> {28}; 28 -> {29}; - 29 -> {30}; + 29 -> {9} [color=green style=dashed]; 30 -> {31}; 31 -> {32}; 32 -> {33}; + 33 -> {34}; + 34 -> {35}; - subgraph cluster_11 { + subgraph cluster_12 { color=red - 34 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_12 { + 36 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_13 { color=blue - 35 [label="Enter block"]; - subgraph cluster_13 { + 37 [label="Enter block"]; + subgraph cluster_14 { color=blue - 36 [label="Enter while loop"]; - subgraph cluster_14 { - color=blue - 37 [label="Enter loop condition"]; - 38 [label="Const: Boolean(true)"]; - 39 [label="Exit loop condition"]; - } + 38 [label="Enter while loop"]; subgraph cluster_15 { color=blue - 40 [label="Enter loop block"]; - subgraph cluster_16 { + 39 [label="Enter loop condition"]; + 40 [label="Const: Boolean(true)"]; + 41 [label="Exit loop condition"]; + } + subgraph cluster_16 { + color=blue + 42 [label="Enter loop block"]; + subgraph cluster_17 { color=blue - 41 [label="Enter block"]; - subgraph cluster_17 { + 43 [label="Enter block"]; + subgraph cluster_18 { color=blue - 42 [label="Enter when"]; - subgraph cluster_18 { - color=blue - 43 [label="Enter when branch condition "]; - 44 [label="Access variable R|/b|"]; - 45 [label="Exit when branch condition"]; - } - 46 [label="Synthetic else branch"]; - 47 [label="Enter when branch result"]; + 44 [label="Enter when"]; subgraph cluster_19 { color=blue - 48 [label="Enter block"]; - 49 [label="Access variable R|/x|"]; - 50 [label="Type operator: (R|/x| as R|A|)"]; - 51 [label="Jump: break@@@[Boolean(true)] "]; - 52 [label="Stub" style="filled" fillcolor=gray]; - 53 [label="Exit block" style="filled" fillcolor=gray]; + 45 [label="Enter when branch condition "]; + 46 [label="Access variable R|/b|"]; + 47 [label="Exit when branch condition"]; } - 54 [label="Exit when branch result" style="filled" fillcolor=gray]; - 55 [label="Exit when"]; + 48 [label="Synthetic else branch"]; + 49 [label="Enter when branch result"]; + subgraph cluster_20 { + color=blue + 50 [label="Enter block"]; + 51 [label="Access variable R|/x|"]; + 52 [label="Type operator: (R|/x| as R|A|)"]; + 53 [label="Jump: break@@@[Boolean(true)] "]; + 54 [label="Stub" style="filled" fillcolor=gray]; + 55 [label="Exit block" style="filled" fillcolor=gray]; + } + 56 [label="Exit when branch result" style="filled" fillcolor=gray]; + 57 [label="Exit when"]; } - 56 [label="Exit block"]; + 58 [label="Exit block"]; } - 57 [label="Exit loop block"]; + 59 [label="Exit loop block"]; } - 58 [label="Exit while loop"]; + 60 [label="Exit while loop"]; } - 59 [label="Access variable R|/x|"]; - 60 [label="Smart cast: R|/x|"]; - 61 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 62 [label="Exit block"]; + 61 [label="Access variable R|/x|"]; + 62 [label="Smart cast: R|/x|"]; + 63 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 64 [label="Exit block"]; } - 63 [label="Exit function test_2" style="filled" fillcolor=red]; + 65 [label="Exit function test_2" style="filled" fillcolor=red]; } - 34 -> {35}; - 35 -> {36}; 36 -> {37}; 37 -> {38}; 38 -> {39}; 39 -> {40}; - 39 -> {58} [style=dotted]; 40 -> {41}; 41 -> {42}; + 41 -> {60} [style=dotted]; 42 -> {43}; 43 -> {44}; 44 -> {45}; - 45 -> {46 47}; - 46 -> {55}; - 47 -> {48}; - 48 -> {49}; + 45 -> {46}; + 46 -> {47}; + 47 -> {48 49}; + 48 -> {57}; 49 -> {50}; 50 -> {51}; - 51 -> {58}; - 51 -> {52} [style=dotted]; - 52 -> {53} [style=dotted]; + 51 -> {52}; + 52 -> {53}; + 53 -> {60}; 53 -> {54} [style=dotted]; 54 -> {55} [style=dotted]; - 55 -> {56}; - 56 -> {57}; - 57 -> {37} [color=green style=dashed]; + 55 -> {56} [style=dotted]; + 56 -> {57} [style=dotted]; + 57 -> {58}; 58 -> {59}; - 59 -> {60}; + 59 -> {39} [color=green style=dashed]; 60 -> {61}; 61 -> {62}; 62 -> {63}; + 63 -> {64}; + 64 -> {65}; - subgraph cluster_20 { + subgraph cluster_21 { color=red - 64 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_21 { + 66 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_22 { color=blue - 65 [label="Enter block"]; - subgraph cluster_22 { + 67 [label="Enter block"]; + subgraph cluster_23 { color=blue - 66 [label="Enter while loop"]; - subgraph cluster_23 { - color=blue - 67 [label="Enter loop condition"]; - 68 [label="Const: Boolean(true)"]; - 69 [label="Exit loop condition"]; - } + 68 [label="Enter while loop"]; subgraph cluster_24 { color=blue - 70 [label="Enter loop block"]; - subgraph cluster_25 { + 69 [label="Enter loop condition"]; + 70 [label="Const: Boolean(true)"]; + 71 [label="Exit loop condition"]; + } + subgraph cluster_25 { + color=blue + 72 [label="Enter loop block"]; + subgraph cluster_26 { color=blue - 71 [label="Enter block"]; - 72 [label="Access variable R|/x|"]; - 73 [label="Type operator: (R|/x| as R|A|)"]; - subgraph cluster_26 { + 73 [label="Enter block"]; + 74 [label="Access variable R|/x|"]; + 75 [label="Type operator: (R|/x| as R|A|)"]; + subgraph cluster_27 { color=blue - 74 [label="Enter when"]; - subgraph cluster_27 { - color=blue - 75 [label="Enter when branch condition "]; - 76 [label="Access variable R|/b|"]; - 77 [label="Exit when branch condition"]; - } - 78 [label="Synthetic else branch"]; - 79 [label="Enter when branch result"]; + 76 [label="Enter when"]; subgraph cluster_28 { color=blue - 80 [label="Enter block"]; - 81 [label="Jump: break@@@[Boolean(true)] "]; - 82 [label="Stub" style="filled" fillcolor=gray]; - 83 [label="Exit block" style="filled" fillcolor=gray]; + 77 [label="Enter when branch condition "]; + 78 [label="Access variable R|/b|"]; + 79 [label="Exit when branch condition"]; } - 84 [label="Exit when branch result" style="filled" fillcolor=gray]; - 85 [label="Exit when"]; - } - subgraph cluster_29 { - color=blue - 86 [label="Enter when"]; - subgraph cluster_30 { + 80 [label="Synthetic else branch"]; + 81 [label="Enter when branch result"]; + subgraph cluster_29 { color=blue - 87 [label="Enter when branch condition "]; - 88 [label="Access variable R|/b|"]; - 89 [label="Exit when branch condition"]; + 82 [label="Enter block"]; + 83 [label="Jump: break@@@[Boolean(true)] "]; + 84 [label="Stub" style="filled" fillcolor=gray]; + 85 [label="Exit block" style="filled" fillcolor=gray]; } - 90 [label="Synthetic else branch"]; - 91 [label="Enter when branch result"]; + 86 [label="Exit when branch result" style="filled" fillcolor=gray]; + 87 [label="Exit when"]; + } + subgraph cluster_30 { + color=blue + 88 [label="Enter when"]; subgraph cluster_31 { color=blue - 92 [label="Enter block"]; - 93 [label="Jump: break@@@[Boolean(true)] "]; - 94 [label="Stub" style="filled" fillcolor=gray]; - 95 [label="Exit block" style="filled" fillcolor=gray]; + 89 [label="Enter when branch condition "]; + 90 [label="Access variable R|/b|"]; + 91 [label="Exit when branch condition"]; } - 96 [label="Exit when branch result" style="filled" fillcolor=gray]; - 97 [label="Exit when"]; + 92 [label="Synthetic else branch"]; + 93 [label="Enter when branch result"]; + subgraph cluster_32 { + color=blue + 94 [label="Enter block"]; + 95 [label="Jump: break@@@[Boolean(true)] "]; + 96 [label="Stub" style="filled" fillcolor=gray]; + 97 [label="Exit block" style="filled" fillcolor=gray]; + } + 98 [label="Exit when branch result" style="filled" fillcolor=gray]; + 99 [label="Exit when"]; } - 98 [label="Exit block"]; + 100 [label="Exit block"]; } - 99 [label="Exit loop block"]; + 101 [label="Exit loop block"]; } - 100 [label="Exit while loop"]; + 102 [label="Exit while loop"]; } - 101 [label="Access variable R|/x|"]; - 102 [label="Smart cast: R|/x|"]; - 103 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 104 [label="Exit block"]; + 103 [label="Access variable R|/x|"]; + 104 [label="Smart cast: R|/x|"]; + 105 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 106 [label="Exit block"]; } - 105 [label="Exit function test_3" style="filled" fillcolor=red]; + 107 [label="Exit function test_3" style="filled" fillcolor=red]; } - 64 -> {65}; - 65 -> {66}; 66 -> {67}; 67 -> {68}; 68 -> {69}; 69 -> {70}; - 69 -> {100} [style=dotted]; 70 -> {71}; 71 -> {72}; + 71 -> {102} [style=dotted]; 72 -> {73}; 73 -> {74}; 74 -> {75}; 75 -> {76}; 76 -> {77}; - 77 -> {78 79}; - 78 -> {85}; - 79 -> {80}; - 80 -> {81}; - 81 -> {100}; - 81 -> {82} [style=dotted]; - 82 -> {83} [style=dotted]; + 77 -> {78}; + 78 -> {79}; + 79 -> {80 81}; + 80 -> {87}; + 81 -> {82}; + 82 -> {83}; + 83 -> {102}; 83 -> {84} [style=dotted]; 84 -> {85} [style=dotted]; - 85 -> {86}; - 86 -> {87}; + 85 -> {86} [style=dotted]; + 86 -> {87} [style=dotted]; 87 -> {88}; 88 -> {89}; - 89 -> {90 91}; - 90 -> {97}; - 91 -> {92}; - 92 -> {93}; - 93 -> {100}; - 93 -> {94} [style=dotted]; - 94 -> {95} [style=dotted]; + 89 -> {90}; + 90 -> {91}; + 91 -> {92 93}; + 92 -> {99}; + 93 -> {94}; + 94 -> {95}; + 95 -> {102}; 95 -> {96} [style=dotted]; 96 -> {97} [style=dotted]; - 97 -> {98}; - 98 -> {99}; - 99 -> {67} [color=green style=dashed]; + 97 -> {98} [style=dotted]; + 98 -> {99} [style=dotted]; + 99 -> {100}; 100 -> {101}; - 101 -> {102}; + 101 -> {69} [color=green style=dashed]; 102 -> {103}; 103 -> {104}; 104 -> {105}; + 105 -> {106}; + 106 -> {107}; - subgraph cluster_32 { + subgraph cluster_33 { color=red - 106 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_33 { + 108 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_34 { color=blue - 107 [label="Enter block"]; - subgraph cluster_34 { + 109 [label="Enter block"]; + subgraph cluster_35 { color=blue - 108 [label="Enter while loop"]; - subgraph cluster_35 { - color=blue - 109 [label="Enter loop condition"]; - 110 [label="Const: Boolean(true)"]; - 111 [label="Exit loop condition"]; - } + 110 [label="Enter while loop"]; subgraph cluster_36 { color=blue - 112 [label="Enter loop block"]; - subgraph cluster_37 { + 111 [label="Enter loop condition"]; + 112 [label="Const: Boolean(true)"]; + 113 [label="Exit loop condition"]; + } + subgraph cluster_37 { + color=blue + 114 [label="Enter loop block"]; + subgraph cluster_38 { color=blue - 113 [label="Enter block"]; - subgraph cluster_38 { + 115 [label="Enter block"]; + subgraph cluster_39 { color=blue - 114 [label="Enter when"]; - subgraph cluster_39 { - color=blue - 115 [label="Enter when branch condition "]; - 116 [label="Access variable R|/b|"]; - 117 [label="Exit when branch condition"]; - } - 118 [label="Synthetic else branch"]; - 119 [label="Enter when branch result"]; + 116 [label="Enter when"]; subgraph cluster_40 { color=blue - 120 [label="Enter block"]; - 121 [label="Access variable R|/x|"]; - 122 [label="Type operator: (R|/x| as R|A|)"]; - 123 [label="Jump: break@@@[Boolean(true)] "]; - 124 [label="Stub" style="filled" fillcolor=gray]; - 125 [label="Exit block" style="filled" fillcolor=gray]; + 117 [label="Enter when branch condition "]; + 118 [label="Access variable R|/b|"]; + 119 [label="Exit when branch condition"]; } - 126 [label="Exit when branch result" style="filled" fillcolor=gray]; - 127 [label="Exit when"]; + 120 [label="Synthetic else branch"]; + 121 [label="Enter when branch result"]; + subgraph cluster_41 { + color=blue + 122 [label="Enter block"]; + 123 [label="Access variable R|/x|"]; + 124 [label="Type operator: (R|/x| as R|A|)"]; + 125 [label="Jump: break@@@[Boolean(true)] "]; + 126 [label="Stub" style="filled" fillcolor=gray]; + 127 [label="Exit block" style="filled" fillcolor=gray]; + } + 128 [label="Exit when branch result" style="filled" fillcolor=gray]; + 129 [label="Exit when"]; } - 128 [label="Jump: break@@@[Boolean(true)] "]; - 129 [label="Stub" style="filled" fillcolor=gray]; - 130 [label="Exit block" style="filled" fillcolor=gray]; + 130 [label="Jump: break@@@[Boolean(true)] "]; + 131 [label="Stub" style="filled" fillcolor=gray]; + 132 [label="Exit block" style="filled" fillcolor=gray]; } - 131 [label="Exit loop block" style="filled" fillcolor=gray]; + 133 [label="Exit loop block" style="filled" fillcolor=gray]; } - 132 [label="Exit while loop"]; + 134 [label="Exit while loop"]; } - 133 [label="Access variable R|/x|"]; - 134 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 135 [label="Exit block"]; + 135 [label="Access variable R|/x|"]; + 136 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 137 [label="Exit block"]; } - 136 [label="Exit function test_4" style="filled" fillcolor=red]; + 138 [label="Exit function test_4" style="filled" fillcolor=red]; } - 106 -> {107}; - 107 -> {108}; 108 -> {109}; 109 -> {110}; 110 -> {111}; 111 -> {112}; - 111 -> {132} [style=dotted]; 112 -> {113}; 113 -> {114}; + 113 -> {134} [style=dotted]; 114 -> {115}; 115 -> {116}; 116 -> {117}; - 117 -> {118 119}; - 118 -> {127}; - 119 -> {120}; - 120 -> {121}; + 117 -> {118}; + 118 -> {119}; + 119 -> {120 121}; + 120 -> {129}; 121 -> {122}; 122 -> {123}; - 123 -> {132}; - 123 -> {124} [style=dotted]; - 124 -> {125} [style=dotted]; + 123 -> {124}; + 124 -> {125}; + 125 -> {134}; 125 -> {126} [style=dotted]; 126 -> {127} [style=dotted]; - 127 -> {128}; - 128 -> {132}; + 127 -> {128} [style=dotted]; 128 -> {129} [style=dotted]; - 129 -> {130} [style=dotted]; + 129 -> {130}; + 130 -> {134}; 130 -> {131} [style=dotted]; - 131 -> {109} [color=green style=dotted]; - 132 -> {133}; - 133 -> {134}; + 131 -> {132} [style=dotted]; + 132 -> {133} [style=dotted]; + 133 -> {111} [color=green style=dotted]; 134 -> {135}; 135 -> {136}; + 136 -> {137}; + 137 -> {138}; - subgraph cluster_41 { + subgraph cluster_42 { color=red - 137 [label="Enter function test_5" style="filled" fillcolor=red]; - subgraph cluster_42 { + 139 [label="Enter function test_5" style="filled" fillcolor=red]; + subgraph cluster_43 { color=blue - 138 [label="Enter block"]; - subgraph cluster_43 { + 140 [label="Enter block"]; + subgraph cluster_44 { color=blue - 139 [label="Enter do-while loop"]; - subgraph cluster_44 { + 141 [label="Enter do-while loop"]; + subgraph cluster_45 { color=blue - 140 [label="Enter loop block"]; - subgraph cluster_45 { + 142 [label="Enter loop block"]; + subgraph cluster_46 { color=blue - 141 [label="Enter block"]; - subgraph cluster_46 { + 143 [label="Enter block"]; + subgraph cluster_47 { color=blue - 142 [label="Enter when"]; - subgraph cluster_47 { - color=blue - 143 [label="Enter when branch condition "]; - 144 [label="Access variable R|/b|"]; - 145 [label="Exit when branch condition"]; - } - 146 [label="Synthetic else branch"]; - 147 [label="Enter when branch result"]; + 144 [label="Enter when"]; subgraph cluster_48 { color=blue - 148 [label="Enter block"]; - 149 [label="Access variable R|/x|"]; - 150 [label="Type operator: (R|/x| as R|A|)"]; - 151 [label="Jump: break@@@[Boolean(true)] "]; - 152 [label="Stub" style="filled" fillcolor=gray]; - 153 [label="Exit block" style="filled" fillcolor=gray]; + 145 [label="Enter when branch condition "]; + 146 [label="Access variable R|/b|"]; + 147 [label="Exit when branch condition"]; } - 154 [label="Exit when branch result" style="filled" fillcolor=gray]; - 155 [label="Exit when"]; + 148 [label="Synthetic else branch"]; + 149 [label="Enter when branch result"]; + subgraph cluster_49 { + color=blue + 150 [label="Enter block"]; + 151 [label="Access variable R|/x|"]; + 152 [label="Type operator: (R|/x| as R|A|)"]; + 153 [label="Jump: break@@@[Boolean(true)] "]; + 154 [label="Stub" style="filled" fillcolor=gray]; + 155 [label="Exit block" style="filled" fillcolor=gray]; + } + 156 [label="Exit when branch result" style="filled" fillcolor=gray]; + 157 [label="Exit when"]; } - 156 [label="Exit block"]; + 158 [label="Exit block"]; } - 157 [label="Exit loop block"]; + 159 [label="Exit loop block"]; } - subgraph cluster_49 { + subgraph cluster_50 { color=blue - 158 [label="Enter loop condition"]; - 159 [label="Const: Boolean(true)"]; - 160 [label="Exit loop condition"]; + 160 [label="Enter loop condition"]; + 161 [label="Const: Boolean(true)"]; + 162 [label="Exit loop condition"]; } - 161 [label="Exit do-while loop"]; + 163 [label="Exit do-while loop"]; } - 162 [label="Access variable R|/x|"]; - 163 [label="Smart cast: R|/x|"]; - 164 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 165 [label="Exit block"]; + 164 [label="Access variable R|/x|"]; + 165 [label="Smart cast: R|/x|"]; + 166 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 167 [label="Exit block"]; } - 166 [label="Exit function test_5" style="filled" fillcolor=red]; + 168 [label="Exit function test_5" style="filled" fillcolor=red]; } - 137 -> {138}; - 138 -> {139}; 139 -> {140}; 140 -> {141}; 141 -> {142}; 142 -> {143}; 143 -> {144}; 144 -> {145}; - 145 -> {146 147}; - 146 -> {155}; - 147 -> {148}; - 148 -> {149}; + 145 -> {146}; + 146 -> {147}; + 147 -> {148 149}; + 148 -> {157}; 149 -> {150}; 150 -> {151}; - 151 -> {161}; - 151 -> {152} [style=dotted]; - 152 -> {153} [style=dotted]; + 151 -> {152}; + 152 -> {153}; + 153 -> {163}; 153 -> {154} [style=dotted]; 154 -> {155} [style=dotted]; - 155 -> {156}; - 156 -> {157}; + 155 -> {156} [style=dotted]; + 156 -> {157} [style=dotted]; 157 -> {158}; 158 -> {159}; 159 -> {160}; - 160 -> {140} [color=green style=dashed]; - 160 -> {161} [style=dotted]; + 160 -> {161}; 161 -> {162}; - 162 -> {163}; + 162 -> {142} [color=green style=dashed]; + 162 -> {163} [style=dotted]; 163 -> {164}; 164 -> {165}; 165 -> {166}; + 166 -> {167}; + 167 -> {168}; - subgraph cluster_50 { + subgraph cluster_51 { color=red - 167 [label="Enter function test_6" style="filled" fillcolor=red]; - subgraph cluster_51 { + 169 [label="Enter function test_6" style="filled" fillcolor=red]; + subgraph cluster_52 { color=blue - 168 [label="Enter block"]; - subgraph cluster_52 { + 170 [label="Enter block"]; + subgraph cluster_53 { color=blue - 169 [label="Enter do-while loop"]; - subgraph cluster_53 { + 171 [label="Enter do-while loop"]; + subgraph cluster_54 { color=blue - 170 [label="Enter loop block"]; - subgraph cluster_54 { + 172 [label="Enter loop block"]; + subgraph cluster_55 { color=blue - 171 [label="Enter block"]; - 172 [label="Access variable R|/x|"]; - 173 [label="Type operator: (R|/x| as R|A|)"]; - subgraph cluster_55 { + 173 [label="Enter block"]; + 174 [label="Access variable R|/x|"]; + 175 [label="Type operator: (R|/x| as R|A|)"]; + subgraph cluster_56 { color=blue - 174 [label="Enter when"]; - subgraph cluster_56 { - color=blue - 175 [label="Enter when branch condition "]; - 176 [label="Access variable R|/b|"]; - 177 [label="Exit when branch condition"]; - } - 178 [label="Synthetic else branch"]; - 179 [label="Enter when branch result"]; + 176 [label="Enter when"]; subgraph cluster_57 { color=blue - 180 [label="Enter block"]; - 181 [label="Jump: break@@@[Boolean(true)] "]; - 182 [label="Stub" style="filled" fillcolor=gray]; - 183 [label="Exit block" style="filled" fillcolor=gray]; + 177 [label="Enter when branch condition "]; + 178 [label="Access variable R|/b|"]; + 179 [label="Exit when branch condition"]; } - 184 [label="Exit when branch result" style="filled" fillcolor=gray]; - 185 [label="Exit when"]; + 180 [label="Synthetic else branch"]; + 181 [label="Enter when branch result"]; + subgraph cluster_58 { + color=blue + 182 [label="Enter block"]; + 183 [label="Jump: break@@@[Boolean(true)] "]; + 184 [label="Stub" style="filled" fillcolor=gray]; + 185 [label="Exit block" style="filled" fillcolor=gray]; + } + 186 [label="Exit when branch result" style="filled" fillcolor=gray]; + 187 [label="Exit when"]; } - 186 [label="Exit block"]; + 188 [label="Exit block"]; } - 187 [label="Exit loop block"]; + 189 [label="Exit loop block"]; } - subgraph cluster_58 { + subgraph cluster_59 { color=blue - 188 [label="Enter loop condition"]; - 189 [label="Const: Boolean(true)"]; - 190 [label="Exit loop condition"]; + 190 [label="Enter loop condition"]; + 191 [label="Const: Boolean(true)"]; + 192 [label="Exit loop condition"]; } - 191 [label="Exit do-while loop"]; + 193 [label="Exit do-while loop"]; } - 192 [label="Access variable R|/x|"]; - 193 [label="Smart cast: R|/x|"]; - 194 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 195 [label="Exit block"]; + 194 [label="Access variable R|/x|"]; + 195 [label="Smart cast: R|/x|"]; + 196 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 197 [label="Exit block"]; } - 196 [label="Exit function test_6" style="filled" fillcolor=red]; + 198 [label="Exit function test_6" style="filled" fillcolor=red]; } - 167 -> {168}; - 168 -> {169}; 169 -> {170}; 170 -> {171}; 171 -> {172}; @@ -566,66 +571,66 @@ digraph endlessLoops_kt { 174 -> {175}; 175 -> {176}; 176 -> {177}; - 177 -> {178 179}; - 178 -> {185}; - 179 -> {180}; - 180 -> {181}; - 181 -> {191}; - 181 -> {182} [style=dotted]; - 182 -> {183} [style=dotted]; + 177 -> {178}; + 178 -> {179}; + 179 -> {180 181}; + 180 -> {187}; + 181 -> {182}; + 182 -> {183}; + 183 -> {193}; 183 -> {184} [style=dotted]; 184 -> {185} [style=dotted]; - 185 -> {186}; - 186 -> {187}; + 185 -> {186} [style=dotted]; + 186 -> {187} [style=dotted]; 187 -> {188}; 188 -> {189}; 189 -> {190}; - 190 -> {170} [color=green style=dashed]; - 190 -> {191} [style=dotted]; + 190 -> {191}; 191 -> {192}; - 192 -> {193}; + 192 -> {172} [color=green style=dashed]; + 192 -> {193} [style=dotted]; 193 -> {194}; 194 -> {195}; 195 -> {196}; - - subgraph cluster_59 { - color=red - 197 [label="Enter function test_7" style="filled" fillcolor=red]; - subgraph cluster_60 { - color=blue - 198 [label="Enter block"]; - subgraph cluster_61 { - color=blue - 199 [label="Enter do-while loop"]; - subgraph cluster_62 { - color=blue - 200 [label="Enter loop block"]; - subgraph cluster_63 { - color=blue - 201 [label="Enter block"]; - 202 [label="Access variable R|/x|"]; - 203 [label="Type operator: (R|/x| as R|A|)"]; - 204 [label="Exit block"]; - } - 205 [label="Exit loop block"]; - } - subgraph cluster_64 { - color=blue - 206 [label="Enter loop condition"]; - 207 [label="Const: Boolean(true)"]; - 208 [label="Exit loop condition"]; - } - 209 [label="Exit do-while loop" style="filled" fillcolor=gray]; - } - 210 [label="Access variable R|/x|" style="filled" fillcolor=gray]; - 211 [label="Smart cast: R|/x|" style="filled" fillcolor=gray]; - 212 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=gray]; - 213 [label="Exit block" style="filled" fillcolor=gray]; - } - 214 [label="Exit function test_7" style="filled" fillcolor=gray]; - } + 196 -> {197}; 197 -> {198}; - 198 -> {199}; + + subgraph cluster_60 { + color=red + 199 [label="Enter function test_7" style="filled" fillcolor=red]; + subgraph cluster_61 { + color=blue + 200 [label="Enter block"]; + subgraph cluster_62 { + color=blue + 201 [label="Enter do-while loop"]; + subgraph cluster_63 { + color=blue + 202 [label="Enter loop block"]; + subgraph cluster_64 { + color=blue + 203 [label="Enter block"]; + 204 [label="Access variable R|/x|"]; + 205 [label="Type operator: (R|/x| as R|A|)"]; + 206 [label="Exit block"]; + } + 207 [label="Exit loop block"]; + } + subgraph cluster_65 { + color=blue + 208 [label="Enter loop condition"]; + 209 [label="Const: Boolean(true)"]; + 210 [label="Exit loop condition"]; + } + 211 [label="Exit do-while loop" style="filled" fillcolor=gray]; + } + 212 [label="Access variable R|/x|" style="filled" fillcolor=gray]; + 213 [label="Smart cast: R|/x|" style="filled" fillcolor=gray]; + 214 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=gray]; + 215 [label="Exit block" style="filled" fillcolor=gray]; + } + 216 [label="Exit function test_7" style="filled" fillcolor=gray]; + } 199 -> {200}; 200 -> {201}; 201 -> {202}; @@ -635,12 +640,14 @@ digraph endlessLoops_kt { 205 -> {206}; 206 -> {207}; 207 -> {208}; - 208 -> {200} [color=green style=dashed]; - 208 -> {209} [style=dotted]; - 209 -> {210} [style=dotted]; + 208 -> {209}; + 209 -> {210}; + 210 -> {202} [color=green style=dashed]; 210 -> {211} [style=dotted]; 211 -> {212} [style=dotted]; 212 -> {213} [style=dotted]; 213 -> {214} [style=dotted]; + 214 -> {215} [style=dotted]; + 215 -> {216} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/multipleCasts.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/multipleCasts.dot index e032dc261d0..cc8382d5d7b 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/multipleCasts.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/multipleCasts.dot @@ -5,79 +5,84 @@ digraph multipleCasts_kt { subgraph cluster_0 { color=red - 0 [label="Enter class A" style="filled" fillcolor=red]; - 1 [label="Exit class A" style="filled" fillcolor=red]; + 0 [label="Enter file multipleCasts.kt" style="filled" fillcolor=red]; + 1 [label="Exit file multipleCasts.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; subgraph cluster_1 { color=red - 2 [label="Enter function foo" style="filled" fillcolor=red]; - 3 [label="Exit function foo" style="filled" fillcolor=red]; + 2 [label="Enter class A" style="filled" fillcolor=red]; + 3 [label="Exit class A" style="filled" fillcolor=red]; } - 2 -> {3}; + 2 -> {3} [color=green]; subgraph cluster_2 { color=red - 4 [label="Enter class B" style="filled" fillcolor=red]; - 5 [label="Exit class B" style="filled" fillcolor=red]; + 4 [label="Enter function foo" style="filled" fillcolor=red]; + 5 [label="Exit function foo" style="filled" fillcolor=red]; } - 4 -> {5} [color=green]; + 4 -> {5}; subgraph cluster_3 { color=red - 6 [label="Enter function foo" style="filled" fillcolor=red]; - 7 [label="Exit function foo" style="filled" fillcolor=red]; + 6 [label="Enter class B" style="filled" fillcolor=red]; + 7 [label="Exit class B" style="filled" fillcolor=red]; } - 6 -> {7}; + 6 -> {7} [color=green]; subgraph cluster_4 { color=red - 8 [label="Enter function getAny" style="filled" fillcolor=red]; - subgraph cluster_5 { - color=blue - 9 [label="Enter block"]; - 10 [label="Const: Null(null)"]; - 11 [label="Jump: ^getAny Null(null)"]; - 12 [label="Stub" style="filled" fillcolor=gray]; - 13 [label="Exit block" style="filled" fillcolor=gray]; - } - 14 [label="Exit function getAny" style="filled" fillcolor=red]; + 8 [label="Enter function foo" style="filled" fillcolor=red]; + 9 [label="Exit function foo" style="filled" fillcolor=red]; } 8 -> {9}; - 9 -> {10}; - 10 -> {11}; - 11 -> {14}; - 11 -> {12} [style=dotted]; - 12 -> {13} [style=dotted]; - 13 -> {14} [style=dotted]; - subgraph cluster_6 { + subgraph cluster_5 { color=red - 15 [label="Enter function test_0" style="filled" fillcolor=red]; - subgraph cluster_7 { + 10 [label="Enter function getAny" style="filled" fillcolor=red]; + subgraph cluster_6 { color=blue - 16 [label="Enter block"]; - 17 [label="Function call: R|/getAny|()" style="filled" fillcolor=yellow]; - 18 [label="Variable declaration: lval a: R|kotlin/Any?|"]; - 19 [label="Function call: R|/getAny|()" style="filled" fillcolor=yellow]; - 20 [label="Variable declaration: lval b: R|kotlin/Any?|"]; - 21 [label="Access variable R|/a|"]; - 22 [label="Type operator: (R|/a| as R|A|)"]; - 23 [label="Access variable R|/a|"]; - 24 [label="Smart cast: R|/a|"]; - 25 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 26 [label="Access variable R|/b|"]; - 27 [label="Type operator: (R|/b| as R|B|)"]; - 28 [label="Access variable R|/b|"]; - 29 [label="Smart cast: R|/b|"]; - 30 [label="Function call: R|/b|.R|/B.foo|()" style="filled" fillcolor=yellow]; - 31 [label="Exit block"]; + 11 [label="Enter block"]; + 12 [label="Const: Null(null)"]; + 13 [label="Jump: ^getAny Null(null)"]; + 14 [label="Stub" style="filled" fillcolor=gray]; + 15 [label="Exit block" style="filled" fillcolor=gray]; } - 32 [label="Exit function test_0" style="filled" fillcolor=red]; + 16 [label="Exit function getAny" style="filled" fillcolor=red]; + } + 10 -> {11}; + 11 -> {12}; + 12 -> {13}; + 13 -> {16}; + 13 -> {14} [style=dotted]; + 14 -> {15} [style=dotted]; + 15 -> {16} [style=dotted]; + + subgraph cluster_7 { + color=red + 17 [label="Enter function test_0" style="filled" fillcolor=red]; + subgraph cluster_8 { + color=blue + 18 [label="Enter block"]; + 19 [label="Function call: R|/getAny|()" style="filled" fillcolor=yellow]; + 20 [label="Variable declaration: lval a: R|kotlin/Any?|"]; + 21 [label="Function call: R|/getAny|()" style="filled" fillcolor=yellow]; + 22 [label="Variable declaration: lval b: R|kotlin/Any?|"]; + 23 [label="Access variable R|/a|"]; + 24 [label="Type operator: (R|/a| as R|A|)"]; + 25 [label="Access variable R|/a|"]; + 26 [label="Smart cast: R|/a|"]; + 27 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 28 [label="Access variable R|/b|"]; + 29 [label="Type operator: (R|/b| as R|B|)"]; + 30 [label="Access variable R|/b|"]; + 31 [label="Smart cast: R|/b|"]; + 32 [label="Function call: R|/b|.R|/B.foo|()" style="filled" fillcolor=yellow]; + 33 [label="Exit block"]; + } + 34 [label="Exit function test_0" style="filled" fillcolor=red]; } - 15 -> {16}; - 16 -> {17}; 17 -> {18}; 18 -> {19}; 19 -> {20}; @@ -93,58 +98,58 @@ digraph multipleCasts_kt { 29 -> {30}; 30 -> {31}; 31 -> {32}; - - subgraph cluster_8 { - color=red - 33 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_9 { - color=blue - 34 [label="Enter block"]; - 35 [label="Function call: R|/getAny|()" style="filled" fillcolor=yellow]; - 36 [label="Variable declaration: lval a: R|kotlin/Any?|"]; - 37 [label="Function call: R|/getAny|()" style="filled" fillcolor=yellow]; - 38 [label="Variable declaration: lval b: R|kotlin/Any?|"]; - subgraph cluster_10 { - color=blue - 39 [label="Enter when"]; - subgraph cluster_11 { - color=blue - 40 [label="Enter when branch condition "]; - subgraph cluster_12 { - color=blue - 41 [label="Enter &&"]; - 42 [label="Access variable R|/a|"]; - 43 [label="Type operator: (R|/a| is R|A|)"]; - 44 [label="Exit left part of &&"]; - 45 [label="Enter right part of &&"]; - 46 [label="Access variable R|/b|"]; - 47 [label="Type operator: (R|/b| is R|B|)"]; - 48 [label="Exit &&"]; - } - 49 [label="Exit when branch condition"]; - } - 50 [label="Synthetic else branch"]; - 51 [label="Enter when branch result"]; - subgraph cluster_13 { - color=blue - 52 [label="Enter block"]; - 53 [label="Access variable R|/a|"]; - 54 [label="Smart cast: R|/a|"]; - 55 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 56 [label="Access variable R|/b|"]; - 57 [label="Smart cast: R|/b|"]; - 58 [label="Function call: R|/b|.R|/B.foo|()" style="filled" fillcolor=yellow]; - 59 [label="Exit block"]; - } - 60 [label="Exit when branch result"]; - 61 [label="Exit when"]; - } - 62 [label="Exit block"]; - } - 63 [label="Exit function test_1" style="filled" fillcolor=red]; - } + 32 -> {33}; 33 -> {34}; - 34 -> {35}; + + subgraph cluster_9 { + color=red + 35 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_10 { + color=blue + 36 [label="Enter block"]; + 37 [label="Function call: R|/getAny|()" style="filled" fillcolor=yellow]; + 38 [label="Variable declaration: lval a: R|kotlin/Any?|"]; + 39 [label="Function call: R|/getAny|()" style="filled" fillcolor=yellow]; + 40 [label="Variable declaration: lval b: R|kotlin/Any?|"]; + subgraph cluster_11 { + color=blue + 41 [label="Enter when"]; + subgraph cluster_12 { + color=blue + 42 [label="Enter when branch condition "]; + subgraph cluster_13 { + color=blue + 43 [label="Enter &&"]; + 44 [label="Access variable R|/a|"]; + 45 [label="Type operator: (R|/a| is R|A|)"]; + 46 [label="Exit left part of &&"]; + 47 [label="Enter right part of &&"]; + 48 [label="Access variable R|/b|"]; + 49 [label="Type operator: (R|/b| is R|B|)"]; + 50 [label="Exit &&"]; + } + 51 [label="Exit when branch condition"]; + } + 52 [label="Synthetic else branch"]; + 53 [label="Enter when branch result"]; + subgraph cluster_14 { + color=blue + 54 [label="Enter block"]; + 55 [label="Access variable R|/a|"]; + 56 [label="Smart cast: R|/a|"]; + 57 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 58 [label="Access variable R|/b|"]; + 59 [label="Smart cast: R|/b|"]; + 60 [label="Function call: R|/b|.R|/B.foo|()" style="filled" fillcolor=yellow]; + 61 [label="Exit block"]; + } + 62 [label="Exit when branch result"]; + 63 [label="Exit when"]; + } + 64 [label="Exit block"]; + } + 65 [label="Exit function test_1" style="filled" fillcolor=red]; + } 35 -> {36}; 36 -> {37}; 37 -> {38}; @@ -154,15 +159,15 @@ digraph multipleCasts_kt { 41 -> {42}; 42 -> {43}; 43 -> {44}; - 44 -> {45 48}; + 44 -> {45}; 45 -> {46}; - 46 -> {47}; + 46 -> {47 50}; 47 -> {48}; 48 -> {49}; - 49 -> {50 51}; - 50 -> {61}; - 51 -> {52}; - 52 -> {53}; + 49 -> {50}; + 50 -> {51}; + 51 -> {52 53}; + 52 -> {63}; 53 -> {54}; 54 -> {55}; 55 -> {56}; @@ -173,5 +178,7 @@ digraph multipleCasts_kt { 60 -> {61}; 61 -> {62}; 62 -> {63}; + 63 -> {64}; + 64 -> {65}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/nullability.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/nullability.dot index 9a8eaa390c9..dc80f5e2fb7 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/nullability.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/nullability.dot @@ -5,278 +5,283 @@ digraph nullability_kt { subgraph cluster_0 { color=red - 0 [label="Enter class A" style="filled" fillcolor=red]; - 1 [label="Exit class A" style="filled" fillcolor=red]; + 0 [label="Enter file nullability.kt" style="filled" fillcolor=red]; + 1 [label="Exit file nullability.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; subgraph cluster_1 { color=red - 2 [label="Enter function foo" style="filled" fillcolor=red]; - 3 [label="Exit function foo" style="filled" fillcolor=red]; + 2 [label="Enter class A" style="filled" fillcolor=red]; + 3 [label="Exit class A" style="filled" fillcolor=red]; } - 2 -> {3}; + 2 -> {3} [color=green]; subgraph cluster_2 { color=red - 4 [label="Enter function getA" style="filled" fillcolor=red]; - 5 [label="Exit function getA" style="filled" fillcolor=red]; + 4 [label="Enter function foo" style="filled" fillcolor=red]; + 5 [label="Exit function foo" style="filled" fillcolor=red]; } 4 -> {5}; subgraph cluster_3 { color=red - 6 [label="Enter class MyData" style="filled" fillcolor=red]; - 7 [label="Exit class MyData" style="filled" fillcolor=red]; + 6 [label="Enter function getA" style="filled" fillcolor=red]; + 7 [label="Exit function getA" style="filled" fillcolor=red]; } - 6 -> {7} [color=green]; + 6 -> {7}; subgraph cluster_4 { color=red - 8 [label="Enter function fs" style="filled" fillcolor=red]; - 9 [label="Exit function fs" style="filled" fillcolor=red]; + 8 [label="Enter class MyData" style="filled" fillcolor=red]; + 9 [label="Exit class MyData" style="filled" fillcolor=red]; } - 8 -> {9}; + 8 -> {9} [color=green]; subgraph cluster_5 { color=red - 10 [label="Enter class Q" style="filled" fillcolor=red]; - 11 [label="Exit class Q" style="filled" fillcolor=red]; + 10 [label="Enter function fs" style="filled" fillcolor=red]; + 11 [label="Exit function fs" style="filled" fillcolor=red]; } - 10 -> {11} [color=green]; + 10 -> {11}; subgraph cluster_6 { color=red - 12 [label="Enter function fdata" style="filled" fillcolor=red]; - 13 [label="Exit function fdata" style="filled" fillcolor=red]; + 12 [label="Enter class Q" style="filled" fillcolor=red]; + 13 [label="Exit class Q" style="filled" fillcolor=red]; } - 12 -> {13}; + 12 -> {13} [color=green]; subgraph cluster_7 { color=red - 14 [label="Enter class QImpl" style="filled" fillcolor=red]; - subgraph cluster_8 { - color=blue - 15 [label="Enter property" style="filled" fillcolor=red]; - 16 [label="Access variable R|/data|"]; - 17 [label="Exit property" style="filled" fillcolor=red]; - } + 14 [label="Enter function fdata" style="filled" fillcolor=red]; + 15 [label="Exit function fdata" style="filled" fillcolor=red]; + } + 14 -> {15}; + + subgraph cluster_8 { + color=red + 16 [label="Enter class QImpl" style="filled" fillcolor=red]; subgraph cluster_9 { color=blue - 18 [label="Enter function " style="filled" fillcolor=red]; - 19 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 20 [label="Exit function " style="filled" fillcolor=red]; + 17 [label="Enter property" style="filled" fillcolor=red]; + 18 [label="Access variable R|/data|"]; + 19 [label="Exit property" style="filled" fillcolor=red]; } - 21 [label="Exit class QImpl" style="filled" fillcolor=red]; + subgraph cluster_10 { + color=blue + 20 [label="Enter function " style="filled" fillcolor=red]; + 21 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 22 [label="Exit function " style="filled" fillcolor=red]; + } + 23 [label="Exit class QImpl" style="filled" fillcolor=red]; } - 14 -> {15} [color=green]; - 14 -> {21} [style=dotted]; - 14 -> {15 18} [style=dashed]; - 15 -> {16}; - 16 -> {17}; - 17 -> {18} [color=green]; + 16 -> {17} [color=green]; + 16 -> {23} [style=dotted]; + 16 -> {17 20} [style=dashed]; + 17 -> {18}; 18 -> {19}; - 19 -> {20}; - 20 -> {21} [color=green]; + 19 -> {20} [color=green]; + 20 -> {21}; + 21 -> {22}; + 22 -> {23} [color=green]; - subgraph cluster_10 { + subgraph cluster_11 { color=red - 22 [label="Enter function fdata" style="filled" fillcolor=red]; - subgraph cluster_11 { + 24 [label="Enter function fdata" style="filled" fillcolor=red]; + subgraph cluster_12 { color=blue - 23 [label="Enter block"]; - 24 [label="Const: Null(null)"]; - 25 [label="Jump: ^fdata Null(null)"]; - 26 [label="Stub" style="filled" fillcolor=gray]; - 27 [label="Exit block" style="filled" fillcolor=gray]; + 25 [label="Enter block"]; + 26 [label="Const: Null(null)"]; + 27 [label="Jump: ^fdata Null(null)"]; + 28 [label="Stub" style="filled" fillcolor=gray]; + 29 [label="Exit block" style="filled" fillcolor=gray]; } - 28 [label="Exit function fdata" style="filled" fillcolor=red]; + 30 [label="Exit function fdata" style="filled" fillcolor=red]; } - 22 -> {23}; - 23 -> {24}; 24 -> {25}; - 25 -> {28}; - 25 -> {26} [style=dotted]; - 26 -> {27} [style=dotted]; + 25 -> {26}; + 26 -> {27}; + 27 -> {30}; 27 -> {28} [style=dotted]; + 28 -> {29} [style=dotted]; + 29 -> {30} [style=dotted]; - subgraph cluster_12 { + subgraph cluster_13 { color=red - 29 [label="Enter class QImplMutable" style="filled" fillcolor=red]; - subgraph cluster_13 { - color=blue - 30 [label="Enter property" style="filled" fillcolor=red]; - 31 [label="Access variable R|/data|"]; - 32 [label="Exit property" style="filled" fillcolor=red]; - } + 31 [label="Enter class QImplMutable" style="filled" fillcolor=red]; subgraph cluster_14 { color=blue - 33 [label="Enter function " style="filled" fillcolor=red]; - 34 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 35 [label="Exit function " style="filled" fillcolor=red]; + 32 [label="Enter property" style="filled" fillcolor=red]; + 33 [label="Access variable R|/data|"]; + 34 [label="Exit property" style="filled" fillcolor=red]; } - 36 [label="Exit class QImplMutable" style="filled" fillcolor=red]; + subgraph cluster_15 { + color=blue + 35 [label="Enter function " style="filled" fillcolor=red]; + 36 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 37 [label="Exit function " style="filled" fillcolor=red]; + } + 38 [label="Exit class QImplMutable" style="filled" fillcolor=red]; } - 29 -> {30} [color=green]; - 29 -> {36} [style=dotted]; - 29 -> {30 33} [style=dashed]; - 30 -> {31}; - 31 -> {32}; - 32 -> {33} [color=green]; + 31 -> {32} [color=green]; + 31 -> {38} [style=dotted]; + 31 -> {32 35} [style=dashed]; + 32 -> {33}; 33 -> {34}; - 34 -> {35}; - 35 -> {36} [color=green]; + 34 -> {35} [color=green]; + 35 -> {36}; + 36 -> {37}; + 37 -> {38} [color=green]; - subgraph cluster_15 { + subgraph cluster_16 { color=red - 37 [label="Enter function fdata" style="filled" fillcolor=red]; - subgraph cluster_16 { + 39 [label="Enter function fdata" style="filled" fillcolor=red]; + subgraph cluster_17 { color=blue - 38 [label="Enter block"]; - 39 [label="Const: Null(null)"]; - 40 [label="Jump: ^fdata Null(null)"]; - 41 [label="Stub" style="filled" fillcolor=gray]; - 42 [label="Exit block" style="filled" fillcolor=gray]; + 40 [label="Enter block"]; + 41 [label="Const: Null(null)"]; + 42 [label="Jump: ^fdata Null(null)"]; + 43 [label="Stub" style="filled" fillcolor=gray]; + 44 [label="Exit block" style="filled" fillcolor=gray]; } - 43 [label="Exit function fdata" style="filled" fillcolor=red]; + 45 [label="Exit function fdata" style="filled" fillcolor=red]; } - 37 -> {38}; - 38 -> {39}; 39 -> {40}; - 40 -> {43}; - 40 -> {41} [style=dotted]; - 41 -> {42} [style=dotted]; + 40 -> {41}; + 41 -> {42}; + 42 -> {45}; 42 -> {43} [style=dotted]; + 43 -> {44} [style=dotted]; + 44 -> {45} [style=dotted]; - subgraph cluster_17 { + subgraph cluster_18 { color=red - 44 [label="Enter class QImplWithCustomGetter" style="filled" fillcolor=red]; - subgraph cluster_18 { + 46 [label="Enter class QImplWithCustomGetter" style="filled" fillcolor=red]; + subgraph cluster_19 { color=blue - 45 [label="Enter function " style="filled" fillcolor=red]; - 46 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 47 [label="Exit function " style="filled" fillcolor=red]; + 47 [label="Enter function " style="filled" fillcolor=red]; + 48 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 49 [label="Exit function " style="filled" fillcolor=red]; } - 48 [label="Exit class QImplWithCustomGetter" style="filled" fillcolor=red]; + 50 [label="Exit class QImplWithCustomGetter" style="filled" fillcolor=red]; } - 44 -> {45} [color=green]; - 44 -> {48} [style=dotted]; - 44 -> {45} [style=dashed]; - 45 -> {46}; - 46 -> {47}; - 47 -> {48} [color=green]; + 46 -> {47} [color=green]; + 46 -> {50} [style=dotted]; + 46 -> {47} [style=dashed]; + 47 -> {48}; + 48 -> {49}; + 49 -> {50} [color=green]; - subgraph cluster_19 { + subgraph cluster_20 { color=red - 49 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_20 { + 51 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_21 { color=blue - 50 [label="Enter block"]; - 51 [label="Const: Null(null)"]; - 52 [label="Jump: ^ Null(null)"]; - 53 [label="Stub" style="filled" fillcolor=gray]; - 54 [label="Exit block" style="filled" fillcolor=gray]; + 52 [label="Enter block"]; + 53 [label="Const: Null(null)"]; + 54 [label="Jump: ^ Null(null)"]; + 55 [label="Stub" style="filled" fillcolor=gray]; + 56 [label="Exit block" style="filled" fillcolor=gray]; } - 55 [label="Exit function " style="filled" fillcolor=red]; + 57 [label="Exit function " style="filled" fillcolor=red]; } - 49 -> {50}; - 50 -> {51}; 51 -> {52}; - 52 -> {55}; - 52 -> {53} [style=dotted]; - 53 -> {54} [style=dotted]; + 52 -> {53}; + 53 -> {54}; + 54 -> {57}; 54 -> {55} [style=dotted]; + 55 -> {56} [style=dotted]; + 56 -> {57} [style=dotted]; - subgraph cluster_21 { + subgraph cluster_22 { color=red - 56 [label="Enter function fdata" style="filled" fillcolor=red]; - subgraph cluster_22 { + 58 [label="Enter function fdata" style="filled" fillcolor=red]; + subgraph cluster_23 { color=blue - 57 [label="Enter block"]; - 58 [label="Const: Null(null)"]; - 59 [label="Jump: ^fdata Null(null)"]; - 60 [label="Stub" style="filled" fillcolor=gray]; - 61 [label="Exit block" style="filled" fillcolor=gray]; + 59 [label="Enter block"]; + 60 [label="Const: Null(null)"]; + 61 [label="Jump: ^fdata Null(null)"]; + 62 [label="Stub" style="filled" fillcolor=gray]; + 63 [label="Exit block" style="filled" fillcolor=gray]; } - 62 [label="Exit function fdata" style="filled" fillcolor=red]; + 64 [label="Exit function fdata" style="filled" fillcolor=red]; } - 56 -> {57}; - 57 -> {58}; 58 -> {59}; - 59 -> {62}; - 59 -> {60} [style=dotted]; - 60 -> {61} [style=dotted]; + 59 -> {60}; + 60 -> {61}; + 61 -> {64}; 61 -> {62} [style=dotted]; + 62 -> {63} [style=dotted]; + 63 -> {64} [style=dotted]; - subgraph cluster_23 { + subgraph cluster_24 { color=red - 63 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_24 { + 65 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_25 { color=blue - 64 [label="Enter block"]; - subgraph cluster_25 { + 66 [label="Enter block"]; + subgraph cluster_26 { color=blue - 65 [label="Enter when"]; - subgraph cluster_26 { - color=blue - 66 [label="Enter when branch condition "]; - 67 [label="Access variable R|/x|"]; - 68 [label="Const: Null(null)"]; - 69 [label="Equality operator !="]; - 70 [label="Exit when branch condition"]; - } + 67 [label="Enter when"]; subgraph cluster_27 { color=blue - 71 [label="Enter when branch condition else"]; + 68 [label="Enter when branch condition "]; + 69 [label="Access variable R|/x|"]; + 70 [label="Const: Null(null)"]; + 71 [label="Equality operator !="]; 72 [label="Exit when branch condition"]; } - 73 [label="Enter when branch result"]; subgraph cluster_28 { color=blue - 74 [label="Enter block"]; - 75 [label="Access variable R|/x|"]; - 76 [label="Smart cast: R|/x|"]; - 77 [label="Function call: R|/x|.R|/A.foo#|()" style="filled" fillcolor=yellow]; - 78 [label="Exit block"]; + 73 [label="Enter when branch condition else"]; + 74 [label="Exit when branch condition"]; } - 79 [label="Exit when branch result"]; - 80 [label="Enter when branch result"]; + 75 [label="Enter when branch result"]; subgraph cluster_29 { color=blue - 81 [label="Enter block"]; - 82 [label="Access variable R|/x|"]; - 83 [label="Smart cast: R|/x|"]; - 84 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 85 [label="Exit block"]; + 76 [label="Enter block"]; + 77 [label="Access variable R|/x|"]; + 78 [label="Smart cast: R|/x|"]; + 79 [label="Function call: R|/x|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + 80 [label="Exit block"]; } - 86 [label="Exit when branch result"]; - 87 [label="Exit when"]; + 81 [label="Exit when branch result"]; + 82 [label="Enter when branch result"]; + subgraph cluster_30 { + color=blue + 83 [label="Enter block"]; + 84 [label="Access variable R|/x|"]; + 85 [label="Smart cast: R|/x|"]; + 86 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 87 [label="Exit block"]; + } + 88 [label="Exit when branch result"]; + 89 [label="Exit when"]; } - 88 [label="Access variable R|/x|"]; - 89 [label="Function call: R|/x|.R|/A.foo#|()" style="filled" fillcolor=yellow]; - 90 [label="Exit block"]; + 90 [label="Access variable R|/x|"]; + 91 [label="Function call: R|/x|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + 92 [label="Exit block"]; } - 91 [label="Exit function test_1" style="filled" fillcolor=red]; + 93 [label="Exit function test_1" style="filled" fillcolor=red]; } - 63 -> {64}; - 64 -> {65}; 65 -> {66}; 66 -> {67}; 67 -> {68}; 68 -> {69}; 69 -> {70}; - 70 -> {71 80}; + 70 -> {71}; 71 -> {72}; - 72 -> {73}; + 72 -> {73 82}; 73 -> {74}; 74 -> {75}; 75 -> {76}; 76 -> {77}; 77 -> {78}; 78 -> {79}; - 79 -> {87}; + 79 -> {80}; 80 -> {81}; - 81 -> {82}; + 81 -> {89}; 82 -> {83}; 83 -> {84}; 84 -> {85}; @@ -286,76 +291,76 @@ digraph nullability_kt { 88 -> {89}; 89 -> {90}; 90 -> {91}; + 91 -> {92}; + 92 -> {93}; - subgraph cluster_30 { + subgraph cluster_31 { color=red - 92 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_31 { + 94 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_32 { color=blue - 93 [label="Enter block"]; - subgraph cluster_32 { + 95 [label="Enter block"]; + subgraph cluster_33 { color=blue - 94 [label="Enter when"]; - subgraph cluster_33 { - color=blue - 95 [label="Enter when branch condition "]; - 96 [label="Access variable R|/x|"]; - 97 [label="Const: Null(null)"]; - 98 [label="Equality operator =="]; - 99 [label="Exit when branch condition"]; - } + 96 [label="Enter when"]; subgraph cluster_34 { color=blue - 100 [label="Enter when branch condition else"]; + 97 [label="Enter when branch condition "]; + 98 [label="Access variable R|/x|"]; + 99 [label="Const: Null(null)"]; + 100 [label="Equality operator =="]; 101 [label="Exit when branch condition"]; } - 102 [label="Enter when branch result"]; subgraph cluster_35 { color=blue - 103 [label="Enter block"]; - 104 [label="Access variable R|/x|"]; - 105 [label="Smart cast: R|/x|"]; - 106 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 107 [label="Exit block"]; + 102 [label="Enter when branch condition else"]; + 103 [label="Exit when branch condition"]; } - 108 [label="Exit when branch result"]; - 109 [label="Enter when branch result"]; + 104 [label="Enter when branch result"]; subgraph cluster_36 { color=blue - 110 [label="Enter block"]; - 111 [label="Access variable R|/x|"]; - 112 [label="Smart cast: R|/x|"]; - 113 [label="Function call: R|/x|.R|/A.foo#|()" style="filled" fillcolor=yellow]; - 114 [label="Exit block"]; + 105 [label="Enter block"]; + 106 [label="Access variable R|/x|"]; + 107 [label="Smart cast: R|/x|"]; + 108 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 109 [label="Exit block"]; } - 115 [label="Exit when branch result"]; - 116 [label="Exit when"]; + 110 [label="Exit when branch result"]; + 111 [label="Enter when branch result"]; + subgraph cluster_37 { + color=blue + 112 [label="Enter block"]; + 113 [label="Access variable R|/x|"]; + 114 [label="Smart cast: R|/x|"]; + 115 [label="Function call: R|/x|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + 116 [label="Exit block"]; + } + 117 [label="Exit when branch result"]; + 118 [label="Exit when"]; } - 117 [label="Access variable R|/x|"]; - 118 [label="Function call: R|/x|.R|/A.foo#|()" style="filled" fillcolor=yellow]; - 119 [label="Exit block"]; + 119 [label="Access variable R|/x|"]; + 120 [label="Function call: R|/x|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + 121 [label="Exit block"]; } - 120 [label="Exit function test_2" style="filled" fillcolor=red]; + 122 [label="Exit function test_2" style="filled" fillcolor=red]; } - 92 -> {93}; - 93 -> {94}; 94 -> {95}; 95 -> {96}; 96 -> {97}; 97 -> {98}; 98 -> {99}; - 99 -> {100 109}; + 99 -> {100}; 100 -> {101}; - 101 -> {102}; + 101 -> {102 111}; 102 -> {103}; 103 -> {104}; 104 -> {105}; 105 -> {106}; 106 -> {107}; 107 -> {108}; - 108 -> {116}; + 108 -> {109}; 109 -> {110}; - 110 -> {111}; + 110 -> {118}; 111 -> {112}; 112 -> {113}; 113 -> {114}; @@ -365,181 +370,181 @@ digraph nullability_kt { 117 -> {118}; 118 -> {119}; 119 -> {120}; - - subgraph cluster_37 { - color=red - 121 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_38 { - color=blue - 122 [label="Enter block"]; - 123 [label="Access variable R|/x|"]; - 124 [label="Exit lhs of ?:"]; - 125 [label="Enter rhs of ?:"]; - 126 [label="Jump: ^test_3 Unit"]; - 127 [label="Stub" style="filled" fillcolor=gray]; - 128 [label="Lhs of ?: is not null"]; - 129 [label="Exit ?:"]; - 130 [label="Access variable R|/x|"]; - 131 [label="Smart cast: R|/x|"]; - 132 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 133 [label="Exit block"]; - } - 134 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 120 -> {121}; 121 -> {122}; - 122 -> {123}; + + subgraph cluster_38 { + color=red + 123 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_39 { + color=blue + 124 [label="Enter block"]; + 125 [label="Access variable R|/x|"]; + 126 [label="Exit lhs of ?:"]; + 127 [label="Enter rhs of ?:"]; + 128 [label="Jump: ^test_3 Unit"]; + 129 [label="Stub" style="filled" fillcolor=gray]; + 130 [label="Lhs of ?: is not null"]; + 131 [label="Exit ?:"]; + 132 [label="Access variable R|/x|"]; + 133 [label="Smart cast: R|/x|"]; + 134 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 135 [label="Exit block"]; + } + 136 [label="Exit function test_3" style="filled" fillcolor=red]; + } 123 -> {124}; - 124 -> {125 128}; + 124 -> {125}; 125 -> {126}; - 126 -> {134}; - 126 -> {127} [style=dotted]; - 127 -> {129} [style=dotted]; - 128 -> {129}; - 129 -> {130}; + 126 -> {127 130}; + 127 -> {128}; + 128 -> {136}; + 128 -> {129} [style=dotted]; + 129 -> {131} [style=dotted]; 130 -> {131}; 131 -> {132}; 132 -> {133}; 133 -> {134}; + 134 -> {135}; + 135 -> {136}; - subgraph cluster_39 { + subgraph cluster_40 { color=red - 135 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_40 { + 137 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_41 { color=blue - 136 [label="Enter block"]; - subgraph cluster_41 { + 138 [label="Enter block"]; + subgraph cluster_42 { color=blue - 137 [label="Enter when"]; - subgraph cluster_42 { - color=blue - 138 [label="Enter when branch condition "]; - 139 [label="Access variable R|/x|"]; - 140 [label="Enter safe call"]; - 141 [label="Function call: $subj$.R|/A.getA|()" style="filled" fillcolor=yellow]; - 142 [label="Exit safe call"]; - 143 [label="Const: Null(null)"]; - 144 [label="Equality operator =="]; - 145 [label="Exit when branch condition"]; - } - 146 [label="Synthetic else branch"]; - 147 [label="Enter when branch result"]; + 139 [label="Enter when"]; subgraph cluster_43 { color=blue - 148 [label="Enter block"]; - 149 [label="Jump: ^test_4 Unit"]; - 150 [label="Stub" style="filled" fillcolor=gray]; - 151 [label="Exit block" style="filled" fillcolor=gray]; + 140 [label="Enter when branch condition "]; + 141 [label="Access variable R|/x|"]; + 142 [label="Enter safe call"]; + 143 [label="Function call: $subj$.R|/A.getA|()" style="filled" fillcolor=yellow]; + 144 [label="Exit safe call"]; + 145 [label="Const: Null(null)"]; + 146 [label="Equality operator =="]; + 147 [label="Exit when branch condition"]; } - 152 [label="Exit when branch result" style="filled" fillcolor=gray]; - 153 [label="Exit when"]; + 148 [label="Synthetic else branch"]; + 149 [label="Enter when branch result"]; + subgraph cluster_44 { + color=blue + 150 [label="Enter block"]; + 151 [label="Jump: ^test_4 Unit"]; + 152 [label="Stub" style="filled" fillcolor=gray]; + 153 [label="Exit block" style="filled" fillcolor=gray]; + } + 154 [label="Exit when branch result" style="filled" fillcolor=gray]; + 155 [label="Exit when"]; } - 154 [label="Access variable R|/x|"]; - 155 [label="Smart cast: R|/x|"]; - 156 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 157 [label="Exit block"]; + 156 [label="Access variable R|/x|"]; + 157 [label="Smart cast: R|/x|"]; + 158 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 159 [label="Exit block"]; } - 158 [label="Exit function test_4" style="filled" fillcolor=red]; + 160 [label="Exit function test_4" style="filled" fillcolor=red]; } - 135 -> {136}; - 136 -> {137}; 137 -> {138}; 138 -> {139}; - 139 -> {140 142}; + 139 -> {140}; 140 -> {141}; - 141 -> {142}; + 141 -> {142 144}; 142 -> {143}; 143 -> {144}; 144 -> {145}; - 145 -> {146 147}; - 146 -> {153}; - 147 -> {148}; - 148 -> {149}; - 149 -> {158}; - 149 -> {150} [style=dotted]; - 150 -> {151} [style=dotted]; + 145 -> {146}; + 146 -> {147}; + 147 -> {148 149}; + 148 -> {155}; + 149 -> {150}; + 150 -> {151}; + 151 -> {160}; 151 -> {152} [style=dotted]; 152 -> {153} [style=dotted]; - 153 -> {154}; - 154 -> {155}; + 153 -> {154} [style=dotted]; + 154 -> {155} [style=dotted]; 155 -> {156}; 156 -> {157}; 157 -> {158}; + 158 -> {159}; + 159 -> {160}; - subgraph cluster_44 { + subgraph cluster_45 { color=red - 159 [label="Enter function test_5" style="filled" fillcolor=red]; - subgraph cluster_45 { + 161 [label="Enter function test_5" style="filled" fillcolor=red]; + subgraph cluster_46 { color=blue - 160 [label="Enter block"]; - subgraph cluster_46 { + 162 [label="Enter block"]; + subgraph cluster_47 { color=blue - 161 [label="Enter when"]; - subgraph cluster_47 { - color=blue - 162 [label="Enter when branch condition "]; - 163 [label="Access variable R|/q|"]; - 164 [label="Enter safe call"]; - 165 [label="Access variable R|/Q.data|"]; - 166 [label="Enter safe call"]; - 167 [label="Access variable R|/MyData.s|"]; - 168 [label="Enter safe call"]; - 169 [label="Function call: $subj$.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 170 [label="Exit safe call"]; - 171 [label="Exit safe call"]; - 172 [label="Exit safe call"]; - 173 [label="Const: Null(null)"]; - 174 [label="Equality operator !="]; - 175 [label="Exit when branch condition"]; - } - 176 [label="Synthetic else branch"]; - 177 [label="Enter when branch result"]; + 163 [label="Enter when"]; subgraph cluster_48 { color=blue - 178 [label="Enter block"]; - 179 [label="Access variable R|/q|"]; - 180 [label="Smart cast: R|/q|"]; - 181 [label="Access variable R|/Q.data|"]; - 182 [label="Smart cast: R|/q|.R|/Q.data|"]; - 183 [label="Access variable R|/q|"]; - 184 [label="Smart cast: R|/q|"]; - 185 [label="Access variable R|/Q.data|"]; - 186 [label="Smart cast: R|/q|.R|/Q.data|"]; - 187 [label="Access variable R|/MyData.s#|"]; - 188 [label="Access variable R|/q|"]; - 189 [label="Smart cast: R|/q|"]; - 190 [label="Access variable R|/Q.data|"]; - 191 [label="Smart cast: R|/q|.R|/Q.data|"]; - 192 [label="Access variable R|/MyData.s#|"]; - 193 [label="Function call: R|/q|.R|/Q.data|.R|/MyData.s#|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 194 [label="Exit block"]; + 164 [label="Enter when branch condition "]; + 165 [label="Access variable R|/q|"]; + 166 [label="Enter safe call"]; + 167 [label="Access variable R|/Q.data|"]; + 168 [label="Enter safe call"]; + 169 [label="Access variable R|/MyData.s|"]; + 170 [label="Enter safe call"]; + 171 [label="Function call: $subj$.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 172 [label="Exit safe call"]; + 173 [label="Exit safe call"]; + 174 [label="Exit safe call"]; + 175 [label="Const: Null(null)"]; + 176 [label="Equality operator !="]; + 177 [label="Exit when branch condition"]; } - 195 [label="Exit when branch result"]; - 196 [label="Exit when"]; + 178 [label="Synthetic else branch"]; + 179 [label="Enter when branch result"]; + subgraph cluster_49 { + color=blue + 180 [label="Enter block"]; + 181 [label="Access variable R|/q|"]; + 182 [label="Smart cast: R|/q|"]; + 183 [label="Access variable R|/Q.data|"]; + 184 [label="Smart cast: R|/q|.R|/Q.data|"]; + 185 [label="Access variable R|/q|"]; + 186 [label="Smart cast: R|/q|"]; + 187 [label="Access variable R|/Q.data|"]; + 188 [label="Smart cast: R|/q|.R|/Q.data|"]; + 189 [label="Access variable R|/MyData.s#|"]; + 190 [label="Access variable R|/q|"]; + 191 [label="Smart cast: R|/q|"]; + 192 [label="Access variable R|/Q.data|"]; + 193 [label="Smart cast: R|/q|.R|/Q.data|"]; + 194 [label="Access variable R|/MyData.s#|"]; + 195 [label="Function call: R|/q|.R|/Q.data|.R|/MyData.s#|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 196 [label="Exit block"]; + } + 197 [label="Exit when branch result"]; + 198 [label="Exit when"]; } - 197 [label="Exit block"]; + 199 [label="Exit block"]; } - 198 [label="Exit function test_5" style="filled" fillcolor=red]; + 200 [label="Exit function test_5" style="filled" fillcolor=red]; } - 159 -> {160}; - 160 -> {161}; 161 -> {162}; 162 -> {163}; - 163 -> {164 170}; + 163 -> {164}; 164 -> {165}; - 165 -> {166 170}; + 165 -> {166 172}; 166 -> {167}; - 167 -> {168 171}; + 167 -> {168 172}; 168 -> {169}; - 169 -> {172}; + 169 -> {170 173}; 170 -> {171}; - 171 -> {172}; + 171 -> {174}; 172 -> {173}; 173 -> {174}; 174 -> {175}; - 175 -> {176 177}; - 176 -> {196}; - 177 -> {178}; - 178 -> {179}; + 175 -> {176}; + 176 -> {177}; + 177 -> {178 179}; + 178 -> {198}; 179 -> {180}; 180 -> {181}; 181 -> {182}; @@ -559,68 +564,68 @@ digraph nullability_kt { 195 -> {196}; 196 -> {197}; 197 -> {198}; - - subgraph cluster_49 { - color=red - 199 [label="Enter function test_6" style="filled" fillcolor=red]; - subgraph cluster_50 { - color=blue - 200 [label="Enter block"]; - 201 [label="Access variable R|/q|"]; - 202 [label="Enter safe call"]; - 203 [label="Access variable R|/Q.data|"]; - 204 [label="Enter safe call"]; - 205 [label="Access variable R|/MyData.s|"]; - 206 [label="Enter safe call"]; - 207 [label="Function call: $subj$.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 208 [label="Exit safe call"]; - 209 [label="Exit lhs of ?:"]; - 210 [label="Lhs of ?: is not null"]; - 211 [label="Exit safe call"]; - 212 [label="Exit safe call"]; - 213 [label="Enter rhs of ?:"]; - 214 [label="Jump: ^test_6 Unit"]; - 215 [label="Stub" style="filled" fillcolor=gray]; - 216 [label="Exit ?:"]; - 217 [label="Access variable R|/q|"]; - 218 [label="Smart cast: R|/q|"]; - 219 [label="Access variable R|/Q.data|"]; - 220 [label="Smart cast: R|/q|.R|/Q.data|"]; - 221 [label="Access variable R|/q|"]; - 222 [label="Smart cast: R|/q|"]; - 223 [label="Access variable R|/Q.data|"]; - 224 [label="Smart cast: R|/q|.R|/Q.data|"]; - 225 [label="Access variable R|/MyData.s#|"]; - 226 [label="Access variable R|/q|"]; - 227 [label="Smart cast: R|/q|"]; - 228 [label="Access variable R|/Q.data|"]; - 229 [label="Smart cast: R|/q|.R|/Q.data|"]; - 230 [label="Access variable R|/MyData.s#|"]; - 231 [label="Function call: R|/q|.R|/Q.data|.R|/MyData.s#|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 232 [label="Exit block"]; - } - 233 [label="Exit function test_6" style="filled" fillcolor=red]; - } + 198 -> {199}; 199 -> {200}; - 200 -> {201}; - 201 -> {202 211}; + + subgraph cluster_50 { + color=red + 201 [label="Enter function test_6" style="filled" fillcolor=red]; + subgraph cluster_51 { + color=blue + 202 [label="Enter block"]; + 203 [label="Access variable R|/q|"]; + 204 [label="Enter safe call"]; + 205 [label="Access variable R|/Q.data|"]; + 206 [label="Enter safe call"]; + 207 [label="Access variable R|/MyData.s|"]; + 208 [label="Enter safe call"]; + 209 [label="Function call: $subj$.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 210 [label="Exit safe call"]; + 211 [label="Exit lhs of ?:"]; + 212 [label="Lhs of ?: is not null"]; + 213 [label="Exit safe call"]; + 214 [label="Exit safe call"]; + 215 [label="Enter rhs of ?:"]; + 216 [label="Jump: ^test_6 Unit"]; + 217 [label="Stub" style="filled" fillcolor=gray]; + 218 [label="Exit ?:"]; + 219 [label="Access variable R|/q|"]; + 220 [label="Smart cast: R|/q|"]; + 221 [label="Access variable R|/Q.data|"]; + 222 [label="Smart cast: R|/q|.R|/Q.data|"]; + 223 [label="Access variable R|/q|"]; + 224 [label="Smart cast: R|/q|"]; + 225 [label="Access variable R|/Q.data|"]; + 226 [label="Smart cast: R|/q|.R|/Q.data|"]; + 227 [label="Access variable R|/MyData.s#|"]; + 228 [label="Access variable R|/q|"]; + 229 [label="Smart cast: R|/q|"]; + 230 [label="Access variable R|/Q.data|"]; + 231 [label="Smart cast: R|/q|.R|/Q.data|"]; + 232 [label="Access variable R|/MyData.s#|"]; + 233 [label="Function call: R|/q|.R|/Q.data|.R|/MyData.s#|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 234 [label="Exit block"]; + } + 235 [label="Exit function test_6" style="filled" fillcolor=red]; + } + 201 -> {202}; 202 -> {203}; - 203 -> {204 211}; + 203 -> {204 213}; 204 -> {205}; - 205 -> {206 212}; + 205 -> {206 213}; 206 -> {207}; - 207 -> {208}; + 207 -> {208 214}; 208 -> {209}; - 209 -> {210 213}; - 210 -> {216}; - 211 -> {212}; - 212 -> {213}; + 209 -> {210}; + 210 -> {211}; + 211 -> {212 215}; + 212 -> {218}; 213 -> {214}; - 214 -> {233}; - 214 -> {215} [style=dotted]; - 215 -> {216} [style=dotted]; - 216 -> {217}; - 217 -> {218}; + 214 -> {215}; + 215 -> {216}; + 216 -> {235}; + 216 -> {217} [style=dotted]; + 217 -> {218} [style=dotted]; 218 -> {219}; 219 -> {220}; 220 -> {221}; @@ -636,79 +641,79 @@ digraph nullability_kt { 230 -> {231}; 231 -> {232}; 232 -> {233}; + 233 -> {234}; + 234 -> {235}; - subgraph cluster_51 { + subgraph cluster_52 { color=red - 234 [label="Enter function test_7" style="filled" fillcolor=red]; - subgraph cluster_52 { + 236 [label="Enter function test_7" style="filled" fillcolor=red]; + subgraph cluster_53 { color=blue - 235 [label="Enter block"]; - subgraph cluster_53 { + 237 [label="Enter block"]; + subgraph cluster_54 { color=blue - 236 [label="Enter when"]; - subgraph cluster_54 { - color=blue - 237 [label="Enter when branch condition "]; - 238 [label="Access variable R|/q|"]; - 239 [label="Enter safe call"]; - 240 [label="Function call: $subj$.R|/Q.fdata|()" style="filled" fillcolor=yellow]; - 241 [label="Enter safe call"]; - 242 [label="Function call: $subj$.R|/MyData.fs|()" style="filled" fillcolor=yellow]; - 243 [label="Enter safe call"]; - 244 [label="Function call: $subj$.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 245 [label="Exit safe call"]; - 246 [label="Exit safe call"]; - 247 [label="Exit safe call"]; - 248 [label="Const: Null(null)"]; - 249 [label="Equality operator !="]; - 250 [label="Exit when branch condition"]; - } - 251 [label="Synthetic else branch"]; - 252 [label="Enter when branch result"]; + 238 [label="Enter when"]; subgraph cluster_55 { color=blue - 253 [label="Enter block"]; - 254 [label="Access variable R|/q|"]; - 255 [label="Smart cast: R|/q|"]; - 256 [label="Function call: R|/q|.R|/Q.fdata|()" style="filled" fillcolor=yellow]; - 257 [label="Access variable R|/q|"]; - 258 [label="Smart cast: R|/q|"]; - 259 [label="Function call: R|/q|.R|/Q.fdata|()" style="filled" fillcolor=yellow]; - 260 [label="Function call: R|/q|.R|/Q.fdata|().R|/MyData.fs#|()" style="filled" fillcolor=yellow]; - 261 [label="Access variable R|/q|"]; - 262 [label="Smart cast: R|/q|"]; - 263 [label="Function call: R|/q|.R|/Q.fdata|()" style="filled" fillcolor=yellow]; - 264 [label="Function call: R|/q|.R|/Q.fdata|().R|/MyData.fs#|()" style="filled" fillcolor=yellow]; - 265 [label="Function call: R|/q|.R|/Q.fdata|().R|/MyData.fs#|().R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 266 [label="Exit block"]; + 239 [label="Enter when branch condition "]; + 240 [label="Access variable R|/q|"]; + 241 [label="Enter safe call"]; + 242 [label="Function call: $subj$.R|/Q.fdata|()" style="filled" fillcolor=yellow]; + 243 [label="Enter safe call"]; + 244 [label="Function call: $subj$.R|/MyData.fs|()" style="filled" fillcolor=yellow]; + 245 [label="Enter safe call"]; + 246 [label="Function call: $subj$.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 247 [label="Exit safe call"]; + 248 [label="Exit safe call"]; + 249 [label="Exit safe call"]; + 250 [label="Const: Null(null)"]; + 251 [label="Equality operator !="]; + 252 [label="Exit when branch condition"]; } - 267 [label="Exit when branch result"]; - 268 [label="Exit when"]; + 253 [label="Synthetic else branch"]; + 254 [label="Enter when branch result"]; + subgraph cluster_56 { + color=blue + 255 [label="Enter block"]; + 256 [label="Access variable R|/q|"]; + 257 [label="Smart cast: R|/q|"]; + 258 [label="Function call: R|/q|.R|/Q.fdata|()" style="filled" fillcolor=yellow]; + 259 [label="Access variable R|/q|"]; + 260 [label="Smart cast: R|/q|"]; + 261 [label="Function call: R|/q|.R|/Q.fdata|()" style="filled" fillcolor=yellow]; + 262 [label="Function call: R|/q|.R|/Q.fdata|().R|/MyData.fs#|()" style="filled" fillcolor=yellow]; + 263 [label="Access variable R|/q|"]; + 264 [label="Smart cast: R|/q|"]; + 265 [label="Function call: R|/q|.R|/Q.fdata|()" style="filled" fillcolor=yellow]; + 266 [label="Function call: R|/q|.R|/Q.fdata|().R|/MyData.fs#|()" style="filled" fillcolor=yellow]; + 267 [label="Function call: R|/q|.R|/Q.fdata|().R|/MyData.fs#|().R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 268 [label="Exit block"]; + } + 269 [label="Exit when branch result"]; + 270 [label="Exit when"]; } - 269 [label="Exit block"]; + 271 [label="Exit block"]; } - 270 [label="Exit function test_7" style="filled" fillcolor=red]; + 272 [label="Exit function test_7" style="filled" fillcolor=red]; } - 234 -> {235}; - 235 -> {236}; 236 -> {237}; 237 -> {238}; - 238 -> {239 245}; + 238 -> {239}; 239 -> {240}; - 240 -> {241 245}; + 240 -> {241 247}; 241 -> {242}; - 242 -> {243 246}; + 242 -> {243 247}; 243 -> {244}; - 244 -> {247}; + 244 -> {245 248}; 245 -> {246}; - 246 -> {247}; + 246 -> {249}; 247 -> {248}; 248 -> {249}; 249 -> {250}; - 250 -> {251 252}; - 251 -> {268}; - 252 -> {253}; - 253 -> {254}; + 250 -> {251}; + 251 -> {252}; + 252 -> {253 254}; + 253 -> {270}; 254 -> {255}; 255 -> {256}; 256 -> {257}; @@ -725,52 +730,52 @@ digraph nullability_kt { 267 -> {268}; 268 -> {269}; 269 -> {270}; + 270 -> {271}; + 271 -> {272}; - subgraph cluster_56 { + subgraph cluster_57 { color=red - 271 [label="Enter function test_8" style="filled" fillcolor=red]; - subgraph cluster_57 { + 273 [label="Enter function test_8" style="filled" fillcolor=red]; + subgraph cluster_58 { color=blue - 272 [label="Enter block"]; - subgraph cluster_58 { + 274 [label="Enter block"]; + subgraph cluster_59 { color=blue - 273 [label="Enter when"]; - subgraph cluster_59 { - color=blue - 274 [label="Enter when branch condition "]; - 275 [label="Access variable R|/b|"]; - 276 [label="Const: Boolean(true)"]; - 277 [label="Equality operator =="]; - 278 [label="Exit when branch condition"]; - } - 279 [label="Synthetic else branch"]; - 280 [label="Enter when branch result"]; + 275 [label="Enter when"]; subgraph cluster_60 { color=blue - 281 [label="Enter block"]; - 282 [label="Access variable R|/b|"]; - 283 [label="Smart cast: R|/b|"]; - 284 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; - 285 [label="Exit block"]; + 276 [label="Enter when branch condition "]; + 277 [label="Access variable R|/b|"]; + 278 [label="Const: Boolean(true)"]; + 279 [label="Equality operator =="]; + 280 [label="Exit when branch condition"]; } - 286 [label="Exit when branch result"]; - 287 [label="Exit when"]; + 281 [label="Synthetic else branch"]; + 282 [label="Enter when branch result"]; + subgraph cluster_61 { + color=blue + 283 [label="Enter block"]; + 284 [label="Access variable R|/b|"]; + 285 [label="Smart cast: R|/b|"]; + 286 [label="Function call: R|/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow]; + 287 [label="Exit block"]; + } + 288 [label="Exit when branch result"]; + 289 [label="Exit when"]; } - 288 [label="Exit block"]; + 290 [label="Exit block"]; } - 289 [label="Exit function test_8" style="filled" fillcolor=red]; + 291 [label="Exit function test_8" style="filled" fillcolor=red]; } - 271 -> {272}; - 272 -> {273}; 273 -> {274}; 274 -> {275}; 275 -> {276}; 276 -> {277}; 277 -> {278}; - 278 -> {279 280}; - 279 -> {287}; - 280 -> {281}; - 281 -> {282}; + 278 -> {279}; + 279 -> {280}; + 280 -> {281 282}; + 281 -> {289}; 282 -> {283}; 283 -> {284}; 284 -> {285}; @@ -778,132 +783,132 @@ digraph nullability_kt { 286 -> {287}; 287 -> {288}; 288 -> {289}; + 289 -> {290}; + 290 -> {291}; - subgraph cluster_61 { + subgraph cluster_62 { color=red - 290 [label="Enter function test_9" style="filled" fillcolor=red]; - subgraph cluster_62 { + 292 [label="Enter function test_9" style="filled" fillcolor=red]; + subgraph cluster_63 { color=blue - 291 [label="Enter block"]; - subgraph cluster_63 { + 293 [label="Enter block"]; + subgraph cluster_64 { color=blue - 292 [label="Enter when"]; - subgraph cluster_64 { - color=blue - 293 [label="Enter when branch condition "]; - 294 [label="Access variable R|/a|"]; - 295 [label="Access variable R|/b|"]; - 296 [label="Equality operator =="]; - 297 [label="Exit when branch condition"]; - } - 298 [label="Synthetic else branch"]; - 299 [label="Enter when branch result"]; + 294 [label="Enter when"]; subgraph cluster_65 { color=blue - 300 [label="Enter block"]; - 301 [label="Access variable R|/b|"]; - 302 [label="Smart cast: R|/b|"]; - 303 [label="Function call: R|/b|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 304 [label="Exit block"]; + 295 [label="Enter when branch condition "]; + 296 [label="Access variable R|/a|"]; + 297 [label="Access variable R|/b|"]; + 298 [label="Equality operator =="]; + 299 [label="Exit when branch condition"]; } - 305 [label="Exit when branch result"]; - 306 [label="Exit when"]; - } - 307 [label="Access variable R|/b|"]; - 308 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; - subgraph cluster_66 { - color=blue - 309 [label="Enter when"]; - subgraph cluster_67 { + 300 [label="Synthetic else branch"]; + 301 [label="Enter when branch result"]; + subgraph cluster_66 { color=blue - 310 [label="Enter when branch condition "]; - 311 [label="Access variable R|/a|"]; - 312 [label="Access variable R|/b|"]; - 313 [label="Equality operator ==="]; - 314 [label="Exit when branch condition"]; + 302 [label="Enter block"]; + 303 [label="Access variable R|/b|"]; + 304 [label="Smart cast: R|/b|"]; + 305 [label="Function call: R|/b|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 306 [label="Exit block"]; } - 315 [label="Synthetic else branch"]; - 316 [label="Enter when branch result"]; + 307 [label="Exit when branch result"]; + 308 [label="Exit when"]; + } + 309 [label="Access variable R|/b|"]; + 310 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; + subgraph cluster_67 { + color=blue + 311 [label="Enter when"]; subgraph cluster_68 { color=blue - 317 [label="Enter block"]; - 318 [label="Access variable R|/b|"]; - 319 [label="Smart cast: R|/b|"]; - 320 [label="Function call: R|/b|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 321 [label="Exit block"]; + 312 [label="Enter when branch condition "]; + 313 [label="Access variable R|/a|"]; + 314 [label="Access variable R|/b|"]; + 315 [label="Equality operator ==="]; + 316 [label="Exit when branch condition"]; } - 322 [label="Exit when branch result"]; - 323 [label="Exit when"]; - } - 324 [label="Access variable R|/b|"]; - 325 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; - subgraph cluster_69 { - color=blue - 326 [label="Enter when"]; - subgraph cluster_70 { + 317 [label="Synthetic else branch"]; + 318 [label="Enter when branch result"]; + subgraph cluster_69 { color=blue - 327 [label="Enter when branch condition "]; - 328 [label="Access variable R|/b|"]; - 329 [label="Access variable R|/a|"]; - 330 [label="Equality operator =="]; - 331 [label="Exit when branch condition"]; + 319 [label="Enter block"]; + 320 [label="Access variable R|/b|"]; + 321 [label="Smart cast: R|/b|"]; + 322 [label="Function call: R|/b|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 323 [label="Exit block"]; } - 332 [label="Synthetic else branch"]; - 333 [label="Enter when branch result"]; + 324 [label="Exit when branch result"]; + 325 [label="Exit when"]; + } + 326 [label="Access variable R|/b|"]; + 327 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; + subgraph cluster_70 { + color=blue + 328 [label="Enter when"]; subgraph cluster_71 { color=blue - 334 [label="Enter block"]; - 335 [label="Access variable R|/b|"]; - 336 [label="Smart cast: R|/b|"]; - 337 [label="Function call: R|/b|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 338 [label="Exit block"]; + 329 [label="Enter when branch condition "]; + 330 [label="Access variable R|/b|"]; + 331 [label="Access variable R|/a|"]; + 332 [label="Equality operator =="]; + 333 [label="Exit when branch condition"]; } - 339 [label="Exit when branch result"]; - 340 [label="Exit when"]; - } - 341 [label="Access variable R|/b|"]; - 342 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; - subgraph cluster_72 { - color=blue - 343 [label="Enter when"]; - subgraph cluster_73 { + 334 [label="Synthetic else branch"]; + 335 [label="Enter when branch result"]; + subgraph cluster_72 { color=blue - 344 [label="Enter when branch condition "]; - 345 [label="Access variable R|/b|"]; - 346 [label="Access variable R|/a|"]; - 347 [label="Equality operator ==="]; - 348 [label="Exit when branch condition"]; + 336 [label="Enter block"]; + 337 [label="Access variable R|/b|"]; + 338 [label="Smart cast: R|/b|"]; + 339 [label="Function call: R|/b|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 340 [label="Exit block"]; } - 349 [label="Synthetic else branch"]; - 350 [label="Enter when branch result"]; + 341 [label="Exit when branch result"]; + 342 [label="Exit when"]; + } + 343 [label="Access variable R|/b|"]; + 344 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; + subgraph cluster_73 { + color=blue + 345 [label="Enter when"]; subgraph cluster_74 { color=blue - 351 [label="Enter block"]; - 352 [label="Access variable R|/b|"]; - 353 [label="Smart cast: R|/b|"]; - 354 [label="Function call: R|/b|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 355 [label="Exit block"]; + 346 [label="Enter when branch condition "]; + 347 [label="Access variable R|/b|"]; + 348 [label="Access variable R|/a|"]; + 349 [label="Equality operator ==="]; + 350 [label="Exit when branch condition"]; } - 356 [label="Exit when branch result"]; - 357 [label="Exit when"]; + 351 [label="Synthetic else branch"]; + 352 [label="Enter when branch result"]; + subgraph cluster_75 { + color=blue + 353 [label="Enter block"]; + 354 [label="Access variable R|/b|"]; + 355 [label="Smart cast: R|/b|"]; + 356 [label="Function call: R|/b|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 357 [label="Exit block"]; + } + 358 [label="Exit when branch result"]; + 359 [label="Exit when"]; } - 358 [label="Access variable R|/b|"]; - 359 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; - 360 [label="Exit block"]; + 360 [label="Access variable R|/b|"]; + 361 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; + 362 [label="Exit block"]; } - 361 [label="Exit function test_9" style="filled" fillcolor=red]; + 363 [label="Exit function test_9" style="filled" fillcolor=red]; } - 290 -> {291}; - 291 -> {292}; 292 -> {293}; 293 -> {294}; 294 -> {295}; 295 -> {296}; 296 -> {297}; - 297 -> {298 299}; - 298 -> {306}; - 299 -> {300}; - 300 -> {301}; + 297 -> {298}; + 298 -> {299}; + 299 -> {300 301}; + 300 -> {308}; 301 -> {302}; 302 -> {303}; 303 -> {304}; @@ -917,10 +922,10 @@ digraph nullability_kt { 311 -> {312}; 312 -> {313}; 313 -> {314}; - 314 -> {315 316}; - 315 -> {323}; - 316 -> {317}; - 317 -> {318}; + 314 -> {315}; + 315 -> {316}; + 316 -> {317 318}; + 317 -> {325}; 318 -> {319}; 319 -> {320}; 320 -> {321}; @@ -934,10 +939,10 @@ digraph nullability_kt { 328 -> {329}; 329 -> {330}; 330 -> {331}; - 331 -> {332 333}; - 332 -> {340}; - 333 -> {334}; - 334 -> {335}; + 331 -> {332}; + 332 -> {333}; + 333 -> {334 335}; + 334 -> {342}; 335 -> {336}; 336 -> {337}; 337 -> {338}; @@ -951,10 +956,10 @@ digraph nullability_kt { 345 -> {346}; 346 -> {347}; 347 -> {348}; - 348 -> {349 350}; - 349 -> {357}; - 350 -> {351}; - 351 -> {352}; + 348 -> {349}; + 349 -> {350}; + 350 -> {351 352}; + 351 -> {359}; 352 -> {353}; 353 -> {354}; 354 -> {355}; @@ -964,128 +969,128 @@ digraph nullability_kt { 358 -> {359}; 359 -> {360}; 360 -> {361}; + 361 -> {362}; + 362 -> {363}; - subgraph cluster_75 { + subgraph cluster_76 { color=red - 362 [label="Enter function test_10" style="filled" fillcolor=red]; - subgraph cluster_76 { + 364 [label="Enter function test_10" style="filled" fillcolor=red]; + subgraph cluster_77 { color=blue - 363 [label="Enter block"]; - subgraph cluster_77 { + 365 [label="Enter block"]; + subgraph cluster_78 { color=blue - 364 [label="Enter when"]; - subgraph cluster_78 { - color=blue - 365 [label="Enter when branch condition "]; - 366 [label="Access variable R|/a|"]; - 367 [label="Access variable R|/b|"]; - 368 [label="Equality operator =="]; - 369 [label="Exit when branch condition"]; - } - 370 [label="Synthetic else branch"]; - 371 [label="Enter when branch result"]; + 366 [label="Enter when"]; subgraph cluster_79 { color=blue - 372 [label="Enter block"]; - 373 [label="Access variable R|/b|"]; - 374 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; - 375 [label="Exit block"]; + 367 [label="Enter when branch condition "]; + 368 [label="Access variable R|/a|"]; + 369 [label="Access variable R|/b|"]; + 370 [label="Equality operator =="]; + 371 [label="Exit when branch condition"]; } - 376 [label="Exit when branch result"]; - 377 [label="Exit when"]; - } - 378 [label="Access variable R|/b|"]; - 379 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; - subgraph cluster_80 { - color=blue - 380 [label="Enter when"]; - subgraph cluster_81 { + 372 [label="Synthetic else branch"]; + 373 [label="Enter when branch result"]; + subgraph cluster_80 { color=blue - 381 [label="Enter when branch condition "]; - 382 [label="Access variable R|/a|"]; - 383 [label="Access variable R|/b|"]; - 384 [label="Equality operator ==="]; - 385 [label="Exit when branch condition"]; + 374 [label="Enter block"]; + 375 [label="Access variable R|/b|"]; + 376 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; + 377 [label="Exit block"]; } - 386 [label="Synthetic else branch"]; - 387 [label="Enter when branch result"]; + 378 [label="Exit when branch result"]; + 379 [label="Exit when"]; + } + 380 [label="Access variable R|/b|"]; + 381 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; + subgraph cluster_81 { + color=blue + 382 [label="Enter when"]; subgraph cluster_82 { color=blue - 388 [label="Enter block"]; - 389 [label="Access variable R|/b|"]; - 390 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; - 391 [label="Exit block"]; + 383 [label="Enter when branch condition "]; + 384 [label="Access variable R|/a|"]; + 385 [label="Access variable R|/b|"]; + 386 [label="Equality operator ==="]; + 387 [label="Exit when branch condition"]; } - 392 [label="Exit when branch result"]; - 393 [label="Exit when"]; - } - 394 [label="Access variable R|/b|"]; - 395 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; - subgraph cluster_83 { - color=blue - 396 [label="Enter when"]; - subgraph cluster_84 { + 388 [label="Synthetic else branch"]; + 389 [label="Enter when branch result"]; + subgraph cluster_83 { color=blue - 397 [label="Enter when branch condition "]; - 398 [label="Access variable R|/b|"]; - 399 [label="Access variable R|/a|"]; - 400 [label="Equality operator =="]; - 401 [label="Exit when branch condition"]; + 390 [label="Enter block"]; + 391 [label="Access variable R|/b|"]; + 392 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; + 393 [label="Exit block"]; } - 402 [label="Synthetic else branch"]; - 403 [label="Enter when branch result"]; + 394 [label="Exit when branch result"]; + 395 [label="Exit when"]; + } + 396 [label="Access variable R|/b|"]; + 397 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; + subgraph cluster_84 { + color=blue + 398 [label="Enter when"]; subgraph cluster_85 { color=blue - 404 [label="Enter block"]; - 405 [label="Access variable R|/b|"]; - 406 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; - 407 [label="Exit block"]; + 399 [label="Enter when branch condition "]; + 400 [label="Access variable R|/b|"]; + 401 [label="Access variable R|/a|"]; + 402 [label="Equality operator =="]; + 403 [label="Exit when branch condition"]; } - 408 [label="Exit when branch result"]; - 409 [label="Exit when"]; - } - 410 [label="Access variable R|/b|"]; - 411 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; - subgraph cluster_86 { - color=blue - 412 [label="Enter when"]; - subgraph cluster_87 { + 404 [label="Synthetic else branch"]; + 405 [label="Enter when branch result"]; + subgraph cluster_86 { color=blue - 413 [label="Enter when branch condition "]; - 414 [label="Access variable R|/b|"]; - 415 [label="Access variable R|/a|"]; - 416 [label="Equality operator ==="]; - 417 [label="Exit when branch condition"]; + 406 [label="Enter block"]; + 407 [label="Access variable R|/b|"]; + 408 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; + 409 [label="Exit block"]; } - 418 [label="Synthetic else branch"]; - 419 [label="Enter when branch result"]; + 410 [label="Exit when branch result"]; + 411 [label="Exit when"]; + } + 412 [label="Access variable R|/b|"]; + 413 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; + subgraph cluster_87 { + color=blue + 414 [label="Enter when"]; subgraph cluster_88 { color=blue - 420 [label="Enter block"]; - 421 [label="Access variable R|/b|"]; - 422 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; - 423 [label="Exit block"]; + 415 [label="Enter when branch condition "]; + 416 [label="Access variable R|/b|"]; + 417 [label="Access variable R|/a|"]; + 418 [label="Equality operator ==="]; + 419 [label="Exit when branch condition"]; } - 424 [label="Exit when branch result"]; - 425 [label="Exit when"]; + 420 [label="Synthetic else branch"]; + 421 [label="Enter when branch result"]; + subgraph cluster_89 { + color=blue + 422 [label="Enter block"]; + 423 [label="Access variable R|/b|"]; + 424 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; + 425 [label="Exit block"]; + } + 426 [label="Exit when branch result"]; + 427 [label="Exit when"]; } - 426 [label="Access variable R|/b|"]; - 427 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; - 428 [label="Exit block"]; + 428 [label="Access variable R|/b|"]; + 429 [label="Function call: R|/b|.R|kotlin/Int.inc#|()" style="filled" fillcolor=yellow]; + 430 [label="Exit block"]; } - 429 [label="Exit function test_10" style="filled" fillcolor=red]; + 431 [label="Exit function test_10" style="filled" fillcolor=red]; } - 362 -> {363}; - 363 -> {364}; 364 -> {365}; 365 -> {366}; 366 -> {367}; 367 -> {368}; 368 -> {369}; - 369 -> {370 371}; - 370 -> {377}; - 371 -> {372}; - 372 -> {373}; + 369 -> {370}; + 370 -> {371}; + 371 -> {372 373}; + 372 -> {379}; 373 -> {374}; 374 -> {375}; 375 -> {376}; @@ -1098,10 +1103,10 @@ digraph nullability_kt { 382 -> {383}; 383 -> {384}; 384 -> {385}; - 385 -> {386 387}; - 386 -> {393}; - 387 -> {388}; - 388 -> {389}; + 385 -> {386}; + 386 -> {387}; + 387 -> {388 389}; + 388 -> {395}; 389 -> {390}; 390 -> {391}; 391 -> {392}; @@ -1114,10 +1119,10 @@ digraph nullability_kt { 398 -> {399}; 399 -> {400}; 400 -> {401}; - 401 -> {402 403}; - 402 -> {409}; - 403 -> {404}; - 404 -> {405}; + 401 -> {402}; + 402 -> {403}; + 403 -> {404 405}; + 404 -> {411}; 405 -> {406}; 406 -> {407}; 407 -> {408}; @@ -1130,10 +1135,10 @@ digraph nullability_kt { 414 -> {415}; 415 -> {416}; 416 -> {417}; - 417 -> {418 419}; - 418 -> {425}; - 419 -> {420}; - 420 -> {421}; + 417 -> {418}; + 418 -> {419}; + 419 -> {420 421}; + 420 -> {427}; 421 -> {422}; 422 -> {423}; 423 -> {424}; @@ -1142,122 +1147,122 @@ digraph nullability_kt { 426 -> {427}; 427 -> {428}; 428 -> {429}; + 429 -> {430}; + 430 -> {431}; - subgraph cluster_89 { + subgraph cluster_90 { color=red - 430 [label="Enter function test_11" style="filled" fillcolor=red]; - subgraph cluster_90 { + 432 [label="Enter function test_11" style="filled" fillcolor=red]; + subgraph cluster_91 { color=blue - 431 [label="Enter block"]; - subgraph cluster_91 { + 433 [label="Enter block"]; + subgraph cluster_92 { color=blue - 432 [label="Enter when"]; - subgraph cluster_92 { - color=blue - 433 [label="Enter when branch condition "]; - 434 [label="Access variable R|/q|"]; - 435 [label="Enter safe call"]; - 436 [label="Access variable R|/QImpl.data|"]; - 437 [label="Enter safe call"]; - 438 [label="Access variable R|/MyData.s|"]; - 439 [label="Enter safe call"]; - 440 [label="Function call: $subj$.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 441 [label="Exit safe call"]; - 442 [label="Exit safe call"]; - 443 [label="Exit safe call"]; - 444 [label="Const: Null(null)"]; - 445 [label="Equality operator !="]; - 446 [label="Exit when branch condition"]; - } - 447 [label="Synthetic else branch"]; - 448 [label="Enter when branch result"]; + 434 [label="Enter when"]; subgraph cluster_93 { color=blue - 449 [label="Enter block"]; - 450 [label="Access variable R|/q|"]; - 451 [label="Smart cast: R|/q|"]; - 452 [label="Access variable R|/QImpl.data|"]; - 453 [label="Smart cast: R|/q|.R|/QImpl.data|"]; - 454 [label="Access variable R|/q|"]; - 455 [label="Smart cast: R|/q|"]; - 456 [label="Access variable R|/QImpl.data|"]; - 457 [label="Smart cast: R|/q|.R|/QImpl.data|"]; - 458 [label="Access variable R|/MyData.s|"]; - 459 [label="Access variable R|/q|"]; - 460 [label="Smart cast: R|/q|"]; - 461 [label="Access variable R|/QImpl.data|"]; - 462 [label="Smart cast: R|/q|.R|/QImpl.data|"]; - 463 [label="Access variable R|/MyData.s|"]; - 464 [label="Function call: R|/q|.R|/QImpl.data|.R|/MyData.s|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 465 [label="Access variable R|/q2|"]; - 466 [label="Access variable R|/QImpl.data|"]; + 435 [label="Enter when branch condition "]; + 436 [label="Access variable R|/q|"]; + 437 [label="Enter safe call"]; + 438 [label="Access variable R|/QImpl.data|"]; + 439 [label="Enter safe call"]; + 440 [label="Access variable R|/MyData.s|"]; + 441 [label="Enter safe call"]; + 442 [label="Function call: $subj$.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 443 [label="Exit safe call"]; + 444 [label="Exit safe call"]; + 445 [label="Exit safe call"]; + 446 [label="Const: Null(null)"]; + 447 [label="Equality operator !="]; + 448 [label="Exit when branch condition"]; + } + 449 [label="Synthetic else branch"]; + 450 [label="Enter when branch result"]; + subgraph cluster_94 { + color=blue + 451 [label="Enter block"]; + 452 [label="Access variable R|/q|"]; + 453 [label="Smart cast: R|/q|"]; + 454 [label="Access variable R|/QImpl.data|"]; + 455 [label="Smart cast: R|/q|.R|/QImpl.data|"]; + 456 [label="Access variable R|/q|"]; + 457 [label="Smart cast: R|/q|"]; + 458 [label="Access variable R|/QImpl.data|"]; + 459 [label="Smart cast: R|/q|.R|/QImpl.data|"]; + 460 [label="Access variable R|/MyData.s|"]; + 461 [label="Access variable R|/q|"]; + 462 [label="Smart cast: R|/q|"]; + 463 [label="Access variable R|/QImpl.data|"]; + 464 [label="Smart cast: R|/q|.R|/QImpl.data|"]; + 465 [label="Access variable R|/MyData.s|"]; + 466 [label="Function call: R|/q|.R|/QImpl.data|.R|/MyData.s|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; 467 [label="Access variable R|/q2|"]; 468 [label="Access variable R|/QImpl.data|"]; - 469 [label="Access variable R|/MyData.s#|"]; - 470 [label="Access variable R|/q2|"]; - 471 [label="Access variable R|/QImpl.data|"]; - 472 [label="Access variable R|/MyData.s#|"]; - 473 [label="Function call: R|/q2|.R|/QImpl.data|.R|/MyData.s#|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - subgraph cluster_94 { + 469 [label="Access variable R|/q2|"]; + 470 [label="Access variable R|/QImpl.data|"]; + 471 [label="Access variable R|/MyData.s#|"]; + 472 [label="Access variable R|/q2|"]; + 473 [label="Access variable R|/QImpl.data|"]; + 474 [label="Access variable R|/MyData.s#|"]; + 475 [label="Function call: R|/q2|.R|/QImpl.data|.R|/MyData.s#|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + subgraph cluster_95 { color=blue - 474 [label="Enter when"]; - subgraph cluster_95 { - color=blue - 475 [label="Enter when branch condition "]; - 476 [label="Access variable R|/q2|"]; - 477 [label="Access variable R|/QImpl.data|"]; - 478 [label="Const: Null(null)"]; - 479 [label="Equality operator !="]; - 480 [label="Exit when branch condition"]; - } - 481 [label="Synthetic else branch"]; - 482 [label="Enter when branch result"]; + 476 [label="Enter when"]; subgraph cluster_96 { color=blue - 483 [label="Enter block"]; - 484 [label="Access variable R|/q2|"]; - 485 [label="Access variable R|/QImpl.data|"]; - 486 [label="Smart cast: R|/q2|.R|/QImpl.data|"]; - 487 [label="Access variable R|/MyData.s|"]; - 488 [label="Access variable R|/q2|"]; - 489 [label="Access variable R|/QImpl.data|"]; - 490 [label="Smart cast: R|/q2|.R|/QImpl.data|"]; - 491 [label="Access variable R|/MyData.s|"]; - 492 [label="Function call: R|/q2|.R|/QImpl.data|.R|/MyData.s|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 493 [label="Exit block"]; + 477 [label="Enter when branch condition "]; + 478 [label="Access variable R|/q2|"]; + 479 [label="Access variable R|/QImpl.data|"]; + 480 [label="Const: Null(null)"]; + 481 [label="Equality operator !="]; + 482 [label="Exit when branch condition"]; } - 494 [label="Exit when branch result"]; - 495 [label="Exit when"]; + 483 [label="Synthetic else branch"]; + 484 [label="Enter when branch result"]; + subgraph cluster_97 { + color=blue + 485 [label="Enter block"]; + 486 [label="Access variable R|/q2|"]; + 487 [label="Access variable R|/QImpl.data|"]; + 488 [label="Smart cast: R|/q2|.R|/QImpl.data|"]; + 489 [label="Access variable R|/MyData.s|"]; + 490 [label="Access variable R|/q2|"]; + 491 [label="Access variable R|/QImpl.data|"]; + 492 [label="Smart cast: R|/q2|.R|/QImpl.data|"]; + 493 [label="Access variable R|/MyData.s|"]; + 494 [label="Function call: R|/q2|.R|/QImpl.data|.R|/MyData.s|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 495 [label="Exit block"]; + } + 496 [label="Exit when branch result"]; + 497 [label="Exit when"]; } - 496 [label="Exit block"]; + 498 [label="Exit block"]; } - 497 [label="Exit when branch result"]; - 498 [label="Exit when"]; + 499 [label="Exit when branch result"]; + 500 [label="Exit when"]; } - 499 [label="Exit block"]; + 501 [label="Exit block"]; } - 500 [label="Exit function test_11" style="filled" fillcolor=red]; + 502 [label="Exit function test_11" style="filled" fillcolor=red]; } - 430 -> {431}; - 431 -> {432}; 432 -> {433}; 433 -> {434}; - 434 -> {435 441}; + 434 -> {435}; 435 -> {436}; - 436 -> {437 441}; + 436 -> {437 443}; 437 -> {438}; - 438 -> {439 442}; + 438 -> {439 443}; 439 -> {440}; - 440 -> {443}; + 440 -> {441 444}; 441 -> {442}; - 442 -> {443}; + 442 -> {445}; 443 -> {444}; 444 -> {445}; 445 -> {446}; - 446 -> {447 448}; - 447 -> {498}; - 448 -> {449}; - 449 -> {450}; + 446 -> {447}; + 447 -> {448}; + 448 -> {449 450}; + 449 -> {500}; 450 -> {451}; 451 -> {452}; 452 -> {453}; @@ -1288,10 +1293,10 @@ digraph nullability_kt { 477 -> {478}; 478 -> {479}; 479 -> {480}; - 480 -> {481 482}; - 481 -> {495}; - 482 -> {483}; - 483 -> {484}; + 480 -> {481}; + 481 -> {482}; + 482 -> {483 484}; + 483 -> {497}; 484 -> {485}; 485 -> {486}; 486 -> {487}; @@ -1308,82 +1313,82 @@ digraph nullability_kt { 497 -> {498}; 498 -> {499}; 499 -> {500}; + 500 -> {501}; + 501 -> {502}; - subgraph cluster_97 { + subgraph cluster_98 { color=red - 501 [label="Enter function test_12" style="filled" fillcolor=red]; - subgraph cluster_98 { + 503 [label="Enter function test_12" style="filled" fillcolor=red]; + subgraph cluster_99 { color=blue - 502 [label="Enter block"]; - subgraph cluster_99 { + 504 [label="Enter block"]; + subgraph cluster_100 { color=blue - 503 [label="Enter when"]; - subgraph cluster_100 { - color=blue - 504 [label="Enter when branch condition "]; - 505 [label="Access variable R|/q|"]; - 506 [label="Enter safe call"]; - 507 [label="Access variable R|/QImplWithCustomGetter.data|"]; - 508 [label="Enter safe call"]; - 509 [label="Access variable R|/MyData.s|"]; - 510 [label="Enter safe call"]; - 511 [label="Function call: $subj$.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 512 [label="Exit safe call"]; - 513 [label="Exit safe call"]; - 514 [label="Exit safe call"]; - 515 [label="Const: Null(null)"]; - 516 [label="Equality operator !="]; - 517 [label="Exit when branch condition"]; - } - 518 [label="Synthetic else branch"]; - 519 [label="Enter when branch result"]; + 505 [label="Enter when"]; subgraph cluster_101 { color=blue - 520 [label="Enter block"]; - 521 [label="Access variable R|/q|"]; - 522 [label="Smart cast: R|/q|"]; - 523 [label="Access variable R|/QImplWithCustomGetter.data|"]; - 524 [label="Smart cast: R|/q|.R|/QImplWithCustomGetter.data|"]; - 525 [label="Access variable R|/q|"]; - 526 [label="Smart cast: R|/q|"]; - 527 [label="Access variable R|/QImplWithCustomGetter.data|"]; - 528 [label="Smart cast: R|/q|.R|/QImplWithCustomGetter.data|"]; - 529 [label="Access variable R|/MyData.s#|"]; - 530 [label="Access variable R|/q|"]; - 531 [label="Smart cast: R|/q|"]; - 532 [label="Access variable R|/QImplWithCustomGetter.data|"]; - 533 [label="Smart cast: R|/q|.R|/QImplWithCustomGetter.data|"]; - 534 [label="Access variable R|/MyData.s#|"]; - 535 [label="Function call: R|/q|.R|/QImplWithCustomGetter.data|.R|/MyData.s#|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 536 [label="Exit block"]; + 506 [label="Enter when branch condition "]; + 507 [label="Access variable R|/q|"]; + 508 [label="Enter safe call"]; + 509 [label="Access variable R|/QImplWithCustomGetter.data|"]; + 510 [label="Enter safe call"]; + 511 [label="Access variable R|/MyData.s|"]; + 512 [label="Enter safe call"]; + 513 [label="Function call: $subj$.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 514 [label="Exit safe call"]; + 515 [label="Exit safe call"]; + 516 [label="Exit safe call"]; + 517 [label="Const: Null(null)"]; + 518 [label="Equality operator !="]; + 519 [label="Exit when branch condition"]; } - 537 [label="Exit when branch result"]; - 538 [label="Exit when"]; + 520 [label="Synthetic else branch"]; + 521 [label="Enter when branch result"]; + subgraph cluster_102 { + color=blue + 522 [label="Enter block"]; + 523 [label="Access variable R|/q|"]; + 524 [label="Smart cast: R|/q|"]; + 525 [label="Access variable R|/QImplWithCustomGetter.data|"]; + 526 [label="Smart cast: R|/q|.R|/QImplWithCustomGetter.data|"]; + 527 [label="Access variable R|/q|"]; + 528 [label="Smart cast: R|/q|"]; + 529 [label="Access variable R|/QImplWithCustomGetter.data|"]; + 530 [label="Smart cast: R|/q|.R|/QImplWithCustomGetter.data|"]; + 531 [label="Access variable R|/MyData.s#|"]; + 532 [label="Access variable R|/q|"]; + 533 [label="Smart cast: R|/q|"]; + 534 [label="Access variable R|/QImplWithCustomGetter.data|"]; + 535 [label="Smart cast: R|/q|.R|/QImplWithCustomGetter.data|"]; + 536 [label="Access variable R|/MyData.s#|"]; + 537 [label="Function call: R|/q|.R|/QImplWithCustomGetter.data|.R|/MyData.s#|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 538 [label="Exit block"]; + } + 539 [label="Exit when branch result"]; + 540 [label="Exit when"]; } - 539 [label="Exit block"]; + 541 [label="Exit block"]; } - 540 [label="Exit function test_12" style="filled" fillcolor=red]; + 542 [label="Exit function test_12" style="filled" fillcolor=red]; } - 501 -> {502}; - 502 -> {503}; 503 -> {504}; 504 -> {505}; - 505 -> {506 512}; + 505 -> {506}; 506 -> {507}; - 507 -> {508 512}; + 507 -> {508 514}; 508 -> {509}; - 509 -> {510 513}; + 509 -> {510 514}; 510 -> {511}; - 511 -> {514}; + 511 -> {512 515}; 512 -> {513}; - 513 -> {514}; + 513 -> {516}; 514 -> {515}; 515 -> {516}; 516 -> {517}; - 517 -> {518 519}; - 518 -> {538}; - 519 -> {520}; - 520 -> {521}; + 517 -> {518}; + 518 -> {519}; + 519 -> {520 521}; + 520 -> {540}; 521 -> {522}; 522 -> {523}; 523 -> {524}; @@ -1403,82 +1408,82 @@ digraph nullability_kt { 537 -> {538}; 538 -> {539}; 539 -> {540}; + 540 -> {541}; + 541 -> {542}; - subgraph cluster_102 { + subgraph cluster_103 { color=red - 541 [label="Enter function test_13" style="filled" fillcolor=red]; - subgraph cluster_103 { + 543 [label="Enter function test_13" style="filled" fillcolor=red]; + subgraph cluster_104 { color=blue - 542 [label="Enter block"]; - subgraph cluster_104 { + 544 [label="Enter block"]; + subgraph cluster_105 { color=blue - 543 [label="Enter when"]; - subgraph cluster_105 { - color=blue - 544 [label="Enter when branch condition "]; - 545 [label="Access variable R|/q|"]; - 546 [label="Enter safe call"]; - 547 [label="Access variable R|/QImplMutable.data|"]; - 548 [label="Enter safe call"]; - 549 [label="Access variable R|/MyData.s|"]; - 550 [label="Enter safe call"]; - 551 [label="Function call: $subj$.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 552 [label="Exit safe call"]; - 553 [label="Exit safe call"]; - 554 [label="Exit safe call"]; - 555 [label="Const: Null(null)"]; - 556 [label="Equality operator !="]; - 557 [label="Exit when branch condition"]; - } - 558 [label="Synthetic else branch"]; - 559 [label="Enter when branch result"]; + 545 [label="Enter when"]; subgraph cluster_106 { color=blue - 560 [label="Enter block"]; - 561 [label="Access variable R|/q|"]; - 562 [label="Smart cast: R|/q|"]; - 563 [label="Access variable R|/QImplMutable.data|"]; - 564 [label="Smart cast: R|/q|.R|/QImplMutable.data|"]; - 565 [label="Access variable R|/q|"]; - 566 [label="Smart cast: R|/q|"]; - 567 [label="Access variable R|/QImplMutable.data|"]; - 568 [label="Smart cast: R|/q|.R|/QImplMutable.data|"]; - 569 [label="Access variable R|/MyData.s#|"]; - 570 [label="Access variable R|/q|"]; - 571 [label="Smart cast: R|/q|"]; - 572 [label="Access variable R|/QImplMutable.data|"]; - 573 [label="Smart cast: R|/q|.R|/QImplMutable.data|"]; - 574 [label="Access variable R|/MyData.s#|"]; - 575 [label="Function call: R|/q|.R|/QImplMutable.data|.R|/MyData.s#|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 576 [label="Exit block"]; + 546 [label="Enter when branch condition "]; + 547 [label="Access variable R|/q|"]; + 548 [label="Enter safe call"]; + 549 [label="Access variable R|/QImplMutable.data|"]; + 550 [label="Enter safe call"]; + 551 [label="Access variable R|/MyData.s|"]; + 552 [label="Enter safe call"]; + 553 [label="Function call: $subj$.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 554 [label="Exit safe call"]; + 555 [label="Exit safe call"]; + 556 [label="Exit safe call"]; + 557 [label="Const: Null(null)"]; + 558 [label="Equality operator !="]; + 559 [label="Exit when branch condition"]; } - 577 [label="Exit when branch result"]; - 578 [label="Exit when"]; + 560 [label="Synthetic else branch"]; + 561 [label="Enter when branch result"]; + subgraph cluster_107 { + color=blue + 562 [label="Enter block"]; + 563 [label="Access variable R|/q|"]; + 564 [label="Smart cast: R|/q|"]; + 565 [label="Access variable R|/QImplMutable.data|"]; + 566 [label="Smart cast: R|/q|.R|/QImplMutable.data|"]; + 567 [label="Access variable R|/q|"]; + 568 [label="Smart cast: R|/q|"]; + 569 [label="Access variable R|/QImplMutable.data|"]; + 570 [label="Smart cast: R|/q|.R|/QImplMutable.data|"]; + 571 [label="Access variable R|/MyData.s#|"]; + 572 [label="Access variable R|/q|"]; + 573 [label="Smart cast: R|/q|"]; + 574 [label="Access variable R|/QImplMutable.data|"]; + 575 [label="Smart cast: R|/q|.R|/QImplMutable.data|"]; + 576 [label="Access variable R|/MyData.s#|"]; + 577 [label="Function call: R|/q|.R|/QImplMutable.data|.R|/MyData.s#|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 578 [label="Exit block"]; + } + 579 [label="Exit when branch result"]; + 580 [label="Exit when"]; } - 579 [label="Exit block"]; + 581 [label="Exit block"]; } - 580 [label="Exit function test_13" style="filled" fillcolor=red]; + 582 [label="Exit function test_13" style="filled" fillcolor=red]; } - 541 -> {542}; - 542 -> {543}; 543 -> {544}; 544 -> {545}; - 545 -> {546 552}; + 545 -> {546}; 546 -> {547}; - 547 -> {548 552}; + 547 -> {548 554}; 548 -> {549}; - 549 -> {550 553}; + 549 -> {550 554}; 550 -> {551}; - 551 -> {554}; + 551 -> {552 555}; 552 -> {553}; - 553 -> {554}; + 553 -> {556}; 554 -> {555}; 555 -> {556}; 556 -> {557}; - 557 -> {558 559}; - 558 -> {578}; - 559 -> {560}; - 560 -> {561}; + 557 -> {558}; + 558 -> {559}; + 559 -> {560 561}; + 560 -> {580}; 561 -> {562}; 562 -> {563}; 563 -> {564}; @@ -1498,55 +1503,55 @@ digraph nullability_kt { 577 -> {578}; 578 -> {579}; 579 -> {580}; + 580 -> {581}; + 581 -> {582}; - subgraph cluster_107 { + subgraph cluster_108 { color=red - 581 [label="Enter function test_14" style="filled" fillcolor=red]; - subgraph cluster_108 { + 583 [label="Enter function test_14" style="filled" fillcolor=red]; + subgraph cluster_109 { color=blue - 582 [label="Enter block"]; - subgraph cluster_109 { + 584 [label="Enter block"]; + subgraph cluster_110 { color=blue - 583 [label="Enter when"]; - subgraph cluster_110 { - color=blue - 584 [label="Enter when branch condition "]; - 585 [label="Access variable R|/q|"]; - 586 [label="Access variable R|/Q.data|"]; - 587 [label="Const: Null(null)"]; - 588 [label="Equality operator =="]; - 589 [label="Exit when branch condition"]; - } - 590 [label="Synthetic else branch"]; - 591 [label="Enter when branch result"]; + 585 [label="Enter when"]; subgraph cluster_111 { color=blue - 592 [label="Enter block"]; - 593 [label="Access variable R|/q|"]; - 594 [label="Access variable R|/Q.data|"]; - 595 [label="Smart cast: R|/q|.R|/Q.data|"]; - 596 [label="Access variable R|/MyData.s#|"]; - 597 [label="Exit block"]; + 586 [label="Enter when branch condition "]; + 587 [label="Access variable R|/q|"]; + 588 [label="Access variable R|/Q.data|"]; + 589 [label="Const: Null(null)"]; + 590 [label="Equality operator =="]; + 591 [label="Exit when branch condition"]; } - 598 [label="Exit when branch result"]; - 599 [label="Exit when"]; + 592 [label="Synthetic else branch"]; + 593 [label="Enter when branch result"]; + subgraph cluster_112 { + color=blue + 594 [label="Enter block"]; + 595 [label="Access variable R|/q|"]; + 596 [label="Access variable R|/Q.data|"]; + 597 [label="Smart cast: R|/q|.R|/Q.data|"]; + 598 [label="Access variable R|/MyData.s#|"]; + 599 [label="Exit block"]; + } + 600 [label="Exit when branch result"]; + 601 [label="Exit when"]; } - 600 [label="Exit block"]; + 602 [label="Exit block"]; } - 601 [label="Exit function test_14" style="filled" fillcolor=red]; + 603 [label="Exit function test_14" style="filled" fillcolor=red]; } - 581 -> {582}; - 582 -> {583}; 583 -> {584}; 584 -> {585}; 585 -> {586}; 586 -> {587}; 587 -> {588}; 588 -> {589}; - 589 -> {590 591}; - 590 -> {599}; - 591 -> {592}; - 592 -> {593}; + 589 -> {590}; + 590 -> {591}; + 591 -> {592 593}; + 592 -> {601}; 593 -> {594}; 594 -> {595}; 595 -> {596}; @@ -1555,5 +1560,7 @@ digraph nullability_kt { 598 -> {599}; 599 -> {600}; 600 -> {601}; + 601 -> {602}; + 602 -> {603}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/implicitReceiverAsWhenSubject.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/implicitReceiverAsWhenSubject.dot index fce2f93a443..395fb1a24fc 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/implicitReceiverAsWhenSubject.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/implicitReceiverAsWhenSubject.dot @@ -5,62 +5,69 @@ digraph implicitReceiverAsWhenSubject_kt { subgraph cluster_0 { color=red - 0 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_1 { + 0 [label="Enter file implicitReceiverAsWhenSubject.kt" style="filled" fillcolor=red]; + 1 [label="Exit file implicitReceiverAsWhenSubject.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 1 [label="Enter block"]; - subgraph cluster_2 { + 3 [label="Enter block"]; + subgraph cluster_3 { color=blue - 2 [label="Enter when"]; - 3 [label="Access variable this@R|/test_1|"]; - subgraph cluster_3 { - color=blue - 4 [label="Enter when branch condition "]; - 5 [label="Exit $subj"]; - 6 [label="Type operator: ($subj$ is R|kotlin/collections/List<*>|)"]; - 7 [label="Exit when branch condition"]; - } + 4 [label="Enter when"]; + 5 [label="Access variable this@R|/test_1|"]; subgraph cluster_4 { color=blue - 8 [label="Enter when branch condition "]; - 9 [label="Exit $subj"]; - 10 [label="Type operator: ($subj$ is R|kotlin/String|)"]; - 11 [label="Exit when branch condition"]; + 6 [label="Enter when branch condition "]; + 7 [label="Exit $subj"]; + 8 [label="Type operator: ($subj$ is R|kotlin/collections/List<*>|)"]; + 9 [label="Exit when branch condition"]; } subgraph cluster_5 { color=blue - 12 [label="Enter when branch condition else"]; + 10 [label="Enter when branch condition "]; + 11 [label="Exit $subj"]; + 12 [label="Type operator: ($subj$ is R|kotlin/String|)"]; 13 [label="Exit when branch condition"]; } - 14 [label="Enter when branch result"]; subgraph cluster_6 { color=blue - 15 [label="Enter block"]; - 16 [label="Const: Int(0)"]; - 17 [label="Exit block"]; + 14 [label="Enter when branch condition else"]; + 15 [label="Exit when branch condition"]; } - 18 [label="Exit when branch result"]; - 19 [label="Enter when branch result"]; + 16 [label="Enter when branch result"]; subgraph cluster_7 { color=blue - 20 [label="Enter block"]; - 21 [label="Access variable R|kotlin/String.length|"]; - 22 [label="Exit block"]; + 17 [label="Enter block"]; + 18 [label="Const: Int(0)"]; + 19 [label="Exit block"]; } - 23 [label="Exit when branch result"]; - 24 [label="Enter when branch result"]; + 20 [label="Exit when branch result"]; + 21 [label="Enter when branch result"]; subgraph cluster_8 { color=blue - 25 [label="Enter block"]; - 26 [label="Access variable this@R|/test_1|"]; - 27 [label="Smart cast: this@R|/test_1|"]; - 28 [label="Access variable R|SubstitutionOverride|"]; - 29 [label="Exit block"]; + 22 [label="Enter block"]; + 23 [label="Access variable R|kotlin/String.length|"]; + 24 [label="Exit block"]; } - 30 [label="Exit when branch result"]; - 31 [label="Exit when"]; + 25 [label="Exit when branch result"]; + 26 [label="Enter when branch result"]; + subgraph cluster_9 { + color=blue + 27 [label="Enter block"]; + 28 [label="Access variable this@R|/test_1|"]; + 29 [label="Smart cast: this@R|/test_1|"]; + 30 [label="Access variable R|SubstitutionOverride|"]; + 31 [label="Exit block"]; + } + 32 [label="Exit when branch result"]; + 33 [label="Exit when"]; } - 32 [label="Jump: ^test_1 when (this@R|/test_1|) { + 34 [label="Jump: ^test_1 when (this@R|/test_1|) { ($subj$ is R|kotlin/collections/List<*>|) -> { this@R|/test_1|.R|SubstitutionOverride| } @@ -72,113 +79,113 @@ digraph implicitReceiverAsWhenSubject_kt { } } "]; - 33 [label="Stub" style="filled" fillcolor=gray]; - 34 [label="Exit block" style="filled" fillcolor=gray]; + 35 [label="Stub" style="filled" fillcolor=gray]; + 36 [label="Exit block" style="filled" fillcolor=gray]; } - 35 [label="Exit function test_1" style="filled" fillcolor=red]; + 37 [label="Exit function test_1" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; 3 -> {4}; 4 -> {5}; 5 -> {6}; 6 -> {7}; - 7 -> {8 24}; + 7 -> {8}; 8 -> {9}; - 9 -> {10}; + 9 -> {10 26}; 10 -> {11}; - 11 -> {12 19}; + 11 -> {12}; 12 -> {13}; - 13 -> {14}; + 13 -> {14 21}; 14 -> {15}; 15 -> {16}; 16 -> {17}; 17 -> {18}; - 18 -> {31}; + 18 -> {19}; 19 -> {20}; - 20 -> {21}; + 20 -> {33}; 21 -> {22}; 22 -> {23}; - 23 -> {31}; + 23 -> {24}; 24 -> {25}; - 25 -> {26}; + 25 -> {33}; 26 -> {27}; 27 -> {28}; 28 -> {29}; 29 -> {30}; 30 -> {31}; 31 -> {32}; - 32 -> {35}; - 32 -> {33} [style=dotted]; - 33 -> {34} [style=dotted]; + 32 -> {33}; + 33 -> {34}; + 34 -> {37}; 34 -> {35} [style=dotted]; + 35 -> {36} [style=dotted]; + 36 -> {37} [style=dotted]; - subgraph cluster_9 { + subgraph cluster_10 { color=red - 36 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_10 { + 38 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_11 { color=blue - 37 [label="Enter block"]; - subgraph cluster_11 { + 39 [label="Enter block"]; + subgraph cluster_12 { color=blue - 38 [label="Enter when"]; - 39 [label="Access variable this@R|/test_2|"]; - 40 [label="Variable declaration: lval x: R|kotlin/Any|"]; - subgraph cluster_12 { - color=blue - 41 [label="Enter when branch condition "]; - 42 [label="Exit $subj"]; - 43 [label="Type operator: ($subj$ is R|kotlin/collections/List<*>|)"]; - 44 [label="Exit when branch condition"]; - } + 40 [label="Enter when"]; + 41 [label="Access variable this@R|/test_2|"]; + 42 [label="Variable declaration: lval x: R|kotlin/Any|"]; subgraph cluster_13 { color=blue - 45 [label="Enter when branch condition "]; - 46 [label="Exit $subj"]; - 47 [label="Type operator: ($subj$ is R|kotlin/String|)"]; - 48 [label="Exit when branch condition"]; + 43 [label="Enter when branch condition "]; + 44 [label="Exit $subj"]; + 45 [label="Type operator: ($subj$ is R|kotlin/collections/List<*>|)"]; + 46 [label="Exit when branch condition"]; } subgraph cluster_14 { color=blue - 49 [label="Enter when branch condition else"]; + 47 [label="Enter when branch condition "]; + 48 [label="Exit $subj"]; + 49 [label="Type operator: ($subj$ is R|kotlin/String|)"]; 50 [label="Exit when branch condition"]; } - 51 [label="Enter when branch result"]; subgraph cluster_15 { color=blue - 52 [label="Enter block"]; - 53 [label="Const: Int(0)"]; - 54 [label="Exit block"]; + 51 [label="Enter when branch condition else"]; + 52 [label="Exit when branch condition"]; } - 55 [label="Exit when branch result"]; - 56 [label="Enter when branch result"]; + 53 [label="Enter when branch result"]; subgraph cluster_16 { color=blue - 57 [label="Enter block"]; - 58 [label="Access variable R|/x|"]; - 59 [label="Smart cast: R|/x|"]; - 60 [label="Access variable R|kotlin/String.length|"]; - 61 [label="Access variable R|kotlin/String.length|"]; - 62 [label="Exit block"]; + 54 [label="Enter block"]; + 55 [label="Const: Int(0)"]; + 56 [label="Exit block"]; } - 63 [label="Exit when branch result"]; - 64 [label="Enter when branch result"]; + 57 [label="Exit when branch result"]; + 58 [label="Enter when branch result"]; subgraph cluster_17 { color=blue - 65 [label="Enter block"]; - 66 [label="Access variable R|/x|"]; - 67 [label="Smart cast: R|/x|"]; - 68 [label="Access variable R|SubstitutionOverride|"]; - 69 [label="Access variable this@R|/test_2|"]; - 70 [label="Smart cast: this@R|/test_2|"]; - 71 [label="Access variable R|SubstitutionOverride|"]; - 72 [label="Exit block"]; + 59 [label="Enter block"]; + 60 [label="Access variable R|/x|"]; + 61 [label="Smart cast: R|/x|"]; + 62 [label="Access variable R|kotlin/String.length|"]; + 63 [label="Access variable R|kotlin/String.length|"]; + 64 [label="Exit block"]; } - 73 [label="Exit when branch result"]; - 74 [label="Exit when"]; + 65 [label="Exit when branch result"]; + 66 [label="Enter when branch result"]; + subgraph cluster_18 { + color=blue + 67 [label="Enter block"]; + 68 [label="Access variable R|/x|"]; + 69 [label="Smart cast: R|/x|"]; + 70 [label="Access variable R|SubstitutionOverride|"]; + 71 [label="Access variable this@R|/test_2|"]; + 72 [label="Smart cast: this@R|/test_2|"]; + 73 [label="Access variable R|SubstitutionOverride|"]; + 74 [label="Exit block"]; + } + 75 [label="Exit when branch result"]; + 76 [label="Exit when"]; } - 75 [label="Jump: ^test_2 when (lval x: R|kotlin/Any| = this@R|/test_2|) { + 77 [label="Jump: ^test_2 when (lval x: R|kotlin/Any| = this@R|/test_2|) { ($subj$ is R|kotlin/collections/List<*>|) -> { R|/x|.R|SubstitutionOverride| this@R|/test_2|.R|SubstitutionOverride| @@ -192,41 +199,39 @@ digraph implicitReceiverAsWhenSubject_kt { } } "]; - 76 [label="Stub" style="filled" fillcolor=gray]; - 77 [label="Exit block" style="filled" fillcolor=gray]; + 78 [label="Stub" style="filled" fillcolor=gray]; + 79 [label="Exit block" style="filled" fillcolor=gray]; } - 78 [label="Exit function test_2" style="filled" fillcolor=red]; + 80 [label="Exit function test_2" style="filled" fillcolor=red]; } - 36 -> {37}; - 37 -> {38}; 38 -> {39}; 39 -> {40}; 40 -> {41}; 41 -> {42}; 42 -> {43}; 43 -> {44}; - 44 -> {45 64}; + 44 -> {45}; 45 -> {46}; - 46 -> {47}; + 46 -> {47 66}; 47 -> {48}; - 48 -> {49 56}; + 48 -> {49}; 49 -> {50}; - 50 -> {51}; + 50 -> {51 58}; 51 -> {52}; 52 -> {53}; 53 -> {54}; 54 -> {55}; - 55 -> {74}; + 55 -> {56}; 56 -> {57}; - 57 -> {58}; + 57 -> {76}; 58 -> {59}; 59 -> {60}; 60 -> {61}; 61 -> {62}; 62 -> {63}; - 63 -> {74}; + 63 -> {64}; 64 -> {65}; - 65 -> {66}; + 65 -> {76}; 66 -> {67}; 67 -> {68}; 68 -> {69}; @@ -236,9 +241,11 @@ digraph implicitReceiverAsWhenSubject_kt { 72 -> {73}; 73 -> {74}; 74 -> {75}; - 75 -> {78}; - 75 -> {76} [style=dotted]; - 76 -> {77} [style=dotted]; + 75 -> {76}; + 76 -> {77}; + 77 -> {80}; 77 -> {78} [style=dotted]; + 78 -> {79} [style=dotted]; + 79 -> {80} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/implicitReceivers.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/implicitReceivers.dot index 20438c65feb..76722b66b02 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/implicitReceivers.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/implicitReceivers.dot @@ -5,151 +5,156 @@ digraph implicitReceivers_kt { subgraph cluster_0 { color=red - 0 [label="Enter class A" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter function " style="filled" fillcolor=red]; - 2 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 3 [label="Exit function " style="filled" fillcolor=red]; - } - 4 [label="Exit class A" style="filled" fillcolor=red]; + 0 [label="Enter file implicitReceivers.kt" style="filled" fillcolor=red]; + 1 [label="Exit file implicitReceivers.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; - 0 -> {4} [style=dotted]; - 0 -> {1} [style=dashed]; - 1 -> {2}; - 2 -> {3}; - 3 -> {4} [color=green]; - subgraph cluster_2 { + subgraph cluster_1 { color=red - 5 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_3 { + 2 [label="Enter class A" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 6 [label="Enter block"]; - 7 [label="Exit block"]; + 3 [label="Enter function " style="filled" fillcolor=red]; + 4 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 5 [label="Exit function " style="filled" fillcolor=red]; } - 8 [label="Exit function foo" style="filled" fillcolor=red]; + 6 [label="Exit class A" style="filled" fillcolor=red]; + } + 2 -> {3} [color=green]; + 2 -> {6} [style=dotted]; + 2 -> {3} [style=dashed]; + 3 -> {4}; + 4 -> {5}; + 5 -> {6} [color=green]; + + subgraph cluster_3 { + color=red + 7 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_4 { + color=blue + 8 [label="Enter block"]; + 9 [label="Exit block"]; + } + 10 [label="Exit function foo" style="filled" fillcolor=red]; } - 5 -> {6}; - 6 -> {7}; 7 -> {8}; + 8 -> {9}; + 9 -> {10}; - subgraph cluster_4 { + subgraph cluster_5 { color=red - 9 [label="Enter class B" style="filled" fillcolor=red]; - subgraph cluster_5 { + 11 [label="Enter class B" style="filled" fillcolor=red]; + subgraph cluster_6 { color=blue - 10 [label="Enter function " style="filled" fillcolor=red]; - 11 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 12 [label="Exit function " style="filled" fillcolor=red]; + 12 [label="Enter function " style="filled" fillcolor=red]; + 13 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 14 [label="Exit function " style="filled" fillcolor=red]; } - 13 [label="Exit class B" style="filled" fillcolor=red]; + 15 [label="Exit class B" style="filled" fillcolor=red]; } - 9 -> {10} [color=green]; - 9 -> {13} [style=dotted]; - 9 -> {10} [style=dashed]; - 10 -> {11}; - 11 -> {12}; - 12 -> {13} [color=green]; + 11 -> {12} [color=green]; + 11 -> {15} [style=dotted]; + 11 -> {12} [style=dashed]; + 12 -> {13}; + 13 -> {14}; + 14 -> {15} [color=green]; - subgraph cluster_6 { + subgraph cluster_7 { color=red - 14 [label="Enter function bar" style="filled" fillcolor=red]; - subgraph cluster_7 { + 16 [label="Enter function bar" style="filled" fillcolor=red]; + subgraph cluster_8 { color=blue - 15 [label="Enter block"]; - 16 [label="Exit block"]; + 17 [label="Enter block"]; + 18 [label="Exit block"]; } - 17 [label="Exit function bar" style="filled" fillcolor=red]; + 19 [label="Exit function bar" style="filled" fillcolor=red]; } - 14 -> {15}; - 15 -> {16}; 16 -> {17}; - - subgraph cluster_8 { - color=red - 18 [label="Enter function with" style="filled" fillcolor=red]; - subgraph cluster_9 { - color=blue - 19 [label="Enter block"]; - 20 [label="Exit block"]; - } - 21 [label="Exit function with" style="filled" fillcolor=red]; - } + 17 -> {18}; 18 -> {19}; - 19 -> {20}; - 20 -> {21}; - subgraph cluster_10 { + subgraph cluster_9 { color=red - 22 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_11 { + 20 [label="Enter function with" style="filled" fillcolor=red]; + subgraph cluster_10 { color=blue - 23 [label="Enter block"]; - subgraph cluster_12 { + 21 [label="Enter block"]; + 22 [label="Exit block"]; + } + 23 [label="Exit function with" style="filled" fillcolor=red]; + } + 20 -> {21}; + 21 -> {22}; + 22 -> {23}; + + subgraph cluster_11 { + color=red + 24 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_12 { + color=blue + 25 [label="Enter block"]; + subgraph cluster_13 { color=blue - 24 [label="Enter when"]; - subgraph cluster_13 { - color=blue - 25 [label="Enter when branch condition "]; - 26 [label="Access variable this@R|/test_1|"]; - 27 [label="Type operator: (this@R|/test_1| is R|A|)"]; - 28 [label="Exit when branch condition"]; - } + 26 [label="Enter when"]; subgraph cluster_14 { color=blue - 29 [label="Enter when branch condition else"]; + 27 [label="Enter when branch condition "]; + 28 [label="Access variable this@R|/test_1|"]; + 29 [label="Type operator: (this@R|/test_1| is R|A|)"]; 30 [label="Exit when branch condition"]; } - 31 [label="Enter when branch result"]; subgraph cluster_15 { color=blue - 32 [label="Enter block"]; - 33 [label="Access variable this@R|/test_1|"]; - 34 [label="Function call: this@R|/test_1|.#()" style="filled" fillcolor=yellow]; - 35 [label="Function call: #()" style="filled" fillcolor=yellow]; - 36 [label="Exit block"]; + 31 [label="Enter when branch condition else"]; + 32 [label="Exit when branch condition"]; } - 37 [label="Exit when branch result"]; - 38 [label="Enter when branch result"]; + 33 [label="Enter when branch result"]; subgraph cluster_16 { color=blue - 39 [label="Enter block"]; - 40 [label="Access variable this@R|/test_1|"]; - 41 [label="Smart cast: this@R|/test_1|"]; - 42 [label="Function call: this@R|/test_1|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 43 [label="Function call: this@R|/test_1|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 44 [label="Exit block"]; + 34 [label="Enter block"]; + 35 [label="Access variable this@R|/test_1|"]; + 36 [label="Function call: this@R|/test_1|.#()" style="filled" fillcolor=yellow]; + 37 [label="Function call: #()" style="filled" fillcolor=yellow]; + 38 [label="Exit block"]; } - 45 [label="Exit when branch result"]; - 46 [label="Exit when"]; + 39 [label="Exit when branch result"]; + 40 [label="Enter when branch result"]; + subgraph cluster_17 { + color=blue + 41 [label="Enter block"]; + 42 [label="Access variable this@R|/test_1|"]; + 43 [label="Smart cast: this@R|/test_1|"]; + 44 [label="Function call: this@R|/test_1|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 45 [label="Function call: this@R|/test_1|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 46 [label="Exit block"]; + } + 47 [label="Exit when branch result"]; + 48 [label="Exit when"]; } - 47 [label="Access variable this@R|/test_1|"]; - 48 [label="Function call: this@R|/test_1|.#()" style="filled" fillcolor=yellow]; - 49 [label="Function call: #()" style="filled" fillcolor=yellow]; - 50 [label="Exit block"]; + 49 [label="Access variable this@R|/test_1|"]; + 50 [label="Function call: this@R|/test_1|.#()" style="filled" fillcolor=yellow]; + 51 [label="Function call: #()" style="filled" fillcolor=yellow]; + 52 [label="Exit block"]; } - 51 [label="Exit function test_1" style="filled" fillcolor=red]; + 53 [label="Exit function test_1" style="filled" fillcolor=red]; } - 22 -> {23}; - 23 -> {24}; 24 -> {25}; 25 -> {26}; 26 -> {27}; 27 -> {28}; - 28 -> {29 38}; + 28 -> {29}; 29 -> {30}; - 30 -> {31}; + 30 -> {31 40}; 31 -> {32}; 32 -> {33}; 33 -> {34}; 34 -> {35}; 35 -> {36}; 36 -> {37}; - 37 -> {46}; + 37 -> {38}; 38 -> {39}; - 39 -> {40}; + 39 -> {48}; 40 -> {41}; 41 -> {42}; 42 -> {43}; @@ -161,67 +166,67 @@ digraph implicitReceivers_kt { 48 -> {49}; 49 -> {50}; 50 -> {51}; + 51 -> {52}; + 52 -> {53}; - subgraph cluster_17 { + subgraph cluster_18 { color=red - 52 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_18 { + 54 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_19 { color=blue - 53 [label="Enter block"]; - subgraph cluster_19 { + 55 [label="Enter block"]; + subgraph cluster_20 { color=blue - 54 [label="Enter when"]; - subgraph cluster_20 { - color=blue - 55 [label="Enter when branch condition "]; - 56 [label="Access variable this@R|/test_2|"]; - 57 [label="Type operator: (this@R|/test_2| !is R|A|)"]; - 58 [label="Exit when branch condition"]; - } + 56 [label="Enter when"]; subgraph cluster_21 { color=blue - 59 [label="Enter when branch condition else"]; + 57 [label="Enter when branch condition "]; + 58 [label="Access variable this@R|/test_2|"]; + 59 [label="Type operator: (this@R|/test_2| !is R|A|)"]; 60 [label="Exit when branch condition"]; } - 61 [label="Enter when branch result"]; subgraph cluster_22 { color=blue - 62 [label="Enter block"]; - 63 [label="Access variable this@R|/test_2|"]; - 64 [label="Smart cast: this@R|/test_2|"]; - 65 [label="Function call: this@R|/test_2|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 66 [label="Function call: this@R|/test_2|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 67 [label="Exit block"]; + 61 [label="Enter when branch condition else"]; + 62 [label="Exit when branch condition"]; } - 68 [label="Exit when branch result"]; - 69 [label="Enter when branch result"]; + 63 [label="Enter when branch result"]; subgraph cluster_23 { color=blue - 70 [label="Enter block"]; - 71 [label="Access variable this@R|/test_2|"]; - 72 [label="Function call: this@R|/test_2|.#()" style="filled" fillcolor=yellow]; - 73 [label="Function call: #()" style="filled" fillcolor=yellow]; - 74 [label="Exit block"]; + 64 [label="Enter block"]; + 65 [label="Access variable this@R|/test_2|"]; + 66 [label="Smart cast: this@R|/test_2|"]; + 67 [label="Function call: this@R|/test_2|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 68 [label="Function call: this@R|/test_2|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 69 [label="Exit block"]; } - 75 [label="Exit when branch result"]; - 76 [label="Exit when"]; + 70 [label="Exit when branch result"]; + 71 [label="Enter when branch result"]; + subgraph cluster_24 { + color=blue + 72 [label="Enter block"]; + 73 [label="Access variable this@R|/test_2|"]; + 74 [label="Function call: this@R|/test_2|.#()" style="filled" fillcolor=yellow]; + 75 [label="Function call: #()" style="filled" fillcolor=yellow]; + 76 [label="Exit block"]; + } + 77 [label="Exit when branch result"]; + 78 [label="Exit when"]; } - 77 [label="Access variable this@R|/test_2|"]; - 78 [label="Function call: this@R|/test_2|.#()" style="filled" fillcolor=yellow]; - 79 [label="Function call: #()" style="filled" fillcolor=yellow]; - 80 [label="Exit block"]; + 79 [label="Access variable this@R|/test_2|"]; + 80 [label="Function call: this@R|/test_2|.#()" style="filled" fillcolor=yellow]; + 81 [label="Function call: #()" style="filled" fillcolor=yellow]; + 82 [label="Exit block"]; } - 81 [label="Exit function test_2" style="filled" fillcolor=red]; + 83 [label="Exit function test_2" style="filled" fillcolor=red]; } - 52 -> {53}; - 53 -> {54}; 54 -> {55}; 55 -> {56}; 56 -> {57}; 57 -> {58}; - 58 -> {59 69}; + 58 -> {59}; 59 -> {60}; - 60 -> {61}; + 60 -> {61 71}; 61 -> {62}; 62 -> {63}; 63 -> {64}; @@ -229,9 +234,9 @@ digraph implicitReceivers_kt { 65 -> {66}; 66 -> {67}; 67 -> {68}; - 68 -> {76}; + 68 -> {69}; 69 -> {70}; - 70 -> {71}; + 70 -> {78}; 71 -> {72}; 72 -> {73}; 73 -> {74}; @@ -242,89 +247,89 @@ digraph implicitReceivers_kt { 78 -> {79}; 79 -> {80}; 80 -> {81}; - - subgraph cluster_24 { - color=red - 82 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_25 { - color=blue - 83 [label="Enter block"]; - 84 [label="Access variable R|/a|"]; - 85 [label="Postponed enter to lambda"]; - subgraph cluster_26 { - color=blue - 86 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_27 { - color=blue - 87 [label="Enter block"]; - 88 [label="Access variable R|/b|"]; - 89 [label="Postponed enter to lambda"]; - subgraph cluster_28 { - color=blue - 90 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_29 { - color=blue - 91 [label="Enter block"]; - 92 [label="Access variable R|/c|"]; - 93 [label="Postponed enter to lambda"]; - subgraph cluster_30 { - color=blue - 94 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_31 { - color=blue - 95 [label="Enter block"]; - 96 [label="Access variable this@R|special/anonymous|"]; - 97 [label="Type operator: (this@R|special/anonymous| as R|A|)"]; - 98 [label="Access variable this@R|special/anonymous|"]; - 99 [label="Smart cast: this@R|special/anonymous|"]; - 100 [label="Function call: this@R|special/anonymous|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 101 [label="Function call: this@R|special/anonymous|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 102 [label="Exit block"]; - } - 103 [label="Exit function " style="filled" fillcolor=red]; - } - 104 [label="Postponed exit from lambda"]; - 105 [label="Function call: R|kotlin/with|(...)" style="filled" fillcolor=yellow]; - 106 [label="Access variable this@R|special/anonymous|"]; - 107 [label="Smart cast: this@R|special/anonymous|"]; - 108 [label="Function call: this@R|special/anonymous|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 109 [label="Function call: this@R|special/anonymous|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 110 [label="Exit block"]; - } - 111 [label="Exit function " style="filled" fillcolor=red]; - } - 112 [label="Postponed exit from lambda"]; - 113 [label="Function call: R|kotlin/with|(...)" style="filled" fillcolor=yellow]; - 114 [label="Exit block"]; - } - 115 [label="Exit function " style="filled" fillcolor=red]; - } - 116 [label="Postponed exit from lambda"]; - 117 [label="Function call: R|kotlin/with|(...)" style="filled" fillcolor=yellow]; - 118 [label="Exit block"]; - } - 119 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 81 -> {82}; 82 -> {83}; - 83 -> {84}; + + subgraph cluster_25 { + color=red + 84 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_26 { + color=blue + 85 [label="Enter block"]; + 86 [label="Access variable R|/a|"]; + 87 [label="Postponed enter to lambda"]; + subgraph cluster_27 { + color=blue + 88 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_28 { + color=blue + 89 [label="Enter block"]; + 90 [label="Access variable R|/b|"]; + 91 [label="Postponed enter to lambda"]; + subgraph cluster_29 { + color=blue + 92 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_30 { + color=blue + 93 [label="Enter block"]; + 94 [label="Access variable R|/c|"]; + 95 [label="Postponed enter to lambda"]; + subgraph cluster_31 { + color=blue + 96 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_32 { + color=blue + 97 [label="Enter block"]; + 98 [label="Access variable this@R|special/anonymous|"]; + 99 [label="Type operator: (this@R|special/anonymous| as R|A|)"]; + 100 [label="Access variable this@R|special/anonymous|"]; + 101 [label="Smart cast: this@R|special/anonymous|"]; + 102 [label="Function call: this@R|special/anonymous|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 103 [label="Function call: this@R|special/anonymous|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 104 [label="Exit block"]; + } + 105 [label="Exit function " style="filled" fillcolor=red]; + } + 106 [label="Postponed exit from lambda"]; + 107 [label="Function call: R|kotlin/with|(...)" style="filled" fillcolor=yellow]; + 108 [label="Access variable this@R|special/anonymous|"]; + 109 [label="Smart cast: this@R|special/anonymous|"]; + 110 [label="Function call: this@R|special/anonymous|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 111 [label="Function call: this@R|special/anonymous|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 112 [label="Exit block"]; + } + 113 [label="Exit function " style="filled" fillcolor=red]; + } + 114 [label="Postponed exit from lambda"]; + 115 [label="Function call: R|kotlin/with|(...)" style="filled" fillcolor=yellow]; + 116 [label="Exit block"]; + } + 117 [label="Exit function " style="filled" fillcolor=red]; + } + 118 [label="Postponed exit from lambda"]; + 119 [label="Function call: R|kotlin/with|(...)" style="filled" fillcolor=yellow]; + 120 [label="Exit block"]; + } + 121 [label="Exit function test_3" style="filled" fillcolor=red]; + } 84 -> {85}; - 85 -> {86 117}; - 85 -> {116} [style=dotted]; - 85 -> {86} [style=dashed]; + 85 -> {86}; 86 -> {87}; - 87 -> {88}; + 87 -> {88 119}; + 87 -> {118} [style=dotted]; + 87 -> {88} [style=dashed]; 88 -> {89}; - 89 -> {90 113}; - 89 -> {112} [style=dotted]; - 89 -> {90} [style=dashed]; + 89 -> {90}; 90 -> {91}; - 91 -> {92}; + 91 -> {92 115}; + 91 -> {114} [style=dotted]; + 91 -> {92} [style=dashed]; 92 -> {93}; - 93 -> {94 105}; - 93 -> {104} [style=dotted]; - 93 -> {94} [style=dashed]; + 93 -> {94}; 94 -> {95}; - 95 -> {96}; + 95 -> {96 107}; + 95 -> {106} [style=dotted]; + 95 -> {96} [style=dashed]; 96 -> {97}; 97 -> {98}; 98 -> {99}; @@ -341,113 +346,113 @@ digraph implicitReceivers_kt { 109 -> {110}; 110 -> {111}; 111 -> {112}; - 112 -> {113} [color=green]; - 112 -> {117} [color=red]; + 112 -> {113}; 113 -> {114}; - 114 -> {115}; + 114 -> {115} [color=green]; + 114 -> {119} [color=red]; 115 -> {116}; 116 -> {117}; 117 -> {118}; 118 -> {119}; + 119 -> {120}; + 120 -> {121}; - subgraph cluster_32 { + subgraph cluster_33 { color=red - 120 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_33 { + 122 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_34 { color=blue - 121 [label="Enter block"]; - subgraph cluster_34 { + 123 [label="Enter block"]; + subgraph cluster_35 { color=blue - 122 [label="Enter when"]; - subgraph cluster_35 { - color=blue - 123 [label="Enter when branch condition "]; - 124 [label="Access variable this@R|/test_4|"]; - 125 [label="Type operator: (this@R|/test_4| !is R|A|)"]; - 126 [label="Exit when branch condition"]; - } + 124 [label="Enter when"]; subgraph cluster_36 { color=blue - 127 [label="Enter when branch condition "]; - 128 [label="Access variable this@R|/test_4|"]; - 129 [label="Smart cast: this@R|/test_4|"]; - 130 [label="Type operator: (this@R|/test_4| !is R|B|)"]; - 131 [label="Exit when branch condition"]; + 125 [label="Enter when branch condition "]; + 126 [label="Access variable this@R|/test_4|"]; + 127 [label="Type operator: (this@R|/test_4| !is R|A|)"]; + 128 [label="Exit when branch condition"]; } subgraph cluster_37 { color=blue - 132 [label="Enter when branch condition else"]; + 129 [label="Enter when branch condition "]; + 130 [label="Access variable this@R|/test_4|"]; + 131 [label="Smart cast: this@R|/test_4|"]; + 132 [label="Type operator: (this@R|/test_4| !is R|B|)"]; 133 [label="Exit when branch condition"]; } - 134 [label="Enter when branch result"]; subgraph cluster_38 { color=blue - 135 [label="Enter block"]; - 136 [label="Access variable this@R|/test_4|"]; - 137 [label="Smart cast: this@R|/test_4|"]; - 138 [label="Function call: this@R|/test_4|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 139 [label="Function call: this@R|/test_4|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 140 [label="Access variable this@R|/test_4|"]; - 141 [label="Smart cast: this@R|/test_4|"]; - 142 [label="Function call: this@R|/test_4|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 143 [label="Function call: this@R|/test_4|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 144 [label="Exit block"]; + 134 [label="Enter when branch condition else"]; + 135 [label="Exit when branch condition"]; } - 145 [label="Exit when branch result"]; - 146 [label="Enter when branch result"]; + 136 [label="Enter when branch result"]; subgraph cluster_39 { color=blue - 147 [label="Enter block"]; - 148 [label="Access variable this@R|/test_4|"]; - 149 [label="Smart cast: this@R|/test_4|"]; - 150 [label="Function call: this@R|/test_4|.#()" style="filled" fillcolor=yellow]; - 151 [label="Function call: #()" style="filled" fillcolor=yellow]; - 152 [label="Access variable this@R|/test_4|"]; - 153 [label="Smart cast: this@R|/test_4|"]; - 154 [label="Function call: this@R|/test_4|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 155 [label="Function call: this@R|/test_4|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 156 [label="Exit block"]; + 137 [label="Enter block"]; + 138 [label="Access variable this@R|/test_4|"]; + 139 [label="Smart cast: this@R|/test_4|"]; + 140 [label="Function call: this@R|/test_4|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 141 [label="Function call: this@R|/test_4|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 142 [label="Access variable this@R|/test_4|"]; + 143 [label="Smart cast: this@R|/test_4|"]; + 144 [label="Function call: this@R|/test_4|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 145 [label="Function call: this@R|/test_4|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 146 [label="Exit block"]; } - 157 [label="Exit when branch result"]; - 158 [label="Enter when branch result"]; + 147 [label="Exit when branch result"]; + 148 [label="Enter when branch result"]; subgraph cluster_40 { color=blue - 159 [label="Enter block"]; - 160 [label="Access variable this@R|/test_4|"]; - 161 [label="Function call: this@R|/test_4|.#()" style="filled" fillcolor=yellow]; - 162 [label="Function call: #()" style="filled" fillcolor=yellow]; - 163 [label="Access variable this@R|/test_4|"]; - 164 [label="Function call: this@R|/test_4|.#()" style="filled" fillcolor=yellow]; - 165 [label="Function call: #()" style="filled" fillcolor=yellow]; - 166 [label="Exit block"]; + 149 [label="Enter block"]; + 150 [label="Access variable this@R|/test_4|"]; + 151 [label="Smart cast: this@R|/test_4|"]; + 152 [label="Function call: this@R|/test_4|.#()" style="filled" fillcolor=yellow]; + 153 [label="Function call: #()" style="filled" fillcolor=yellow]; + 154 [label="Access variable this@R|/test_4|"]; + 155 [label="Smart cast: this@R|/test_4|"]; + 156 [label="Function call: this@R|/test_4|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 157 [label="Function call: this@R|/test_4|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 158 [label="Exit block"]; } - 167 [label="Exit when branch result"]; - 168 [label="Exit when"]; + 159 [label="Exit when branch result"]; + 160 [label="Enter when branch result"]; + subgraph cluster_41 { + color=blue + 161 [label="Enter block"]; + 162 [label="Access variable this@R|/test_4|"]; + 163 [label="Function call: this@R|/test_4|.#()" style="filled" fillcolor=yellow]; + 164 [label="Function call: #()" style="filled" fillcolor=yellow]; + 165 [label="Access variable this@R|/test_4|"]; + 166 [label="Function call: this@R|/test_4|.#()" style="filled" fillcolor=yellow]; + 167 [label="Function call: #()" style="filled" fillcolor=yellow]; + 168 [label="Exit block"]; + } + 169 [label="Exit when branch result"]; + 170 [label="Exit when"]; } - 169 [label="Access variable this@R|/test_4|"]; - 170 [label="Function call: this@R|/test_4|.#()" style="filled" fillcolor=yellow]; - 171 [label="Function call: #()" style="filled" fillcolor=yellow]; - 172 [label="Access variable this@R|/test_4|"]; - 173 [label="Function call: this@R|/test_4|.#()" style="filled" fillcolor=yellow]; - 174 [label="Function call: #()" style="filled" fillcolor=yellow]; - 175 [label="Exit block"]; + 171 [label="Access variable this@R|/test_4|"]; + 172 [label="Function call: this@R|/test_4|.#()" style="filled" fillcolor=yellow]; + 173 [label="Function call: #()" style="filled" fillcolor=yellow]; + 174 [label="Access variable this@R|/test_4|"]; + 175 [label="Function call: this@R|/test_4|.#()" style="filled" fillcolor=yellow]; + 176 [label="Function call: #()" style="filled" fillcolor=yellow]; + 177 [label="Exit block"]; } - 176 [label="Exit function test_4" style="filled" fillcolor=red]; + 178 [label="Exit function test_4" style="filled" fillcolor=red]; } - 120 -> {121}; - 121 -> {122}; 122 -> {123}; 123 -> {124}; 124 -> {125}; 125 -> {126}; - 126 -> {127 158}; + 126 -> {127}; 127 -> {128}; - 128 -> {129}; + 128 -> {129 160}; 129 -> {130}; 130 -> {131}; - 131 -> {132 146}; + 131 -> {132}; 132 -> {133}; - 133 -> {134}; + 133 -> {134 148}; 134 -> {135}; 135 -> {136}; 136 -> {137}; @@ -459,9 +464,9 @@ digraph implicitReceivers_kt { 142 -> {143}; 143 -> {144}; 144 -> {145}; - 145 -> {168}; + 145 -> {146}; 146 -> {147}; - 147 -> {148}; + 147 -> {170}; 148 -> {149}; 149 -> {150}; 150 -> {151}; @@ -471,9 +476,9 @@ digraph implicitReceivers_kt { 154 -> {155}; 155 -> {156}; 156 -> {157}; - 157 -> {168}; + 157 -> {158}; 158 -> {159}; - 159 -> {160}; + 159 -> {170}; 160 -> {161}; 161 -> {162}; 162 -> {163}; @@ -490,62 +495,64 @@ digraph implicitReceivers_kt { 173 -> {174}; 174 -> {175}; 175 -> {176}; + 176 -> {177}; + 177 -> {178}; - subgraph cluster_41 { + subgraph cluster_42 { color=red - 177 [label="Enter function test_5" style="filled" fillcolor=red]; - subgraph cluster_42 { + 179 [label="Enter function test_5" style="filled" fillcolor=red]; + subgraph cluster_43 { color=blue - 178 [label="Enter block"]; - subgraph cluster_43 { + 180 [label="Enter block"]; + subgraph cluster_44 { color=blue - 179 [label="Enter when"]; - subgraph cluster_44 { - color=blue - 180 [label="Enter when branch condition "]; - 181 [label="Access variable this@R|/test_5|"]; - 182 [label="Type operator: (this@R|/test_5| is R|kotlin/collections/List<*>|)"]; - 183 [label="Exit when branch condition"]; - } + 181 [label="Enter when"]; subgraph cluster_45 { color=blue - 184 [label="Enter when branch condition "]; - 185 [label="Access variable this@R|/test_5|"]; - 186 [label="Type operator: (this@R|/test_5| is R|kotlin/String|)"]; - 187 [label="Exit when branch condition"]; + 182 [label="Enter when branch condition "]; + 183 [label="Access variable this@R|/test_5|"]; + 184 [label="Type operator: (this@R|/test_5| is R|kotlin/collections/List<*>|)"]; + 185 [label="Exit when branch condition"]; } subgraph cluster_46 { color=blue - 188 [label="Enter when branch condition else"]; + 186 [label="Enter when branch condition "]; + 187 [label="Access variable this@R|/test_5|"]; + 188 [label="Type operator: (this@R|/test_5| is R|kotlin/String|)"]; 189 [label="Exit when branch condition"]; } - 190 [label="Enter when branch result"]; subgraph cluster_47 { color=blue - 191 [label="Enter block"]; - 192 [label="Const: Int(0)"]; - 193 [label="Exit block"]; + 190 [label="Enter when branch condition else"]; + 191 [label="Exit when branch condition"]; } - 194 [label="Exit when branch result"]; - 195 [label="Enter when branch result"]; + 192 [label="Enter when branch result"]; subgraph cluster_48 { color=blue - 196 [label="Enter block"]; - 197 [label="Access variable R|kotlin/String.length|"]; - 198 [label="Exit block"]; + 193 [label="Enter block"]; + 194 [label="Const: Int(0)"]; + 195 [label="Exit block"]; } - 199 [label="Exit when branch result"]; - 200 [label="Enter when branch result"]; + 196 [label="Exit when branch result"]; + 197 [label="Enter when branch result"]; subgraph cluster_49 { color=blue - 201 [label="Enter block"]; - 202 [label="Access variable R|SubstitutionOverride|"]; - 203 [label="Exit block"]; + 198 [label="Enter block"]; + 199 [label="Access variable R|kotlin/String.length|"]; + 200 [label="Exit block"]; } - 204 [label="Exit when branch result"]; - 205 [label="Exit when"]; + 201 [label="Exit when branch result"]; + 202 [label="Enter when branch result"]; + subgraph cluster_50 { + color=blue + 203 [label="Enter block"]; + 204 [label="Access variable R|SubstitutionOverride|"]; + 205 [label="Exit block"]; + } + 206 [label="Exit when branch result"]; + 207 [label="Exit when"]; } - 206 [label="Jump: ^test_5 when () { + 208 [label="Jump: ^test_5 when () { (this@R|/test_5| is R|kotlin/collections/List<*>|) -> { this@R|/test_5|.R|SubstitutionOverride| } @@ -557,64 +564,62 @@ digraph implicitReceivers_kt { } } "]; - 207 [label="Stub" style="filled" fillcolor=gray]; - 208 [label="Exit block" style="filled" fillcolor=gray]; + 209 [label="Stub" style="filled" fillcolor=gray]; + 210 [label="Exit block" style="filled" fillcolor=gray]; } - 209 [label="Exit function test_5" style="filled" fillcolor=red]; + 211 [label="Exit function test_5" style="filled" fillcolor=red]; } - 177 -> {178}; - 178 -> {179}; 179 -> {180}; 180 -> {181}; 181 -> {182}; 182 -> {183}; - 183 -> {184 200}; + 183 -> {184}; 184 -> {185}; - 185 -> {186}; + 185 -> {186 202}; 186 -> {187}; - 187 -> {188 195}; + 187 -> {188}; 188 -> {189}; - 189 -> {190}; + 189 -> {190 197}; 190 -> {191}; 191 -> {192}; 192 -> {193}; 193 -> {194}; - 194 -> {205}; + 194 -> {195}; 195 -> {196}; - 196 -> {197}; + 196 -> {207}; 197 -> {198}; 198 -> {199}; - 199 -> {205}; + 199 -> {200}; 200 -> {201}; - 201 -> {202}; + 201 -> {207}; 202 -> {203}; 203 -> {204}; 204 -> {205}; 205 -> {206}; - 206 -> {209}; - 206 -> {207} [style=dotted]; - 207 -> {208} [style=dotted]; + 206 -> {207}; + 207 -> {208}; + 208 -> {211}; 208 -> {209} [style=dotted]; + 209 -> {210} [style=dotted]; + 210 -> {211} [style=dotted]; - subgraph cluster_50 { + subgraph cluster_51 { color=red - 210 [label="Enter function test_6" style="filled" fillcolor=red]; - subgraph cluster_51 { + 212 [label="Enter function test_6" style="filled" fillcolor=red]; + subgraph cluster_52 { color=blue - 211 [label="Enter block"]; - 212 [label="Access variable this@R|/test_6|"]; - 213 [label="Type operator: (this@R|/test_6| as R|kotlin/collections/List<*>|)"]; - 214 [label="Access variable R|SubstitutionOverride|"]; - 215 [label="Access variable this@R|/test_6|"]; - 216 [label="Smart cast: this@R|/test_6|"]; - 217 [label="Type operator: (this@R|/test_6| as R|kotlin/String|)"]; - 218 [label="Access variable R|kotlin/String.length|"]; - 219 [label="Exit block"]; + 213 [label="Enter block"]; + 214 [label="Access variable this@R|/test_6|"]; + 215 [label="Type operator: (this@R|/test_6| as R|kotlin/collections/List<*>|)"]; + 216 [label="Access variable R|SubstitutionOverride|"]; + 217 [label="Access variable this@R|/test_6|"]; + 218 [label="Smart cast: this@R|/test_6|"]; + 219 [label="Type operator: (this@R|/test_6| as R|kotlin/String|)"]; + 220 [label="Access variable R|kotlin/String.length|"]; + 221 [label="Exit block"]; } - 220 [label="Exit function test_6" style="filled" fillcolor=red]; + 222 [label="Exit function test_6" style="filled" fillcolor=red]; } - 210 -> {211}; - 211 -> {212}; 212 -> {213}; 213 -> {214}; 214 -> {215}; @@ -623,5 +628,7 @@ digraph implicitReceivers_kt { 217 -> {218}; 218 -> {219}; 219 -> {220}; + 220 -> {221}; + 221 -> {222}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/thisOfExtensionProperty.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/thisOfExtensionProperty.dot index 81c1f3997be..e104a3a21f6 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/thisOfExtensionProperty.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/thisOfExtensionProperty.dot @@ -5,92 +5,99 @@ digraph thisOfExtensionProperty_kt { subgraph cluster_0 { color=red - 0 [label="Enter class A" style="filled" fillcolor=red]; - 1 [label="Exit class A" style="filled" fillcolor=red]; + 0 [label="Enter file thisOfExtensionProperty.kt" style="filled" fillcolor=red]; + 1 [label="Exit file thisOfExtensionProperty.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; subgraph cluster_1 { color=red - 2 [label="Enter class B" style="filled" fillcolor=red]; - 3 [label="Exit class B" style="filled" fillcolor=red]; + 2 [label="Enter class A" style="filled" fillcolor=red]; + 3 [label="Exit class A" style="filled" fillcolor=red]; } 2 -> {3} [color=green]; subgraph cluster_2 { color=red - 4 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_3 { - color=blue - 5 [label="Enter block"]; - subgraph cluster_4 { - color=blue - 6 [label="Enter &&"]; - 7 [label="Access variable this@R|/check_1|"]; - 8 [label="Type operator: (this@R|/check_1| is R|B|)"]; - 9 [label="Exit left part of &&"]; - 10 [label="Enter right part of &&"]; - 11 [label="Access variable R|/B.b|"]; - 12 [label="Exit &&"]; - } - 13 [label="Jump: ^ (this@R|/check_1| is R|B|) && this@R|/check_1|.R|/B.b|"]; - 14 [label="Stub" style="filled" fillcolor=gray]; - 15 [label="Exit block" style="filled" fillcolor=gray]; - } - 16 [label="Exit function " style="filled" fillcolor=red]; + 4 [label="Enter class B" style="filled" fillcolor=red]; + 5 [label="Exit class B" style="filled" fillcolor=red]; + } + 4 -> {5} [color=green]; + + subgraph cluster_3 { + color=red + 6 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_4 { + color=blue + 7 [label="Enter block"]; + subgraph cluster_5 { + color=blue + 8 [label="Enter &&"]; + 9 [label="Access variable this@R|/check_1|"]; + 10 [label="Type operator: (this@R|/check_1| is R|B|)"]; + 11 [label="Exit left part of &&"]; + 12 [label="Enter right part of &&"]; + 13 [label="Access variable R|/B.b|"]; + 14 [label="Exit &&"]; + } + 15 [label="Jump: ^ (this@R|/check_1| is R|B|) && this@R|/check_1|.R|/B.b|"]; + 16 [label="Stub" style="filled" fillcolor=gray]; + 17 [label="Exit block" style="filled" fillcolor=gray]; + } + 18 [label="Exit function " style="filled" fillcolor=red]; } - 4 -> {5}; - 5 -> {6}; 6 -> {7}; 7 -> {8}; 8 -> {9}; - 9 -> {10 12}; + 9 -> {10}; 10 -> {11}; - 11 -> {12}; + 11 -> {12 14}; 12 -> {13}; - 13 -> {16}; - 13 -> {14} [style=dotted]; - 14 -> {15} [style=dotted]; + 13 -> {14}; + 14 -> {15}; + 15 -> {18}; 15 -> {16} [style=dotted]; + 16 -> {17} [style=dotted]; + 17 -> {18} [style=dotted]; - subgraph cluster_5 { + subgraph cluster_6 { color=red - 17 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_6 { + 19 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_7 { color=blue - 18 [label="Enter block"]; - subgraph cluster_7 { + 20 [label="Enter block"]; + subgraph cluster_8 { color=blue - 19 [label="Enter &&"]; - 20 [label="Access variable this@R|/check_2|"]; - 21 [label="Type operator: (this@R|/check_2| is R|B|)"]; - 22 [label="Exit left part of &&"]; - 23 [label="Enter right part of &&"]; - 24 [label="Access variable this@R|/check_2|"]; - 25 [label="Smart cast: this@R|/check_2|"]; - 26 [label="Access variable R|/B.b|"]; - 27 [label="Exit &&"]; + 21 [label="Enter &&"]; + 22 [label="Access variable this@R|/check_2|"]; + 23 [label="Type operator: (this@R|/check_2| is R|B|)"]; + 24 [label="Exit left part of &&"]; + 25 [label="Enter right part of &&"]; + 26 [label="Access variable this@R|/check_2|"]; + 27 [label="Smart cast: this@R|/check_2|"]; + 28 [label="Access variable R|/B.b|"]; + 29 [label="Exit &&"]; } - 28 [label="Jump: ^ (this@R|/check_2| is R|B|) && this@R|/check_2|.R|/B.b|"]; - 29 [label="Stub" style="filled" fillcolor=gray]; - 30 [label="Exit block" style="filled" fillcolor=gray]; + 30 [label="Jump: ^ (this@R|/check_2| is R|B|) && this@R|/check_2|.R|/B.b|"]; + 31 [label="Stub" style="filled" fillcolor=gray]; + 32 [label="Exit block" style="filled" fillcolor=gray]; } - 31 [label="Exit function " style="filled" fillcolor=red]; + 33 [label="Exit function " style="filled" fillcolor=red]; } - 17 -> {18}; - 18 -> {19}; 19 -> {20}; 20 -> {21}; 21 -> {22}; - 22 -> {23 27}; + 22 -> {23}; 23 -> {24}; - 24 -> {25}; + 24 -> {25 29}; 25 -> {26}; 26 -> {27}; 27 -> {28}; - 28 -> {31}; - 28 -> {29} [style=dotted]; - 29 -> {30} [style=dotted]; + 28 -> {29}; + 29 -> {30}; + 30 -> {33}; 30 -> {31} [style=dotted]; + 31 -> {32} [style=dotted]; + 32 -> {33} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/assignSafeCall.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/assignSafeCall.dot index 684dd0b9da6..05822d2ca8c 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/assignSafeCall.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/assignSafeCall.dot @@ -5,110 +5,115 @@ digraph assignSafeCall_kt { subgraph cluster_0 { color=red - 0 [label="Enter class A" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter property" style="filled" fillcolor=red]; - 2 [label="Const: Int(1)"]; - 3 [label="Exit property" style="filled" fillcolor=red]; - } - subgraph cluster_2 { - color=blue - 4 [label="Enter function " style="filled" fillcolor=red]; - 5 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 6 [label="Exit function " style="filled" fillcolor=red]; - } - 7 [label="Exit class A" style="filled" fillcolor=red]; + 0 [label="Enter file assignSafeCall.kt" style="filled" fillcolor=red]; + 1 [label="Exit file assignSafeCall.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; - 0 -> {7} [style=dotted]; - 0 -> {1 4} [style=dashed]; - 1 -> {2}; - 2 -> {3}; - 3 -> {4} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter class A" style="filled" fillcolor=red]; + subgraph cluster_2 { + color=blue + 3 [label="Enter property" style="filled" fillcolor=red]; + 4 [label="Const: Int(1)"]; + 5 [label="Exit property" style="filled" fillcolor=red]; + } + subgraph cluster_3 { + color=blue + 6 [label="Enter function " style="filled" fillcolor=red]; + 7 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 8 [label="Exit function " style="filled" fillcolor=red]; + } + 9 [label="Exit class A" style="filled" fillcolor=red]; + } + 2 -> {3} [color=green]; + 2 -> {9} [style=dotted]; + 2 -> {3 6} [style=dashed]; + 3 -> {4}; 4 -> {5}; - 5 -> {6}; - 6 -> {7} [color=green]; + 5 -> {6} [color=green]; + 6 -> {7}; + 7 -> {8}; + 8 -> {9} [color=green]; - subgraph cluster_3 { + subgraph cluster_4 { color=red - 8 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_4 { + 10 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_5 { color=blue - 9 [label="Enter block"]; - 10 [label="Const: Int(1)"]; - 11 [label="Jump: ^foo Int(1)"]; - 12 [label="Stub" style="filled" fillcolor=gray]; - 13 [label="Exit block" style="filled" fillcolor=gray]; + 11 [label="Enter block"]; + 12 [label="Const: Int(1)"]; + 13 [label="Jump: ^foo Int(1)"]; + 14 [label="Stub" style="filled" fillcolor=gray]; + 15 [label="Exit block" style="filled" fillcolor=gray]; } - 14 [label="Exit function foo" style="filled" fillcolor=red]; + 16 [label="Exit function foo" style="filled" fillcolor=red]; } - 8 -> {9}; - 9 -> {10}; 10 -> {11}; - 11 -> {14}; - 11 -> {12} [style=dotted]; - 12 -> {13} [style=dotted]; + 11 -> {12}; + 12 -> {13}; + 13 -> {16}; 13 -> {14} [style=dotted]; + 14 -> {15} [style=dotted]; + 15 -> {16} [style=dotted]; - subgraph cluster_5 { + subgraph cluster_6 { color=red - 15 [label="Enter function bar" style="filled" fillcolor=red]; - subgraph cluster_6 { + 17 [label="Enter function bar" style="filled" fillcolor=red]; + subgraph cluster_7 { color=blue - 16 [label="Enter block"]; - 17 [label="Exit block"]; + 18 [label="Enter block"]; + 19 [label="Exit block"]; } - 18 [label="Exit function bar" style="filled" fillcolor=red]; + 20 [label="Exit function bar" style="filled" fillcolor=red]; } - 15 -> {16}; - 16 -> {17}; 17 -> {18}; + 18 -> {19}; + 19 -> {20}; - subgraph cluster_7 { + subgraph cluster_8 { color=red - 19 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_8 { + 21 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_9 { color=blue - 20 [label="Enter block"]; - 21 [label="Access variable R|/a|"]; - 22 [label="Enter safe call"]; - 23 [label="Access variable R|/A.x|"]; - 24 [label="Exit safe call"]; - 25 [label="Variable declaration: lval x: R|kotlin/Int?|"]; - subgraph cluster_9 { + 22 [label="Enter block"]; + 23 [label="Access variable R|/a|"]; + 24 [label="Enter safe call"]; + 25 [label="Access variable R|/A.x|"]; + 26 [label="Exit safe call"]; + 27 [label="Variable declaration: lval x: R|kotlin/Int?|"]; + subgraph cluster_10 { color=blue - 26 [label="Enter when"]; - subgraph cluster_10 { - color=blue - 27 [label="Enter when branch condition "]; - 28 [label="Access variable R|/x|"]; - 29 [label="Const: Null(null)"]; - 30 [label="Equality operator !="]; - 31 [label="Exit when branch condition"]; - } - 32 [label="Synthetic else branch"]; - 33 [label="Enter when branch result"]; + 28 [label="Enter when"]; subgraph cluster_11 { color=blue - 34 [label="Enter block"]; - 35 [label="Access variable R|/a|"]; - 36 [label="Smart cast: R|/a|"]; - 37 [label="Function call: R|/a|.R|/A.bar|()" style="filled" fillcolor=yellow]; - 38 [label="Exit block"]; + 29 [label="Enter when branch condition "]; + 30 [label="Access variable R|/x|"]; + 31 [label="Const: Null(null)"]; + 32 [label="Equality operator !="]; + 33 [label="Exit when branch condition"]; } - 39 [label="Exit when branch result"]; - 40 [label="Exit when"]; + 34 [label="Synthetic else branch"]; + 35 [label="Enter when branch result"]; + subgraph cluster_12 { + color=blue + 36 [label="Enter block"]; + 37 [label="Access variable R|/a|"]; + 38 [label="Smart cast: R|/a|"]; + 39 [label="Function call: R|/a|.R|/A.bar|()" style="filled" fillcolor=yellow]; + 40 [label="Exit block"]; + } + 41 [label="Exit when branch result"]; + 42 [label="Exit when"]; } - 41 [label="Exit block"]; + 43 [label="Exit block"]; } - 42 [label="Exit function test_1" style="filled" fillcolor=red]; + 44 [label="Exit function test_1" style="filled" fillcolor=red]; } - 19 -> {20}; - 20 -> {21}; - 21 -> {22 24}; + 21 -> {22}; 22 -> {23}; - 23 -> {24}; + 23 -> {24 26}; 24 -> {25}; 25 -> {26}; 26 -> {27}; @@ -116,10 +121,10 @@ digraph assignSafeCall_kt { 28 -> {29}; 29 -> {30}; 30 -> {31}; - 31 -> {32 33}; - 32 -> {40}; - 33 -> {34}; - 34 -> {35}; + 31 -> {32}; + 32 -> {33}; + 33 -> {34 35}; + 34 -> {42}; 35 -> {36}; 36 -> {37}; 37 -> {38}; @@ -127,51 +132,51 @@ digraph assignSafeCall_kt { 39 -> {40}; 40 -> {41}; 41 -> {42}; + 42 -> {43}; + 43 -> {44}; - subgraph cluster_12 { + subgraph cluster_13 { color=red - 43 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_13 { + 45 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_14 { color=blue - 44 [label="Enter block"]; - 45 [label="Access variable R|/a|"]; - 46 [label="Enter safe call"]; - 47 [label="Function call: $subj$.R|/A.foo|()" style="filled" fillcolor=yellow]; - 48 [label="Exit safe call"]; - 49 [label="Variable declaration: lval x: R|kotlin/Int?|"]; - subgraph cluster_14 { + 46 [label="Enter block"]; + 47 [label="Access variable R|/a|"]; + 48 [label="Enter safe call"]; + 49 [label="Function call: $subj$.R|/A.foo|()" style="filled" fillcolor=yellow]; + 50 [label="Exit safe call"]; + 51 [label="Variable declaration: lval x: R|kotlin/Int?|"]; + subgraph cluster_15 { color=blue - 50 [label="Enter when"]; - subgraph cluster_15 { - color=blue - 51 [label="Enter when branch condition "]; - 52 [label="Access variable R|/x|"]; - 53 [label="Const: Null(null)"]; - 54 [label="Equality operator !="]; - 55 [label="Exit when branch condition"]; - } - 56 [label="Synthetic else branch"]; - 57 [label="Enter when branch result"]; + 52 [label="Enter when"]; subgraph cluster_16 { color=blue - 58 [label="Enter block"]; - 59 [label="Access variable R|/a|"]; - 60 [label="Smart cast: R|/a|"]; - 61 [label="Function call: R|/a|.R|/A.bar|()" style="filled" fillcolor=yellow]; - 62 [label="Exit block"]; + 53 [label="Enter when branch condition "]; + 54 [label="Access variable R|/x|"]; + 55 [label="Const: Null(null)"]; + 56 [label="Equality operator !="]; + 57 [label="Exit when branch condition"]; } - 63 [label="Exit when branch result"]; - 64 [label="Exit when"]; + 58 [label="Synthetic else branch"]; + 59 [label="Enter when branch result"]; + subgraph cluster_17 { + color=blue + 60 [label="Enter block"]; + 61 [label="Access variable R|/a|"]; + 62 [label="Smart cast: R|/a|"]; + 63 [label="Function call: R|/a|.R|/A.bar|()" style="filled" fillcolor=yellow]; + 64 [label="Exit block"]; + } + 65 [label="Exit when branch result"]; + 66 [label="Exit when"]; } - 65 [label="Exit block"]; + 67 [label="Exit block"]; } - 66 [label="Exit function test_2" style="filled" fillcolor=red]; + 68 [label="Exit function test_2" style="filled" fillcolor=red]; } - 43 -> {44}; - 44 -> {45}; - 45 -> {46 48}; + 45 -> {46}; 46 -> {47}; - 47 -> {48}; + 47 -> {48 50}; 48 -> {49}; 49 -> {50}; 50 -> {51}; @@ -179,10 +184,10 @@ digraph assignSafeCall_kt { 52 -> {53}; 53 -> {54}; 54 -> {55}; - 55 -> {56 57}; - 56 -> {64}; - 57 -> {58}; - 58 -> {59}; + 55 -> {56}; + 56 -> {57}; + 57 -> {58 59}; + 58 -> {66}; 59 -> {60}; 60 -> {61}; 61 -> {62}; @@ -190,42 +195,42 @@ digraph assignSafeCall_kt { 63 -> {64}; 64 -> {65}; 65 -> {66}; - - subgraph cluster_17 { - color=red - 67 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_18 { - color=blue - 68 [label="Enter block"]; - 69 [label="Access variable R|/x|"]; - 70 [label="Type operator: (R|/x| as? R|A|)"]; - 71 [label="Exit lhs of ?:"]; - 72 [label="Enter rhs of ?:"]; - 73 [label="Jump: ^test_3 Unit"]; - 74 [label="Stub" style="filled" fillcolor=gray]; - 75 [label="Lhs of ?: is not null"]; - 76 [label="Exit ?:"]; - 77 [label="Variable declaration: lval a: R|A|"]; - 78 [label="Access variable R|/a|"]; - 79 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 80 [label="Access variable R|/x|"]; - 81 [label="Smart cast: R|/x|"]; - 82 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 83 [label="Exit block"]; - } - 84 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 66 -> {67}; 67 -> {68}; - 68 -> {69}; + + subgraph cluster_18 { + color=red + 69 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_19 { + color=blue + 70 [label="Enter block"]; + 71 [label="Access variable R|/x|"]; + 72 [label="Type operator: (R|/x| as? R|A|)"]; + 73 [label="Exit lhs of ?:"]; + 74 [label="Enter rhs of ?:"]; + 75 [label="Jump: ^test_3 Unit"]; + 76 [label="Stub" style="filled" fillcolor=gray]; + 77 [label="Lhs of ?: is not null"]; + 78 [label="Exit ?:"]; + 79 [label="Variable declaration: lval a: R|A|"]; + 80 [label="Access variable R|/a|"]; + 81 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 82 [label="Access variable R|/x|"]; + 83 [label="Smart cast: R|/x|"]; + 84 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 85 [label="Exit block"]; + } + 86 [label="Exit function test_3" style="filled" fillcolor=red]; + } 69 -> {70}; 70 -> {71}; - 71 -> {72 75}; + 71 -> {72}; 72 -> {73}; - 73 -> {84}; - 73 -> {74} [style=dotted]; - 74 -> {76} [style=dotted]; - 75 -> {76}; - 76 -> {77}; + 73 -> {74 77}; + 74 -> {75}; + 75 -> {86}; + 75 -> {76} [style=dotted]; + 76 -> {78} [style=dotted]; 77 -> {78}; 78 -> {79}; 79 -> {80}; @@ -233,72 +238,72 @@ digraph assignSafeCall_kt { 81 -> {82}; 82 -> {83}; 83 -> {84}; - - subgraph cluster_19 { - color=red - 85 [label="Enter class B" style="filled" fillcolor=red]; - 86 [label="Exit class B" style="filled" fillcolor=red]; - } - 85 -> {86} [color=green]; + 84 -> {85}; + 85 -> {86}; subgraph cluster_20 { color=red - 87 [label="Enter function foo" style="filled" fillcolor=red]; - 88 [label="Exit function foo" style="filled" fillcolor=red]; + 87 [label="Enter class B" style="filled" fillcolor=red]; + 88 [label="Exit class B" style="filled" fillcolor=red]; } - 87 -> {88}; + 87 -> {88} [color=green]; subgraph cluster_21 { color=red - 89 [label="Enter function bar" style="filled" fillcolor=red]; - 90 [label="Exit function bar" style="filled" fillcolor=red]; + 89 [label="Enter function foo" style="filled" fillcolor=red]; + 90 [label="Exit function foo" style="filled" fillcolor=red]; } 89 -> {90}; subgraph cluster_22 { color=red - 91 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_23 { - color=blue - 92 [label="Enter block"]; - 93 [label="Access variable R|/a|"]; - 94 [label="Enter safe call"]; - 95 [label="Access variable R|/B.x|"]; - 96 [label="Exit safe call"]; - 97 [label="Variable declaration: lval x: R|kotlin/Int?|"]; - subgraph cluster_24 { - color=blue - 98 [label="Enter when"]; - subgraph cluster_25 { - color=blue - 99 [label="Enter when branch condition "]; - 100 [label="Access variable R|/x|"]; - 101 [label="Const: Null(null)"]; - 102 [label="Equality operator !="]; - 103 [label="Exit when branch condition"]; - } - 104 [label="Synthetic else branch"]; - 105 [label="Enter when branch result"]; - subgraph cluster_26 { - color=blue - 106 [label="Enter block"]; - 107 [label="Access variable R|/a|"]; - 108 [label="Smart cast: R|/a|"]; - 109 [label="Function call: R|/a|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 110 [label="Exit block"]; - } - 111 [label="Exit when branch result"]; - 112 [label="Exit when"]; - } - 113 [label="Exit block"]; - } - 114 [label="Exit function test_1" style="filled" fillcolor=red]; + 91 [label="Enter function bar" style="filled" fillcolor=red]; + 92 [label="Exit function bar" style="filled" fillcolor=red]; } 91 -> {92}; - 92 -> {93}; - 93 -> {94 96}; + + subgraph cluster_23 { + color=red + 93 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_24 { + color=blue + 94 [label="Enter block"]; + 95 [label="Access variable R|/a|"]; + 96 [label="Enter safe call"]; + 97 [label="Access variable R|/B.x|"]; + 98 [label="Exit safe call"]; + 99 [label="Variable declaration: lval x: R|kotlin/Int?|"]; + subgraph cluster_25 { + color=blue + 100 [label="Enter when"]; + subgraph cluster_26 { + color=blue + 101 [label="Enter when branch condition "]; + 102 [label="Access variable R|/x|"]; + 103 [label="Const: Null(null)"]; + 104 [label="Equality operator !="]; + 105 [label="Exit when branch condition"]; + } + 106 [label="Synthetic else branch"]; + 107 [label="Enter when branch result"]; + subgraph cluster_27 { + color=blue + 108 [label="Enter block"]; + 109 [label="Access variable R|/a|"]; + 110 [label="Smart cast: R|/a|"]; + 111 [label="Function call: R|/a|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 112 [label="Exit block"]; + } + 113 [label="Exit when branch result"]; + 114 [label="Exit when"]; + } + 115 [label="Exit block"]; + } + 116 [label="Exit function test_1" style="filled" fillcolor=red]; + } + 93 -> {94}; 94 -> {95}; - 95 -> {96}; + 95 -> {96 98}; 96 -> {97}; 97 -> {98}; 98 -> {99}; @@ -306,10 +311,10 @@ digraph assignSafeCall_kt { 100 -> {101}; 101 -> {102}; 102 -> {103}; - 103 -> {104 105}; - 104 -> {112}; - 105 -> {106}; - 106 -> {107}; + 103 -> {104}; + 104 -> {105}; + 105 -> {106 107}; + 106 -> {114}; 107 -> {108}; 108 -> {109}; 109 -> {110}; @@ -317,51 +322,51 @@ digraph assignSafeCall_kt { 111 -> {112}; 112 -> {113}; 113 -> {114}; + 114 -> {115}; + 115 -> {116}; - subgraph cluster_27 { + subgraph cluster_28 { color=red - 115 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_28 { + 117 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_29 { color=blue - 116 [label="Enter block"]; - 117 [label="Access variable R|/a|"]; - 118 [label="Enter safe call"]; - 119 [label="Function call: $subj$.R|/B.foo|()" style="filled" fillcolor=yellow]; - 120 [label="Exit safe call"]; - 121 [label="Variable declaration: lval x: R|kotlin/Int?|"]; - subgraph cluster_29 { + 118 [label="Enter block"]; + 119 [label="Access variable R|/a|"]; + 120 [label="Enter safe call"]; + 121 [label="Function call: $subj$.R|/B.foo|()" style="filled" fillcolor=yellow]; + 122 [label="Exit safe call"]; + 123 [label="Variable declaration: lval x: R|kotlin/Int?|"]; + subgraph cluster_30 { color=blue - 122 [label="Enter when"]; - subgraph cluster_30 { - color=blue - 123 [label="Enter when branch condition "]; - 124 [label="Access variable R|/x|"]; - 125 [label="Const: Null(null)"]; - 126 [label="Equality operator !="]; - 127 [label="Exit when branch condition"]; - } - 128 [label="Synthetic else branch"]; - 129 [label="Enter when branch result"]; + 124 [label="Enter when"]; subgraph cluster_31 { color=blue - 130 [label="Enter block"]; - 131 [label="Access variable R|/a|"]; - 132 [label="Smart cast: R|/a|"]; - 133 [label="Function call: R|/a|.R|/B.bar|()" style="filled" fillcolor=yellow]; - 134 [label="Exit block"]; + 125 [label="Enter when branch condition "]; + 126 [label="Access variable R|/x|"]; + 127 [label="Const: Null(null)"]; + 128 [label="Equality operator !="]; + 129 [label="Exit when branch condition"]; } - 135 [label="Exit when branch result"]; - 136 [label="Exit when"]; + 130 [label="Synthetic else branch"]; + 131 [label="Enter when branch result"]; + subgraph cluster_32 { + color=blue + 132 [label="Enter block"]; + 133 [label="Access variable R|/a|"]; + 134 [label="Smart cast: R|/a|"]; + 135 [label="Function call: R|/a|.R|/B.bar|()" style="filled" fillcolor=yellow]; + 136 [label="Exit block"]; + } + 137 [label="Exit when branch result"]; + 138 [label="Exit when"]; } - 137 [label="Exit block"]; + 139 [label="Exit block"]; } - 138 [label="Exit function test_2" style="filled" fillcolor=red]; + 140 [label="Exit function test_2" style="filled" fillcolor=red]; } - 115 -> {116}; - 116 -> {117}; - 117 -> {118 120}; + 117 -> {118}; 118 -> {119}; - 119 -> {120}; + 119 -> {120 122}; 120 -> {121}; 121 -> {122}; 122 -> {123}; @@ -369,10 +374,10 @@ digraph assignSafeCall_kt { 124 -> {125}; 125 -> {126}; 126 -> {127}; - 127 -> {128 129}; - 128 -> {136}; - 129 -> {130}; - 130 -> {131}; + 127 -> {128}; + 128 -> {129}; + 129 -> {130 131}; + 130 -> {138}; 131 -> {132}; 132 -> {133}; 133 -> {134}; @@ -380,42 +385,42 @@ digraph assignSafeCall_kt { 135 -> {136}; 136 -> {137}; 137 -> {138}; - - subgraph cluster_32 { - color=red - 139 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_33 { - color=blue - 140 [label="Enter block"]; - 141 [label="Access variable R|/x|"]; - 142 [label="Type operator: (R|/x| as? R|B|)"]; - 143 [label="Exit lhs of ?:"]; - 144 [label="Enter rhs of ?:"]; - 145 [label="Jump: ^test_3 Unit"]; - 146 [label="Stub" style="filled" fillcolor=gray]; - 147 [label="Lhs of ?: is not null"]; - 148 [label="Exit ?:"]; - 149 [label="Variable declaration: lval a: R|B|"]; - 150 [label="Access variable R|/a|"]; - 151 [label="Function call: R|/a|.R|/B.foo|()" style="filled" fillcolor=yellow]; - 152 [label="Access variable R|/x|"]; - 153 [label="Smart cast: R|/x|"]; - 154 [label="Function call: R|/x|.R|/B.foo|()" style="filled" fillcolor=yellow]; - 155 [label="Exit block"]; - } - 156 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 138 -> {139}; 139 -> {140}; - 140 -> {141}; + + subgraph cluster_33 { + color=red + 141 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_34 { + color=blue + 142 [label="Enter block"]; + 143 [label="Access variable R|/x|"]; + 144 [label="Type operator: (R|/x| as? R|B|)"]; + 145 [label="Exit lhs of ?:"]; + 146 [label="Enter rhs of ?:"]; + 147 [label="Jump: ^test_3 Unit"]; + 148 [label="Stub" style="filled" fillcolor=gray]; + 149 [label="Lhs of ?: is not null"]; + 150 [label="Exit ?:"]; + 151 [label="Variable declaration: lval a: R|B|"]; + 152 [label="Access variable R|/a|"]; + 153 [label="Function call: R|/a|.R|/B.foo|()" style="filled" fillcolor=yellow]; + 154 [label="Access variable R|/x|"]; + 155 [label="Smart cast: R|/x|"]; + 156 [label="Function call: R|/x|.R|/B.foo|()" style="filled" fillcolor=yellow]; + 157 [label="Exit block"]; + } + 158 [label="Exit function test_3" style="filled" fillcolor=red]; + } 141 -> {142}; 142 -> {143}; - 143 -> {144 147}; + 143 -> {144}; 144 -> {145}; - 145 -> {156}; - 145 -> {146} [style=dotted]; - 146 -> {148} [style=dotted]; - 147 -> {148}; - 148 -> {149}; + 145 -> {146 149}; + 146 -> {147}; + 147 -> {158}; + 147 -> {148} [style=dotted]; + 148 -> {150} [style=dotted]; 149 -> {150}; 150 -> {151}; 151 -> {152}; @@ -423,5 +428,7 @@ digraph assignSafeCall_kt { 153 -> {154}; 154 -> {155}; 155 -> {156}; + 156 -> {157}; + 157 -> {158}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/safeCallAndEqualityToBool.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/safeCallAndEqualityToBool.dot index 268ea2a962c..7cf3f2830e1 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/safeCallAndEqualityToBool.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/safeCallAndEqualityToBool.dot @@ -5,96 +5,101 @@ digraph safeCallAndEqualityToBool_kt { subgraph cluster_0 { color=red - 0 [label="Enter function check" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter block"]; - 2 [label="Const: Boolean(true)"]; - 3 [label="Jump: ^check Boolean(true)"]; - 4 [label="Stub" style="filled" fillcolor=gray]; - 5 [label="Exit block" style="filled" fillcolor=gray]; - } - 6 [label="Exit function check" style="filled" fillcolor=red]; + 0 [label="Enter file safeCallAndEqualityToBool.kt" style="filled" fillcolor=red]; + 1 [label="Exit file safeCallAndEqualityToBool.kt" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; - 2 -> {3}; - 3 -> {6}; - 3 -> {4} [style=dotted]; - 4 -> {5} [style=dotted]; - 5 -> {6} [style=dotted]; + 0 -> {1} [color=green]; - subgraph cluster_2 { + subgraph cluster_1 { color=red - 7 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_3 { + 2 [label="Enter function check" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 8 [label="Enter block"]; - subgraph cluster_4 { + 3 [label="Enter block"]; + 4 [label="Const: Boolean(true)"]; + 5 [label="Jump: ^check Boolean(true)"]; + 6 [label="Stub" style="filled" fillcolor=gray]; + 7 [label="Exit block" style="filled" fillcolor=gray]; + } + 8 [label="Exit function check" style="filled" fillcolor=red]; + } + 2 -> {3}; + 3 -> {4}; + 4 -> {5}; + 5 -> {8}; + 5 -> {6} [style=dotted]; + 6 -> {7} [style=dotted]; + 7 -> {8} [style=dotted]; + + subgraph cluster_3 { + color=red + 9 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_4 { + color=blue + 10 [label="Enter block"]; + subgraph cluster_5 { color=blue - 9 [label="Enter when"]; - subgraph cluster_5 { - color=blue - 10 [label="Enter when branch condition "]; - 11 [label="Access variable R|/s|"]; - 12 [label="Enter safe call"]; - 13 [label="Function call: $subj$.R|/check|()" style="filled" fillcolor=yellow]; - 14 [label="Exit safe call"]; - 15 [label="Const: Boolean(true)"]; - 16 [label="Equality operator =="]; - 17 [label="Exit when branch condition"]; - } + 11 [label="Enter when"]; subgraph cluster_6 { color=blue - 18 [label="Enter when branch condition else"]; + 12 [label="Enter when branch condition "]; + 13 [label="Access variable R|/s|"]; + 14 [label="Enter safe call"]; + 15 [label="Function call: $subj$.R|/check|()" style="filled" fillcolor=yellow]; + 16 [label="Exit safe call"]; + 17 [label="Const: Boolean(true)"]; + 18 [label="Equality operator =="]; 19 [label="Exit when branch condition"]; } - 20 [label="Enter when branch result"]; subgraph cluster_7 { color=blue - 21 [label="Enter block"]; - 22 [label="Access variable R|/s|"]; - 23 [label="Access variable R|kotlin/String.length#|"]; - 24 [label="Exit block"]; + 20 [label="Enter when branch condition else"]; + 21 [label="Exit when branch condition"]; } - 25 [label="Exit when branch result"]; - 26 [label="Enter when branch result"]; + 22 [label="Enter when branch result"]; subgraph cluster_8 { color=blue - 27 [label="Enter block"]; - 28 [label="Access variable R|/s|"]; - 29 [label="Smart cast: R|/s|"]; - 30 [label="Access variable R|kotlin/String.length|"]; - 31 [label="Exit block"]; + 23 [label="Enter block"]; + 24 [label="Access variable R|/s|"]; + 25 [label="Access variable R|kotlin/String.length#|"]; + 26 [label="Exit block"]; } - 32 [label="Exit when branch result"]; - 33 [label="Exit when"]; + 27 [label="Exit when branch result"]; + 28 [label="Enter when branch result"]; + subgraph cluster_9 { + color=blue + 29 [label="Enter block"]; + 30 [label="Access variable R|/s|"]; + 31 [label="Smart cast: R|/s|"]; + 32 [label="Access variable R|kotlin/String.length|"]; + 33 [label="Exit block"]; + } + 34 [label="Exit when branch result"]; + 35 [label="Exit when"]; } - 34 [label="Exit block"]; + 36 [label="Exit block"]; } - 35 [label="Exit function test_1" style="filled" fillcolor=red]; + 37 [label="Exit function test_1" style="filled" fillcolor=red]; } - 7 -> {8}; - 8 -> {9}; 9 -> {10}; 10 -> {11}; - 11 -> {12 14}; + 11 -> {12}; 12 -> {13}; - 13 -> {14}; + 13 -> {14 16}; 14 -> {15}; 15 -> {16}; 16 -> {17}; - 17 -> {18 26}; + 17 -> {18}; 18 -> {19}; - 19 -> {20}; + 19 -> {20 28}; 20 -> {21}; 21 -> {22}; 22 -> {23}; 23 -> {24}; 24 -> {25}; - 25 -> {33}; + 25 -> {26}; 26 -> {27}; - 27 -> {28}; + 27 -> {35}; 28 -> {29}; 29 -> {30}; 30 -> {31}; @@ -102,78 +107,78 @@ digraph safeCallAndEqualityToBool_kt { 32 -> {33}; 33 -> {34}; 34 -> {35}; + 35 -> {36}; + 36 -> {37}; - subgraph cluster_9 { + subgraph cluster_10 { color=red - 36 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_10 { + 38 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_11 { color=blue - 37 [label="Enter block"]; - subgraph cluster_11 { + 39 [label="Enter block"]; + subgraph cluster_12 { color=blue - 38 [label="Enter when"]; - subgraph cluster_12 { - color=blue - 39 [label="Enter when branch condition "]; - 40 [label="Access variable R|/s|"]; - 41 [label="Enter safe call"]; - 42 [label="Function call: $subj$.R|/check|()" style="filled" fillcolor=yellow]; - 43 [label="Exit safe call"]; - 44 [label="Const: Boolean(false)"]; - 45 [label="Equality operator =="]; - 46 [label="Exit when branch condition"]; - } + 40 [label="Enter when"]; subgraph cluster_13 { color=blue - 47 [label="Enter when branch condition else"]; + 41 [label="Enter when branch condition "]; + 42 [label="Access variable R|/s|"]; + 43 [label="Enter safe call"]; + 44 [label="Function call: $subj$.R|/check|()" style="filled" fillcolor=yellow]; + 45 [label="Exit safe call"]; + 46 [label="Const: Boolean(false)"]; + 47 [label="Equality operator =="]; 48 [label="Exit when branch condition"]; } - 49 [label="Enter when branch result"]; subgraph cluster_14 { color=blue - 50 [label="Enter block"]; - 51 [label="Access variable R|/s|"]; - 52 [label="Access variable R|kotlin/String.length#|"]; - 53 [label="Exit block"]; + 49 [label="Enter when branch condition else"]; + 50 [label="Exit when branch condition"]; } - 54 [label="Exit when branch result"]; - 55 [label="Enter when branch result"]; + 51 [label="Enter when branch result"]; subgraph cluster_15 { color=blue - 56 [label="Enter block"]; - 57 [label="Access variable R|/s|"]; - 58 [label="Smart cast: R|/s|"]; - 59 [label="Access variable R|kotlin/String.length|"]; - 60 [label="Exit block"]; + 52 [label="Enter block"]; + 53 [label="Access variable R|/s|"]; + 54 [label="Access variable R|kotlin/String.length#|"]; + 55 [label="Exit block"]; } - 61 [label="Exit when branch result"]; - 62 [label="Exit when"]; + 56 [label="Exit when branch result"]; + 57 [label="Enter when branch result"]; + subgraph cluster_16 { + color=blue + 58 [label="Enter block"]; + 59 [label="Access variable R|/s|"]; + 60 [label="Smart cast: R|/s|"]; + 61 [label="Access variable R|kotlin/String.length|"]; + 62 [label="Exit block"]; + } + 63 [label="Exit when branch result"]; + 64 [label="Exit when"]; } - 63 [label="Exit block"]; + 65 [label="Exit block"]; } - 64 [label="Exit function test_2" style="filled" fillcolor=red]; + 66 [label="Exit function test_2" style="filled" fillcolor=red]; } - 36 -> {37}; - 37 -> {38}; 38 -> {39}; 39 -> {40}; - 40 -> {41 43}; + 40 -> {41}; 41 -> {42}; - 42 -> {43}; + 42 -> {43 45}; 43 -> {44}; 44 -> {45}; 45 -> {46}; - 46 -> {47 55}; + 46 -> {47}; 47 -> {48}; - 48 -> {49}; + 48 -> {49 57}; 49 -> {50}; 50 -> {51}; 51 -> {52}; 52 -> {53}; 53 -> {54}; - 54 -> {62}; + 54 -> {55}; 55 -> {56}; - 56 -> {57}; + 56 -> {64}; 57 -> {58}; 58 -> {59}; 59 -> {60}; @@ -181,163 +186,165 @@ digraph safeCallAndEqualityToBool_kt { 61 -> {62}; 62 -> {63}; 63 -> {64}; + 64 -> {65}; + 65 -> {66}; - subgraph cluster_16 { + subgraph cluster_17 { color=red - 65 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_17 { + 67 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_18 { color=blue - 66 [label="Enter block"]; - subgraph cluster_18 { + 68 [label="Enter block"]; + subgraph cluster_19 { color=blue - 67 [label="Enter when"]; - subgraph cluster_19 { - color=blue - 68 [label="Enter when branch condition "]; - 69 [label="Access variable R|/s|"]; - 70 [label="Enter safe call"]; - 71 [label="Function call: $subj$.R|/check|()" style="filled" fillcolor=yellow]; - 72 [label="Exit safe call"]; - 73 [label="Const: Boolean(true)"]; - 74 [label="Equality operator !="]; - 75 [label="Exit when branch condition"]; - } + 69 [label="Enter when"]; subgraph cluster_20 { color=blue - 76 [label="Enter when branch condition else"]; + 70 [label="Enter when branch condition "]; + 71 [label="Access variable R|/s|"]; + 72 [label="Enter safe call"]; + 73 [label="Function call: $subj$.R|/check|()" style="filled" fillcolor=yellow]; + 74 [label="Exit safe call"]; + 75 [label="Const: Boolean(true)"]; + 76 [label="Equality operator !="]; 77 [label="Exit when branch condition"]; } - 78 [label="Enter when branch result"]; subgraph cluster_21 { color=blue - 79 [label="Enter block"]; - 80 [label="Access variable R|/s|"]; - 81 [label="Smart cast: R|/s|"]; - 82 [label="Access variable R|kotlin/String.length|"]; - 83 [label="Exit block"]; + 78 [label="Enter when branch condition else"]; + 79 [label="Exit when branch condition"]; } - 84 [label="Exit when branch result"]; - 85 [label="Enter when branch result"]; + 80 [label="Enter when branch result"]; subgraph cluster_22 { color=blue - 86 [label="Enter block"]; - 87 [label="Access variable R|/s|"]; - 88 [label="Access variable R|kotlin/String.length#|"]; - 89 [label="Exit block"]; + 81 [label="Enter block"]; + 82 [label="Access variable R|/s|"]; + 83 [label="Smart cast: R|/s|"]; + 84 [label="Access variable R|kotlin/String.length|"]; + 85 [label="Exit block"]; } - 90 [label="Exit when branch result"]; - 91 [label="Exit when"]; + 86 [label="Exit when branch result"]; + 87 [label="Enter when branch result"]; + subgraph cluster_23 { + color=blue + 88 [label="Enter block"]; + 89 [label="Access variable R|/s|"]; + 90 [label="Access variable R|kotlin/String.length#|"]; + 91 [label="Exit block"]; + } + 92 [label="Exit when branch result"]; + 93 [label="Exit when"]; } - 92 [label="Exit block"]; + 94 [label="Exit block"]; } - 93 [label="Exit function test_3" style="filled" fillcolor=red]; + 95 [label="Exit function test_3" style="filled" fillcolor=red]; } - 65 -> {66}; - 66 -> {67}; 67 -> {68}; 68 -> {69}; - 69 -> {70 72}; + 69 -> {70}; 70 -> {71}; - 71 -> {72}; + 71 -> {72 74}; 72 -> {73}; 73 -> {74}; 74 -> {75}; - 75 -> {76 85}; + 75 -> {76}; 76 -> {77}; - 77 -> {78}; + 77 -> {78 87}; 78 -> {79}; 79 -> {80}; 80 -> {81}; 81 -> {82}; 82 -> {83}; 83 -> {84}; - 84 -> {91}; + 84 -> {85}; 85 -> {86}; - 86 -> {87}; + 86 -> {93}; 87 -> {88}; 88 -> {89}; 89 -> {90}; 90 -> {91}; 91 -> {92}; 92 -> {93}; + 93 -> {94}; + 94 -> {95}; - subgraph cluster_23 { + subgraph cluster_24 { color=red - 94 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_24 { + 96 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_25 { color=blue - 95 [label="Enter block"]; - subgraph cluster_25 { + 97 [label="Enter block"]; + subgraph cluster_26 { color=blue - 96 [label="Enter when"]; - subgraph cluster_26 { - color=blue - 97 [label="Enter when branch condition "]; - 98 [label="Access variable R|/s|"]; - 99 [label="Enter safe call"]; - 100 [label="Function call: $subj$.R|/check|()" style="filled" fillcolor=yellow]; - 101 [label="Exit safe call"]; - 102 [label="Const: Boolean(false)"]; - 103 [label="Equality operator !="]; - 104 [label="Exit when branch condition"]; - } + 98 [label="Enter when"]; subgraph cluster_27 { color=blue - 105 [label="Enter when branch condition else"]; + 99 [label="Enter when branch condition "]; + 100 [label="Access variable R|/s|"]; + 101 [label="Enter safe call"]; + 102 [label="Function call: $subj$.R|/check|()" style="filled" fillcolor=yellow]; + 103 [label="Exit safe call"]; + 104 [label="Const: Boolean(false)"]; + 105 [label="Equality operator !="]; 106 [label="Exit when branch condition"]; } - 107 [label="Enter when branch result"]; subgraph cluster_28 { color=blue - 108 [label="Enter block"]; - 109 [label="Access variable R|/s|"]; - 110 [label="Smart cast: R|/s|"]; - 111 [label="Access variable R|kotlin/String.length|"]; - 112 [label="Exit block"]; + 107 [label="Enter when branch condition else"]; + 108 [label="Exit when branch condition"]; } - 113 [label="Exit when branch result"]; - 114 [label="Enter when branch result"]; + 109 [label="Enter when branch result"]; subgraph cluster_29 { color=blue - 115 [label="Enter block"]; - 116 [label="Access variable R|/s|"]; - 117 [label="Access variable R|kotlin/String.length#|"]; - 118 [label="Exit block"]; + 110 [label="Enter block"]; + 111 [label="Access variable R|/s|"]; + 112 [label="Smart cast: R|/s|"]; + 113 [label="Access variable R|kotlin/String.length|"]; + 114 [label="Exit block"]; } - 119 [label="Exit when branch result"]; - 120 [label="Exit when"]; + 115 [label="Exit when branch result"]; + 116 [label="Enter when branch result"]; + subgraph cluster_30 { + color=blue + 117 [label="Enter block"]; + 118 [label="Access variable R|/s|"]; + 119 [label="Access variable R|kotlin/String.length#|"]; + 120 [label="Exit block"]; + } + 121 [label="Exit when branch result"]; + 122 [label="Exit when"]; } - 121 [label="Exit block"]; + 123 [label="Exit block"]; } - 122 [label="Exit function test_4" style="filled" fillcolor=red]; + 124 [label="Exit function test_4" style="filled" fillcolor=red]; } - 94 -> {95}; - 95 -> {96}; 96 -> {97}; 97 -> {98}; - 98 -> {99 101}; + 98 -> {99}; 99 -> {100}; - 100 -> {101}; + 100 -> {101 103}; 101 -> {102}; 102 -> {103}; 103 -> {104}; - 104 -> {105 114}; + 104 -> {105}; 105 -> {106}; - 106 -> {107}; + 106 -> {107 116}; 107 -> {108}; 108 -> {109}; 109 -> {110}; 110 -> {111}; 111 -> {112}; 112 -> {113}; - 113 -> {120}; + 113 -> {114}; 114 -> {115}; - 115 -> {116}; + 115 -> {122}; 116 -> {117}; 117 -> {118}; 118 -> {119}; 119 -> {120}; 120 -> {121}; 121 -> {122}; + 122 -> {123}; + 123 -> {124}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/safeCalls.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/safeCalls.dot index 3da3febc58b..35f2c1faff0 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/safeCalls.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/safeCalls.dot @@ -5,65 +5,70 @@ digraph safeCalls_kt { subgraph cluster_0 { color=red - 0 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter block"]; - 2 [label="Const: String()"]; - 3 [label="Jump: ^foo String()"]; - 4 [label="Stub" style="filled" fillcolor=gray]; - 5 [label="Exit block" style="filled" fillcolor=gray]; - } - 6 [label="Exit function foo" style="filled" fillcolor=red]; + 0 [label="Enter file safeCalls.kt" style="filled" fillcolor=red]; + 1 [label="Exit file safeCalls.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_2 { + color=blue + 3 [label="Enter block"]; + 4 [label="Const: String()"]; + 5 [label="Jump: ^foo String()"]; + 6 [label="Stub" style="filled" fillcolor=gray]; + 7 [label="Exit block" style="filled" fillcolor=gray]; + } + 8 [label="Exit function foo" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; - 3 -> {6}; - 3 -> {4} [style=dotted]; - 4 -> {5} [style=dotted]; + 3 -> {4}; + 4 -> {5}; + 5 -> {8}; 5 -> {6} [style=dotted]; + 6 -> {7} [style=dotted]; + 7 -> {8} [style=dotted]; - subgraph cluster_2 { + subgraph cluster_3 { color=red - 7 [label="Enter function let" style="filled" fillcolor=red]; - subgraph cluster_3 { + 9 [label="Enter function let" style="filled" fillcolor=red]; + subgraph cluster_4 { color=blue - 8 [label="Enter block"]; - 9 [label="Exit block"]; + 10 [label="Enter block"]; + 11 [label="Exit block"]; } - 10 [label="Exit function let" style="filled" fillcolor=red]; + 12 [label="Exit function let" style="filled" fillcolor=red]; } - 7 -> {8}; - 8 -> {9}; 9 -> {10}; - - subgraph cluster_4 { - color=red - 11 [label="Enter function test" style="filled" fillcolor=red]; - subgraph cluster_5 { - color=blue - 12 [label="Enter block"]; - 13 [label="Access variable R|/x|"]; - 14 [label="Enter safe call"]; - 15 [label="Access variable R|/x|"]; - 16 [label="Smart cast: R|/x|"]; - 17 [label="Access variable R|kotlin/String.length|"]; - 18 [label="Const: Int(1)"]; - 19 [label="Equality operator =="]; - 20 [label="Function call: $subj$.R|/foo|(...)" style="filled" fillcolor=yellow]; - 21 [label="Exit safe call"]; - 22 [label="Access variable R|/x|"]; - 23 [label="Access variable R|kotlin/String.length#|"]; - 24 [label="Exit block"]; - } - 25 [label="Exit function test" style="filled" fillcolor=red]; - } + 10 -> {11}; 11 -> {12}; - 12 -> {13}; - 13 -> {14 21}; + + subgraph cluster_5 { + color=red + 13 [label="Enter function test" style="filled" fillcolor=red]; + subgraph cluster_6 { + color=blue + 14 [label="Enter block"]; + 15 [label="Access variable R|/x|"]; + 16 [label="Enter safe call"]; + 17 [label="Access variable R|/x|"]; + 18 [label="Smart cast: R|/x|"]; + 19 [label="Access variable R|kotlin/String.length|"]; + 20 [label="Const: Int(1)"]; + 21 [label="Equality operator =="]; + 22 [label="Function call: $subj$.R|/foo|(...)" style="filled" fillcolor=yellow]; + 23 [label="Exit safe call"]; + 24 [label="Access variable R|/x|"]; + 25 [label="Access variable R|kotlin/String.length#|"]; + 26 [label="Exit block"]; + } + 27 [label="Exit function test" style="filled" fillcolor=red]; + } + 13 -> {14}; 14 -> {15}; - 15 -> {16}; + 15 -> {16 23}; 16 -> {17}; 17 -> {18}; 18 -> {19}; @@ -73,246 +78,248 @@ digraph safeCalls_kt { 22 -> {23}; 23 -> {24}; 24 -> {25}; - - subgraph cluster_6 { - color=red - 26 [label="Enter class A" style="filled" fillcolor=red]; - 27 [label="Exit class A" style="filled" fillcolor=red]; - } - 26 -> {27} [color=green]; + 25 -> {26}; + 26 -> {27}; subgraph cluster_7 { color=red - 28 [label="Enter function bar" style="filled" fillcolor=red]; - 29 [label="Exit function bar" style="filled" fillcolor=red]; + 28 [label="Enter class A" style="filled" fillcolor=red]; + 29 [label="Exit class A" style="filled" fillcolor=red]; } - 28 -> {29}; + 28 -> {29} [color=green]; subgraph cluster_8 { color=red - 30 [label="Enter function bool" style="filled" fillcolor=red]; - 31 [label="Exit function bool" style="filled" fillcolor=red]; + 30 [label="Enter function bar" style="filled" fillcolor=red]; + 31 [label="Exit function bar" style="filled" fillcolor=red]; } 30 -> {31}; subgraph cluster_9 { color=red - 32 [label="Enter function id" style="filled" fillcolor=red]; - 33 [label="Exit function id" style="filled" fillcolor=red]; + 32 [label="Enter function bool" style="filled" fillcolor=red]; + 33 [label="Exit function bool" style="filled" fillcolor=red]; } 32 -> {33}; subgraph cluster_10 { color=red - 34 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_11 { - color=blue - 35 [label="Enter block"]; - 36 [label="Access variable R|/x|"]; - 37 [label="Type operator: (R|/x| as? R|A|)"]; - 38 [label="Enter safe call"]; - 39 [label="Access variable R|/x|"]; - 40 [label="Smart cast: R|/x|"]; - 41 [label="Function call: $subj$.R|/A.bar|(...)" style="filled" fillcolor=yellow]; - 42 [label="Exit safe call"]; - 43 [label="Exit block"]; - } - 44 [label="Exit function test_2" style="filled" fillcolor=red]; + 34 [label="Enter function id" style="filled" fillcolor=red]; + 35 [label="Exit function id" style="filled" fillcolor=red]; } 34 -> {35}; - 35 -> {36}; + + subgraph cluster_11 { + color=red + 36 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_12 { + color=blue + 37 [label="Enter block"]; + 38 [label="Access variable R|/x|"]; + 39 [label="Type operator: (R|/x| as? R|A|)"]; + 40 [label="Enter safe call"]; + 41 [label="Access variable R|/x|"]; + 42 [label="Smart cast: R|/x|"]; + 43 [label="Function call: $subj$.R|/A.bar|(...)" style="filled" fillcolor=yellow]; + 44 [label="Exit safe call"]; + 45 [label="Exit block"]; + } + 46 [label="Exit function test_2" style="filled" fillcolor=red]; + } 36 -> {37}; - 37 -> {38 42}; + 37 -> {38}; 38 -> {39}; - 39 -> {40}; + 39 -> {40 44}; 40 -> {41}; 41 -> {42}; 42 -> {43}; 43 -> {44}; - - subgraph cluster_12 { - color=red - 45 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_13 { - color=blue - 46 [label="Enter block"]; - 47 [label="Access variable R|/x|"]; - 48 [label="Type operator: (R|/x| as? R|A|)"]; - 49 [label="Enter safe call"]; - 50 [label="Access variable R|/x|"]; - 51 [label="Smart cast: R|/x|"]; - 52 [label="Function call: $subj$.R|/A.bar|(...)" style="filled" fillcolor=yellow]; - 53 [label="Enter safe call"]; - 54 [label="Access variable R|/x|"]; - 55 [label="Smart cast: R|/x|"]; - 56 [label="Function call: R|/x|.R|/A.bool|()" style="filled" fillcolor=yellow]; - 57 [label="Function call: $subj$.R|/foo|(...)" style="filled" fillcolor=yellow]; - 58 [label="Enter safe call"]; - 59 [label="Postponed enter to lambda"]; - subgraph cluster_14 { - color=blue - 60 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_15 { - color=blue - 61 [label="Enter block"]; - 62 [label="Access variable R|/x|"]; - 63 [label="Smart cast: R|/x|"]; - 64 [label="Function call: R|/x|.R|/A.bool|()" style="filled" fillcolor=yellow]; - 65 [label="Exit block"]; - } - 66 [label="Exit function " style="filled" fillcolor=red]; - } - 67 [label="Postponed exit from lambda"]; - 68 [label="Function call: $subj$.R|/let|(...)" style="filled" fillcolor=yellow]; - 69 [label="Exit safe call"]; - 70 [label="Exit safe call"]; - 71 [label="Exit safe call"]; - 72 [label="Access variable R|/x|"]; - 73 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 74 [label="Exit block"]; - } - 75 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 44 -> {45}; 45 -> {46}; - 46 -> {47}; + + subgraph cluster_13 { + color=red + 47 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_14 { + color=blue + 48 [label="Enter block"]; + 49 [label="Access variable R|/x|"]; + 50 [label="Type operator: (R|/x| as? R|A|)"]; + 51 [label="Enter safe call"]; + 52 [label="Access variable R|/x|"]; + 53 [label="Smart cast: R|/x|"]; + 54 [label="Function call: $subj$.R|/A.bar|(...)" style="filled" fillcolor=yellow]; + 55 [label="Enter safe call"]; + 56 [label="Access variable R|/x|"]; + 57 [label="Smart cast: R|/x|"]; + 58 [label="Function call: R|/x|.R|/A.bool|()" style="filled" fillcolor=yellow]; + 59 [label="Function call: $subj$.R|/foo|(...)" style="filled" fillcolor=yellow]; + 60 [label="Enter safe call"]; + 61 [label="Postponed enter to lambda"]; + subgraph cluster_15 { + color=blue + 62 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_16 { + color=blue + 63 [label="Enter block"]; + 64 [label="Access variable R|/x|"]; + 65 [label="Smart cast: R|/x|"]; + 66 [label="Function call: R|/x|.R|/A.bool|()" style="filled" fillcolor=yellow]; + 67 [label="Exit block"]; + } + 68 [label="Exit function " style="filled" fillcolor=red]; + } + 69 [label="Postponed exit from lambda"]; + 70 [label="Function call: $subj$.R|/let|(...)" style="filled" fillcolor=yellow]; + 71 [label="Exit safe call"]; + 72 [label="Exit safe call"]; + 73 [label="Exit safe call"]; + 74 [label="Access variable R|/x|"]; + 75 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 76 [label="Exit block"]; + } + 77 [label="Exit function test_3" style="filled" fillcolor=red]; + } 47 -> {48}; - 48 -> {49 69}; + 48 -> {49}; 49 -> {50}; - 50 -> {51}; + 50 -> {51 71}; 51 -> {52}; - 52 -> {53 69}; + 52 -> {53}; 53 -> {54}; - 54 -> {55}; + 54 -> {55 71}; 55 -> {56}; 56 -> {57}; - 57 -> {58 70}; + 57 -> {58}; 58 -> {59}; - 59 -> {60 67 68}; - 59 -> {60} [style=dashed]; + 59 -> {60 72}; 60 -> {61}; - 61 -> {62}; + 61 -> {62 69 70}; + 61 -> {62} [style=dashed]; 62 -> {63}; 63 -> {64}; 64 -> {65}; 65 -> {66}; + 66 -> {67}; 67 -> {68}; - 68 -> {71}; 69 -> {70}; - 70 -> {71}; + 70 -> {73}; 71 -> {72}; 72 -> {73}; 73 -> {74}; 74 -> {75}; - - subgraph cluster_16 { - color=red - 76 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_17 { - color=blue - 77 [label="Enter block"]; - 78 [label="Access variable R|/x|"]; - 79 [label="Enter safe call"]; - 80 [label="Function call: $subj$.R|/A.id|()" style="filled" fillcolor=yellow]; - 81 [label="Enter safe call"]; - 82 [label="Function call: $subj$.R|/A.bool|()" style="filled" fillcolor=yellow]; - 83 [label="Exit safe call"]; - 84 [label="Exit safe call"]; - 85 [label="Access variable R|/x|"]; - 86 [label="Function call: R|/x|.R|/A.id#|()" style="filled" fillcolor=yellow]; - 87 [label="Exit block"]; - } - 88 [label="Exit function test_4" style="filled" fillcolor=red]; - } + 75 -> {76}; 76 -> {77}; - 77 -> {78}; - 78 -> {79 83}; + + subgraph cluster_17 { + color=red + 78 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_18 { + color=blue + 79 [label="Enter block"]; + 80 [label="Access variable R|/x|"]; + 81 [label="Enter safe call"]; + 82 [label="Function call: $subj$.R|/A.id|()" style="filled" fillcolor=yellow]; + 83 [label="Enter safe call"]; + 84 [label="Function call: $subj$.R|/A.bool|()" style="filled" fillcolor=yellow]; + 85 [label="Exit safe call"]; + 86 [label="Exit safe call"]; + 87 [label="Access variable R|/x|"]; + 88 [label="Function call: R|/x|.R|/A.id#|()" style="filled" fillcolor=yellow]; + 89 [label="Exit block"]; + } + 90 [label="Exit function test_4" style="filled" fillcolor=red]; + } + 78 -> {79}; 79 -> {80}; - 80 -> {81 83}; + 80 -> {81 85}; 81 -> {82}; - 82 -> {84}; + 82 -> {83 85}; 83 -> {84}; - 84 -> {85}; + 84 -> {86}; 85 -> {86}; 86 -> {87}; 87 -> {88}; - - subgraph cluster_18 { - color=red - 89 [label="Enter function boo" style="filled" fillcolor=red]; - subgraph cluster_19 { - color=blue - 90 [label="Enter block"]; - 91 [label="Exit block"]; - } - 92 [label="Exit function boo" style="filled" fillcolor=red]; - } + 88 -> {89}; 89 -> {90}; - 90 -> {91}; - 91 -> {92}; - subgraph cluster_20 { + subgraph cluster_19 { color=red - 93 [label="Enter function test_5" style="filled" fillcolor=red]; - subgraph cluster_21 { + 91 [label="Enter function boo" style="filled" fillcolor=red]; + subgraph cluster_20 { color=blue - 94 [label="Enter block"]; - 95 [label="Access variable R|/x|"]; - 96 [label="Enter safe call"]; - 97 [label="Postponed enter to lambda"]; - subgraph cluster_22 { - color=blue - 98 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_23 { - color=blue - 99 [label="Enter block"]; - 100 [label="Jump: ^test_5 Unit"]; - 101 [label="Stub" style="filled" fillcolor=gray]; - 102 [label="Exit block" style="filled" fillcolor=gray]; - } - 103 [label="Exit function " style="filled" fillcolor=gray]; - } - 104 [label="Postponed exit from lambda" style="filled" fillcolor=gray]; - 105 [label="Function call: $subj$.R|kotlin/let|(...)" style="filled" fillcolor=gray]; - 106 [label="Stub" style="filled" fillcolor=gray]; - 107 [label="Enter safe call" style="filled" fillcolor=gray]; - 108 [label="Access variable R|/x|" style="filled" fillcolor=gray]; - 109 [label="Smart cast: R|/x|" style="filled" fillcolor=gray]; - 110 [label="Function call: R|/x|.R|/A.bool|()" style="filled" fillcolor=gray]; - 111 [label="Function call: $subj$.R|/boo|(...)" style="filled" fillcolor=gray]; - 112 [label="Exit safe call"]; - 113 [label="Exit safe call"]; - 114 [label="Access variable R|/x|"]; - 115 [label="Function call: R|/x|.R|/A.id#|()" style="filled" fillcolor=yellow]; - 116 [label="Exit block"]; + 92 [label="Enter block"]; + 93 [label="Exit block"]; } - 117 [label="Exit function test_5" style="filled" fillcolor=red]; + 94 [label="Exit function boo" style="filled" fillcolor=red]; } + 91 -> {92}; + 92 -> {93}; 93 -> {94}; - 94 -> {95}; - 95 -> {96 112}; + + subgraph cluster_21 { + color=red + 95 [label="Enter function test_5" style="filled" fillcolor=red]; + subgraph cluster_22 { + color=blue + 96 [label="Enter block"]; + 97 [label="Access variable R|/x|"]; + 98 [label="Enter safe call"]; + 99 [label="Postponed enter to lambda"]; + subgraph cluster_23 { + color=blue + 100 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_24 { + color=blue + 101 [label="Enter block"]; + 102 [label="Jump: ^test_5 Unit"]; + 103 [label="Stub" style="filled" fillcolor=gray]; + 104 [label="Exit block" style="filled" fillcolor=gray]; + } + 105 [label="Exit function " style="filled" fillcolor=gray]; + } + 106 [label="Postponed exit from lambda" style="filled" fillcolor=gray]; + 107 [label="Function call: $subj$.R|kotlin/let|(...)" style="filled" fillcolor=gray]; + 108 [label="Stub" style="filled" fillcolor=gray]; + 109 [label="Enter safe call" style="filled" fillcolor=gray]; + 110 [label="Access variable R|/x|" style="filled" fillcolor=gray]; + 111 [label="Smart cast: R|/x|" style="filled" fillcolor=gray]; + 112 [label="Function call: R|/x|.R|/A.bool|()" style="filled" fillcolor=gray]; + 113 [label="Function call: $subj$.R|/boo|(...)" style="filled" fillcolor=gray]; + 114 [label="Exit safe call"]; + 115 [label="Exit safe call"]; + 116 [label="Access variable R|/x|"]; + 117 [label="Function call: R|/x|.R|/A.id#|()" style="filled" fillcolor=yellow]; + 118 [label="Exit block"]; + } + 119 [label="Exit function test_5" style="filled" fillcolor=red]; + } + 95 -> {96}; 96 -> {97}; - 97 -> {98}; - 97 -> {104 105} [style=dotted]; - 97 -> {98} [style=dashed]; + 97 -> {98 114}; 98 -> {99}; 99 -> {100}; - 100 -> {117}; - 100 -> {101} [style=dotted]; - 101 -> {102} [style=dotted]; + 99 -> {106 107} [style=dotted]; + 99 -> {100} [style=dashed]; + 100 -> {101}; + 101 -> {102}; + 102 -> {119}; 102 -> {103} [style=dotted]; 103 -> {104} [style=dotted]; 104 -> {105} [style=dotted]; 105 -> {106} [style=dotted]; - 106 -> {107 112} [style=dotted]; + 106 -> {107} [style=dotted]; 107 -> {108} [style=dotted]; - 108 -> {109} [style=dotted]; + 108 -> {109 114} [style=dotted]; 109 -> {110} [style=dotted]; 110 -> {111} [style=dotted]; - 111 -> {113} [style=dotted]; - 112 -> {113}; - 113 -> {114}; + 111 -> {112} [style=dotted]; + 112 -> {113} [style=dotted]; + 113 -> {115} [style=dotted]; 114 -> {115}; 115 -> {116}; 116 -> {117}; + 117 -> {118}; + 118 -> {119}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartCastInInit.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartCastInInit.dot index 15bbdccb095..e31ab22826a 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartCastInInit.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartCastInInit.dot @@ -5,87 +5,94 @@ digraph smartCastInInit_kt { subgraph cluster_0 { color=red - 0 [label="Enter class I" style="filled" fillcolor=red]; - 1 [label="Exit class I" style="filled" fillcolor=red]; + 0 [label="Enter file smartCastInInit.kt" style="filled" fillcolor=red]; + 1 [label="Exit file smartCastInInit.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; subgraph cluster_1 { color=red - 2 [label="Enter class S" style="filled" fillcolor=red]; - 3 [label="Exit class S" style="filled" fillcolor=red]; + 2 [label="Enter class I" style="filled" fillcolor=red]; + 3 [label="Exit class I" style="filled" fillcolor=red]; } 2 -> {3} [color=green]; subgraph cluster_2 { color=red - 4 [label="Enter function foo" style="filled" fillcolor=red]; - 5 [label="Exit function foo" style="filled" fillcolor=red]; + 4 [label="Enter class S" style="filled" fillcolor=red]; + 5 [label="Exit class S" style="filled" fillcolor=red]; } - 4 -> {5}; + 4 -> {5} [color=green]; subgraph cluster_3 { color=red - 6 [label="Enter function s" style="filled" fillcolor=red]; - subgraph cluster_4 { - color=blue - 7 [label="Enter block"]; - 8 [label="Function call: R|kotlin/TODO|()" style="filled" fillcolor=yellow]; - 9 [label="Stub" style="filled" fillcolor=gray]; - 10 [label="Jump: ^s R|kotlin/TODO|()" style="filled" fillcolor=gray]; - 11 [label="Stub" style="filled" fillcolor=gray]; - 12 [label="Exit block" style="filled" fillcolor=gray]; - } - 13 [label="Exit function s" style="filled" fillcolor=gray]; + 6 [label="Enter function foo" style="filled" fillcolor=red]; + 7 [label="Exit function foo" style="filled" fillcolor=red]; } 6 -> {7}; - 7 -> {8}; - 8 -> {9} [style=dotted]; - 9 -> {10} [style=dotted]; - 10 -> {11 13} [style=dotted]; - 11 -> {12} [style=dotted]; - 12 -> {13} [style=dotted]; - subgraph cluster_5 { + subgraph cluster_4 { color=red - 14 [label="Enter class Main" style="filled" fillcolor=red]; - subgraph cluster_6 { + 8 [label="Enter function s" style="filled" fillcolor=red]; + subgraph cluster_5 { color=blue - 15 [label="Enter init block" style="filled" fillcolor=red]; - subgraph cluster_7 { - color=blue - 16 [label="Enter block"]; - 17 [label="Function call: R|/s|()" style="filled" fillcolor=yellow]; - 18 [label="Assignment: R|/Main.x|"]; - 19 [label="Access variable R|/Main.x|"]; - 20 [label="Smart cast: this@R|/Main|.R|/Main.x|"]; - 21 [label="Function call: this@R|/Main|.R|/Main.x|.R|/S.foo|()" style="filled" fillcolor=yellow]; - 22 [label="Exit block"]; - } - 23 [label="Exit init block" style="filled" fillcolor=red]; + 9 [label="Enter block"]; + 10 [label="Function call: R|kotlin/TODO|()" style="filled" fillcolor=yellow]; + 11 [label="Stub" style="filled" fillcolor=gray]; + 12 [label="Jump: ^s R|kotlin/TODO|()" style="filled" fillcolor=gray]; + 13 [label="Stub" style="filled" fillcolor=gray]; + 14 [label="Exit block" style="filled" fillcolor=gray]; } - subgraph cluster_8 { - color=blue - 24 [label="Enter function " style="filled" fillcolor=red]; - 25 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 26 [label="Exit function " style="filled" fillcolor=red]; - } - 27 [label="Exit class Main" style="filled" fillcolor=red]; + 15 [label="Exit function s" style="filled" fillcolor=gray]; } - 14 -> {15} [color=green]; - 14 -> {27} [style=dotted]; - 14 -> {15 24} [style=dashed]; - 15 -> {16}; - 16 -> {17}; + 8 -> {9}; + 9 -> {10}; + 10 -> {11} [style=dotted]; + 11 -> {12} [style=dotted]; + 12 -> {13 15} [style=dotted]; + 13 -> {14} [style=dotted]; + 14 -> {15} [style=dotted]; + + subgraph cluster_6 { + color=red + 16 [label="Enter class Main" style="filled" fillcolor=red]; + subgraph cluster_7 { + color=blue + 17 [label="Enter init block" style="filled" fillcolor=red]; + subgraph cluster_8 { + color=blue + 18 [label="Enter block"]; + 19 [label="Function call: R|/s|()" style="filled" fillcolor=yellow]; + 20 [label="Assignment: R|/Main.x|"]; + 21 [label="Access variable R|/Main.x|"]; + 22 [label="Smart cast: this@R|/Main|.R|/Main.x|"]; + 23 [label="Function call: this@R|/Main|.R|/Main.x|.R|/S.foo|()" style="filled" fillcolor=yellow]; + 24 [label="Exit block"]; + } + 25 [label="Exit init block" style="filled" fillcolor=red]; + } + subgraph cluster_9 { + color=blue + 26 [label="Enter function " style="filled" fillcolor=red]; + 27 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 28 [label="Exit function " style="filled" fillcolor=red]; + } + 29 [label="Exit class Main" style="filled" fillcolor=red]; + } + 16 -> {17} [color=green]; + 16 -> {29} [style=dotted]; + 16 -> {17 26} [style=dashed]; 17 -> {18}; 18 -> {19}; 19 -> {20}; 20 -> {21}; 21 -> {22}; 22 -> {23}; - 23 -> {24} [color=green]; + 23 -> {24}; 24 -> {25}; - 25 -> {26}; - 26 -> {27} [color=green]; + 25 -> {26} [color=green]; + 26 -> {27}; + 27 -> {28}; + 28 -> {29} [color=green]; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartcastInByClause.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartcastInByClause.dot index aac7dbd87f8..86ccdd5fb53 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartcastInByClause.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartcastInByClause.dot @@ -5,127 +5,134 @@ digraph smartcastInByClause_kt { subgraph cluster_0 { color=red - 0 [label="Enter class A" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter property" style="filled" fillcolor=red]; - 2 [label="Access variable R|/path|"]; - 3 [label="Exit property" style="filled" fillcolor=red]; - } + 0 [label="Enter file smartcastInByClause.kt" style="filled" fillcolor=red]; + 1 [label="Exit file smartcastInByClause.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter class A" style="filled" fillcolor=red]; subgraph cluster_2 { color=blue - 4 [label="Enter property" style="filled" fillcolor=red]; - 5 [label="Access variable R|/index|"]; - 6 [label="Exit property" style="filled" fillcolor=red]; + 3 [label="Enter property" style="filled" fillcolor=red]; + 4 [label="Access variable R|/path|"]; + 5 [label="Exit property" style="filled" fillcolor=red]; } subgraph cluster_3 { color=blue - 7 [label="Enter function " style="filled" fillcolor=red]; - 8 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 9 [label="Exit function " style="filled" fillcolor=red]; + 6 [label="Enter property" style="filled" fillcolor=red]; + 7 [label="Access variable R|/index|"]; + 8 [label="Exit property" style="filled" fillcolor=red]; } - 10 [label="Exit class A" style="filled" fillcolor=red]; + subgraph cluster_4 { + color=blue + 9 [label="Enter function " style="filled" fillcolor=red]; + 10 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 11 [label="Exit function " style="filled" fillcolor=red]; + } + 12 [label="Exit class A" style="filled" fillcolor=red]; } - 0 -> {1} [color=green]; - 0 -> {10} [style=dotted]; - 0 -> {1 4 7} [style=dashed]; - 1 -> {2}; - 2 -> {3}; - 3 -> {4} [color=green]; + 2 -> {3} [color=green]; + 2 -> {12} [style=dotted]; + 2 -> {3 6 9} [style=dashed]; + 3 -> {4}; 4 -> {5}; - 5 -> {6}; - 6 -> {7} [color=green]; + 5 -> {6} [color=green]; + 6 -> {7}; 7 -> {8}; - 8 -> {9}; - 9 -> {10} [color=green]; - - subgraph cluster_4 { - color=red - 11 [label="Enter class Base" style="filled" fillcolor=red]; - 12 [label="Exit class Base" style="filled" fillcolor=red]; - } + 8 -> {9} [color=green]; + 9 -> {10}; + 10 -> {11}; 11 -> {12} [color=green]; subgraph cluster_5 { color=red - 13 [label="Enter class Derived" style="filled" fillcolor=red]; - subgraph cluster_6 { - color=blue - 14 [label="Enter property" style="filled" fillcolor=red]; - 15 [label="Access variable R|/index|"]; - 16 [label="Exit property" style="filled" fillcolor=red]; - } - subgraph cluster_7 { - color=blue - 17 [label="Enter function " style="filled" fillcolor=red]; - 18 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 19 [label="Exit function " style="filled" fillcolor=red]; - } - 20 [label="Exit class Derived" style="filled" fillcolor=red]; + 13 [label="Enter class Base" style="filled" fillcolor=red]; + 14 [label="Exit class Base" style="filled" fillcolor=red]; } 13 -> {14} [color=green]; - 13 -> {20} [style=dotted]; - 13 -> {14 17} [style=dashed]; - 14 -> {15}; - 15 -> {16}; - 16 -> {17} [color=green]; - 17 -> {18}; - 18 -> {19}; - 19 -> {20} [color=green]; - subgraph cluster_8 { + subgraph cluster_6 { color=red - 21 [label="Enter function test" style="filled" fillcolor=red]; - subgraph cluster_9 { + 15 [label="Enter class Derived" style="filled" fillcolor=red]; + subgraph cluster_7 { color=blue - 22 [label="Enter block"]; - 23 [label="Access variable R|/a|"]; - 24 [label="Enter safe call"]; - 25 [label="Access variable R|/A.path|"]; - 26 [label="Exit safe call"]; - 27 [label="Exit lhs of ?:"]; - 28 [label="Enter rhs of ?:"]; - 29 [label="Const: Null(null)"]; - 30 [label="Jump: ^test Null(null)"]; - 31 [label="Stub" style="filled" fillcolor=gray]; - 32 [label="Lhs of ?: is not null"]; - 33 [label="Exit ?:"]; - 34 [label="Variable declaration: lval path: R|kotlin/String|"]; - 35 [label="Access variable R|/a|"]; - 36 [label="Smart cast: R|/a|"]; - 37 [label="Access variable R|/A.index|"]; - 38 [label="Function call: R|/takeInt|(...)" style="filled" fillcolor=yellow]; - 39 [label="Enter anonymous object"]; - subgraph cluster_10 { + 16 [label="Enter property" style="filled" fillcolor=red]; + 17 [label="Access variable R|/index|"]; + 18 [label="Exit property" style="filled" fillcolor=red]; + } + subgraph cluster_8 { + color=blue + 19 [label="Enter function " style="filled" fillcolor=red]; + 20 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 21 [label="Exit function " style="filled" fillcolor=red]; + } + 22 [label="Exit class Derived" style="filled" fillcolor=red]; + } + 15 -> {16} [color=green]; + 15 -> {22} [style=dotted]; + 15 -> {16 19} [style=dashed]; + 16 -> {17}; + 17 -> {18}; + 18 -> {19} [color=green]; + 19 -> {20}; + 20 -> {21}; + 21 -> {22} [color=green]; + + subgraph cluster_9 { + color=red + 23 [label="Enter function test" style="filled" fillcolor=red]; + subgraph cluster_10 { + color=blue + 24 [label="Enter block"]; + 25 [label="Access variable R|/a|"]; + 26 [label="Enter safe call"]; + 27 [label="Access variable R|/A.path|"]; + 28 [label="Exit safe call"]; + 29 [label="Exit lhs of ?:"]; + 30 [label="Enter rhs of ?:"]; + 31 [label="Const: Null(null)"]; + 32 [label="Jump: ^test Null(null)"]; + 33 [label="Stub" style="filled" fillcolor=gray]; + 34 [label="Lhs of ?: is not null"]; + 35 [label="Exit ?:"]; + 36 [label="Variable declaration: lval path: R|kotlin/String|"]; + 37 [label="Access variable R|/a|"]; + 38 [label="Smart cast: R|/a|"]; + 39 [label="Access variable R|/A.index|"]; + 40 [label="Function call: R|/takeInt|(...)" style="filled" fillcolor=yellow]; + 41 [label="Enter anonymous object"]; + subgraph cluster_11 { color=blue - 40 [label="Enter class " style="filled" fillcolor=red]; - subgraph cluster_11 { - color=blue - 41 [label="Enter field" style="filled" fillcolor=red]; - 42 [label="Access variable R|/a|"]; - 43 [label="Smart cast: R|/a|"]; - 44 [label="Access variable R|/A.index|"]; - 45 [label="Function call: R|/Derived.Derived|(...)" style="filled" fillcolor=yellow]; - 46 [label="Exit field" style="filled" fillcolor=red]; - } + 42 [label="Enter class " style="filled" fillcolor=red]; subgraph cluster_12 { color=blue - 47 [label="Enter property" style="filled" fillcolor=red]; - 48 [label="Access variable R|/a|"]; - 49 [label="Smart cast: R|/a|"]; - 50 [label="Access variable R|/A.index|"]; - 51 [label="Exit property" style="filled" fillcolor=red]; + 43 [label="Enter field" style="filled" fillcolor=red]; + 44 [label="Access variable R|/a|"]; + 45 [label="Smart cast: R|/a|"]; + 46 [label="Access variable R|/A.index|"]; + 47 [label="Function call: R|/Derived.Derived|(...)" style="filled" fillcolor=yellow]; + 48 [label="Exit field" style="filled" fillcolor=red]; } subgraph cluster_13 { color=blue - 52 [label="Enter function " style="filled" fillcolor=red]; - 53 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 54 [label="Exit function " style="filled" fillcolor=red]; + 49 [label="Enter property" style="filled" fillcolor=red]; + 50 [label="Access variable R|/a|"]; + 51 [label="Smart cast: R|/a|"]; + 52 [label="Access variable R|/A.index|"]; + 53 [label="Exit property" style="filled" fillcolor=red]; } - 55 [label="Exit class " style="filled" fillcolor=red]; + subgraph cluster_14 { + color=blue + 54 [label="Enter function " style="filled" fillcolor=red]; + 55 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 56 [label="Exit function " style="filled" fillcolor=red]; + } + 57 [label="Exit class " style="filled" fillcolor=red]; } - 56 [label="Exit anonymous object expression"]; - 57 [label="Jump: ^test object : R|Base| { + 58 [label="Exit anonymous object expression"]; + 59 [label="Jump: ^test object : R|Base| { private constructor(): R|| { super() } @@ -141,95 +148,95 @@ digraph smartcastInByClause_kt { } "]; - 58 [label="Stub" style="filled" fillcolor=gray]; - 59 [label="Exit block" style="filled" fillcolor=gray]; + 60 [label="Stub" style="filled" fillcolor=gray]; + 61 [label="Exit block" style="filled" fillcolor=gray]; } - 60 [label="Exit function test" style="filled" fillcolor=red]; + 62 [label="Exit function test" style="filled" fillcolor=red]; } - subgraph cluster_14 { + subgraph cluster_15 { color=blue - 61 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_15 { + 63 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_16 { color=blue - 62 [label="Enter block"]; - 63 [label="Access variable R|/a|"]; - 64 [label="Smart cast: R|/a|"]; - 65 [label="Access variable R|/A.index|"]; - 66 [label="Function call: R|/takeInt|(...)" style="filled" fillcolor=yellow]; - 67 [label="Exit block"]; + 64 [label="Enter block"]; + 65 [label="Access variable R|/a|"]; + 66 [label="Smart cast: R|/a|"]; + 67 [label="Access variable R|/A.index|"]; + 68 [label="Function call: R|/takeInt|(...)" style="filled" fillcolor=yellow]; + 69 [label="Exit block"]; } - 68 [label="Exit function foo" style="filled" fillcolor=red]; + 70 [label="Exit function foo" style="filled" fillcolor=red]; } - 21 -> {22}; - 22 -> {23}; - 23 -> {24 28}; + 23 -> {24}; 24 -> {25}; - 25 -> {26}; + 25 -> {26 30}; 26 -> {27}; - 27 -> {28 32}; + 27 -> {28}; 28 -> {29}; - 29 -> {30}; - 30 -> {60}; - 30 -> {31} [style=dotted]; - 31 -> {33} [style=dotted]; - 32 -> {33}; - 33 -> {34}; + 29 -> {30 34}; + 30 -> {31}; + 31 -> {32}; + 32 -> {62}; + 32 -> {33} [style=dotted]; + 33 -> {35} [style=dotted]; 34 -> {35}; 35 -> {36}; 36 -> {37}; 37 -> {38}; 38 -> {39}; 39 -> {40}; - 39 -> {56} [style=dotted]; - 39 -> {40} [style=dashed]; 40 -> {41}; - 40 -> {47 52 61} [color=red]; - 40 -> {55} [style=dotted]; - 40 -> {41 47 52} [style=dashed]; 41 -> {42}; + 41 -> {58} [style=dotted]; + 41 -> {42} [style=dashed]; 42 -> {43}; + 42 -> {49 54 63} [color=red]; + 42 -> {57} [style=dotted]; + 42 -> {43 49 54} [style=dashed]; 43 -> {44}; 44 -> {45}; 45 -> {46}; - 46 -> {47} [color=green]; - 46 -> {55} [color=red]; + 46 -> {47}; 47 -> {48}; - 48 -> {49}; + 48 -> {49} [color=green]; + 48 -> {57} [color=red]; 49 -> {50}; 50 -> {51}; - 51 -> {52} [color=green]; - 51 -> {55} [color=red]; + 51 -> {52}; 52 -> {53}; - 53 -> {54}; + 53 -> {54} [color=green]; + 53 -> {57} [color=red]; 54 -> {55}; 55 -> {56}; - 55 -> {61} [color=green]; - 55 -> {61} [style=dashed]; 56 -> {57}; - 57 -> {60}; - 57 -> {58} [style=dotted]; - 58 -> {59} [style=dotted]; + 57 -> {58}; + 57 -> {63} [color=green]; + 57 -> {63} [style=dashed]; + 58 -> {59}; + 59 -> {62}; 59 -> {60} [style=dotted]; - 61 -> {62}; - 62 -> {63}; + 60 -> {61} [style=dotted]; + 61 -> {62} [style=dotted]; 63 -> {64}; 64 -> {65}; 65 -> {66}; 66 -> {67}; 67 -> {68}; - - subgraph cluster_16 { - color=red - 69 [label="Enter function takeInt" style="filled" fillcolor=red]; - subgraph cluster_17 { - color=blue - 70 [label="Enter block"]; - 71 [label="Exit block"]; - } - 72 [label="Exit function takeInt" style="filled" fillcolor=red]; - } + 68 -> {69}; 69 -> {70}; - 70 -> {71}; + + subgraph cluster_17 { + color=red + 71 [label="Enter function takeInt" style="filled" fillcolor=red]; + subgraph cluster_18 { + color=blue + 72 [label="Enter block"]; + 73 [label="Exit block"]; + } + 74 [label="Exit function takeInt" style="filled" fillcolor=red]; + } 71 -> {72}; + 72 -> {73}; + 73 -> {74}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartcastToNothing.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartcastToNothing.dot index 6a337e7d8ae..6597e1d724e 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartcastToNothing.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/smartcastToNothing.dot @@ -5,248 +5,253 @@ digraph smartcastToNothing_kt { subgraph cluster_0 { color=red - 0 [label="Enter function getNothing" style="filled" fillcolor=red]; - subgraph cluster_1 { + 0 [label="Enter file smartcastToNothing.kt" style="filled" fillcolor=red]; + 1 [label="Exit file smartcastToNothing.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function getNothing" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 1 [label="Enter block"]; - 2 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; - 3 [label="Throw: throw R|java/lang/Exception.Exception|()"]; - 4 [label="Stub" style="filled" fillcolor=gray]; - 5 [label="Jump: ^getNothing throw R|java/lang/Exception.Exception|()" style="filled" fillcolor=gray]; + 3 [label="Enter block"]; + 4 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow]; + 5 [label="Throw: throw R|java/lang/Exception.Exception|()"]; 6 [label="Stub" style="filled" fillcolor=gray]; - 7 [label="Exit block" style="filled" fillcolor=gray]; + 7 [label="Jump: ^getNothing throw R|java/lang/Exception.Exception|()" style="filled" fillcolor=gray]; + 8 [label="Stub" style="filled" fillcolor=gray]; + 9 [label="Exit block" style="filled" fillcolor=gray]; } - 8 [label="Exit function getNothing" style="filled" fillcolor=gray]; + 10 [label="Exit function getNothing" style="filled" fillcolor=gray]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; - 3 -> {4} [style=dotted]; - 4 -> {5} [style=dotted]; - 5 -> {6 8} [style=dotted]; + 3 -> {4}; + 4 -> {5}; + 5 -> {6} [style=dotted]; 6 -> {7} [style=dotted]; - 7 -> {8} [style=dotted]; + 7 -> {8 10} [style=dotted]; + 8 -> {9} [style=dotted]; + 9 -> {10} [style=dotted]; - subgraph cluster_2 { + subgraph cluster_3 { color=red - 9 [label="Enter function getNullableNothing" style="filled" fillcolor=red]; - subgraph cluster_3 { + 11 [label="Enter function getNullableNothing" style="filled" fillcolor=red]; + subgraph cluster_4 { color=blue - 10 [label="Enter block"]; - 11 [label="Const: Null(null)"]; - 12 [label="Jump: ^getNullableNothing Null(null)"]; - 13 [label="Stub" style="filled" fillcolor=gray]; - 14 [label="Exit block" style="filled" fillcolor=gray]; + 12 [label="Enter block"]; + 13 [label="Const: Null(null)"]; + 14 [label="Jump: ^getNullableNothing Null(null)"]; + 15 [label="Stub" style="filled" fillcolor=gray]; + 16 [label="Exit block" style="filled" fillcolor=gray]; } - 15 [label="Exit function getNullableNothing" style="filled" fillcolor=red]; + 17 [label="Exit function getNullableNothing" style="filled" fillcolor=red]; } - 9 -> {10}; - 10 -> {11}; 11 -> {12}; - 12 -> {15}; - 12 -> {13} [style=dotted]; - 13 -> {14} [style=dotted]; + 12 -> {13}; + 13 -> {14}; + 14 -> {17}; 14 -> {15} [style=dotted]; + 15 -> {16} [style=dotted]; + 16 -> {17} [style=dotted]; - subgraph cluster_4 { + subgraph cluster_5 { color=red - 16 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_5 { + 18 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_6 { color=blue - 17 [label="Enter block"]; - 18 [label="Const: Int(1)"]; - 19 [label="Jump: ^ Int(1)"]; - 20 [label="Stub" style="filled" fillcolor=gray]; - 21 [label="Exit block" style="filled" fillcolor=gray]; + 19 [label="Enter block"]; + 20 [label="Const: Int(1)"]; + 21 [label="Jump: ^ Int(1)"]; + 22 [label="Stub" style="filled" fillcolor=gray]; + 23 [label="Exit block" style="filled" fillcolor=gray]; } - 22 [label="Exit function " style="filled" fillcolor=red]; + 24 [label="Exit function " style="filled" fillcolor=red]; } - 16 -> {17}; - 17 -> {18}; 18 -> {19}; - 19 -> {22}; - 19 -> {20} [style=dotted]; - 20 -> {21} [style=dotted]; + 19 -> {20}; + 20 -> {21}; + 21 -> {24}; 21 -> {22} [style=dotted]; + 22 -> {23} [style=dotted]; + 23 -> {24} [style=dotted]; - subgraph cluster_6 { + subgraph cluster_7 { color=red - 23 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_7 { + 25 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_8 { color=blue - 24 [label="Enter block"]; - 25 [label="Const: Int(2)"]; - 26 [label="Jump: ^ Int(2)"]; - 27 [label="Stub" style="filled" fillcolor=gray]; - 28 [label="Exit block" style="filled" fillcolor=gray]; + 26 [label="Enter block"]; + 27 [label="Const: Int(2)"]; + 28 [label="Jump: ^ Int(2)"]; + 29 [label="Stub" style="filled" fillcolor=gray]; + 30 [label="Exit block" style="filled" fillcolor=gray]; } - 29 [label="Exit function " style="filled" fillcolor=red]; + 31 [label="Exit function " style="filled" fillcolor=red]; } - 23 -> {24}; - 24 -> {25}; 25 -> {26}; - 26 -> {29}; - 26 -> {27} [style=dotted]; - 27 -> {28} [style=dotted]; + 26 -> {27}; + 27 -> {28}; + 28 -> {31}; 28 -> {29} [style=dotted]; + 29 -> {30} [style=dotted]; + 30 -> {31} [style=dotted]; - subgraph cluster_8 { + subgraph cluster_9 { color=red - 30 [label="Enter function myListOf" style="filled" fillcolor=red]; - subgraph cluster_9 { + 32 [label="Enter function myListOf" style="filled" fillcolor=red]; + subgraph cluster_10 { color=blue - 31 [label="Enter block"]; - 32 [label="Const: Null(null)"]; - 33 [label="Check not null: Null(null)!!" style="filled" fillcolor=yellow]; - 34 [label="Stub" style="filled" fillcolor=gray]; - 35 [label="Jump: ^myListOf Null(null)!!" style="filled" fillcolor=gray]; + 33 [label="Enter block"]; + 34 [label="Const: Null(null)"]; + 35 [label="Check not null: Null(null)!!" style="filled" fillcolor=yellow]; 36 [label="Stub" style="filled" fillcolor=gray]; - 37 [label="Exit block" style="filled" fillcolor=gray]; + 37 [label="Jump: ^myListOf Null(null)!!" style="filled" fillcolor=gray]; + 38 [label="Stub" style="filled" fillcolor=gray]; + 39 [label="Exit block" style="filled" fillcolor=gray]; } - 38 [label="Exit function myListOf" style="filled" fillcolor=gray]; + 40 [label="Exit function myListOf" style="filled" fillcolor=gray]; } - 30 -> {31}; - 31 -> {32}; 32 -> {33}; - 33 -> {34} [style=dotted]; - 34 -> {35} [style=dotted]; - 35 -> {36 38} [style=dotted]; + 33 -> {34}; + 34 -> {35}; + 35 -> {36} [style=dotted]; 36 -> {37} [style=dotted]; - 37 -> {38} [style=dotted]; + 37 -> {38 40} [style=dotted]; + 38 -> {39} [style=dotted]; + 39 -> {40} [style=dotted]; - subgraph cluster_10 { + subgraph cluster_11 { color=red - 39 [label="Enter class A" style="filled" fillcolor=red]; - subgraph cluster_11 { - color=blue - 40 [label="Enter property" style="filled" fillcolor=red]; - 41 [label="Const: Int(1)"]; - 42 [label="Exit property" style="filled" fillcolor=red]; - } + 41 [label="Enter class A" style="filled" fillcolor=red]; subgraph cluster_12 { color=blue - 43 [label="Enter property" style="filled" fillcolor=red]; - 44 [label="Const: Boolean(true)"]; - 45 [label="Exit property" style="filled" fillcolor=red]; + 42 [label="Enter property" style="filled" fillcolor=red]; + 43 [label="Const: Int(1)"]; + 44 [label="Exit property" style="filled" fillcolor=red]; } subgraph cluster_13 { color=blue - 46 [label="Enter function " style="filled" fillcolor=red]; - 47 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 48 [label="Exit function " style="filled" fillcolor=red]; + 45 [label="Enter property" style="filled" fillcolor=red]; + 46 [label="Const: Boolean(true)"]; + 47 [label="Exit property" style="filled" fillcolor=red]; } - 49 [label="Exit class A" style="filled" fillcolor=red]; - } - 39 -> {40} [color=green]; - 39 -> {49} [style=dotted]; - 39 -> {40 43 46} [style=dashed]; - 40 -> {41}; - 41 -> {42}; - 42 -> {43} [color=green]; - 43 -> {44}; - 44 -> {45}; - 45 -> {46} [color=green]; - 46 -> {47}; - 47 -> {48}; - 48 -> {49} [color=green]; - - subgraph cluster_14 { - color=red - 50 [label="Enter function test_0" style="filled" fillcolor=red]; - subgraph cluster_15 { + subgraph cluster_14 { color=blue - 51 [label="Enter block"]; - 52 [label="Const: Null(null)"]; - 53 [label="Variable declaration: lvar s: R|A?|"]; - subgraph cluster_16 { + 48 [label="Enter function " style="filled" fillcolor=red]; + 49 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 50 [label="Exit function " style="filled" fillcolor=red]; + } + 51 [label="Exit class A" style="filled" fillcolor=red]; + } + 41 -> {42} [color=green]; + 41 -> {51} [style=dotted]; + 41 -> {42 45 48} [style=dashed]; + 42 -> {43}; + 43 -> {44}; + 44 -> {45} [color=green]; + 45 -> {46}; + 46 -> {47}; + 47 -> {48} [color=green]; + 48 -> {49}; + 49 -> {50}; + 50 -> {51} [color=green]; + + subgraph cluster_15 { + color=red + 52 [label="Enter function test_0" style="filled" fillcolor=red]; + subgraph cluster_16 { + color=blue + 53 [label="Enter block"]; + 54 [label="Const: Null(null)"]; + 55 [label="Variable declaration: lvar s: R|A?|"]; + subgraph cluster_17 { color=blue - 54 [label="Enter block"]; - 55 [label="Access variable R|/results|"]; - 56 [label="Function call: R|/results|.R|SubstitutionOverride|>|()" style="filled" fillcolor=yellow]; - 57 [label="Variable declaration: lval : R|kotlin/collections/Iterator|"]; - subgraph cluster_17 { + 56 [label="Enter block"]; + 57 [label="Access variable R|/results|"]; + 58 [label="Function call: R|/results|.R|SubstitutionOverride|>|()" style="filled" fillcolor=yellow]; + 59 [label="Variable declaration: lval : R|kotlin/collections/Iterator|"]; + subgraph cluster_18 { color=blue - 58 [label="Enter while loop"]; - subgraph cluster_18 { - color=blue - 59 [label="Enter loop condition"]; - 60 [label="Access variable R|/|"]; - 61 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 62 [label="Exit loop condition"]; - } + 60 [label="Enter while loop"]; subgraph cluster_19 { color=blue - 63 [label="Enter loop block"]; - subgraph cluster_20 { + 61 [label="Enter loop condition"]; + 62 [label="Access variable R|/|"]; + 63 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 64 [label="Exit loop condition"]; + } + subgraph cluster_20 { + color=blue + 65 [label="Enter loop block"]; + subgraph cluster_21 { color=blue - 64 [label="Enter block"]; - 65 [label="Access variable R|/|"]; - 66 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 67 [label="Stub" style="filled" fillcolor=gray]; - 68 [label="Variable declaration: lval result: R|kotlin/Nothing|" style="filled" fillcolor=gray]; - subgraph cluster_21 { + 66 [label="Enter block"]; + 67 [label="Access variable R|/|"]; + 68 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 69 [label="Stub" style="filled" fillcolor=gray]; + 70 [label="Variable declaration: lval result: R|kotlin/Nothing|" style="filled" fillcolor=gray]; + subgraph cluster_22 { color=blue - 69 [label="Enter block" style="filled" fillcolor=gray]; - 70 [label="Access variable R|/result|" style="filled" fillcolor=gray]; - 71 [label="Stub" style="filled" fillcolor=gray]; - 72 [label="Assignment: R|/s|" style="filled" fillcolor=gray]; - subgraph cluster_22 { + 71 [label="Enter block" style="filled" fillcolor=gray]; + 72 [label="Access variable R|/result|" style="filled" fillcolor=gray]; + 73 [label="Stub" style="filled" fillcolor=gray]; + 74 [label="Assignment: R|/s|" style="filled" fillcolor=gray]; + subgraph cluster_23 { color=blue - 73 [label="Enter when" style="filled" fillcolor=gray]; - subgraph cluster_23 { - color=blue - 74 [label="Enter when branch condition " style="filled" fillcolor=gray]; - 75 [label="Access variable R|/result|" style="filled" fillcolor=gray]; - 76 [label="Stub" style="filled" fillcolor=gray]; - 77 [label="Access variable #" style="filled" fillcolor=gray]; - 78 [label="Exit when branch condition" style="filled" fillcolor=gray]; - } - 79 [label="Synthetic else branch" style="filled" fillcolor=gray]; - 80 [label="Enter when branch result" style="filled" fillcolor=gray]; + 75 [label="Enter when" style="filled" fillcolor=gray]; subgraph cluster_24 { color=blue - 81 [label="Enter block" style="filled" fillcolor=gray]; - 82 [label="Jump: break@@@[R|/|.R|SubstitutionOverride|()] " style="filled" fillcolor=gray]; - 83 [label="Stub" style="filled" fillcolor=gray]; - 84 [label="Exit block" style="filled" fillcolor=gray]; + 76 [label="Enter when branch condition " style="filled" fillcolor=gray]; + 77 [label="Access variable R|/result|" style="filled" fillcolor=gray]; + 78 [label="Stub" style="filled" fillcolor=gray]; + 79 [label="Access variable #" style="filled" fillcolor=gray]; + 80 [label="Exit when branch condition" style="filled" fillcolor=gray]; } - 85 [label="Exit when branch result" style="filled" fillcolor=gray]; - 86 [label="Exit when" style="filled" fillcolor=gray]; + 81 [label="Synthetic else branch" style="filled" fillcolor=gray]; + 82 [label="Enter when branch result" style="filled" fillcolor=gray]; + subgraph cluster_25 { + color=blue + 83 [label="Enter block" style="filled" fillcolor=gray]; + 84 [label="Jump: break@@@[R|/|.R|SubstitutionOverride|()] " style="filled" fillcolor=gray]; + 85 [label="Stub" style="filled" fillcolor=gray]; + 86 [label="Exit block" style="filled" fillcolor=gray]; + } + 87 [label="Exit when branch result" style="filled" fillcolor=gray]; + 88 [label="Exit when" style="filled" fillcolor=gray]; } - 87 [label="Exit block" style="filled" fillcolor=gray]; + 89 [label="Exit block" style="filled" fillcolor=gray]; } - 88 [label="Exit block" style="filled" fillcolor=gray]; + 90 [label="Exit block" style="filled" fillcolor=gray]; } - 89 [label="Exit loop block" style="filled" fillcolor=gray]; + 91 [label="Exit loop block" style="filled" fillcolor=gray]; } - 90 [label="Exit while loop"]; + 92 [label="Exit while loop"]; } - 91 [label="Exit block"]; + 93 [label="Exit block"]; } - 92 [label="Access variable R|/s|"]; - 93 [label="Enter safe call"]; - 94 [label="Postponed enter to lambda"]; - subgraph cluster_25 { + 94 [label="Access variable R|/s|"]; + 95 [label="Enter safe call"]; + 96 [label="Postponed enter to lambda"]; + subgraph cluster_26 { color=blue - 95 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_26 { + 97 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_27 { color=blue - 96 [label="Enter block"]; - 97 [label="Access variable R|/it|"]; - 98 [label="Access variable R|/A.a|"]; - 99 [label="Exit block"]; + 98 [label="Enter block"]; + 99 [label="Access variable R|/it|"]; + 100 [label="Access variable R|/A.a|"]; + 101 [label="Exit block"]; } - 100 [label="Exit function " style="filled" fillcolor=red]; + 102 [label="Exit function " style="filled" fillcolor=red]; } - 101 [label="Postponed exit from lambda"]; - 102 [label="Function call: $subj$.R|kotlin/let|(...)" style="filled" fillcolor=yellow]; - 103 [label="Exit safe call"]; - 104 [label="Exit block"]; + 103 [label="Postponed exit from lambda"]; + 104 [label="Function call: $subj$.R|kotlin/let|(...)" style="filled" fillcolor=yellow]; + 105 [label="Exit safe call"]; + 106 [label="Exit block"]; } - 105 [label="Exit function test_0" style="filled" fillcolor=red]; + 107 [label="Exit function test_0" style="filled" fillcolor=red]; } - 50 -> {51}; - 51 -> {52}; 52 -> {53}; 53 -> {54}; 54 -> {55}; @@ -257,12 +262,12 @@ digraph smartcastToNothing_kt { 59 -> {60}; 60 -> {61}; 61 -> {62}; - 62 -> {63 90}; + 62 -> {63}; 63 -> {64}; - 64 -> {65}; + 64 -> {65 92}; 65 -> {66}; - 66 -> {67} [style=dotted]; - 67 -> {68} [style=dotted]; + 66 -> {67}; + 67 -> {68}; 68 -> {69} [style=dotted]; 69 -> {70} [style=dotted]; 70 -> {71} [style=dotted]; @@ -273,27 +278,27 @@ digraph smartcastToNothing_kt { 75 -> {76} [style=dotted]; 76 -> {77} [style=dotted]; 77 -> {78} [style=dotted]; - 78 -> {79 80} [style=dotted]; - 79 -> {86} [style=dotted]; - 80 -> {81} [style=dotted]; - 81 -> {82} [style=dotted]; - 82 -> {83 90} [style=dotted]; + 78 -> {79} [style=dotted]; + 79 -> {80} [style=dotted]; + 80 -> {81 82} [style=dotted]; + 81 -> {88} [style=dotted]; + 82 -> {83} [style=dotted]; 83 -> {84} [style=dotted]; - 84 -> {85} [style=dotted]; + 84 -> {85 92} [style=dotted]; 85 -> {86} [style=dotted]; 86 -> {87} [style=dotted]; 87 -> {88} [style=dotted]; 88 -> {89} [style=dotted]; - 89 -> {59} [color=green style=dotted]; - 90 -> {91}; - 91 -> {92}; - 92 -> {93 103}; + 89 -> {90} [style=dotted]; + 90 -> {91} [style=dotted]; + 91 -> {61} [color=green style=dotted]; + 92 -> {93}; 93 -> {94}; - 94 -> {95 102}; - 94 -> {101} [style=dotted]; - 94 -> {95} [style=dashed]; + 94 -> {95 105}; 95 -> {96}; - 96 -> {97}; + 96 -> {97 104}; + 96 -> {103} [style=dotted]; + 96 -> {97} [style=dashed]; 97 -> {98}; 98 -> {99}; 99 -> {100}; @@ -302,82 +307,82 @@ digraph smartcastToNothing_kt { 102 -> {103}; 103 -> {104}; 104 -> {105}; + 105 -> {106}; + 106 -> {107}; - subgraph cluster_27 { + subgraph cluster_28 { color=red - 106 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_28 { + 108 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_29 { color=blue - 107 [label="Enter block"]; - subgraph cluster_29 { + 109 [label="Enter block"]; + subgraph cluster_30 { color=blue - 108 [label="Enter when"]; - subgraph cluster_30 { - color=blue - 109 [label="Enter when branch condition "]; - 110 [label="Access variable R|/a|"]; - 111 [label="Type operator: (R|/a| is R|kotlin/Nothing?|)"]; - 112 [label="Exit when branch condition"]; - } - 113 [label="Synthetic else branch"]; - 114 [label="Enter when branch result"]; + 110 [label="Enter when"]; subgraph cluster_31 { color=blue - 115 [label="Enter block"]; - 116 [label="Access variable R|/a|"]; - 117 [label="Smart cast: R|/a|"]; - 118 [label="Enter safe call"]; - 119 [label="Access variable R|kotlin/String.length|"]; - 120 [label="Exit safe call"]; - 121 [label="Variable declaration: lval b: R|kotlin/Int?|"]; - 122 [label="Exit block"]; + 111 [label="Enter when branch condition "]; + 112 [label="Access variable R|/a|"]; + 113 [label="Type operator: (R|/a| is R|kotlin/Nothing?|)"]; + 114 [label="Exit when branch condition"]; } - 123 [label="Exit when branch result"]; - 124 [label="Exit when"]; - } - subgraph cluster_32 { - color=blue - 125 [label="Enter when"]; - subgraph cluster_33 { + 115 [label="Synthetic else branch"]; + 116 [label="Enter when branch result"]; + subgraph cluster_32 { color=blue - 126 [label="Enter when branch condition "]; - 127 [label="Access variable R|/a|"]; - 128 [label="Type operator: (R|/a| is R|kotlin/Nothing|)"]; - 129 [label="Exit when branch condition"]; + 117 [label="Enter block"]; + 118 [label="Access variable R|/a|"]; + 119 [label="Smart cast: R|/a|"]; + 120 [label="Enter safe call"]; + 121 [label="Access variable R|kotlin/String.length|"]; + 122 [label="Exit safe call"]; + 123 [label="Variable declaration: lval b: R|kotlin/Int?|"]; + 124 [label="Exit block"]; } - 130 [label="Synthetic else branch"]; - 131 [label="Enter when branch result"]; + 125 [label="Exit when branch result"]; + 126 [label="Exit when"]; + } + subgraph cluster_33 { + color=blue + 127 [label="Enter when"]; subgraph cluster_34 { color=blue - 132 [label="Enter block"]; - 133 [label="Access variable R|/a|"]; - 134 [label="Smart cast: R|/a|"]; - 135 [label="Stub" style="filled" fillcolor=gray]; - 136 [label="Access variable R|kotlin/String.length|" style="filled" fillcolor=gray]; - 137 [label="Variable declaration: lval b: R|kotlin/Int|" style="filled" fillcolor=gray]; - 138 [label="Exit block" style="filled" fillcolor=gray]; + 128 [label="Enter when branch condition "]; + 129 [label="Access variable R|/a|"]; + 130 [label="Type operator: (R|/a| is R|kotlin/Nothing|)"]; + 131 [label="Exit when branch condition"]; } - 139 [label="Exit when branch result" style="filled" fillcolor=gray]; - 140 [label="Exit when"]; + 132 [label="Synthetic else branch"]; + 133 [label="Enter when branch result"]; + subgraph cluster_35 { + color=blue + 134 [label="Enter block"]; + 135 [label="Access variable R|/a|"]; + 136 [label="Smart cast: R|/a|"]; + 137 [label="Stub" style="filled" fillcolor=gray]; + 138 [label="Access variable R|kotlin/String.length|" style="filled" fillcolor=gray]; + 139 [label="Variable declaration: lval b: R|kotlin/Int|" style="filled" fillcolor=gray]; + 140 [label="Exit block" style="filled" fillcolor=gray]; + } + 141 [label="Exit when branch result" style="filled" fillcolor=gray]; + 142 [label="Exit when"]; } - 141 [label="Exit block"]; + 143 [label="Exit block"]; } - 142 [label="Exit function test_1" style="filled" fillcolor=red]; + 144 [label="Exit function test_1" style="filled" fillcolor=red]; } - 106 -> {107}; - 107 -> {108}; 108 -> {109}; 109 -> {110}; 110 -> {111}; 111 -> {112}; - 112 -> {113 114}; - 113 -> {124}; - 114 -> {115}; - 115 -> {116}; + 112 -> {113}; + 113 -> {114}; + 114 -> {115 116}; + 115 -> {126}; 116 -> {117}; - 117 -> {118 120}; + 117 -> {118}; 118 -> {119}; - 119 -> {120}; + 119 -> {120 122}; 120 -> {121}; 121 -> {122}; 122 -> {123}; @@ -387,18 +392,20 @@ digraph smartcastToNothing_kt { 126 -> {127}; 127 -> {128}; 128 -> {129}; - 129 -> {130 131}; - 130 -> {140}; - 131 -> {132}; - 132 -> {133}; + 129 -> {130}; + 130 -> {131}; + 131 -> {132 133}; + 132 -> {142}; 133 -> {134}; - 134 -> {135} [style=dotted]; - 135 -> {136} [style=dotted]; + 134 -> {135}; + 135 -> {136}; 136 -> {137} [style=dotted]; 137 -> {138} [style=dotted]; 138 -> {139} [style=dotted]; 139 -> {140} [style=dotted]; - 140 -> {141}; - 141 -> {142}; + 140 -> {141} [style=dotted]; + 141 -> {142} [style=dotted]; + 142 -> {143}; + 143 -> {144}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/stability/overridenOpenVal.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/stability/overridenOpenVal.dot index ef4e633ef37..096e62fe593 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/stability/overridenOpenVal.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/stability/overridenOpenVal.dot @@ -5,94 +5,99 @@ digraph overridenOpenVal_kt { subgraph cluster_0 { color=red - 0 [label="Enter class A" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter property" style="filled" fillcolor=red]; - 2 [label="Access variable R|/x|"]; - 3 [label="Exit property" style="filled" fillcolor=red]; - } - subgraph cluster_2 { - color=blue - 4 [label="Enter function " style="filled" fillcolor=red]; - 5 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 6 [label="Exit function " style="filled" fillcolor=red]; - } - 7 [label="Exit class A" style="filled" fillcolor=red]; + 0 [label="Enter file overridenOpenVal.kt" style="filled" fillcolor=red]; + 1 [label="Exit file overridenOpenVal.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; - 0 -> {7} [style=dotted]; - 0 -> {1 4} [style=dashed]; - 1 -> {2}; - 2 -> {3}; - 3 -> {4} [color=green]; - 4 -> {5}; - 5 -> {6}; - 6 -> {7} [color=green]; - subgraph cluster_3 { + subgraph cluster_1 { color=red - 8 [label="Enter class B" style="filled" fillcolor=red]; - subgraph cluster_4 { + 2 [label="Enter class A" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 9 [label="Enter function " style="filled" fillcolor=red]; - 10 [label="Access variable R|/x|"]; - 11 [label="Delegated constructor call: super(...)" style="filled" fillcolor=yellow]; - 12 [label="Exit function " style="filled" fillcolor=red]; + 3 [label="Enter property" style="filled" fillcolor=red]; + 4 [label="Access variable R|/x|"]; + 5 [label="Exit property" style="filled" fillcolor=red]; } - 13 [label="Exit class B" style="filled" fillcolor=red]; - } - 8 -> {9} [color=green]; - 8 -> {13} [style=dotted]; - 8 -> {9} [style=dashed]; - 9 -> {10}; - 10 -> {11}; - 11 -> {12}; - 12 -> {13} [color=green]; - - subgraph cluster_5 { - color=red - 14 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_6 { + subgraph cluster_3 { color=blue - 15 [label="Enter block"]; - subgraph cluster_7 { + 6 [label="Enter function " style="filled" fillcolor=red]; + 7 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 8 [label="Exit function " style="filled" fillcolor=red]; + } + 9 [label="Exit class A" style="filled" fillcolor=red]; + } + 2 -> {3} [color=green]; + 2 -> {9} [style=dotted]; + 2 -> {3 6} [style=dashed]; + 3 -> {4}; + 4 -> {5}; + 5 -> {6} [color=green]; + 6 -> {7}; + 7 -> {8}; + 8 -> {9} [color=green]; + + subgraph cluster_4 { + color=red + 10 [label="Enter class B" style="filled" fillcolor=red]; + subgraph cluster_5 { + color=blue + 11 [label="Enter function " style="filled" fillcolor=red]; + 12 [label="Access variable R|/x|"]; + 13 [label="Delegated constructor call: super(...)" style="filled" fillcolor=yellow]; + 14 [label="Exit function " style="filled" fillcolor=red]; + } + 15 [label="Exit class B" style="filled" fillcolor=red]; + } + 10 -> {11} [color=green]; + 10 -> {15} [style=dotted]; + 10 -> {11} [style=dashed]; + 11 -> {12}; + 12 -> {13}; + 13 -> {14}; + 14 -> {15} [color=green]; + + subgraph cluster_6 { + color=red + 16 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_7 { + color=blue + 17 [label="Enter block"]; + subgraph cluster_8 { color=blue - 16 [label="Enter when"]; - subgraph cluster_8 { - color=blue - 17 [label="Enter when branch condition "]; - 18 [label="Access variable R|/A.x|"]; - 19 [label="Type operator: (this@R|/B|.R|/A.x| is R|kotlin/String|)"]; - 20 [label="Exit when branch condition"]; - } - 21 [label="Synthetic else branch"]; - 22 [label="Enter when branch result"]; + 18 [label="Enter when"]; subgraph cluster_9 { color=blue - 23 [label="Enter block"]; - 24 [label="Access variable R|/A.x|"]; - 25 [label="Smart cast: this@R|/B|.R|/A.x|"]; - 26 [label="Access variable R|kotlin/String.length|"]; - 27 [label="Exit block"]; + 19 [label="Enter when branch condition "]; + 20 [label="Access variable R|/A.x|"]; + 21 [label="Type operator: (this@R|/B|.R|/A.x| is R|kotlin/String|)"]; + 22 [label="Exit when branch condition"]; } - 28 [label="Exit when branch result"]; - 29 [label="Exit when"]; + 23 [label="Synthetic else branch"]; + 24 [label="Enter when branch result"]; + subgraph cluster_10 { + color=blue + 25 [label="Enter block"]; + 26 [label="Access variable R|/A.x|"]; + 27 [label="Smart cast: this@R|/B|.R|/A.x|"]; + 28 [label="Access variable R|kotlin/String.length|"]; + 29 [label="Exit block"]; + } + 30 [label="Exit when branch result"]; + 31 [label="Exit when"]; } - 30 [label="Exit block"]; + 32 [label="Exit block"]; } - 31 [label="Exit function test_1" style="filled" fillcolor=red]; + 33 [label="Exit function test_1" style="filled" fillcolor=red]; } - 14 -> {15}; - 15 -> {16}; 16 -> {17}; 17 -> {18}; 18 -> {19}; 19 -> {20}; - 20 -> {21 22}; - 21 -> {29}; - 22 -> {23}; - 23 -> {24}; + 20 -> {21}; + 21 -> {22}; + 22 -> {23 24}; + 23 -> {31}; 24 -> {25}; 25 -> {26}; 26 -> {27}; @@ -100,53 +105,53 @@ digraph overridenOpenVal_kt { 28 -> {29}; 29 -> {30}; 30 -> {31}; + 31 -> {32}; + 32 -> {33}; - subgraph cluster_10 { + subgraph cluster_11 { color=red - 32 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_11 { + 34 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_12 { color=blue - 33 [label="Enter block"]; - subgraph cluster_12 { + 35 [label="Enter block"]; + subgraph cluster_13 { color=blue - 34 [label="Enter when"]; - subgraph cluster_13 { - color=blue - 35 [label="Enter when branch condition "]; - 36 [label="Access variable R|/b|"]; - 37 [label="Access variable R|/A.x|"]; - 38 [label="Type operator: (R|/b|.R|/A.x| is R|kotlin/String|)"]; - 39 [label="Exit when branch condition"]; - } - 40 [label="Synthetic else branch"]; - 41 [label="Enter when branch result"]; + 36 [label="Enter when"]; subgraph cluster_14 { color=blue - 42 [label="Enter block"]; - 43 [label="Access variable R|/b|"]; - 44 [label="Access variable R|/A.x|"]; - 45 [label="Smart cast: R|/b|.R|/A.x|"]; - 46 [label="Access variable R|kotlin/String.length|"]; - 47 [label="Exit block"]; + 37 [label="Enter when branch condition "]; + 38 [label="Access variable R|/b|"]; + 39 [label="Access variable R|/A.x|"]; + 40 [label="Type operator: (R|/b|.R|/A.x| is R|kotlin/String|)"]; + 41 [label="Exit when branch condition"]; } - 48 [label="Exit when branch result"]; - 49 [label="Exit when"]; + 42 [label="Synthetic else branch"]; + 43 [label="Enter when branch result"]; + subgraph cluster_15 { + color=blue + 44 [label="Enter block"]; + 45 [label="Access variable R|/b|"]; + 46 [label="Access variable R|/A.x|"]; + 47 [label="Smart cast: R|/b|.R|/A.x|"]; + 48 [label="Access variable R|kotlin/String.length|"]; + 49 [label="Exit block"]; + } + 50 [label="Exit when branch result"]; + 51 [label="Exit when"]; } - 50 [label="Exit block"]; + 52 [label="Exit block"]; } - 51 [label="Exit function test_2" style="filled" fillcolor=red]; + 53 [label="Exit function test_2" style="filled" fillcolor=red]; } - 32 -> {33}; - 33 -> {34}; 34 -> {35}; 35 -> {36}; 36 -> {37}; 37 -> {38}; 38 -> {39}; - 39 -> {40 41}; - 40 -> {49}; - 41 -> {42}; - 42 -> {43}; + 39 -> {40}; + 40 -> {41}; + 41 -> {42 43}; + 42 -> {51}; 43 -> {44}; 44 -> {45}; 45 -> {46}; @@ -155,5 +160,7 @@ digraph overridenOpenVal_kt { 48 -> {49}; 49 -> {50}; 50 -> {51}; + 51 -> {52}; + 52 -> {53}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/variables/delayedAssignment.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/variables/delayedAssignment.dot index 53254000e56..f17b8f610bd 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/variables/delayedAssignment.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/variables/delayedAssignment.dot @@ -5,103 +5,108 @@ digraph delayedAssignment_kt { subgraph cluster_0 { color=red - 0 [label="Enter class A" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter function " style="filled" fillcolor=red]; - 2 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 3 [label="Exit function " style="filled" fillcolor=red]; - } - 4 [label="Exit class A" style="filled" fillcolor=red]; + 0 [label="Enter file delayedAssignment.kt" style="filled" fillcolor=red]; + 1 [label="Exit file delayedAssignment.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; - 0 -> {4} [style=dotted]; - 0 -> {1} [style=dashed]; - 1 -> {2}; - 2 -> {3}; - 3 -> {4} [color=green]; - subgraph cluster_2 { + subgraph cluster_1 { color=red - 5 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_3 { + 2 [label="Enter class A" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 6 [label="Enter block"]; - 7 [label="Exit block"]; + 3 [label="Enter function " style="filled" fillcolor=red]; + 4 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 5 [label="Exit function " style="filled" fillcolor=red]; } - 8 [label="Exit function foo" style="filled" fillcolor=red]; + 6 [label="Exit class A" style="filled" fillcolor=red]; } - 5 -> {6}; - 6 -> {7}; - 7 -> {8}; + 2 -> {3} [color=green]; + 2 -> {6} [style=dotted]; + 2 -> {3} [style=dashed]; + 3 -> {4}; + 4 -> {5}; + 5 -> {6} [color=green]; - subgraph cluster_4 { + subgraph cluster_3 { color=red - 9 [label="Enter function test" style="filled" fillcolor=red]; - subgraph cluster_5 { + 7 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_4 { color=blue - 10 [label="Enter block"]; - 11 [label="Variable declaration: lval a: R|A?|"]; - subgraph cluster_6 { + 8 [label="Enter block"]; + 9 [label="Exit block"]; + } + 10 [label="Exit function foo" style="filled" fillcolor=red]; + } + 7 -> {8}; + 8 -> {9}; + 9 -> {10}; + + subgraph cluster_5 { + color=red + 11 [label="Enter function test" style="filled" fillcolor=red]; + subgraph cluster_6 { + color=blue + 12 [label="Enter block"]; + 13 [label="Variable declaration: lval a: R|A?|"]; + subgraph cluster_7 { color=blue - 12 [label="Enter when"]; - subgraph cluster_7 { - color=blue - 13 [label="Enter when branch condition "]; - 14 [label="Access variable R|/b|"]; - 15 [label="Exit when branch condition"]; - } + 14 [label="Enter when"]; subgraph cluster_8 { color=blue - 16 [label="Enter when branch condition else"]; + 15 [label="Enter when branch condition "]; + 16 [label="Access variable R|/b|"]; 17 [label="Exit when branch condition"]; } - 18 [label="Enter when branch result"]; subgraph cluster_9 { color=blue - 19 [label="Enter block"]; - 20 [label="Const: Null(null)"]; - 21 [label="Assignment: R|/a|"]; - 22 [label="Exit block"]; + 18 [label="Enter when branch condition else"]; + 19 [label="Exit when branch condition"]; } - 23 [label="Exit when branch result"]; - 24 [label="Enter when branch result"]; + 20 [label="Enter when branch result"]; subgraph cluster_10 { color=blue - 25 [label="Enter block"]; - 26 [label="Function call: R|/A.A|()" style="filled" fillcolor=yellow]; - 27 [label="Assignment: R|/a|"]; - 28 [label="Access variable R|/a|"]; - 29 [label="Smart cast: R|/a|"]; - 30 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; - 31 [label="Exit block"]; + 21 [label="Enter block"]; + 22 [label="Const: Null(null)"]; + 23 [label="Assignment: R|/a|"]; + 24 [label="Exit block"]; } - 32 [label="Exit when branch result"]; - 33 [label="Exit when"]; + 25 [label="Exit when branch result"]; + 26 [label="Enter when branch result"]; + subgraph cluster_11 { + color=blue + 27 [label="Enter block"]; + 28 [label="Function call: R|/A.A|()" style="filled" fillcolor=yellow]; + 29 [label="Assignment: R|/a|"]; + 30 [label="Access variable R|/a|"]; + 31 [label="Smart cast: R|/a|"]; + 32 [label="Function call: R|/a|.R|/A.foo|()" style="filled" fillcolor=yellow]; + 33 [label="Exit block"]; + } + 34 [label="Exit when branch result"]; + 35 [label="Exit when"]; } - 34 [label="Access variable R|/a|"]; - 35 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; - 36 [label="Exit block"]; + 36 [label="Access variable R|/a|"]; + 37 [label="Function call: R|/a|.R|/A.foo#|()" style="filled" fillcolor=yellow]; + 38 [label="Exit block"]; } - 37 [label="Exit function test" style="filled" fillcolor=red]; + 39 [label="Exit function test" style="filled" fillcolor=red]; } - 9 -> {10}; - 10 -> {11}; 11 -> {12}; 12 -> {13}; 13 -> {14}; 14 -> {15}; - 15 -> {16 24}; + 15 -> {16}; 16 -> {17}; - 17 -> {18}; + 17 -> {18 26}; 18 -> {19}; 19 -> {20}; 20 -> {21}; 21 -> {22}; 22 -> {23}; - 23 -> {33}; + 23 -> {24}; 24 -> {25}; - 25 -> {26}; + 25 -> {35}; 26 -> {27}; 27 -> {28}; 28 -> {29}; @@ -113,5 +118,7 @@ digraph delayedAssignment_kt { 34 -> {35}; 35 -> {36}; 36 -> {37}; + 37 -> {38}; + 38 -> {39}; } diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/variables/smartcastAfterReassignment.dot b/compiler/fir/analysis-tests/testData/resolve/smartcasts/variables/smartcastAfterReassignment.dot index 8ebd75dc580..838c7a86d48 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/variables/smartcastAfterReassignment.dot +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/variables/smartcastAfterReassignment.dot @@ -5,23 +5,28 @@ digraph smartcastAfterReassignment_kt { subgraph cluster_0 { color=red - 0 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter block"]; - 2 [label="Const: Int(1)"]; - 3 [label="Variable declaration: lvar x: R|kotlin/Any|"]; - 4 [label="Const: String()"]; - 5 [label="Assignment: R|/x|"]; - 6 [label="Access variable R|/x|"]; - 7 [label="Smart cast: R|/x|"]; - 8 [label="Access variable R|kotlin/String.length|"]; - 9 [label="Exit block"]; - } - 10 [label="Exit function test_1" style="filled" fillcolor=red]; + 0 [label="Enter file smartcastAfterReassignment.kt" style="filled" fillcolor=red]; + 1 [label="Exit file smartcastAfterReassignment.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_2 { + color=blue + 3 [label="Enter block"]; + 4 [label="Const: Int(1)"]; + 5 [label="Variable declaration: lvar x: R|kotlin/Any|"]; + 6 [label="Const: String()"]; + 7 [label="Assignment: R|/x|"]; + 8 [label="Access variable R|/x|"]; + 9 [label="Smart cast: R|/x|"]; + 10 [label="Access variable R|kotlin/String.length|"]; + 11 [label="Exit block"]; + } + 12 [label="Exit function test_1" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; 3 -> {4}; 4 -> {5}; @@ -30,47 +35,47 @@ digraph smartcastAfterReassignment_kt { 7 -> {8}; 8 -> {9}; 9 -> {10}; + 10 -> {11}; + 11 -> {12}; - subgraph cluster_2 { + subgraph cluster_3 { color=red - 11 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_3 { + 13 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_4 { color=blue - 12 [label="Enter block"]; - 13 [label="Const: Null(null)"]; - 14 [label="Variable declaration: lvar x: R|kotlin/String?|"]; - subgraph cluster_4 { + 14 [label="Enter block"]; + 15 [label="Const: Null(null)"]; + 16 [label="Variable declaration: lvar x: R|kotlin/String?|"]; + subgraph cluster_5 { color=blue - 15 [label="Enter when"]; - subgraph cluster_5 { - color=blue - 16 [label="Enter when branch condition "]; - 17 [label="Access variable R|/x|"]; - 18 [label="Const: Null(null)"]; - 19 [label="Equality operator =="]; - 20 [label="Exit when branch condition"]; - } - 21 [label="Synthetic else branch"]; - 22 [label="Enter when branch result"]; + 17 [label="Enter when"]; subgraph cluster_6 { color=blue - 23 [label="Enter block"]; - 24 [label="Const: String()"]; - 25 [label="Assignment: R|/x|"]; - 26 [label="Exit block"]; + 18 [label="Enter when branch condition "]; + 19 [label="Access variable R|/x|"]; + 20 [label="Const: Null(null)"]; + 21 [label="Equality operator =="]; + 22 [label="Exit when branch condition"]; } - 27 [label="Exit when branch result"]; - 28 [label="Exit when"]; + 23 [label="Synthetic else branch"]; + 24 [label="Enter when branch result"]; + subgraph cluster_7 { + color=blue + 25 [label="Enter block"]; + 26 [label="Const: String()"]; + 27 [label="Assignment: R|/x|"]; + 28 [label="Exit block"]; + } + 29 [label="Exit when branch result"]; + 30 [label="Exit when"]; } - 29 [label="Access variable R|/x|"]; - 30 [label="Smart cast: R|/x|"]; - 31 [label="Access variable R|kotlin/String.length|"]; - 32 [label="Exit block"]; + 31 [label="Access variable R|/x|"]; + 32 [label="Smart cast: R|/x|"]; + 33 [label="Access variable R|kotlin/String.length|"]; + 34 [label="Exit block"]; } - 33 [label="Exit function test_2" style="filled" fillcolor=red]; + 35 [label="Exit function test_2" style="filled" fillcolor=red]; } - 11 -> {12}; - 12 -> {13}; 13 -> {14}; 14 -> {15}; 15 -> {16}; @@ -78,10 +83,10 @@ digraph smartcastAfterReassignment_kt { 17 -> {18}; 18 -> {19}; 19 -> {20}; - 20 -> {21 22}; - 21 -> {28}; - 22 -> {23}; - 23 -> {24}; + 20 -> {21}; + 21 -> {22}; + 22 -> {23 24}; + 23 -> {30}; 24 -> {25}; 25 -> {26}; 26 -> {27}; @@ -91,31 +96,31 @@ digraph smartcastAfterReassignment_kt { 30 -> {31}; 31 -> {32}; 32 -> {33}; - - subgraph cluster_7 { - color=red - 34 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_8 { - color=blue - 35 [label="Enter block"]; - 36 [label="Const: Null(null)"]; - 37 [label="Variable declaration: lvar x: R|kotlin/String?|"]; - 38 [label="Const: String()"]; - 39 [label="Assignment: R|/x|"]; - 40 [label="Access variable R|/x|"]; - 41 [label="Smart cast: R|/x|"]; - 42 [label="Access variable R|kotlin/String.length|"]; - 43 [label="Const: Null(null)"]; - 44 [label="Assignment: R|/x|"]; - 45 [label="Access variable R|/x|"]; - 46 [label="Smart cast: R|/x|"]; - 47 [label="Access variable R|kotlin/String.length#|"]; - 48 [label="Exit block"]; - } - 49 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 33 -> {34}; 34 -> {35}; - 35 -> {36}; + + subgraph cluster_8 { + color=red + 36 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_9 { + color=blue + 37 [label="Enter block"]; + 38 [label="Const: Null(null)"]; + 39 [label="Variable declaration: lvar x: R|kotlin/String?|"]; + 40 [label="Const: String()"]; + 41 [label="Assignment: R|/x|"]; + 42 [label="Access variable R|/x|"]; + 43 [label="Smart cast: R|/x|"]; + 44 [label="Access variable R|kotlin/String.length|"]; + 45 [label="Const: Null(null)"]; + 46 [label="Assignment: R|/x|"]; + 47 [label="Access variable R|/x|"]; + 48 [label="Smart cast: R|/x|"]; + 49 [label="Access variable R|kotlin/String.length#|"]; + 50 [label="Exit block"]; + } + 51 [label="Exit function test_3" style="filled" fillcolor=red]; + } 36 -> {37}; 37 -> {38}; 38 -> {39}; @@ -129,5 +134,7 @@ digraph smartcastAfterReassignment_kt { 46 -> {47}; 47 -> {48}; 48 -> {49}; + 49 -> {50}; + 50 -> {51}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/complexPostponedCfg.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/complexPostponedCfg.dot index 26fd9b3762e..7f14d09462e 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/complexPostponedCfg.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/complexPostponedCfg.dot @@ -5,109 +5,114 @@ digraph complexPostponedCfg_kt { subgraph cluster_0 { color=red - 0 [label="Enter class FirBase" style="filled" fillcolor=red]; - 1 [label="Exit class FirBase" style="filled" fillcolor=red]; + 0 [label="Enter file complexPostponedCfg.kt" style="filled" fillcolor=red]; + 1 [label="Exit file complexPostponedCfg.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; subgraph cluster_1 { color=red - 2 [label="Enter class FirFunctionCall" style="filled" fillcolor=red]; - 3 [label="Exit class FirFunctionCall" style="filled" fillcolor=red]; + 2 [label="Enter class FirBase" style="filled" fillcolor=red]; + 3 [label="Exit class FirBase" style="filled" fillcolor=red]; } 2 -> {3} [color=green]; subgraph cluster_2 { color=red - 4 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_3 { - color=blue - 5 [label="Enter block"]; - 6 [label="Access variable R|/statements|"]; - 7 [label="Function call: R|/statements|.R|kotlin/collections/last|()" style="filled" fillcolor=yellow]; - 8 [label="Type operator: (R|/statements|.R|kotlin/collections/last|() as R|FirFunctionCall|)"]; - 9 [label="Postponed enter to lambda"]; - subgraph cluster_4 { - color=blue - 10 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_5 { - color=blue - 11 [label="Enter block"]; - 12 [label="Postponed enter to lambda"]; - subgraph cluster_6 { - color=blue - 13 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_7 { - color=blue - 14 [label="Enter block"]; - 15 [label="Access variable this@R|special/anonymous|"]; - 16 [label="Function call: this@R|special/anonymous|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; - 17 [label="Access variable R|/arguments|"]; - 18 [label="Function call: R|/arguments|.R|kotlin/collections/last|()" style="filled" fillcolor=yellow]; - 19 [label="Type operator: (R|/arguments|.R|kotlin/collections/last|() as R|FirFunctionCall|)"]; - 20 [label="Postponed enter to lambda"]; - subgraph cluster_8 { - color=blue - 21 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_9 { - color=blue - 22 [label="Enter block"]; - 23 [label="Access variable this@R|special/anonymous|"]; - 24 [label="Function call: this@R|special/anonymous|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; - 25 [label="Access variable R|/explicitReceiver|"]; - 26 [label="Type operator: (R|/explicitReceiver| as R|FirFunctionCall|)"]; - 27 [label="Function call: this@R|special/anonymous|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; - 28 [label="Exit block"]; - } - 29 [label="Exit function " style="filled" fillcolor=red]; - } - 30 [label="Postponed exit from lambda"]; - 31 [label="Function call: R|kotlin/with|(...)" style="filled" fillcolor=yellow]; - 32 [label="Exit block"]; - } - 33 [label="Exit function " style="filled" fillcolor=red]; - } - 34 [label="Postponed exit from lambda"]; - 35 [label="Function call: R|kotlin/collections/buildList|(...)" style="filled" fillcolor=yellow]; - 36 [label="Exit block"]; - } - 37 [label="Exit function " style="filled" fillcolor=red]; - } - 38 [label="Postponed exit from lambda"]; - 39 [label="Function call: R|kotlin/with||>(...)" style="filled" fillcolor=yellow]; - 40 [label="Variable declaration: lval firstCalls: R|kotlin/collections/List|"]; - 41 [label="Access variable R|/firstCalls|"]; - 42 [label="Jump: ^foo R|/firstCalls|"]; - 43 [label="Stub" style="filled" fillcolor=gray]; - 44 [label="Exit block" style="filled" fillcolor=gray]; - } - 45 [label="Exit function foo" style="filled" fillcolor=red]; + 4 [label="Enter class FirFunctionCall" style="filled" fillcolor=red]; + 5 [label="Exit class FirFunctionCall" style="filled" fillcolor=red]; + } + 4 -> {5} [color=green]; + + subgraph cluster_3 { + color=red + 6 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_4 { + color=blue + 7 [label="Enter block"]; + 8 [label="Access variable R|/statements|"]; + 9 [label="Function call: R|/statements|.R|kotlin/collections/last|()" style="filled" fillcolor=yellow]; + 10 [label="Type operator: (R|/statements|.R|kotlin/collections/last|() as R|FirFunctionCall|)"]; + 11 [label="Postponed enter to lambda"]; + subgraph cluster_5 { + color=blue + 12 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_6 { + color=blue + 13 [label="Enter block"]; + 14 [label="Postponed enter to lambda"]; + subgraph cluster_7 { + color=blue + 15 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_8 { + color=blue + 16 [label="Enter block"]; + 17 [label="Access variable this@R|special/anonymous|"]; + 18 [label="Function call: this@R|special/anonymous|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; + 19 [label="Access variable R|/arguments|"]; + 20 [label="Function call: R|/arguments|.R|kotlin/collections/last|()" style="filled" fillcolor=yellow]; + 21 [label="Type operator: (R|/arguments|.R|kotlin/collections/last|() as R|FirFunctionCall|)"]; + 22 [label="Postponed enter to lambda"]; + subgraph cluster_9 { + color=blue + 23 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_10 { + color=blue + 24 [label="Enter block"]; + 25 [label="Access variable this@R|special/anonymous|"]; + 26 [label="Function call: this@R|special/anonymous|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; + 27 [label="Access variable R|/explicitReceiver|"]; + 28 [label="Type operator: (R|/explicitReceiver| as R|FirFunctionCall|)"]; + 29 [label="Function call: this@R|special/anonymous|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; + 30 [label="Exit block"]; + } + 31 [label="Exit function " style="filled" fillcolor=red]; + } + 32 [label="Postponed exit from lambda"]; + 33 [label="Function call: R|kotlin/with|(...)" style="filled" fillcolor=yellow]; + 34 [label="Exit block"]; + } + 35 [label="Exit function " style="filled" fillcolor=red]; + } + 36 [label="Postponed exit from lambda"]; + 37 [label="Function call: R|kotlin/collections/buildList|(...)" style="filled" fillcolor=yellow]; + 38 [label="Exit block"]; + } + 39 [label="Exit function " style="filled" fillcolor=red]; + } + 40 [label="Postponed exit from lambda"]; + 41 [label="Function call: R|kotlin/with||>(...)" style="filled" fillcolor=yellow]; + 42 [label="Variable declaration: lval firstCalls: R|kotlin/collections/List|"]; + 43 [label="Access variable R|/firstCalls|"]; + 44 [label="Jump: ^foo R|/firstCalls|"]; + 45 [label="Stub" style="filled" fillcolor=gray]; + 46 [label="Exit block" style="filled" fillcolor=gray]; + } + 47 [label="Exit function foo" style="filled" fillcolor=red]; } - 4 -> {5}; - 5 -> {6}; 6 -> {7}; 7 -> {8}; 8 -> {9}; - 9 -> {10 39}; - 9 -> {38} [style=dotted]; - 9 -> {10} [style=dashed]; + 9 -> {10}; 10 -> {11}; - 11 -> {12}; - 12 -> {13 35}; - 12 -> {34} [style=dotted]; - 12 -> {13} [style=dashed]; + 11 -> {12 41}; + 11 -> {40} [style=dotted]; + 11 -> {12} [style=dashed]; + 12 -> {13}; 13 -> {14}; - 14 -> {15}; + 14 -> {15 37}; + 14 -> {36} [style=dotted]; + 14 -> {15} [style=dashed]; 15 -> {16}; 16 -> {17}; 17 -> {18}; 18 -> {19}; 19 -> {20}; - 20 -> {21 31}; - 20 -> {30} [style=dotted]; - 20 -> {21} [style=dashed]; + 20 -> {21}; 21 -> {22}; - 22 -> {23}; + 22 -> {23 33}; + 22 -> {32} [style=dotted]; + 22 -> {23} [style=dashed]; 23 -> {24}; 24 -> {25}; 25 -> {26}; @@ -119,18 +124,20 @@ digraph complexPostponedCfg_kt { 31 -> {32}; 32 -> {33}; 33 -> {34}; - 34 -> {35} [color=green]; - 34 -> {39} [color=red]; + 34 -> {35}; 35 -> {36}; - 36 -> {37}; + 36 -> {37} [color=green]; + 36 -> {41} [color=red]; 37 -> {38}; 38 -> {39}; 39 -> {40}; 40 -> {41}; 41 -> {42}; - 42 -> {45}; - 42 -> {43} [style=dotted]; - 43 -> {44} [style=dotted]; + 42 -> {43}; + 43 -> {44}; + 44 -> {47}; 44 -> {45} [style=dotted]; + 45 -> {46} [style=dotted]; + 46 -> {47} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromLibrary/callsInPlace.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromLibrary/callsInPlace.dot index 3ae223c6c5d..5fc294f4dec 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromLibrary/callsInPlace.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromLibrary/callsInPlace.dot @@ -5,40 +5,45 @@ digraph callsInPlace_kt { subgraph cluster_0 { color=red - 0 [label="Enter function test" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter block"]; - 2 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 3 [label="Postponed enter to lambda"]; - subgraph cluster_2 { - color=blue - 4 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_3 { - color=blue - 5 [label="Enter block"]; - 6 [label="Const: Int(1)"]; - 7 [label="Assignment: R|/x|"]; - 8 [label="Exit block"]; - } - 9 [label="Exit function " style="filled" fillcolor=red]; - } - 10 [label="Postponed exit from lambda"]; - 11 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; - 12 [label="Access variable R|/x|"]; - 13 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 14 [label="Exit block"]; - } - 15 [label="Exit function test" style="filled" fillcolor=red]; + 0 [label="Enter file callsInPlace.kt" style="filled" fillcolor=red]; + 1 [label="Exit file callsInPlace.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function test" style="filled" fillcolor=red]; + subgraph cluster_2 { + color=blue + 3 [label="Enter block"]; + 4 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 5 [label="Postponed enter to lambda"]; + subgraph cluster_3 { + color=blue + 6 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_4 { + color=blue + 7 [label="Enter block"]; + 8 [label="Const: Int(1)"]; + 9 [label="Assignment: R|/x|"]; + 10 [label="Exit block"]; + } + 11 [label="Exit function " style="filled" fillcolor=red]; + } + 12 [label="Postponed exit from lambda"]; + 13 [label="Function call: R|kotlin/run|(...)" style="filled" fillcolor=yellow]; + 14 [label="Access variable R|/x|"]; + 15 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 16 [label="Exit block"]; + } + 17 [label="Exit function test" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; - 3 -> {4 11}; - 3 -> {10} [style=dotted]; - 3 -> {4} [style=dashed]; + 3 -> {4}; 4 -> {5}; - 5 -> {6}; + 5 -> {6 13}; + 5 -> {12} [style=dotted]; + 5 -> {6} [style=dashed]; 6 -> {7}; 7 -> {8}; 8 -> {9}; @@ -48,124 +53,124 @@ digraph callsInPlace_kt { 12 -> {13}; 13 -> {14}; 14 -> {15}; - - subgraph cluster_4 { - color=red - 16 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_5 { - color=blue - 17 [label="Enter block"]; - 18 [label="Const: Int(10)"]; - 19 [label="Postponed enter to lambda"]; - subgraph cluster_6 { - color=blue - 20 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_7 { - color=blue - 21 [label="Enter block"]; - 22 [label="Const: String(test_2)"]; - 23 [label="Exit block"]; - } - 24 [label="Exit function " style="filled" fillcolor=red]; - } - 25 [label="Postponed exit from lambda"]; - 26 [label="Function call: R|kotlin/repeat|(...)" style="filled" fillcolor=yellow]; - 27 [label="Exit block"]; - } - 28 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 15 -> {16}; 16 -> {17}; - 17 -> {18}; + + subgraph cluster_5 { + color=red + 18 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_6 { + color=blue + 19 [label="Enter block"]; + 20 [label="Const: Int(10)"]; + 21 [label="Postponed enter to lambda"]; + subgraph cluster_7 { + color=blue + 22 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_8 { + color=blue + 23 [label="Enter block"]; + 24 [label="Const: String(test_2)"]; + 25 [label="Exit block"]; + } + 26 [label="Exit function " style="filled" fillcolor=red]; + } + 27 [label="Postponed exit from lambda"]; + 28 [label="Function call: R|kotlin/repeat|(...)" style="filled" fillcolor=yellow]; + 29 [label="Exit block"]; + } + 30 [label="Exit function test_2" style="filled" fillcolor=red]; + } 18 -> {19}; - 19 -> {20 25 26}; - 19 -> {20} [style=dashed]; + 19 -> {20}; 20 -> {21}; - 21 -> {22}; + 21 -> {22 27 28}; + 21 -> {22} [style=dashed]; 22 -> {23}; 23 -> {24}; 24 -> {25}; 25 -> {26}; - 25 -> {19} [color=green style=dashed]; 26 -> {27}; 27 -> {28}; - - subgraph cluster_8 { - color=red - 29 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_9 { - color=blue - 30 [label="Enter block"]; - 31 [label="Const: Int(10)"]; - 32 [label="Postponed enter to lambda"]; - subgraph cluster_10 { - color=blue - 33 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_11 { - color=blue - 34 [label="Enter block"]; - 35 [label="Const: String(test_3)"]; - 36 [label="Exit block"]; - } - 37 [label="Exit function " style="filled" fillcolor=red]; - } - 38 [label="Postponed exit from lambda"]; - 39 [label="Function call: R|kotlin/repeat|(...)" style="filled" fillcolor=yellow]; - 40 [label="Exit block"]; - } - 41 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 27 -> {21} [color=green style=dashed]; + 28 -> {29}; 29 -> {30}; - 30 -> {31}; + + subgraph cluster_9 { + color=red + 31 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_10 { + color=blue + 32 [label="Enter block"]; + 33 [label="Const: Int(10)"]; + 34 [label="Postponed enter to lambda"]; + subgraph cluster_11 { + color=blue + 35 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_12 { + color=blue + 36 [label="Enter block"]; + 37 [label="Const: String(test_3)"]; + 38 [label="Exit block"]; + } + 39 [label="Exit function " style="filled" fillcolor=red]; + } + 40 [label="Postponed exit from lambda"]; + 41 [label="Function call: R|kotlin/repeat|(...)" style="filled" fillcolor=yellow]; + 42 [label="Exit block"]; + } + 43 [label="Exit function test_3" style="filled" fillcolor=red]; + } 31 -> {32}; - 32 -> {33 38 39}; - 32 -> {33} [style=dashed]; + 32 -> {33}; 33 -> {34}; - 34 -> {35}; + 34 -> {35 40 41}; + 34 -> {35} [style=dashed]; 35 -> {36}; 36 -> {37}; 37 -> {38}; 38 -> {39}; - 38 -> {32} [color=green style=dashed]; 39 -> {40}; 40 -> {41}; - - subgraph cluster_12 { - color=red - 42 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_13 { - color=blue - 43 [label="Enter block"]; - 44 [label="Const: Int(1)"]; - 45 [label="Postponed enter to lambda"]; - subgraph cluster_14 { - color=blue - 46 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_15 { - color=blue - 47 [label="Enter block"]; - 48 [label="Const: String(test_4)"]; - 49 [label="Access variable R|/it|"]; - 50 [label="Const: Int(0)"]; - 51 [label="Function call: R|/it|.R|kotlin/Int.compareTo|(...)" style="filled" fillcolor=yellow]; - 52 [label="Comparison >"]; - 53 [label="Exit block"]; - } - 54 [label="Exit function " style="filled" fillcolor=red]; - } - 55 [label="Postponed exit from lambda"]; - 56 [label="Function call: Int(1).R|kotlin/takeUnless|(...)" style="filled" fillcolor=yellow]; - 57 [label="Exit block"]; - } - 58 [label="Exit function test_4" style="filled" fillcolor=red]; - } + 40 -> {34} [color=green style=dashed]; + 41 -> {42}; 42 -> {43}; - 43 -> {44}; + + subgraph cluster_13 { + color=red + 44 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_14 { + color=blue + 45 [label="Enter block"]; + 46 [label="Const: Int(1)"]; + 47 [label="Postponed enter to lambda"]; + subgraph cluster_15 { + color=blue + 48 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_16 { + color=blue + 49 [label="Enter block"]; + 50 [label="Const: String(test_4)"]; + 51 [label="Access variable R|/it|"]; + 52 [label="Const: Int(0)"]; + 53 [label="Function call: R|/it|.R|kotlin/Int.compareTo|(...)" style="filled" fillcolor=yellow]; + 54 [label="Comparison >"]; + 55 [label="Exit block"]; + } + 56 [label="Exit function " style="filled" fillcolor=red]; + } + 57 [label="Postponed exit from lambda"]; + 58 [label="Function call: Int(1).R|kotlin/takeUnless|(...)" style="filled" fillcolor=yellow]; + 59 [label="Exit block"]; + } + 60 [label="Exit function test_4" style="filled" fillcolor=red]; + } 44 -> {45}; - 45 -> {46 56}; - 45 -> {55} [style=dotted]; - 45 -> {46} [style=dashed]; + 45 -> {46}; 46 -> {47}; - 47 -> {48}; + 47 -> {48 58}; + 47 -> {57} [style=dotted]; + 47 -> {48} [style=dashed]; 48 -> {49}; 49 -> {50}; 50 -> {51}; @@ -176,44 +181,44 @@ digraph callsInPlace_kt { 55 -> {56}; 56 -> {57}; 57 -> {58}; - - subgraph cluster_16 { - color=red - 59 [label="Enter function test_5" style="filled" fillcolor=red]; - subgraph cluster_17 { - color=blue - 60 [label="Enter block"]; - 61 [label="Const: Int(1)"]; - 62 [label="Postponed enter to lambda"]; - subgraph cluster_18 { - color=blue - 63 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_19 { - color=blue - 64 [label="Enter block"]; - 65 [label="Const: String(test_5)"]; - 66 [label="Access variable R|/it|"]; - 67 [label="Const: Int(0)"]; - 68 [label="Function call: R|/it|.R|kotlin/Int.compareTo|(...)" style="filled" fillcolor=yellow]; - 69 [label="Comparison >"]; - 70 [label="Exit block"]; - } - 71 [label="Exit function " style="filled" fillcolor=red]; - } - 72 [label="Postponed exit from lambda"]; - 73 [label="Function call: Int(1).R|kotlin/takeUnless|(...)" style="filled" fillcolor=yellow]; - 74 [label="Exit block"]; - } - 75 [label="Exit function test_5" style="filled" fillcolor=red]; - } + 58 -> {59}; 59 -> {60}; - 60 -> {61}; + + subgraph cluster_17 { + color=red + 61 [label="Enter function test_5" style="filled" fillcolor=red]; + subgraph cluster_18 { + color=blue + 62 [label="Enter block"]; + 63 [label="Const: Int(1)"]; + 64 [label="Postponed enter to lambda"]; + subgraph cluster_19 { + color=blue + 65 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_20 { + color=blue + 66 [label="Enter block"]; + 67 [label="Const: String(test_5)"]; + 68 [label="Access variable R|/it|"]; + 69 [label="Const: Int(0)"]; + 70 [label="Function call: R|/it|.R|kotlin/Int.compareTo|(...)" style="filled" fillcolor=yellow]; + 71 [label="Comparison >"]; + 72 [label="Exit block"]; + } + 73 [label="Exit function " style="filled" fillcolor=red]; + } + 74 [label="Postponed exit from lambda"]; + 75 [label="Function call: Int(1).R|kotlin/takeUnless|(...)" style="filled" fillcolor=yellow]; + 76 [label="Exit block"]; + } + 77 [label="Exit function test_5" style="filled" fillcolor=red]; + } 61 -> {62}; - 62 -> {63 73}; - 62 -> {72} [style=dotted]; - 62 -> {63} [style=dashed]; + 62 -> {63}; 63 -> {64}; - 64 -> {65}; + 64 -> {65 75}; + 64 -> {74} [style=dotted]; + 64 -> {65} [style=dashed]; 65 -> {66}; 66 -> {67}; 67 -> {68}; @@ -224,189 +229,191 @@ digraph callsInPlace_kt { 72 -> {73}; 73 -> {74}; 74 -> {75}; - - subgraph cluster_20 { - color=red - 76 [label="Enter function myRun" style="filled" fillcolor=red]; - subgraph cluster_21 { - color=blue - 77 [label="Enter block"]; - 78 [label="Function call: R|/block1|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 79 [label="Function call: R|/block2|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 80 [label="Exit block"]; - } - 81 [label="Exit function myRun" style="filled" fillcolor=red]; - } + 75 -> {76}; 76 -> {77}; - 77 -> {78}; + + subgraph cluster_21 { + color=red + 78 [label="Enter function myRun" style="filled" fillcolor=red]; + subgraph cluster_22 { + color=blue + 79 [label="Enter block"]; + 80 [label="Function call: R|/block1|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 81 [label="Function call: R|/block2|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 82 [label="Exit block"]; + } + 83 [label="Exit function myRun" style="filled" fillcolor=red]; + } 78 -> {79}; 79 -> {80}; 80 -> {81}; - - subgraph cluster_22 { - color=red - 82 [label="Enter function test_6" style="filled" fillcolor=red]; - subgraph cluster_23 { - color=blue - 83 [label="Enter block"]; - 84 [label="Postponed enter to lambda"]; - subgraph cluster_24 { - color=blue - 85 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_25 { - color=blue - 86 [label="Enter block"]; - 87 [label="Const: String(test_6_2)"]; - 88 [label="Exit block"]; - } - 89 [label="Exit function " style="filled" fillcolor=red]; - } - subgraph cluster_26 { - color=blue - 90 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_27 { - color=blue - 91 [label="Enter block"]; - 92 [label="Const: String(test_6_1)"]; - 93 [label="Exit block"]; - } - 94 [label="Exit function " style="filled" fillcolor=red]; - } - 95 [label="Postponed exit from lambda"]; - 96 [label="Postponed exit from lambda"]; - 97 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 98 [label="Exit block"]; - } - 99 [label="Exit function test_6" style="filled" fillcolor=red]; - } + 81 -> {82}; 82 -> {83}; - 83 -> {84}; - 84 -> {85 90 95 96 97}; - 84 -> {85 90} [style=dashed]; + + subgraph cluster_23 { + color=red + 84 [label="Enter function test_6" style="filled" fillcolor=red]; + subgraph cluster_24 { + color=blue + 85 [label="Enter block"]; + 86 [label="Postponed enter to lambda"]; + subgraph cluster_25 { + color=blue + 87 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_26 { + color=blue + 88 [label="Enter block"]; + 89 [label="Const: String(test_6_2)"]; + 90 [label="Exit block"]; + } + 91 [label="Exit function " style="filled" fillcolor=red]; + } + subgraph cluster_27 { + color=blue + 92 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_28 { + color=blue + 93 [label="Enter block"]; + 94 [label="Const: String(test_6_1)"]; + 95 [label="Exit block"]; + } + 96 [label="Exit function " style="filled" fillcolor=red]; + } + 97 [label="Postponed exit from lambda"]; + 98 [label="Postponed exit from lambda"]; + 99 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + 100 [label="Exit block"]; + } + 101 [label="Exit function test_6" style="filled" fillcolor=red]; + } + 84 -> {85}; 85 -> {86}; - 86 -> {87}; + 86 -> {87 92 97 98 99}; + 86 -> {87 92} [style=dashed]; 87 -> {88}; 88 -> {89}; - 89 -> {95}; + 89 -> {90}; 90 -> {91}; - 91 -> {92}; + 91 -> {97}; 92 -> {93}; 93 -> {94}; - 94 -> {96}; - 95 -> {97}; - 95 -> {84} [color=green style=dashed]; - 96 -> {97}; - 96 -> {84} [color=green style=dashed]; - 97 -> {98}; + 94 -> {95}; + 95 -> {96}; + 96 -> {98}; + 97 -> {99}; + 97 -> {86} [color=green style=dashed]; 98 -> {99}; - - subgraph cluster_28 { - color=red - 100 [label="Enter function test_7" style="filled" fillcolor=red]; - subgraph cluster_29 { - color=blue - 101 [label="Enter block"]; - 102 [label="Postponed enter to lambda"]; - subgraph cluster_30 { - color=blue - 103 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_31 { - color=blue - 104 [label="Enter block"]; - 105 [label="Const: String(test_7_1)"]; - 106 [label="Exit block"]; - } - 107 [label="Exit function " style="filled" fillcolor=red]; - } - subgraph cluster_32 { - color=blue - 108 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_33 { - color=blue - 109 [label="Enter block"]; - 110 [label="Const: String(test_7_2)"]; - 111 [label="Exit block"]; - } - 112 [label="Exit function " style="filled" fillcolor=red]; - } - 113 [label="Postponed exit from lambda"]; - 114 [label="Postponed exit from lambda"]; - 115 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 116 [label="Exit block"]; - } - 117 [label="Exit function test_7" style="filled" fillcolor=red]; - } + 98 -> {86} [color=green style=dashed]; + 99 -> {100}; 100 -> {101}; - 101 -> {102}; - 102 -> {103 108 113 114 115}; - 102 -> {103 108} [style=dashed]; + + subgraph cluster_29 { + color=red + 102 [label="Enter function test_7" style="filled" fillcolor=red]; + subgraph cluster_30 { + color=blue + 103 [label="Enter block"]; + 104 [label="Postponed enter to lambda"]; + subgraph cluster_31 { + color=blue + 105 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_32 { + color=blue + 106 [label="Enter block"]; + 107 [label="Const: String(test_7_1)"]; + 108 [label="Exit block"]; + } + 109 [label="Exit function " style="filled" fillcolor=red]; + } + subgraph cluster_33 { + color=blue + 110 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_34 { + color=blue + 111 [label="Enter block"]; + 112 [label="Const: String(test_7_2)"]; + 113 [label="Exit block"]; + } + 114 [label="Exit function " style="filled" fillcolor=red]; + } + 115 [label="Postponed exit from lambda"]; + 116 [label="Postponed exit from lambda"]; + 117 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + 118 [label="Exit block"]; + } + 119 [label="Exit function test_7" style="filled" fillcolor=red]; + } + 102 -> {103}; 103 -> {104}; - 104 -> {105}; + 104 -> {105 110 115 116 117}; + 104 -> {105 110} [style=dashed]; 105 -> {106}; 106 -> {107}; - 107 -> {113}; + 107 -> {108}; 108 -> {109}; - 109 -> {110}; + 109 -> {115}; 110 -> {111}; 111 -> {112}; - 112 -> {114}; - 113 -> {115}; - 113 -> {102} [color=green style=dashed]; - 114 -> {115}; - 114 -> {102} [color=green style=dashed]; - 115 -> {116}; + 112 -> {113}; + 113 -> {114}; + 114 -> {116}; + 115 -> {117}; + 115 -> {104} [color=green style=dashed]; 116 -> {117}; - - subgraph cluster_34 { - color=red - 118 [label="Enter function myDummyRun" style="filled" fillcolor=red]; - subgraph cluster_35 { - color=blue - 119 [label="Enter block"]; - 120 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 121 [label="Exit block"]; - } - 122 [label="Exit function myDummyRun" style="filled" fillcolor=red]; - } + 116 -> {104} [color=green style=dashed]; + 117 -> {118}; 118 -> {119}; - 119 -> {120}; + + subgraph cluster_35 { + color=red + 120 [label="Enter function myDummyRun" style="filled" fillcolor=red]; + subgraph cluster_36 { + color=blue + 121 [label="Enter block"]; + 122 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 123 [label="Exit block"]; + } + 124 [label="Exit function myDummyRun" style="filled" fillcolor=red]; + } 120 -> {121}; 121 -> {122}; - - subgraph cluster_36 { - color=red - 123 [label="Enter function test_8" style="filled" fillcolor=red]; - subgraph cluster_37 { - color=blue - 124 [label="Enter block"]; - 125 [label="Postponed enter to lambda"]; - subgraph cluster_38 { - color=blue - 126 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_39 { - color=blue - 127 [label="Enter block"]; - 128 [label="Const: String(test_8)"]; - 129 [label="Exit block"]; - } - 130 [label="Exit function " style="filled" fillcolor=red]; - } - 131 [label="Postponed exit from lambda"]; - 132 [label="Function call: R|/myDummyRun|(...)" style="filled" fillcolor=yellow]; - 133 [label="Exit block"]; - } - 134 [label="Exit function test_8" style="filled" fillcolor=red]; - } + 122 -> {123}; 123 -> {124}; - 124 -> {125}; - 125 -> {126 131 132}; - 125 -> {126} [style=dashed]; + + subgraph cluster_37 { + color=red + 125 [label="Enter function test_8" style="filled" fillcolor=red]; + subgraph cluster_38 { + color=blue + 126 [label="Enter block"]; + 127 [label="Postponed enter to lambda"]; + subgraph cluster_39 { + color=blue + 128 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_40 { + color=blue + 129 [label="Enter block"]; + 130 [label="Const: String(test_8)"]; + 131 [label="Exit block"]; + } + 132 [label="Exit function " style="filled" fillcolor=red]; + } + 133 [label="Postponed exit from lambda"]; + 134 [label="Function call: R|/myDummyRun|(...)" style="filled" fillcolor=yellow]; + 135 [label="Exit block"]; + } + 136 [label="Exit function test_8" style="filled" fillcolor=red]; + } + 125 -> {126}; 126 -> {127}; - 127 -> {128}; + 127 -> {128 133 134}; + 127 -> {128} [style=dashed]; 128 -> {129}; 129 -> {130}; + 130 -> {131}; 131 -> {132}; - 132 -> {133}; 133 -> {134}; + 134 -> {135}; + 135 -> {136}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromLibrary/conditionalEffects.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromLibrary/conditionalEffects.dot index 7ba5c3702ac..e3d4895bc99 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromLibrary/conditionalEffects.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromLibrary/conditionalEffects.dot @@ -5,22 +5,27 @@ digraph conditionalEffects_kt { subgraph cluster_0 { color=red - 0 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter block"]; - 2 [label="Access variable R|/x|"]; - 3 [label="Type operator: (R|/x| is R|kotlin/Int|)"]; - 4 [label="Function call: R|kotlin/require|(...)" style="filled" fillcolor=yellow]; - 5 [label="Access variable R|/x|"]; - 6 [label="Smart cast: R|/x|"]; - 7 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 8 [label="Exit block"]; - } - 9 [label="Exit function test_1" style="filled" fillcolor=red]; + 0 [label="Enter file conditionalEffects.kt" style="filled" fillcolor=red]; + 1 [label="Exit file conditionalEffects.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_2 { + color=blue + 3 [label="Enter block"]; + 4 [label="Access variable R|/x|"]; + 5 [label="Type operator: (R|/x| is R|kotlin/Int|)"]; + 6 [label="Function call: R|kotlin/require|(...)" style="filled" fillcolor=yellow]; + 7 [label="Access variable R|/x|"]; + 8 [label="Smart cast: R|/x|"]; + 9 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 10 [label="Exit block"]; + } + 11 [label="Exit function test_1" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; 3 -> {4}; 4 -> {5}; @@ -28,50 +33,50 @@ digraph conditionalEffects_kt { 6 -> {7}; 7 -> {8}; 8 -> {9}; - - subgraph cluster_2 { - color=red - 10 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_3 { - color=blue - 11 [label="Enter block"]; - 12 [label="Access variable R|/x|"]; - 13 [label="Function call: R|kotlin/requireNotNull|(...)" style="filled" fillcolor=yellow]; - 14 [label="Access variable R|/x|"]; - 15 [label="Smart cast: R|/x|"]; - 16 [label="Access variable R|kotlin/String.length|"]; - 17 [label="Exit block"]; - } - 18 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 9 -> {10}; 10 -> {11}; - 11 -> {12}; + + subgraph cluster_3 { + color=red + 12 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_4 { + color=blue + 13 [label="Enter block"]; + 14 [label="Access variable R|/x|"]; + 15 [label="Function call: R|kotlin/requireNotNull|(...)" style="filled" fillcolor=yellow]; + 16 [label="Access variable R|/x|"]; + 17 [label="Smart cast: R|/x|"]; + 18 [label="Access variable R|kotlin/String.length|"]; + 19 [label="Exit block"]; + } + 20 [label="Exit function test_2" style="filled" fillcolor=red]; + } 12 -> {13}; 13 -> {14}; 14 -> {15}; 15 -> {16}; 16 -> {17}; 17 -> {18}; - - subgraph cluster_4 { - color=red - 19 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_5 { - color=blue - 20 [label="Enter block"]; - 21 [label="Access variable R|/x|"]; - 22 [label="Const: Null(null)"]; - 23 [label="Equality operator !="]; - 24 [label="Function call: R|kotlin/require|(...)" style="filled" fillcolor=yellow]; - 25 [label="Access variable R|/x|"]; - 26 [label="Smart cast: R|/x|"]; - 27 [label="Access variable R|kotlin/String.length|"]; - 28 [label="Exit block"]; - } - 29 [label="Exit function test_3" style="filled" fillcolor=red]; - } + 18 -> {19}; 19 -> {20}; - 20 -> {21}; + + subgraph cluster_5 { + color=red + 21 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_6 { + color=blue + 22 [label="Enter block"]; + 23 [label="Access variable R|/x|"]; + 24 [label="Const: Null(null)"]; + 25 [label="Equality operator !="]; + 26 [label="Function call: R|kotlin/require|(...)" style="filled" fillcolor=yellow]; + 27 [label="Access variable R|/x|"]; + 28 [label="Smart cast: R|/x|"]; + 29 [label="Access variable R|kotlin/String.length|"]; + 30 [label="Exit block"]; + } + 31 [label="Exit function test_3" style="filled" fillcolor=red]; + } 21 -> {22}; 22 -> {23}; 23 -> {24}; @@ -80,44 +85,44 @@ digraph conditionalEffects_kt { 26 -> {27}; 27 -> {28}; 28 -> {29}; - - subgraph cluster_6 { - color=red - 30 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_7 { - color=blue - 31 [label="Enter block"]; - subgraph cluster_8 { - color=blue - 32 [label="Enter &&"]; - 33 [label="Access variable R|/x|"]; - 34 [label="Type operator: (R|/x| is R|kotlin/String|)"]; - 35 [label="Exit left part of &&"]; - 36 [label="Enter right part of &&"]; - 37 [label="Access variable R|/y|"]; - 38 [label="Const: Null(null)"]; - 39 [label="Equality operator !="]; - 40 [label="Exit &&"]; - } - 41 [label="Function call: R|kotlin/require|(...)" style="filled" fillcolor=yellow]; - 42 [label="Access variable R|/x|"]; - 43 [label="Smart cast: R|/x|"]; - 44 [label="Access variable R|kotlin/String.length|"]; - 45 [label="Access variable R|/y|"]; - 46 [label="Smart cast: R|/y|"]; - 47 [label="Access variable R|kotlin/String.length|"]; - 48 [label="Exit block"]; - } - 49 [label="Exit function test_4" style="filled" fillcolor=red]; - } + 29 -> {30}; 30 -> {31}; - 31 -> {32}; + + subgraph cluster_7 { + color=red + 32 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_8 { + color=blue + 33 [label="Enter block"]; + subgraph cluster_9 { + color=blue + 34 [label="Enter &&"]; + 35 [label="Access variable R|/x|"]; + 36 [label="Type operator: (R|/x| is R|kotlin/String|)"]; + 37 [label="Exit left part of &&"]; + 38 [label="Enter right part of &&"]; + 39 [label="Access variable R|/y|"]; + 40 [label="Const: Null(null)"]; + 41 [label="Equality operator !="]; + 42 [label="Exit &&"]; + } + 43 [label="Function call: R|kotlin/require|(...)" style="filled" fillcolor=yellow]; + 44 [label="Access variable R|/x|"]; + 45 [label="Smart cast: R|/x|"]; + 46 [label="Access variable R|kotlin/String.length|"]; + 47 [label="Access variable R|/y|"]; + 48 [label="Smart cast: R|/y|"]; + 49 [label="Access variable R|kotlin/String.length|"]; + 50 [label="Exit block"]; + } + 51 [label="Exit function test_4" style="filled" fillcolor=red]; + } 32 -> {33}; 33 -> {34}; 34 -> {35}; - 35 -> {36 40}; + 35 -> {36}; 36 -> {37}; - 37 -> {38}; + 37 -> {38 42}; 38 -> {39}; 39 -> {40}; 40 -> {41}; @@ -129,73 +134,73 @@ digraph conditionalEffects_kt { 46 -> {47}; 47 -> {48}; 48 -> {49}; + 49 -> {50}; + 50 -> {51}; - subgraph cluster_9 { + subgraph cluster_10 { color=red - 50 [label="Enter function test_5" style="filled" fillcolor=red]; - subgraph cluster_10 { + 52 [label="Enter function test_5" style="filled" fillcolor=red]; + subgraph cluster_11 { color=blue - 51 [label="Enter block"]; - subgraph cluster_11 { + 53 [label="Enter block"]; + subgraph cluster_12 { color=blue - 52 [label="Enter when"]; - subgraph cluster_12 { - color=blue - 53 [label="Enter when branch condition "]; - 54 [label="Access variable R|/b|"]; - 55 [label="Exit when branch condition"]; - } + 54 [label="Enter when"]; subgraph cluster_13 { color=blue - 56 [label="Enter when branch condition else"]; + 55 [label="Enter when branch condition "]; + 56 [label="Access variable R|/b|"]; 57 [label="Exit when branch condition"]; } - 58 [label="Enter when branch result"]; subgraph cluster_14 { color=blue - 59 [label="Enter block"]; - 60 [label="Access variable R|/x|"]; - 61 [label="Access variable #"]; - 62 [label="Exit block"]; + 58 [label="Enter when branch condition else"]; + 59 [label="Exit when branch condition"]; } - 63 [label="Exit when branch result"]; - 64 [label="Enter when branch result"]; + 60 [label="Enter when branch result"]; subgraph cluster_15 { color=blue - 65 [label="Enter block"]; - 66 [label="Access variable R|/x|"]; - 67 [label="Type operator: (R|/x| is R|kotlin/String|)"]; - 68 [label="Function call: R|kotlin/require|(...)" style="filled" fillcolor=yellow]; - 69 [label="Access variable R|/x|"]; - 70 [label="Smart cast: R|/x|"]; - 71 [label="Access variable R|kotlin/String.length|"]; - 72 [label="Exit block"]; + 61 [label="Enter block"]; + 62 [label="Access variable R|/x|"]; + 63 [label="Access variable #"]; + 64 [label="Exit block"]; } - 73 [label="Exit when branch result"]; - 74 [label="Exit when"]; + 65 [label="Exit when branch result"]; + 66 [label="Enter when branch result"]; + subgraph cluster_16 { + color=blue + 67 [label="Enter block"]; + 68 [label="Access variable R|/x|"]; + 69 [label="Type operator: (R|/x| is R|kotlin/String|)"]; + 70 [label="Function call: R|kotlin/require|(...)" style="filled" fillcolor=yellow]; + 71 [label="Access variable R|/x|"]; + 72 [label="Smart cast: R|/x|"]; + 73 [label="Access variable R|kotlin/String.length|"]; + 74 [label="Exit block"]; + } + 75 [label="Exit when branch result"]; + 76 [label="Exit when"]; } - 75 [label="Access variable R|/x|"]; - 76 [label="Access variable #"]; - 77 [label="Exit block"]; + 77 [label="Access variable R|/x|"]; + 78 [label="Access variable #"]; + 79 [label="Exit block"]; } - 78 [label="Exit function test_5" style="filled" fillcolor=red]; + 80 [label="Exit function test_5" style="filled" fillcolor=red]; } - 50 -> {51}; - 51 -> {52}; 52 -> {53}; 53 -> {54}; 54 -> {55}; - 55 -> {56 64}; + 55 -> {56}; 56 -> {57}; - 57 -> {58}; + 57 -> {58 66}; 58 -> {59}; 59 -> {60}; 60 -> {61}; 61 -> {62}; 62 -> {63}; - 63 -> {74}; + 63 -> {64}; 64 -> {65}; - 65 -> {66}; + 65 -> {76}; 66 -> {67}; 67 -> {68}; 68 -> {69}; @@ -208,70 +213,70 @@ digraph conditionalEffects_kt { 75 -> {76}; 76 -> {77}; 77 -> {78}; + 78 -> {79}; + 79 -> {80}; - subgraph cluster_16 { + subgraph cluster_17 { color=red - 79 [label="Enter function test_6" style="filled" fillcolor=red]; - subgraph cluster_17 { + 81 [label="Enter function test_6" style="filled" fillcolor=red]; + subgraph cluster_18 { color=blue - 80 [label="Enter block"]; - subgraph cluster_18 { + 82 [label="Enter block"]; + subgraph cluster_19 { color=blue - 81 [label="Enter when"]; - subgraph cluster_19 { - color=blue - 82 [label="Enter when branch condition "]; - 83 [label="Access variable R|/b|"]; - 84 [label="Exit when branch condition"]; - } + 83 [label="Enter when"]; subgraph cluster_20 { color=blue - 85 [label="Enter when branch condition else"]; + 84 [label="Enter when branch condition "]; + 85 [label="Access variable R|/b|"]; 86 [label="Exit when branch condition"]; } - 87 [label="Enter when branch result"]; subgraph cluster_21 { color=blue - 88 [label="Enter block"]; - 89 [label="Access variable R|/x|"]; - 90 [label="Type operator: (R|/x| is R|kotlin/String|)"]; - 91 [label="Function call: R|kotlin/require|(...)" style="filled" fillcolor=yellow]; - 92 [label="Access variable R|/x|"]; - 93 [label="Smart cast: R|/x|"]; - 94 [label="Access variable R|kotlin/String.length|"]; - 95 [label="Exit block"]; + 87 [label="Enter when branch condition else"]; + 88 [label="Exit when branch condition"]; } - 96 [label="Exit when branch result"]; - 97 [label="Enter when branch result"]; + 89 [label="Enter when branch result"]; subgraph cluster_22 { color=blue - 98 [label="Enter block"]; - 99 [label="Access variable R|/x|"]; - 100 [label="Type operator: (R|/x| is R|kotlin/String|)"]; - 101 [label="Function call: R|kotlin/require|(...)" style="filled" fillcolor=yellow]; - 102 [label="Access variable R|/x|"]; - 103 [label="Smart cast: R|/x|"]; - 104 [label="Access variable R|kotlin/String.length|"]; - 105 [label="Exit block"]; + 90 [label="Enter block"]; + 91 [label="Access variable R|/x|"]; + 92 [label="Type operator: (R|/x| is R|kotlin/String|)"]; + 93 [label="Function call: R|kotlin/require|(...)" style="filled" fillcolor=yellow]; + 94 [label="Access variable R|/x|"]; + 95 [label="Smart cast: R|/x|"]; + 96 [label="Access variable R|kotlin/String.length|"]; + 97 [label="Exit block"]; } - 106 [label="Exit when branch result"]; - 107 [label="Exit when"]; + 98 [label="Exit when branch result"]; + 99 [label="Enter when branch result"]; + subgraph cluster_23 { + color=blue + 100 [label="Enter block"]; + 101 [label="Access variable R|/x|"]; + 102 [label="Type operator: (R|/x| is R|kotlin/String|)"]; + 103 [label="Function call: R|kotlin/require|(...)" style="filled" fillcolor=yellow]; + 104 [label="Access variable R|/x|"]; + 105 [label="Smart cast: R|/x|"]; + 106 [label="Access variable R|kotlin/String.length|"]; + 107 [label="Exit block"]; + } + 108 [label="Exit when branch result"]; + 109 [label="Exit when"]; } - 108 [label="Access variable R|/x|"]; - 109 [label="Smart cast: R|/x|"]; - 110 [label="Access variable R|kotlin/String.length|"]; - 111 [label="Exit block"]; + 110 [label="Access variable R|/x|"]; + 111 [label="Smart cast: R|/x|"]; + 112 [label="Access variable R|kotlin/String.length|"]; + 113 [label="Exit block"]; } - 112 [label="Exit function test_6" style="filled" fillcolor=red]; + 114 [label="Exit function test_6" style="filled" fillcolor=red]; } - 79 -> {80}; - 80 -> {81}; 81 -> {82}; 82 -> {83}; 83 -> {84}; - 84 -> {85 97}; + 84 -> {85}; 85 -> {86}; - 86 -> {87}; + 86 -> {87 99}; 87 -> {88}; 88 -> {89}; 89 -> {90}; @@ -281,9 +286,9 @@ digraph conditionalEffects_kt { 93 -> {94}; 94 -> {95}; 95 -> {96}; - 96 -> {107}; + 96 -> {97}; 97 -> {98}; - 98 -> {99}; + 98 -> {109}; 99 -> {100}; 100 -> {101}; 101 -> {102}; @@ -297,5 +302,7 @@ digraph conditionalEffects_kt { 109 -> {110}; 110 -> {111}; 111 -> {112}; + 112 -> {113}; + 113 -> {114}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/inAnonymousObject.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/inAnonymousObject.dot index 4654e683c83..fecb19eeead 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/inAnonymousObject.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/inAnonymousObject.dot @@ -5,102 +5,109 @@ digraph inAnonymousObject_kt { subgraph cluster_0 { color=red - 0 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_1 { + 0 [label="Enter file inAnonymousObject.kt" style="filled" fillcolor=red]; + 1 [label="Exit file inAnonymousObject.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 1 [label="Enter block"]; - subgraph cluster_2 { - color=blue - 2 [label="Enter block"]; - 3 [label="Exit block"]; - } - 4 [label="Enter anonymous object"]; + 3 [label="Enter block"]; subgraph cluster_3 { color=blue - 5 [label="Enter class " style="filled" fillcolor=red]; - subgraph cluster_4 { - color=blue - 6 [label="Enter property" style="filled" fillcolor=red]; - 7 [label="Access variable R|/a|"]; - 8 [label="Exit property" style="filled" fillcolor=red]; - } + 4 [label="Enter block"]; + 5 [label="Exit block"]; + } + 6 [label="Enter anonymous object"]; + subgraph cluster_4 { + color=blue + 7 [label="Enter class " style="filled" fillcolor=red]; subgraph cluster_5 { color=blue - 9 [label="Enter init block" style="filled" fillcolor=red]; - subgraph cluster_6 { - color=blue - 10 [label="Enter block"]; - 11 [label="Access variable R|/b|"]; - 12 [label="Assignment: R|/.leaked|"]; - 13 [label="Exit block"]; - } - 14 [label="Exit init block" style="filled" fillcolor=red]; + 8 [label="Enter property" style="filled" fillcolor=red]; + 9 [label="Access variable R|/a|"]; + 10 [label="Exit property" style="filled" fillcolor=red]; } - subgraph cluster_7 { + subgraph cluster_6 { color=blue - 15 [label="Enter function " style="filled" fillcolor=red]; - 16 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 17 [label="Exit function " style="filled" fillcolor=red]; + 11 [label="Enter init block" style="filled" fillcolor=red]; + subgraph cluster_7 { + color=blue + 12 [label="Enter block"]; + 13 [label="Access variable R|/b|"]; + 14 [label="Assignment: R|/.leaked|"]; + 15 [label="Exit block"]; + } + 16 [label="Exit init block" style="filled" fillcolor=red]; } - 18 [label="Exit class " style="filled" fillcolor=red]; + subgraph cluster_8 { + color=blue + 17 [label="Enter function " style="filled" fillcolor=red]; + 18 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 19 [label="Exit function " style="filled" fillcolor=red]; + } + 20 [label="Exit class " style="filled" fillcolor=red]; } - 19 [label="Exit anonymous object expression"]; - 20 [label="Variable declaration: lval obj: R||"]; - 21 [label="Access variable R|/obj|"]; - 22 [label="Function call: R|/obj|.R|/.run|()" style="filled" fillcolor=yellow]; - 23 [label="Function call: R|/d|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 24 [label="Exit block"]; + 21 [label="Exit anonymous object expression"]; + 22 [label="Variable declaration: lval obj: R||"]; + 23 [label="Access variable R|/obj|"]; + 24 [label="Function call: R|/obj|.R|/.run|()" style="filled" fillcolor=yellow]; + 25 [label="Function call: R|/d|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 26 [label="Exit block"]; } - 25 [label="Exit function foo" style="filled" fillcolor=red]; + 27 [label="Exit function foo" style="filled" fillcolor=red]; } - subgraph cluster_8 { + subgraph cluster_9 { color=blue - 26 [label="Enter function run" style="filled" fillcolor=red]; - subgraph cluster_9 { + 28 [label="Enter function run" style="filled" fillcolor=red]; + subgraph cluster_10 { color=blue - 27 [label="Enter block"]; - 28 [label="Function call: R|/c|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 29 [label="Exit block"]; + 29 [label="Enter block"]; + 30 [label="Function call: R|/c|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 31 [label="Exit block"]; } - 30 [label="Exit function run" style="filled" fillcolor=red]; + 32 [label="Exit function run" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; 3 -> {4}; 4 -> {5}; - 4 -> {19} [style=dotted]; - 4 -> {5} [style=dashed]; 5 -> {6}; - 5 -> {9 15 26} [color=red]; - 5 -> {18} [style=dotted]; - 5 -> {6 9 15} [style=dashed]; 6 -> {7}; + 6 -> {21} [style=dotted]; + 6 -> {7} [style=dashed]; 7 -> {8}; - 8 -> {9} [color=green]; - 8 -> {18} [color=red]; + 7 -> {11 17 28} [color=red]; + 7 -> {20} [style=dotted]; + 7 -> {8 11 17} [style=dashed]; + 8 -> {9}; 9 -> {10}; - 10 -> {11}; + 10 -> {11} [color=green]; + 10 -> {20} [color=red]; 11 -> {12}; 12 -> {13}; 13 -> {14}; - 14 -> {15} [color=green]; - 14 -> {18} [color=red]; + 14 -> {15}; 15 -> {16}; - 16 -> {17}; + 16 -> {17} [color=green]; + 16 -> {20} [color=red]; 17 -> {18}; 18 -> {19}; - 18 -> {26} [color=green]; - 18 -> {26} [style=dashed]; 19 -> {20}; 20 -> {21}; + 20 -> {28} [color=green]; + 20 -> {28} [style=dashed]; 21 -> {22}; 22 -> {23}; 23 -> {24}; 24 -> {25}; + 25 -> {26}; 26 -> {27}; - 27 -> {28}; 28 -> {29}; 29 -> {30}; + 30 -> {31}; + 31 -> {32}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/inLocalClass.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/inLocalClass.dot index 4ad249c056a..d6e7d9bc96a 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/inLocalClass.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/inLocalClass.dot @@ -5,103 +5,110 @@ digraph inLocalClass_kt { subgraph cluster_0 { color=red - 0 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter block"]; - subgraph cluster_2 { - color=blue - 2 [label="Enter block"]; - 3 [label="Exit block"]; - } - 4 [label="Local class declaration"]; - 5 [label="Function call: R|/LocalClass.LocalClass|()" style="filled" fillcolor=yellow]; - 6 [label="Function call: R|/LocalClass.LocalClass|().R|/run|()" style="filled" fillcolor=yellow]; - 7 [label="Function call: R|/e|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 8 [label="Exit block"]; - } - 9 [label="Exit function foo" style="filled" fillcolor=red]; + 0 [label="Enter file inLocalClass.kt" style="filled" fillcolor=red]; + 1 [label="Exit file inLocalClass.kt" style="filled" fillcolor=red]; } - subgraph cluster_3 { - color=blue - 10 [label="Enter class LocalClass" style="filled" fillcolor=red]; - subgraph cluster_4 { + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 11 [label="Enter property" style="filled" fillcolor=red]; - 12 [label="Access variable R|/a|"]; - 13 [label="Exit property" style="filled" fillcolor=red]; + 3 [label="Enter block"]; + subgraph cluster_3 { + color=blue + 4 [label="Enter block"]; + 5 [label="Exit block"]; + } + 6 [label="Local class declaration"]; + 7 [label="Function call: R|/LocalClass.LocalClass|()" style="filled" fillcolor=yellow]; + 8 [label="Function call: R|/LocalClass.LocalClass|().R|/run|()" style="filled" fillcolor=yellow]; + 9 [label="Function call: R|/e|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 10 [label="Exit block"]; } + 11 [label="Exit function foo" style="filled" fillcolor=red]; + } + subgraph cluster_4 { + color=blue + 12 [label="Enter class LocalClass" style="filled" fillcolor=red]; subgraph cluster_5 { color=blue - 14 [label="Enter init block" style="filled" fillcolor=red]; - subgraph cluster_6 { - color=blue - 15 [label="Enter block"]; - 16 [label="Access variable R|/c|"]; - 17 [label="Assignment: R|/leaked|"]; - 18 [label="Exit block"]; - } - 19 [label="Exit init block" style="filled" fillcolor=red]; + 13 [label="Enter property" style="filled" fillcolor=red]; + 14 [label="Access variable R|/a|"]; + 15 [label="Exit property" style="filled" fillcolor=red]; } - subgraph cluster_7 { + subgraph cluster_6 { color=blue - 20 [label="Enter function " style="filled" fillcolor=red]; - 21 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - subgraph cluster_8 { + 16 [label="Enter init block" style="filled" fillcolor=red]; + subgraph cluster_7 { color=blue - 22 [label="Enter block"]; - 23 [label="Function call: R|/b|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 24 [label="Exit block"]; + 17 [label="Enter block"]; + 18 [label="Access variable R|/c|"]; + 19 [label="Assignment: R|/leaked|"]; + 20 [label="Exit block"]; } - 25 [label="Exit function " style="filled" fillcolor=red]; + 21 [label="Exit init block" style="filled" fillcolor=red]; } - 26 [label="Exit class LocalClass" style="filled" fillcolor=red]; + subgraph cluster_8 { + color=blue + 22 [label="Enter function " style="filled" fillcolor=red]; + 23 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + subgraph cluster_9 { + color=blue + 24 [label="Enter block"]; + 25 [label="Function call: R|/b|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 26 [label="Exit block"]; + } + 27 [label="Exit function " style="filled" fillcolor=red]; + } + 28 [label="Exit class LocalClass" style="filled" fillcolor=red]; } - subgraph cluster_9 { + subgraph cluster_10 { color=blue - 27 [label="Enter function run" style="filled" fillcolor=red]; - subgraph cluster_10 { + 29 [label="Enter function run" style="filled" fillcolor=red]; + subgraph cluster_11 { color=blue - 28 [label="Enter block"]; - 29 [label="Function call: R|/d|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 30 [label="Exit block"]; + 30 [label="Enter block"]; + 31 [label="Function call: R|/d|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 32 [label="Exit block"]; } - 31 [label="Exit function run" style="filled" fillcolor=red]; + 33 [label="Exit function run" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; 3 -> {4}; - 4 -> {5 10}; - 4 -> {10} [style=dashed]; + 4 -> {5}; 5 -> {6}; - 6 -> {7}; + 6 -> {7 12}; + 6 -> {12} [style=dashed]; 7 -> {8}; 8 -> {9}; + 9 -> {10}; 10 -> {11}; - 10 -> {14 20 27} [color=red]; - 10 -> {26} [style=dotted]; - 10 -> {11 14 20} [style=dashed]; - 11 -> {12}; 12 -> {13}; - 13 -> {14} [color=green]; + 12 -> {16 22 29} [color=red]; + 12 -> {28} [style=dotted]; + 12 -> {13 16 22} [style=dashed]; + 13 -> {14}; 14 -> {15}; - 15 -> {16}; + 15 -> {16} [color=green]; 16 -> {17}; 17 -> {18}; 18 -> {19}; - 19 -> {20} [color=green]; + 19 -> {20}; 20 -> {21}; - 21 -> {22}; + 21 -> {22} [color=green]; 22 -> {23}; 23 -> {24}; 24 -> {25}; - 25 -> {26} [color=green]; - 26 -> {27} [color=green]; - 26 -> {27} [style=dashed]; - 27 -> {28}; - 28 -> {29}; + 25 -> {26}; + 26 -> {27}; + 27 -> {28} [color=green]; + 28 -> {29} [color=green]; + 28 -> {29} [style=dashed]; 29 -> {30}; 30 -> {31}; + 31 -> {32}; + 32 -> {33}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/inLocalFunction.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/inLocalFunction.dot index a1b83543e99..27fb82b9fd8 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/inLocalFunction.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/inLocalFunction.dot @@ -5,49 +5,56 @@ digraph inLocalFunction_kt { subgraph cluster_0 { color=red - 0 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_1 { + 0 [label="Enter file inLocalFunction.kt" style="filled" fillcolor=red]; + 1 [label="Exit file inLocalFunction.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 1 [label="Enter block"]; - subgraph cluster_2 { + 3 [label="Enter block"]; + subgraph cluster_3 { color=blue - 2 [label="Enter block"]; - 3 [label="Exit block"]; + 4 [label="Enter block"]; + 5 [label="Exit block"]; } - 4 [label="Local function declaration"]; - 5 [label="Function call: R|/localFun|()" style="filled" fillcolor=yellow]; - 6 [label="Function call: R|/b|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 7 [label="Exit block"]; + 6 [label="Local function declaration"]; + 7 [label="Function call: R|/localFun|()" style="filled" fillcolor=yellow]; + 8 [label="Function call: R|/b|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 9 [label="Exit block"]; } - 8 [label="Exit function foo" style="filled" fillcolor=red]; + 10 [label="Exit function foo" style="filled" fillcolor=red]; } - subgraph cluster_3 { + subgraph cluster_4 { color=blue - 9 [label="Enter function localFun" style="filled" fillcolor=red]; - subgraph cluster_4 { + 11 [label="Enter function localFun" style="filled" fillcolor=red]; + subgraph cluster_5 { color=blue - 10 [label="Enter block"]; - 11 [label="Access variable R|/a|"]; - 12 [label="Function call: R|/a|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 13 [label="Function call: R|/a|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 14 [label="Exit block"]; + 12 [label="Enter block"]; + 13 [label="Access variable R|/a|"]; + 14 [label="Function call: R|/a|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 15 [label="Function call: R|/a|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 16 [label="Exit block"]; } - 15 [label="Exit function localFun" style="filled" fillcolor=red]; + 17 [label="Exit function localFun" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; 3 -> {4}; - 4 -> {5 9}; - 4 -> {9} [style=dashed]; + 4 -> {5}; 5 -> {6}; - 6 -> {7}; + 6 -> {7 11}; + 6 -> {11} [style=dashed]; 7 -> {8}; + 8 -> {9}; 9 -> {10}; - 10 -> {11}; 11 -> {12}; 12 -> {13}; 13 -> {14}; 14 -> {15}; + 15 -> {16}; + 16 -> {17}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/toLocalVariables.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/toLocalVariables.dot index 099e5c4eb91..eb948413de5 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/toLocalVariables.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/bad/callsInPlace/toLocalVariables.dot @@ -5,91 +5,96 @@ digraph toLocalVariables_kt { subgraph cluster_0 { color=red - 0 [label="Enter function bar" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter block"]; - 2 [label="Exit block"]; - } - 3 [label="Exit function bar" style="filled" fillcolor=red]; + 0 [label="Enter file toLocalVariables.kt" style="filled" fillcolor=red]; + 1 [label="Exit file toLocalVariables.kt" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; - 2 -> {3}; + 0 -> {1} [color=green]; - subgraph cluster_2 { + subgraph cluster_1 { color=red - 4 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_3 { + 2 [label="Enter function bar" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 5 [label="Enter block"]; - subgraph cluster_4 { - color=blue - 6 [label="Enter block"]; - 7 [label="Exit block"]; - } + 3 [label="Enter block"]; + 4 [label="Exit block"]; + } + 5 [label="Exit function bar" style="filled" fillcolor=red]; + } + 2 -> {3}; + 3 -> {4}; + 4 -> {5}; + + subgraph cluster_3 { + color=red + 6 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_4 { + color=blue + 7 [label="Enter block"]; subgraph cluster_5 { color=blue - 8 [label="Enter when"]; - subgraph cluster_6 { - color=blue - 9 [label="Enter when branch condition "]; - 10 [label="Const: Boolean(true)"]; - 11 [label="Exit when branch condition"]; - } + 8 [label="Enter block"]; + 9 [label="Exit block"]; + } + subgraph cluster_6 { + color=blue + 10 [label="Enter when"]; subgraph cluster_7 { color=blue - 12 [label="Enter when branch condition else"]; + 11 [label="Enter when branch condition "]; + 12 [label="Const: Boolean(true)"]; 13 [label="Exit when branch condition"]; } - 14 [label="Enter when branch result"]; subgraph cluster_8 { color=blue - 15 [label="Enter block"]; - 16 [label="Access variable R|/y|"]; - 17 [label="Variable declaration: lval yCopy: R|() -> kotlin/Unit|"]; - 18 [label="Function call: R|/yCopy|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 19 [label="Exit block"]; + 14 [label="Enter when branch condition else"]; + 15 [label="Exit when branch condition"]; } - 20 [label="Exit when branch result"]; - 21 [label="Enter when branch result"]; + 16 [label="Enter when branch result"]; subgraph cluster_9 { color=blue - 22 [label="Enter block"]; - 23 [label="Access variable R|/x|"]; - 24 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; - 25 [label="Exit block"]; + 17 [label="Enter block"]; + 18 [label="Access variable R|/y|"]; + 19 [label="Variable declaration: lval yCopy: R|() -> kotlin/Unit|"]; + 20 [label="Function call: R|/yCopy|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 21 [label="Exit block"]; } - 26 [label="Exit when branch result"]; - 27 [label="Exit when"]; + 22 [label="Exit when branch result"]; + 23 [label="Enter when branch result"]; + subgraph cluster_10 { + color=blue + 24 [label="Enter block"]; + 25 [label="Access variable R|/x|"]; + 26 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; + 27 [label="Exit block"]; + } + 28 [label="Exit when branch result"]; + 29 [label="Exit when"]; } - 28 [label="Variable declaration: lval zCopy: R|() -> kotlin/Unit|"]; - 29 [label="Access variable R|/z|"]; - 30 [label="Assignment: R|/zCopy|"]; - 31 [label="Function call: R|/zCopy|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 32 [label="Exit block"]; + 30 [label="Variable declaration: lval zCopy: R|() -> kotlin/Unit|"]; + 31 [label="Access variable R|/z|"]; + 32 [label="Assignment: R|/zCopy|"]; + 33 [label="Function call: R|/zCopy|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 34 [label="Exit block"]; } - 33 [label="Exit function foo" style="filled" fillcolor=red]; + 35 [label="Exit function foo" style="filled" fillcolor=red]; } - 4 -> {5}; - 5 -> {6}; 6 -> {7}; 7 -> {8}; 8 -> {9}; 9 -> {10}; 10 -> {11}; - 11 -> {12 21}; + 11 -> {12}; 12 -> {13}; - 13 -> {14}; + 13 -> {14 23}; 14 -> {15}; 15 -> {16}; 16 -> {17}; 17 -> {18}; 18 -> {19}; 19 -> {20}; - 20 -> {27}; + 20 -> {21}; 21 -> {22}; - 22 -> {23}; + 22 -> {29}; 23 -> {24}; 24 -> {25}; 25 -> {26}; @@ -100,5 +105,7 @@ digraph toLocalVariables_kt { 30 -> {31}; 31 -> {32}; 32 -> {33}; + 33 -> {34}; + 34 -> {35}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/atLeastOnce.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/atLeastOnce.dot index de8d00432c9..81a0c646bbc 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/atLeastOnce.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/atLeastOnce.dot @@ -5,142 +5,149 @@ digraph atLeastOnce_kt { subgraph cluster_0 { color=red - 0 [label="Enter function inlineRun" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter block"]; - subgraph cluster_2 { - color=blue - 2 [label="Enter block"]; - 3 [label="Exit block"]; - } - 4 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 5 [label="Exit block"]; - } - 6 [label="Exit function inlineRun" style="filled" fillcolor=red]; + 0 [label="Enter file atLeastOnce.kt" style="filled" fillcolor=red]; + 1 [label="Exit file atLeastOnce.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function inlineRun" style="filled" fillcolor=red]; + subgraph cluster_2 { + color=blue + 3 [label="Enter block"]; + subgraph cluster_3 { + color=blue + 4 [label="Enter block"]; + 5 [label="Exit block"]; + } + 6 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 7 [label="Exit block"]; + } + 8 [label="Exit function inlineRun" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; 3 -> {4}; 4 -> {5}; 5 -> {6}; - - subgraph cluster_3 { - color=red - 7 [label="Enter function myRun" style="filled" fillcolor=red]; - subgraph cluster_4 { - color=blue - 8 [label="Enter block"]; - subgraph cluster_5 { - color=blue - 9 [label="Enter block"]; - 10 [label="Exit block"]; - } - 11 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 12 [label="Exit block"]; - } - 13 [label="Exit function myRun" style="filled" fillcolor=red]; - } + 6 -> {7}; 7 -> {8}; - 8 -> {9}; + + subgraph cluster_4 { + color=red + 9 [label="Enter function myRun" style="filled" fillcolor=red]; + subgraph cluster_5 { + color=blue + 10 [label="Enter block"]; + subgraph cluster_6 { + color=blue + 11 [label="Enter block"]; + 12 [label="Exit block"]; + } + 13 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 14 [label="Exit block"]; + } + 15 [label="Exit function myRun" style="filled" fillcolor=red]; + } 9 -> {10}; 10 -> {11}; 11 -> {12}; 12 -> {13}; - - subgraph cluster_6 { - color=red - 14 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_7 { - color=blue - 15 [label="Enter block"]; - 16 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 17 [label="Postponed enter to lambda"]; - subgraph cluster_8 { - color=blue - 18 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_9 { - color=blue - 19 [label="Enter block"]; - 20 [label="Const: Int(1)"]; - 21 [label="Assignment: R|/x|"]; - 22 [label="Exit block"]; - } - 23 [label="Exit function " style="filled" fillcolor=red]; - } - 24 [label="Postponed exit from lambda"]; - 25 [label="Function call: R|/inlineRun|(...)" style="filled" fillcolor=yellow]; - 26 [label="Access variable R|/x|"]; - 27 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 28 [label="Exit block"]; - } - 29 [label="Exit function test_1" style="filled" fillcolor=red]; - } + 13 -> {14}; 14 -> {15}; - 15 -> {16}; + + subgraph cluster_7 { + color=red + 16 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_8 { + color=blue + 17 [label="Enter block"]; + 18 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 19 [label="Postponed enter to lambda"]; + subgraph cluster_9 { + color=blue + 20 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_10 { + color=blue + 21 [label="Enter block"]; + 22 [label="Const: Int(1)"]; + 23 [label="Assignment: R|/x|"]; + 24 [label="Exit block"]; + } + 25 [label="Exit function " style="filled" fillcolor=red]; + } + 26 [label="Postponed exit from lambda"]; + 27 [label="Function call: R|/inlineRun|(...)" style="filled" fillcolor=yellow]; + 28 [label="Access variable R|/x|"]; + 29 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 30 [label="Exit block"]; + } + 31 [label="Exit function test_1" style="filled" fillcolor=red]; + } 16 -> {17}; - 17 -> {18 25}; - 17 -> {24} [style=dotted]; - 17 -> {18} [style=dashed]; + 17 -> {18}; 18 -> {19}; - 19 -> {20}; + 19 -> {20 27}; + 19 -> {26} [style=dotted]; + 19 -> {20} [style=dashed]; 20 -> {21}; 21 -> {22}; 22 -> {23}; 23 -> {24}; 24 -> {25}; - 24 -> {17} [color=green style=dashed]; 25 -> {26}; 26 -> {27}; + 26 -> {19} [color=green style=dashed]; 27 -> {28}; 28 -> {29}; - - subgraph cluster_10 { - color=red - 30 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_11 { - color=blue - 31 [label="Enter block"]; - 32 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 33 [label="Postponed enter to lambda"]; - subgraph cluster_12 { - color=blue - 34 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_13 { - color=blue - 35 [label="Enter block"]; - 36 [label="Const: Int(1)"]; - 37 [label="Assignment: R|/x|"]; - 38 [label="Exit block"]; - } - 39 [label="Exit function " style="filled" fillcolor=red]; - } - 40 [label="Postponed exit from lambda"]; - 41 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 42 [label="Access variable R|/x|"]; - 43 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 44 [label="Exit block"]; - } - 45 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 29 -> {30}; 30 -> {31}; - 31 -> {32}; + + subgraph cluster_11 { + color=red + 32 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_12 { + color=blue + 33 [label="Enter block"]; + 34 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 35 [label="Postponed enter to lambda"]; + subgraph cluster_13 { + color=blue + 36 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_14 { + color=blue + 37 [label="Enter block"]; + 38 [label="Const: Int(1)"]; + 39 [label="Assignment: R|/x|"]; + 40 [label="Exit block"]; + } + 41 [label="Exit function " style="filled" fillcolor=red]; + } + 42 [label="Postponed exit from lambda"]; + 43 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + 44 [label="Access variable R|/x|"]; + 45 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 46 [label="Exit block"]; + } + 47 [label="Exit function test_2" style="filled" fillcolor=red]; + } 32 -> {33}; - 33 -> {34 41}; - 33 -> {40} [style=dotted]; - 33 -> {34} [style=dashed]; + 33 -> {34}; 34 -> {35}; - 35 -> {36}; + 35 -> {36 43}; + 35 -> {42} [style=dotted]; + 35 -> {36} [style=dashed]; 36 -> {37}; 37 -> {38}; 38 -> {39}; 39 -> {40}; 40 -> {41}; - 40 -> {33} [color=green style=dashed]; 41 -> {42}; 42 -> {43}; + 42 -> {35} [color=green style=dashed]; 43 -> {44}; 44 -> {45}; + 45 -> {46}; + 46 -> {47}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/atMostOnce.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/atMostOnce.dot index 57ebcdff91f..f19f019d83f 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/atMostOnce.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/atMostOnce.dot @@ -5,85 +5,90 @@ digraph atMostOnce_kt { subgraph cluster_0 { color=red - 0 [label="Enter function inlineRun" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter block"]; - subgraph cluster_2 { - color=blue - 2 [label="Enter block"]; - 3 [label="Exit block"]; - } - 4 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 5 [label="Exit block"]; - } - 6 [label="Exit function inlineRun" style="filled" fillcolor=red]; + 0 [label="Enter file atMostOnce.kt" style="filled" fillcolor=red]; + 1 [label="Exit file atMostOnce.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function inlineRun" style="filled" fillcolor=red]; + subgraph cluster_2 { + color=blue + 3 [label="Enter block"]; + subgraph cluster_3 { + color=blue + 4 [label="Enter block"]; + 5 [label="Exit block"]; + } + 6 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 7 [label="Exit block"]; + } + 8 [label="Exit function inlineRun" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; 3 -> {4}; 4 -> {5}; 5 -> {6}; - - subgraph cluster_3 { - color=red - 7 [label="Enter function myRun" style="filled" fillcolor=red]; - subgraph cluster_4 { - color=blue - 8 [label="Enter block"]; - subgraph cluster_5 { - color=blue - 9 [label="Enter block"]; - 10 [label="Exit block"]; - } - 11 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 12 [label="Exit block"]; - } - 13 [label="Exit function myRun" style="filled" fillcolor=red]; - } + 6 -> {7}; 7 -> {8}; - 8 -> {9}; + + subgraph cluster_4 { + color=red + 9 [label="Enter function myRun" style="filled" fillcolor=red]; + subgraph cluster_5 { + color=blue + 10 [label="Enter block"]; + subgraph cluster_6 { + color=blue + 11 [label="Enter block"]; + 12 [label="Exit block"]; + } + 13 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 14 [label="Exit block"]; + } + 15 [label="Exit function myRun" style="filled" fillcolor=red]; + } 9 -> {10}; 10 -> {11}; 11 -> {12}; 12 -> {13}; - - subgraph cluster_6 { - color=red - 14 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_7 { - color=blue - 15 [label="Enter block"]; - 16 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 17 [label="Postponed enter to lambda"]; - subgraph cluster_8 { - color=blue - 18 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_9 { - color=blue - 19 [label="Enter block"]; - 20 [label="Const: Int(1)"]; - 21 [label="Assignment: R|/x|"]; - 22 [label="Exit block"]; - } - 23 [label="Exit function " style="filled" fillcolor=red]; - } - 24 [label="Postponed exit from lambda"]; - 25 [label="Function call: R|/inlineRun|(...)" style="filled" fillcolor=yellow]; - 26 [label="Access variable R|/x|"]; - 27 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 28 [label="Exit block"]; - } - 29 [label="Exit function test_1" style="filled" fillcolor=red]; - } + 13 -> {14}; 14 -> {15}; - 15 -> {16}; + + subgraph cluster_7 { + color=red + 16 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_8 { + color=blue + 17 [label="Enter block"]; + 18 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 19 [label="Postponed enter to lambda"]; + subgraph cluster_9 { + color=blue + 20 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_10 { + color=blue + 21 [label="Enter block"]; + 22 [label="Const: Int(1)"]; + 23 [label="Assignment: R|/x|"]; + 24 [label="Exit block"]; + } + 25 [label="Exit function " style="filled" fillcolor=red]; + } + 26 [label="Postponed exit from lambda"]; + 27 [label="Function call: R|/inlineRun|(...)" style="filled" fillcolor=yellow]; + 28 [label="Access variable R|/x|"]; + 29 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 30 [label="Exit block"]; + } + 31 [label="Exit function test_1" style="filled" fillcolor=red]; + } 16 -> {17}; - 17 -> {18 24 25}; - 17 -> {18} [style=dashed]; + 17 -> {18}; 18 -> {19}; - 19 -> {20}; + 19 -> {20 26 27}; + 19 -> {20} [style=dashed]; 20 -> {21}; 21 -> {22}; 22 -> {23}; @@ -93,42 +98,42 @@ digraph atMostOnce_kt { 26 -> {27}; 27 -> {28}; 28 -> {29}; - - subgraph cluster_10 { - color=red - 30 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_11 { - color=blue - 31 [label="Enter block"]; - 32 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 33 [label="Postponed enter to lambda"]; - subgraph cluster_12 { - color=blue - 34 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_13 { - color=blue - 35 [label="Enter block"]; - 36 [label="Const: Int(1)"]; - 37 [label="Assignment: R|/x|"]; - 38 [label="Exit block"]; - } - 39 [label="Exit function " style="filled" fillcolor=red]; - } - 40 [label="Postponed exit from lambda"]; - 41 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 42 [label="Access variable R|/x|"]; - 43 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 44 [label="Exit block"]; - } - 45 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 29 -> {30}; 30 -> {31}; - 31 -> {32}; + + subgraph cluster_11 { + color=red + 32 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_12 { + color=blue + 33 [label="Enter block"]; + 34 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 35 [label="Postponed enter to lambda"]; + subgraph cluster_13 { + color=blue + 36 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_14 { + color=blue + 37 [label="Enter block"]; + 38 [label="Const: Int(1)"]; + 39 [label="Assignment: R|/x|"]; + 40 [label="Exit block"]; + } + 41 [label="Exit function " style="filled" fillcolor=red]; + } + 42 [label="Postponed exit from lambda"]; + 43 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + 44 [label="Access variable R|/x|"]; + 45 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 46 [label="Exit block"]; + } + 47 [label="Exit function test_2" style="filled" fillcolor=red]; + } 32 -> {33}; - 33 -> {34 40 41}; - 33 -> {34} [style=dashed]; + 33 -> {34}; 34 -> {35}; - 35 -> {36}; + 35 -> {36 42 43}; + 35 -> {36} [style=dashed]; 36 -> {37}; 37 -> {38}; 38 -> {39}; @@ -138,5 +143,7 @@ digraph atMostOnce_kt { 42 -> {43}; 43 -> {44}; 44 -> {45}; + 45 -> {46}; + 46 -> {47}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/contractsUsage.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/contractsUsage.dot index f0d74bfd262..3fe8278e50f 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/contractsUsage.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/contractsUsage.dot @@ -5,148 +5,155 @@ digraph contractsUsage_kt { subgraph cluster_0 { color=red - 0 [label="Enter function bar" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter block"]; - subgraph cluster_2 { - color=blue - 2 [label="Enter block"]; - 3 [label="Exit block"]; - } - 4 [label="Access variable R|/x|"]; - 5 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 6 [label="Exit block"]; - } - 7 [label="Exit function bar" style="filled" fillcolor=red]; + 0 [label="Enter file contractsUsage.kt" style="filled" fillcolor=red]; + 1 [label="Exit file contractsUsage.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function bar" style="filled" fillcolor=red]; + subgraph cluster_2 { + color=blue + 3 [label="Enter block"]; + subgraph cluster_3 { + color=blue + 4 [label="Enter block"]; + 5 [label="Exit block"]; + } + 6 [label="Access variable R|/x|"]; + 7 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 8 [label="Exit block"]; + } + 9 [label="Exit function bar" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; 3 -> {4}; 4 -> {5}; 5 -> {6}; 6 -> {7}; + 7 -> {8}; + 8 -> {9}; - subgraph cluster_3 { + subgraph cluster_4 { color=red - 8 [label="Enter function baz" style="filled" fillcolor=red]; - subgraph cluster_4 { + 10 [label="Enter function baz" style="filled" fillcolor=red]; + subgraph cluster_5 { color=blue - 9 [label="Enter block"]; - subgraph cluster_5 { - color=blue - 10 [label="Enter block"]; - 11 [label="Exit block"]; - } + 11 [label="Enter block"]; subgraph cluster_6 { color=blue - 12 [label="Enter when"]; - subgraph cluster_7 { - color=blue - 13 [label="Enter when branch condition "]; - 14 [label="Const: Boolean(true)"]; - 15 [label="Exit when branch condition"]; - } - 16 [label="Synthetic else branch"]; - 17 [label="Enter when branch result"]; + 12 [label="Enter block"]; + 13 [label="Exit block"]; + } + subgraph cluster_7 { + color=blue + 14 [label="Enter when"]; subgraph cluster_8 { color=blue - 18 [label="Enter block"]; - 19 [label="Access variable this@R|/baz|"]; - 20 [label="Function call: this@R|/baz|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 21 [label="Exit block"]; + 15 [label="Enter when branch condition "]; + 16 [label="Const: Boolean(true)"]; + 17 [label="Exit when branch condition"]; } - 22 [label="Exit when branch result"]; - 23 [label="Exit when"]; + 18 [label="Synthetic else branch"]; + 19 [label="Enter when branch result"]; + subgraph cluster_9 { + color=blue + 20 [label="Enter block"]; + 21 [label="Access variable this@R|/baz|"]; + 22 [label="Function call: this@R|/baz|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 23 [label="Exit block"]; + } + 24 [label="Exit when branch result"]; + 25 [label="Exit when"]; } - 24 [label="Exit block"]; + 26 [label="Exit block"]; } - 25 [label="Exit function baz" style="filled" fillcolor=red]; + 27 [label="Exit function baz" style="filled" fillcolor=red]; } - 8 -> {9}; - 9 -> {10}; 10 -> {11}; 11 -> {12}; 12 -> {13}; 13 -> {14}; 14 -> {15}; - 15 -> {16 17}; - 16 -> {23}; - 17 -> {18}; - 18 -> {19}; + 15 -> {16}; + 16 -> {17}; + 17 -> {18 19}; + 18 -> {25}; 19 -> {20}; 20 -> {21}; 21 -> {22}; 22 -> {23}; 23 -> {24}; 24 -> {25}; + 25 -> {26}; + 26 -> {27}; - subgraph cluster_9 { + subgraph cluster_10 { color=red - 26 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_10 { + 28 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_11 { color=blue - 27 [label="Enter block"]; - subgraph cluster_11 { - color=blue - 28 [label="Enter block"]; - 29 [label="Exit block"]; - } + 29 [label="Enter block"]; subgraph cluster_12 { color=blue - 30 [label="Enter when"]; - subgraph cluster_13 { - color=blue - 31 [label="Enter when branch condition "]; - 32 [label="Const: Boolean(true)"]; - 33 [label="Exit when branch condition"]; - } - 34 [label="Synthetic else branch"]; - 35 [label="Enter when branch result"]; + 30 [label="Enter block"]; + 31 [label="Exit block"]; + } + subgraph cluster_13 { + color=blue + 32 [label="Enter when"]; subgraph cluster_14 { color=blue - 36 [label="Enter block"]; - 37 [label="Access variable R|/x|"]; - 38 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 39 [label="Access variable R|/y|"]; - 40 [label="Function call: R|/y|.R|/baz|()" style="filled" fillcolor=yellow]; - 41 [label="Jump: ^foo Unit"]; - 42 [label="Stub" style="filled" fillcolor=gray]; - 43 [label="Exit block" style="filled" fillcolor=gray]; + 33 [label="Enter when branch condition "]; + 34 [label="Const: Boolean(true)"]; + 35 [label="Exit when branch condition"]; } - 44 [label="Exit when branch result" style="filled" fillcolor=gray]; - 45 [label="Exit when"]; + 36 [label="Synthetic else branch"]; + 37 [label="Enter when branch result"]; + subgraph cluster_15 { + color=blue + 38 [label="Enter block"]; + 39 [label="Access variable R|/x|"]; + 40 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 41 [label="Access variable R|/y|"]; + 42 [label="Function call: R|/y|.R|/baz|()" style="filled" fillcolor=yellow]; + 43 [label="Jump: ^foo Unit"]; + 44 [label="Stub" style="filled" fillcolor=gray]; + 45 [label="Exit block" style="filled" fillcolor=gray]; + } + 46 [label="Exit when branch result" style="filled" fillcolor=gray]; + 47 [label="Exit when"]; } - 46 [label="Access variable R|/x|"]; - 47 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; - 48 [label="Exit block"]; + 48 [label="Access variable R|/x|"]; + 49 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; + 50 [label="Exit block"]; } - 49 [label="Exit function foo" style="filled" fillcolor=red]; + 51 [label="Exit function foo" style="filled" fillcolor=red]; } - 26 -> {27}; - 27 -> {28}; 28 -> {29}; 29 -> {30}; 30 -> {31}; 31 -> {32}; 32 -> {33}; - 33 -> {34 35}; - 34 -> {45}; - 35 -> {36}; - 36 -> {37}; + 33 -> {34}; + 34 -> {35}; + 35 -> {36 37}; + 36 -> {47}; 37 -> {38}; 38 -> {39}; 39 -> {40}; 40 -> {41}; - 41 -> {49}; - 41 -> {42} [style=dotted]; - 42 -> {43} [style=dotted]; + 41 -> {42}; + 42 -> {43}; + 43 -> {51}; 43 -> {44} [style=dotted]; 44 -> {45} [style=dotted]; - 45 -> {46}; - 46 -> {47}; + 45 -> {46} [style=dotted]; + 46 -> {47} [style=dotted]; 47 -> {48}; 48 -> {49}; + 49 -> {50}; + 50 -> {51}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/exactlyOnce.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/exactlyOnce.dot index 04646548112..f1f6e71eb55 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/exactlyOnce.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/exactlyOnce.dot @@ -5,86 +5,91 @@ digraph exactlyOnce_kt { subgraph cluster_0 { color=red - 0 [label="Enter function inlineRun" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter block"]; - subgraph cluster_2 { - color=blue - 2 [label="Enter block"]; - 3 [label="Exit block"]; - } - 4 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 5 [label="Exit block"]; - } - 6 [label="Exit function inlineRun" style="filled" fillcolor=red]; + 0 [label="Enter file exactlyOnce.kt" style="filled" fillcolor=red]; + 1 [label="Exit file exactlyOnce.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function inlineRun" style="filled" fillcolor=red]; + subgraph cluster_2 { + color=blue + 3 [label="Enter block"]; + subgraph cluster_3 { + color=blue + 4 [label="Enter block"]; + 5 [label="Exit block"]; + } + 6 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 7 [label="Exit block"]; + } + 8 [label="Exit function inlineRun" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; 3 -> {4}; 4 -> {5}; 5 -> {6}; - - subgraph cluster_3 { - color=red - 7 [label="Enter function myRun" style="filled" fillcolor=red]; - subgraph cluster_4 { - color=blue - 8 [label="Enter block"]; - subgraph cluster_5 { - color=blue - 9 [label="Enter block"]; - 10 [label="Exit block"]; - } - 11 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 12 [label="Exit block"]; - } - 13 [label="Exit function myRun" style="filled" fillcolor=red]; - } + 6 -> {7}; 7 -> {8}; - 8 -> {9}; + + subgraph cluster_4 { + color=red + 9 [label="Enter function myRun" style="filled" fillcolor=red]; + subgraph cluster_5 { + color=blue + 10 [label="Enter block"]; + subgraph cluster_6 { + color=blue + 11 [label="Enter block"]; + 12 [label="Exit block"]; + } + 13 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 14 [label="Exit block"]; + } + 15 [label="Exit function myRun" style="filled" fillcolor=red]; + } 9 -> {10}; 10 -> {11}; 11 -> {12}; 12 -> {13}; - - subgraph cluster_6 { - color=red - 14 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_7 { - color=blue - 15 [label="Enter block"]; - 16 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 17 [label="Postponed enter to lambda"]; - subgraph cluster_8 { - color=blue - 18 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_9 { - color=blue - 19 [label="Enter block"]; - 20 [label="Const: Int(1)"]; - 21 [label="Assignment: R|/x|"]; - 22 [label="Exit block"]; - } - 23 [label="Exit function " style="filled" fillcolor=red]; - } - 24 [label="Postponed exit from lambda"]; - 25 [label="Function call: R|/inlineRun|(...)" style="filled" fillcolor=yellow]; - 26 [label="Access variable R|/x|"]; - 27 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 28 [label="Exit block"]; - } - 29 [label="Exit function test_1" style="filled" fillcolor=red]; - } + 13 -> {14}; 14 -> {15}; - 15 -> {16}; + + subgraph cluster_7 { + color=red + 16 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_8 { + color=blue + 17 [label="Enter block"]; + 18 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 19 [label="Postponed enter to lambda"]; + subgraph cluster_9 { + color=blue + 20 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_10 { + color=blue + 21 [label="Enter block"]; + 22 [label="Const: Int(1)"]; + 23 [label="Assignment: R|/x|"]; + 24 [label="Exit block"]; + } + 25 [label="Exit function " style="filled" fillcolor=red]; + } + 26 [label="Postponed exit from lambda"]; + 27 [label="Function call: R|/inlineRun|(...)" style="filled" fillcolor=yellow]; + 28 [label="Access variable R|/x|"]; + 29 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 30 [label="Exit block"]; + } + 31 [label="Exit function test_1" style="filled" fillcolor=red]; + } 16 -> {17}; - 17 -> {18 25}; - 17 -> {24} [style=dotted]; - 17 -> {18} [style=dashed]; + 17 -> {18}; 18 -> {19}; - 19 -> {20}; + 19 -> {20 27}; + 19 -> {26} [style=dotted]; + 19 -> {20} [style=dashed]; 20 -> {21}; 21 -> {22}; 22 -> {23}; @@ -94,43 +99,43 @@ digraph exactlyOnce_kt { 26 -> {27}; 27 -> {28}; 28 -> {29}; - - subgraph cluster_10 { - color=red - 30 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_11 { - color=blue - 31 [label="Enter block"]; - 32 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 33 [label="Postponed enter to lambda"]; - subgraph cluster_12 { - color=blue - 34 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_13 { - color=blue - 35 [label="Enter block"]; - 36 [label="Const: Int(1)"]; - 37 [label="Assignment: R|/x|"]; - 38 [label="Exit block"]; - } - 39 [label="Exit function " style="filled" fillcolor=red]; - } - 40 [label="Postponed exit from lambda"]; - 41 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 42 [label="Access variable R|/x|"]; - 43 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 44 [label="Exit block"]; - } - 45 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 29 -> {30}; 30 -> {31}; - 31 -> {32}; + + subgraph cluster_11 { + color=red + 32 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_12 { + color=blue + 33 [label="Enter block"]; + 34 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 35 [label="Postponed enter to lambda"]; + subgraph cluster_13 { + color=blue + 36 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_14 { + color=blue + 37 [label="Enter block"]; + 38 [label="Const: Int(1)"]; + 39 [label="Assignment: R|/x|"]; + 40 [label="Exit block"]; + } + 41 [label="Exit function " style="filled" fillcolor=red]; + } + 42 [label="Postponed exit from lambda"]; + 43 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + 44 [label="Access variable R|/x|"]; + 45 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 46 [label="Exit block"]; + } + 47 [label="Exit function test_2" style="filled" fillcolor=red]; + } 32 -> {33}; - 33 -> {34 41}; - 33 -> {40} [style=dotted]; - 33 -> {34} [style=dashed]; + 33 -> {34}; 34 -> {35}; - 35 -> {36}; + 35 -> {36 43}; + 35 -> {42} [style=dotted]; + 35 -> {36} [style=dashed]; 36 -> {37}; 37 -> {38}; 38 -> {39}; @@ -140,5 +145,7 @@ digraph exactlyOnce_kt { 42 -> {43}; 43 -> {44}; 44 -> {45}; + 45 -> {46}; + 46 -> {47}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/flow.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/flow.dot index 666293fa5ea..95994cfba1d 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/flow.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/flow.dot @@ -5,257 +5,262 @@ digraph flow_kt { subgraph cluster_0 { color=red - 0 [label="Enter function bar" style="filled" fillcolor=red]; - subgraph cluster_1 { + 0 [label="Enter file flow.kt" style="filled" fillcolor=red]; + 1 [label="Exit file flow.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function bar" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 1 [label="Enter block"]; - subgraph cluster_2 { - color=blue - 2 [label="Enter block"]; - 3 [label="Exit block"]; - } + 3 [label="Enter block"]; subgraph cluster_3 { color=blue - 4 [label="Enter when"]; - subgraph cluster_4 { - color=blue - 5 [label="Enter when branch condition "]; - 6 [label="Const: Boolean(true)"]; - 7 [label="Exit when branch condition"]; - } - 8 [label="Synthetic else branch"]; - 9 [label="Enter when branch result"]; + 4 [label="Enter block"]; + 5 [label="Exit block"]; + } + subgraph cluster_4 { + color=blue + 6 [label="Enter when"]; subgraph cluster_5 { color=blue - 10 [label="Enter block"]; - 11 [label="Access variable R|/x|"]; - 12 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 13 [label="Jump: ^bar Unit"]; - 14 [label="Stub" style="filled" fillcolor=gray]; - 15 [label="Exit block" style="filled" fillcolor=gray]; + 7 [label="Enter when branch condition "]; + 8 [label="Const: Boolean(true)"]; + 9 [label="Exit when branch condition"]; } - 16 [label="Exit when branch result" style="filled" fillcolor=gray]; - 17 [label="Exit when"]; + 10 [label="Synthetic else branch"]; + 11 [label="Enter when branch result"]; + subgraph cluster_6 { + color=blue + 12 [label="Enter block"]; + 13 [label="Access variable R|/x|"]; + 14 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 15 [label="Jump: ^bar Unit"]; + 16 [label="Stub" style="filled" fillcolor=gray]; + 17 [label="Exit block" style="filled" fillcolor=gray]; + } + 18 [label="Exit when branch result" style="filled" fillcolor=gray]; + 19 [label="Exit when"]; } - 18 [label="Access variable R|/x|"]; - 19 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; - 20 [label="Exit block"]; + 20 [label="Access variable R|/x|"]; + 21 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; + 22 [label="Exit block"]; } - 21 [label="Exit function bar" style="filled" fillcolor=red]; + 23 [label="Exit function bar" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; 3 -> {4}; 4 -> {5}; 5 -> {6}; 6 -> {7}; - 7 -> {8 9}; - 8 -> {17}; - 9 -> {10}; - 10 -> {11}; + 7 -> {8}; + 8 -> {9}; + 9 -> {10 11}; + 10 -> {19}; 11 -> {12}; 12 -> {13}; - 13 -> {21}; - 13 -> {14} [style=dotted]; - 14 -> {15} [style=dotted]; + 13 -> {14}; + 14 -> {15}; + 15 -> {23}; 15 -> {16} [style=dotted]; 16 -> {17} [style=dotted]; - 17 -> {18}; - 18 -> {19}; + 17 -> {18} [style=dotted]; + 18 -> {19} [style=dotted]; 19 -> {20}; 20 -> {21}; + 21 -> {22}; + 22 -> {23}; - subgraph cluster_6 { + subgraph cluster_7 { color=red - 22 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_7 { + 24 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_8 { color=blue - 23 [label="Enter block"]; - subgraph cluster_8 { - color=blue - 24 [label="Enter block"]; - 25 [label="Exit block"]; - } + 25 [label="Enter block"]; subgraph cluster_9 { color=blue - 26 [label="Enter when"]; - subgraph cluster_10 { - color=blue - 27 [label="Enter when branch condition "]; - 28 [label="Const: Boolean(true)"]; - 29 [label="Exit when branch condition"]; - } + 26 [label="Enter block"]; + 27 [label="Exit block"]; + } + subgraph cluster_10 { + color=blue + 28 [label="Enter when"]; subgraph cluster_11 { color=blue - 30 [label="Enter when branch condition else"]; + 29 [label="Enter when branch condition "]; + 30 [label="Const: Boolean(true)"]; 31 [label="Exit when branch condition"]; } - 32 [label="Enter when branch result"]; subgraph cluster_12 { color=blue - 33 [label="Enter block"]; - subgraph cluster_13 { + 32 [label="Enter when branch condition else"]; + 33 [label="Exit when branch condition"]; + } + 34 [label="Enter when branch result"]; + subgraph cluster_13 { + color=blue + 35 [label="Enter block"]; + subgraph cluster_14 { color=blue - 34 [label="Enter when"]; - subgraph cluster_14 { - color=blue - 35 [label="Enter when branch condition "]; - 36 [label="Const: Boolean(false)"]; - 37 [label="Exit when branch condition"]; - } + 36 [label="Enter when"]; subgraph cluster_15 { color=blue - 38 [label="Enter when branch condition else"]; + 37 [label="Enter when branch condition "]; + 38 [label="Const: Boolean(false)"]; 39 [label="Exit when branch condition"]; } - 40 [label="Enter when branch result"]; subgraph cluster_16 { color=blue - 41 [label="Enter block"]; - 42 [label="Access variable R|/y|"]; - 43 [label="Function call: R|/y|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 44 [label="Access variable R|/z|"]; - 45 [label="Function call: R|/z|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 46 [label="Jump: ^foo Unit"]; - 47 [label="Stub" style="filled" fillcolor=gray]; - 48 [label="Exit block" style="filled" fillcolor=gray]; + 40 [label="Enter when branch condition else"]; + 41 [label="Exit when branch condition"]; } - 49 [label="Exit when branch result" style="filled" fillcolor=gray]; - 50 [label="Enter when branch result"]; + 42 [label="Enter when branch result"]; subgraph cluster_17 { color=blue - 51 [label="Enter block"]; - 52 [label="Access variable R|/y|"]; - 53 [label="Function call: R|/y|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 54 [label="Exit block"]; + 43 [label="Enter block"]; + 44 [label="Access variable R|/y|"]; + 45 [label="Function call: R|/y|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 46 [label="Access variable R|/z|"]; + 47 [label="Function call: R|/z|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 48 [label="Jump: ^foo Unit"]; + 49 [label="Stub" style="filled" fillcolor=gray]; + 50 [label="Exit block" style="filled" fillcolor=gray]; } - 55 [label="Exit when branch result"]; - 56 [label="Exit when"]; - } - 57 [label="Exit block"]; - } - 58 [label="Exit when branch result"]; - 59 [label="Enter when branch result"]; - subgraph cluster_18 { - color=blue - 60 [label="Enter block"]; - subgraph cluster_19 { - color=blue - 61 [label="Enter block"]; - 62 [label="Const: Int(0)"]; - 63 [label="Const: Int(0)"]; - 64 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...)" style="filled" fillcolor=yellow]; - 65 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...).R|kotlin/ranges/IntProgression.iterator|()" style="filled" fillcolor=yellow]; - 66 [label="Variable declaration: lval : R|kotlin/collections/IntIterator|"]; - subgraph cluster_20 { + 51 [label="Exit when branch result" style="filled" fillcolor=gray]; + 52 [label="Enter when branch result"]; + subgraph cluster_18 { color=blue - 67 [label="Enter while loop"]; - subgraph cluster_21 { - color=blue - 68 [label="Enter loop condition"]; - 69 [label="Access variable R|/|"]; - 70 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 71 [label="Exit loop condition"]; - } + 53 [label="Enter block"]; + 54 [label="Access variable R|/y|"]; + 55 [label="Function call: R|/y|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 56 [label="Exit block"]; + } + 57 [label="Exit when branch result"]; + 58 [label="Exit when"]; + } + 59 [label="Exit block"]; + } + 60 [label="Exit when branch result"]; + 61 [label="Enter when branch result"]; + subgraph cluster_19 { + color=blue + 62 [label="Enter block"]; + subgraph cluster_20 { + color=blue + 63 [label="Enter block"]; + 64 [label="Const: Int(0)"]; + 65 [label="Const: Int(0)"]; + 66 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...)" style="filled" fillcolor=yellow]; + 67 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...).R|kotlin/ranges/IntProgression.iterator|()" style="filled" fillcolor=yellow]; + 68 [label="Variable declaration: lval : R|kotlin/collections/IntIterator|"]; + subgraph cluster_21 { + color=blue + 69 [label="Enter while loop"]; subgraph cluster_22 { color=blue - 72 [label="Enter loop block"]; - subgraph cluster_23 { - color=blue - 73 [label="Enter block"]; - 74 [label="Access variable R|/|"]; - 75 [label="Function call: R|/|.R|kotlin/collections/IntIterator.next|()" style="filled" fillcolor=yellow]; - 76 [label="Variable declaration: lval i: R|kotlin/Int|"]; - subgraph cluster_24 { - color=blue - 77 [label="Enter block"]; - 78 [label="Access variable R|/x|"]; - 79 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 80 [label="Exit block"]; - } - 81 [label="Exit block"]; - } - 82 [label="Exit loop block"]; + 70 [label="Enter loop condition"]; + 71 [label="Access variable R|/|"]; + 72 [label="Function call: R|/|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 73 [label="Exit loop condition"]; } - 83 [label="Exit while loop"]; + subgraph cluster_23 { + color=blue + 74 [label="Enter loop block"]; + subgraph cluster_24 { + color=blue + 75 [label="Enter block"]; + 76 [label="Access variable R|/|"]; + 77 [label="Function call: R|/|.R|kotlin/collections/IntIterator.next|()" style="filled" fillcolor=yellow]; + 78 [label="Variable declaration: lval i: R|kotlin/Int|"]; + subgraph cluster_25 { + color=blue + 79 [label="Enter block"]; + 80 [label="Access variable R|/x|"]; + 81 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 82 [label="Exit block"]; + } + 83 [label="Exit block"]; + } + 84 [label="Exit loop block"]; + } + 85 [label="Exit while loop"]; } - 84 [label="Exit block"]; + 86 [label="Exit block"]; } - 85 [label="Access variable R|/y|"]; - 86 [label="Function call: R|/y|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 87 [label="Exit block"]; + 87 [label="Access variable R|/y|"]; + 88 [label="Function call: R|/y|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 89 [label="Exit block"]; } - 88 [label="Exit when branch result"]; - 89 [label="Exit when"]; + 90 [label="Exit when branch result"]; + 91 [label="Exit when"]; } - subgraph cluster_25 { + subgraph cluster_26 { color=blue - 90 [label="Enter do-while loop"]; - subgraph cluster_26 { + 92 [label="Enter do-while loop"]; + subgraph cluster_27 { color=blue - 91 [label="Enter loop block"]; - subgraph cluster_27 { + 93 [label="Enter loop block"]; + subgraph cluster_28 { color=blue - 92 [label="Enter block"]; - 93 [label="Access variable R|/z|"]; - 94 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; - 95 [label="Exit block"]; + 94 [label="Enter block"]; + 95 [label="Access variable R|/z|"]; + 96 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; + 97 [label="Exit block"]; } - 96 [label="Exit loop block"]; + 98 [label="Exit loop block"]; } - subgraph cluster_28 { + subgraph cluster_29 { color=blue - 97 [label="Enter loop condition"]; - 98 [label="Const: Boolean(true)"]; - 99 [label="Exit loop condition"]; + 99 [label="Enter loop condition"]; + 100 [label="Const: Boolean(true)"]; + 101 [label="Exit loop condition"]; } - 100 [label="Exit do-while loop" style="filled" fillcolor=gray]; + 102 [label="Exit do-while loop" style="filled" fillcolor=gray]; } - 101 [label="Exit block" style="filled" fillcolor=gray]; + 103 [label="Exit block" style="filled" fillcolor=gray]; } - 102 [label="Exit function foo" style="filled" fillcolor=red]; + 104 [label="Exit function foo" style="filled" fillcolor=red]; } - 22 -> {23}; - 23 -> {24}; 24 -> {25}; 25 -> {26}; 26 -> {27}; 27 -> {28}; 28 -> {29}; - 29 -> {30 59}; + 29 -> {30}; 30 -> {31}; - 31 -> {32}; + 31 -> {32 61}; 32 -> {33}; 33 -> {34}; 34 -> {35}; 35 -> {36}; 36 -> {37}; - 37 -> {38 50}; + 37 -> {38}; 38 -> {39}; - 39 -> {40}; + 39 -> {40 52}; 40 -> {41}; 41 -> {42}; 42 -> {43}; 43 -> {44}; 44 -> {45}; 45 -> {46}; - 46 -> {102}; - 46 -> {47} [style=dotted]; - 47 -> {48} [style=dotted]; + 46 -> {47}; + 47 -> {48}; + 48 -> {104}; 48 -> {49} [style=dotted]; - 49 -> {56} [style=dotted]; - 50 -> {51}; - 51 -> {52}; + 49 -> {50} [style=dotted]; + 50 -> {51} [style=dotted]; + 51 -> {58} [style=dotted]; 52 -> {53}; 53 -> {54}; 54 -> {55}; 55 -> {56}; 56 -> {57}; 57 -> {58}; - 58 -> {89}; + 58 -> {59}; 59 -> {60}; - 60 -> {61}; + 60 -> {91}; 61 -> {62}; 62 -> {63}; 63 -> {64}; @@ -266,9 +271,9 @@ digraph flow_kt { 68 -> {69}; 69 -> {70}; 70 -> {71}; - 71 -> {72 83}; + 71 -> {72}; 72 -> {73}; - 73 -> {74}; + 73 -> {74 85}; 74 -> {75}; 75 -> {76}; 76 -> {77}; @@ -277,9 +282,9 @@ digraph flow_kt { 79 -> {80}; 80 -> {81}; 81 -> {82}; - 82 -> {68} [color=green style=dashed]; + 82 -> {83}; 83 -> {84}; - 84 -> {85}; + 84 -> {70} [color=green style=dashed]; 85 -> {86}; 86 -> {87}; 87 -> {88}; @@ -294,9 +299,11 @@ digraph flow_kt { 96 -> {97}; 97 -> {98}; 98 -> {99}; - 99 -> {91} [color=green style=dashed]; - 99 -> {100} [style=dotted]; - 100 -> {101} [style=dotted]; + 99 -> {100}; + 100 -> {101}; + 101 -> {93} [color=green style=dashed]; 101 -> {102} [style=dotted]; + 102 -> {103} [style=dotted]; + 103 -> {104} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/inPlaceLambda.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/inPlaceLambda.dot index b7594edc10d..de5e52aed14 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/inPlaceLambda.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/inPlaceLambda.dot @@ -5,100 +5,107 @@ digraph inPlaceLambda_kt { subgraph cluster_0 { color=red - 0 [label="Enter function bar" style="filled" fillcolor=red]; - subgraph cluster_1 { + 0 [label="Enter file inPlaceLambda.kt" style="filled" fillcolor=red]; + 1 [label="Exit file inPlaceLambda.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function bar" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 1 [label="Enter block"]; - subgraph cluster_2 { - color=blue - 2 [label="Enter block"]; - 3 [label="Exit block"]; - } + 3 [label="Enter block"]; subgraph cluster_3 { color=blue - 4 [label="Enter when"]; - subgraph cluster_4 { - color=blue - 5 [label="Enter when branch condition "]; - 6 [label="Const: Boolean(true)"]; - 7 [label="Exit when branch condition"]; - } - 8 [label="Synthetic else branch"]; - 9 [label="Enter when branch result"]; + 4 [label="Enter block"]; + 5 [label="Exit block"]; + } + subgraph cluster_4 { + color=blue + 6 [label="Enter when"]; subgraph cluster_5 { color=blue - 10 [label="Enter block"]; - 11 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 12 [label="Exit block"]; + 7 [label="Enter when branch condition "]; + 8 [label="Const: Boolean(true)"]; + 9 [label="Exit when branch condition"]; } - 13 [label="Exit when branch result"]; - 14 [label="Exit when"]; + 10 [label="Synthetic else branch"]; + 11 [label="Enter when branch result"]; + subgraph cluster_6 { + color=blue + 12 [label="Enter block"]; + 13 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 14 [label="Exit block"]; + } + 15 [label="Exit when branch result"]; + 16 [label="Exit when"]; } - 15 [label="Exit block"]; + 17 [label="Exit block"]; } - 16 [label="Exit function bar" style="filled" fillcolor=red]; + 18 [label="Exit function bar" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; 3 -> {4}; 4 -> {5}; 5 -> {6}; 6 -> {7}; - 7 -> {8 9}; - 8 -> {14}; - 9 -> {10}; - 10 -> {11}; + 7 -> {8}; + 8 -> {9}; + 9 -> {10 11}; + 10 -> {16}; 11 -> {12}; 12 -> {13}; 13 -> {14}; 14 -> {15}; 15 -> {16}; + 16 -> {17}; + 17 -> {18}; - subgraph cluster_6 { + subgraph cluster_7 { color=red - 17 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_7 { + 19 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_8 { color=blue - 18 [label="Enter block"]; - subgraph cluster_8 { - color=blue - 19 [label="Enter block"]; - 20 [label="Exit block"]; - } - 21 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 22 [label="Postponed enter to lambda"]; + 20 [label="Enter block"]; subgraph cluster_9 { color=blue - 23 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_10 { - color=blue - 24 [label="Enter block"]; - 25 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 26 [label="Exit block"]; - } - 27 [label="Exit function " style="filled" fillcolor=red]; + 21 [label="Enter block"]; + 22 [label="Exit block"]; } - 28 [label="Postponed exit from lambda"]; - 29 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; - 30 [label="Exit block"]; + 23 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 24 [label="Postponed enter to lambda"]; + subgraph cluster_10 { + color=blue + 25 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_11 { + color=blue + 26 [label="Enter block"]; + 27 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 28 [label="Exit block"]; + } + 29 [label="Exit function " style="filled" fillcolor=red]; + } + 30 [label="Postponed exit from lambda"]; + 31 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; + 32 [label="Exit block"]; } - 31 [label="Exit function foo" style="filled" fillcolor=red]; + 33 [label="Exit function foo" style="filled" fillcolor=red]; } - 17 -> {18}; - 18 -> {19}; 19 -> {20}; 20 -> {21}; 21 -> {22}; - 22 -> {23 28 29}; - 22 -> {23} [style=dashed]; + 22 -> {23}; 23 -> {24}; - 24 -> {25}; + 24 -> {25 30 31}; + 24 -> {25} [style=dashed]; 25 -> {26}; 26 -> {27}; 27 -> {28}; 28 -> {29}; 29 -> {30}; 30 -> {31}; + 31 -> {32}; + 32 -> {33}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/simple.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/simple.dot index e9bb0735bbd..2a9fa3258e0 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/simple.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/simple.dot @@ -5,70 +5,75 @@ digraph simple_kt { subgraph cluster_0 { color=red - 0 [label="Enter function bar" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter block"]; - subgraph cluster_2 { - color=blue - 2 [label="Enter block"]; - 3 [label="Exit block"]; - } - 4 [label="Access variable R|/x|"]; - 5 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 6 [label="Exit block"]; - } - 7 [label="Exit function bar" style="filled" fillcolor=red]; + 0 [label="Enter file simple.kt" style="filled" fillcolor=red]; + 1 [label="Exit file simple.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function bar" style="filled" fillcolor=red]; + subgraph cluster_2 { + color=blue + 3 [label="Enter block"]; + subgraph cluster_3 { + color=blue + 4 [label="Enter block"]; + 5 [label="Exit block"]; + } + 6 [label="Access variable R|/x|"]; + 7 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 8 [label="Exit block"]; + } + 9 [label="Exit function bar" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; 3 -> {4}; 4 -> {5}; 5 -> {6}; 6 -> {7}; + 7 -> {8}; + 8 -> {9}; - subgraph cluster_3 { + subgraph cluster_4 { color=red - 8 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_4 { + 10 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_5 { color=blue - 9 [label="Enter block"]; - subgraph cluster_5 { - color=blue - 10 [label="Enter block"]; - 11 [label="Exit block"]; - } - 12 [label="Access variable R|/x|"]; - 13 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 11 [label="Enter block"]; subgraph cluster_6 { color=blue - 14 [label="Enter when"]; - subgraph cluster_7 { - color=blue - 15 [label="Enter when branch condition "]; - 16 [label="Const: Boolean(true)"]; - 17 [label="Exit when branch condition"]; - } - 18 [label="Synthetic else branch"]; - 19 [label="Enter when branch result"]; + 12 [label="Enter block"]; + 13 [label="Exit block"]; + } + 14 [label="Access variable R|/x|"]; + 15 [label="Function call: R|/x|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + subgraph cluster_7 { + color=blue + 16 [label="Enter when"]; subgraph cluster_8 { color=blue - 20 [label="Enter block"]; - 21 [label="Function call: R|/y|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 22 [label="Exit block"]; + 17 [label="Enter when branch condition "]; + 18 [label="Const: Boolean(true)"]; + 19 [label="Exit when branch condition"]; } - 23 [label="Exit when branch result"]; - 24 [label="Exit when"]; + 20 [label="Synthetic else branch"]; + 21 [label="Enter when branch result"]; + subgraph cluster_9 { + color=blue + 22 [label="Enter block"]; + 23 [label="Function call: R|/y|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 24 [label="Exit block"]; + } + 25 [label="Exit when branch result"]; + 26 [label="Exit when"]; } - 25 [label="Access variable R|/z|"]; - 26 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; - 27 [label="Exit block"]; + 27 [label="Access variable R|/z|"]; + 28 [label="Function call: R|/bar|(...)" style="filled" fillcolor=yellow]; + 29 [label="Exit block"]; } - 28 [label="Exit function foo" style="filled" fillcolor=red]; + 30 [label="Exit function foo" style="filled" fillcolor=red]; } - 8 -> {9}; - 9 -> {10}; 10 -> {11}; 11 -> {12}; 12 -> {13}; @@ -76,10 +81,10 @@ digraph simple_kt { 14 -> {15}; 15 -> {16}; 16 -> {17}; - 17 -> {18 19}; - 18 -> {24}; - 19 -> {20}; - 20 -> {21}; + 17 -> {18}; + 18 -> {19}; + 19 -> {20 21}; + 20 -> {26}; 21 -> {22}; 22 -> {23}; 23 -> {24}; @@ -87,5 +92,7 @@ digraph simple_kt { 25 -> {26}; 26 -> {27}; 27 -> {28}; + 28 -> {29}; + 29 -> {30}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/unknown.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/unknown.dot index 84ae97b65b1..7b2e63fa1a4 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/unknown.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/contracts/fromSource/good/callsInPlace/unknown.dot @@ -5,140 +5,147 @@ digraph unknown_kt { subgraph cluster_0 { color=red - 0 [label="Enter function inlineRun" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter block"]; - subgraph cluster_2 { - color=blue - 2 [label="Enter block"]; - 3 [label="Exit block"]; - } - 4 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 5 [label="Exit block"]; - } - 6 [label="Exit function inlineRun" style="filled" fillcolor=red]; + 0 [label="Enter file unknown.kt" style="filled" fillcolor=red]; + 1 [label="Exit file unknown.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function inlineRun" style="filled" fillcolor=red]; + subgraph cluster_2 { + color=blue + 3 [label="Enter block"]; + subgraph cluster_3 { + color=blue + 4 [label="Enter block"]; + 5 [label="Exit block"]; + } + 6 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 7 [label="Exit block"]; + } + 8 [label="Exit function inlineRun" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; 3 -> {4}; 4 -> {5}; 5 -> {6}; - - subgraph cluster_3 { - color=red - 7 [label="Enter function myRun" style="filled" fillcolor=red]; - subgraph cluster_4 { - color=blue - 8 [label="Enter block"]; - subgraph cluster_5 { - color=blue - 9 [label="Enter block"]; - 10 [label="Exit block"]; - } - 11 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 12 [label="Exit block"]; - } - 13 [label="Exit function myRun" style="filled" fillcolor=red]; - } + 6 -> {7}; 7 -> {8}; - 8 -> {9}; + + subgraph cluster_4 { + color=red + 9 [label="Enter function myRun" style="filled" fillcolor=red]; + subgraph cluster_5 { + color=blue + 10 [label="Enter block"]; + subgraph cluster_6 { + color=blue + 11 [label="Enter block"]; + 12 [label="Exit block"]; + } + 13 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 14 [label="Exit block"]; + } + 15 [label="Exit function myRun" style="filled" fillcolor=red]; + } 9 -> {10}; 10 -> {11}; 11 -> {12}; 12 -> {13}; - - subgraph cluster_6 { - color=red - 14 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_7 { - color=blue - 15 [label="Enter block"]; - 16 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 17 [label="Postponed enter to lambda"]; - subgraph cluster_8 { - color=blue - 18 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_9 { - color=blue - 19 [label="Enter block"]; - 20 [label="Const: Int(1)"]; - 21 [label="Assignment: R|/x|"]; - 22 [label="Exit block"]; - } - 23 [label="Exit function " style="filled" fillcolor=red]; - } - 24 [label="Postponed exit from lambda"]; - 25 [label="Function call: R|/inlineRun|(...)" style="filled" fillcolor=yellow]; - 26 [label="Access variable R|/x|"]; - 27 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 28 [label="Exit block"]; - } - 29 [label="Exit function test_1" style="filled" fillcolor=red]; - } + 13 -> {14}; 14 -> {15}; - 15 -> {16}; + + subgraph cluster_7 { + color=red + 16 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_8 { + color=blue + 17 [label="Enter block"]; + 18 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 19 [label="Postponed enter to lambda"]; + subgraph cluster_9 { + color=blue + 20 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_10 { + color=blue + 21 [label="Enter block"]; + 22 [label="Const: Int(1)"]; + 23 [label="Assignment: R|/x|"]; + 24 [label="Exit block"]; + } + 25 [label="Exit function " style="filled" fillcolor=red]; + } + 26 [label="Postponed exit from lambda"]; + 27 [label="Function call: R|/inlineRun|(...)" style="filled" fillcolor=yellow]; + 28 [label="Access variable R|/x|"]; + 29 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 30 [label="Exit block"]; + } + 31 [label="Exit function test_1" style="filled" fillcolor=red]; + } 16 -> {17}; - 17 -> {18 24 25}; - 17 -> {18} [style=dashed]; + 17 -> {18}; 18 -> {19}; - 19 -> {20}; + 19 -> {20 26 27}; + 19 -> {20} [style=dashed]; 20 -> {21}; 21 -> {22}; 22 -> {23}; 23 -> {24}; 24 -> {25}; - 24 -> {17} [color=green style=dashed]; 25 -> {26}; 26 -> {27}; + 26 -> {19} [color=green style=dashed]; 27 -> {28}; 28 -> {29}; - - subgraph cluster_10 { - color=red - 30 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_11 { - color=blue - 31 [label="Enter block"]; - 32 [label="Variable declaration: lval x: R|kotlin/Int|"]; - 33 [label="Postponed enter to lambda"]; - subgraph cluster_12 { - color=blue - 34 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_13 { - color=blue - 35 [label="Enter block"]; - 36 [label="Const: Int(1)"]; - 37 [label="Assignment: R|/x|"]; - 38 [label="Exit block"]; - } - 39 [label="Exit function " style="filled" fillcolor=red]; - } - 40 [label="Postponed exit from lambda"]; - 41 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 42 [label="Access variable R|/x|"]; - 43 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; - 44 [label="Exit block"]; - } - 45 [label="Exit function test_2" style="filled" fillcolor=red]; - } + 29 -> {30}; 30 -> {31}; - 31 -> {32}; + + subgraph cluster_11 { + color=red + 32 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_12 { + color=blue + 33 [label="Enter block"]; + 34 [label="Variable declaration: lval x: R|kotlin/Int|"]; + 35 [label="Postponed enter to lambda"]; + subgraph cluster_13 { + color=blue + 36 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_14 { + color=blue + 37 [label="Enter block"]; + 38 [label="Const: Int(1)"]; + 39 [label="Assignment: R|/x|"]; + 40 [label="Exit block"]; + } + 41 [label="Exit function " style="filled" fillcolor=red]; + } + 42 [label="Postponed exit from lambda"]; + 43 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + 44 [label="Access variable R|/x|"]; + 45 [label="Function call: R|/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow]; + 46 [label="Exit block"]; + } + 47 [label="Exit function test_2" style="filled" fillcolor=red]; + } 32 -> {33}; - 33 -> {34 40 41}; - 33 -> {34} [style=dashed]; + 33 -> {34}; 34 -> {35}; - 35 -> {36}; + 35 -> {36 42 43}; + 35 -> {36} [style=dashed]; 36 -> {37}; 37 -> {38}; 38 -> {39}; 39 -> {40}; 40 -> {41}; - 40 -> {33} [color=green style=dashed]; 41 -> {42}; 42 -> {43}; + 42 -> {35} [color=green style=dashed]; 43 -> {44}; 44 -> {45}; + 45 -> {46}; + 46 -> {47}; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/delegateWithAnonymousObject.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/delegateWithAnonymousObject.dot index 59ef9dfdbf5..e9fbb1152e8 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/delegateWithAnonymousObject.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/delegates/delegateWithAnonymousObject.dot @@ -5,245 +5,252 @@ digraph delegateWithAnonymousObject_kt { subgraph cluster_0 { color=red - 0 [label="Enter class DelegateProvider" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter function " style="filled" fillcolor=red]; - 2 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 3 [label="Exit function " style="filled" fillcolor=red]; - } - 4 [label="Exit class DelegateProvider" style="filled" fillcolor=red]; + 0 [label="Enter file delegateWithAnonymousObject.kt" style="filled" fillcolor=red]; + 1 [label="Exit file delegateWithAnonymousObject.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; - 0 -> {4} [style=dotted]; - 0 -> {1} [style=dashed]; - 1 -> {2}; - 2 -> {3}; - 3 -> {4} [color=green]; - subgraph cluster_2 { + subgraph cluster_1 { color=red - 5 [label="Enter function delegate" style="filled" fillcolor=red]; - subgraph cluster_3 { + 2 [label="Enter class DelegateProvider" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 6 [label="Enter block"]; - 7 [label="Const: Null(null)"]; - 8 [label="Check not null: Null(null)!!" style="filled" fillcolor=yellow]; - 9 [label="Stub" style="filled" fillcolor=gray]; - 10 [label="Jump: ^delegate Null(null)!!" style="filled" fillcolor=gray]; + 3 [label="Enter function " style="filled" fillcolor=red]; + 4 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 5 [label="Exit function " style="filled" fillcolor=red]; + } + 6 [label="Exit class DelegateProvider" style="filled" fillcolor=red]; + } + 2 -> {3} [color=green]; + 2 -> {6} [style=dotted]; + 2 -> {3} [style=dashed]; + 3 -> {4}; + 4 -> {5}; + 5 -> {6} [color=green]; + + subgraph cluster_3 { + color=red + 7 [label="Enter function delegate" style="filled" fillcolor=red]; + subgraph cluster_4 { + color=blue + 8 [label="Enter block"]; + 9 [label="Const: Null(null)"]; + 10 [label="Check not null: Null(null)!!" style="filled" fillcolor=yellow]; 11 [label="Stub" style="filled" fillcolor=gray]; - 12 [label="Exit block" style="filled" fillcolor=gray]; + 12 [label="Jump: ^delegate Null(null)!!" style="filled" fillcolor=gray]; + 13 [label="Stub" style="filled" fillcolor=gray]; + 14 [label="Exit block" style="filled" fillcolor=gray]; } - 13 [label="Exit function delegate" style="filled" fillcolor=gray]; + 15 [label="Exit function delegate" style="filled" fillcolor=gray]; } - 5 -> {6}; - 6 -> {7}; 7 -> {8}; - 8 -> {9} [style=dotted]; - 9 -> {10} [style=dotted]; - 10 -> {11 13} [style=dotted]; + 8 -> {9}; + 9 -> {10}; + 10 -> {11} [style=dotted]; 11 -> {12} [style=dotted]; - 12 -> {13} [style=dotted]; + 12 -> {13 15} [style=dotted]; + 13 -> {14} [style=dotted]; + 14 -> {15} [style=dotted]; - subgraph cluster_4 { + subgraph cluster_5 { color=red - 14 [label="Enter class IssueListView" style="filled" fillcolor=red]; - subgraph cluster_5 { + 16 [label="Enter class IssueListView" style="filled" fillcolor=red]; + subgraph cluster_6 { color=blue - 15 [label="Enter function " style="filled" fillcolor=red]; - 16 [label="Delegated constructor call: super|>()" style="filled" fillcolor=yellow]; - 17 [label="Exit function " style="filled" fillcolor=red]; + 17 [label="Enter function " style="filled" fillcolor=red]; + 18 [label="Delegated constructor call: super|>()" style="filled" fillcolor=yellow]; + 19 [label="Exit function " style="filled" fillcolor=red]; } - 18 [label="Exit class IssueListView" style="filled" fillcolor=red]; + 20 [label="Exit class IssueListView" style="filled" fillcolor=red]; } - 14 -> {15} [color=green]; - 14 -> {18} [style=dotted]; - 14 -> {15} [style=dashed]; - 15 -> {16}; - 16 -> {17}; - 17 -> {18} [color=green]; + 16 -> {17} [color=green]; + 16 -> {20} [style=dotted]; + 16 -> {17} [style=dashed]; + 17 -> {18}; + 18 -> {19}; + 19 -> {20} [color=green]; - subgraph cluster_6 { + subgraph cluster_7 { color=red - 19 [label="Enter function updateFrom" style="filled" fillcolor=red]; - subgraph cluster_7 { + 21 [label="Enter function updateFrom" style="filled" fillcolor=red]; + subgraph cluster_8 { color=blue - 20 [label="Enter block"]; - 21 [label="Exit block"]; + 22 [label="Enter block"]; + 23 [label="Exit block"]; } - 22 [label="Exit function updateFrom" style="filled" fillcolor=red]; + 24 [label="Exit function updateFrom" style="filled" fillcolor=red]; } - 19 -> {20}; - 20 -> {21}; 21 -> {22}; + 22 -> {23}; + 23 -> {24}; - subgraph cluster_8 { + subgraph cluster_9 { color=red - 23 [label="Enter class IssuesListUserProfile" style="filled" fillcolor=red]; - subgraph cluster_9 { + 25 [label="Enter class IssuesListUserProfile" style="filled" fillcolor=red]; + subgraph cluster_10 { color=blue - 24 [label="Enter property" style="filled" fillcolor=red]; - 25 [label="Postponed enter to lambda"]; - subgraph cluster_10 { + 26 [label="Enter property" style="filled" fillcolor=red]; + 27 [label="Postponed enter to lambda"]; + subgraph cluster_11 { color=blue - 26 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_11 { + 28 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_12 { color=blue - 27 [label="Enter block"]; - 28 [label="Enter anonymous object"]; - subgraph cluster_12 { + 29 [label="Enter block"]; + 30 [label="Enter anonymous object"]; + subgraph cluster_13 { color=blue - 29 [label="Enter class " style="filled" fillcolor=red]; - subgraph cluster_13 { + 31 [label="Enter class " style="filled" fillcolor=red]; + subgraph cluster_14 { color=blue - 30 [label="Enter function " style="filled" fillcolor=red]; - 31 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 32 [label="Exit function " style="filled" fillcolor=red]; + 32 [label="Enter function " style="filled" fillcolor=red]; + 33 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 34 [label="Exit function " style="filled" fillcolor=red]; } - 33 [label="Exit class " style="filled" fillcolor=red]; + 35 [label="Exit class " style="filled" fillcolor=red]; } - 34 [label="Exit anonymous object expression"]; - 35 [label="Exit block"]; + 36 [label="Exit anonymous object expression"]; + 37 [label="Exit block"]; } - 36 [label="Exit function " style="filled" fillcolor=red]; + 38 [label="Exit function " style="filled" fillcolor=red]; } - subgraph cluster_14 { + subgraph cluster_15 { color=blue - 37 [label="Enter function setValue" style="filled" fillcolor=red]; - subgraph cluster_15 { + 39 [label="Enter function setValue" style="filled" fillcolor=red]; + subgraph cluster_16 { color=blue - 38 [label="Enter block"]; - 39 [label="Function call: R|/IssueListView.IssueListView|()" style="filled" fillcolor=yellow]; - 40 [label="Access variable R|/value|"]; - 41 [label="Function call: R|/IssueListView.IssueListView|().R|/IssueListView.updateFrom|(...)" style="filled" fillcolor=yellow]; - 42 [label="Jump: ^setValue R|/IssueListView.IssueListView|().R|/IssueListView.updateFrom|(R|/value|)"]; - 43 [label="Stub" style="filled" fillcolor=gray]; - 44 [label="Exit block" style="filled" fillcolor=gray]; + 40 [label="Enter block"]; + 41 [label="Function call: R|/IssueListView.IssueListView|()" style="filled" fillcolor=yellow]; + 42 [label="Access variable R|/value|"]; + 43 [label="Function call: R|/IssueListView.IssueListView|().R|/IssueListView.updateFrom|(...)" style="filled" fillcolor=yellow]; + 44 [label="Jump: ^setValue R|/IssueListView.IssueListView|().R|/IssueListView.updateFrom|(R|/value|)"]; + 45 [label="Stub" style="filled" fillcolor=gray]; + 46 [label="Exit block" style="filled" fillcolor=gray]; } - 45 [label="Exit function setValue" style="filled" fillcolor=red]; + 47 [label="Exit function setValue" style="filled" fillcolor=red]; } - subgraph cluster_16 { + subgraph cluster_17 { color=blue - 46 [label="Enter function getValue" style="filled" fillcolor=red]; - subgraph cluster_17 { + 48 [label="Enter function getValue" style="filled" fillcolor=red]; + subgraph cluster_18 { color=blue - 47 [label="Enter block"]; - 48 [label="Function call: R|/IssueListView.IssueListView|()" style="filled" fillcolor=yellow]; - 49 [label="Jump: ^getValue R|/IssueListView.IssueListView|()"]; - 50 [label="Stub" style="filled" fillcolor=gray]; - 51 [label="Exit block" style="filled" fillcolor=gray]; + 49 [label="Enter block"]; + 50 [label="Function call: R|/IssueListView.IssueListView|()" style="filled" fillcolor=yellow]; + 51 [label="Jump: ^getValue R|/IssueListView.IssueListView|()"]; + 52 [label="Stub" style="filled" fillcolor=gray]; + 53 [label="Exit block" style="filled" fillcolor=gray]; } - 52 [label="Exit function getValue" style="filled" fillcolor=red]; + 54 [label="Exit function getValue" style="filled" fillcolor=red]; } - 53 [label="Postponed exit from lambda"]; - 54 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|(...)" style="filled" fillcolor=yellow]; - 55 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|(...).#(...)" style="filled" fillcolor=yellow]; - 56 [label="Exit property delegate" style="filled" fillcolor=yellow]; - 57 [label="Exit property" style="filled" fillcolor=red]; + 55 [label="Postponed exit from lambda"]; + 56 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|(...)" style="filled" fillcolor=yellow]; + 57 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|(...).#(...)" style="filled" fillcolor=yellow]; + 58 [label="Exit property delegate" style="filled" fillcolor=yellow]; + 59 [label="Exit property" style="filled" fillcolor=red]; } - subgraph cluster_18 { + subgraph cluster_19 { color=blue - 58 [label="Enter function " style="filled" fillcolor=red]; - 59 [label="Delegated constructor call: super|>()" style="filled" fillcolor=yellow]; - 60 [label="Exit function " style="filled" fillcolor=red]; + 60 [label="Enter function " style="filled" fillcolor=red]; + 61 [label="Delegated constructor call: super|>()" style="filled" fillcolor=yellow]; + 62 [label="Exit function " style="filled" fillcolor=red]; } - 61 [label="Exit class IssuesListUserProfile" style="filled" fillcolor=red]; + 63 [label="Exit class IssuesListUserProfile" style="filled" fillcolor=red]; } - 23 -> {24} [color=green]; - 23 -> {61} [style=dotted]; - 23 -> {24 58} [style=dashed]; - 24 -> {25}; - 25 -> {26 53 54}; - 25 -> {26} [style=dashed]; + 25 -> {26} [color=green]; + 25 -> {63} [style=dotted]; + 25 -> {26 60} [style=dashed]; 26 -> {27}; - 27 -> {28}; + 27 -> {28 55 56}; + 27 -> {28} [style=dashed]; 28 -> {29}; - 28 -> {34} [style=dotted]; - 28 -> {29} [style=dashed]; 29 -> {30}; - 29 -> {37 46} [color=red]; - 29 -> {33} [style=dotted]; - 29 -> {30} [style=dashed]; 30 -> {31}; + 30 -> {36} [style=dotted]; + 30 -> {31} [style=dashed]; 31 -> {32}; + 31 -> {39 48} [color=red]; + 31 -> {35} [style=dotted]; + 31 -> {32} [style=dashed]; 32 -> {33}; 33 -> {34}; - 33 -> {37 46} [color=green]; - 33 -> {37 46} [style=dashed]; 34 -> {35}; 35 -> {36}; + 35 -> {39 48} [color=green]; + 35 -> {39 48} [style=dashed]; + 36 -> {37}; 37 -> {38}; - 38 -> {39}; 39 -> {40}; 40 -> {41}; 41 -> {42}; - 42 -> {45}; - 42 -> {43} [style=dotted]; - 43 -> {44} [style=dotted]; + 42 -> {43}; + 43 -> {44}; + 44 -> {47}; 44 -> {45} [style=dotted]; - 46 -> {47}; - 47 -> {48}; + 45 -> {46} [style=dotted]; + 46 -> {47} [style=dotted]; 48 -> {49}; - 49 -> {52}; - 49 -> {50} [style=dotted]; - 50 -> {51} [style=dotted]; + 49 -> {50}; + 50 -> {51}; + 51 -> {54}; 51 -> {52} [style=dotted]; - 53 -> {54} [color=green]; - 53 -> {56} [color=red]; - 54 -> {55}; - 55 -> {56}; + 52 -> {53} [style=dotted]; + 53 -> {54} [style=dotted]; + 55 -> {56} [color=green]; + 55 -> {58} [color=red]; 56 -> {57}; - 57 -> {58} [color=green]; + 57 -> {58}; 58 -> {59}; - 59 -> {60}; - 60 -> {61} [color=green]; + 59 -> {60} [color=green]; + 60 -> {61}; + 61 -> {62}; + 62 -> {63} [color=green]; - subgraph cluster_19 { + subgraph cluster_20 { color=red - 62 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_20 { + 64 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_21 { color=blue - 63 [label="Enter block"]; - 64 [label="Access variable D|/IssuesListUserProfile.issueListView|"]; - 65 [label="Function call: this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; - 66 [label="Jump: ^ this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride|(this@R|/IssuesListUserProfile|, ::R|/IssuesListUserProfile.issueListView|)"]; - 67 [label="Stub" style="filled" fillcolor=gray]; - 68 [label="Exit block" style="filled" fillcolor=gray]; + 65 [label="Enter block"]; + 66 [label="Access variable D|/IssuesListUserProfile.issueListView|"]; + 67 [label="Function call: this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; + 68 [label="Jump: ^ this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride|(this@R|/IssuesListUserProfile|, ::R|/IssuesListUserProfile.issueListView|)"]; + 69 [label="Stub" style="filled" fillcolor=gray]; + 70 [label="Exit block" style="filled" fillcolor=gray]; } - 69 [label="Exit function " style="filled" fillcolor=red]; + 71 [label="Exit function " style="filled" fillcolor=red]; } - 62 -> {63}; - 63 -> {64}; 64 -> {65}; 65 -> {66}; - 66 -> {69}; - 66 -> {67} [style=dotted]; - 67 -> {68} [style=dotted]; + 66 -> {67}; + 67 -> {68}; + 68 -> {71}; 68 -> {69} [style=dotted]; + 69 -> {70} [style=dotted]; + 70 -> {71} [style=dotted]; - subgraph cluster_21 { + subgraph cluster_22 { color=red - 70 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_22 { + 72 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_23 { color=blue - 71 [label="Enter block"]; - 72 [label="Access variable D|/IssuesListUserProfile.issueListView|"]; - 73 [label="Access variable R|/issueListView|"]; - 74 [label="Function call: this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; - 75 [label="Jump: ^ this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride|(this@R|/IssuesListUserProfile|, ::R|/IssuesListUserProfile.issueListView|, R|/issueListView|)"]; - 76 [label="Stub" style="filled" fillcolor=gray]; - 77 [label="Exit block" style="filled" fillcolor=gray]; + 73 [label="Enter block"]; + 74 [label="Access variable D|/IssuesListUserProfile.issueListView|"]; + 75 [label="Access variable R|/issueListView|"]; + 76 [label="Function call: this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; + 77 [label="Jump: ^ this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride|(this@R|/IssuesListUserProfile|, ::R|/IssuesListUserProfile.issueListView|, R|/issueListView|)"]; + 78 [label="Stub" style="filled" fillcolor=gray]; + 79 [label="Exit block" style="filled" fillcolor=gray]; } - 78 [label="Exit function " style="filled" fillcolor=red]; + 80 [label="Exit function " style="filled" fillcolor=red]; } - 70 -> {71}; - 71 -> {72}; 72 -> {73}; 73 -> {74}; 74 -> {75}; - 75 -> {78}; - 75 -> {76} [style=dotted]; - 76 -> {77} [style=dotted]; + 75 -> {76}; + 76 -> {77}; + 77 -> {80}; 77 -> {78} [style=dotted]; + 78 -> {79} [style=dotted]; + 79 -> {80} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/plusAssignWithLambdaInRhs.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/plusAssignWithLambdaInRhs.dot index 00b06f406f3..2f40f2054f0 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/plusAssignWithLambdaInRhs.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/plusAssignWithLambdaInRhs.dot @@ -5,150 +5,157 @@ digraph plusAssignWithLambdaInRhs_kt { subgraph cluster_0 { color=red - 0 [label="Enter function test" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter block"]; - 2 [label="Const: Null(null)"]; - 3 [label="Check not null: Null(null)!!" style="filled" fillcolor=yellow]; - 4 [label="Stub" style="filled" fillcolor=gray]; - 5 [label="Variable declaration: lval list: R|kotlin/collections/MutableList>|" style="filled" fillcolor=gray]; - 6 [label="Access variable R|/list|" style="filled" fillcolor=gray]; - 7 [label="Postponed enter to lambda" style="filled" fillcolor=gray]; - subgraph cluster_2 { - color=blue - 8 [label="Enter function " style="filled" fillcolor=gray]; - subgraph cluster_3 { - color=blue - 9 [label="Enter block" style="filled" fillcolor=gray]; - 10 [label="Access variable R|/it|" style="filled" fillcolor=gray]; - 11 [label="Exit block" style="filled" fillcolor=gray]; - } - 12 [label="Exit function " style="filled" fillcolor=gray]; - } - 13 [label="Postponed exit from lambda" style="filled" fillcolor=gray]; - 14 [label="Function call: R|/list|.R|kotlin/collections/plusAssign| kotlin/String|>(...)" style="filled" fillcolor=gray]; - 15 [label="Exit block" style="filled" fillcolor=gray]; - } - 16 [label="Exit function test" style="filled" fillcolor=gray]; + 0 [label="Enter file plusAssignWithLambdaInRhs.kt" style="filled" fillcolor=red]; + 1 [label="Exit file plusAssignWithLambdaInRhs.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function test" style="filled" fillcolor=red]; + subgraph cluster_2 { + color=blue + 3 [label="Enter block"]; + 4 [label="Const: Null(null)"]; + 5 [label="Check not null: Null(null)!!" style="filled" fillcolor=yellow]; + 6 [label="Stub" style="filled" fillcolor=gray]; + 7 [label="Variable declaration: lval list: R|kotlin/collections/MutableList>|" style="filled" fillcolor=gray]; + 8 [label="Access variable R|/list|" style="filled" fillcolor=gray]; + 9 [label="Postponed enter to lambda" style="filled" fillcolor=gray]; + subgraph cluster_3 { + color=blue + 10 [label="Enter function " style="filled" fillcolor=gray]; + subgraph cluster_4 { + color=blue + 11 [label="Enter block" style="filled" fillcolor=gray]; + 12 [label="Access variable R|/it|" style="filled" fillcolor=gray]; + 13 [label="Exit block" style="filled" fillcolor=gray]; + } + 14 [label="Exit function " style="filled" fillcolor=gray]; + } + 15 [label="Postponed exit from lambda" style="filled" fillcolor=gray]; + 16 [label="Function call: R|/list|.R|kotlin/collections/plusAssign| kotlin/String|>(...)" style="filled" fillcolor=gray]; + 17 [label="Exit block" style="filled" fillcolor=gray]; + } + 18 [label="Exit function test" style="filled" fillcolor=gray]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; - 3 -> {4} [style=dotted]; - 4 -> {5} [style=dotted]; + 3 -> {4}; + 4 -> {5}; 5 -> {6} [style=dotted]; 6 -> {7} [style=dotted]; - 7 -> {8 13 14} [style=dotted]; - 7 -> {8} [style=dashed]; + 7 -> {8} [style=dotted]; 8 -> {9} [style=dotted]; - 9 -> {10} [style=dotted]; + 9 -> {10 15 16} [style=dotted]; + 9 -> {10} [style=dashed]; 10 -> {11} [style=dotted]; 11 -> {12} [style=dotted]; + 12 -> {13} [style=dotted]; 13 -> {14} [style=dotted]; - 14 -> {15} [style=dotted]; 15 -> {16} [style=dotted]; + 16 -> {17} [style=dotted]; + 17 -> {18} [style=dotted]; - subgraph cluster_4 { + subgraph cluster_5 { color=red - 17 [label="Enter class A" style="filled" fillcolor=red]; - subgraph cluster_5 { - color=blue - 18 [label="Enter property" style="filled" fillcolor=red]; - 19 [label="Access variable R|/executor|"]; - 20 [label="Exit property" style="filled" fillcolor=red]; - } + 19 [label="Enter class A" style="filled" fillcolor=red]; subgraph cluster_6 { color=blue - 21 [label="Enter function " style="filled" fillcolor=red]; - 22 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - 23 [label="Exit function " style="filled" fillcolor=red]; + 20 [label="Enter property" style="filled" fillcolor=red]; + 21 [label="Access variable R|/executor|"]; + 22 [label="Exit property" style="filled" fillcolor=red]; } - 24 [label="Exit class A" style="filled" fillcolor=red]; - } - 17 -> {18} [color=green]; - 17 -> {24} [style=dotted]; - 17 -> {18 21} [style=dashed]; - 18 -> {19}; - 19 -> {20}; - 20 -> {21} [color=green]; - 21 -> {22}; - 22 -> {23}; - 23 -> {24} [color=green]; - - subgraph cluster_7 { - color=red - 25 [label="Enter function postpone" style="filled" fillcolor=red]; - subgraph cluster_8 { + subgraph cluster_7 { color=blue - 26 [label="Enter block"]; - 27 [label="Function call: R|kotlin/collections/mutableListOf| kotlin/Unit|>()" style="filled" fillcolor=yellow]; - 28 [label="Variable declaration: lval queue: R|kotlin/collections/MutableList>|"]; - 29 [label="Postponed enter to lambda"]; - subgraph cluster_9 { + 23 [label="Enter function " style="filled" fillcolor=red]; + 24 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + 25 [label="Exit function " style="filled" fillcolor=red]; + } + 26 [label="Exit class A" style="filled" fillcolor=red]; + } + 19 -> {20} [color=green]; + 19 -> {26} [style=dotted]; + 19 -> {20 23} [style=dashed]; + 20 -> {21}; + 21 -> {22}; + 22 -> {23} [color=green]; + 23 -> {24}; + 24 -> {25}; + 25 -> {26} [color=green]; + + subgraph cluster_8 { + color=red + 27 [label="Enter function postpone" style="filled" fillcolor=red]; + subgraph cluster_9 { + color=blue + 28 [label="Enter block"]; + 29 [label="Function call: R|kotlin/collections/mutableListOf| kotlin/Unit|>()" style="filled" fillcolor=yellow]; + 30 [label="Variable declaration: lval queue: R|kotlin/collections/MutableList>|"]; + 31 [label="Postponed enter to lambda"]; + subgraph cluster_10 { color=blue - 30 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_10 { + 32 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_11 { color=blue - 31 [label="Enter block"]; - 32 [label="Access variable R|/queue|"]; - 33 [label="Postponed enter to lambda"]; - subgraph cluster_11 { + 33 [label="Enter block"]; + 34 [label="Access variable R|/queue|"]; + 35 [label="Postponed enter to lambda"]; + subgraph cluster_12 { color=blue - 34 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_12 { + 36 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_13 { color=blue - 35 [label="Enter block"]; - 36 [label="Function call: R|/computation|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 37 [label="Function call: R|/resolve|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; - 38 [label="Exit block"]; + 37 [label="Enter block"]; + 38 [label="Function call: R|/computation|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 39 [label="Function call: R|/resolve|.R|SubstitutionOverride|(...)" style="filled" fillcolor=yellow]; + 40 [label="Exit block"]; } - 39 [label="Exit function " style="filled" fillcolor=red]; + 41 [label="Exit function " style="filled" fillcolor=red]; } - 40 [label="Postponed exit from lambda"]; - 41 [label="Function call: R|/queue|.R|kotlin/collections/plusAssign| kotlin/Unit|>(...)" style="filled" fillcolor=yellow]; - 42 [label="Exit block"]; + 42 [label="Postponed exit from lambda"]; + 43 [label="Function call: R|/queue|.R|kotlin/collections/plusAssign| kotlin/Unit|>(...)" style="filled" fillcolor=yellow]; + 44 [label="Exit block"]; } - 43 [label="Exit function " style="filled" fillcolor=red]; + 45 [label="Exit function " style="filled" fillcolor=red]; } - 44 [label="Postponed exit from lambda"]; - 45 [label="Function call: R|/A.A|(...)" style="filled" fillcolor=yellow]; - 46 [label="Jump: ^postpone R|/A.A|( = A@fun (resolve: R|(T) -> kotlin/Unit|): R|kotlin/Unit| { + 46 [label="Postponed exit from lambda"]; + 47 [label="Function call: R|/A.A|(...)" style="filled" fillcolor=yellow]; + 48 [label="Jump: ^postpone R|/A.A|( = A@fun (resolve: R|(T) -> kotlin/Unit|): R|kotlin/Unit| { R|/queue|.R|kotlin/collections/plusAssign| kotlin/Unit|>(fun (): R|kotlin/Unit| { R|/resolve|.R|SubstitutionOverride|(R|/computation|.R|SubstitutionOverride|()) } ) } )"]; - 47 [label="Stub" style="filled" fillcolor=gray]; - 48 [label="Exit block" style="filled" fillcolor=gray]; + 49 [label="Stub" style="filled" fillcolor=gray]; + 50 [label="Exit block" style="filled" fillcolor=gray]; } - 49 [label="Exit function postpone" style="filled" fillcolor=red]; + 51 [label="Exit function postpone" style="filled" fillcolor=red]; } - 25 -> {26}; - 26 -> {27}; 27 -> {28}; 28 -> {29}; - 29 -> {30 44 45}; - 29 -> {30} [style=dashed]; + 29 -> {30}; 30 -> {31}; - 31 -> {32}; + 31 -> {32 46 47}; + 31 -> {32} [style=dashed]; 32 -> {33}; - 33 -> {34 40 41}; - 33 -> {34} [style=dashed]; + 33 -> {34}; 34 -> {35}; - 35 -> {36}; + 35 -> {36 42 43}; + 35 -> {36} [style=dashed]; 36 -> {37}; 37 -> {38}; 38 -> {39}; + 39 -> {40}; 40 -> {41}; - 41 -> {42}; 42 -> {43}; + 43 -> {44}; 44 -> {45}; - 45 -> {46}; - 46 -> {49}; - 46 -> {47} [style=dotted]; - 47 -> {48} [style=dotted]; + 46 -> {47}; + 47 -> {48}; + 48 -> {51}; 48 -> {49} [style=dotted]; + 49 -> {50} [style=dotted]; + 50 -> {51} [style=dotted]; } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/smartcasts/tryWithLambdaInside.dot b/compiler/fir/analysis-tests/testData/resolveWithStdlib/smartcasts/tryWithLambdaInside.dot index c8be04c098b..859c1128993 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/smartcasts/tryWithLambdaInside.dot +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/smartcasts/tryWithLambdaInside.dot @@ -5,86 +5,93 @@ digraph tryWithLambdaInside_kt { subgraph cluster_0 { color=red - 0 [label="Enter function notInPlaceFilter" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter block"]; - 2 [label="Access variable this@R|/notInPlaceFilter|"]; - 3 [label="Jump: ^notInPlaceFilter this@R|/notInPlaceFilter|"]; - 4 [label="Stub" style="filled" fillcolor=gray]; - 5 [label="Exit block" style="filled" fillcolor=gray]; - } - 6 [label="Exit function notInPlaceFilter" style="filled" fillcolor=red]; + 0 [label="Enter file tryWithLambdaInside.kt" style="filled" fillcolor=red]; + 1 [label="Exit file tryWithLambdaInside.kt" style="filled" fillcolor=red]; + } + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter function notInPlaceFilter" style="filled" fillcolor=red]; + subgraph cluster_2 { + color=blue + 3 [label="Enter block"]; + 4 [label="Access variable this@R|/notInPlaceFilter|"]; + 5 [label="Jump: ^notInPlaceFilter this@R|/notInPlaceFilter|"]; + 6 [label="Stub" style="filled" fillcolor=gray]; + 7 [label="Exit block" style="filled" fillcolor=gray]; + } + 8 [label="Exit function notInPlaceFilter" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; 2 -> {3}; - 3 -> {6}; - 3 -> {4} [style=dotted]; - 4 -> {5} [style=dotted]; + 3 -> {4}; + 4 -> {5}; + 5 -> {8}; 5 -> {6} [style=dotted]; + 6 -> {7} [style=dotted]; + 7 -> {8} [style=dotted]; - subgraph cluster_2 { + subgraph cluster_3 { color=red - 7 [label="Enter function foo" style="filled" fillcolor=red]; - subgraph cluster_3 { + 9 [label="Enter function foo" style="filled" fillcolor=red]; + subgraph cluster_4 { color=blue - 8 [label="Enter block"]; - 9 [label="Exit block"]; + 10 [label="Enter block"]; + 11 [label="Exit block"]; } - 10 [label="Exit function foo" style="filled" fillcolor=red]; + 12 [label="Exit function foo" style="filled" fillcolor=red]; } - 7 -> {8}; - 8 -> {9}; 9 -> {10}; + 10 -> {11}; + 11 -> {12}; - subgraph cluster_4 { + subgraph cluster_5 { color=red - 11 [label="Enter function testInPlace" style="filled" fillcolor=red]; - subgraph cluster_5 { + 13 [label="Enter function testInPlace" style="filled" fillcolor=red]; + subgraph cluster_6 { color=blue - 12 [label="Enter block"]; - subgraph cluster_6 { + 14 [label="Enter block"]; + subgraph cluster_7 { color=blue - 13 [label="Try expression enter"]; - subgraph cluster_7 { + 15 [label="Try expression enter"]; + subgraph cluster_8 { color=blue - 14 [label="Try main block enter"]; - subgraph cluster_8 { + 16 [label="Try main block enter"]; + subgraph cluster_9 { color=blue - 15 [label="Enter block"]; - 16 [label="Access variable R|/list|"]; - 17 [label="Postponed enter to lambda"]; - subgraph cluster_9 { + 17 [label="Enter block"]; + 18 [label="Access variable R|/list|"]; + 19 [label="Postponed enter to lambda"]; + subgraph cluster_10 { color=blue - 18 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_10 { + 20 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_11 { color=blue - 19 [label="Enter block"]; - 20 [label="Access variable R|/it|"]; - 21 [label="Exit block"]; + 21 [label="Enter block"]; + 22 [label="Access variable R|/it|"]; + 23 [label="Exit block"]; } - 22 [label="Exit function " style="filled" fillcolor=red]; + 24 [label="Exit function " style="filled" fillcolor=red]; } - 23 [label="Postponed exit from lambda"]; - 24 [label="Function call: R|/list|.R|kotlin/collections/filter|(...)" style="filled" fillcolor=yellow]; - 25 [label="Exit block"]; + 25 [label="Postponed exit from lambda"]; + 26 [label="Function call: R|/list|.R|kotlin/collections/filter|(...)" style="filled" fillcolor=yellow]; + 27 [label="Exit block"]; } - 26 [label="Try main block exit"]; + 28 [label="Try main block exit"]; } - subgraph cluster_11 { + subgraph cluster_12 { color=blue - 27 [label="Enter finally"]; - subgraph cluster_12 { + 29 [label="Enter finally"]; + subgraph cluster_13 { color=blue - 28 [label="Enter block"]; - 29 [label="Exit block"]; + 30 [label="Enter block"]; + 31 [label="Exit block"]; } - 30 [label="Exit finally"]; + 32 [label="Exit finally"]; } - 31 [label="Try expression exit"]; + 33 [label="Try expression exit"]; } - 32 [label="Jump: ^testInPlace try { + 34 [label="Jump: ^testInPlace try { R|/list|.R|kotlin/collections/filter|( = filter@fun (it: R|kotlin/Boolean|): R|kotlin/Boolean| { ^ R|/it| } @@ -93,89 +100,89 @@ digraph tryWithLambdaInside_kt { finally { } "]; - 33 [label="Stub" style="filled" fillcolor=gray]; - 34 [label="Exit block" style="filled" fillcolor=gray]; + 35 [label="Stub" style="filled" fillcolor=gray]; + 36 [label="Exit block" style="filled" fillcolor=gray]; } - 35 [label="Exit function testInPlace" style="filled" fillcolor=red]; + 37 [label="Exit function testInPlace" style="filled" fillcolor=red]; } - 11 -> {12}; - 12 -> {13}; 13 -> {14}; - 13 -> {27} [label="onUncaughtException"]; 14 -> {15}; 15 -> {16}; + 15 -> {29} [label="onUncaughtException"]; 16 -> {17}; - 17 -> {18 23 24}; - 17 -> {18} [style=dashed]; + 17 -> {18}; 18 -> {19}; - 19 -> {20}; + 19 -> {20 25 26}; + 19 -> {20} [style=dashed]; 20 -> {21}; 21 -> {22}; 22 -> {23}; - 23 -> {17} [color=green style=dashed]; - 23 -> {24} [color=green]; - 23 -> {31} [color=red]; + 23 -> {24}; 24 -> {25}; - 24 -> {27} [label="onUncaughtException"]; - 25 -> {26}; + 25 -> {19} [color=green style=dashed]; + 25 -> {26} [color=green]; + 25 -> {33} [color=red]; 26 -> {27}; + 26 -> {29} [label="onUncaughtException"]; 27 -> {28}; 28 -> {29}; 29 -> {30}; 30 -> {31}; 31 -> {32}; - 32 -> {35}; - 32 -> {33} [style=dotted]; - 33 -> {34} [style=dotted]; + 32 -> {33}; + 33 -> {34}; + 34 -> {37}; 34 -> {35} [style=dotted]; + 35 -> {36} [style=dotted]; + 36 -> {37} [style=dotted]; - subgraph cluster_13 { + subgraph cluster_14 { color=red - 36 [label="Enter function testNotInPlace" style="filled" fillcolor=red]; - subgraph cluster_14 { + 38 [label="Enter function testNotInPlace" style="filled" fillcolor=red]; + subgraph cluster_15 { color=blue - 37 [label="Enter block"]; - subgraph cluster_15 { + 39 [label="Enter block"]; + subgraph cluster_16 { color=blue - 38 [label="Try expression enter"]; - subgraph cluster_16 { + 40 [label="Try expression enter"]; + subgraph cluster_17 { color=blue - 39 [label="Try main block enter"]; - subgraph cluster_17 { + 41 [label="Try main block enter"]; + subgraph cluster_18 { color=blue - 40 [label="Enter block"]; - 41 [label="Access variable R|/list|"]; - 42 [label="Postponed enter to lambda"]; - subgraph cluster_18 { + 42 [label="Enter block"]; + 43 [label="Access variable R|/list|"]; + 44 [label="Postponed enter to lambda"]; + subgraph cluster_19 { color=blue - 43 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_19 { + 45 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_20 { color=blue - 44 [label="Enter block"]; - 45 [label="Access variable R|/it|"]; - 46 [label="Exit block"]; + 46 [label="Enter block"]; + 47 [label="Access variable R|/it|"]; + 48 [label="Exit block"]; } - 47 [label="Exit function " style="filled" fillcolor=red]; + 49 [label="Exit function " style="filled" fillcolor=red]; } - 48 [label="Postponed exit from lambda"]; - 49 [label="Function call: R|/list|.R|/notInPlaceFilter|(...)" style="filled" fillcolor=yellow]; - 50 [label="Exit block"]; + 50 [label="Postponed exit from lambda"]; + 51 [label="Function call: R|/list|.R|/notInPlaceFilter|(...)" style="filled" fillcolor=yellow]; + 52 [label="Exit block"]; } - 51 [label="Try main block exit"]; + 53 [label="Try main block exit"]; } - subgraph cluster_20 { + subgraph cluster_21 { color=blue - 52 [label="Enter finally"]; - subgraph cluster_21 { + 54 [label="Enter finally"]; + subgraph cluster_22 { color=blue - 53 [label="Enter block"]; - 54 [label="Exit block"]; + 55 [label="Enter block"]; + 56 [label="Exit block"]; } - 55 [label="Exit finally"]; + 57 [label="Exit finally"]; } - 56 [label="Try expression exit"]; + 58 [label="Try expression exit"]; } - 57 [label="Jump: ^testNotInPlace try { + 59 [label="Jump: ^testNotInPlace try { R|/list|.R|/notInPlaceFilter|( = notInPlaceFilter@fun (it: R|kotlin/Boolean|): R|kotlin/Boolean| { ^ R|/it| } @@ -184,38 +191,38 @@ finally { finally { } "]; - 58 [label="Stub" style="filled" fillcolor=gray]; - 59 [label="Exit block" style="filled" fillcolor=gray]; + 60 [label="Stub" style="filled" fillcolor=gray]; + 61 [label="Exit block" style="filled" fillcolor=gray]; } - 60 [label="Exit function testNotInPlace" style="filled" fillcolor=red]; + 62 [label="Exit function testNotInPlace" style="filled" fillcolor=red]; } - 36 -> {37}; - 37 -> {38}; 38 -> {39}; - 38 -> {52} [label="onUncaughtException"]; 39 -> {40}; 40 -> {41}; + 40 -> {54} [label="onUncaughtException"]; 41 -> {42}; - 42 -> {43 48 49}; - 42 -> {43} [style=dashed]; + 42 -> {43}; 43 -> {44}; - 44 -> {45}; + 44 -> {45 50 51}; + 44 -> {45} [style=dashed]; 45 -> {46}; 46 -> {47}; - 48 -> {49} [color=green]; - 48 -> {56} [color=red]; - 49 -> {50}; - 49 -> {52} [label="onUncaughtException"]; - 50 -> {51}; + 47 -> {48}; + 48 -> {49}; + 50 -> {51} [color=green]; + 50 -> {58} [color=red]; 51 -> {52}; + 51 -> {54} [label="onUncaughtException"]; 52 -> {53}; 53 -> {54}; 54 -> {55}; 55 -> {56}; 56 -> {57}; - 57 -> {60}; - 57 -> {58} [style=dotted]; - 58 -> {59} [style=dotted]; + 57 -> {58}; + 58 -> {59}; + 59 -> {62}; 59 -> {60} [style=dotted]; + 60 -> {61} [style=dotted]; + 61 -> {62} [style=dotted]; } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/collectors/components/ControlFlowAnalysisDiagnosticComponent.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/collectors/components/ControlFlowAnalysisDiagnosticComponent.kt index 7e5b2bda110..e01c7b48bbd 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/collectors/components/ControlFlowAnalysisDiagnosticComponent.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/collectors/components/ControlFlowAnalysisDiagnosticComponent.kt @@ -38,6 +38,12 @@ class ControlFlowAnalysisDiagnosticComponent( } } + // ------------------------------- File ------------------------------- + + override fun visitFile(file: FirFile, data: CheckerContext) { + analyze(file, data) + } + // ------------------------------- Class initializer ------------------------------- override fun visitRegularClass(regularClass: FirRegularClass, data: CheckerContext) { diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/FirDataFlowAnalyzer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/FirDataFlowAnalyzer.kt index bc6e2c4efc4..e4b83afd32c 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/FirDataFlowAnalyzer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/FirDataFlowAnalyzer.kt @@ -189,11 +189,7 @@ abstract class FirDataFlowAnalyzer( } } val info = DataFlowInfo(variableStorage) - if (graphBuilder.isTopLevel) { - context.reset() - } else { - resetReceivers() - } + resetReceivers() return FirControlFlowGraphReferenceImpl(graph, info) } @@ -203,6 +199,22 @@ abstract class FirDataFlowAnalyzer( graphBuilder.enterAnonymousFunctionExpression(anonymousFunctionExpression)?.mergeIncomingFlow() } + // ----------------------------------- Files ------------------------------------------ + + fun enterFile(file: FirFile, buildGraph: Boolean) { + graphBuilder.enterFile(file, buildGraph)?.mergeIncomingFlow() + } + + fun exitFile(): ControlFlowGraph? { + val (node, graph) = graphBuilder.exitFile() + if (node != null) { + node.mergeIncomingFlow() + } else { + resetReceivers() + } + return graph + } + // ----------------------------------- Classes ----------------------------------- fun enterClass(klass: FirClass, buildGraph: Boolean) { 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 18ed3b81f38..ee5b12a14fa 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 @@ -33,7 +33,7 @@ class ControlFlowGraphBuilder { private val graphs: Stack = stackOf() val isTopLevel: Boolean - get() = graphs.isEmpty + get() = graphs.isEmpty || graphs.topOrNull()?.kind == ControlFlowGraph.Kind.File val currentGraph: ControlFlowGraph get() = graphs.top() @@ -379,17 +379,63 @@ class ControlFlowGraphBuilder { } } + // ----------------------------------- Files ----------------------------------- + + fun enterFile(file: FirFile, buildGraph: Boolean): FileEnterNode? { + if (!buildGraph) { + graphs.push(ControlFlowGraph(declaration = null, "", ControlFlowGraph.Kind.File)) + return null + } + + return enterGraph(file, "FILE_GRAPH", ControlFlowGraph.Kind.File) { + createFileEnterNode(it) to createFileExitNode(it) + } + } + + fun exitFile(): Pair { + assert(currentGraph.kind == ControlFlowGraph.Kind.File) + if (currentGraph.declaration == null) { + graphs.pop() // Discard empty file graph. + return null to null + } + + // Properties of a file can be visited in any order, so data flow between them is unordered, + // and we have to recreate the control flow after the fact. + val enterNode = lastNodes.pop() as FileEnterNode + val exitNode = currentGraph.exitNode as FileExitNode + + val properties = mutableListOf() + enterNode.fir.declarations.forEachGraphOwner { + val graph = it.controlFlowGraphReference?.controlFlowGraph ?: return@forEachGraphOwner + if (it is FirProperty) properties.add(graph) + } + + var lastNode: CFGNode<*> = enterNode + for (property in properties) { + addEdge(lastNode, property.enterNode, preferredKind = EdgeKind.CfgForward, propagateDeadness = false) + lastNode = property.exitNode + } + + addEdge(lastNode, exitNode, preferredKind = EdgeKind.CfgForward, propagateDeadness = false) + if (properties.isNotEmpty()) { + // Fake edge to enforce ordering. + addEdge(enterNode, exitNode, preferredKind = EdgeKind.DeadForward, propagateDeadness = false) + } + + enterNode.subGraphs = properties + return exitNode to popGraph() + } + // ----------------------------------- Classes ----------------------------------- private fun FirClass.firstInPlaceInitializedMember(): FirDeclaration? = declarations.find { it is FirControlFlowGraphOwner && it !is FirConstructor && it.isUsedInControlFlowGraphBuilderForClass } - private inline fun FirClass.forEachGraphOwner(block: (FirControlFlowGraphOwner) -> Unit) { - for (member in declarations) { + private inline fun List.forEachGraphOwner(block: (FirControlFlowGraphOwner) -> Unit) { + for (member in this) { if (member is FirControlFlowGraphOwner && member.memberShouldHaveGraph) { block(member) } - if (member is FirProperty) { member.getter?.let { block(it) } member.setter?.let { block(it) } @@ -404,7 +450,7 @@ class ControlFlowGraphBuilder { fun enterClass(klass: FirClass, buildGraph: Boolean): Pair?, ClassEnterNode?> { if (!buildGraph) { - graphs.push(ControlFlowGraph(null, "", ControlFlowGraph.Kind.Class)) + graphs.push(ControlFlowGraph(declaration = null, "", ControlFlowGraph.Kind.Class)) return null to null } @@ -433,7 +479,7 @@ class ControlFlowGraphBuilder { if (enterNode.previousNodes.isNotEmpty()) { val firstInPlace = klass.firstInPlaceInitializedMember() - klass.forEachGraphOwner { + klass.declarations.forEachGraphOwner { // For local classes, the first in-place initializer, all constructors when there are no in-place initializers, or any // this-delegating constructors should have a forward edge from ClassEnterNode, while everything else should have a // DFG-only forward edge. @@ -470,7 +516,7 @@ class ControlFlowGraphBuilder { val calledInPlace = mutableListOf() val calledLater = mutableListOf() val constructors = mutableMapOf() - klass.forEachGraphOwner { + klass.declarations.forEachGraphOwner { val graph = it.controlFlowGraphReference?.controlFlowGraph ?: return@forEachGraphOwner when (it) { is FirConstructor -> constructors[it] = graph @@ -1409,3 +1455,12 @@ val FirControlFlowGraphOwner.isUsedInControlFlowGraphBuilderForClass: Boolean is FirFunction, is FirClass -> false else -> true } + +/** + * @return true for [FirControlFlowGraphOwner] which, as a file member, should be part of the file + */ +val FirControlFlowGraphOwner.isUsedInControlFlowGraphBuilderForFile: Boolean + get() = when (this) { + is FirProperty -> memberShouldHaveGraph + else -> false + } diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphNodeBuilder.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphNodeBuilder.kt index 0cf4ff2d628..350a7ea98af 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphNodeBuilder.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphNodeBuilder.kt @@ -229,6 +229,12 @@ fun ControlFlowGraphBuilder.createCodeFragmentEnterNode(fir: FirCodeFragment): C fun ControlFlowGraphBuilder.createCodeFragmentExitNode(fir: FirCodeFragment): CodeFragmentExitNode = CodeFragmentExitNode(currentGraph, fir, levelCounter) +fun ControlFlowGraphBuilder.createFileEnterNode(fir: FirFile): FileEnterNode = + FileEnterNode(currentGraph, fir, levelCounter) + +fun ControlFlowGraphBuilder.createFileExitNode(fir: FirFile): FileExitNode = + FileExitNode(currentGraph, fir, levelCounter) + fun ControlFlowGraphBuilder.createClassEnterNode(fir: FirClass): ClassEnterNode = ClassEnterNode(currentGraph, fir, levelCounter) diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirAbstractBodyResolveTransformerDispatcher.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirAbstractBodyResolveTransformerDispatcher.kt index d9f395206bb..2e9ca4c5c09 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirAbstractBodyResolveTransformerDispatcher.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirAbstractBodyResolveTransformerDispatcher.kt @@ -30,6 +30,7 @@ abstract class FirAbstractBodyResolveTransformerDispatcher( ) : FirAbstractBodyResolveTransformer(phase) { open val preserveCFGForClasses: Boolean get() = !implicitTypeOnly + open val buildCfgForFiles: Boolean get() = !implicitTypeOnly final override val context: BodyResolveContext = outerBodyResolveContext ?: BodyResolveContext(returnTypeCalculator, DataFlowAnalyzerContext(session)) @@ -45,13 +46,7 @@ abstract class FirAbstractBodyResolveTransformerDispatcher( private val controlFlowStatementsTransformer = FirControlFlowStatementsResolveTransformer(this) override fun transformFile(file: FirFile, data: ResolutionMode): FirFile { - checkSessionConsistency(file) - return context.withFile(file, components) { - withFileAnalysisExceptionWrapping(file) { - firResolveContextCollector?.addFileContext(file, context.towerDataContext) - transformDeclarationContent(file, data) as FirFile - } - } + return declarationsTransformer?.transformFile(file, data) ?: file } override fun transformScript(script: FirScript, data: ResolutionMode): FirScript { diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirDeclarationsResolveTransformer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirDeclarationsResolveTransformer.kt index 24be5da2774..d94538eaa1e 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirDeclarationsResolveTransformer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirDeclarationsResolveTransformer.kt @@ -510,6 +510,16 @@ open class FirDeclarationsResolveTransformer( ) } + override fun transformFile( + file: FirFile, + data: ResolutionMode, + ): FirFile { + checkSessionConsistency(file) + return withFileAnalysisExceptionWrapping(file) { + doTransformFile(file, data) + } + } + override fun transformRegularClass( regularClass: FirRegularClass, data: ResolutionMode @@ -558,6 +568,35 @@ open class FirDeclarationsResolveTransformer( return typeAlias } + private fun doTransformFile( + file: FirFile, + data: ResolutionMode, + ): FirFile = withFile(file) { + transformer.firResolveContextCollector?.addFileContext(file, context.towerDataContext) + + transformDeclarationContent(file, data) as FirFile + } + + open fun withFile( + file: FirFile, + action: () -> FirFile, + ): FirFile { + val result = context.withFile(file, components) { + // TODO Must be done within 'withFile' as the context - any the analyzer - is cleared as the first step. + // yuk. maybe the clear shouldn't happen for `enterFile`? or at maybe separately? + dataFlowAnalyzer.enterFile(file, buildGraph = transformer.buildCfgForFiles) + + action() + } + + val controlFlowGraph = dataFlowAnalyzer.exitFile() + if (controlFlowGraph != null) { + result.replaceControlFlowGraphReference(FirControlFlowGraphReferenceImpl(controlFlowGraph)) + } + + return result + } + protected fun doTransformRegularClass( regularClass: FirRegularClass, data: ResolutionMode diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/contracts/FirAbstractContractResolveTransformerDispatcher.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/contracts/FirAbstractContractResolveTransformerDispatcher.kt index 15da36056a8..d56ac062149 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/contracts/FirAbstractContractResolveTransformerDispatcher.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/contracts/FirAbstractContractResolveTransformerDispatcher.kt @@ -259,6 +259,12 @@ abstract class FirAbstractContractResolveTransformerDispatcher( firClass.transformDeclarations(this, data) } + override fun withFile(file: FirFile, action: () -> FirFile): FirFile { + return context.withFile(file, components) { + action() + } + } + override fun transformRegularClass(regularClass: FirRegularClass, data: ResolutionMode): FirStatement { return withRegularClass(regularClass) { transformDeclarationContent(regularClass, data) diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/plugin/FirAnnotationArgumentsMappingTransformer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/plugin/FirAnnotationArgumentsMappingTransformer.kt index c2675997aec..be8bc8c1159 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/plugin/FirAnnotationArgumentsMappingTransformer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/plugin/FirAnnotationArgumentsMappingTransformer.kt @@ -85,6 +85,12 @@ private class FirExpressionTransformerForAnnotationArgumentsMapping( private class FirDeclarationsResolveTransformerForAnnotationArgumentsMapping( transformer: FirAbstractBodyResolveTransformerDispatcher ) : FirDeclarationsResolveTransformer(transformer) { + override fun withFile(file: FirFile, action: () -> FirFile): FirFile { + return context.withFile(file, components) { + action() + } + } + override fun transformRegularClass(regularClass: FirRegularClass, data: ResolutionMode): FirStatement { regularClass.transformAnnotations(this, data) doTransformTypeParameters(regularClass) diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/plugin/FirAnnotationArgumentsResolveTransformer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/plugin/FirAnnotationArgumentsResolveTransformer.kt index 72e696741f8..4ff789f50d9 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/plugin/FirAnnotationArgumentsResolveTransformer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/plugin/FirAnnotationArgumentsResolveTransformer.kt @@ -55,6 +55,12 @@ open class FirAnnotationArgumentsResolveTransformer( private class FirDeclarationsResolveTransformerForArgumentAnnotations( transformer: FirAbstractBodyResolveTransformerDispatcher ) : FirDeclarationsResolveTransformer(transformer) { + override fun withFile(file: FirFile, action: () -> FirFile): FirFile { + return context.withFile(file, components) { + action() + } + } + override fun transformRegularClass(regularClass: FirRegularClass, data: ResolutionMode): FirStatement { regularClass.transformAnnotations(this, data) withRegularClass(regularClass) { diff --git a/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/CFGNode.kt b/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/CFGNode.kt index 831df46be80..3f2fa96628f 100644 --- a/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/CFGNode.kt +++ b/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/CFGNode.kt @@ -291,6 +291,24 @@ class AnonymousFunctionExpressionNode(owner: ControlFlowGraph, override val fir: } } +// ----------------------------------- Files ------------------------------------------ + +class FileEnterNode(owner: ControlFlowGraph, override val fir: FirFile, level: Int) : CFGNodeWithSubgraphs(owner, level), + GraphEnterNodeMarker { + @set:CfgInternals + override lateinit var subGraphs: List + + override fun accept(visitor: ControlFlowGraphVisitor, data: D): R { + return visitor.visitFileEnterNode(this, data) + } +} + +class FileExitNode(owner: ControlFlowGraph, override val fir: FirFile, level: Int) : CFGNode(owner, level), GraphExitNodeMarker { + override fun accept(visitor: ControlFlowGraphVisitor, data: D): R { + return visitor.visitFileExitNode(this, data) + } +} + // ----------------------------------- Classes ----------------------------------- class ClassEnterNode(owner: ControlFlowGraph, override val fir: FirClass, level: Int) : CFGNodeWithSubgraphs(owner, level), diff --git a/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/CFGNodeRenderer.kt b/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/CFGNodeRenderer.kt index 8e33f86a05d..2f1ed70b784 100644 --- a/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/CFGNodeRenderer.kt +++ b/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/CFGNodeRenderer.kt @@ -98,6 +98,9 @@ fun CFGNode<*>.render(): String = is MergePostponedLambdaExitsNode -> "Merge postponed lambda exits" is AnonymousFunctionExpressionNode -> "Exit anonymous function expression" + is FileEnterNode -> "Enter file ${fir.name}" + is FileExitNode -> "Exit file ${fir.name}" + is ClassEnterNode -> "Enter class ${owner.name}" is ClassExitNode -> "Exit class ${owner.name}" is LocalClassExitNode -> "Local class declaration" diff --git a/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraph.kt b/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraph.kt index e996455f937..931148ddea1 100644 --- a/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraph.kt +++ b/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraph.kt @@ -32,6 +32,7 @@ class ControlFlowGraph(val declaration: FirDeclaration?, val name: String, val k } enum class Kind { + File, Class, Function, LocalFunction, diff --git a/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphVisitor.kt b/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphVisitor.kt index 6e21c5b1b1f..182f5d79431 100644 --- a/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphVisitor.kt +++ b/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphVisitor.kt @@ -58,6 +58,16 @@ abstract class ControlFlowGraphVisitor { return visitNode(node, data) } + // ----------------------------------- Files ------------------------------------------ + + open fun visitFileEnterNode(node: FileEnterNode, data: D): R { + return visitNode(node, data) + } + + open fun visitFileExitNode(node: FileExitNode, data: D): R { + return visitNode(node, data) + } + // ----------------------------------- Classes ----------------------------------- open fun visitAnonymousObjectEnterNode(node: AnonymousObjectEnterNode, data: D): R { diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/FirFile.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/FirFile.kt index 716904f0d9c..d3cae2785f3 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/FirFile.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/FirFile.kt @@ -13,6 +13,7 @@ import org.jetbrains.kotlin.fir.FirFileAnnotationsContainer import org.jetbrains.kotlin.fir.FirModuleData import org.jetbrains.kotlin.fir.FirPackageDirective import org.jetbrains.kotlin.fir.expressions.FirAnnotation +import org.jetbrains.kotlin.fir.references.FirControlFlowGraphReference import org.jetbrains.kotlin.fir.symbols.impl.FirFileSymbol import org.jetbrains.kotlin.fir.visitors.* import org.jetbrains.kotlin.fir.declarations.ResolveStateAccess @@ -22,12 +23,13 @@ import org.jetbrains.kotlin.fir.declarations.ResolveStateAccess * DO NOT MODIFY IT MANUALLY */ -abstract class FirFile : FirDeclaration() { +abstract class FirFile : FirDeclaration(), FirControlFlowGraphOwner { abstract override val source: KtSourceElement? abstract override val annotations: List abstract override val moduleData: FirModuleData abstract override val origin: FirDeclarationOrigin abstract override val attributes: FirDeclarationAttributes + abstract override val controlFlowGraphReference: FirControlFlowGraphReference? abstract val annotationsContainer: FirFileAnnotationsContainer? abstract val packageDirective: FirPackageDirective abstract val imports: List @@ -45,6 +47,8 @@ abstract class FirFile : FirDeclaration() { abstract override fun replaceAnnotations(newAnnotations: List) + abstract override fun replaceControlFlowGraphReference(newControlFlowGraphReference: FirControlFlowGraphReference?) + abstract override fun transformAnnotations(transformer: FirTransformer, data: D): FirFile abstract fun transformAnnotationsContainer(transformer: FirTransformer, data: D): FirFile diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirFileBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirFileBuilder.kt index 2d9d0500536..9632606fd4d 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirFileBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirFileBuilder.kt @@ -28,6 +28,7 @@ import org.jetbrains.kotlin.fir.declarations.ResolveStateAccess import org.jetbrains.kotlin.fir.declarations.asResolveState import org.jetbrains.kotlin.fir.declarations.impl.FirFileImpl import org.jetbrains.kotlin.fir.expressions.FirAnnotation +import org.jetbrains.kotlin.fir.references.FirControlFlowGraphReference import org.jetbrains.kotlin.fir.symbols.impl.FirFileSymbol import org.jetbrains.kotlin.fir.visitors.* diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/impl/FirFileImpl.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/impl/FirFileImpl.kt index c0aa92f744d..86ea45096f7 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/impl/FirFileImpl.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/impl/FirFileImpl.kt @@ -22,6 +22,7 @@ import org.jetbrains.kotlin.fir.declarations.FirResolvePhase import org.jetbrains.kotlin.fir.declarations.FirResolveState import org.jetbrains.kotlin.fir.declarations.asResolveState import org.jetbrains.kotlin.fir.expressions.FirAnnotation +import org.jetbrains.kotlin.fir.references.FirControlFlowGraphReference import org.jetbrains.kotlin.fir.symbols.impl.FirFileSymbol import org.jetbrains.kotlin.fir.visitors.* import org.jetbrains.kotlin.fir.MutableOrEmptyList @@ -49,6 +50,7 @@ internal class FirFileImpl( override val symbol: FirFileSymbol, ) : FirFile() { override val annotations: List get() = annotationsContainer?.annotations ?: emptyList() + override var controlFlowGraphReference: FirControlFlowGraphReference? = null init { symbol.bind(this) @@ -57,6 +59,7 @@ internal class FirFileImpl( } override fun acceptChildren(visitor: FirVisitor, data: D) { + controlFlowGraphReference?.accept(visitor, data) annotationsContainer?.accept(visitor, data) packageDirective.accept(visitor, data) imports.forEach { it.accept(visitor, data) } @@ -64,6 +67,7 @@ internal class FirFileImpl( } override fun transformChildren(transformer: FirTransformer, data: D): FirFileImpl { + controlFlowGraphReference = controlFlowGraphReference?.transform(transformer, data) transformAnnotationsContainer(transformer, data) packageDirective = packageDirective.transform(transformer, data) transformImports(transformer, data) @@ -91,4 +95,8 @@ internal class FirFileImpl( } override fun replaceAnnotations(newAnnotations: List) {} + + override fun replaceControlFlowGraphReference(newControlFlowGraphReference: FirControlFlowGraphReference?) { + controlFlowGraphReference = newControlFlowGraphReference + } } diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/visitors/FirDefaultVisitor.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/visitors/FirDefaultVisitor.kt index afc30891ca5..b1fa5cdba68 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/visitors/FirDefaultVisitor.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/visitors/FirDefaultVisitor.kt @@ -192,8 +192,6 @@ abstract class FirDefaultVisitor : FirVisitor() { override fun visitRegularClass(regularClass: FirRegularClass, data: D): R = visitClass(regularClass, data) - override fun visitFile(file: FirFile, data: D): R = visitDeclaration(file, data) - override fun visitScript(script: FirScript, data: D): R = visitDeclaration(script, data) override fun visitCodeFragment(codeFragment: FirCodeFragment, data: D): R = visitDeclaration(codeFragment, data) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/visitors/FirDefaultVisitorVoid.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/visitors/FirDefaultVisitorVoid.kt index b7c2e20e060..213a85a8a50 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/visitors/FirDefaultVisitorVoid.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/visitors/FirDefaultVisitorVoid.kt @@ -192,8 +192,6 @@ abstract class FirDefaultVisitorVoid : FirVisitorVoid() { override fun visitRegularClass(regularClass: FirRegularClass) = visitClass(regularClass) - override fun visitFile(file: FirFile) = visitDeclaration(file) - override fun visitScript(script: FirScript) = visitDeclaration(script) override fun visitCodeFragment(codeFragment: FirCodeFragment) = visitDeclaration(codeFragment) diff --git a/compiler/fir/tree/tree-generator/src/org/jetbrains/kotlin/fir/tree/generator/FirTreeBuilder.kt b/compiler/fir/tree/tree-generator/src/org/jetbrains/kotlin/fir/tree/generator/FirTreeBuilder.kt index 5300c292e2c..6d4ad3cc3a1 100644 --- a/compiler/fir/tree/tree-generator/src/org/jetbrains/kotlin/fir/tree/generator/FirTreeBuilder.kt +++ b/compiler/fir/tree/tree-generator/src/org/jetbrains/kotlin/fir/tree/generator/FirTreeBuilder.kt @@ -64,7 +64,7 @@ object FirTreeBuilder : AbstractFirTreeBuilder() { val propertyAccessor by element(Declaration, function, contractDescriptionOwner, typeParametersOwner) val backingField by element(Declaration, variable, typeParametersOwner, statement) val constructor by element(Declaration, function, typeParameterRefsOwner, contractDescriptionOwner) - val file by element(Declaration, declaration) + val file by element(Declaration, declaration, controlFlowGraphOwner) val script by element(Declaration, declaration) val codeFragment by element(Declaration, declaration) val packageDirective by element(Other) diff --git a/compiler/testData/codegen/box/smartCasts/kt44814.dot b/compiler/testData/codegen/box/smartCasts/kt44814.dot index d90b574272a..81e5d96fd78 100644 --- a/compiler/testData/codegen/box/smartCasts/kt44814.dot +++ b/compiler/testData/codegen/box/smartCasts/kt44814.dot @@ -5,649 +5,656 @@ digraph kt44814_kt { subgraph cluster_0 { color=red - 0 [label="Enter class FlyweightCapableTreeStructure [1]" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter function [2]" style="filled" fillcolor=red]; - 2 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; - 3 [label="Exit function [2]" style="filled" fillcolor=red]; - } - 4 [label="Exit class FlyweightCapableTreeStructure [1]" style="filled" fillcolor=red]; + 0 [label="Enter file kt44814.kt [1]" style="filled" fillcolor=red]; + 1 [label="Exit file kt44814.kt [1]" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; - 0 -> {4} [style=dotted]; - 0 -> {1} [style=dashed]; - 1 -> {2}; - 2 -> {3}; - 3 -> {4} [color=green]; - subgraph cluster_2 { + subgraph cluster_1 { color=red - 5 [label="Enter class FirSourceElement [1]" style="filled" fillcolor=red]; - subgraph cluster_3 { + 2 [label="Enter class FlyweightCapableTreeStructure [2]" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 6 [label="Enter function [2]" style="filled" fillcolor=red]; - 7 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; - 8 [label="Exit function [2]" style="filled" fillcolor=red]; + 3 [label="Enter function [3]" style="filled" fillcolor=red]; + 4 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; + 5 [label="Exit function [3]" style="filled" fillcolor=red]; } - 9 [label="Exit class FirSourceElement [1]" style="filled" fillcolor=red]; + 6 [label="Exit class FlyweightCapableTreeStructure [2]" style="filled" fillcolor=red]; } + 2 -> {3} [color=green]; + 2 -> {6} [style=dotted]; + 2 -> {3} [style=dashed]; + 3 -> {4}; + 4 -> {5}; 5 -> {6} [color=green]; - 5 -> {9} [style=dotted]; - 5 -> {6} [style=dashed]; - 6 -> {7}; - 7 -> {8}; - 8 -> {9} [color=green]; - subgraph cluster_4 { + subgraph cluster_3 { color=red - 10 [label="Enter class FirPsiSourceElement [1]" style="filled" fillcolor=red]; - subgraph cluster_5 { + 7 [label="Enter class FirSourceElement [2]" style="filled" fillcolor=red]; + subgraph cluster_4 { color=blue - 11 [label="Enter property [2]" style="filled" fillcolor=red]; - 12 [label="Access variable R|/psi| [2]"]; - 13 [label="Exit property [2]" style="filled" fillcolor=red]; + 8 [label="Enter function [3]" style="filled" fillcolor=red]; + 9 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; + 10 [label="Exit function [3]" style="filled" fillcolor=red]; } + 11 [label="Exit class FirSourceElement [2]" style="filled" fillcolor=red]; + } + 7 -> {8} [color=green]; + 7 -> {11} [style=dotted]; + 7 -> {8} [style=dashed]; + 8 -> {9}; + 9 -> {10}; + 10 -> {11} [color=green]; + + subgraph cluster_5 { + color=red + 12 [label="Enter class FirPsiSourceElement [2]" style="filled" fillcolor=red]; subgraph cluster_6 { color=blue - 14 [label="Enter property [2]" style="filled" fillcolor=red]; - 15 [label="Access variable R|/lighterASTNode| [2]"]; - 16 [label="Exit property [2]" style="filled" fillcolor=red]; + 13 [label="Enter property [3]" style="filled" fillcolor=red]; + 14 [label="Access variable R|/psi| [3]"]; + 15 [label="Exit property [3]" style="filled" fillcolor=red]; } subgraph cluster_7 { color=blue - 17 [label="Enter property [2]" style="filled" fillcolor=red]; - 18 [label="Access variable R|/treeStructure| [2]"]; - 19 [label="Exit property [2]" style="filled" fillcolor=red]; + 16 [label="Enter property [3]" style="filled" fillcolor=red]; + 17 [label="Access variable R|/lighterASTNode| [3]"]; + 18 [label="Exit property [3]" style="filled" fillcolor=red]; } subgraph cluster_8 { color=blue - 20 [label="Enter function [2]" style="filled" fillcolor=red]; - 21 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; - 22 [label="Exit function [2]" style="filled" fillcolor=red]; + 19 [label="Enter property [3]" style="filled" fillcolor=red]; + 20 [label="Access variable R|/treeStructure| [3]"]; + 21 [label="Exit property [3]" style="filled" fillcolor=red]; } - 23 [label="Exit class FirPsiSourceElement [1]" style="filled" fillcolor=red]; - } - 10 -> {11} [color=green]; - 10 -> {23} [style=dotted]; - 10 -> {11 14 17 20} [style=dashed]; - 11 -> {12}; - 12 -> {13}; - 13 -> {14} [color=green]; - 14 -> {15}; - 15 -> {16}; - 16 -> {17} [color=green]; - 17 -> {18}; - 18 -> {19}; - 19 -> {20} [color=green]; - 20 -> {21}; - 21 -> {22}; - 22 -> {23} [color=green]; - - subgraph cluster_9 { - color=red - 24 [label="Enter class FirLightSourceElement [1]" style="filled" fillcolor=red]; - subgraph cluster_10 { + subgraph cluster_9 { color=blue - 25 [label="Enter property [2]" style="filled" fillcolor=red]; - 26 [label="Access variable R|/lighterASTNode| [2]"]; - 27 [label="Exit property [2]" style="filled" fillcolor=red]; + 22 [label="Enter function [3]" style="filled" fillcolor=red]; + 23 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; + 24 [label="Exit function [3]" style="filled" fillcolor=red]; } + 25 [label="Exit class FirPsiSourceElement [2]" style="filled" fillcolor=red]; + } + 12 -> {13} [color=green]; + 12 -> {25} [style=dotted]; + 12 -> {13 16 19 22} [style=dashed]; + 13 -> {14}; + 14 -> {15}; + 15 -> {16} [color=green]; + 16 -> {17}; + 17 -> {18}; + 18 -> {19} [color=green]; + 19 -> {20}; + 20 -> {21}; + 21 -> {22} [color=green]; + 22 -> {23}; + 23 -> {24}; + 24 -> {25} [color=green]; + + subgraph cluster_10 { + color=red + 26 [label="Enter class FirLightSourceElement [2]" style="filled" fillcolor=red]; subgraph cluster_11 { color=blue - 28 [label="Enter property [2]" style="filled" fillcolor=red]; - 29 [label="Access variable R|/treeStructure| [2]"]; - 30 [label="Exit property [2]" style="filled" fillcolor=red]; + 27 [label="Enter property [3]" style="filled" fillcolor=red]; + 28 [label="Access variable R|/lighterASTNode| [3]"]; + 29 [label="Exit property [3]" style="filled" fillcolor=red]; } subgraph cluster_12 { color=blue - 31 [label="Enter function [2]" style="filled" fillcolor=red]; - 32 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; - 33 [label="Exit function [2]" style="filled" fillcolor=red]; + 30 [label="Enter property [3]" style="filled" fillcolor=red]; + 31 [label="Access variable R|/treeStructure| [3]"]; + 32 [label="Exit property [3]" style="filled" fillcolor=red]; } - 34 [label="Exit class FirLightSourceElement [1]" style="filled" fillcolor=red]; + subgraph cluster_13 { + color=blue + 33 [label="Enter function [3]" style="filled" fillcolor=red]; + 34 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; + 35 [label="Exit function [3]" style="filled" fillcolor=red]; + } + 36 [label="Exit class FirLightSourceElement [2]" style="filled" fillcolor=red]; } - 24 -> {25} [color=green]; - 24 -> {34} [style=dotted]; - 24 -> {25 28 31} [style=dashed]; - 25 -> {26}; - 26 -> {27}; - 27 -> {28} [color=green]; + 26 -> {27} [color=green]; + 26 -> {36} [style=dotted]; + 26 -> {27 30 33} [style=dashed]; + 27 -> {28}; 28 -> {29}; - 29 -> {30}; - 30 -> {31} [color=green]; + 29 -> {30} [color=green]; + 30 -> {31}; 31 -> {32}; - 32 -> {33}; - 33 -> {34} [color=green]; - - subgraph cluster_13 { - color=red - 35 [label="Enter class PsiElement [1]" style="filled" fillcolor=red]; - subgraph cluster_14 { - color=blue - 36 [label="Enter function [2]" style="filled" fillcolor=red]; - 37 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; - 38 [label="Exit function [2]" style="filled" fillcolor=red]; - } - 39 [label="Exit class PsiElement [1]" style="filled" fillcolor=red]; - } + 32 -> {33} [color=green]; + 33 -> {34}; + 34 -> {35}; 35 -> {36} [color=green]; - 35 -> {39} [style=dotted]; - 35 -> {36} [style=dashed]; - 36 -> {37}; - 37 -> {38}; - 38 -> {39} [color=green]; - subgraph cluster_15 { + subgraph cluster_14 { color=red - 40 [label="Enter class ASTNode [1]" style="filled" fillcolor=red]; - subgraph cluster_16 { + 37 [label="Enter class PsiElement [2]" style="filled" fillcolor=red]; + subgraph cluster_15 { color=blue - 41 [label="Enter function [2]" style="filled" fillcolor=red]; - 42 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; - 43 [label="Exit function [2]" style="filled" fillcolor=red]; + 38 [label="Enter function [3]" style="filled" fillcolor=red]; + 39 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; + 40 [label="Exit function [3]" style="filled" fillcolor=red]; } - 44 [label="Exit class ASTNode [1]" style="filled" fillcolor=red]; + 41 [label="Exit class PsiElement [2]" style="filled" fillcolor=red]; } + 37 -> {38} [color=green]; + 37 -> {41} [style=dotted]; + 37 -> {38} [style=dashed]; + 38 -> {39}; + 39 -> {40}; 40 -> {41} [color=green]; - 40 -> {44} [style=dotted]; - 40 -> {41} [style=dashed]; - 41 -> {42}; - 42 -> {43}; - 43 -> {44} [color=green]; - subgraph cluster_17 { + subgraph cluster_16 { color=red - 45 [label="Enter class LighterASTNode [1]" style="filled" fillcolor=red]; - subgraph cluster_18 { + 42 [label="Enter class ASTNode [2]" style="filled" fillcolor=red]; + subgraph cluster_17 { color=blue - 46 [label="Enter property [2]" style="filled" fillcolor=red]; - 47 [label="Access variable R|/_children| [2]"]; - 48 [label="Exit property [2]" style="filled" fillcolor=red]; + 43 [label="Enter function [3]" style="filled" fillcolor=red]; + 44 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; + 45 [label="Exit function [3]" style="filled" fillcolor=red]; } + 46 [label="Exit class ASTNode [2]" style="filled" fillcolor=red]; + } + 42 -> {43} [color=green]; + 42 -> {46} [style=dotted]; + 42 -> {43} [style=dashed]; + 43 -> {44}; + 44 -> {45}; + 45 -> {46} [color=green]; + + subgraph cluster_18 { + color=red + 47 [label="Enter class LighterASTNode [2]" style="filled" fillcolor=red]; subgraph cluster_19 { color=blue - 49 [label="Enter property [2]" style="filled" fillcolor=red]; - 50 [label="Access qualifier /TokenType [2]"]; - 51 [label="Access variable R|/TokenType.Companion.MODIFIER_LIST| [2]"]; - 52 [label="Exit property [2]" style="filled" fillcolor=red]; + 48 [label="Enter property [3]" style="filled" fillcolor=red]; + 49 [label="Access variable R|/_children| [3]"]; + 50 [label="Exit property [3]" style="filled" fillcolor=red]; } subgraph cluster_20 { color=blue - 53 [label="Enter function [2]" style="filled" fillcolor=red]; - 54 [label="Enter default value of _children [2]"]; - subgraph cluster_21 { - color=blue - 55 [label="Enter default value of _children [3]" style="filled" fillcolor=red]; - 56 [label="Function call: R|kotlin/collections/emptyList|() [3]" style="filled" fillcolor=yellow]; - 57 [label="Exit default value of _children [3]" style="filled" fillcolor=red]; - } - 58 [label="Exit default value of _children [2]"]; - 59 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; - 60 [label="Exit function [2]" style="filled" fillcolor=red]; + 51 [label="Enter property [3]" style="filled" fillcolor=red]; + 52 [label="Access qualifier /TokenType [3]"]; + 53 [label="Access variable R|/TokenType.Companion.MODIFIER_LIST| [3]"]; + 54 [label="Exit property [3]" style="filled" fillcolor=red]; } - 61 [label="Exit class LighterASTNode [1]" style="filled" fillcolor=red]; + subgraph cluster_21 { + color=blue + 55 [label="Enter function [3]" style="filled" fillcolor=red]; + 56 [label="Enter default value of _children [3]"]; + subgraph cluster_22 { + color=blue + 57 [label="Enter default value of _children [4]" style="filled" fillcolor=red]; + 58 [label="Function call: R|kotlin/collections/emptyList|() [4]" style="filled" fillcolor=yellow]; + 59 [label="Exit default value of _children [4]" style="filled" fillcolor=red]; + } + 60 [label="Exit default value of _children [3]"]; + 61 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; + 62 [label="Exit function [3]" style="filled" fillcolor=red]; + } + 63 [label="Exit class LighterASTNode [2]" style="filled" fillcolor=red]; } - 45 -> {46} [color=green]; - 45 -> {61} [style=dotted]; - 45 -> {46 49 53} [style=dashed]; - 46 -> {47}; - 47 -> {48}; - 48 -> {49} [color=green]; + 47 -> {48} [color=green]; + 47 -> {63} [style=dotted]; + 47 -> {48 51 55} [style=dashed]; + 48 -> {49}; 49 -> {50}; - 50 -> {51}; + 50 -> {51} [color=green]; 51 -> {52}; - 52 -> {53} [color=green]; + 52 -> {53}; 53 -> {54}; - 54 -> {55 58}; - 54 -> {55} [style=dashed]; + 54 -> {55} [color=green]; 55 -> {56}; - 56 -> {57}; + 56 -> {57 60}; + 56 -> {57} [style=dashed]; 57 -> {58}; 58 -> {59}; 59 -> {60}; - 60 -> {61} [color=green]; + 60 -> {61}; + 61 -> {62}; + 62 -> {63} [color=green]; - subgraph cluster_22 { + subgraph cluster_23 { color=red - 62 [label="Enter function getChildren [2]" style="filled" fillcolor=red]; - subgraph cluster_23 { + 64 [label="Enter function getChildren [3]" style="filled" fillcolor=red]; + subgraph cluster_24 { color=blue - 63 [label="Enter block [2]"]; - 64 [label="Access variable R|/LighterASTNode._children| [2]"]; - 65 [label="Jump: ^getChildren this@R|/LighterASTNode|.R|/LighterASTNode._children| [2]"]; - 66 [label="Stub [2]" style="filled" fillcolor=gray]; - 67 [label="Exit block [2]" style="filled" fillcolor=gray]; + 65 [label="Enter block [3]"]; + 66 [label="Access variable R|/LighterASTNode._children| [3]"]; + 67 [label="Jump: ^getChildren this@R|/LighterASTNode|.R|/LighterASTNode._children| [3]"]; + 68 [label="Stub [3]" style="filled" fillcolor=gray]; + 69 [label="Exit block [3]" style="filled" fillcolor=gray]; } - 68 [label="Exit function getChildren [2]" style="filled" fillcolor=red]; + 70 [label="Exit function getChildren [3]" style="filled" fillcolor=red]; } - 62 -> {63}; - 63 -> {64}; 64 -> {65}; - 65 -> {68}; - 65 -> {66} [style=dotted]; - 66 -> {67} [style=dotted]; + 65 -> {66}; + 66 -> {67}; + 67 -> {70}; 67 -> {68} [style=dotted]; + 68 -> {69} [style=dotted]; + 69 -> {70} [style=dotted]; - subgraph cluster_24 { + subgraph cluster_25 { color=red - 69 [label="Enter class TokenType [1]" style="filled" fillcolor=red]; - subgraph cluster_25 { + 71 [label="Enter class TokenType [2]" style="filled" fillcolor=red]; + subgraph cluster_26 { color=blue - 70 [label="Enter function [2]" style="filled" fillcolor=red]; - 71 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; - 72 [label="Exit function [2]" style="filled" fillcolor=red]; + 72 [label="Enter function [3]" style="filled" fillcolor=red]; + 73 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; + 74 [label="Exit function [3]" style="filled" fillcolor=red]; } - 73 [label="Exit class TokenType [1]" style="filled" fillcolor=red]; + 75 [label="Exit class TokenType [2]" style="filled" fillcolor=red]; } - 69 -> {70} [color=green]; - 69 -> {73} [style=dotted]; - 69 -> {70} [style=dashed]; - 70 -> {71}; - 71 -> {72}; - 72 -> {73} [color=green]; + 71 -> {72} [color=green]; + 71 -> {75} [style=dotted]; + 71 -> {72} [style=dashed]; + 72 -> {73}; + 73 -> {74}; + 74 -> {75} [color=green]; - subgraph cluster_26 { + subgraph cluster_27 { color=red - 74 [label="Enter class Companion [2]" style="filled" fillcolor=red]; - subgraph cluster_27 { - color=blue - 75 [label="Enter property [3]" style="filled" fillcolor=red]; - 76 [label="Function call: R|/TokenType.TokenType|() [3]" style="filled" fillcolor=yellow]; - 77 [label="Exit property [3]" style="filled" fillcolor=red]; - } + 76 [label="Enter class Companion [3]" style="filled" fillcolor=red]; subgraph cluster_28 { color=blue - 78 [label="Enter function [3]" style="filled" fillcolor=red]; - 79 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; - 80 [label="Exit function [3]" style="filled" fillcolor=red]; + 77 [label="Enter property [4]" style="filled" fillcolor=red]; + 78 [label="Function call: R|/TokenType.TokenType|() [4]" style="filled" fillcolor=yellow]; + 79 [label="Exit property [4]" style="filled" fillcolor=red]; } - 81 [label="Exit class Companion [2]" style="filled" fillcolor=red]; + subgraph cluster_29 { + color=blue + 80 [label="Enter function [4]" style="filled" fillcolor=red]; + 81 [label="Delegated constructor call: super() [4]" style="filled" fillcolor=yellow]; + 82 [label="Exit function [4]" style="filled" fillcolor=red]; + } + 83 [label="Exit class Companion [3]" style="filled" fillcolor=red]; } - 74 -> {75} [color=green]; - 74 -> {81} [style=dotted]; - 74 -> {75 78} [style=dashed]; - 75 -> {76}; - 76 -> {77}; - 77 -> {78} [color=green]; + 76 -> {77} [color=green]; + 76 -> {83} [style=dotted]; + 76 -> {77 80} [style=dashed]; + 77 -> {78}; 78 -> {79}; - 79 -> {80}; - 80 -> {81} [color=green]; - - subgraph cluster_29 { - color=red - 82 [label="Enter class KtModifierKeywordToken [1]" style="filled" fillcolor=red]; - subgraph cluster_30 { - color=blue - 83 [label="Enter function [2]" style="filled" fillcolor=red]; - 84 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; - 85 [label="Exit function [2]" style="filled" fillcolor=red]; - } - 86 [label="Exit class KtModifierKeywordToken [1]" style="filled" fillcolor=red]; - } + 79 -> {80} [color=green]; + 80 -> {81}; + 81 -> {82}; 82 -> {83} [color=green]; - 82 -> {86} [style=dotted]; - 82 -> {83} [style=dashed]; - 83 -> {84}; - 84 -> {85}; - 85 -> {86} [color=green]; - subgraph cluster_31 { + subgraph cluster_30 { color=red - 87 [label="Enter class KtModifierList [1]" style="filled" fillcolor=red]; - subgraph cluster_32 { + 84 [label="Enter class KtModifierKeywordToken [2]" style="filled" fillcolor=red]; + subgraph cluster_31 { color=blue - 88 [label="Enter function [2]" style="filled" fillcolor=red]; - 89 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; - 90 [label="Exit function [2]" style="filled" fillcolor=red]; + 85 [label="Enter function [3]" style="filled" fillcolor=red]; + 86 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; + 87 [label="Exit function [3]" style="filled" fillcolor=red]; } - 91 [label="Exit class KtModifierList [1]" style="filled" fillcolor=red]; + 88 [label="Exit class KtModifierKeywordToken [2]" style="filled" fillcolor=red]; } + 84 -> {85} [color=green]; + 84 -> {88} [style=dotted]; + 84 -> {85} [style=dashed]; + 85 -> {86}; + 86 -> {87}; 87 -> {88} [color=green]; - 87 -> {91} [style=dotted]; - 87 -> {88} [style=dashed]; - 88 -> {89}; - 89 -> {90}; - 90 -> {91} [color=green]; - subgraph cluster_33 { + subgraph cluster_32 { color=red - 92 [label="Enter class KtModifierListOwner [1]" style="filled" fillcolor=red]; - subgraph cluster_34 { + 89 [label="Enter class KtModifierList [2]" style="filled" fillcolor=red]; + subgraph cluster_33 { color=blue - 93 [label="Enter property [2]" style="filled" fillcolor=red]; - 94 [label="Function call: R|/KtModifierList.KtModifierList|() [2]" style="filled" fillcolor=yellow]; - 95 [label="Exit property [2]" style="filled" fillcolor=red]; + 90 [label="Enter function [3]" style="filled" fillcolor=red]; + 91 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; + 92 [label="Exit function [3]" style="filled" fillcolor=red]; } + 93 [label="Exit class KtModifierList [2]" style="filled" fillcolor=red]; + } + 89 -> {90} [color=green]; + 89 -> {93} [style=dotted]; + 89 -> {90} [style=dashed]; + 90 -> {91}; + 91 -> {92}; + 92 -> {93} [color=green]; + + subgraph cluster_34 { + color=red + 94 [label="Enter class KtModifierListOwner [2]" style="filled" fillcolor=red]; subgraph cluster_35 { color=blue - 96 [label="Enter function [2]" style="filled" fillcolor=red]; - 97 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; - 98 [label="Exit function [2]" style="filled" fillcolor=red]; + 95 [label="Enter property [3]" style="filled" fillcolor=red]; + 96 [label="Function call: R|/KtModifierList.KtModifierList|() [3]" style="filled" fillcolor=yellow]; + 97 [label="Exit property [3]" style="filled" fillcolor=red]; } - 99 [label="Exit class KtModifierListOwner [1]" style="filled" fillcolor=red]; - } - 92 -> {93} [color=green]; - 92 -> {99} [style=dotted]; - 92 -> {93 96} [style=dashed]; - 93 -> {94}; - 94 -> {95}; - 95 -> {96} [color=green]; - 96 -> {97}; - 97 -> {98}; - 98 -> {99} [color=green]; - - subgraph cluster_36 { - color=red - 100 [label="Enter class FirModifier [1]" style="filled" fillcolor=red]; - subgraph cluster_37 { + subgraph cluster_36 { color=blue - 101 [label="Enter property [2]" style="filled" fillcolor=red]; - 102 [label="Access variable R|/node| [2]"]; - 103 [label="Exit property [2]" style="filled" fillcolor=red]; + 98 [label="Enter function [3]" style="filled" fillcolor=red]; + 99 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; + 100 [label="Exit function [3]" style="filled" fillcolor=red]; } + 101 [label="Exit class KtModifierListOwner [2]" style="filled" fillcolor=red]; + } + 94 -> {95} [color=green]; + 94 -> {101} [style=dotted]; + 94 -> {95 98} [style=dashed]; + 95 -> {96}; + 96 -> {97}; + 97 -> {98} [color=green]; + 98 -> {99}; + 99 -> {100}; + 100 -> {101} [color=green]; + + subgraph cluster_37 { + color=red + 102 [label="Enter class FirModifier [2]" style="filled" fillcolor=red]; subgraph cluster_38 { color=blue - 104 [label="Enter property [2]" style="filled" fillcolor=red]; - 105 [label="Access variable R|/token| [2]"]; - 106 [label="Exit property [2]" style="filled" fillcolor=red]; + 103 [label="Enter property [3]" style="filled" fillcolor=red]; + 104 [label="Access variable R|/node| [3]"]; + 105 [label="Exit property [3]" style="filled" fillcolor=red]; } subgraph cluster_39 { color=blue - 107 [label="Enter function [2]" style="filled" fillcolor=red]; - 108 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; - 109 [label="Exit function [2]" style="filled" fillcolor=red]; + 106 [label="Enter property [3]" style="filled" fillcolor=red]; + 107 [label="Access variable R|/token| [3]"]; + 108 [label="Exit property [3]" style="filled" fillcolor=red]; } - 110 [label="Exit class FirModifier [1]" style="filled" fillcolor=red]; - } - 100 -> {101} [color=green]; - 100 -> {110} [style=dotted]; - 100 -> {101 104 107} [style=dashed]; - 101 -> {102}; - 102 -> {103}; - 103 -> {104} [color=green]; - 104 -> {105}; - 105 -> {106}; - 106 -> {107} [color=green]; - 107 -> {108}; - 108 -> {109}; - 109 -> {110} [color=green]; - - subgraph cluster_40 { - color=red - 111 [label="Enter class FirPsiModifier [2]" style="filled" fillcolor=red]; - subgraph cluster_41 { + subgraph cluster_40 { color=blue - 112 [label="Enter function [3]" style="filled" fillcolor=red]; - 113 [label="Access variable R|/node| [3]"]; - 114 [label="Access variable R|/token| [3]"]; - 115 [label="Delegated constructor call: super|>(...) [3]" style="filled" fillcolor=yellow]; - 116 [label="Exit function [3]" style="filled" fillcolor=red]; + 109 [label="Enter function [3]" style="filled" fillcolor=red]; + 110 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; + 111 [label="Exit function [3]" style="filled" fillcolor=red]; } - 117 [label="Exit class FirPsiModifier [2]" style="filled" fillcolor=red]; + 112 [label="Exit class FirModifier [2]" style="filled" fillcolor=red]; } + 102 -> {103} [color=green]; + 102 -> {112} [style=dotted]; + 102 -> {103 106 109} [style=dashed]; + 103 -> {104}; + 104 -> {105}; + 105 -> {106} [color=green]; + 106 -> {107}; + 107 -> {108}; + 108 -> {109} [color=green]; + 109 -> {110}; + 110 -> {111}; 111 -> {112} [color=green]; - 111 -> {117} [style=dotted]; - 111 -> {112} [style=dashed]; - 112 -> {113}; - 113 -> {114}; + + subgraph cluster_41 { + color=red + 113 [label="Enter class FirPsiModifier [3]" style="filled" fillcolor=red]; + subgraph cluster_42 { + color=blue + 114 [label="Enter function [4]" style="filled" fillcolor=red]; + 115 [label="Access variable R|/node| [4]"]; + 116 [label="Access variable R|/token| [4]"]; + 117 [label="Delegated constructor call: super|>(...) [4]" style="filled" fillcolor=yellow]; + 118 [label="Exit function [4]" style="filled" fillcolor=red]; + } + 119 [label="Exit class FirPsiModifier [3]" style="filled" fillcolor=red]; + } + 113 -> {114} [color=green]; + 113 -> {119} [style=dotted]; + 113 -> {114} [style=dashed]; 114 -> {115}; 115 -> {116}; - 116 -> {117} [color=green]; + 116 -> {117}; + 117 -> {118}; + 118 -> {119} [color=green]; - subgraph cluster_42 { + subgraph cluster_43 { color=red - 118 [label="Enter class FirLightModifier [2]" style="filled" fillcolor=red]; - subgraph cluster_43 { - color=blue - 119 [label="Enter property [3]" style="filled" fillcolor=red]; - 120 [label="Access variable R|/tree| [3]"]; - 121 [label="Exit property [3]" style="filled" fillcolor=red]; - } + 120 [label="Enter class FirLightModifier [3]" style="filled" fillcolor=red]; subgraph cluster_44 { color=blue - 122 [label="Enter function [3]" style="filled" fillcolor=red]; - 123 [label="Access variable R|/node| [3]"]; - 124 [label="Access variable R|/token| [3]"]; - 125 [label="Delegated constructor call: super|>(...) [3]" style="filled" fillcolor=yellow]; - 126 [label="Exit function [3]" style="filled" fillcolor=red]; + 121 [label="Enter property [4]" style="filled" fillcolor=red]; + 122 [label="Access variable R|/tree| [4]"]; + 123 [label="Exit property [4]" style="filled" fillcolor=red]; } - 127 [label="Exit class FirLightModifier [2]" style="filled" fillcolor=red]; + subgraph cluster_45 { + color=blue + 124 [label="Enter function [4]" style="filled" fillcolor=red]; + 125 [label="Access variable R|/node| [4]"]; + 126 [label="Access variable R|/token| [4]"]; + 127 [label="Delegated constructor call: super|>(...) [4]" style="filled" fillcolor=yellow]; + 128 [label="Exit function [4]" style="filled" fillcolor=red]; + } + 129 [label="Exit class FirLightModifier [3]" style="filled" fillcolor=red]; } - 118 -> {119} [color=green]; - 118 -> {127} [style=dotted]; - 118 -> {119 122} [style=dashed]; - 119 -> {120}; - 120 -> {121}; - 121 -> {122} [color=green]; + 120 -> {121} [color=green]; + 120 -> {129} [style=dotted]; + 120 -> {121 124} [style=dashed]; + 121 -> {122}; 122 -> {123}; - 123 -> {124}; + 123 -> {124} [color=green]; 124 -> {125}; 125 -> {126}; - 126 -> {127} [color=green]; + 126 -> {127}; + 127 -> {128}; + 128 -> {129} [color=green]; - subgraph cluster_45 { + subgraph cluster_46 { color=red - 128 [label="Enter class FirModifierList [1]" style="filled" fillcolor=red]; - subgraph cluster_46 { - color=blue - 129 [label="Enter property [2]" style="filled" fillcolor=red]; - 130 [label="Function call: R|kotlin/collections/emptyList||>() [2]" style="filled" fillcolor=yellow]; - 131 [label="Exit property [2]" style="filled" fillcolor=red]; - } + 130 [label="Enter class FirModifierList [2]" style="filled" fillcolor=red]; subgraph cluster_47 { color=blue - 132 [label="Enter function [2]" style="filled" fillcolor=red]; - 133 [label="Delegated constructor call: super() [2]" style="filled" fillcolor=yellow]; - 134 [label="Exit function [2]" style="filled" fillcolor=red]; + 131 [label="Enter property [3]" style="filled" fillcolor=red]; + 132 [label="Function call: R|kotlin/collections/emptyList||>() [3]" style="filled" fillcolor=yellow]; + 133 [label="Exit property [3]" style="filled" fillcolor=red]; } - 135 [label="Exit class FirModifierList [1]" style="filled" fillcolor=red]; - } - 128 -> {129} [color=green]; - 128 -> {135} [style=dotted]; - 128 -> {129 132} [style=dashed]; - 129 -> {130}; - 130 -> {131}; - 131 -> {132} [color=green]; - 132 -> {133}; - 133 -> {134}; - 134 -> {135} [color=green]; - - subgraph cluster_48 { - color=red - 136 [label="Enter class FirPsiModifierList [2]" style="filled" fillcolor=red]; - subgraph cluster_49 { + subgraph cluster_48 { color=blue - 137 [label="Enter property [3]" style="filled" fillcolor=red]; - 138 [label="Access variable R|/modifierList| [3]"]; - 139 [label="Exit property [3]" style="filled" fillcolor=red]; + 134 [label="Enter function [3]" style="filled" fillcolor=red]; + 135 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; + 136 [label="Exit function [3]" style="filled" fillcolor=red]; } + 137 [label="Exit class FirModifierList [2]" style="filled" fillcolor=red]; + } + 130 -> {131} [color=green]; + 130 -> {137} [style=dotted]; + 130 -> {131 134} [style=dashed]; + 131 -> {132}; + 132 -> {133}; + 133 -> {134} [color=green]; + 134 -> {135}; + 135 -> {136}; + 136 -> {137} [color=green]; + + subgraph cluster_49 { + color=red + 138 [label="Enter class FirPsiModifierList [3]" style="filled" fillcolor=red]; subgraph cluster_50 { color=blue - 140 [label="Enter function [3]" style="filled" fillcolor=red]; - 141 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; - 142 [label="Exit function [3]" style="filled" fillcolor=red]; + 139 [label="Enter property [4]" style="filled" fillcolor=red]; + 140 [label="Access variable R|/modifierList| [4]"]; + 141 [label="Exit property [4]" style="filled" fillcolor=red]; } - 143 [label="Exit class FirPsiModifierList [2]" style="filled" fillcolor=red]; - } - 136 -> {137} [color=green]; - 136 -> {143} [style=dotted]; - 136 -> {137 140} [style=dashed]; - 137 -> {138}; - 138 -> {139}; - 139 -> {140} [color=green]; - 140 -> {141}; - 141 -> {142}; - 142 -> {143} [color=green]; - - subgraph cluster_51 { - color=red - 144 [label="Enter class FirLightModifierList [2]" style="filled" fillcolor=red]; - subgraph cluster_52 { + subgraph cluster_51 { color=blue - 145 [label="Enter property [3]" style="filled" fillcolor=red]; - 146 [label="Access variable R|/modifierList| [3]"]; - 147 [label="Exit property [3]" style="filled" fillcolor=red]; + 142 [label="Enter function [4]" style="filled" fillcolor=red]; + 143 [label="Delegated constructor call: super() [4]" style="filled" fillcolor=yellow]; + 144 [label="Exit function [4]" style="filled" fillcolor=red]; } + 145 [label="Exit class FirPsiModifierList [3]" style="filled" fillcolor=red]; + } + 138 -> {139} [color=green]; + 138 -> {145} [style=dotted]; + 138 -> {139 142} [style=dashed]; + 139 -> {140}; + 140 -> {141}; + 141 -> {142} [color=green]; + 142 -> {143}; + 143 -> {144}; + 144 -> {145} [color=green]; + + subgraph cluster_52 { + color=red + 146 [label="Enter class FirLightModifierList [3]" style="filled" fillcolor=red]; subgraph cluster_53 { color=blue - 148 [label="Enter property [3]" style="filled" fillcolor=red]; - 149 [label="Access variable R|/tree| [3]"]; - 150 [label="Exit property [3]" style="filled" fillcolor=red]; + 147 [label="Enter property [4]" style="filled" fillcolor=red]; + 148 [label="Access variable R|/modifierList| [4]"]; + 149 [label="Exit property [4]" style="filled" fillcolor=red]; } subgraph cluster_54 { color=blue - 151 [label="Enter function [3]" style="filled" fillcolor=red]; - 152 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; - 153 [label="Exit function [3]" style="filled" fillcolor=red]; + 150 [label="Enter property [4]" style="filled" fillcolor=red]; + 151 [label="Access variable R|/tree| [4]"]; + 152 [label="Exit property [4]" style="filled" fillcolor=red]; } - 154 [label="Exit class FirLightModifierList [2]" style="filled" fillcolor=red]; + subgraph cluster_55 { + color=blue + 153 [label="Enter function [4]" style="filled" fillcolor=red]; + 154 [label="Delegated constructor call: super() [4]" style="filled" fillcolor=yellow]; + 155 [label="Exit function [4]" style="filled" fillcolor=red]; + } + 156 [label="Exit class FirLightModifierList [3]" style="filled" fillcolor=red]; } - 144 -> {145} [color=green]; - 144 -> {154} [style=dotted]; - 144 -> {145 148 151} [style=dashed]; - 145 -> {146}; - 146 -> {147}; - 147 -> {148} [color=green]; + 146 -> {147} [color=green]; + 146 -> {156} [style=dotted]; + 146 -> {147 150 153} [style=dashed]; + 147 -> {148}; 148 -> {149}; - 149 -> {150}; - 150 -> {151} [color=green]; + 149 -> {150} [color=green]; + 150 -> {151}; 151 -> {152}; - 152 -> {153}; - 153 -> {154} [color=green]; - - subgraph cluster_55 { - color=red - 155 [label="Enter class Companion [2]" style="filled" fillcolor=red]; - subgraph cluster_56 { - color=blue - 156 [label="Enter function [3]" style="filled" fillcolor=red]; - 157 [label="Delegated constructor call: super() [3]" style="filled" fillcolor=yellow]; - 158 [label="Exit function [3]" style="filled" fillcolor=red]; - } - 159 [label="Exit class Companion [2]" style="filled" fillcolor=red]; - } + 152 -> {153} [color=green]; + 153 -> {154}; + 154 -> {155}; 155 -> {156} [color=green]; - 155 -> {159} [style=dotted]; - 155 -> {156} [style=dashed]; - 156 -> {157}; - 157 -> {158}; - 158 -> {159} [color=green]; - subgraph cluster_57 { + subgraph cluster_56 { color=red - 160 [label="Enter function getModifierList [3]" style="filled" fillcolor=red]; - subgraph cluster_58 { + 157 [label="Enter class Companion [3]" style="filled" fillcolor=red]; + subgraph cluster_57 { color=blue - 161 [label="Enter block [3]"]; - subgraph cluster_59 { + 158 [label="Enter function [4]" style="filled" fillcolor=red]; + 159 [label="Delegated constructor call: super() [4]" style="filled" fillcolor=yellow]; + 160 [label="Exit function [4]" style="filled" fillcolor=red]; + } + 161 [label="Exit class Companion [3]" style="filled" fillcolor=red]; + } + 157 -> {158} [color=green]; + 157 -> {161} [style=dotted]; + 157 -> {158} [style=dashed]; + 158 -> {159}; + 159 -> {160}; + 160 -> {161} [color=green]; + + subgraph cluster_58 { + color=red + 162 [label="Enter function getModifierList [4]" style="filled" fillcolor=red]; + subgraph cluster_59 { + color=blue + 163 [label="Enter block [4]"]; + subgraph cluster_60 { color=blue - 162 [label="Enter when [3]"]; - 163 [label="Access variable this@R|/FirModifierList.Companion.getModifierList| [3]"]; - subgraph cluster_60 { - color=blue - 164 [label="Enter when branch condition [3]"]; - 165 [label="Exit $subj [3]"]; - 166 [label="Const: Null(null) [3]"]; - 167 [label="Equality operator == [3]"]; - 168 [label="Exit when branch condition [3]"]; - } + 164 [label="Enter when [4]"]; + 165 [label="Access variable this@R|/FirModifierList.Companion.getModifierList| [4]"]; subgraph cluster_61 { color=blue - 169 [label="Enter when branch condition [3]"]; - 170 [label="Exit $subj [3]"]; - 171 [label="Type operator: ($subj$ is R|FirPsiSourceElement|) [3]"]; - 172 [label="Exit when branch condition [3]"]; + 166 [label="Enter when branch condition [4]"]; + 167 [label="Exit $subj [4]"]; + 168 [label="Const: Null(null) [4]"]; + 169 [label="Equality operator == [4]"]; + 170 [label="Exit when branch condition [4]"]; } subgraph cluster_62 { color=blue - 173 [label="Enter when branch condition [3]"]; - 174 [label="Exit $subj [3]"]; - 175 [label="Type operator: ($subj$ is R|FirLightSourceElement|) [3]"]; - 176 [label="Exit when branch condition [3]"]; + 171 [label="Enter when branch condition [4]"]; + 172 [label="Exit $subj [4]"]; + 173 [label="Type operator: ($subj$ is R|FirPsiSourceElement|) [4]"]; + 174 [label="Exit when branch condition [4]"]; } - 177 [label="Enter when branch result [3]"]; subgraph cluster_63 { color=blue - 178 [label="Enter block [3]"]; - 179 [label="Access variable R|/FirLightSourceElement.lighterASTNode| [3]"]; - 180 [label="Access variable R|/FirLightSourceElement.treeStructure| [3]"]; - 181 [label="Function call: this@R|/FirModifierList.Companion.getModifierList|.R|/FirLightSourceElement.lighterASTNode|.R|/LighterASTNode.getChildren|(...) [3]" style="filled" fillcolor=yellow]; - 182 [label="Postponed enter to lambda [3]"]; - subgraph cluster_64 { - color=blue - 183 [label="Enter function [4]" style="filled" fillcolor=red]; - subgraph cluster_65 { - color=blue - 184 [label="Enter block [4]"]; - 185 [label="Access variable R|/it| [4]"]; - 186 [label="Enter safe call [4]"]; - 187 [label="Access variable R|/LighterASTNode.tokenType| [4]"]; - 188 [label="Exit safe call [4]"]; - 189 [label="Access qualifier /TokenType [4]"]; - 190 [label="Access variable R|/TokenType.Companion.MODIFIER_LIST| [4]"]; - 191 [label="Equality operator == [4]"]; - 192 [label="Exit block [4]"]; - } - 193 [label="Exit function [4]" style="filled" fillcolor=red]; - } - 194 [label="Postponed exit from lambda [3]"]; - 195 [label="Function call: this@R|/FirModifierList.Companion.getModifierList|.R|/FirLightSourceElement.lighterASTNode|.R|/LighterASTNode.getChildren|(...).R|kotlin/collections/find|(...) [3]" style="filled" fillcolor=yellow]; - 196 [label="Exit lhs of ?: [3]"]; - 197 [label="Enter rhs of ?: [3]"]; - 198 [label="Const: Null(null) [3]"]; - 199 [label="Jump: ^getModifierList Null(null) [3]"]; - 200 [label="Stub [3]" style="filled" fillcolor=gray]; - 201 [label="Lhs of ?: is not null [3]"]; - 202 [label="Exit ?: [3]"]; - 203 [label="Variable declaration: lval modifierListNode: R|LighterASTNode| [3]"]; - 204 [label="Access variable R|/modifierListNode| [3]"]; - 205 [label="Access variable R|/FirLightSourceElement.treeStructure| [3]"]; - 206 [label="Function call: R|/FirModifierList.FirLightModifierList.FirLightModifierList|(...) [3]" style="filled" fillcolor=yellow]; - 207 [label="Exit block [3]"]; + 175 [label="Enter when branch condition [4]"]; + 176 [label="Exit $subj [4]"]; + 177 [label="Type operator: ($subj$ is R|FirLightSourceElement|) [4]"]; + 178 [label="Exit when branch condition [4]"]; } - 208 [label="Exit when branch result [3]"]; - 209 [label="Enter when branch result [3]"]; - subgraph cluster_66 { + 179 [label="Enter when branch result [4]"]; + subgraph cluster_64 { color=blue - 210 [label="Enter block [3]"]; - 211 [label="Access variable R|/FirPsiSourceElement.psi| [3]"]; - 212 [label="Type operator: (this@R|/FirModifierList.Companion.getModifierList|.R|/FirPsiSourceElement.psi| as? R|KtModifierListOwner|) [3]"]; - 213 [label="Enter safe call [3]"]; - 214 [label="Access variable R|/KtModifierListOwner.modifierList| [3]"]; - 215 [label="Enter safe call [3]"]; - 216 [label="Postponed enter to lambda [3]"]; - subgraph cluster_67 { + 180 [label="Enter block [4]"]; + 181 [label="Access variable R|/FirLightSourceElement.lighterASTNode| [4]"]; + 182 [label="Access variable R|/FirLightSourceElement.treeStructure| [4]"]; + 183 [label="Function call: this@R|/FirModifierList.Companion.getModifierList|.R|/FirLightSourceElement.lighterASTNode|.R|/LighterASTNode.getChildren|(...) [4]" style="filled" fillcolor=yellow]; + 184 [label="Postponed enter to lambda [4]"]; + subgraph cluster_65 { color=blue - 217 [label="Enter function [4]" style="filled" fillcolor=red]; - subgraph cluster_68 { + 185 [label="Enter function [5]" style="filled" fillcolor=red]; + subgraph cluster_66 { color=blue - 218 [label="Enter block [4]"]; - 219 [label="Access variable R|/it| [4]"]; - 220 [label="Function call: R|/FirModifierList.FirPsiModifierList.FirPsiModifierList|(...) [4]" style="filled" fillcolor=yellow]; - 221 [label="Exit block [4]"]; + 186 [label="Enter block [5]"]; + 187 [label="Access variable R|/it| [5]"]; + 188 [label="Enter safe call [5]"]; + 189 [label="Access variable R|/LighterASTNode.tokenType| [5]"]; + 190 [label="Exit safe call [5]"]; + 191 [label="Access qualifier /TokenType [5]"]; + 192 [label="Access variable R|/TokenType.Companion.MODIFIER_LIST| [5]"]; + 193 [label="Equality operator == [5]"]; + 194 [label="Exit block [5]"]; } - 222 [label="Exit function [4]" style="filled" fillcolor=red]; + 195 [label="Exit function [5]" style="filled" fillcolor=red]; } - 223 [label="Postponed exit from lambda [3]"]; - 224 [label="Function call: $subj$.R|kotlin/let|(...) [3]" style="filled" fillcolor=yellow]; - 225 [label="Exit safe call [3]"]; - 226 [label="Exit safe call [3]"]; - 227 [label="Exit block [3]"]; + 196 [label="Postponed exit from lambda [4]"]; + 197 [label="Function call: this@R|/FirModifierList.Companion.getModifierList|.R|/FirLightSourceElement.lighterASTNode|.R|/LighterASTNode.getChildren|(...).R|kotlin/collections/find|(...) [4]" style="filled" fillcolor=yellow]; + 198 [label="Exit lhs of ?: [4]"]; + 199 [label="Enter rhs of ?: [4]"]; + 200 [label="Const: Null(null) [4]"]; + 201 [label="Jump: ^getModifierList Null(null) [4]"]; + 202 [label="Stub [4]" style="filled" fillcolor=gray]; + 203 [label="Lhs of ?: is not null [4]"]; + 204 [label="Exit ?: [4]"]; + 205 [label="Variable declaration: lval modifierListNode: R|LighterASTNode| [4]"]; + 206 [label="Access variable R|/modifierListNode| [4]"]; + 207 [label="Access variable R|/FirLightSourceElement.treeStructure| [4]"]; + 208 [label="Function call: R|/FirModifierList.FirLightModifierList.FirLightModifierList|(...) [4]" style="filled" fillcolor=yellow]; + 209 [label="Exit block [4]"]; } - 228 [label="Exit when branch result [3]"]; - 229 [label="Merge postponed lambda exits [3]"]; - 230 [label="Enter when branch result [3]"]; - subgraph cluster_69 { + 210 [label="Exit when branch result [4]"]; + 211 [label="Enter when branch result [4]"]; + subgraph cluster_67 { color=blue - 231 [label="Enter block [3]"]; - 232 [label="Const: Null(null) [3]"]; - 233 [label="Exit block [3]"]; + 212 [label="Enter block [4]"]; + 213 [label="Access variable R|/FirPsiSourceElement.psi| [4]"]; + 214 [label="Type operator: (this@R|/FirModifierList.Companion.getModifierList|.R|/FirPsiSourceElement.psi| as? R|KtModifierListOwner|) [4]"]; + 215 [label="Enter safe call [4]"]; + 216 [label="Access variable R|/KtModifierListOwner.modifierList| [4]"]; + 217 [label="Enter safe call [4]"]; + 218 [label="Postponed enter to lambda [4]"]; + subgraph cluster_68 { + color=blue + 219 [label="Enter function [5]" style="filled" fillcolor=red]; + subgraph cluster_69 { + color=blue + 220 [label="Enter block [5]"]; + 221 [label="Access variable R|/it| [5]"]; + 222 [label="Function call: R|/FirModifierList.FirPsiModifierList.FirPsiModifierList|(...) [5]" style="filled" fillcolor=yellow]; + 223 [label="Exit block [5]"]; + } + 224 [label="Exit function [5]" style="filled" fillcolor=red]; + } + 225 [label="Postponed exit from lambda [4]"]; + 226 [label="Function call: $subj$.R|kotlin/let|(...) [4]" style="filled" fillcolor=yellow]; + 227 [label="Exit safe call [4]"]; + 228 [label="Exit safe call [4]"]; + 229 [label="Exit block [4]"]; } - 234 [label="Exit when branch result [3]"]; - 235 [label="Exit when [3]"]; + 230 [label="Exit when branch result [4]"]; + 231 [label="Merge postponed lambda exits [4]"]; + 232 [label="Enter when branch result [4]"]; + subgraph cluster_70 { + color=blue + 233 [label="Enter block [4]"]; + 234 [label="Const: Null(null) [4]"]; + 235 [label="Exit block [4]"]; + } + 236 [label="Exit when branch result [4]"]; + 237 [label="Exit when [4]"]; } - 236 [label="Jump: ^getModifierList when (this@R|/FirModifierList.Companion.getModifierList|) { + 238 [label="Jump: ^getModifierList when (this@R|/FirModifierList.Companion.getModifierList|) { ==($subj$, Null(null)) -> { Null(null) } @@ -665,27 +672,25 @@ digraph kt44814_kt { R|/FirModifierList.FirLightModifierList.FirLightModifierList|(R|/modifierListNode|, this@R|/FirModifierList.Companion.getModifierList|.R|/FirLightSourceElement.treeStructure|) } } - [3]"]; - 237 [label="Stub [3]" style="filled" fillcolor=gray]; - 238 [label="Exit block [3]" style="filled" fillcolor=gray]; + [4]"]; + 239 [label="Stub [4]" style="filled" fillcolor=gray]; + 240 [label="Exit block [4]" style="filled" fillcolor=gray]; } - 239 [label="Exit function getModifierList [3]" style="filled" fillcolor=red]; + 241 [label="Exit function getModifierList [4]" style="filled" fillcolor=red]; } - 160 -> {161}; - 161 -> {162}; 162 -> {163}; 163 -> {164}; 164 -> {165}; 165 -> {166}; 166 -> {167}; 167 -> {168}; - 168 -> {169 230}; + 168 -> {169}; 169 -> {170}; - 170 -> {171}; + 170 -> {171 232}; 171 -> {172}; - 172 -> {173 209}; + 172 -> {173}; 173 -> {174}; - 174 -> {175}; + 174 -> {175 211}; 175 -> {176}; 176 -> {177}; 177 -> {178}; @@ -693,121 +698,123 @@ digraph kt44814_kt { 179 -> {180}; 180 -> {181}; 181 -> {182}; - 182 -> {183 194 195}; - 182 -> {183} [style=dashed]; + 182 -> {183}; 183 -> {184}; - 184 -> {185}; - 185 -> {186 188}; + 184 -> {185 196 197}; + 184 -> {185} [style=dashed]; + 185 -> {186}; 186 -> {187}; - 187 -> {188}; + 187 -> {188 190}; 188 -> {189}; 189 -> {190}; 190 -> {191}; 191 -> {192}; 192 -> {193}; 193 -> {194}; - 194 -> {182} [color=green style=dashed]; - 194 -> {195} [color=green]; - 194 -> {202} [style=dotted]; + 194 -> {195}; 195 -> {196}; - 196 -> {197 201}; + 196 -> {184} [color=green style=dashed]; + 196 -> {197} [color=green]; + 196 -> {204} [style=dotted]; 197 -> {198}; - 198 -> {199}; - 199 -> {239}; - 199 -> {200} [style=dotted]; - 200 -> {202} [style=dotted]; - 201 -> {202}; - 202 -> {203}; + 198 -> {199 203}; + 199 -> {200}; + 200 -> {201}; + 201 -> {241}; + 201 -> {202} [style=dotted]; + 202 -> {204} [style=dotted]; 203 -> {204}; 204 -> {205}; 205 -> {206}; 206 -> {207}; 207 -> {208}; - 208 -> {235}; + 208 -> {209}; 209 -> {210}; - 210 -> {211}; + 210 -> {237}; 211 -> {212}; - 212 -> {213 225}; + 212 -> {213}; 213 -> {214}; - 214 -> {215 225}; + 214 -> {215 227}; 215 -> {216}; - 216 -> {217 224}; - 216 -> {223} [style=dotted]; - 216 -> {217} [style=dashed]; + 216 -> {217 227}; 217 -> {218}; - 218 -> {219}; + 218 -> {219 226}; + 218 -> {225} [style=dotted]; + 218 -> {219} [style=dashed]; 219 -> {220}; 220 -> {221}; 221 -> {222}; 222 -> {223}; - 223 -> {224} [color=green]; - 223 -> {229} [color=red]; - 224 -> {226}; - 225 -> {226}; - 226 -> {227 229}; + 223 -> {224}; + 224 -> {225}; + 225 -> {226} [color=green]; + 225 -> {231} [color=red]; + 226 -> {228}; 227 -> {228}; - 228 -> {235}; - 229 -> {235} [color=red]; - 230 -> {231}; - 231 -> {232}; + 228 -> {229 231}; + 229 -> {230}; + 230 -> {237}; + 231 -> {237} [color=red]; 232 -> {233}; 233 -> {234}; 234 -> {235}; 235 -> {236}; - 236 -> {239}; - 236 -> {237} [style=dotted]; - 237 -> {238} [style=dotted]; + 236 -> {237}; + 237 -> {238}; + 238 -> {241}; 238 -> {239} [style=dotted]; + 239 -> {240} [style=dotted]; + 240 -> {241} [style=dotted]; - subgraph cluster_70 { + subgraph cluster_71 { color=red - 240 [label="Enter function boxImpl [3]" style="filled" fillcolor=red]; - subgraph cluster_71 { + 242 [label="Enter function boxImpl [4]" style="filled" fillcolor=red]; + subgraph cluster_72 { color=blue - 241 [label="Enter block [3]"]; - 242 [label="Function call: R|/LighterASTNode.LighterASTNode|() [3]" style="filled" fillcolor=yellow]; - 243 [label="Function call: R|kotlin/collections/listOf|(...) [3]" style="filled" fillcolor=yellow]; - 244 [label="Function call: R|/LighterASTNode.LighterASTNode|(...) [3]" style="filled" fillcolor=yellow]; - 245 [label="Function call: R|/FlyweightCapableTreeStructure.FlyweightCapableTreeStructure|() [3]" style="filled" fillcolor=yellow]; - 246 [label="Function call: R|/FirLightSourceElement.FirLightSourceElement|(...) [3]" style="filled" fillcolor=yellow]; - 247 [label="Variable declaration: lval sourceElement: R|FirSourceElement?| [3]"]; - 248 [label="Access variable R|/sourceElement| [3]"]; - 249 [label="Function call: (this@R|/FirModifierList.Companion|, R|/sourceElement|).R|/FirModifierList.Companion.getModifierList|() [3]" style="filled" fillcolor=yellow]; - 250 [label="Variable declaration: lval result: R|FirModifierList?| [3]"]; - subgraph cluster_72 { + 243 [label="Enter block [4]"]; + 244 [label="Function call: R|/LighterASTNode.LighterASTNode|() [4]" style="filled" fillcolor=yellow]; + 245 [label="Function call: R|kotlin/collections/listOf|(...) [4]" style="filled" fillcolor=yellow]; + 246 [label="Function call: R|/LighterASTNode.LighterASTNode|(...) [4]" style="filled" fillcolor=yellow]; + 247 [label="Function call: R|/FlyweightCapableTreeStructure.FlyweightCapableTreeStructure|() [4]" style="filled" fillcolor=yellow]; + 248 [label="Function call: R|/FirLightSourceElement.FirLightSourceElement|(...) [4]" style="filled" fillcolor=yellow]; + 249 [label="Variable declaration: lval sourceElement: R|FirSourceElement?| [4]"]; + 250 [label="Access variable R|/sourceElement| [4]"]; + 251 [label="Function call: (this@R|/FirModifierList.Companion|, R|/sourceElement|).R|/FirModifierList.Companion.getModifierList|() [4]" style="filled" fillcolor=yellow]; + 252 [label="Variable declaration: lval result: R|FirModifierList?| [4]"]; + subgraph cluster_73 { color=blue - 251 [label="Enter when [3]"]; - subgraph cluster_73 { - color=blue - 252 [label="Enter when branch condition [3]"]; - 253 [label="Access variable R|/result| [3]"]; - 254 [label="Type operator: (R|/result| is R|FirModifierList.FirLightModifierList|) [3]"]; - 255 [label="Exit when branch condition [3]"]; - } + 253 [label="Enter when [4]"]; subgraph cluster_74 { color=blue - 256 [label="Enter when branch condition else [3]"]; - 257 [label="Exit when branch condition [3]"]; + 254 [label="Enter when branch condition [4]"]; + 255 [label="Access variable R|/result| [4]"]; + 256 [label="Type operator: (R|/result| is R|FirModifierList.FirLightModifierList|) [4]"]; + 257 [label="Exit when branch condition [4]"]; } - 258 [label="Enter when branch result [3]"]; subgraph cluster_75 { color=blue - 259 [label="Enter block [3]"]; - 260 [label="Const: String(Fail) [3]"]; - 261 [label="Exit block [3]"]; + 258 [label="Enter when branch condition else [4]"]; + 259 [label="Exit when branch condition [4]"]; } - 262 [label="Exit when branch result [3]"]; - 263 [label="Enter when branch result [3]"]; + 260 [label="Enter when branch result [4]"]; subgraph cluster_76 { color=blue - 264 [label="Enter block [3]"]; - 265 [label="Const: String(OK) [3]"]; - 266 [label="Exit block [3]"]; + 261 [label="Enter block [4]"]; + 262 [label="Const: String(Fail) [4]"]; + 263 [label="Exit block [4]"]; } - 267 [label="Exit when branch result [3]"]; - 268 [label="Exit when [3]"]; + 264 [label="Exit when branch result [4]"]; + 265 [label="Enter when branch result [4]"]; + subgraph cluster_77 { + color=blue + 266 [label="Enter block [4]"]; + 267 [label="Const: String(OK) [4]"]; + 268 [label="Exit block [4]"]; + } + 269 [label="Exit when branch result [4]"]; + 270 [label="Exit when [4]"]; } - 269 [label="Jump: ^boxImpl when () { + 271 [label="Jump: ^boxImpl when () { (R|/result| is R|FirModifierList.FirLightModifierList|) -> { String(OK) } @@ -815,14 +822,12 @@ digraph kt44814_kt { String(Fail) } } - [3]"]; - 270 [label="Stub [3]" style="filled" fillcolor=gray]; - 271 [label="Exit block [3]" style="filled" fillcolor=gray]; + [4]"]; + 272 [label="Stub [4]" style="filled" fillcolor=gray]; + 273 [label="Exit block [4]" style="filled" fillcolor=gray]; } - 272 [label="Exit function boxImpl [3]" style="filled" fillcolor=red]; + 274 [label="Exit function boxImpl [4]" style="filled" fillcolor=red]; } - 240 -> {241}; - 241 -> {242}; 242 -> {243}; 243 -> {244}; 244 -> {245}; @@ -836,46 +841,48 @@ digraph kt44814_kt { 252 -> {253}; 253 -> {254}; 254 -> {255}; - 255 -> {256 263}; + 255 -> {256}; 256 -> {257}; - 257 -> {258}; + 257 -> {258 265}; 258 -> {259}; 259 -> {260}; 260 -> {261}; 261 -> {262}; - 262 -> {268}; + 262 -> {263}; 263 -> {264}; - 264 -> {265}; + 264 -> {270}; 265 -> {266}; 266 -> {267}; 267 -> {268}; 268 -> {269}; - 269 -> {272}; - 269 -> {270} [style=dotted]; - 270 -> {271} [style=dotted]; + 269 -> {270}; + 270 -> {271}; + 271 -> {274}; 271 -> {272} [style=dotted]; + 272 -> {273} [style=dotted]; + 273 -> {274} [style=dotted]; - subgraph cluster_77 { + subgraph cluster_78 { color=red - 273 [label="Enter function box [1]" style="filled" fillcolor=red]; - subgraph cluster_78 { + 275 [label="Enter function box [2]" style="filled" fillcolor=red]; + subgraph cluster_79 { color=blue - 274 [label="Enter block [1]"]; - 275 [label="Access qualifier /FirModifierList [1]"]; - 276 [label="Function call: Q|FirModifierList|.R|/FirModifierList.Companion.boxImpl|() [1]" style="filled" fillcolor=yellow]; - 277 [label="Jump: ^box Q|FirModifierList|.R|/FirModifierList.Companion.boxImpl|() [1]"]; - 278 [label="Stub [1]" style="filled" fillcolor=gray]; - 279 [label="Exit block [1]" style="filled" fillcolor=gray]; + 276 [label="Enter block [2]"]; + 277 [label="Access qualifier /FirModifierList [2]"]; + 278 [label="Function call: Q|FirModifierList|.R|/FirModifierList.Companion.boxImpl|() [2]" style="filled" fillcolor=yellow]; + 279 [label="Jump: ^box Q|FirModifierList|.R|/FirModifierList.Companion.boxImpl|() [2]"]; + 280 [label="Stub [2]" style="filled" fillcolor=gray]; + 281 [label="Exit block [2]" style="filled" fillcolor=gray]; } - 280 [label="Exit function box [1]" style="filled" fillcolor=red]; + 282 [label="Exit function box [2]" style="filled" fillcolor=red]; } - 273 -> {274}; - 274 -> {275}; 275 -> {276}; 276 -> {277}; - 277 -> {280}; - 277 -> {278} [style=dotted]; - 278 -> {279} [style=dotted]; + 277 -> {278}; + 278 -> {279}; + 279 -> {282}; 279 -> {280} [style=dotted]; + 280 -> {281} [style=dotted]; + 281 -> {282} [style=dotted]; } diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn/singleReturnFromTry.dot b/compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn/singleReturnFromTry.dot index 2bbdaaaced9..984b8d40186 100644 --- a/compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn/singleReturnFromTry.dot +++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn/singleReturnFromTry.dot @@ -5,386 +5,391 @@ digraph singleReturnFromTry_kt { subgraph cluster_0 { color=red - 0 [label="Enter function myRun" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter block"]; - 2 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; - 3 [label="Jump: ^myRun R|/block|.R|SubstitutionOverride|()"]; - 4 [label="Stub" style="filled" fillcolor=gray]; - 5 [label="Exit block" style="filled" fillcolor=gray]; - } - 6 [label="Exit function myRun" style="filled" fillcolor=red]; + 0 [label="Enter file singleReturnFromTry.kt" style="filled" fillcolor=red]; + 1 [label="Exit file singleReturnFromTry.kt" style="filled" fillcolor=red]; } - 0 -> {1}; - 1 -> {2}; - 2 -> {3}; - 3 -> {6}; - 3 -> {4} [style=dotted]; - 4 -> {5} [style=dotted]; - 5 -> {6} [style=dotted]; + 0 -> {1} [color=green]; - subgraph cluster_2 { + subgraph cluster_1 { color=red - 7 [label="Enter function test_1" style="filled" fillcolor=red]; - subgraph cluster_3 { + 2 [label="Enter function myRun" style="filled" fillcolor=red]; + subgraph cluster_2 { color=blue - 8 [label="Enter block"]; - 9 [label="Postponed enter to lambda"]; - subgraph cluster_4 { - color=blue - 10 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_5 { - color=blue - 11 [label="Enter block"]; - 12 [label="Const: Int(2)"]; - 13 [label="Jump: ^test_1 Int(2)"]; - 14 [label="Stub" style="filled" fillcolor=gray]; - 15 [label="Exit block" style="filled" fillcolor=gray]; - } - 16 [label="Exit function " style="filled" fillcolor=gray]; - } - 17 [label="Postponed exit from lambda"]; - 18 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 19 [label="Stub" style="filled" fillcolor=gray]; - 20 [label="Exit block" style="filled" fillcolor=gray]; + 3 [label="Enter block"]; + 4 [label="Function call: R|/block|.R|SubstitutionOverride|()" style="filled" fillcolor=yellow]; + 5 [label="Jump: ^myRun R|/block|.R|SubstitutionOverride|()"]; + 6 [label="Stub" style="filled" fillcolor=gray]; + 7 [label="Exit block" style="filled" fillcolor=gray]; } - 21 [label="Exit function test_1" style="filled" fillcolor=red]; + 8 [label="Exit function myRun" style="filled" fillcolor=red]; } - 7 -> {8}; - 8 -> {9}; - 9 -> {10 17 18}; - 9 -> {10} [style=dashed]; + 2 -> {3}; + 3 -> {4}; + 4 -> {5}; + 5 -> {8}; + 5 -> {6} [style=dotted]; + 6 -> {7} [style=dotted]; + 7 -> {8} [style=dotted]; + + subgraph cluster_3 { + color=red + 9 [label="Enter function test_1" style="filled" fillcolor=red]; + subgraph cluster_4 { + color=blue + 10 [label="Enter block"]; + 11 [label="Postponed enter to lambda"]; + subgraph cluster_5 { + color=blue + 12 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_6 { + color=blue + 13 [label="Enter block"]; + 14 [label="Const: Int(2)"]; + 15 [label="Jump: ^test_1 Int(2)"]; + 16 [label="Stub" style="filled" fillcolor=gray]; + 17 [label="Exit block" style="filled" fillcolor=gray]; + } + 18 [label="Exit function " style="filled" fillcolor=gray]; + } + 19 [label="Postponed exit from lambda"]; + 20 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + 21 [label="Stub" style="filled" fillcolor=gray]; + 22 [label="Exit block" style="filled" fillcolor=gray]; + } + 23 [label="Exit function test_1" style="filled" fillcolor=red]; + } + 9 -> {10}; 10 -> {11}; - 11 -> {12}; + 11 -> {12 19 20}; + 11 -> {12} [style=dashed]; 12 -> {13}; - 13 -> {21}; - 13 -> {14} [style=dotted]; - 14 -> {15} [style=dotted]; + 13 -> {14}; + 14 -> {15}; + 15 -> {23}; 15 -> {16} [style=dotted]; 16 -> {17} [style=dotted]; - 17 -> {18}; - 17 -> {9} [color=green style=dashed]; + 17 -> {18} [style=dotted]; 18 -> {19} [style=dotted]; - 19 -> {20} [style=dotted]; + 19 -> {20}; + 19 -> {11} [color=green style=dashed]; 20 -> {21} [style=dotted]; + 21 -> {22} [style=dotted]; + 22 -> {23} [style=dotted]; - subgraph cluster_6 { + subgraph cluster_7 { color=red - 22 [label="Enter function test_2" style="filled" fillcolor=red]; - subgraph cluster_7 { + 24 [label="Enter function test_2" style="filled" fillcolor=red]; + subgraph cluster_8 { color=blue - 23 [label="Enter block"]; - subgraph cluster_8 { + 25 [label="Enter block"]; + subgraph cluster_9 { color=blue - 24 [label="Try expression enter"]; - subgraph cluster_9 { + 26 [label="Try expression enter"]; + subgraph cluster_10 { color=blue - 25 [label="Try main block enter"]; - subgraph cluster_10 { + 27 [label="Try main block enter"]; + subgraph cluster_11 { color=blue - 26 [label="Enter block"]; - 27 [label="Const: Int(2)"]; - 28 [label="Jump: ^test_2 Int(2)"]; - 29 [label="Stub" style="filled" fillcolor=gray]; - 30 [label="Exit block" style="filled" fillcolor=gray]; + 28 [label="Enter block"]; + 29 [label="Const: Int(2)"]; + 30 [label="Jump: ^test_2 Int(2)"]; + 31 [label="Stub" style="filled" fillcolor=gray]; + 32 [label="Exit block" style="filled" fillcolor=gray]; } - 31 [label="Try main block exit" style="filled" fillcolor=gray]; + 33 [label="Try main block exit" style="filled" fillcolor=gray]; } - subgraph cluster_11 { + subgraph cluster_12 { color=blue - 32 [label="Enter finally"]; - subgraph cluster_12 { + 34 [label="Enter finally"]; + subgraph cluster_13 { color=blue - 33 [label="Enter block"]; - 34 [label="Exit block"]; + 35 [label="Enter block"]; + 36 [label="Exit block"]; } - 35 [label="Exit finally"]; + 37 [label="Exit finally"]; } - 36 [label="Try expression exit" style="filled" fillcolor=gray]; + 38 [label="Try expression exit" style="filled" fillcolor=gray]; } - 37 [label="Exit block" style="filled" fillcolor=gray]; + 39 [label="Exit block" style="filled" fillcolor=gray]; } - 38 [label="Exit function test_2" style="filled" fillcolor=red]; + 40 [label="Exit function test_2" style="filled" fillcolor=red]; } - 22 -> {23}; - 23 -> {24}; 24 -> {25}; - 24 -> {32} [label="onUncaughtException"]; 25 -> {26}; 26 -> {27}; + 26 -> {34} [label="onUncaughtException"]; 27 -> {28}; - 28 -> {32} [label="return@/test_2"]; - 28 -> {29} [style=dotted]; - 29 -> {30} [style=dotted]; + 28 -> {29}; + 29 -> {30}; + 30 -> {34} [label="return@/test_2"]; 30 -> {31} [style=dotted]; 31 -> {32} [style=dotted]; - 32 -> {33}; - 33 -> {34}; + 32 -> {33} [style=dotted]; + 33 -> {34} [style=dotted]; 34 -> {35}; - 35 -> {38} [label="return@/test_2"]; - 35 -> {36} [style=dotted]; - 36 -> {37} [style=dotted]; + 35 -> {36}; + 36 -> {37}; + 37 -> {40} [label="return@/test_2"]; 37 -> {38} [style=dotted]; + 38 -> {39} [style=dotted]; + 39 -> {40} [style=dotted]; - subgraph cluster_13 { + subgraph cluster_14 { color=red - 39 [label="Enter function test_3" style="filled" fillcolor=red]; - subgraph cluster_14 { + 41 [label="Enter function test_3" style="filled" fillcolor=red]; + subgraph cluster_15 { color=blue - 40 [label="Enter block"]; - subgraph cluster_15 { + 42 [label="Enter block"]; + subgraph cluster_16 { color=blue - 41 [label="Try expression enter"]; - subgraph cluster_16 { + 43 [label="Try expression enter"]; + subgraph cluster_17 { color=blue - 42 [label="Try main block enter"]; - subgraph cluster_17 { + 44 [label="Try main block enter"]; + subgraph cluster_18 { color=blue - 43 [label="Enter block"]; - 44 [label="Postponed enter to lambda"]; - subgraph cluster_18 { + 45 [label="Enter block"]; + 46 [label="Postponed enter to lambda"]; + subgraph cluster_19 { color=blue - 45 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_19 { + 47 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_20 { color=blue - 46 [label="Enter block"]; - 47 [label="Const: Int(2)"]; - 48 [label="Jump: ^test_3 Int(2)"]; - 49 [label="Stub" style="filled" fillcolor=gray]; - 50 [label="Exit block" style="filled" fillcolor=gray]; + 48 [label="Enter block"]; + 49 [label="Const: Int(2)"]; + 50 [label="Jump: ^test_3 Int(2)"]; + 51 [label="Stub" style="filled" fillcolor=gray]; + 52 [label="Exit block" style="filled" fillcolor=gray]; } - 51 [label="Exit function " style="filled" fillcolor=gray]; + 53 [label="Exit function " style="filled" fillcolor=gray]; } - 52 [label="Postponed exit from lambda"]; - 53 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 54 [label="Stub" style="filled" fillcolor=gray]; - 55 [label="Exit block" style="filled" fillcolor=gray]; + 54 [label="Postponed exit from lambda"]; + 55 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + 56 [label="Stub" style="filled" fillcolor=gray]; + 57 [label="Exit block" style="filled" fillcolor=gray]; } - 56 [label="Try main block exit" style="filled" fillcolor=gray]; + 58 [label="Try main block exit" style="filled" fillcolor=gray]; } - subgraph cluster_20 { + subgraph cluster_21 { color=blue - 57 [label="Enter finally"]; - subgraph cluster_21 { + 59 [label="Enter finally"]; + subgraph cluster_22 { color=blue - 58 [label="Enter block"]; - 59 [label="Exit block"]; + 60 [label="Enter block"]; + 61 [label="Exit block"]; } - 60 [label="Exit finally"]; + 62 [label="Exit finally"]; } - 61 [label="Try expression exit" style="filled" fillcolor=gray]; + 63 [label="Try expression exit" style="filled" fillcolor=gray]; } - 62 [label="Exit block" style="filled" fillcolor=gray]; + 64 [label="Exit block" style="filled" fillcolor=gray]; } - 63 [label="Exit function test_3" style="filled" fillcolor=red]; + 65 [label="Exit function test_3" style="filled" fillcolor=red]; } - 39 -> {40}; - 40 -> {41}; 41 -> {42}; - 41 -> {57} [label="onUncaughtException"]; 42 -> {43}; 43 -> {44}; - 44 -> {45 52 53}; - 44 -> {45} [style=dashed]; + 43 -> {59} [label="onUncaughtException"]; + 44 -> {45}; 45 -> {46}; - 46 -> {47}; + 46 -> {47 54 55}; + 46 -> {47} [style=dashed]; 47 -> {48}; - 48 -> {57} [label="return@/test_3"]; - 48 -> {49} [style=dotted]; - 49 -> {50} [style=dotted]; + 48 -> {49}; + 49 -> {50}; + 50 -> {59} [label="return@/test_3"]; 50 -> {51} [style=dotted]; 51 -> {52} [style=dotted]; - 52 -> {44} [color=green style=dashed]; - 52 -> {53} [color=green]; - 52 -> {61} [style=dotted]; + 52 -> {53} [style=dotted]; 53 -> {54} [style=dotted]; - 54 -> {57} [style=dotted label="onUncaughtException"]; - 54 -> {55} [style=dotted]; + 54 -> {46} [color=green style=dashed]; + 54 -> {55} [color=green]; + 54 -> {63} [style=dotted]; 55 -> {56} [style=dotted]; + 56 -> {59} [style=dotted label="onUncaughtException"]; 56 -> {57} [style=dotted]; - 57 -> {58}; - 58 -> {59}; + 57 -> {58} [style=dotted]; + 58 -> {59} [style=dotted]; 59 -> {60}; - 60 -> {63} [label="return@/test_3"]; - 60 -> {61} [style=dotted]; - 61 -> {62} [style=dotted]; + 60 -> {61}; + 61 -> {62}; + 62 -> {65} [label="return@/test_3"]; 62 -> {63} [style=dotted]; + 63 -> {64} [style=dotted]; + 64 -> {65} [style=dotted]; - subgraph cluster_22 { + subgraph cluster_23 { color=red - 64 [label="Enter function test_4" style="filled" fillcolor=red]; - subgraph cluster_23 { + 66 [label="Enter function test_4" style="filled" fillcolor=red]; + subgraph cluster_24 { color=blue - 65 [label="Enter block"]; - 66 [label="Postponed enter to lambda"]; - subgraph cluster_24 { + 67 [label="Enter block"]; + 68 [label="Postponed enter to lambda"]; + subgraph cluster_25 { color=blue - 67 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_25 { + 69 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_26 { color=blue - 68 [label="Enter block"]; - subgraph cluster_26 { + 70 [label="Enter block"]; + subgraph cluster_27 { color=blue - 69 [label="Try expression enter"]; - subgraph cluster_27 { + 71 [label="Try expression enter"]; + subgraph cluster_28 { color=blue - 70 [label="Try main block enter"]; - subgraph cluster_28 { + 72 [label="Try main block enter"]; + subgraph cluster_29 { color=blue - 71 [label="Enter block"]; - 72 [label="Const: Int(2)"]; - 73 [label="Jump: ^test_4 Int(2)"]; - 74 [label="Stub" style="filled" fillcolor=gray]; - 75 [label="Exit block" style="filled" fillcolor=gray]; + 73 [label="Enter block"]; + 74 [label="Const: Int(2)"]; + 75 [label="Jump: ^test_4 Int(2)"]; + 76 [label="Stub" style="filled" fillcolor=gray]; + 77 [label="Exit block" style="filled" fillcolor=gray]; } - 76 [label="Try main block exit" style="filled" fillcolor=gray]; + 78 [label="Try main block exit" style="filled" fillcolor=gray]; } - subgraph cluster_29 { + subgraph cluster_30 { color=blue - 77 [label="Enter finally"]; - subgraph cluster_30 { + 79 [label="Enter finally"]; + subgraph cluster_31 { color=blue - 78 [label="Enter block"]; - 79 [label="Exit block"]; + 80 [label="Enter block"]; + 81 [label="Exit block"]; } - 80 [label="Exit finally"]; + 82 [label="Exit finally"]; } - 81 [label="Try expression exit" style="filled" fillcolor=gray]; + 83 [label="Try expression exit" style="filled" fillcolor=gray]; } - 82 [label="Exit block" style="filled" fillcolor=gray]; + 84 [label="Exit block" style="filled" fillcolor=gray]; } - 83 [label="Exit function " style="filled" fillcolor=gray]; + 85 [label="Exit function " style="filled" fillcolor=gray]; } - 84 [label="Postponed exit from lambda"]; - 85 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 86 [label="Stub" style="filled" fillcolor=gray]; - 87 [label="Exit block" style="filled" fillcolor=gray]; + 86 [label="Postponed exit from lambda"]; + 87 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + 88 [label="Stub" style="filled" fillcolor=gray]; + 89 [label="Exit block" style="filled" fillcolor=gray]; } - 88 [label="Exit function test_4" style="filled" fillcolor=red]; + 90 [label="Exit function test_4" style="filled" fillcolor=red]; } - 64 -> {65}; - 65 -> {66}; - 66 -> {67 84 85}; - 66 -> {67} [style=dashed]; + 66 -> {67}; 67 -> {68}; - 68 -> {69}; + 68 -> {69 86 87}; + 68 -> {69} [style=dashed]; 69 -> {70}; - 69 -> {77} [label="onUncaughtException"]; 70 -> {71}; 71 -> {72}; + 71 -> {79} [label="onUncaughtException"]; 72 -> {73}; - 73 -> {77} [label="return@/test_4"]; - 73 -> {74} [style=dotted]; - 74 -> {75} [style=dotted]; + 73 -> {74}; + 74 -> {75}; + 75 -> {79} [label="return@/test_4"]; 75 -> {76} [style=dotted]; 76 -> {77} [style=dotted]; - 77 -> {78}; - 78 -> {79}; + 77 -> {78} [style=dotted]; + 78 -> {79} [style=dotted]; 79 -> {80}; - 80 -> {88} [label="return@/test_4"]; - 80 -> {81} [style=dotted]; - 81 -> {82} [style=dotted]; + 80 -> {81}; + 81 -> {82}; + 82 -> {90} [label="return@/test_4"]; 82 -> {83} [style=dotted]; 83 -> {84} [style=dotted]; - 84 -> {85}; - 84 -> {66} [color=green style=dashed]; + 84 -> {85} [style=dotted]; 85 -> {86} [style=dotted]; - 86 -> {87} [style=dotted]; + 86 -> {87}; + 86 -> {68} [color=green style=dashed]; 87 -> {88} [style=dotted]; + 88 -> {89} [style=dotted]; + 89 -> {90} [style=dotted]; - subgraph cluster_31 { + subgraph cluster_32 { color=red - 89 [label="Enter function test_5" style="filled" fillcolor=red]; - subgraph cluster_32 { + 91 [label="Enter function test_5" style="filled" fillcolor=red]; + subgraph cluster_33 { color=blue - 90 [label="Enter block"]; - subgraph cluster_33 { + 92 [label="Enter block"]; + subgraph cluster_34 { color=blue - 91 [label="Try expression enter"]; - subgraph cluster_34 { + 93 [label="Try expression enter"]; + subgraph cluster_35 { color=blue - 92 [label="Try main block enter"]; - subgraph cluster_35 { + 94 [label="Try main block enter"]; + subgraph cluster_36 { color=blue - 93 [label="Enter block"]; - 94 [label="Postponed enter to lambda"]; - subgraph cluster_36 { + 95 [label="Enter block"]; + 96 [label="Postponed enter to lambda"]; + subgraph cluster_37 { color=blue - 95 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_37 { + 97 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_38 { color=blue - 96 [label="Enter block"]; - 97 [label="Const: Int(2)"]; - 98 [label="Jump: ^test_5 Int(2)"]; - 99 [label="Stub" style="filled" fillcolor=gray]; - 100 [label="Exit block" style="filled" fillcolor=gray]; + 98 [label="Enter block"]; + 99 [label="Const: Int(2)"]; + 100 [label="Jump: ^test_5 Int(2)"]; + 101 [label="Stub" style="filled" fillcolor=gray]; + 102 [label="Exit block" style="filled" fillcolor=gray]; } - 101 [label="Exit function " style="filled" fillcolor=gray]; + 103 [label="Exit function " style="filled" fillcolor=gray]; } - 102 [label="Postponed exit from lambda"]; - 103 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; - 104 [label="Stub" style="filled" fillcolor=gray]; - 105 [label="Exit block" style="filled" fillcolor=gray]; + 104 [label="Postponed exit from lambda"]; + 105 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow]; + 106 [label="Stub" style="filled" fillcolor=gray]; + 107 [label="Exit block" style="filled" fillcolor=gray]; } - 106 [label="Try main block exit" style="filled" fillcolor=gray]; + 108 [label="Try main block exit" style="filled" fillcolor=gray]; } - subgraph cluster_38 { + subgraph cluster_39 { color=blue - 107 [label="Catch enter"]; - 108 [label="Variable declaration: e: R|kotlin/Exception|"]; - subgraph cluster_39 { + 109 [label="Catch enter"]; + 110 [label="Variable declaration: e: R|kotlin/Exception|"]; + subgraph cluster_40 { color=blue - 109 [label="Enter block"]; - 110 [label="Const: String(hello)"]; - 111 [label="Exit block"]; + 111 [label="Enter block"]; + 112 [label="Const: String(hello)"]; + 113 [label="Exit block"]; } - 112 [label="Catch exit"]; + 114 [label="Catch exit"]; } - subgraph cluster_40 { + subgraph cluster_41 { color=blue - 113 [label="Enter finally"]; - subgraph cluster_41 { + 115 [label="Enter finally"]; + subgraph cluster_42 { color=blue - 114 [label="Enter block"]; - 115 [label="Exit block"]; + 116 [label="Enter block"]; + 117 [label="Exit block"]; } - 116 [label="Exit finally"]; + 118 [label="Exit finally"]; } - 117 [label="Try expression exit"]; + 119 [label="Try expression exit"]; } - 118 [label="Exit block"]; + 120 [label="Exit block"]; } - 119 [label="Exit function test_5" style="filled" fillcolor=red]; + 121 [label="Exit function test_5" style="filled" fillcolor=red]; } - 89 -> {90}; - 90 -> {91}; - 91 -> {92 107}; - 91 -> {113} [label="onUncaughtException"]; + 91 -> {92}; 92 -> {93}; - 93 -> {94}; - 94 -> {95 102 103}; - 94 -> {95} [style=dashed]; + 93 -> {94 109}; + 93 -> {115} [label="onUncaughtException"]; + 94 -> {95}; 95 -> {96}; - 96 -> {97}; + 96 -> {97 104 105}; + 96 -> {97} [style=dashed]; 97 -> {98}; - 98 -> {113} [label="return@/test_5"]; - 98 -> {99} [style=dotted]; - 99 -> {100} [style=dotted]; + 98 -> {99}; + 99 -> {100}; + 100 -> {115} [label="return@/test_5"]; 100 -> {101} [style=dotted]; 101 -> {102} [style=dotted]; - 102 -> {94} [color=green style=dashed]; - 102 -> {103} [color=green]; - 102 -> {117} [color=red]; + 102 -> {103} [style=dotted]; 103 -> {104} [style=dotted]; - 104 -> {113} [style=dotted label="onUncaughtException"]; - 104 -> {105 107} [style=dotted]; + 104 -> {96} [color=green style=dashed]; + 104 -> {105} [color=green]; + 104 -> {119} [color=red]; 105 -> {106} [style=dotted]; - 106 -> {107 113} [style=dotted]; - 107 -> {108}; - 107 -> {113} [label="onUncaughtException"]; - 108 -> {109}; + 106 -> {115} [style=dotted label="onUncaughtException"]; + 106 -> {107 109} [style=dotted]; + 107 -> {108} [style=dotted]; + 108 -> {109 115} [style=dotted]; 109 -> {110}; + 109 -> {115} [label="onUncaughtException"]; 110 -> {111}; 111 -> {112}; 112 -> {113}; @@ -392,8 +397,10 @@ digraph singleReturnFromTry_kt { 114 -> {115}; 115 -> {116}; 116 -> {117}; - 116 -> {119} [label="return@/test_5"]; 117 -> {118}; 118 -> {119}; + 118 -> {121} [label="return@/test_5"]; + 119 -> {120}; + 120 -> {121}; } diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/delegatedConstructorArguments.dot b/compiler/testData/diagnostics/tests/controlFlowAnalysis/delegatedConstructorArguments.dot index 4c9800d62fd..f3a720dd6d3 100644 --- a/compiler/testData/diagnostics/tests/controlFlowAnalysis/delegatedConstructorArguments.dot +++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/delegatedConstructorArguments.dot @@ -5,155 +5,160 @@ digraph delegatedConstructorArguments_kt { subgraph cluster_0 { color=red - 0 [label="Enter class Test" style="filled" fillcolor=red]; - subgraph cluster_1 { - color=blue - 1 [label="Enter function " style="filled" fillcolor=red]; - 2 [label="Access variable R|/set|"]; - 3 [label="Postponed enter to lambda"]; - subgraph cluster_2 { - color=blue - 4 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_3 { - color=blue - 5 [label="Enter block"]; - 6 [label="Access variable R|/it|"]; - 7 [label="Exit block"]; - } - 8 [label="Exit function " style="filled" fillcolor=red]; - } - 9 [label="Postponed exit from lambda"]; - 10 [label="Function call: R|/set|.R|kotlin/collections/map|(...)" style="filled" fillcolor=yellow]; - 11 [label="Delegated constructor call: this(...)" style="filled" fillcolor=yellow]; - subgraph cluster_4 { - color=blue - 12 [label="Enter function " style="filled" fillcolor=red]; - 13 [label="Access variable R|/map|"]; - 14 [label="Access variable R|SubstitutionOverride|>|"]; - 15 [label="Postponed enter to lambda"]; - subgraph cluster_5 { - color=blue - 16 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_6 { - color=blue - 17 [label="Enter block"]; - 18 [label="Access variable R|/it|"]; - 19 [label="Exit block"]; - } - 20 [label="Exit function " style="filled" fillcolor=red]; - } - 21 [label="Postponed exit from lambda"]; - 22 [label="Function call: R|/map|.R|SubstitutionOverride|>|.R|kotlin/collections/map|(...)" style="filled" fillcolor=yellow]; - 23 [label="Delegated constructor call: this(...)" style="filled" fillcolor=yellow]; - subgraph cluster_7 { - color=blue - 24 [label="Enter init block" style="filled" fillcolor=red]; - subgraph cluster_8 { - color=blue - 25 [label="Enter block"]; - 26 [label="Access variable this@R|/Test|"]; - 27 [label="Const: Int(0)"]; - 28 [label="Assignment: R|/Test.size|"]; - 29 [label="Exit block"]; - } - 30 [label="Exit init block" style="filled" fillcolor=red]; - } - subgraph cluster_9 { - color=blue - 31 [label="Enter function " style="filled" fillcolor=red]; - 32 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; - subgraph cluster_10 { - color=blue - 33 [label="Enter block"]; - 34 [label="Access variable this@R|/Test|"]; - 35 [label="Access variable R|/list|"]; - 36 [label="Assignment: R|/Test.values|"]; - 37 [label="Exit block"]; - } - 38 [label="Exit function " style="filled" fillcolor=red]; - } - subgraph cluster_11 { - color=blue - 39 [label="Enter block"]; - 40 [label="Access variable this@R|/Test|"]; - 41 [label="Access variable R|/Test.size|"]; - 42 [label="Access variable this@R|/Test|"]; - 43 [label="Access variable R|/Test.values|"]; - 44 [label="Access variable R|SubstitutionOverride|"]; - 45 [label="Function call: this@R|/Test|.R|/Test.size|.R|kotlin/Int.plus|(...)" style="filled" fillcolor=yellow]; - 46 [label="Assignment: R|/Test.size|"]; - 47 [label="Exit block"]; - } - 48 [label="Exit function " style="filled" fillcolor=red]; - } - subgraph cluster_12 { - color=blue - 49 [label="Enter block"]; - 50 [label="Access variable this@R|/Test|"]; - 51 [label="Access variable R|/Test.size|"]; - 52 [label="Access variable this@R|/Test|"]; - 53 [label="Access variable R|/Test.values|"]; - 54 [label="Access variable R|SubstitutionOverride|"]; - 55 [label="Function call: this@R|/Test|.R|/Test.size|.R|kotlin/Int.plus|(...)" style="filled" fillcolor=yellow]; - 56 [label="Assignment: R|/Test.size|"]; - 57 [label="Exit block"]; - } - 58 [label="Exit function " style="filled" fillcolor=red]; - } - 59 [label="Exit class Test" style="filled" fillcolor=red]; + 0 [label="Enter file delegatedConstructorArguments.kt" style="filled" fillcolor=red]; + 1 [label="Exit file delegatedConstructorArguments.kt" style="filled" fillcolor=red]; } - 0 -> {1 12 24} [color=green]; - 0 -> {59} [style=dotted]; - 0 -> {1 12 24 31} [style=dashed]; - 1 -> {2}; - 2 -> {3}; - 3 -> {4 9 10}; - 3 -> {4} [style=dashed]; + 0 -> {1} [color=green]; + + subgraph cluster_1 { + color=red + 2 [label="Enter class Test" style="filled" fillcolor=red]; + subgraph cluster_2 { + color=blue + 3 [label="Enter function " style="filled" fillcolor=red]; + 4 [label="Access variable R|/set|"]; + 5 [label="Postponed enter to lambda"]; + subgraph cluster_3 { + color=blue + 6 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_4 { + color=blue + 7 [label="Enter block"]; + 8 [label="Access variable R|/it|"]; + 9 [label="Exit block"]; + } + 10 [label="Exit function " style="filled" fillcolor=red]; + } + 11 [label="Postponed exit from lambda"]; + 12 [label="Function call: R|/set|.R|kotlin/collections/map|(...)" style="filled" fillcolor=yellow]; + 13 [label="Delegated constructor call: this(...)" style="filled" fillcolor=yellow]; + subgraph cluster_5 { + color=blue + 14 [label="Enter function " style="filled" fillcolor=red]; + 15 [label="Access variable R|/map|"]; + 16 [label="Access variable R|SubstitutionOverride|>|"]; + 17 [label="Postponed enter to lambda"]; + subgraph cluster_6 { + color=blue + 18 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_7 { + color=blue + 19 [label="Enter block"]; + 20 [label="Access variable R|/it|"]; + 21 [label="Exit block"]; + } + 22 [label="Exit function " style="filled" fillcolor=red]; + } + 23 [label="Postponed exit from lambda"]; + 24 [label="Function call: R|/map|.R|SubstitutionOverride|>|.R|kotlin/collections/map|(...)" style="filled" fillcolor=yellow]; + 25 [label="Delegated constructor call: this(...)" style="filled" fillcolor=yellow]; + subgraph cluster_8 { + color=blue + 26 [label="Enter init block" style="filled" fillcolor=red]; + subgraph cluster_9 { + color=blue + 27 [label="Enter block"]; + 28 [label="Access variable this@R|/Test|"]; + 29 [label="Const: Int(0)"]; + 30 [label="Assignment: R|/Test.size|"]; + 31 [label="Exit block"]; + } + 32 [label="Exit init block" style="filled" fillcolor=red]; + } + subgraph cluster_10 { + color=blue + 33 [label="Enter function " style="filled" fillcolor=red]; + 34 [label="Delegated constructor call: super()" style="filled" fillcolor=yellow]; + subgraph cluster_11 { + color=blue + 35 [label="Enter block"]; + 36 [label="Access variable this@R|/Test|"]; + 37 [label="Access variable R|/list|"]; + 38 [label="Assignment: R|/Test.values|"]; + 39 [label="Exit block"]; + } + 40 [label="Exit function " style="filled" fillcolor=red]; + } + subgraph cluster_12 { + color=blue + 41 [label="Enter block"]; + 42 [label="Access variable this@R|/Test|"]; + 43 [label="Access variable R|/Test.size|"]; + 44 [label="Access variable this@R|/Test|"]; + 45 [label="Access variable R|/Test.values|"]; + 46 [label="Access variable R|SubstitutionOverride|"]; + 47 [label="Function call: this@R|/Test|.R|/Test.size|.R|kotlin/Int.plus|(...)" style="filled" fillcolor=yellow]; + 48 [label="Assignment: R|/Test.size|"]; + 49 [label="Exit block"]; + } + 50 [label="Exit function " style="filled" fillcolor=red]; + } + subgraph cluster_13 { + color=blue + 51 [label="Enter block"]; + 52 [label="Access variable this@R|/Test|"]; + 53 [label="Access variable R|/Test.size|"]; + 54 [label="Access variable this@R|/Test|"]; + 55 [label="Access variable R|/Test.values|"]; + 56 [label="Access variable R|SubstitutionOverride|"]; + 57 [label="Function call: this@R|/Test|.R|/Test.size|.R|kotlin/Int.plus|(...)" style="filled" fillcolor=yellow]; + 58 [label="Assignment: R|/Test.size|"]; + 59 [label="Exit block"]; + } + 60 [label="Exit function " style="filled" fillcolor=red]; + } + 61 [label="Exit class Test" style="filled" fillcolor=red]; + } + 2 -> {3 14 26} [color=green]; + 2 -> {61} [style=dotted]; + 2 -> {3 14 26 33} [style=dashed]; + 3 -> {4}; 4 -> {5}; - 5 -> {6}; + 5 -> {6 11 12}; + 5 -> {6} [style=dashed]; 6 -> {7}; 7 -> {8}; 8 -> {9}; - 9 -> {3} [color=green style=dashed]; - 9 -> {10} [color=green]; - 9 -> {11} [color=red]; + 9 -> {10}; 10 -> {11}; - 11 -> {24} [color=green label="return@/Test.Test"]; - 11 -> {39} [color=red]; + 11 -> {5} [color=green style=dashed]; + 11 -> {12} [color=green]; + 11 -> {13} [color=red]; 12 -> {13}; - 13 -> {14}; + 13 -> {26} [color=green label="return@/Test.Test"]; + 13 -> {41} [color=red]; 14 -> {15}; - 15 -> {16 21 22}; - 15 -> {16} [style=dashed]; + 15 -> {16}; 16 -> {17}; - 17 -> {18}; + 17 -> {18 23 24}; + 17 -> {18} [style=dashed]; 18 -> {19}; 19 -> {20}; 20 -> {21}; - 21 -> {15} [color=green style=dashed]; - 21 -> {22} [color=green]; - 21 -> {23} [color=red]; + 21 -> {22}; 22 -> {23}; - 23 -> {24} [color=green label="return@/Test.Test"]; - 23 -> {49} [color=red]; + 23 -> {17} [color=green style=dashed]; + 23 -> {24} [color=green]; + 23 -> {25} [color=red]; 24 -> {25}; - 25 -> {26}; + 25 -> {26} [color=green label="return@/Test.Test"]; + 25 -> {51} [color=red]; 26 -> {27}; 27 -> {28}; 28 -> {29}; 29 -> {30}; - 30 -> {31} [color=green]; + 30 -> {31}; 31 -> {32}; - 32 -> {33}; + 32 -> {33} [color=green]; 33 -> {34}; 34 -> {35}; 35 -> {36}; 36 -> {37}; 37 -> {38}; - 38 -> {39 49} [color=green label="return@/Test.Test"]; - 38 -> {59} [color=green]; + 38 -> {39}; 39 -> {40}; - 40 -> {41}; + 40 -> {41 51} [color=green label="return@/Test.Test"]; + 40 -> {61} [color=green]; 41 -> {42}; 42 -> {43}; 43 -> {44}; @@ -161,9 +166,9 @@ digraph delegatedConstructorArguments_kt { 45 -> {46}; 46 -> {47}; 47 -> {48}; - 48 -> {59} [color=green]; + 48 -> {49}; 49 -> {50}; - 50 -> {51}; + 50 -> {61} [color=green]; 51 -> {52}; 52 -> {53}; 53 -> {54}; @@ -171,6 +176,8 @@ digraph delegatedConstructorArguments_kt { 55 -> {56}; 56 -> {57}; 57 -> {58}; - 58 -> {59} [color=green]; + 58 -> {59}; + 59 -> {60}; + 60 -> {61} [color=green]; } diff --git a/compiler/testData/diagnostics/tests/smartCasts/castchecks/castInTryWithJump.dot b/compiler/testData/diagnostics/tests/smartCasts/castchecks/castInTryWithJump.dot index 565729ef8b4..759abf953f0 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/castchecks/castInTryWithJump.dot +++ b/compiler/testData/diagnostics/tests/smartCasts/castchecks/castInTryWithJump.dot @@ -5,193 +5,198 @@ digraph castInTryWithJump_fir_kt { subgraph cluster_0 { color=red - 0 [label="Enter class A" style="filled" fillcolor=red]; - 1 [label="Exit class A" style="filled" fillcolor=red]; + 0 [label="Enter file castInTryWithJump.fir.kt" style="filled" fillcolor=red]; + 1 [label="Exit file castInTryWithJump.fir.kt" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; subgraph cluster_1 { color=red - 2 [label="Enter function aaa" style="filled" fillcolor=red]; - 3 [label="Exit function aaa" style="filled" fillcolor=red]; + 2 [label="Enter class A" style="filled" fillcolor=red]; + 3 [label="Exit class A" style="filled" fillcolor=red]; } - 2 -> {3}; + 2 -> {3} [color=green]; subgraph cluster_2 { color=red - 4 [label="Enter class B" style="filled" fillcolor=red]; - 5 [label="Exit class B" style="filled" fillcolor=red]; + 4 [label="Enter function aaa" style="filled" fillcolor=red]; + 5 [label="Exit function aaa" style="filled" fillcolor=red]; } - 4 -> {5} [color=green]; + 4 -> {5}; subgraph cluster_3 { color=red - 6 [label="Enter function bbb" style="filled" fillcolor=red]; - 7 [label="Exit function bbb" style="filled" fillcolor=red]; + 6 [label="Enter class B" style="filled" fillcolor=red]; + 7 [label="Exit class B" style="filled" fillcolor=red]; } - 6 -> {7}; + 6 -> {7} [color=green]; subgraph cluster_4 { color=red - 8 [label="Enter class C" style="filled" fillcolor=red]; - 9 [label="Exit class C" style="filled" fillcolor=red]; + 8 [label="Enter function bbb" style="filled" fillcolor=red]; + 9 [label="Exit function bbb" style="filled" fillcolor=red]; } - 8 -> {9} [color=green]; + 8 -> {9}; subgraph cluster_5 { color=red - 10 [label="Enter function ccc" style="filled" fillcolor=red]; - 11 [label="Exit function ccc" style="filled" fillcolor=red]; + 10 [label="Enter class C" style="filled" fillcolor=red]; + 11 [label="Exit class C" style="filled" fillcolor=red]; } - 10 -> {11}; + 10 -> {11} [color=green]; subgraph cluster_6 { color=red - 12 [label="Enter function breakInTry_withNestedFinally" style="filled" fillcolor=red]; - subgraph cluster_7 { - color=blue - 13 [label="Enter block"]; - 14 [label="Const: Null(null)"]; - 15 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; - subgraph cluster_8 { - color=blue - 16 [label="Enter while loop"]; - subgraph cluster_9 { - color=blue - 17 [label="Enter loop condition"]; - 18 [label="Const: Boolean(true)"]; - 19 [label="Exit loop condition"]; - } - subgraph cluster_10 { - color=blue - 20 [label="Enter loop block"]; - subgraph cluster_11 { - color=blue - 21 [label="Enter block"]; - subgraph cluster_12 { - color=blue - 22 [label="Try expression enter"]; - subgraph cluster_13 { - color=blue - 23 [label="Try main block enter"]; - subgraph cluster_14 { - color=blue - 24 [label="Enter block"]; - 25 [label="Access variable R|/x|"]; - 26 [label="Type operator: (R|/x| as R|A|)"]; - 27 [label="Jump: break@@@[Boolean(true)] "]; - 28 [label="Stub" style="filled" fillcolor=gray]; - 29 [label="Exit block" style="filled" fillcolor=gray]; - } - 30 [label="Try main block exit" style="filled" fillcolor=gray]; - } - subgraph cluster_15 { - color=blue - 31 [label="Enter finally"]; - subgraph cluster_16 { - color=blue - 32 [label="Enter block"]; - subgraph cluster_17 { - color=blue - 33 [label="Try expression enter"]; - subgraph cluster_18 { - color=blue - 34 [label="Try main block enter"]; - subgraph cluster_19 { - color=blue - 35 [label="Enter block"]; - 36 [label="Access variable R|/x|"]; - 37 [label="Type operator: (R|/x| as R|B|)"]; - 38 [label="Exit block"]; - } - 39 [label="Try main block exit"]; - } - subgraph cluster_20 { - color=blue - 40 [label="Enter finally"]; - subgraph cluster_21 { - color=blue - 41 [label="Enter block"]; - 42 [label="Access variable R|/x|"]; - 43 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 44 [label="Access variable R|/x|"]; - 45 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 46 [label="Exit block"]; - } - 47 [label="Exit finally"]; - } - 48 [label="Try expression exit"]; - } - 49 [label="Access variable R|/x|"]; - 50 [label="Smart cast: R|/x|"]; - 51 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 52 [label="Access variable R|/x|"]; - 53 [label="Smart cast: R|/x|"]; - 54 [label="Function call: R|/x|.R|/B.bbb|()" style="filled" fillcolor=yellow]; - 55 [label="Exit block"]; - } - 56 [label="Exit finally"]; - } - 57 [label="Try expression exit" style="filled" fillcolor=gray]; - } - 58 [label="Access variable R|/x|" style="filled" fillcolor=gray]; - 59 [label="Smart cast: R|/x|" style="filled" fillcolor=gray]; - 60 [label="Function call: R|/x|.#()" style="filled" fillcolor=gray]; - 61 [label="Access variable R|/x|" style="filled" fillcolor=gray]; - 62 [label="Smart cast: R|/x|" style="filled" fillcolor=gray]; - 63 [label="Function call: R|/x|.R|/B.bbb|()" style="filled" fillcolor=gray]; - 64 [label="Exit block" style="filled" fillcolor=gray]; - } - 65 [label="Exit loop block" style="filled" fillcolor=gray]; - } - 66 [label="Exit while loop"]; - } - 67 [label="Access variable R|/x|"]; - 68 [label="Smart cast: R|/x|"]; - 69 [label="Function call: R|/x|.R|/A.aaa|()" style="filled" fillcolor=yellow]; - 70 [label="Access variable R|/x|"]; - 71 [label="Smart cast: R|/x|"]; - 72 [label="Function call: R|/x|.R|/B.bbb|()" style="filled" fillcolor=yellow]; - 73 [label="Exit block"]; - } - 74 [label="Exit function breakInTry_withNestedFinally" style="filled" fillcolor=red]; + 12 [label="Enter function ccc" style="filled" fillcolor=red]; + 13 [label="Exit function ccc" style="filled" fillcolor=red]; } 12 -> {13}; - 13 -> {14}; + + subgraph cluster_7 { + color=red + 14 [label="Enter function breakInTry_withNestedFinally" style="filled" fillcolor=red]; + subgraph cluster_8 { + color=blue + 15 [label="Enter block"]; + 16 [label="Const: Null(null)"]; + 17 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; + subgraph cluster_9 { + color=blue + 18 [label="Enter while loop"]; + subgraph cluster_10 { + color=blue + 19 [label="Enter loop condition"]; + 20 [label="Const: Boolean(true)"]; + 21 [label="Exit loop condition"]; + } + subgraph cluster_11 { + color=blue + 22 [label="Enter loop block"]; + subgraph cluster_12 { + color=blue + 23 [label="Enter block"]; + subgraph cluster_13 { + color=blue + 24 [label="Try expression enter"]; + subgraph cluster_14 { + color=blue + 25 [label="Try main block enter"]; + subgraph cluster_15 { + color=blue + 26 [label="Enter block"]; + 27 [label="Access variable R|/x|"]; + 28 [label="Type operator: (R|/x| as R|A|)"]; + 29 [label="Jump: break@@@[Boolean(true)] "]; + 30 [label="Stub" style="filled" fillcolor=gray]; + 31 [label="Exit block" style="filled" fillcolor=gray]; + } + 32 [label="Try main block exit" style="filled" fillcolor=gray]; + } + subgraph cluster_16 { + color=blue + 33 [label="Enter finally"]; + subgraph cluster_17 { + color=blue + 34 [label="Enter block"]; + subgraph cluster_18 { + color=blue + 35 [label="Try expression enter"]; + subgraph cluster_19 { + color=blue + 36 [label="Try main block enter"]; + subgraph cluster_20 { + color=blue + 37 [label="Enter block"]; + 38 [label="Access variable R|/x|"]; + 39 [label="Type operator: (R|/x| as R|B|)"]; + 40 [label="Exit block"]; + } + 41 [label="Try main block exit"]; + } + subgraph cluster_21 { + color=blue + 42 [label="Enter finally"]; + subgraph cluster_22 { + color=blue + 43 [label="Enter block"]; + 44 [label="Access variable R|/x|"]; + 45 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 46 [label="Access variable R|/x|"]; + 47 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 48 [label="Exit block"]; + } + 49 [label="Exit finally"]; + } + 50 [label="Try expression exit"]; + } + 51 [label="Access variable R|/x|"]; + 52 [label="Smart cast: R|/x|"]; + 53 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 54 [label="Access variable R|/x|"]; + 55 [label="Smart cast: R|/x|"]; + 56 [label="Function call: R|/x|.R|/B.bbb|()" style="filled" fillcolor=yellow]; + 57 [label="Exit block"]; + } + 58 [label="Exit finally"]; + } + 59 [label="Try expression exit" style="filled" fillcolor=gray]; + } + 60 [label="Access variable R|/x|" style="filled" fillcolor=gray]; + 61 [label="Smart cast: R|/x|" style="filled" fillcolor=gray]; + 62 [label="Function call: R|/x|.#()" style="filled" fillcolor=gray]; + 63 [label="Access variable R|/x|" style="filled" fillcolor=gray]; + 64 [label="Smart cast: R|/x|" style="filled" fillcolor=gray]; + 65 [label="Function call: R|/x|.R|/B.bbb|()" style="filled" fillcolor=gray]; + 66 [label="Exit block" style="filled" fillcolor=gray]; + } + 67 [label="Exit loop block" style="filled" fillcolor=gray]; + } + 68 [label="Exit while loop"]; + } + 69 [label="Access variable R|/x|"]; + 70 [label="Smart cast: R|/x|"]; + 71 [label="Function call: R|/x|.R|/A.aaa|()" style="filled" fillcolor=yellow]; + 72 [label="Access variable R|/x|"]; + 73 [label="Smart cast: R|/x|"]; + 74 [label="Function call: R|/x|.R|/B.bbb|()" style="filled" fillcolor=yellow]; + 75 [label="Exit block"]; + } + 76 [label="Exit function breakInTry_withNestedFinally" style="filled" fillcolor=red]; + } 14 -> {15}; 15 -> {16}; 16 -> {17}; 17 -> {18}; 18 -> {19}; 19 -> {20}; - 19 -> {66} [style=dotted]; 20 -> {21}; 21 -> {22}; + 21 -> {68} [style=dotted]; 22 -> {23}; - 22 -> {31} [label="onUncaughtException"]; 23 -> {24}; 24 -> {25}; + 24 -> {33} [label="onUncaughtException"]; 25 -> {26}; - 25 -> {31} [label="onUncaughtException"]; 26 -> {27}; - 26 -> {31} [label="onUncaughtException"]; - 27 -> {31} [label="break"]; - 27 -> {28} [style=dotted]; - 28 -> {29} [style=dotted]; + 27 -> {28}; + 27 -> {33} [label="onUncaughtException"]; + 28 -> {29}; + 28 -> {33} [label="onUncaughtException"]; + 29 -> {33} [label="break"]; 29 -> {30} [style=dotted]; 30 -> {31} [style=dotted]; - 31 -> {32}; - 32 -> {33}; + 31 -> {32} [style=dotted]; + 32 -> {33} [style=dotted]; 33 -> {34}; - 33 -> {40} [label="onUncaughtException"]; 34 -> {35}; 35 -> {36}; + 35 -> {42} [label="onUncaughtException"]; 36 -> {37}; - 36 -> {40} [label="onUncaughtException"]; 37 -> {38}; - 37 -> {40} [label="onUncaughtException"]; 38 -> {39}; + 38 -> {42} [label="onUncaughtException"]; 39 -> {40}; + 39 -> {42} [label="onUncaughtException"]; 40 -> {41}; 41 -> {42}; 42 -> {43}; @@ -208,9 +213,9 @@ digraph castInTryWithJump_fir_kt { 53 -> {54}; 54 -> {55}; 55 -> {56}; - 56 -> {66} [label="break"]; - 56 -> {57} [style=dotted]; - 57 -> {58} [style=dotted]; + 56 -> {57}; + 57 -> {58}; + 58 -> {68} [label="break"]; 58 -> {59} [style=dotted]; 59 -> {60} [style=dotted]; 60 -> {61} [style=dotted]; @@ -218,271 +223,271 @@ digraph castInTryWithJump_fir_kt { 62 -> {63} [style=dotted]; 63 -> {64} [style=dotted]; 64 -> {65} [style=dotted]; - 65 -> {17} [color=green style=dotted]; - 66 -> {67}; - 67 -> {68}; + 65 -> {66} [style=dotted]; + 66 -> {67} [style=dotted]; + 67 -> {19} [color=green style=dotted]; 68 -> {69}; 69 -> {70}; 70 -> {71}; 71 -> {72}; 72 -> {73}; 73 -> {74}; - - subgraph cluster_22 { - color=red - 75 [label="Enter function returnInCatch" style="filled" fillcolor=red]; - subgraph cluster_23 { - color=blue - 76 [label="Enter block"]; - 77 [label="Const: Null(null)"]; - 78 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; - subgraph cluster_24 { - color=blue - 79 [label="Try expression enter"]; - subgraph cluster_25 { - color=blue - 80 [label="Try main block enter"]; - subgraph cluster_26 { - color=blue - 81 [label="Enter block"]; - 82 [label="Access variable R|/x|"]; - 83 [label="Type operator: (R|/x| as R|A|)"]; - 84 [label="Exit block"]; - } - 85 [label="Try main block exit"]; - } - subgraph cluster_27 { - color=blue - 86 [label="Catch enter"]; - 87 [label="Variable declaration: e: R|kotlin/Exception|"]; - subgraph cluster_28 { - color=blue - 88 [label="Enter block"]; - 89 [label="Access variable R|/x|"]; - 90 [label="Type operator: (R|/x| as R|B|)"]; - 91 [label="Jump: ^returnInCatch Unit"]; - 92 [label="Stub" style="filled" fillcolor=gray]; - 93 [label="Exit block" style="filled" fillcolor=gray]; - } - 94 [label="Catch exit" style="filled" fillcolor=gray]; - } - subgraph cluster_29 { - color=blue - 95 [label="Enter finally"]; - subgraph cluster_30 { - color=blue - 96 [label="Enter block"]; - 97 [label="Access variable R|/x|"]; - 98 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 99 [label="Access variable R|/x|"]; - 100 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 101 [label="Exit block"]; - } - 102 [label="Exit finally"]; - } - 103 [label="Try expression exit"]; - } - 104 [label="Access variable R|/x|"]; - 105 [label="Smart cast: R|/x|"]; - 106 [label="Function call: R|/x|.R|/A.aaa|()" style="filled" fillcolor=yellow]; - 107 [label="Access variable R|/x|"]; - 108 [label="Smart cast: R|/x|"]; - 109 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 110 [label="Exit block"]; - } - 111 [label="Exit function returnInCatch" style="filled" fillcolor=red]; - } + 74 -> {75}; 75 -> {76}; - 76 -> {77}; + + subgraph cluster_23 { + color=red + 77 [label="Enter function returnInCatch" style="filled" fillcolor=red]; + subgraph cluster_24 { + color=blue + 78 [label="Enter block"]; + 79 [label="Const: Null(null)"]; + 80 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; + subgraph cluster_25 { + color=blue + 81 [label="Try expression enter"]; + subgraph cluster_26 { + color=blue + 82 [label="Try main block enter"]; + subgraph cluster_27 { + color=blue + 83 [label="Enter block"]; + 84 [label="Access variable R|/x|"]; + 85 [label="Type operator: (R|/x| as R|A|)"]; + 86 [label="Exit block"]; + } + 87 [label="Try main block exit"]; + } + subgraph cluster_28 { + color=blue + 88 [label="Catch enter"]; + 89 [label="Variable declaration: e: R|kotlin/Exception|"]; + subgraph cluster_29 { + color=blue + 90 [label="Enter block"]; + 91 [label="Access variable R|/x|"]; + 92 [label="Type operator: (R|/x| as R|B|)"]; + 93 [label="Jump: ^returnInCatch Unit"]; + 94 [label="Stub" style="filled" fillcolor=gray]; + 95 [label="Exit block" style="filled" fillcolor=gray]; + } + 96 [label="Catch exit" style="filled" fillcolor=gray]; + } + subgraph cluster_30 { + color=blue + 97 [label="Enter finally"]; + subgraph cluster_31 { + color=blue + 98 [label="Enter block"]; + 99 [label="Access variable R|/x|"]; + 100 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 101 [label="Access variable R|/x|"]; + 102 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 103 [label="Exit block"]; + } + 104 [label="Exit finally"]; + } + 105 [label="Try expression exit"]; + } + 106 [label="Access variable R|/x|"]; + 107 [label="Smart cast: R|/x|"]; + 108 [label="Function call: R|/x|.R|/A.aaa|()" style="filled" fillcolor=yellow]; + 109 [label="Access variable R|/x|"]; + 110 [label="Smart cast: R|/x|"]; + 111 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 112 [label="Exit block"]; + } + 113 [label="Exit function returnInCatch" style="filled" fillcolor=red]; + } 77 -> {78}; 78 -> {79}; - 79 -> {80 86}; - 79 -> {95} [label="onUncaughtException"]; + 79 -> {80}; 80 -> {81}; - 81 -> {82}; - 82 -> {83 86}; - 82 -> {95} [label="onUncaughtException"]; - 83 -> {84 86}; - 83 -> {95} [label="onUncaughtException"]; - 84 -> {85}; - 85 -> {86 95}; + 81 -> {82 88}; + 81 -> {97} [label="onUncaughtException"]; + 82 -> {83}; + 83 -> {84}; + 84 -> {85 88}; + 84 -> {97} [label="onUncaughtException"]; + 85 -> {86 88}; + 85 -> {97} [label="onUncaughtException"]; 86 -> {87}; - 86 -> {95} [label="onUncaughtException"]; - 87 -> {88}; + 87 -> {88 97}; 88 -> {89}; + 88 -> {97} [label="onUncaughtException"]; 89 -> {90}; - 89 -> {95} [label="onUncaughtException"]; 90 -> {91}; - 90 -> {95} [label="onUncaughtException"]; - 91 -> {95} [label="return@/returnInCatch"]; - 91 -> {92} [style=dotted]; - 92 -> {93} [style=dotted]; + 91 -> {92}; + 91 -> {97} [label="onUncaughtException"]; + 92 -> {93}; + 92 -> {97} [label="onUncaughtException"]; + 93 -> {97} [label="return@/returnInCatch"]; 93 -> {94} [style=dotted]; 94 -> {95} [style=dotted]; - 95 -> {96}; - 96 -> {97}; + 95 -> {96} [style=dotted]; + 96 -> {97} [style=dotted]; 97 -> {98}; 98 -> {99}; 99 -> {100}; 100 -> {101}; 101 -> {102}; 102 -> {103}; - 102 -> {111} [label="return@/returnInCatch"]; 103 -> {104}; 104 -> {105}; + 104 -> {113} [label="return@/returnInCatch"]; 105 -> {106}; 106 -> {107}; 107 -> {108}; 108 -> {109}; 109 -> {110}; 110 -> {111}; - - subgraph cluster_31 { - color=red - 112 [label="Enter function returnInCatch_insideFinally" style="filled" fillcolor=red]; - subgraph cluster_32 { - color=blue - 113 [label="Enter block"]; - 114 [label="Const: Null(null)"]; - 115 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; - subgraph cluster_33 { - color=blue - 116 [label="Try expression enter"]; - subgraph cluster_34 { - color=blue - 117 [label="Try main block enter"]; - subgraph cluster_35 { - color=blue - 118 [label="Enter block"]; - 119 [label="Access variable R|/x|"]; - 120 [label="Type operator: (R|/x| as R|C|)"]; - 121 [label="Exit block"]; - } - 122 [label="Try main block exit"]; - } - subgraph cluster_36 { - color=blue - 123 [label="Enter finally"]; - subgraph cluster_37 { - color=blue - 124 [label="Enter block"]; - subgraph cluster_38 { - color=blue - 125 [label="Try expression enter"]; - subgraph cluster_39 { - color=blue - 126 [label="Try main block enter"]; - subgraph cluster_40 { - color=blue - 127 [label="Enter block"]; - 128 [label="Access variable R|/x|"]; - 129 [label="Type operator: (R|/x| as R|A|)"]; - 130 [label="Exit block"]; - } - 131 [label="Try main block exit"]; - } - subgraph cluster_41 { - color=blue - 132 [label="Catch enter"]; - 133 [label="Variable declaration: e: R|kotlin/Exception|"]; - subgraph cluster_42 { - color=blue - 134 [label="Enter block"]; - 135 [label="Access variable R|/x|"]; - 136 [label="Type operator: (R|/x| as R|B|)"]; - 137 [label="Jump: ^returnInCatch_insideFinally Unit"]; - 138 [label="Stub" style="filled" fillcolor=gray]; - 139 [label="Exit block" style="filled" fillcolor=gray]; - } - 140 [label="Catch exit" style="filled" fillcolor=gray]; - } - subgraph cluster_43 { - color=blue - 141 [label="Enter finally"]; - subgraph cluster_44 { - color=blue - 142 [label="Enter block"]; - 143 [label="Access variable R|/x|"]; - 144 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 145 [label="Access variable R|/x|"]; - 146 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 147 [label="Access variable R|/x|"]; - 148 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 149 [label="Exit block"]; - } - 150 [label="Exit finally"]; - } - 151 [label="Try expression exit"]; - } - 152 [label="Access variable R|/x|"]; - 153 [label="Smart cast: R|/x|"]; - 154 [label="Function call: R|/x|.R|/A.aaa|()" style="filled" fillcolor=yellow]; - 155 [label="Access variable R|/x|"]; - 156 [label="Smart cast: R|/x|"]; - 157 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 158 [label="Access variable R|/x|"]; - 159 [label="Smart cast: R|/x|"]; - 160 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 161 [label="Exit block"]; - } - 162 [label="Exit finally"]; - } - 163 [label="Try expression exit"]; - } - 164 [label="Access variable R|/x|"]; - 165 [label="Smart cast: R|/x|"]; - 166 [label="Function call: R|/x|.R|/A.aaa|()" style="filled" fillcolor=yellow]; - 167 [label="Access variable R|/x|"]; - 168 [label="Smart cast: R|/x|"]; - 169 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 170 [label="Access variable R|/x|"]; - 171 [label="Smart cast: R|/x|"]; - 172 [label="Function call: R|/x|.R|/C.ccc|()" style="filled" fillcolor=yellow]; - 173 [label="Exit block"]; - } - 174 [label="Exit function returnInCatch_insideFinally" style="filled" fillcolor=red]; - } + 111 -> {112}; 112 -> {113}; - 113 -> {114}; + + subgraph cluster_32 { + color=red + 114 [label="Enter function returnInCatch_insideFinally" style="filled" fillcolor=red]; + subgraph cluster_33 { + color=blue + 115 [label="Enter block"]; + 116 [label="Const: Null(null)"]; + 117 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; + subgraph cluster_34 { + color=blue + 118 [label="Try expression enter"]; + subgraph cluster_35 { + color=blue + 119 [label="Try main block enter"]; + subgraph cluster_36 { + color=blue + 120 [label="Enter block"]; + 121 [label="Access variable R|/x|"]; + 122 [label="Type operator: (R|/x| as R|C|)"]; + 123 [label="Exit block"]; + } + 124 [label="Try main block exit"]; + } + subgraph cluster_37 { + color=blue + 125 [label="Enter finally"]; + subgraph cluster_38 { + color=blue + 126 [label="Enter block"]; + subgraph cluster_39 { + color=blue + 127 [label="Try expression enter"]; + subgraph cluster_40 { + color=blue + 128 [label="Try main block enter"]; + subgraph cluster_41 { + color=blue + 129 [label="Enter block"]; + 130 [label="Access variable R|/x|"]; + 131 [label="Type operator: (R|/x| as R|A|)"]; + 132 [label="Exit block"]; + } + 133 [label="Try main block exit"]; + } + subgraph cluster_42 { + color=blue + 134 [label="Catch enter"]; + 135 [label="Variable declaration: e: R|kotlin/Exception|"]; + subgraph cluster_43 { + color=blue + 136 [label="Enter block"]; + 137 [label="Access variable R|/x|"]; + 138 [label="Type operator: (R|/x| as R|B|)"]; + 139 [label="Jump: ^returnInCatch_insideFinally Unit"]; + 140 [label="Stub" style="filled" fillcolor=gray]; + 141 [label="Exit block" style="filled" fillcolor=gray]; + } + 142 [label="Catch exit" style="filled" fillcolor=gray]; + } + subgraph cluster_44 { + color=blue + 143 [label="Enter finally"]; + subgraph cluster_45 { + color=blue + 144 [label="Enter block"]; + 145 [label="Access variable R|/x|"]; + 146 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 147 [label="Access variable R|/x|"]; + 148 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 149 [label="Access variable R|/x|"]; + 150 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 151 [label="Exit block"]; + } + 152 [label="Exit finally"]; + } + 153 [label="Try expression exit"]; + } + 154 [label="Access variable R|/x|"]; + 155 [label="Smart cast: R|/x|"]; + 156 [label="Function call: R|/x|.R|/A.aaa|()" style="filled" fillcolor=yellow]; + 157 [label="Access variable R|/x|"]; + 158 [label="Smart cast: R|/x|"]; + 159 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 160 [label="Access variable R|/x|"]; + 161 [label="Smart cast: R|/x|"]; + 162 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 163 [label="Exit block"]; + } + 164 [label="Exit finally"]; + } + 165 [label="Try expression exit"]; + } + 166 [label="Access variable R|/x|"]; + 167 [label="Smart cast: R|/x|"]; + 168 [label="Function call: R|/x|.R|/A.aaa|()" style="filled" fillcolor=yellow]; + 169 [label="Access variable R|/x|"]; + 170 [label="Smart cast: R|/x|"]; + 171 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 172 [label="Access variable R|/x|"]; + 173 [label="Smart cast: R|/x|"]; + 174 [label="Function call: R|/x|.R|/C.ccc|()" style="filled" fillcolor=yellow]; + 175 [label="Exit block"]; + } + 176 [label="Exit function returnInCatch_insideFinally" style="filled" fillcolor=red]; + } 114 -> {115}; 115 -> {116}; 116 -> {117}; - 116 -> {123} [label="onUncaughtException"]; 117 -> {118}; 118 -> {119}; + 118 -> {125} [label="onUncaughtException"]; 119 -> {120}; - 119 -> {123} [label="onUncaughtException"]; 120 -> {121}; - 120 -> {123} [label="onUncaughtException"]; 121 -> {122}; + 121 -> {125} [label="onUncaughtException"]; 122 -> {123}; + 122 -> {125} [label="onUncaughtException"]; 123 -> {124}; 124 -> {125}; - 125 -> {126 132}; - 125 -> {141} [label="onUncaughtException"]; + 125 -> {126}; 126 -> {127}; - 127 -> {128}; - 128 -> {129 132}; - 128 -> {141} [label="onUncaughtException"]; - 129 -> {130 132}; - 129 -> {141} [label="onUncaughtException"]; - 130 -> {131}; - 131 -> {132 141}; + 127 -> {128 134}; + 127 -> {143} [label="onUncaughtException"]; + 128 -> {129}; + 129 -> {130}; + 130 -> {131 134}; + 130 -> {143} [label="onUncaughtException"]; + 131 -> {132 134}; + 131 -> {143} [label="onUncaughtException"]; 132 -> {133}; - 132 -> {141} [label="onUncaughtException"]; - 133 -> {134}; + 133 -> {134 143}; 134 -> {135}; + 134 -> {143} [label="onUncaughtException"]; 135 -> {136}; - 135 -> {141} [label="onUncaughtException"]; 136 -> {137}; - 136 -> {141} [label="onUncaughtException"]; - 137 -> {141} [label="return@/returnInCatch_insideFinally"]; - 137 -> {138} [style=dotted]; - 138 -> {139} [style=dotted]; + 137 -> {138}; + 137 -> {143} [label="onUncaughtException"]; + 138 -> {139}; + 138 -> {143} [label="onUncaughtException"]; + 139 -> {143} [label="return@/returnInCatch_insideFinally"]; 139 -> {140} [style=dotted]; 140 -> {141} [style=dotted]; - 141 -> {142}; - 142 -> {143}; + 141 -> {142} [style=dotted]; + 142 -> {143} [style=dotted]; 143 -> {144}; 144 -> {145}; 145 -> {146}; @@ -491,9 +496,9 @@ digraph castInTryWithJump_fir_kt { 148 -> {149}; 149 -> {150}; 150 -> {151}; - 150 -> {174} [label="return@/returnInCatch_insideFinally"]; 151 -> {152}; 152 -> {153}; + 152 -> {176} [label="return@/returnInCatch_insideFinally"]; 153 -> {154}; 154 -> {155}; 155 -> {156}; @@ -515,318 +520,318 @@ digraph castInTryWithJump_fir_kt { 171 -> {172}; 172 -> {173}; 173 -> {174}; + 174 -> {175}; + 175 -> {176}; - subgraph cluster_45 { + subgraph cluster_46 { color=red - 175 [label="Enter function breakInCatch" style="filled" fillcolor=red]; - subgraph cluster_46 { + 177 [label="Enter function breakInCatch" style="filled" fillcolor=red]; + subgraph cluster_47 { color=blue - 176 [label="Enter block"]; - 177 [label="Const: Null(null)"]; - 178 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; - subgraph cluster_47 { + 178 [label="Enter block"]; + 179 [label="Const: Null(null)"]; + 180 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; + subgraph cluster_48 { color=blue - 179 [label="Enter while loop"]; - subgraph cluster_48 { - color=blue - 180 [label="Enter loop condition"]; - 181 [label="Const: Boolean(true)"]; - 182 [label="Exit loop condition"]; - } + 181 [label="Enter while loop"]; subgraph cluster_49 { color=blue - 183 [label="Enter loop block"]; - subgraph cluster_50 { - color=blue - 184 [label="Enter block"]; - subgraph cluster_51 { - color=blue - 185 [label="Try expression enter"]; - subgraph cluster_52 { - color=blue - 186 [label="Try main block enter"]; - subgraph cluster_53 { - color=blue - 187 [label="Enter block"]; - 188 [label="Access variable R|/x|"]; - 189 [label="Type operator: (R|/x| as R|A|)"]; - 190 [label="Exit block"]; - } - 191 [label="Try main block exit"]; - } - subgraph cluster_54 { - color=blue - 192 [label="Catch enter"]; - 193 [label="Variable declaration: e: R|kotlin/Exception|"]; - subgraph cluster_55 { - color=blue - 194 [label="Enter block"]; - 195 [label="Access variable R|/x|"]; - 196 [label="Type operator: (R|/x| as R|B|)"]; - 197 [label="Jump: break@@@[Boolean(true)] "]; - 198 [label="Stub" style="filled" fillcolor=gray]; - 199 [label="Exit block" style="filled" fillcolor=gray]; - } - 200 [label="Catch exit" style="filled" fillcolor=gray]; - } - subgraph cluster_56 { - color=blue - 201 [label="Enter finally"]; - subgraph cluster_57 { - color=blue - 202 [label="Enter block"]; - 203 [label="Access variable R|/x|"]; - 204 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 205 [label="Access variable R|/x|"]; - 206 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 207 [label="Exit block"]; - } - 208 [label="Exit finally"]; - } - 209 [label="Try expression exit"]; - } - 210 [label="Access variable R|/x|"]; - 211 [label="Smart cast: R|/x|"]; - 212 [label="Function call: R|/x|.R|/A.aaa|()" style="filled" fillcolor=yellow]; - 213 [label="Access variable R|/x|"]; - 214 [label="Smart cast: R|/x|"]; - 215 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 216 [label="Exit block"]; - } - 217 [label="Exit loop block"]; + 182 [label="Enter loop condition"]; + 183 [label="Const: Boolean(true)"]; + 184 [label="Exit loop condition"]; } - 218 [label="Exit while loop"]; + subgraph cluster_50 { + color=blue + 185 [label="Enter loop block"]; + subgraph cluster_51 { + color=blue + 186 [label="Enter block"]; + subgraph cluster_52 { + color=blue + 187 [label="Try expression enter"]; + subgraph cluster_53 { + color=blue + 188 [label="Try main block enter"]; + subgraph cluster_54 { + color=blue + 189 [label="Enter block"]; + 190 [label="Access variable R|/x|"]; + 191 [label="Type operator: (R|/x| as R|A|)"]; + 192 [label="Exit block"]; + } + 193 [label="Try main block exit"]; + } + subgraph cluster_55 { + color=blue + 194 [label="Catch enter"]; + 195 [label="Variable declaration: e: R|kotlin/Exception|"]; + subgraph cluster_56 { + color=blue + 196 [label="Enter block"]; + 197 [label="Access variable R|/x|"]; + 198 [label="Type operator: (R|/x| as R|B|)"]; + 199 [label="Jump: break@@@[Boolean(true)] "]; + 200 [label="Stub" style="filled" fillcolor=gray]; + 201 [label="Exit block" style="filled" fillcolor=gray]; + } + 202 [label="Catch exit" style="filled" fillcolor=gray]; + } + subgraph cluster_57 { + color=blue + 203 [label="Enter finally"]; + subgraph cluster_58 { + color=blue + 204 [label="Enter block"]; + 205 [label="Access variable R|/x|"]; + 206 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 207 [label="Access variable R|/x|"]; + 208 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 209 [label="Exit block"]; + } + 210 [label="Exit finally"]; + } + 211 [label="Try expression exit"]; + } + 212 [label="Access variable R|/x|"]; + 213 [label="Smart cast: R|/x|"]; + 214 [label="Function call: R|/x|.R|/A.aaa|()" style="filled" fillcolor=yellow]; + 215 [label="Access variable R|/x|"]; + 216 [label="Smart cast: R|/x|"]; + 217 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 218 [label="Exit block"]; + } + 219 [label="Exit loop block"]; + } + 220 [label="Exit while loop"]; } - 219 [label="Access variable R|/x|"]; - 220 [label="Smart cast: R|/x|"]; - 221 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 222 [label="Access variable R|/x|"]; - 223 [label="Smart cast: R|/x|"]; - 224 [label="Function call: R|/x|.R|/B.bbb|()" style="filled" fillcolor=yellow]; - 225 [label="Exit block"]; + 221 [label="Access variable R|/x|"]; + 222 [label="Smart cast: R|/x|"]; + 223 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 224 [label="Access variable R|/x|"]; + 225 [label="Smart cast: R|/x|"]; + 226 [label="Function call: R|/x|.R|/B.bbb|()" style="filled" fillcolor=yellow]; + 227 [label="Exit block"]; } - 226 [label="Exit function breakInCatch" style="filled" fillcolor=red]; + 228 [label="Exit function breakInCatch" style="filled" fillcolor=red]; } - 175 -> {176}; - 176 -> {177}; 177 -> {178}; 178 -> {179}; 179 -> {180}; 180 -> {181}; 181 -> {182}; 182 -> {183}; - 182 -> {218} [style=dotted]; 183 -> {184}; 184 -> {185}; - 185 -> {186 192}; - 185 -> {201} [label="onUncaughtException"]; + 184 -> {220} [style=dotted]; + 185 -> {186}; 186 -> {187}; - 187 -> {188}; - 188 -> {189 192}; - 188 -> {201} [label="onUncaughtException"]; - 189 -> {190 192}; - 189 -> {201} [label="onUncaughtException"]; - 190 -> {191}; - 191 -> {192 201}; + 187 -> {188 194}; + 187 -> {203} [label="onUncaughtException"]; + 188 -> {189}; + 189 -> {190}; + 190 -> {191 194}; + 190 -> {203} [label="onUncaughtException"]; + 191 -> {192 194}; + 191 -> {203} [label="onUncaughtException"]; 192 -> {193}; - 192 -> {201} [label="onUncaughtException"]; - 193 -> {194}; + 193 -> {194 203}; 194 -> {195}; + 194 -> {203} [label="onUncaughtException"]; 195 -> {196}; - 195 -> {201} [label="onUncaughtException"]; 196 -> {197}; - 196 -> {201} [label="onUncaughtException"]; - 197 -> {201} [label="break"]; - 197 -> {198} [style=dotted]; - 198 -> {199} [style=dotted]; + 197 -> {198}; + 197 -> {203} [label="onUncaughtException"]; + 198 -> {199}; + 198 -> {203} [label="onUncaughtException"]; + 199 -> {203} [label="break"]; 199 -> {200} [style=dotted]; 200 -> {201} [style=dotted]; - 201 -> {202}; - 202 -> {203}; + 201 -> {202} [style=dotted]; + 202 -> {203} [style=dotted]; 203 -> {204}; 204 -> {205}; 205 -> {206}; 206 -> {207}; 207 -> {208}; 208 -> {209}; - 208 -> {218} [label="break"]; 209 -> {210}; 210 -> {211}; + 210 -> {220} [label="break"]; 211 -> {212}; 212 -> {213}; 213 -> {214}; 214 -> {215}; 215 -> {216}; 216 -> {217}; - 217 -> {180} [color=green style=dashed]; + 217 -> {218}; 218 -> {219}; - 219 -> {220}; + 219 -> {182} [color=green style=dashed]; 220 -> {221}; 221 -> {222}; 222 -> {223}; 223 -> {224}; 224 -> {225}; 225 -> {226}; - - subgraph cluster_58 { - color=red - 227 [label="Enter function returnInFinally_insideTry_nonLocal" style="filled" fillcolor=red]; - subgraph cluster_59 { - color=blue - 228 [label="Enter block"]; - 229 [label="Const: Null(null)"]; - 230 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; - 231 [label="Postponed enter to lambda"]; - subgraph cluster_60 { - color=blue - 232 [label="Enter function " style="filled" fillcolor=red]; - subgraph cluster_61 { - color=blue - 233 [label="Enter block"]; - subgraph cluster_62 { - color=blue - 234 [label="Try expression enter"]; - subgraph cluster_63 { - color=blue - 235 [label="Try main block enter"]; - subgraph cluster_64 { - color=blue - 236 [label="Enter block"]; - 237 [label="Access variable R|/x|"]; - 238 [label="Type operator: (R|/x| as R|B|)"]; - subgraph cluster_65 { - color=blue - 239 [label="Try expression enter"]; - subgraph cluster_66 { - color=blue - 240 [label="Try main block enter"]; - subgraph cluster_67 { - color=blue - 241 [label="Enter block"]; - 242 [label="Access variable R|/x|"]; - 243 [label="Smart cast: R|/x|"]; - 244 [label="Type operator: (R|/x| as R|A|)"]; - 245 [label="Exit block"]; - } - 246 [label="Try main block exit"]; - } - subgraph cluster_68 { - color=blue - 247 [label="Enter finally"]; - subgraph cluster_69 { - color=blue - 248 [label="Enter block"]; - 249 [label="Access variable R|/x|"]; - 250 [label="Smart cast: R|/x|"]; - 251 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 252 [label="Access variable R|/x|"]; - 253 [label="Smart cast: R|/x|"]; - 254 [label="Function call: R|/x|.R|/B.bbb|()" style="filled" fillcolor=yellow]; - 255 [label="Jump: ^returnInFinally_insideTry_nonLocal Unit"]; - 256 [label="Stub" style="filled" fillcolor=gray]; - 257 [label="Exit block" style="filled" fillcolor=gray]; - } - 258 [label="Exit finally" style="filled" fillcolor=gray]; - } - 259 [label="Try expression exit" style="filled" fillcolor=gray]; - } - 260 [label="Exit block" style="filled" fillcolor=gray]; - } - 261 [label="Try main block exit" style="filled" fillcolor=gray]; - } - subgraph cluster_70 { - color=blue - 262 [label="Enter finally"]; - subgraph cluster_71 { - color=blue - 263 [label="Enter block"]; - 264 [label="Access variable R|/x|"]; - 265 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 266 [label="Access variable R|/x|"]; - 267 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; - 268 [label="Exit block"]; - } - 269 [label="Exit finally"]; - } - 270 [label="Try expression exit" style="filled" fillcolor=gray]; - } - 271 [label="Access variable R|/x|" style="filled" fillcolor=gray]; - 272 [label="Function call: R|/x|.#()" style="filled" fillcolor=gray]; - 273 [label="Access variable R|/x|" style="filled" fillcolor=gray]; - 274 [label="Function call: R|/x|.#()" style="filled" fillcolor=gray]; - 275 [label="Exit block" style="filled" fillcolor=gray]; - } - 276 [label="Exit function " style="filled" fillcolor=gray]; - } - 277 [label="Postponed exit from lambda" style="filled" fillcolor=gray]; - 278 [label="Function call: R|kotlin/run#|<>(...)" style="filled" fillcolor=gray]; - 279 [label="Access variable R|/x|" style="filled" fillcolor=gray]; - 280 [label="Function call: R|/x|.#()" style="filled" fillcolor=gray]; - 281 [label="Access variable R|/x|" style="filled" fillcolor=gray]; - 282 [label="Function call: R|/x|.#()" style="filled" fillcolor=gray]; - 283 [label="Exit block" style="filled" fillcolor=gray]; - } - 284 [label="Exit function returnInFinally_insideTry_nonLocal" style="filled" fillcolor=red]; - } + 226 -> {227}; 227 -> {228}; - 228 -> {229}; + + subgraph cluster_59 { + color=red + 229 [label="Enter function returnInFinally_insideTry_nonLocal" style="filled" fillcolor=red]; + subgraph cluster_60 { + color=blue + 230 [label="Enter block"]; + 231 [label="Const: Null(null)"]; + 232 [label="Variable declaration: lvar x: R|kotlin/Any?|"]; + 233 [label="Postponed enter to lambda"]; + subgraph cluster_61 { + color=blue + 234 [label="Enter function " style="filled" fillcolor=red]; + subgraph cluster_62 { + color=blue + 235 [label="Enter block"]; + subgraph cluster_63 { + color=blue + 236 [label="Try expression enter"]; + subgraph cluster_64 { + color=blue + 237 [label="Try main block enter"]; + subgraph cluster_65 { + color=blue + 238 [label="Enter block"]; + 239 [label="Access variable R|/x|"]; + 240 [label="Type operator: (R|/x| as R|B|)"]; + subgraph cluster_66 { + color=blue + 241 [label="Try expression enter"]; + subgraph cluster_67 { + color=blue + 242 [label="Try main block enter"]; + subgraph cluster_68 { + color=blue + 243 [label="Enter block"]; + 244 [label="Access variable R|/x|"]; + 245 [label="Smart cast: R|/x|"]; + 246 [label="Type operator: (R|/x| as R|A|)"]; + 247 [label="Exit block"]; + } + 248 [label="Try main block exit"]; + } + subgraph cluster_69 { + color=blue + 249 [label="Enter finally"]; + subgraph cluster_70 { + color=blue + 250 [label="Enter block"]; + 251 [label="Access variable R|/x|"]; + 252 [label="Smart cast: R|/x|"]; + 253 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 254 [label="Access variable R|/x|"]; + 255 [label="Smart cast: R|/x|"]; + 256 [label="Function call: R|/x|.R|/B.bbb|()" style="filled" fillcolor=yellow]; + 257 [label="Jump: ^returnInFinally_insideTry_nonLocal Unit"]; + 258 [label="Stub" style="filled" fillcolor=gray]; + 259 [label="Exit block" style="filled" fillcolor=gray]; + } + 260 [label="Exit finally" style="filled" fillcolor=gray]; + } + 261 [label="Try expression exit" style="filled" fillcolor=gray]; + } + 262 [label="Exit block" style="filled" fillcolor=gray]; + } + 263 [label="Try main block exit" style="filled" fillcolor=gray]; + } + subgraph cluster_71 { + color=blue + 264 [label="Enter finally"]; + subgraph cluster_72 { + color=blue + 265 [label="Enter block"]; + 266 [label="Access variable R|/x|"]; + 267 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 268 [label="Access variable R|/x|"]; + 269 [label="Function call: R|/x|.#()" style="filled" fillcolor=yellow]; + 270 [label="Exit block"]; + } + 271 [label="Exit finally"]; + } + 272 [label="Try expression exit" style="filled" fillcolor=gray]; + } + 273 [label="Access variable R|/x|" style="filled" fillcolor=gray]; + 274 [label="Function call: R|/x|.#()" style="filled" fillcolor=gray]; + 275 [label="Access variable R|/x|" style="filled" fillcolor=gray]; + 276 [label="Function call: R|/x|.#()" style="filled" fillcolor=gray]; + 277 [label="Exit block" style="filled" fillcolor=gray]; + } + 278 [label="Exit function " style="filled" fillcolor=gray]; + } + 279 [label="Postponed exit from lambda" style="filled" fillcolor=gray]; + 280 [label="Function call: R|kotlin/run#|<>(...)" style="filled" fillcolor=gray]; + 281 [label="Access variable R|/x|" style="filled" fillcolor=gray]; + 282 [label="Function call: R|/x|.#()" style="filled" fillcolor=gray]; + 283 [label="Access variable R|/x|" style="filled" fillcolor=gray]; + 284 [label="Function call: R|/x|.#()" style="filled" fillcolor=gray]; + 285 [label="Exit block" style="filled" fillcolor=gray]; + } + 286 [label="Exit function returnInFinally_insideTry_nonLocal" style="filled" fillcolor=red]; + } 229 -> {230}; 230 -> {231}; 231 -> {232}; - 231 -> {277 278} [style=dotted]; - 231 -> {232} [style=dashed]; 232 -> {233}; 233 -> {234}; + 233 -> {279 280} [style=dotted]; + 233 -> {234} [style=dashed]; 234 -> {235}; - 234 -> {262} [label="onUncaughtException"]; 235 -> {236}; 236 -> {237}; + 236 -> {264} [label="onUncaughtException"]; 237 -> {238}; - 237 -> {262} [label="onUncaughtException"]; 238 -> {239}; - 238 -> {262} [label="onUncaughtException"]; 239 -> {240}; - 239 -> {247} [label="onUncaughtException"]; + 239 -> {264} [label="onUncaughtException"]; 240 -> {241}; + 240 -> {264} [label="onUncaughtException"]; 241 -> {242}; + 241 -> {249} [label="onUncaughtException"]; 242 -> {243}; - 242 -> {247} [label="onUncaughtException"]; 243 -> {244}; 244 -> {245}; - 244 -> {247} [label="onUncaughtException"]; + 244 -> {249} [label="onUncaughtException"]; 245 -> {246}; 246 -> {247}; + 246 -> {249} [label="onUncaughtException"]; 247 -> {248}; 248 -> {249}; 249 -> {250}; - 249 -> {262} [label="onUncaughtException"]; 250 -> {251}; 251 -> {252}; - 251 -> {262} [label="onUncaughtException"]; + 251 -> {264} [label="onUncaughtException"]; 252 -> {253}; - 252 -> {262} [label="onUncaughtException"]; 253 -> {254}; + 253 -> {264} [label="onUncaughtException"]; 254 -> {255}; - 254 -> {262} [label="onUncaughtException"]; - 255 -> {262} [label="return@/returnInFinally_insideTry_nonLocal"]; - 255 -> {256} [style=dotted]; - 256 -> {257} [style=dotted]; + 254 -> {264} [label="onUncaughtException"]; + 255 -> {256}; + 256 -> {257}; + 256 -> {264} [label="onUncaughtException"]; + 257 -> {264} [label="return@/returnInFinally_insideTry_nonLocal"]; 257 -> {258} [style=dotted]; - 258 -> {262} [style=dotted label="onUncaughtException"]; 258 -> {259} [style=dotted]; 259 -> {260} [style=dotted]; + 260 -> {264} [style=dotted label="onUncaughtException"]; 260 -> {261} [style=dotted]; 261 -> {262} [style=dotted]; - 262 -> {263}; - 263 -> {264}; + 262 -> {263} [style=dotted]; + 263 -> {264} [style=dotted]; 264 -> {265}; 265 -> {266}; 266 -> {267}; 267 -> {268}; 268 -> {269}; - 269 -> {284} [label="return@/returnInFinally_insideTry_nonLocal"]; - 269 -> {270} [style=dotted]; - 270 -> {271} [style=dotted]; + 269 -> {270}; + 270 -> {271}; + 271 -> {286} [label="return@/returnInFinally_insideTry_nonLocal"]; 271 -> {272} [style=dotted]; 272 -> {273} [style=dotted]; 273 -> {274} [style=dotted]; @@ -840,5 +845,7 @@ digraph castInTryWithJump_fir_kt { 281 -> {282} [style=dotted]; 282 -> {283} [style=dotted]; 283 -> {284} [style=dotted]; + 284 -> {285} [style=dotted]; + 285 -> {286} [style=dotted]; } diff --git a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/simple.kt b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/simple.kt index 5b9ca598247..4d480109025 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/simple.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/simple.kt @@ -1,4 +1,5 @@ // IGNORE_REVERSED_RESOLVE +// IGNORE_CONTRACT_VIOLATIONS // FIR_IDENTICAL @Retention(AnnotationRetention.SOURCE) @Repeatable