FIR DFA: split Flow into PersistentFlow and MutableFlow
The distinction is similar to persistent data structures and their builders. Only the MutableFlow can be passed to LogicSystem for modification; when it's ready, it can be converted into PersistentFlow and attached to a CFG node. The result is that the API is cleaner, the implementation is a bit more neat, and hopefully the use of PersistentHashMap.Builder improves performance a little. Also the node-to-flow map can now be removed in favor of just storing PersistentFlow inside a node, seeing as it's explicitly immutable and all that.
This commit is contained in:
+3
-3
@@ -47,9 +47,9 @@ internal open class StubBodyResolveTransformerComponents(
|
||||
transformer,
|
||||
context,
|
||||
) {
|
||||
override val dataFlowAnalyzer: FirDataFlowAnalyzer<*>
|
||||
get() = object : FirDataFlowAnalyzer<PersistentFlow>(this@StubBodyResolveTransformerComponents, context.dataFlowAnalyzerContext) {
|
||||
override val logicSystem: LogicSystem<PersistentFlow>
|
||||
override val dataFlowAnalyzer: FirDataFlowAnalyzer
|
||||
get() = object : FirDataFlowAnalyzer(this@StubBodyResolveTransformerComponents, context.dataFlowAnalyzerContext) {
|
||||
override val logicSystem: LogicSystem
|
||||
get() = error("Should not be called")
|
||||
|
||||
override val receiverStack: Iterable<ImplicitReceiverValue<*>>
|
||||
|
||||
Reference in New Issue
Block a user