[DFA] Move all variable storage to Flow #6985
Draft
Brian Norman (bnorm) wants to merge 4 commits into
Draft
Conversation
Instead of maintaining duplicate read-only functions in both PersistentFlow and MutableFlow, create abstract properties in the parent class `Flow`. These properties can then be used to directly implement the previously abstract functions instead, thus, simplifying the implementation of both subclasses. ^KT-87940
Unify naming to `getKnown*` or `remember*`, dependeing on if `createReal` is set to true or not. ^KT-87940
Instead of storing variable information in a mutable data stucture like VariableStorage, store known variables and their members in Flow instead. This makes sure variable information persists across DFA state changes and removes the need to create snapshots. ^KT-87940 Fixed
Code Owners
PR commands for maintainers
|
Member
Author
|
/dry-run |
This comment has been minimized.
This comment has been minimized.
This is an exploratory change to move the lazy PropertyStability value from a RealVariable into a Flow. This makes RealVariable stateless, so maintaining the same instance is no longer a performance optimization, only a memory optimization (something we can tackle again later). ^KT-87944
Brian Norman (bnorm)
force-pushed
the
bnorm/KT-87940-remove-variable-storage
branch
from
July 24, 2026 12:49
ddcfa15 to
7aad85f
Compare
Member
Author
|
/dry-run |
|
Couldn't reach TeamCity - please try again in a few minutes. |
Member
Author
|
/dry-run |
This comment has been minimized.
This comment has been minimized.
Member
Author
|
/dry-run |
|
THIS IS A DRY RUN Quality gate is triggered at https://buildserver.labs.intellij.net/build/1013359859 — use this link to get full insight. Quality gate was triggered with the following revisions:
Quality gate failed. See https://buildserver.labs.intellij.net/build/1013359859 to get full insight. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Instead of storing variable information in a mutable data stucture like
VariableStorage, store known variables and their members in Flow
instead. This makes sure variable information persists across DFA state
changes and removes the need to create snapshots.