add missing reactive scope passes to playground
I forget to add these passes to the playground, oops.
Joseph Savona committed
Dec 1, 2022 at 11:02 UTC
4b9c2f36feb7b6ae8fd5a294e03c244d8397e839
4 files changed
+47
-19
compiler/forget/packages/playground/components/Editor/Output.tsx
+22
@@ -27,6 +27,8 @@ const {
27
inferReferenceEffects,
28
inferMutableRanges,
29
inferReactiveScopeDependencies,
30
+ inferReactiveScopeVariables,
31
+ inferReactiveScopes,
32
leaveSSA,
33
lower,
34
printHIR,
@@ -49,6 +51,8 @@ type CompilerOutput = {
51
eliminateRedundantPhiOutput: string;
52
inferReferenceEffectsOutput: string;
53
inferMutableRangesOutput: string;
54
+ inferReactiveScopeVariablesOutput: string;
55
+ inferReactiveScopesOutput: string;
56
inferReactiveScopeDependenciesOutput: string;
57
leaveSSAOutput: string;
58
codegenOutput: string;
@@ -83,6 +87,12 @@ function compile(source: string): CompilerOutput | CompilerError {
87
inferMutableRanges(ir);
88
const inferMutableRangesOutput = printHIR(ir.body);
89
90
+ inferReactiveScopeVariables(ir);
91
+ const inferReactiveScopeVariablesOutput = printHIR(ir.body);
92
+
93
+ inferReactiveScopes(ir);
94
+ const inferReactiveScopesOutput = printHIR(ir.body);
95
+
96
inferReactiveScopeDependencies(ir);
97
const inferReactiveScopeDependenciesOutput = printHIR(ir.body);
98
@@ -116,6 +126,8 @@ function compile(source: string): CompilerOutput | CompilerError {
126
inferReferenceEffectsOutput,
127
inferMutableRangesOutput,
128
inferReactiveScopeDependenciesOutput,
129
+ inferReactiveScopeVariablesOutput,
130
+ inferReactiveScopesOutput,
131
leaveSSAOutput,
132
codegenOutput,
133
sourceMapUrl,
@@ -171,6 +183,16 @@ function Output({ store, setTabsOpen, tabsOpen }: Props) {
183
output={compilerOutput.inferMutableRangesOutput}
184
></TextTabContent>
185
),
186
+ InferReactiveScopeVariables: (
187
+ <TextTabContent
188
+ output={compilerOutput.inferReactiveScopeVariablesOutput}
189
+ ></TextTabContent>
190
+ ),
191
+ InferReactiveScopes: (
192
+ <TextTabContent
193
+ output={compilerOutput.inferReactiveScopesOutput}
194
+ ></TextTabContent>
195
+ ),
196
InferReactiveScopeDependencies: (
197
<TextTabContent
198
output={compilerOutput.inferReactiveScopeDependenciesOutput}
compiler/forget/packages/playground/components/TabbedWindow.tsx
+2
@@ -13,6 +13,8 @@ export type TabTypes =
13
| "EliminateRedundantPhi"
14
| "InferReferenceEffects"
15
| "InferMutableRanges"
16
+ | "InferReactiveScopeVariables"
17
+ | "InferReactiveScopes"
18
| "InferReactiveScopeDependencies"
19
| "LeaveSSA"
20
| "JS"
compiler/forget/src/index.ts
+4
@@ -31,6 +31,8 @@ import enterSSA from "./HIR/EnterSSA";
31
import { Environment } from "./HIR/HIRBuilder";
32
import { inferMutableRanges } from "./HIR/InferMutableLifetimes";
33
import { inferReactiveScopeDependencies } from "./HIR/InferReactiveScopeDependencies";
34
+import { inferReactiveScopes } from "./HIR/InferReactiveScopes";
35
+import { inferReactiveScopeVariables } from "./HIR/InferReactiveScopeVariables";
36
import inferReferenceEffects from "./HIR/InferReferenceEffects";
37
import leaveSSA from "./HIR/LeaveSSA";
38
import printHIR from "./HIR/PrintHIR";
@@ -64,6 +66,8 @@ export const HIR = {
66
inferMutableRanges,
67
inferReferenceEffects,
68
inferReactiveScopeDependencies,
69
+ inferReactiveScopeVariables,
70
+ inferReactiveScopes,
71
printHIR,
72
Environment,
73
leaveSSA,
compiler/forget/yarn.lock
+19
-19
@@ -83,12 +83,12 @@
83
"@jridgewell/gen-mapping" "^0.3.2"
84
jsesc "^2.5.1"
85
86
-"@babel/generator@^7.20.1":
87
- version "7.20.2"
88
- resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.20.2.tgz#c2e89e22613a039285c1e7b749e2cd0b30b9a481"
89
- integrity sha512-SD75PMIK6i9H8G/tfGvB4KKl4Nw6Ssos9nGgYwxbgyTP0iX/Z55DveoH86rmUB/YHTQQ+ZC0F7xxaY8l2OF44Q==
86
+"@babel/generator@^7.20.5":
87
+ version "7.20.5"
88
+ resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.20.5.tgz#cb25abee3178adf58d6814b68517c62bdbfdda95"
89
+ integrity sha512-jl7JY2Ykn9S0yj4DQP82sYvPU+T3g0HFcWTqDLqiuA9tGRNIj9VfbtXGAYTTkyNEnQk1jkMGOdYka8aG/lulCA==
90
dependencies:
91
- "@babel/types" "^7.20.2"
91
+ "@babel/types" "^7.20.5"
92
"@jridgewell/gen-mapping" "^0.3.2"
93
jsesc "^2.5.1"
94
@@ -260,10 +260,10 @@
260
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.19.3.tgz#8dd36d17c53ff347f9e55c328710321b49479a9a"
261
integrity sha512-pJ9xOlNWHiy9+FuFP09DEAFbAn4JskgRsVcc169w2xRBC3FRGuQEwjeIMMND9L2zc0iEhO/tGv4Zq+km+hxNpQ==
262
263
-"@babel/parser@^7.20.1":
264
- version "7.20.2"
265
- resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.2.tgz#9aeb9b92f64412b5f81064d46f6a1ac0881337f4"
266
- integrity sha512-afk318kh2uKbo7BEj2QtEi8HVCGrwHUffrYDy7dgVcSa2j9lY3LDjPzcyGdpX7xgm35aWqvciZJ4WKmdF/SxYg==
263
+"@babel/parser@^7.20.5":
264
+ version "7.20.5"
265
+ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.5.tgz#7f3c7335fe417665d929f34ae5dceae4c04015e8"
266
+ integrity sha512-r27t/cy/m9uKLXQNWWebeCUHgnAZq0CpG1OwKRxzJMP1vpSU4bSIK2hq+/cp0bQxetkXx38n09rNu8jVkcK/zA==
267
268
"@babel/plugin-syntax-async-generators@^7.8.4":
269
version "7.8.4"
@@ -484,18 +484,18 @@
484
lodash "^4.17.10"
485
486
"@babel/traverse@^7.19.1":
487
- version "7.20.1"
488
- resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.20.1.tgz#9b15ccbf882f6d107eeeecf263fbcdd208777ec8"
489
- integrity sha512-d3tN8fkVJwFLkHkBN479SOsw4DMZnz8cdbL/gvuDuzy3TS6Nfw80HuQqhw1pITbIruHyh7d1fMA47kWzmcUEGA==
487
+ version "7.20.5"
488
+ resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.20.5.tgz#78eb244bea8270fdda1ef9af22a5d5e5b7e57133"
489
+ integrity sha512-WM5ZNN3JITQIq9tFZaw1ojLU3WgWdtkxnhM1AegMS+PvHjkM5IXjmYEGY7yukz5XS4sJyEf2VzWjI8uAavhxBQ==
490
dependencies:
491
"@babel/code-frame" "^7.18.6"
492
- "@babel/generator" "^7.20.1"
492
+ "@babel/generator" "^7.20.5"
493
"@babel/helper-environment-visitor" "^7.18.9"
494
"@babel/helper-function-name" "^7.19.0"
495
"@babel/helper-hoist-variables" "^7.18.6"
496
"@babel/helper-split-export-declaration" "^7.18.6"
497
- "@babel/parser" "^7.20.1"
498
- "@babel/types" "^7.20.0"
497
+ "@babel/parser" "^7.20.5"
498
+ "@babel/types" "^7.20.5"
499
debug "^4.1.0"
500
globals "^11.1.0"
501
@@ -534,10 +534,10 @@
534
"@babel/helper-validator-identifier" "^7.19.1"
535
to-fast-properties "^2.0.0"
536
537
-"@babel/types@^7.20.0", "@babel/types@^7.20.2":
538
- version "7.20.2"
539
- resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.20.2.tgz#67ac09266606190f496322dbaff360fdaa5e7842"
540
- integrity sha512-FnnvsNWgZCr232sqtXggapvlkk/tuwR/qhGzcmxI0GXLCjmPYQPzio2FbdlWuY6y1sHFfQKk+rRbUZ9VStQMog==
537
+"@babel/types@^7.20.5":
538
+ version "7.20.5"
539
+ resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.20.5.tgz#e206ae370b5393d94dfd1d04cd687cace53efa84"
540
+ integrity sha512-c9fst/h2/dcF7H+MJKZ2T0KjEQ8hY/BNnDk/H3XY8C4Aw/eWQXWn/lWntHF9ooUBnGmEvbfGrTgLWc+um0YDUg==
541
dependencies:
542
"@babel/helper-string-parser" "^7.19.4"
543
"@babel/helper-validator-identifier" "^7.19.1"