@samitouri / QOS-React-2 / commits / 8a15b65e1a

[be] Reorder PruneUnusedLabels pass

This pass can run later, rather than right in between two passes that affect scope creation.

Joe Savona committed Jan 17, 2023 at 16:00 UTC 8a15b65e1a0d02d38fbd30338001f224ccf19609
1 file changed +7 -7
compiler/forget/src/CompilerPipeline.ts
+7 -7
@@ -107,13 +107,6 @@ export function* run(
107 value: reactiveFunction,
108 });
109
110 - pruneUnusedLabels(reactiveFunction);
111 - yield log({
112 - kind: "reactive",
113 - name: "PruneUnusedLabels",
114 - value: reactiveFunction,
115 - });
116 -
110 flattenReactiveLoops(reactiveFunction);
111 yield log({
112 kind: "reactive",
@@ -135,6 +128,13 @@ export function* run(
128 value: reactiveFunction,
129 });
130
131 + pruneUnusedLabels(reactiveFunction);
132 + yield log({
133 + kind: "reactive",
134 + name: "PruneUnusedLabels",
135 + value: reactiveFunction,
136 + });
137 +
138 pruneUnusedLValues(reactiveFunction);
139 yield log({
140 kind: "reactive",