Version 2.13.0-216.0.dev

Merge commit '617e05ee49a7a5662d678027443436a27ec2cb66' into 'dev'
diff --git a/pkg/compiler/test/deferred_loading/data/basic_deferred/main.dart b/pkg/compiler/test/deferred_loading/data/basic_deferred/main.dart
index ab1d73d..7414bf0 100644
--- a/pkg/compiler/test/deferred_loading/data/basic_deferred/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/basic_deferred/main.dart
@@ -3,8 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*library: 
- output_units=[f1: {units: [1{lib}], usedBy: [], needs: []}],
- steps=[lib=(f1)]
+ a_pre_fragments=[p1: {units: [1{lib}], usedBy: [], needs: []}],
+ b_finalized_fragments=[f1: [1{lib}]],
+ c_steps=[lib=(f1)]
 */
 
 // @dart = 2.7
diff --git a/pkg/compiler/test/deferred_loading/data/components/main.dart b/pkg/compiler/test/deferred_loading/data/components/main.dart
index e918bf6..d5ac645 100644
--- a/pkg/compiler/test/deferred_loading/data/components/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/components/main.dart
@@ -3,46 +3,62 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*spec.library: 
- output_units=[
-  f1: {units: [1{libA}], usedBy: [], needs: []},
-  f2: {units: [3{libB, libC, libD, libE}], usedBy: [], needs: []},
-  f3: {units: [2{libB}], usedBy: [], needs: []},
-  f4: {units: [4{libC}], usedBy: [], needs: []},
-  f5: {units: [5{libD}], usedBy: [], needs: []},
-  f6: {units: [6{libE}], usedBy: [], needs: []}],
- steps=[
+ a_pre_fragments=[
+  p1: {units: [1{libA}], usedBy: [], needs: []},
+  p2: {units: [2{libB}], usedBy: [], needs: []},
+  p3: {units: [4{libC}], usedBy: [], needs: []},
+  p4: {units: [5{libD}], usedBy: [], needs: []},
+  p5: {units: [6{libE}], usedBy: [], needs: []},
+  p6: {units: [3{libB, libC, libD, libE}], usedBy: [], needs: []}],
+ b_finalized_fragments=[
+  f1: [1{libA}],
+  f2: [2{libB}],
+  f3: [4{libC}],
+  f4: [5{libD}],
+  f5: [6{libE}],
+  f6: [3{libB, libC, libD, libE}]],
+ c_steps=[
   libA=(f1),
-  libB=(f2, f3),
-  libC=(f2, f4),
-  libD=(f2, f5),
-  libE=(f2, f6)]
+  libB=(f6, f2),
+  libC=(f6, f3),
+  libD=(f6, f4),
+  libE=(f6, f5)]
 */
 
 /*two-frag.library: 
- output_units=[
-  f1: {units: [1{libA}], usedBy: [], needs: []},
-  f2: {units: [3{libB, libC, libD, libE}, 6{libE}], usedBy: [], needs: [3]},
-  f3: {units: [5{libD}, 4{libC}, 2{libB}], usedBy: [2], needs: []}],
- steps=[
+ a_pre_fragments=[
+  p1: {units: [1{libA}], usedBy: [], needs: []},
+  p2: {units: [5{libD}, 4{libC}, 2{libB}], usedBy: [p3], needs: []},
+  p3: {units: [3{libB, libC, libD, libE}, 6{libE}], usedBy: [], needs: [p2]}],
+ b_finalized_fragments=[
+  f1: [1{libA}],
+  f2: [5{libD}+4{libC}+2{libB}],
+  f3: [3{libB, libC, libD, libE}+6{libE}]],
+ c_steps=[
   libA=(f1),
-  libB=(f2, f3),
-  libC=(f2, f3),
-  libD=(f2, f3),
-  libE=(f2)]
+  libB=(f3, f2),
+  libC=(f3, f2),
+  libD=(f3, f2),
+  libE=(f3)]
 */
 
 /*three-frag.library: 
- output_units=[
-  f1: {units: [1{libA}], usedBy: [], needs: []},
-  f2: {units: [3{libB, libC, libD, libE}], usedBy: [], needs: [3, 4]},
-  f3: {units: [4{libC}, 2{libB}], usedBy: [2], needs: []},
-  f4: {units: [6{libE}, 5{libD}], usedBy: [2], needs: []}],
- steps=[
+ a_pre_fragments=[
+  p1: {units: [1{libA}], usedBy: [], needs: []},
+  p2: {units: [4{libC}, 2{libB}], usedBy: [p4], needs: []},
+  p3: {units: [6{libE}, 5{libD}], usedBy: [p4], needs: []},
+  p4: {units: [3{libB, libC, libD, libE}], usedBy: [], needs: [p2, p3]}],
+ b_finalized_fragments=[
+  f1: [1{libA}],
+  f2: [4{libC}+2{libB}],
+  f3: [6{libE}+5{libD}],
+  f4: [3{libB, libC, libD, libE}]],
+ c_steps=[
   libA=(f1),
-  libB=(f2, f3),
-  libC=(f2, f3),
-  libD=(f2, f4),
-  libE=(f2, f4)]
+  libB=(f4, f2),
+  libC=(f4, f2),
+  libD=(f4, f3),
+  libE=(f4, f3)]
 */
 
 // @dart = 2.7
diff --git a/pkg/compiler/test/deferred_loading/data/deferred_class/main.dart b/pkg/compiler/test/deferred_loading/data/deferred_class/main.dart
index af43fe3..8df97de 100644
--- a/pkg/compiler/test/deferred_loading/data/deferred_class/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/deferred_class/main.dart
@@ -3,8 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*library: 
- output_units=[f1: {units: [1{lib}], usedBy: [], needs: []}],
- steps=[lib=(f1)]
+ a_pre_fragments=[p1: {units: [1{lib}], usedBy: [], needs: []}],
+ b_finalized_fragments=[f1: [1{lib}]],
+ c_steps=[lib=(f1)]
 */
 
 // @dart = 2.7
diff --git a/pkg/compiler/test/deferred_loading/data/deferred_constant1/main.dart b/pkg/compiler/test/deferred_loading/data/deferred_constant1/main.dart
index fa722a4..dea1021 100644
--- a/pkg/compiler/test/deferred_loading/data/deferred_constant1/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/deferred_constant1/main.dart
@@ -3,8 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*library: 
- output_units=[f1: {units: [1{lib2}], usedBy: [], needs: []}],
- steps=[lib2=(f1)]
+ a_pre_fragments=[p1: {units: [1{lib2}], usedBy: [], needs: []}],
+ b_finalized_fragments=[f1: [1{lib2}]],
+ c_steps=[lib2=(f1)]
 */
 
 // @dart = 2.7
diff --git a/pkg/compiler/test/deferred_loading/data/deferred_constant2/main.dart b/pkg/compiler/test/deferred_loading/data/deferred_constant2/main.dart
index b4cc534..566be71 100644
--- a/pkg/compiler/test/deferred_loading/data/deferred_constant2/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/deferred_constant2/main.dart
@@ -3,8 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*library: 
- output_units=[f1: {units: [1{lib}], usedBy: [], needs: []}],
- steps=[lib=(f1)]
+ a_pre_fragments=[p1: {units: [1{lib}], usedBy: [], needs: []}],
+ b_finalized_fragments=[f1: [1{lib}]],
+ c_steps=[lib=(f1)]
 */
 
 // @dart = 2.7
diff --git a/pkg/compiler/test/deferred_loading/data/deferred_constant3/main.dart b/pkg/compiler/test/deferred_loading/data/deferred_constant3/main.dart
index 0810049..8f1f9f3 100644
--- a/pkg/compiler/test/deferred_loading/data/deferred_constant3/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/deferred_constant3/main.dart
@@ -3,10 +3,13 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*library: 
- output_units=[
-  f1: {units: [1{l1}], usedBy: [], needs: []},
-  f2: {units: [2{l2}], usedBy: [], needs: []}],
- steps=[
+ a_pre_fragments=[
+  p1: {units: [1{l1}], usedBy: [], needs: []},
+  p2: {units: [2{l2}], usedBy: [], needs: []}],
+ b_finalized_fragments=[
+  f1: [1{l1}],
+  f2: [2{l2}]],
+ c_steps=[
   l1=(f1),
   l2=(f2)]
 */
diff --git a/pkg/compiler/test/deferred_loading/data/deferred_fail_and_retry/main.dart b/pkg/compiler/test/deferred_loading/data/deferred_fail_and_retry/main.dart
index ba1eed1..fd35d81 100644
--- a/pkg/compiler/test/deferred_loading/data/deferred_fail_and_retry/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/deferred_fail_and_retry/main.dart
@@ -3,8 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*library: 
- output_units=[f1: {units: [1{lib}], usedBy: [], needs: []}],
- steps=[lib=(f1)]
+ a_pre_fragments=[p1: {units: [1{lib}], usedBy: [], needs: []}],
+ b_finalized_fragments=[f1: [1{lib}]],
+ c_steps=[lib=(f1)]
 */
 
 // @dart = 2.7
diff --git a/pkg/compiler/test/deferred_loading/data/deferred_function/main.dart b/pkg/compiler/test/deferred_loading/data/deferred_function/main.dart
index 48dd14a..46e15ef 100644
--- a/pkg/compiler/test/deferred_loading/data/deferred_function/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/deferred_function/main.dart
@@ -3,8 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*library: 
- output_units=[f1: {units: [1{lib}], usedBy: [], needs: []}],
- steps=[lib=(f1)]
+ a_pre_fragments=[p1: {units: [1{lib}], usedBy: [], needs: []}],
+ b_finalized_fragments=[f1: [1{lib}]],
+ c_steps=[lib=(f1)]
 */
 
 // @dart = 2.7
diff --git a/pkg/compiler/test/deferred_loading/data/deferred_overlapping/main.dart b/pkg/compiler/test/deferred_loading/data/deferred_overlapping/main.dart
index 154ad59..11062ba 100644
--- a/pkg/compiler/test/deferred_loading/data/deferred_overlapping/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/deferred_overlapping/main.dart
@@ -3,23 +3,31 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*spec.library: 
- output_units=[
-  f1: {units: [1{lib1, lib2}], usedBy: [], needs: []},
-  f2: {units: [2{lib1}], usedBy: [], needs: []},
-  f3: {units: [3{lib2}], usedBy: [], needs: []}],
- steps=[
-  lib1=(f1, f2),
-  lib2=(f1, f3)]
+ a_pre_fragments=[
+  p1: {units: [2{lib1}], usedBy: [], needs: []},
+  p2: {units: [3{lib2}], usedBy: [], needs: []},
+  p3: {units: [1{lib1, lib2}], usedBy: [], needs: []}],
+ b_finalized_fragments=[
+  f1: [2{lib1}],
+  f2: [3{lib2}],
+  f3: [1{lib1, lib2}]],
+ c_steps=[
+  lib1=(f3, f1),
+  lib2=(f3, f2)]
 */
 
 /*two-frag|three-frag.library: 
- output_units=[
-  f1: {units: [1{lib1, lib2}], usedBy: [], needs: [2, 3]},
-  f2: {units: [2{lib1}], usedBy: [1], needs: []},
-  f3: {units: [3{lib2}], usedBy: [1], needs: []}],
- steps=[
-  lib1=(f1, f2),
-  lib2=(f1, f3)]
+ a_pre_fragments=[
+  p1: {units: [2{lib1}], usedBy: [p3], needs: []},
+  p2: {units: [3{lib2}], usedBy: [p3], needs: []},
+  p3: {units: [1{lib1, lib2}], usedBy: [], needs: [p1, p2]}],
+ b_finalized_fragments=[
+  f1: [2{lib1}],
+  f2: [3{lib2}],
+  f3: [1{lib1, lib2}]],
+ c_steps=[
+  lib1=(f3, f1),
+  lib2=(f3, f2)]
 */
 
 // @dart = 2.7
diff --git a/pkg/compiler/test/deferred_loading/data/deferred_typed_map/main.dart b/pkg/compiler/test/deferred_loading/data/deferred_typed_map/main.dart
index 45bddff..9bf864e 100644
--- a/pkg/compiler/test/deferred_loading/data/deferred_typed_map/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/deferred_typed_map/main.dart
@@ -3,8 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*library: 
- output_units=[f1: {units: [1{lib}], usedBy: [], needs: []}],
- steps=[lib=(f1)]
+ a_pre_fragments=[p1: {units: [1{lib}], usedBy: [], needs: []}],
+ b_finalized_fragments=[f1: [1{lib}]],
+ c_steps=[lib=(f1)]
 */
 
 // @dart = 2.7
diff --git a/pkg/compiler/test/deferred_loading/data/deferred_typedef/main.dart b/pkg/compiler/test/deferred_loading/data/deferred_typedef/main.dart
index c838c8f..5af271f 100644
--- a/pkg/compiler/test/deferred_loading/data/deferred_typedef/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/deferred_typedef/main.dart
@@ -3,8 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*library: 
- output_units=[f1: {units: [1{lib1}], usedBy: [], needs: []}],
- steps=[lib1=(f1)]
+ a_pre_fragments=[p1: {units: [1{lib1}], usedBy: [], needs: []}],
+ b_finalized_fragments=[f1: [1{lib1}]],
+ c_steps=[lib1=(f1)]
 */
 
 // @dart = 2.7
diff --git a/pkg/compiler/test/deferred_loading/data/dont_inline_deferred_constants/main.dart b/pkg/compiler/test/deferred_loading/data/dont_inline_deferred_constants/main.dart
index db1d7a6..8a5fa12 100644
--- a/pkg/compiler/test/deferred_loading/data/dont_inline_deferred_constants/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/dont_inline_deferred_constants/main.dart
@@ -3,32 +3,43 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*spec.library: 
- output_units=[
-  f1: {units: [2{lib1, lib2}], usedBy: [], needs: []},
-  f2: {units: [1{lib1}], usedBy: [], needs: []},
-  f3: {units: [3{lib2}], usedBy: [], needs: []}],
- steps=[
-  lib1=(f1, f2),
-  lib2=(f1, f3)]
+ a_pre_fragments=[
+  p1: {units: [1{lib1}], usedBy: [], needs: []},
+  p2: {units: [3{lib2}], usedBy: [], needs: []},
+  p3: {units: [2{lib1, lib2}], usedBy: [], needs: []}],
+ b_finalized_fragments=[
+  f1: [1{lib1}],
+  f2: [3{lib2}],
+  f3: [2{lib1, lib2}]],
+ c_steps=[
+  lib1=(f3, f1),
+  lib2=(f3, f2)]
 */
 
 /*three-frag.library: 
- output_units=[
-  f1: {units: [2{lib1, lib2}], usedBy: [], needs: [2, 3]},
-  f2: {units: [1{lib1}], usedBy: [1], needs: []},
-  f3: {units: [3{lib2}], usedBy: [1], needs: []}],
- steps=[
-  lib1=(f1, f2),
-  lib2=(f1, f3)]
+ a_pre_fragments=[
+  p1: {units: [1{lib1}], usedBy: [p3], needs: []},
+  p2: {units: [3{lib2}], usedBy: [p3], needs: []},
+  p3: {units: [2{lib1, lib2}], usedBy: [], needs: [p1, p2]}],
+ b_finalized_fragments=[
+  f1: [1{lib1}],
+  f2: [3{lib2}],
+  f3: [2{lib1, lib2}]],
+ c_steps=[
+  lib1=(f3, f1),
+  lib2=(f3, f2)]
 */
 
 /*two-frag.library: 
- output_units=[
-  f1: {units: [2{lib1, lib2}, 3{lib2}], usedBy: [], needs: [2]},
-  f2: {units: [1{lib1}], usedBy: [1], needs: []}],
- steps=[
-  lib1=(f1, f2),
-  lib2=(f1)]
+ a_pre_fragments=[
+  p1: {units: [1{lib1}], usedBy: [p2], needs: []},
+  p2: {units: [2{lib1, lib2}, 3{lib2}], usedBy: [], needs: [p1]}],
+ b_finalized_fragments=[
+  f1: [1{lib1}],
+  f2: [2{lib1, lib2}+3{lib2}]],
+ c_steps=[
+  lib1=(f2, f1),
+  lib2=(f2)]
 */
 
 // @dart = 2.7
diff --git a/pkg/compiler/test/deferred_loading/data/dont_inline_deferred_global/main.dart b/pkg/compiler/test/deferred_loading/data/dont_inline_deferred_global/main.dart
index 59d567e..b0a39e6 100644
--- a/pkg/compiler/test/deferred_loading/data/dont_inline_deferred_global/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/dont_inline_deferred_global/main.dart
@@ -3,8 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*library: 
- output_units=[f1: {units: [1{lib}], usedBy: [], needs: []}],
- steps=[lib=(f1)]
+ a_pre_fragments=[p1: {units: [1{lib}], usedBy: [], needs: []}],
+ b_finalized_fragments=[f1: [1{lib}]],
+ c_steps=[lib=(f1)]
 */
 
 // @dart = 2.7
diff --git a/pkg/compiler/test/deferred_loading/data/follow_implicit_super_regression_test/main.dart b/pkg/compiler/test/deferred_loading/data/follow_implicit_super_regression_test/main.dart
index 0465c9f..e4ff353 100644
--- a/pkg/compiler/test/deferred_loading/data/follow_implicit_super_regression_test/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/follow_implicit_super_regression_test/main.dart
@@ -3,8 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*library: 
- output_units=[f1: {units: [1{lib}], usedBy: [], needs: []}],
- steps=[lib=(f1)]
+ a_pre_fragments=[p1: {units: [1{lib}], usedBy: [], needs: []}],
+ b_finalized_fragments=[f1: [1{lib}]],
+ c_steps=[lib=(f1)]
 */
 
 // @dart = 2.7
diff --git a/pkg/compiler/test/deferred_loading/data/future_or/main.dart b/pkg/compiler/test/deferred_loading/data/future_or/main.dart
index 77ca4a0..fd022cf 100644
--- a/pkg/compiler/test/deferred_loading/data/future_or/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/future_or/main.dart
@@ -3,8 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*library: 
- output_units=[f1: {units: [1{lib1}], usedBy: [], needs: []}],
- steps=[lib1=(f1)]
+ a_pre_fragments=[p1: {units: [1{lib1}], usedBy: [], needs: []}],
+ b_finalized_fragments=[f1: [1{lib1}]],
+ c_steps=[lib1=(f1)]
 */
 
 // @dart = 2.7
diff --git a/pkg/compiler/test/deferred_loading/data/instantiation0/main.dart b/pkg/compiler/test/deferred_loading/data/instantiation0/main.dart
index 9b83f62..ad5ec8c 100644
--- a/pkg/compiler/test/deferred_loading/data/instantiation0/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/instantiation0/main.dart
@@ -3,8 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*library: 
- output_units=[f1: {units: [1{b}], usedBy: [], needs: []}],
- steps=[b=(f1)]
+ a_pre_fragments=[p1: {units: [1{b}], usedBy: [], needs: []}],
+ b_finalized_fragments=[f1: [1{b}]],
+ c_steps=[b=(f1)]
 */
 
 // @dart = 2.7
diff --git a/pkg/compiler/test/deferred_loading/data/instantiation1/main.dart b/pkg/compiler/test/deferred_loading/data/instantiation1/main.dart
index 4642e97..ae529a9 100644
--- a/pkg/compiler/test/deferred_loading/data/instantiation1/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/instantiation1/main.dart
@@ -3,23 +3,31 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*spec.library: 
- output_units=[
-  f1: {units: [2{b, c}], usedBy: [], needs: []},
-  f2: {units: [1{b}], usedBy: [], needs: []},
-  f3: {units: [3{c}], usedBy: [], needs: []}],
- steps=[
-  b=(f1, f2),
-  c=(f1, f3)]
+ a_pre_fragments=[
+  p1: {units: [1{b}], usedBy: [], needs: []},
+  p2: {units: [3{c}], usedBy: [], needs: []},
+  p3: {units: [2{b, c}], usedBy: [], needs: []}],
+ b_finalized_fragments=[
+  f1: [1{b}],
+  f2: [3{c}],
+  f3: [2{b, c}]],
+ c_steps=[
+  b=(f3, f1),
+  c=(f3, f2)]
 */
 
 /*two-frag|three-frag.library: 
- output_units=[
-  f1: {units: [2{b, c}], usedBy: [], needs: [2, 3]},
-  f2: {units: [1{b}], usedBy: [1], needs: []},
-  f3: {units: [3{c}], usedBy: [1], needs: []}],
- steps=[
-  b=(f1, f2),
-  c=(f1, f3)]
+ a_pre_fragments=[
+  p1: {units: [1{b}], usedBy: [p3], needs: []},
+  p2: {units: [3{c}], usedBy: [p3], needs: []},
+  p3: {units: [2{b, c}], usedBy: [], needs: [p1, p2]}],
+ b_finalized_fragments=[
+  f1: [1{b}],
+  f2: [3{c}],
+  f3: [2{b, c}]],
+ c_steps=[
+  b=(f3, f1),
+  c=(f3, f2)]
 */
 
 // @dart = 2.7
diff --git a/pkg/compiler/test/deferred_loading/data/instantiation2/main.dart b/pkg/compiler/test/deferred_loading/data/instantiation2/main.dart
index 4f5bd68..66b862e 100644
--- a/pkg/compiler/test/deferred_loading/data/instantiation2/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/instantiation2/main.dart
@@ -3,23 +3,31 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*spec.library: 
- output_units=[
-  f1: {units: [1{b, c}], usedBy: [], needs: []},
-  f2: {units: [2{b}], usedBy: [], needs: []},
-  f3: {units: [3{c}], usedBy: [], needs: []}],
- steps=[
-  b=(f1, f2),
-  c=(f1, f3)]
+ a_pre_fragments=[
+  p1: {units: [2{b}], usedBy: [], needs: []},
+  p2: {units: [3{c}], usedBy: [], needs: []},
+  p3: {units: [1{b, c}], usedBy: [], needs: []}],
+ b_finalized_fragments=[
+  f1: [2{b}],
+  f2: [3{c}],
+  f3: [1{b, c}]],
+ c_steps=[
+  b=(f3, f1),
+  c=(f3, f2)]
 */
 
 /*two-frag|three-frag.library: 
- output_units=[
-  f1: {units: [1{b, c}], usedBy: [], needs: [2, 3]},
-  f2: {units: [2{b}], usedBy: [1], needs: []},
-  f3: {units: [3{c}], usedBy: [1], needs: []}],
- steps=[
-  b=(f1, f2),
-  c=(f1, f3)]
+ a_pre_fragments=[
+  p1: {units: [2{b}], usedBy: [p3], needs: []},
+  p2: {units: [3{c}], usedBy: [p3], needs: []},
+  p3: {units: [1{b, c}], usedBy: [], needs: [p1, p2]}],
+ b_finalized_fragments=[
+  f1: [2{b}],
+  f2: [3{c}],
+  f3: [1{b, c}]],
+ c_steps=[
+  b=(f3, f1),
+  c=(f3, f2)]
 */
 
 // @dart = 2.7
diff --git a/pkg/compiler/test/deferred_loading/data/instantiation3/main.dart b/pkg/compiler/test/deferred_loading/data/instantiation3/main.dart
index 10e0815..bd10d05 100644
--- a/pkg/compiler/test/deferred_loading/data/instantiation3/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/instantiation3/main.dart
@@ -3,8 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*library: 
- output_units=[f1: {units: [1{b}], usedBy: [], needs: []}],
- steps=[b=(f1)]
+ a_pre_fragments=[p1: {units: [1{b}], usedBy: [], needs: []}],
+ b_finalized_fragments=[f1: [1{b}]],
+ c_steps=[b=(f1)]
 */
 
 // @dart = 2.7
diff --git a/pkg/compiler/test/deferred_loading/data/instantiation4/main.dart b/pkg/compiler/test/deferred_loading/data/instantiation4/main.dart
index f972fc5..83fde4b 100644
--- a/pkg/compiler/test/deferred_loading/data/instantiation4/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/instantiation4/main.dart
@@ -3,23 +3,31 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*spec.library: 
- output_units=[
-  f1: {units: [2{b, c}], usedBy: [], needs: []},
-  f2: {units: [1{b}], usedBy: [], needs: []},
-  f3: {units: [3{c}], usedBy: [], needs: []}],
- steps=[
-  b=(f1, f2),
-  c=(f1, f3)]
+ a_pre_fragments=[
+  p1: {units: [1{b}], usedBy: [], needs: []},
+  p2: {units: [3{c}], usedBy: [], needs: []},
+  p3: {units: [2{b, c}], usedBy: [], needs: []}],
+ b_finalized_fragments=[
+  f1: [1{b}],
+  f2: [3{c}],
+  f3: [2{b, c}]],
+ c_steps=[
+  b=(f3, f1),
+  c=(f3, f2)]
 */
 
 /*two-frag|three-frag.library: 
- output_units=[
-  f1: {units: [2{b, c}], usedBy: [], needs: [2, 3]},
-  f2: {units: [1{b}], usedBy: [1], needs: []},
-  f3: {units: [3{c}], usedBy: [1], needs: []}],
- steps=[
-  b=(f1, f2),
-  c=(f1, f3)]
+ a_pre_fragments=[
+  p1: {units: [1{b}], usedBy: [p3], needs: []},
+  p2: {units: [3{c}], usedBy: [p3], needs: []},
+  p3: {units: [2{b, c}], usedBy: [], needs: [p1, p2]}],
+ b_finalized_fragments=[
+  f1: [1{b}],
+  f2: [3{c}],
+  f3: [2{b, c}]],
+ c_steps=[
+  b=(f3, f1),
+  c=(f3, f2)]
 */
 
 // @dart = 2.7
diff --git a/pkg/compiler/test/deferred_loading/data/instantiation5/main.dart b/pkg/compiler/test/deferred_loading/data/instantiation5/main.dart
index f9dd67d..2150985 100644
--- a/pkg/compiler/test/deferred_loading/data/instantiation5/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/instantiation5/main.dart
@@ -3,23 +3,31 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*spec.library: 
- output_units=[
-  f1: {units: [1{b, c}], usedBy: [], needs: []},
-  f2: {units: [2{b}], usedBy: [], needs: []},
-  f3: {units: [3{c}], usedBy: [], needs: []}],
- steps=[
-  b=(f1, f2),
-  c=(f1, f3)]
+ a_pre_fragments=[
+  p1: {units: [2{b}], usedBy: [], needs: []},
+  p2: {units: [3{c}], usedBy: [], needs: []},
+  p3: {units: [1{b, c}], usedBy: [], needs: []}],
+ b_finalized_fragments=[
+  f1: [2{b}],
+  f2: [3{c}],
+  f3: [1{b, c}]],
+ c_steps=[
+  b=(f3, f1),
+  c=(f3, f2)]
 */
 
 /*two-frag|three-frag.library: 
- output_units=[
-  f1: {units: [1{b, c}], usedBy: [], needs: [2, 3]},
-  f2: {units: [2{b}], usedBy: [1], needs: []},
-  f3: {units: [3{c}], usedBy: [1], needs: []}],
- steps=[
-  b=(f1, f2),
-  c=(f1, f3)]
+ a_pre_fragments=[
+  p1: {units: [2{b}], usedBy: [p3], needs: []},
+  p2: {units: [3{c}], usedBy: [p3], needs: []},
+  p3: {units: [1{b, c}], usedBy: [], needs: [p1, p2]}],
+ b_finalized_fragments=[
+  f1: [2{b}],
+  f2: [3{c}],
+  f3: [1{b, c}]],
+ c_steps=[
+  b=(f3, f1),
+  c=(f3, f2)]
 */
 
 // @dart = 2.7
diff --git a/pkg/compiler/test/deferred_loading/data/inteface_type_variable/main.dart b/pkg/compiler/test/deferred_loading/data/inteface_type_variable/main.dart
index 491bcf6..3259ffc 100644
--- a/pkg/compiler/test/deferred_loading/data/inteface_type_variable/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/inteface_type_variable/main.dart
@@ -3,8 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*library: 
- output_units=[f1: {units: [1{lib}], usedBy: [], needs: []}],
- steps=[lib=(f1)]
+ a_pre_fragments=[p1: {units: [1{lib}], usedBy: [], needs: []}],
+ b_finalized_fragments=[f1: [1{lib}]],
+ c_steps=[lib=(f1)]
 */
 
 // @dart = 2.7
diff --git a/pkg/compiler/test/deferred_loading/data/lazy_types/main.dart b/pkg/compiler/test/deferred_loading/data/lazy_types/main.dart
index ce78d8a..2efbbd6 100644
--- a/pkg/compiler/test/deferred_loading/data/lazy_types/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/lazy_types/main.dart
@@ -3,38 +3,56 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*spec.library: 
- output_units=[
-  f1: {units: [3{libA, libB, libC}], usedBy: [], needs: []},
-  f2: {units: [6{libA}], usedBy: [], needs: []},
-  f3: {units: [1{libB}], usedBy: [], needs: []},
-  f4: {units: [2{libC}], usedBy: [], needs: []}],
- steps=[
-  libA=(f1, f2),
-  libB=(f1, f3),
-  libC=(f1, f4)]
+ a_pre_fragments=[
+  p1: {units: [6{libA}], usedBy: [], needs: []},
+  p2: {units: [1{libB}], usedBy: [], needs: []},
+  p3: {units: [2{libC}], usedBy: [], needs: []},
+  p4: {units: [4{libA, libC}], usedBy: [], needs: []},
+  p5: {units: [5{libB, libC}], usedBy: [], needs: []},
+  p6: {units: [3{libA, libB, libC}], usedBy: [], needs: []}],
+ b_finalized_fragments=[
+  f1: [6{libA}],
+  f2: [1{libB}],
+  f3: [2{libC}],
+  f4: [],
+  f5: [],
+  f6: [3{libA, libB, libC}]],
+ c_steps=[
+  libA=(f6, f1),
+  libB=(f6, f2),
+  libC=(f6, f3)]
 */
 
 /*two-frag.library: 
- output_units=[
-  f1: {units: [3{libA, libB, libC}], usedBy: [], needs: [2]},
-  f2: {units: [5{libB, libC}, 4{libA, libC}, 2{libC}], usedBy: [1], needs: [3]},
-  f3: {units: [1{libB}, 6{libA}], usedBy: [2], needs: []}],
- steps=[
-  libA=(f1, f2, f3),
-  libB=(f1, f2, f3),
-  libC=(f1, f2)]
+ a_pre_fragments=[
+  p1: {units: [1{libB}, 6{libA}], usedBy: [p2], needs: []},
+  p2: {units: [5{libB, libC}, 4{libA, libC}, 2{libC}], usedBy: [p3], needs: [p1]},
+  p3: {units: [3{libA, libB, libC}], usedBy: [], needs: [p2]}],
+ b_finalized_fragments=[
+  f1: [1{libB}+6{libA}],
+  f2: [5{libB, libC}+4{libA, libC}+2{libC}],
+  f3: [3{libA, libB, libC}]],
+ c_steps=[
+  libA=(f3, f2, f1),
+  libB=(f3, f2, f1),
+  libC=(f3, f2)]
 */
 
 /*three-frag.library: 
- output_units=[
-  f1: {units: [3{libA, libB, libC}, 5{libB, libC}, 4{libA, libC}], usedBy: [], needs: [4, 3, 2]},
-  f2: {units: [6{libA}], usedBy: [1], needs: []},
-  f3: {units: [1{libB}], usedBy: [1], needs: []},
-  f4: {units: [2{libC}], usedBy: [1], needs: []}],
- steps=[
-  libA=(f1, f2),
-  libB=(f1, f3),
-  libC=(f1, f4)]
+ a_pre_fragments=[
+  p1: {units: [6{libA}], usedBy: [p4], needs: []},
+  p2: {units: [1{libB}], usedBy: [p4], needs: []},
+  p3: {units: [2{libC}], usedBy: [p4], needs: []},
+  p4: {units: [3{libA, libB, libC}, 5{libB, libC}, 4{libA, libC}], usedBy: [], needs: [p3, p2, p1]}],
+ b_finalized_fragments=[
+  f1: [6{libA}],
+  f2: [1{libB}],
+  f3: [2{libC}],
+  f4: [3{libA, libB, libC}+5{libB, libC}+4{libA, libC}]],
+ c_steps=[
+  libA=(f4, f1),
+  libB=(f4, f2),
+  libC=(f4, f3)]
 */
 
 // @dart = 2.7
diff --git a/pkg/compiler/test/deferred_loading/data/many_parts/main.dart b/pkg/compiler/test/deferred_loading/data/many_parts/main.dart
index 6cd9224..9471cc9 100644
--- a/pkg/compiler/test/deferred_loading/data/many_parts/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/many_parts/main.dart
@@ -3,71 +3,112 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*spec.library: 
- output_units=[
-  f10: {units: [7{b1, b2, b4}], usedBy: [], needs: []},
-  f11: {units: [5{b1, b2, b3}], usedBy: [], needs: []},
-  f12: {units: [10{b1, b5}], usedBy: [], needs: []},
-  f13: {units: [6{b1, b4}], usedBy: [], needs: []},
-  f14: {units: [4{b1, b3}], usedBy: [], needs: []},
-  f15: {units: [3{b1, b2}], usedBy: [], needs: []},
-  f16: {units: [2{b1}], usedBy: [], needs: []},
-  f17: {units: [24{b2, b3, b4, b5}], usedBy: [], needs: []},
-  f18: {units: [23{b2, b4, b5}], usedBy: [], needs: []},
-  f19: {units: [22{b2, b3, b5}], usedBy: [], needs: []},
-  f1: {units: [1{b1, b2, b3, b4, b5}], usedBy: [], needs: []},
-  f20: {units: [20{b2, b3, b4}], usedBy: [], needs: []},
-  f21: {units: [21{b2, b5}], usedBy: [], needs: []},
-  f22: {units: [19{b2, b4}], usedBy: [], needs: []},
-  f23: {units: [18{b2, b3}], usedBy: [], needs: []},
-  f24: {units: [17{b2}], usedBy: [], needs: []},
-  f25: {units: [28{b3, b4, b5}], usedBy: [], needs: []},
-  f26: {units: [27{b3, b5}], usedBy: [], needs: []},
-  f27: {units: [26{b3, b4}], usedBy: [], needs: []},
-  f28: {units: [25{b3}], usedBy: [], needs: []},
-  f29: {units: [30{b4, b5}], usedBy: [], needs: []},
-  f2: {units: [16{b1, b3, b4, b5}], usedBy: [], needs: []},
-  f30: {units: [29{b4}], usedBy: [], needs: []},
-  f31: {units: [31{b5}], usedBy: [], needs: []},
-  f3: {units: [15{b1, b2, b4, b5}], usedBy: [], needs: []},
-  f4: {units: [13{b1, b2, b3, b5}], usedBy: [], needs: []},
-  f5: {units: [9{b1, b2, b3, b4}], usedBy: [], needs: []},
-  f6: {units: [14{b1, b4, b5}], usedBy: [], needs: []},
-  f7: {units: [12{b1, b3, b5}], usedBy: [], needs: []},
-  f8: {units: [8{b1, b3, b4}], usedBy: [], needs: []},
-  f9: {units: [11{b1, b2, b5}], usedBy: [], needs: []}],
- steps=[
-  b1=(f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14, f15, f16),
-  b2=(f1, f17, f3, f4, f5, f18, f19, f20, f9, f10, f11, f21, f22, f23, f15, f24),
-  b3=(f1, f17, f2, f4, f5, f25, f19, f20, f7, f8, f11, f26, f27, f23, f14, f28),
-  b4=(f1, f17, f2, f3, f5, f25, f18, f20, f6, f8, f10, f29, f27, f22, f13, f30),
-  b5=(f1, f17, f2, f3, f4, f25, f18, f19, f6, f7, f9, f29, f26, f21, f12, f31)]
+ a_pre_fragments=[
+  p10: {units: [18{b2, b3}], usedBy: [], needs: []},
+  p11: {units: [19{b2, b4}], usedBy: [], needs: []},
+  p12: {units: [21{b2, b5}], usedBy: [], needs: []},
+  p13: {units: [26{b3, b4}], usedBy: [], needs: []},
+  p14: {units: [27{b3, b5}], usedBy: [], needs: []},
+  p15: {units: [30{b4, b5}], usedBy: [], needs: []},
+  p16: {units: [5{b1, b2, b3}], usedBy: [], needs: []},
+  p17: {units: [7{b1, b2, b4}], usedBy: [], needs: []},
+  p18: {units: [11{b1, b2, b5}], usedBy: [], needs: []},
+  p19: {units: [8{b1, b3, b4}], usedBy: [], needs: []},
+  p1: {units: [2{b1}], usedBy: [], needs: []},
+  p20: {units: [12{b1, b3, b5}], usedBy: [], needs: []},
+  p21: {units: [14{b1, b4, b5}], usedBy: [], needs: []},
+  p22: {units: [20{b2, b3, b4}], usedBy: [], needs: []},
+  p23: {units: [22{b2, b3, b5}], usedBy: [], needs: []},
+  p24: {units: [23{b2, b4, b5}], usedBy: [], needs: []},
+  p25: {units: [28{b3, b4, b5}], usedBy: [], needs: []},
+  p26: {units: [9{b1, b2, b3, b4}], usedBy: [], needs: []},
+  p27: {units: [13{b1, b2, b3, b5}], usedBy: [], needs: []},
+  p28: {units: [15{b1, b2, b4, b5}], usedBy: [], needs: []},
+  p29: {units: [16{b1, b3, b4, b5}], usedBy: [], needs: []},
+  p2: {units: [17{b2}], usedBy: [], needs: []},
+  p30: {units: [24{b2, b3, b4, b5}], usedBy: [], needs: []},
+  p31: {units: [1{b1, b2, b3, b4, b5}], usedBy: [], needs: []},
+  p3: {units: [25{b3}], usedBy: [], needs: []},
+  p4: {units: [29{b4}], usedBy: [], needs: []},
+  p5: {units: [31{b5}], usedBy: [], needs: []},
+  p6: {units: [3{b1, b2}], usedBy: [], needs: []},
+  p7: {units: [4{b1, b3}], usedBy: [], needs: []},
+  p8: {units: [6{b1, b4}], usedBy: [], needs: []},
+  p9: {units: [10{b1, b5}], usedBy: [], needs: []}],
+ b_finalized_fragments=[
+  f10: [18{b2, b3}],
+  f11: [19{b2, b4}],
+  f12: [21{b2, b5}],
+  f13: [26{b3, b4}],
+  f14: [27{b3, b5}],
+  f15: [30{b4, b5}],
+  f16: [5{b1, b2, b3}],
+  f17: [7{b1, b2, b4}],
+  f18: [11{b1, b2, b5}],
+  f19: [8{b1, b3, b4}],
+  f1: [2{b1}],
+  f20: [12{b1, b3, b5}],
+  f21: [14{b1, b4, b5}],
+  f22: [20{b2, b3, b4}],
+  f23: [22{b2, b3, b5}],
+  f24: [23{b2, b4, b5}],
+  f25: [28{b3, b4, b5}],
+  f26: [9{b1, b2, b3, b4}],
+  f27: [13{b1, b2, b3, b5}],
+  f28: [15{b1, b2, b4, b5}],
+  f29: [16{b1, b3, b4, b5}],
+  f2: [17{b2}],
+  f30: [24{b2, b3, b4, b5}],
+  f31: [1{b1, b2, b3, b4, b5}],
+  f3: [25{b3}],
+  f4: [29{b4}],
+  f5: [31{b5}],
+  f6: [3{b1, b2}],
+  f7: [4{b1, b3}],
+  f8: [6{b1, b4}],
+  f9: [10{b1, b5}]],
+ c_steps=[
+  b1=(f31, f29, f28, f27, f26, f21, f20, f19, f18, f17, f16, f9, f8, f7, f6, f1),
+  b2=(f31, f30, f28, f27, f26, f24, f23, f22, f18, f17, f16, f12, f11, f10, f6, f2),
+  b3=(f31, f30, f29, f27, f26, f25, f23, f22, f20, f19, f16, f14, f13, f10, f7, f3),
+  b4=(f31, f30, f29, f28, f26, f25, f24, f22, f21, f19, f17, f15, f13, f11, f8, f4),
+  b5=(f31, f30, f29, f28, f27, f25, f24, f23, f21, f20, f18, f15, f14, f12, f9, f5)]
 */
 
 /*three-frag.library: 
- output_units=[
-  f1: {units: [1{b1, b2, b3, b4, b5}], usedBy: [], needs: [3, 2]},
-  f2: {units: [24{b2, b3, b4, b5}, 16{b1, b3, b4, b5}, 15{b1, b2, b4, b5}, 13{b1, b2, b3, b5}], usedBy: [1], needs: [3]},
-  f3: {units: [9{b1, b2, b3, b4}, 28{b3, b4, b5}, 23{b2, b4, b5}, 22{b2, b3, b5}, 20{b2, b3, b4}, 14{b1, b4, b5}, 12{b1, b3, b5}, 8{b1, b3, b4}, 11{b1, b2, b5}, 7{b1, b2, b4}, 5{b1, b2, b3}, 30{b4, b5}, 27{b3, b5}], usedBy: [1, 2], needs: [4]},
-  f4: {units: [26{b3, b4}, 21{b2, b5}, 19{b2, b4}, 18{b2, b3}, 10{b1, b5}, 6{b1, b4}, 4{b1, b3}, 3{b1, b2}, 31{b5}, 29{b4}, 25{b3}, 17{b2}, 2{b1}], usedBy: [3], needs: []}],
- steps=[
-  b1=(f1, f2, f3, f4),
-  b2=(f1, f2, f3, f4),
-  b3=(f1, f2, f3, f4),
-  b4=(f1, f2, f3, f4),
-  b5=(f1, f2, f3, f4)]
+ a_pre_fragments=[
+  p1: {units: [26{b3, b4}, 21{b2, b5}, 19{b2, b4}, 18{b2, b3}, 10{b1, b5}, 6{b1, b4}, 4{b1, b3}, 3{b1, b2}, 31{b5}, 29{b4}, 25{b3}, 17{b2}, 2{b1}], usedBy: [p2], needs: []},
+  p2: {units: [9{b1, b2, b3, b4}, 28{b3, b4, b5}, 23{b2, b4, b5}, 22{b2, b3, b5}, 20{b2, b3, b4}, 14{b1, b4, b5}, 12{b1, b3, b5}, 8{b1, b3, b4}, 11{b1, b2, b5}, 7{b1, b2, b4}, 5{b1, b2, b3}, 30{b4, b5}, 27{b3, b5}], usedBy: [p4, p3], needs: [p1]},
+  p3: {units: [24{b2, b3, b4, b5}, 16{b1, b3, b4, b5}, 15{b1, b2, b4, b5}, 13{b1, b2, b3, b5}], usedBy: [p4], needs: [p2]},
+  p4: {units: [1{b1, b2, b3, b4, b5}], usedBy: [], needs: [p2, p3]}],
+ b_finalized_fragments=[
+  f1: [26{b3, b4}+21{b2, b5}+19{b2, b4}+18{b2, b3}+10{b1, b5}+6{b1, b4}+4{b1, b3}+3{b1, b2}+31{b5}+29{b4}+25{b3}+17{b2}+2{b1}],
+  f2: [9{b1, b2, b3, b4}+28{b3, b4, b5}+23{b2, b4, b5}+22{b2, b3, b5}+20{b2, b3, b4}+14{b1, b4, b5}+12{b1, b3, b5}+8{b1, b3, b4}+11{b1, b2, b5}+7{b1, b2, b4}+5{b1, b2, b3}+30{b4, b5}+27{b3, b5}],
+  f3: [24{b2, b3, b4, b5}+16{b1, b3, b4, b5}+15{b1, b2, b4, b5}+13{b1, b2, b3, b5}],
+  f4: [1{b1, b2, b3, b4, b5}]],
+ c_steps=[
+  b1=(f4, f3, f2, f1),
+  b2=(f4, f3, f2, f1),
+  b3=(f4, f3, f2, f1),
+  b4=(f4, f3, f2, f1),
+  b5=(f4, f3, f2, f1)]
 */
 
 /*two-frag.library: 
- output_units=[
-  f1: {units: [1{b1, b2, b3, b4, b5}], usedBy: [], needs: [2]},
-  f2: {units: [24{b2, b3, b4, b5}, 16{b1, b3, b4, b5}, 15{b1, b2, b4, b5}, 13{b1, b2, b3, b5}, 9{b1, b2, b3, b4}, 28{b3, b4, b5}, 23{b2, b4, b5}, 22{b2, b3, b5}, 20{b2, b3, b4}, 14{b1, b4, b5}, 12{b1, b3, b5}], usedBy: [1], needs: [3]},
-  f3: {units: [8{b1, b3, b4}, 11{b1, b2, b5}, 7{b1, b2, b4}, 5{b1, b2, b3}, 30{b4, b5}, 27{b3, b5}, 26{b3, b4}, 21{b2, b5}, 19{b2, b4}, 18{b2, b3}, 10{b1, b5}, 6{b1, b4}, 4{b1, b3}, 3{b1, b2}, 31{b5}, 29{b4}, 25{b3}, 17{b2}, 2{b1}], usedBy: [2], needs: []}],
- steps=[
-  b1=(f1, f2, f3),
-  b2=(f1, f2, f3),
-  b3=(f1, f2, f3),
-  b4=(f1, f2, f3),
-  b5=(f1, f2, f3)]
+ a_pre_fragments=[
+  p1: {units: [8{b1, b3, b4}, 11{b1, b2, b5}, 7{b1, b2, b4}, 5{b1, b2, b3}, 30{b4, b5}, 27{b3, b5}, 26{b3, b4}, 21{b2, b5}, 19{b2, b4}, 18{b2, b3}, 10{b1, b5}, 6{b1, b4}, 4{b1, b3}, 3{b1, b2}, 31{b5}, 29{b4}, 25{b3}, 17{b2}, 2{b1}], usedBy: [p2], needs: []},
+  p2: {units: [24{b2, b3, b4, b5}, 16{b1, b3, b4, b5}, 15{b1, b2, b4, b5}, 13{b1, b2, b3, b5}, 9{b1, b2, b3, b4}, 28{b3, b4, b5}, 23{b2, b4, b5}, 22{b2, b3, b5}, 20{b2, b3, b4}, 14{b1, b4, b5}, 12{b1, b3, b5}], usedBy: [p3], needs: [p1]},
+  p3: {units: [1{b1, b2, b3, b4, b5}], usedBy: [], needs: [p2]}],
+ b_finalized_fragments=[
+  f1: [8{b1, b3, b4}+11{b1, b2, b5}+7{b1, b2, b4}+5{b1, b2, b3}+30{b4, b5}+27{b3, b5}+26{b3, b4}+21{b2, b5}+19{b2, b4}+18{b2, b3}+10{b1, b5}+6{b1, b4}+4{b1, b3}+3{b1, b2}+31{b5}+29{b4}+25{b3}+17{b2}+2{b1}],
+  f2: [24{b2, b3, b4, b5}+16{b1, b3, b4, b5}+15{b1, b2, b4, b5}+13{b1, b2, b3, b5}+9{b1, b2, b3, b4}+28{b3, b4, b5}+23{b2, b4, b5}+22{b2, b3, b5}+20{b2, b3, b4}+14{b1, b4, b5}+12{b1, b3, b5}],
+  f3: [1{b1, b2, b3, b4, b5}]],
+ c_steps=[
+  b1=(f3, f2, f1),
+  b2=(f3, f2, f1),
+  b3=(f3, f2, f1),
+  b4=(f3, f2, f1),
+  b5=(f3, f2, f1)]
 */
 
 import 'lib1.dart';
diff --git a/pkg/compiler/test/deferred_loading/data/regress_35311/main.dart b/pkg/compiler/test/deferred_loading/data/regress_35311/main.dart
index c4a7073..3e2744d 100644
--- a/pkg/compiler/test/deferred_loading/data/regress_35311/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/regress_35311/main.dart
@@ -5,8 +5,9 @@
 // @dart = 2.7
 
 /*library: 
- output_units=[f1: {units: [1{lib}], usedBy: [], needs: []}],
- steps=[lib=(f1)]
+ a_pre_fragments=[p1: {units: [1{lib}], usedBy: [], needs: []}],
+ b_finalized_fragments=[f1: [1{lib}]],
+ c_steps=[lib=(f1)]
 */
 import 'lib.dart' deferred as lib;
 
diff --git a/pkg/compiler/test/deferred_loading/data/regress_43055/main.dart b/pkg/compiler/test/deferred_loading/data/regress_43055/main.dart
index 486907a..05772cd 100644
--- a/pkg/compiler/test/deferred_loading/data/regress_43055/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/regress_43055/main.dart
@@ -3,8 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*library: 
- output_units=[f1: {units: [1{libb}], usedBy: [], needs: []}],
- steps=[libb=(f1)]
+ a_pre_fragments=[p1: {units: [1{libb}], usedBy: [], needs: []}],
+ b_finalized_fragments=[f1: [1{libb}]],
+ c_steps=[libb=(f1)]
 */
 
 // @dart = 2.7
diff --git a/pkg/compiler/test/deferred_loading/data/shadowed_types/main.dart b/pkg/compiler/test/deferred_loading/data/shadowed_types/main.dart
index 753bc7f..92732f9 100644
--- a/pkg/compiler/test/deferred_loading/data/shadowed_types/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/shadowed_types/main.dart
@@ -2,11 +2,30 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*library: 
- output_units=[
-  f1: {units: [3{liba}], usedBy: [], needs: []},
-  f2: {units: [1{libb}], usedBy: [], needs: []}],
- steps=[
+/*spec.library: 
+ a_pre_fragments=[
+  p1: {units: [3{liba}], usedBy: [], needs: []},
+  p2: {units: [1{libb}], usedBy: [], needs: []},
+  p3: {units: [2{libb, liba}], usedBy: [], needs: []}],
+ b_finalized_fragments=[
+  f1: [3{liba}],
+  f2: [1{libb}],
+  f3: []],
+ c_steps=[
+  liba=(f1),
+  libb=(f2)]
+*/
+
+/*two-frag|three-frag.library: 
+ a_pre_fragments=[
+  p1: {units: [3{liba}], usedBy: [p3], needs: []},
+  p2: {units: [1{libb}], usedBy: [p3], needs: []},
+  p3: {units: [2{libb, liba}], usedBy: [], needs: [p1, p2]}],
+ b_finalized_fragments=[
+  f1: [3{liba}],
+  f2: [1{libb}],
+  f3: []],
+ c_steps=[
   liba=(f1),
   libb=(f2)]
 */
diff --git a/pkg/compiler/test/deferred_loading/data/shared_constant/main.dart b/pkg/compiler/test/deferred_loading/data/shared_constant/main.dart
index dea65bc..9c21ec7 100644
--- a/pkg/compiler/test/deferred_loading/data/shared_constant/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/shared_constant/main.dart
@@ -3,8 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*library: 
- output_units=[f1: {units: [1{s1, s2}], usedBy: [], needs: []}],
- steps=[
+ a_pre_fragments=[p1: {units: [1{s1, s2}], usedBy: [], needs: []}],
+ b_finalized_fragments=[f1: [1{s1, s2}]],
+ c_steps=[
   s1=(f1),
   s2=(f1)]
 */
diff --git a/pkg/compiler/test/deferred_loading/data/static_separate/main.dart b/pkg/compiler/test/deferred_loading/data/static_separate/main.dart
index a4f5f5a..42aa6ee 100644
--- a/pkg/compiler/test/deferred_loading/data/static_separate/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/static_separate/main.dart
@@ -3,23 +3,31 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*spec.library: 
- output_units=[
-  f1: {units: [2{lib1, lib2}], usedBy: [], needs: []},
-  f2: {units: [1{lib1}], usedBy: [], needs: []},
-  f3: {units: [3{lib2}], usedBy: [], needs: []}],
- steps=[
-  lib1=(f1, f2),
-  lib2=(f1, f3)]
+ a_pre_fragments=[
+  p1: {units: [1{lib1}], usedBy: [], needs: []},
+  p2: {units: [3{lib2}], usedBy: [], needs: []},
+  p3: {units: [2{lib1, lib2}], usedBy: [], needs: []}],
+ b_finalized_fragments=[
+  f1: [1{lib1}],
+  f2: [3{lib2}],
+  f3: [2{lib1, lib2}]],
+ c_steps=[
+  lib1=(f3, f1),
+  lib2=(f3, f2)]
 */
 
 /*two-frag|three-frag.library: 
- output_units=[
-  f1: {units: [2{lib1, lib2}], usedBy: [], needs: [2, 3]},
-  f2: {units: [1{lib1}], usedBy: [1], needs: []},
-  f3: {units: [3{lib2}], usedBy: [1], needs: []}],
- steps=[
-  lib1=(f1, f2),
-  lib2=(f1, f3)]
+ a_pre_fragments=[
+  p1: {units: [1{lib1}], usedBy: [p3], needs: []},
+  p2: {units: [3{lib2}], usedBy: [p3], needs: []},
+  p3: {units: [2{lib1, lib2}], usedBy: [], needs: [p1, p2]}],
+ b_finalized_fragments=[
+  f1: [1{lib1}],
+  f2: [3{lib2}],
+  f3: [2{lib1, lib2}]],
+ c_steps=[
+  lib1=(f3, f1),
+  lib2=(f3, f2)]
 */
 
 // @dart = 2.7
diff --git a/pkg/compiler/test/deferred_loading/data/type_argument_dependency/main.dart b/pkg/compiler/test/deferred_loading/data/type_argument_dependency/main.dart
index 6049f85..65b71d9 100644
--- a/pkg/compiler/test/deferred_loading/data/type_argument_dependency/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/type_argument_dependency/main.dart
@@ -3,8 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*library: 
- output_units=[f1: {units: [1{c}], usedBy: [], needs: []}],
- steps=[c=(f1)]
+ a_pre_fragments=[p1: {units: [1{c}], usedBy: [], needs: []}],
+ b_finalized_fragments=[f1: [1{c}]],
+ c_steps=[c=(f1)]
 */
 
 // @dart = 2.7
diff --git a/pkg/compiler/test/deferred_loading/data/type_arguments/main.dart b/pkg/compiler/test/deferred_loading/data/type_arguments/main.dart
index 9433a91..367329a 100644
--- a/pkg/compiler/test/deferred_loading/data/type_arguments/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/type_arguments/main.dart
@@ -2,11 +2,30 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*library: 
- output_units=[
-  f1: {units: [1{lib1}], usedBy: [], needs: []},
-  f2: {units: [2{lib3}], usedBy: [], needs: []}],
- steps=[
+/*spec.library: 
+ a_pre_fragments=[
+  p1: {units: [1{lib1}], usedBy: [], needs: []},
+  p2: {units: [2{lib3}], usedBy: [], needs: []},
+  p3: {units: [3{lib1, lib3}], usedBy: [], needs: []}],
+ b_finalized_fragments=[
+  f1: [1{lib1}],
+  f2: [2{lib3}],
+  f3: []],
+ c_steps=[
+  lib1=(f1),
+  lib3=(f2)]
+*/
+
+/*two-frag|three-frag.library: 
+ a_pre_fragments=[
+  p1: {units: [1{lib1}], usedBy: [p3], needs: []},
+  p2: {units: [2{lib3}], usedBy: [p3], needs: []},
+  p3: {units: [3{lib1, lib3}], usedBy: [], needs: [p1, p2]}],
+ b_finalized_fragments=[
+  f1: [1{lib1}],
+  f2: [2{lib3}],
+  f3: []],
+ c_steps=[
   lib1=(f1),
   lib3=(f2)]
 */
diff --git a/pkg/compiler/test/deferred_loading/data/uninstantiated_type_variable/main.dart b/pkg/compiler/test/deferred_loading/data/uninstantiated_type_variable/main.dart
index 3ee33186..979328c 100644
--- a/pkg/compiler/test/deferred_loading/data/uninstantiated_type_variable/main.dart
+++ b/pkg/compiler/test/deferred_loading/data/uninstantiated_type_variable/main.dart
@@ -3,8 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*library: 
- output_units=[f1: {units: [1{lib}], usedBy: [], needs: []}],
- steps=[lib=(f1)]
+ a_pre_fragments=[p1: {units: [1{lib}], usedBy: [], needs: []}],
+ b_finalized_fragments=[f1: [1{lib}]],
+ c_steps=[lib=(f1)]
 */
 
 // @dart = 2.7
diff --git a/pkg/compiler/test/deferred_loading/deferred_loading_test.dart b/pkg/compiler/test/deferred_loading/deferred_loading_test.dart
index dcd98df..342c07f 100644
--- a/pkg/compiler/test/deferred_loading/deferred_loading_test.dart
+++ b/pkg/compiler/test/deferred_loading/deferred_loading_test.dart
@@ -109,8 +109,11 @@
   static const String closure = 'closure_unit';
   static const String constants = 'constants';
   static const String type = 'type_unit';
-  static const String steps = 'steps';
-  static const String outputUnits = 'output_units';
+  // The below tags appear in a single block comment in the main file.
+  // To keep them appearing in sequential order we prefix characters.
+  static const String preFragments = 'a_pre_fragments';
+  static const String finalizedFragments = 'b_finalized_fragments';
+  static const String steps = 'c_steps';
 }
 
 class OutputUnitDataComputer extends DataComputer<Features> {
@@ -158,10 +161,8 @@
         compiler.backendStrategy.emitterTask.emitter.finalizedFragmentsToLoad;
     Set<OutputUnit> omittedOutputUnits =
         compiler.backendStrategy.emitterTask.emitter.omittedOutputUnits;
-    Map<String, List<PreFragment>> preFragmentMap =
-        buildPreFragmentMap(fragmentsToLoad, preDeferredFragments);
-    PreFragmentsIrComputer(
-            compiler.reporter, actualMap, preFragmentMap, omittedOutputUnits)
+    PreFragmentsIrComputer(compiler.reporter, actualMap, preDeferredFragments,
+            fragmentsToLoad, omittedOutputUnits)
         .computeForLibrary(node);
   }
 
@@ -171,13 +172,15 @@
 }
 
 class PreFragmentsIrComputer extends IrDataExtractor<Features> {
-  final Map<String, List<PreFragment>> _preFragmentMap;
+  final List<PreFragment> _preDeferredFragments;
+  final Map<String, List<FinalizedFragment>> _fragmentsToLoad;
   final Set<OutputUnit> _omittedOutputUnits;
 
   PreFragmentsIrComputer(
       DiagnosticReporter reporter,
       Map<Id, ActualData<Features>> actualMap,
-      this._preFragmentMap,
+      this._preDeferredFragments,
+      this._fragmentsToLoad,
       this._omittedOutputUnits)
       : super(reporter, actualMap);
 
@@ -187,52 +190,81 @@
     Features features = new Features();
     if (!name.startsWith('main')) return features;
 
+    // First build a list of pre fragments and their dependencies.
     int index = 1;
+    Map<FinalizedFragment, int> finalizedFragmentIndices = {};
     Map<PreFragment, int> preFragmentIndices = {};
     Map<int, PreFragment> reversePreFragmentIndices = {};
-    _preFragmentMap.forEach((loadId, preFragments) {
-      List<String> preFragmentNeeds = [];
-      for (var preFragment in preFragments) {
-        if (!preFragmentIndices.containsKey(preFragment)) {
-          preFragmentIndices[preFragment] = index;
-          reversePreFragmentIndices[index++] = preFragment;
-        }
-        preFragmentNeeds.add('f${preFragmentIndices[preFragment]}');
+    Map<int, FinalizedFragment> reverseFinalizedFragmentIndices = {};
+    for (var preFragment in _preDeferredFragments) {
+      if (!preFragmentIndices.containsKey(preFragment)) {
+        var finalizedFragment = preFragment.finalizedFragment;
+        preFragmentIndices[preFragment] = index;
+        finalizedFragmentIndices[finalizedFragment] = index;
+        reversePreFragmentIndices[index] = preFragment;
+        reverseFinalizedFragmentIndices[index] = finalizedFragment;
+        index++;
       }
-      features.addElement(
-          Tags.steps, '$loadId=(${preFragmentNeeds.join(', ')})');
-    });
+    }
 
     for (int i = 1; i < index; i++) {
       var preFragment = reversePreFragmentIndices[i];
-      List<int> needs = [];
+      List<String> needs = [];
       List<OutputUnit> supplied = [];
-      List<int> usedBy = [];
+      List<String> usedBy = [];
       for (var dependent in preFragment.successors) {
         if (preFragmentIndices.containsKey(dependent)) {
-          usedBy.add(preFragmentIndices[dependent]);
+          usedBy.add('p${preFragmentIndices[dependent]}');
         }
       }
 
       for (var dependency in preFragment.predecessors) {
         if (preFragmentIndices.containsKey(dependency)) {
-          needs.add(preFragmentIndices[dependency]);
+          needs.add('p${preFragmentIndices[dependency]}');
         }
       }
 
       for (var emittedOutputUnit in preFragment.emittedOutputUnits) {
-        var outputUnit = emittedOutputUnit.outputUnit;
-        if (!_omittedOutputUnits.contains(outputUnit)) {
-          supplied.add(outputUnit);
-        }
+        supplied.add(emittedOutputUnit.outputUnit);
       }
+
+      var suppliedString = '[${supplied.map(outputUnitString).join(', ')}]';
+      features.addElement(Tags.preFragments,
+          'p$i: {units: $suppliedString, usedBy: $usedBy, needs: $needs}');
+    }
+
+    // Now dump finalized fragments and load ids.
+    for (int i = 1; i < index; i++) {
+      var finalizedFragment = reverseFinalizedFragmentIndices[i];
+      List<String> supplied = [];
+
+      for (var codeFragment in finalizedFragment.codeFragments) {
+        List<String> outputUnitStrings = [];
+        for (var outputUnit in codeFragment.outputUnits) {
+          if (!_omittedOutputUnits.contains(outputUnit)) {
+            outputUnitStrings.add(outputUnitString(outputUnit));
+          }
+        }
+        supplied.add(outputUnitStrings.join('+'));
+      }
+
       if (supplied.isNotEmpty) {
-        var suppliedString = '[${supplied.map(outputUnitString).join(', ')}]';
-        features.addElement(Tags.outputUnits,
-            'f$i: {units: $suppliedString, usedBy: $usedBy, needs: $needs}');
+        var suppliedString = '[${supplied.join(', ')}]';
+        features.addElement(Tags.finalizedFragments, 'f$i: $suppliedString');
       }
     }
 
+    _fragmentsToLoad.forEach((loadId, finalizedFragments) {
+      List<String> finalizedFragmentNeeds = [];
+      for (var finalizedFragment in finalizedFragments) {
+        assert(finalizedFragmentIndices.containsKey(finalizedFragment));
+        finalizedFragmentNeeds
+            .add('f${finalizedFragmentIndices[finalizedFragment]}');
+      }
+      features.addElement(
+          Tags.steps, '$loadId=(${finalizedFragmentNeeds.join(', ')})');
+    });
+
     return features;
   }
 }
diff --git a/tools/VERSION b/tools/VERSION
index 11d34ef..3a74f75 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
 MAJOR 2
 MINOR 13
 PATCH 0
-PRERELEASE 215
+PRERELEASE 216
 PRERELEASE_PATCH 0
\ No newline at end of file