[IrActualizer] Update doc on how the actualization process works.
This commit is contained in:
committed by
Space Team
parent
7813bb35cf
commit
f50fab65cc
+5
-5
@@ -78,11 +78,11 @@ class IrActualizer(
|
||||
val expectActualMap = collector.collect(classActualizationInfo)
|
||||
|
||||
if (!useIrFakeOverrideBuilder) {
|
||||
// 3. Actualize expect fake overrides in non-expect classes inside common or multi-platform module.
|
||||
// 2. Actualize expect fake overrides in non-expect classes inside common or multi-platform module.
|
||||
// It's probably important to run FakeOverridesActualizer before ActualFakeOverridesAdder
|
||||
FakeOverridesActualizer(expectActualMap).apply { dependentFragments.forEach { visitModuleFragment(it) } }
|
||||
|
||||
// 4. Add fake overrides to non-expect classes inside common or multi-platform module,
|
||||
// 3. Add fake overrides to non-expect classes inside common or multi-platform module,
|
||||
// taken from these non-expect classes actualized super classes.
|
||||
ActualFakeOverridesAdder(
|
||||
expectActualMap,
|
||||
@@ -91,16 +91,16 @@ class IrActualizer(
|
||||
).apply { dependentFragments.forEach { visitModuleFragment(it) } }
|
||||
}
|
||||
|
||||
// 5. Copy and actualize function parameter default values from expect functions
|
||||
// 4. Copy and actualize function parameter default values from expect functions
|
||||
val symbolRemapper = ActualizerSymbolRemapper(expectActualMap)
|
||||
val typeRemapper = DeepCopyTypeRemapper(symbolRemapper)
|
||||
FunctionDefaultParametersActualizer(symbolRemapper, typeRemapper, expectActualMap).actualize()
|
||||
|
||||
// 6. Actualize expect calls in dependent fragments using info obtained in the previous steps
|
||||
// 5. Actualize expect calls in dependent fragments using info obtained in the previous steps
|
||||
val actualizerVisitor = ActualizerVisitor(symbolRemapper, typeRemapper)
|
||||
dependentFragments.forEach { it.transform(actualizerVisitor, null) }
|
||||
|
||||
// 8. Move all declarations to mainFragment
|
||||
// 6. Move all declarations to mainFragment
|
||||
mergeIrFragments(mainFragment, dependentFragments)
|
||||
return expectActualMap
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user