[test] Remove mermaid diagrams from test output

This commit is contained in:
Sathya Gunasekaran
2022-12-14 15:47:13 +00:00
parent 9bfad00410
commit 4b66531237
99 changed files with 2 additions and 4275 deletions
@@ -60,38 +60,6 @@ function Component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate a$4_@0:TFunction[1:7] = Array []
[2] Call mutate a$4_@0.push(read props$3.a)
"]
bb0_instrs --> bb0_terminal(["If (read props$3.b)"])
end
subgraph bb2
bb2_instrs["
[4] Call mutate a$4_@0.push(read props$3.c)
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb1
bb1_instrs["
[6] Call mutate a$4_@0.push(read props$3.d)
"]
bb1_instrs --> bb1_terminal(["Return freeze a$4_@0:TFunction"])
end
%% Jumps
bb0_terminal -- "then" --> bb1
bb0_terminal -- "else" --> bb2
bb2_terminal --> bb1
```
## Code
```javascript
@@ -42,25 +42,6 @@ function f(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$4_@0:TPrimitive = 1
[2] Const mutate x$5_@1:TPrimitive = 2
[3] Const mutate $6_@2:TPrimitive = Binary read x$5_@1:TPrimitive + read x$5_@1:TPrimitive
[4] Const mutate $7_@3:TPrimitive = Binary read $6_@2:TPrimitive + read x$5_@1:TPrimitive
"]
bb0_instrs --> bb0_terminal(["Return read $7_@3:TPrimitive"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -56,41 +56,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$8_@0:TPrimitive = null
"]
bb0_instrs --> bb0_terminal(["If (read a$5)"])
end
subgraph bb3
bb3_instrs["
[3] Const mutate x$9_@1 = read b$6
"]
bb3_instrs --> bb3_terminal(["Goto"])
end
subgraph bb2
bb2_instrs["
[5] Const mutate x$10_@2 = read c$7
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb1
bb1_terminal(["Return read x$11"])
end
%% Jumps
bb0_terminal -- "then" --> bb3
bb0_terminal -- "else" --> bb2
bb3_terminal --> bb1
bb2_terminal --> bb1
```
## Code
```javascript
@@ -45,27 +45,6 @@ function component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate z$5_@0[1:7] = Array []
[2] Const mutate y$6_@0:TObject[1:7] = Object { }
[3] Reassign mutate y$6_@0.z[1:7] = read z$5_@0
[4] Const mutate x$7_@0:TObject[1:7] = Object { }
[5] Reassign mutate x$7_@0.y[1:7] = read y$6_@0:TObject
[6] Call mutate mutate$4:TFunction(mutate x$7_@0.y.z)
"]
bb0_instrs --> bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -50,26 +50,6 @@ function component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate z$4_@0 = Array []
[2] Const mutate y$5_@1:TObject[2:4] = Object { }
[3] Reassign mutate y$5_@1.z[2:4] = read z$4_@0
[4] Const mutate x$6_@2:TObject[4:6] = Object { }
[5] Reassign mutate x$6_@2.y[4:6] = read y$5_@1:TObject
"]
bb0_instrs --> bb0_terminal(["Return freeze x$6_@2:TObject"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -80,51 +80,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Let mutate a$8_@0:TObject[1:12] = Object { }
[2] Let mutate b$9_@0:TObject[1:12] = Object { }
[3] Let mutate c$10_@0:TObject[1:12] = Object { }
"]
bb0_instrs --> bb0_terminal(["While"])
end
subgraph bb1
bb1_terminal(["If (read cond$7)"])
end
subgraph bb3
bb3_instrs["
[6] Const mutate z$13_@0[1:12] = read a$8_@0:TObject
[7] Reassign mutate a$8_@0:TObject[1:12] = read b$9_@0:TObject
[8] Reassign mutate b$9_@0:TObject[1:12] = read c$10_@0:TObject
[9] Reassign mutate c$10_@0:TObject[1:12] = read z$13_@0
[10] Call mutate mutate$6:TFunction(mutate a$8_@0:TObject, mutate b$9_@0:TObject)
"]
bb3_instrs --> bb3_terminal(["Goto"])
end
subgraph bb2
bb2_instrs["
[12] read a$8_@0:TObject
[13] read b$9_@0:TObject
[14] read c$10_@0:TObject
"]
bb2_instrs --> bb2_terminal(["Return freeze a$8_@0:TObject"])
end
%% Jumps
bb0_terminal -- "test" --> bb1
bb0_terminal -- "loop" --> bb3
bb0_terminal -- "fallthrough" --> bb2
bb1_terminal -- "then" --> bb3
bb1_terminal -- "else" --> bb2
bb3_terminal --> bb1
```
## Code
```javascript
@@ -167,19 +122,6 @@ function mutate(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -56,28 +56,6 @@ function f(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$5_@0:TPrimitive = 1
[2] Const mutate $6_@1:TPrimitive = 1
[3] Const mutate x$7_@2:TPrimitive = Binary read x$5_@0:TPrimitive + read $6_@1:TPrimitive
[4] Const mutate $8_@3:TPrimitive = 1
[5] Const mutate x$9_@4:TPrimitive = Binary read x$7_@2:TPrimitive + read $8_@3:TPrimitive
[6] Const mutate $10_@5:TPrimitive = 1
[7] Const mutate x$11_@6:TPrimitive = Binary read x$9_@4:TPrimitive >>> read $10_@5:TPrimitive
"]
bb0_instrs --> bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -119,25 +97,6 @@ function g(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate $5_@0:TPrimitive = 1
[2] Reassign mutate a$4_@1.b.c[0:5] = Binary read a$4_@1.b.c + read $5_@0:TPrimitive
[3] Const mutate $6_@2:TPrimitive = 2
[4] Reassign mutate a$4_@1.b.c[0:5] = Binary read a$4_@1.b.c * read $6_@2:TPrimitive
"]
bb0_instrs --> bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -33,19 +33,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -98,29 +85,6 @@ function Component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate a$10_@0:TObject[1:7] = Array []
[2] Const mutate b$11_@0:TObject[1:7] = Object { }
[3] Call mutate foo$4:TFunction(mutate a$10_@0:TObject, mutate b$11_@0:TObject)
[4] Const mutate $12_@1:TPrimitive = 'div'
[5] Const mutate _$13_@2 = JSX <read $12_@1:TPrimitive a={freeze a$10_@0:TObject} ></read $12_@1:TPrimitive>
[6] Call mutate foo$4:TFunction(mutate b$11_@0:TObject)
[7] Const mutate $14_@3:TPrimitive = 'div'
[8] Const mutate $15_@4 = JSX <read $14_@3:TPrimitive a={read a$10_@0:TObject} b={freeze b$11_@0:TObject} ></read $14_@3:TPrimitive>
"]
bb0_instrs --> bb0_terminal(["Return read $15_@4"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -59,44 +59,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["If (read a$4)"])
end
subgraph bb3
bb3_terminal(["While"])
end
subgraph bb4
bb4_terminal(["If (read b$5)"])
end
subgraph bb6
bb6_terminal(["If (read c$6)"])
end
subgraph bb7
bb7_terminal(["Goto"])
end
subgraph bb1
bb1_terminal(["Return"])
end
%% Jumps
bb0_terminal -- "then" --> bb3
bb0_terminal -- "else" --> bb1
bb3_terminal -- "test" --> bb4
bb3_terminal -- "loop" --> bb6
bb3_terminal -- "fallthrough" --> bb1
bb4_terminal -- "then" --> bb6
bb4_terminal -- "else" --> bb1
bb6_terminal -- "then" --> bb1
bb6_terminal -- "else" --> bb7
bb7_terminal --> bb4
```
## Code
```javascript
@@ -193,121 +193,6 @@ function Component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate items$30_@0:TProp = read props$29.items
[2] Const mutate maxItems$31_@1:TProp = read props$29.maxItems
[3] Const mutate renderedItems$32_@2:TFunction[3:33] = Array []
[4] Const mutate seen$33_@2:TFunction[3:33] = New mutate Set$6()
[5] Const mutate $34_@4:TPrimitive = 0
[6] Const mutate max$35_@5:TPrimitive = Call mutate Math$8.max(read $34_@4:TPrimitive, read maxItems$31_@1:TProp)
"]
bb0_instrs --> bb0_terminal(["For"])
end
subgraph bb3
bb3_instrs["
[8] Let mutate i$36_@2:TPrimitive[3:33] = 0
"]
bb3_instrs --> bb3_terminal(["Goto"])
end
subgraph bb1
bb1_instrs["
[10] Const mutate $39_@2:TPrimitive[3:33] = Binary read i$36_@2:TPrimitive < read items$30_@0.length
"]
bb1_instrs --> bb1_terminal(["If (read $39_@2:TPrimitive)"])
end
subgraph bb5
bb5_instrs["
[12] Const mutate item$40_@2:TPrimitive[3:33] = Call read items$30_@0.at(read i$36_@2:TPrimitive)
[13] Const mutate $41_@6:TPrimitive = null
[14] Const mutate $42_@2:TPrimitive[3:33] = Binary read item$40_@2:TPrimitive == read $41_@6:TPrimitive
[15] Let mutate $43_@2:TPrimitive[3:33] = undefined
"]
bb5_instrs --> bb5_terminal(["If (read $42_@2:TPrimitive)"])
end
subgraph bb10
bb10_instrs["
[16] Const mutate $43_@2:TPrimitive[3:33] = read $42_@2:TPrimitive
"]
bb10_instrs --> bb10_terminal(["Goto"])
end
subgraph bb11
bb11_instrs["
[18] Const mutate $43_@2:TPrimitive[3:33] = Call mutate seen$33_@2.has(mutate item$40_@2:TPrimitive)
"]
bb11_instrs --> bb11_terminal(["Goto"])
end
subgraph bb9
bb9_terminal(["If (read $43_@2:TPrimitive)"])
end
subgraph bb7
bb7_terminal(["Goto"])
end
subgraph bb6
bb6_instrs["
[22] Call mutate seen$33_@2.add(mutate item$40_@2:TPrimitive)
[23] Const mutate $49_@7:TPrimitive = 'div'
[24] Const mutate $50_@8 = JSX <read $49_@7:TPrimitive>{freeze item$40_@2:TPrimitive}</read $49_@7:TPrimitive>
[25] Call mutate renderedItems$32_@2.push(read $50_@8)
[26] Const mutate $55_@9:TPrimitive = Binary read renderedItems$32_@2.length >= read max$35_@5:TPrimitive
"]
bb6_instrs --> bb6_terminal(["If (read $55_@9:TPrimitive)"])
end
subgraph bb12
bb12_terminal(["Goto"])
end
subgraph bb4
bb4_instrs["
[29] Const mutate $56_@2:TPrimitive[3:33] = 1
[30] Reassign mutate i$36_@2:TPrimitive[3:33] = Binary read i$36_@2:TPrimitive + read $56_@2:TPrimitive
[31] read i$36_@2:TPrimitive
"]
bb4_instrs --> bb4_terminal(["Goto"])
end
subgraph bb2
bb2_instrs["
[33] Const mutate count$66_@11:TProp = read renderedItems$32_@2.length
[34] Const mutate $67_@12:TPrimitive = 'div'
[35] Const mutate $68_@13 = '\n '
[36] Const mutate $69_@14:TPrimitive = 'h1'
[37] Const mutate $70_@15 = ' Items'
[38] Const mutate $71_@16 = JSX <read $69_@14:TPrimitive>{freeze count$66_@11:TProp}{read $70_@15}</read $69_@14:TPrimitive>
[39] Const mutate $72_@17 = '\n '
[40] Const mutate $73_@18 = '\n '
[41] Const mutate $74_@19 = JSX <read $67_@12:TPrimitive>{read $68_@13}{read $71_@16}{read $72_@17}{freeze renderedItems$32_@2:TFunction}{read $73_@18}</read $67_@12:TPrimitive>
"]
bb2_instrs --> bb2_terminal(["Return read $74_@19"])
end
%% Jumps
bb0_terminal -- "init" --> bb3
bb0_terminal -- "test" --> bb1
bb0_terminal -- "update" --> bb4
bb0_terminal -- "loop" --> bb5
bb0_terminal -- "fallthrough" --> bb2
bb3_terminal --> bb1
bb1_terminal -- "then" --> bb5
bb1_terminal -- "else" --> bb2
bb5_terminal -- "then" --> bb10
bb5_terminal -- "else" --> bb11
bb5_terminal -- "fallthrough" --> bb9
bb10_terminal --> bb9
bb11_terminal --> bb9
bb9_terminal -- "then" --> bb7
bb9_terminal -- "else" --> bb6
bb7_terminal --> bb4
bb6_terminal -- "then" --> bb2
bb6_terminal -- "else" --> bb12
bb12_terminal --> bb4
bb4_terminal --> bb1
```
## Code
```javascript
@@ -115,37 +115,6 @@ function Component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate a_DEBUG$5_@0:TFunction[1:7] = Array []
[2] Call mutate a_DEBUG$5_@0.push(read props$4.a)
"]
bb0_instrs --> bb0_terminal(["If (read props$4.b)"])
end
subgraph bb2
bb2_instrs["
[4] Const mutate $6_@1:TPrimitive = null
"]
bb2_instrs --> bb2_terminal(["Return read $6_@1:TPrimitive"])
end
subgraph bb1
bb1_instrs["
[6] Call mutate a_DEBUG$5_@0.push(read props$4.d)
"]
bb1_instrs --> bb1_terminal(["Return freeze a_DEBUG$5_@0:TFunction"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb1
```
## Code
```javascript
@@ -202,38 +171,6 @@ function Component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate a$4_@0:TFunction[1:7] = Array []
[2] Call mutate a$4_@0.push(read props$3.a)
"]
bb0_instrs --> bb0_terminal(["If (read props$3.b)"])
end
subgraph bb2
bb2_instrs["
[4] Call mutate a$4_@0.push(read props$3.c)
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb1
bb1_instrs["
[6] Call mutate a$4_@0.push(read props$3.d)
"]
bb1_instrs --> bb1_terminal(["Return freeze a$4_@0:TFunction"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb1
bb2_terminal --> bb1
```
## Code
```javascript
@@ -293,38 +230,6 @@ function Component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate a$5_@0:TFunction[1:8] = Array []
[2] Call mutate a$5_@0.push(read props$4.a)
"]
bb0_instrs --> bb0_terminal(["If (read props$4.b)"])
end
subgraph bb2
bb2_instrs["
[4] Call mutate a$5_@0.push(read props$4.c)
[5] Const mutate $6_@1:TPrimitive = null
"]
bb2_instrs --> bb2_terminal(["Return read $6_@1:TPrimitive"])
end
subgraph bb1
bb1_instrs["
[7] Call mutate a$5_@0.push(read props$4.d)
"]
bb1_instrs --> bb1_terminal(["Return freeze a$5_@0:TFunction"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb1
```
## Code
```javascript
@@ -383,37 +288,6 @@ function Component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate a$4_@0:TFunction[1:7] = Array []
[2] Call mutate a$4_@0.push(read props$3.a)
"]
bb0_instrs --> bb0_terminal(["If (read props$3.b)"])
end
subgraph bb2
bb2_instrs["
[4] Call mutate a$4_@0.push(read props$3.c)
"]
bb2_instrs --> bb2_terminal(["Return freeze a$4_@0:TFunction"])
end
subgraph bb1
bb1_instrs["
[6] Call mutate a$4_@0.push(read props$3.d)
"]
bb1_instrs --> bb1_terminal(["Return freeze a$4_@0:TFunction"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb1
```
## Code
```javascript
@@ -470,38 +344,6 @@ function Component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate a$4_@0:TFunction[1:7] = Array []
[2] Call mutate a$4_@0.push(read props$3.a)
"]
bb0_instrs --> bb0_terminal(["If (read props$3.b)"])
end
subgraph bb2
bb2_instrs["
[4] Call mutate a$4_@0.push(read props$3.c)
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb1
bb1_instrs["
[6] Call mutate a$4_@0.push(read props$3.d)
"]
bb1_instrs --> bb1_terminal(["Return freeze a$4_@0:TFunction"])
end
%% Jumps
bb0_terminal -- "then" --> bb1
bb0_terminal -- "else" --> bb2
bb2_terminal --> bb1
```
## Code
```javascript
@@ -82,50 +82,6 @@ function Component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate a$7_@0:TFunction[1:9] = Array []
[2] Const mutate b$8_@0:TFunction[1:9] = Array []
"]
bb0_instrs --> bb0_terminal(["If (read b$8_@0:TFunction)"])
end
subgraph bb2
bb2_instrs["
[4] Call mutate a$7_@0.push(read props$6.p0)
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb1
bb1_terminal(["If (read props$6.p1)"])
end
subgraph bb4
bb4_instrs["
[7] Call mutate b$8_@0.push(read props$6.p2)
"]
bb4_instrs --> bb4_terminal(["Goto"])
end
subgraph bb3
bb3_instrs["
[9] Const mutate $16_@2 = JSX <read Foo$4 a={freeze a$7_@0:TFunction} b={freeze b$8_@0:TFunction} ></read Foo$4>
"]
bb3_instrs --> bb3_terminal(["Return read $16_@2"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb1
bb2_terminal --> bb1
bb1_terminal -- "then" --> bb4
bb1_terminal -- "else" --> bb3
bb4_terminal --> bb3
```
## Code
```javascript
@@ -197,51 +153,6 @@ function Component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate a$9_@0:TFunction[1:10] = Array []
[2] Const mutate b$10_@0:TFunction[1:10] = Array []
[3] Const mutate $11_@0[1:10] = Call mutate mayMutate$4:TFunction(mutate b$10_@0:TFunction)
"]
bb0_instrs --> bb0_terminal(["If (read $11_@0)"])
end
subgraph bb2
bb2_instrs["
[5] Call mutate a$9_@0.push(read props$8.p0)
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb1
bb1_terminal(["If (read props$8.p1)"])
end
subgraph bb4
bb4_instrs["
[8] Call mutate b$10_@0.push(read props$8.p2)
"]
bb4_instrs --> bb4_terminal(["Goto"])
end
subgraph bb3
bb3_instrs["
[10] Const mutate $19_@2 = JSX <read Foo$6 a={freeze a$9_@0:TFunction} b={freeze b$10_@0:TFunction} ></read Foo$6>
"]
bb3_instrs --> bb3_terminal(["Return read $19_@2"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb1
bb2_terminal --> bb1
bb1_terminal -- "then" --> bb4
bb1_terminal -- "else" --> bb3
bb4_terminal --> bb3
```
## Code
```javascript
@@ -278,19 +189,6 @@ function Foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -315,19 +213,6 @@ function mayMutate(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -33,19 +33,6 @@ function Foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -98,29 +85,6 @@ function Component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate a$10_@0[1:7] = Array []
[2] Const mutate b$11_@0:TObject[1:7] = Object { }
[3] New mutate Foo$4(mutate a$10_@0, mutate b$11_@0:TObject)
[4] Const mutate $12_@1:TPrimitive = 'div'
[5] Const mutate _$13_@2 = JSX <read $12_@1:TPrimitive a={freeze a$10_@0} ></read $12_@1:TPrimitive>
[6] New mutate Foo$4(mutate b$11_@0:TObject)
[7] Const mutate $14_@3:TPrimitive = 'div'
[8] Const mutate $15_@4 = JSX <read $14_@3:TPrimitive a={read a$10_@0} b={freeze b$11_@0:TObject} ></read $14_@3:TPrimitive>
"]
bb0_instrs --> bb0_terminal(["Return read $15_@4"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -80,50 +80,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$8_@0:TFunction[1:3] = Array []
[2] Call mutate x$8_@0.push(read a$6)
[3] Const mutate $9_@1:TPrimitive = 'div'
[4] JSX <read $9_@1:TPrimitive>{freeze x$8_@0:TFunction}</read $9_@1:TPrimitive>
[5] Const mutate y$10_@2:TFunction[5:12] = Array []
"]
bb0_instrs --> bb0_terminal(["If (read x$8_@0.length)"])
end
subgraph bb2
bb2_instrs["
[7] Call mutate y$10_@2.push(read x$8_@0:TFunction)
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb1
bb1_terminal(["If (read b$7:TFunction)"])
end
subgraph bb4
bb4_instrs["
[10] Call mutate y$10_@2.push(read b$7:TFunction)
"]
bb4_instrs --> bb4_terminal(["Goto"])
end
subgraph bb3
bb3_terminal(["Return"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb1
bb2_terminal --> bb1
bb1_terminal -- "then" --> bb4
bb1_terminal -- "else" --> bb3
bb4_terminal --> bb3
```
## Code
```javascript
@@ -78,48 +78,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate items$9_@0:TFunction[1:10] = Array [read z$8]
[2] Call mutate items$9_@0.push(read x$6)
[3] Const mutate items2$10_@1:TFunction[3:7] = Array []
"]
bb0_instrs --> bb0_terminal(["If (read x$6)"])
end
subgraph bb2
bb2_instrs["
[5] Call mutate items2$10_@1.push(read y$7)
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb1
bb1_terminal(["If (read y$7)"])
end
subgraph bb4
bb4_instrs["
[8] Call mutate items$9_@0.push(read x$6)
"]
bb4_instrs --> bb4_terminal(["Goto"])
end
subgraph bb3
bb3_terminal(["Return freeze items2$10_@1:TFunction"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb1
bb2_terminal --> bb1
bb1_terminal -- "then" --> bb4
bb1_terminal -- "else" --> bb3
bb4_terminal --> bb3
```
## Code
```javascript
@@ -80,56 +80,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$10_@0:TFunction[1:8] = Array []
"]
bb0_instrs --> bb0_terminal(["If (read a$7)"])
end
subgraph bb2
bb2_terminal(["If (read b$8)"])
end
subgraph bb4
bb4_terminal(["If (read c$9)"])
end
subgraph bb6
bb6_instrs["
[5] Const mutate $11_@1:TPrimitive = 0
[6] Call mutate x$10_@0.push(read $11_@1:TPrimitive)
"]
bb6_instrs --> bb6_terminal(["Goto"])
end
subgraph bb1
bb1_terminal(["If (read a$7.length)"])
end
subgraph bb8
bb8_terminal(["Return read a$7"])
end
subgraph bb7
bb7_instrs["
[10] Const mutate $13_@2:TPrimitive = null
"]
bb7_instrs --> bb7_terminal(["Return read $13_@2:TPrimitive"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb1
bb2_terminal -- "then" --> bb4
bb2_terminal -- "else" --> bb1
bb4_terminal -- "then" --> bb6
bb4_terminal -- "else" --> bb1
bb6_terminal --> bb1
bb1_terminal -- "then" --> bb8
bb1_terminal -- "else" --> bb7
```
## Code
```javascript
@@ -44,25 +44,6 @@ function Component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate a$5_@0 = Array []
[2] Const mutate b$6_@1 = read a$5_@0
[3] Call read useFreeze$3:TFunction(freeze a$5_@0)
[4] Call mutate foo$4:TFunction(read b$6_@1)
"]
bb0_instrs --> bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -92,19 +73,6 @@ function useFreeze(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -130,19 +98,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -37,19 +37,6 @@ function useFreeze(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -74,19 +61,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -141,28 +115,6 @@ function Component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$11_@0 = Array []
[2] Const mutate y$12_@1 = Call read useFreeze$4:TFunction(freeze x$11_@0)
[3] Call mutate foo$5:TFunction(read y$12_@1, read x$11_@0)
[4] Const mutate $13_@2 = '\n '
[5] Const mutate $14_@3 = '\n '
[6] Const mutate $15_@4 = '\n '
[7] Const mutate $16_@5 = JSX <read Component$0>{read $13_@2}{read x$11_@0}{read $14_@3}{read y$12_@1}{read $15_@4}</read Component$0>
"]
bb0_instrs --> bb0_terminal(["Return read $16_@5"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -43,25 +43,6 @@ function Component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate a$4_@0 = Array []
[2] Call read useFreeze$2:TFunction(freeze a$4_@0)
[3] Call read useFreeze$2:TFunction(read a$4_@0)
[4] Call mutate call$3:TFunction(read a$4_@0)
"]
bb0_instrs --> bb0_terminal(["Return read a$4_@0"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -93,19 +74,6 @@ function useFreeze(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -131,19 +99,6 @@ function call(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -79,50 +79,6 @@ function Component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate cond$8_@0:TProp = read props$7.cond
[2] Const mutate x$9_@1:TProp = read props$7.x
[3] Const mutate a$10_@2:TPrimitive = undefined
[4] Let mutate a$11_@3:TProp[4:9] = undefined
"]
bb0_instrs --> bb0_terminal(["If (read cond$8_@0:TProp)"])
end
subgraph bb2
bb2_instrs["
[5] Reassign mutate a$11_@3:TProp[4:9] = read x$9_@1:TProp
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb3
bb3_instrs["
[7] Reassign mutate a$11_@3:TProp[4:9] = Array []
"]
bb3_instrs --> bb3_terminal(["Goto"])
end
subgraph bb1
bb1_instrs["
[9] Call read useFreeze$5:TFunction(freeze a$11_@3:TProp)
[10] Call read useFreeze$5:TFunction(read a$11_@3:TProp)
[11] Call mutate call$6:TFunction(read a$11_@3:TProp)
"]
bb1_instrs --> bb1_terminal(["Return read a$11_@3:TProp"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb3
bb0_terminal -- "fallthrough" --> bb1
bb2_terminal --> bb1
bb3_terminal --> bb1
```
## Code
```javascript
@@ -163,19 +119,6 @@ function useFreeze(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -201,19 +144,6 @@ function call(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -51,19 +51,6 @@ function compute(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -88,19 +75,6 @@ function mutate(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -125,19 +99,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -162,19 +123,6 @@ function Foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -226,39 +174,6 @@ function Component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate a$9_@1[1:7] = Call mutate compute$3:TFunction(read props$8.a)
[2] Const mutate b$10_@1[1:7] = Call mutate compute$3:TFunction(read props$8.b)
"]
bb0_instrs --> bb0_terminal(["If (read props$8.c)"])
end
subgraph bb2
bb2_instrs["
[4] Call mutate mutate$5:TFunction(mutate a$9_@1)
[5] Call mutate mutate$5:TFunction(mutate b$10_@1)
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb1
bb1_instrs["
[7] Const mutate $14_@2 = JSX <read Foo$6 a={freeze a$9_@1} b={freeze b$10_@1} ></read Foo$6>
"]
bb1_instrs --> bb1_terminal(["Return read $14_@2"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb1
bb2_terminal --> bb1
```
## Code
```javascript
@@ -61,24 +61,6 @@ function Component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate a$8_@0 = Call mutate compute$3:TFunction(read props$7.a)
[2] Const mutate b$9_@1 = Call mutate compute$3:TFunction(read props$7.b)
[3] Const mutate $10_@2 = JSX <read Foo$5 a={freeze a$8_@0} b={freeze b$9_@1} ></read Foo$5>
"]
bb0_instrs --> bb0_terminal(["Return read $10_@2"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -107,19 +89,6 @@ function compute(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -144,19 +113,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -181,19 +137,6 @@ function Foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -45,19 +45,6 @@ function compute(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -82,19 +69,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -119,19 +93,6 @@ function Foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -183,38 +144,6 @@ function Component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate a$9_@0[1:6] = Call mutate compute$3:TFunction(read props$8.a)
[2] Const mutate b$10_@0[1:6] = Call mutate compute$3:TFunction(read props$8.b)
"]
bb0_instrs --> bb0_terminal(["If (read props$8.c)"])
end
subgraph bb2
bb2_instrs["
[4] Call mutate foo$5:TFunction(mutate a$9_@0, mutate b$10_@0)
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb1
bb1_instrs["
[6] Const mutate $14_@1 = JSX <read Foo$6 a={freeze a$9_@0} b={freeze b$10_@0} ></read Foo$6>
"]
bb1_instrs --> bb1_terminal(["Return read $14_@1"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb1
bb2_terminal --> bb1
```
## Code
```javascript
@@ -60,25 +60,6 @@ function Component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate a$9_@0[1:4] = Call mutate compute$3:TFunction(read props$8.a)
[2] Const mutate b$10_@0[1:4] = Call mutate compute$3:TFunction(read props$8.b)
[3] Call mutate foo$5:TFunction(mutate a$9_@0, mutate b$10_@0)
[4] Const mutate $11_@1 = JSX <read Foo$6 a={freeze a$9_@0} b={freeze b$10_@0} ></read Foo$6>
"]
bb0_instrs --> bb0_terminal(["Return read $11_@1"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -108,19 +89,6 @@ function compute(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -145,19 +113,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -182,19 +137,6 @@ function Foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -57,39 +57,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate y$8_@0:TFunction[1:6] = Array []
"]
bb0_instrs --> bb0_terminal(["If (read a$5)"])
end
subgraph bb3
bb3_terminal(["If (read b$6)"])
end
subgraph bb5
bb5_instrs["
[4] Call mutate y$8_@0.push(read c$7)
"]
bb5_instrs --> bb5_terminal(["Goto"])
end
subgraph bb1
bb1_terminal(["Return"])
end
%% Jumps
bb0_terminal -- "then" --> bb3
bb0_terminal -- "else" --> bb1
bb3_terminal -- "then" --> bb5
bb3_terminal -- "else" --> bb1
bb5_terminal --> bb1
```
## Code
```javascript
@@ -45,25 +45,6 @@ function Component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$7_@0:TObject[1:3] = Object { c: read c$6 }
[2] Call mutate mutate$3:TFunction(mutate x$7_@0:TObject)
[3] Const mutate a$8_@1:TObject = read x$7_@0:TObject
[4] Const mutate b$9_@2:TObject = read a$8_@1:TObject
"]
bb0_instrs --> bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -75,32 +75,6 @@ function Foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate $14_@0 = '\n Hello '
[2] Const mutate $15_@1:TPrimitive = ' '
[3] Const mutate $16_@2 = '\n '
[4] Const mutate $17_@3:TPrimitive = 'div'
[5] Const mutate $18_@4 = '\n '
[6] Const mutate $19_@5 = 'Text'
[7] Const mutate $20_@6 = JsxFragment [read $19_@5]
[8] Const mutate $21_@7 = '\n '
[9] Const mutate $22_@8 = JSX <read $17_@3:TPrimitive>{read $18_@4}{read $20_@6}{read $21_@7}</read $17_@3:TPrimitive>
[10] Const mutate $23_@9 = '\n '
[11] Const mutate $24_@10 = JsxFragment [read $14_@0, read props$13.greeting, read $15_@1:TPrimitive, read $16_@2, read $22_@8, read $23_@9]
"]
bb0_instrs --> bb0_terminal(["Return read $24_@10"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -63,43 +63,6 @@ function And(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate $5_@0 = Call mutate f$1:TFunction()
[2] Let mutate $6_@1[2:7] = undefined
"]
bb0_instrs --> bb0_terminal(["If (read $5_@0)"])
end
subgraph bb2
bb2_instrs["
[3] Const mutate $6_@1[2:7] = Call mutate g$4:TFunction()
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb3
bb3_instrs["
[5] Const mutate $6_@1[2:7] = read $5_@0
"]
bb3_instrs --> bb3_terminal(["Goto"])
end
subgraph bb1
bb1_terminal(["Return freeze $6_@1"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb3
bb0_terminal -- "fallthrough" --> bb1
bb2_terminal --> bb1
bb3_terminal --> bb1
```
## Code
```javascript
@@ -155,43 +118,6 @@ function Or(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate $5_@0 = Call mutate f$1:TFunction()
[2] Let mutate $6_@1[2:7] = undefined
"]
bb0_instrs --> bb0_terminal(["If (read $5_@0)"])
end
subgraph bb2
bb2_instrs["
[3] Const mutate $6_@1[2:7] = read $5_@0
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb3
bb3_instrs["
[5] Const mutate $6_@1[2:7] = Call mutate g$4:TFunction()
"]
bb3_instrs --> bb3_terminal(["Goto"])
end
subgraph bb1
bb1_terminal(["Return freeze $6_@1"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb3
bb0_terminal -- "fallthrough" --> bb1
bb2_terminal --> bb1
bb3_terminal --> bb1
```
## Code
```javascript
@@ -255,45 +181,6 @@ function QuestionQuestion(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate $9_@0:TPrimitive = Call mutate f$2:TFunction()
[2] Const mutate $10_@1:TPrimitive = null
[3] Const mutate $11_@2:TPrimitive = Binary read $9_@0:TPrimitive != read $10_@1:TPrimitive
[4] Let mutate $12_@3:TPrimitive[4:9] = undefined
"]
bb0_instrs --> bb0_terminal(["If (read $11_@2:TPrimitive)"])
end
subgraph bb2
bb2_instrs["
[5] Const mutate $12_@3:TPrimitive[4:9] = read $9_@0:TPrimitive
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb3
bb3_instrs["
[7] Const mutate $12_@3:TPrimitive[4:9] = Call mutate g$7:TFunction()
"]
bb3_instrs --> bb3_terminal(["Goto"])
end
subgraph bb1
bb1_terminal(["Return freeze $12_@3:TPrimitive"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb3
bb0_terminal -- "fallthrough" --> bb1
bb2_terminal --> bb1
bb3_terminal --> bb1
```
## Code
```javascript
@@ -323,19 +210,6 @@ function f(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -360,19 +234,6 @@ function g(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -59,19 +59,6 @@ function mutate(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -97,19 +84,6 @@ function cond(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -206,81 +180,6 @@ function Component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Let mutate a$18_@0[1:23] = Object { }
[2] Let mutate b$20_@0[1:23] = Object { }
[3] Let mutate c$22_@0:TPrimitive[1:23] = Object { }
[4] Let mutate d$24_@0[1:23] = Object { }
"]
bb0_instrs --> bb0_terminal(["While"])
end
subgraph bb1
bb1_instrs["
[6] Const mutate $17_@1:TPrimitive[6:8] = true
"]
bb1_instrs --> bb1_terminal(["If (read $17_@1:TPrimitive)"])
end
subgraph bb3
bb3_instrs["
[8] Const mutate z$19_@0[1:23] = read a$18_@0
[9] Reassign mutate a$18_@0[1:23] = read b$20_@0
[10] Reassign mutate b$20_@0[1:23] = read c$22_@0:TPrimitive
[11] Reassign mutate c$22_@0:TPrimitive[1:23] = read d$24_@0
[12] Reassign mutate d$24_@0[1:23] = read z$19_@0
[13] Call mutate mutate$7:TFunction(mutate a$18_@0, mutate b$20_@0)
[14] Const mutate $29_@0[1:23] = Call mutate cond$8:TFunction(mutate a$18_@0)
"]
bb3_instrs --> bb3_terminal(["If (read $29_@0)"])
end
subgraph bb4
bb4_terminal(["Goto"])
end
subgraph bb2
bb2_terminal(["If (read a$18_@0)"])
end
subgraph bb7
bb7_terminal(["If (read b$20_@0)"])
end
subgraph bb9
bb9_terminal(["If (read c$22_@0:TPrimitive)"])
end
subgraph bb11
bb11_terminal(["If (read d$24_@0)"])
end
subgraph bb13
bb13_instrs["
[21] Const mutate $34_@2:TPrimitive = null
[22] Call mutate mutate$7:TFunction(mutate d$24_@0, read $34_@2:TPrimitive)
"]
bb13_instrs --> bb13_terminal(["Return"])
end
%% Jumps
bb0_terminal -- "test" --> bb1
bb0_terminal -- "loop" --> bb3
bb0_terminal -- "fallthrough" --> bb2
bb1_terminal -- "then" --> bb3
bb1_terminal -- "else" --> bb2
bb3_terminal -- "then" --> bb2
bb3_terminal -- "else" --> bb4
bb4_terminal --> bb1
bb2_terminal -- "then" --> bb7
bb2_terminal -- "else" --> bb7
bb7_terminal -- "then" --> bb9
bb7_terminal -- "else" --> bb9
bb9_terminal -- "then" --> bb11
bb9_terminal -- "else" --> bb11
bb11_terminal -- "then" --> bb13
bb11_terminal -- "else" --> bb13
```
## Code
```javascript
@@ -55,19 +55,6 @@ function mutate(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -144,57 +131,6 @@ function Component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate a$11_@0:TObject = Object { }
[2] Const mutate b$12_@1[2:15] = Array [read a$11_@0:TObject]
[3] Const mutate c$13_@2:TObject = Object { }
[4] Const mutate d$14_@1:TObject[2:15] = Object { c: read c$13_@2:TObject }
[5] Const mutate x$15_@1:TObject[2:15] = Object { }
[6] Reassign mutate x$15_@1.b[2:15] = read b$12_@1
[7] Const mutate y$16_@1[2:15] = Call mutate mutate$8:TFunction(mutate x$15_@1:TObject, mutate d$14_@1:TObject)
"]
bb0_instrs --> bb0_terminal(["If (read a$11_@0:TObject)"])
end
subgraph bb1
bb1_terminal(["If (read b$12_@1)"])
end
subgraph bb3
bb3_terminal(["If (read c$13_@2:TObject)"])
end
subgraph bb5
bb5_terminal(["If (read d$14_@1:TObject)"])
end
subgraph bb7
bb7_terminal(["If (read y$16_@1)"])
end
subgraph bb9
bb9_instrs["
[13] Const mutate $17_@3:TPrimitive = null
[14] Call mutate mutate$8:TFunction(mutate x$15_@1:TObject, read $17_@3:TPrimitive)
"]
bb9_instrs --> bb9_terminal(["Return"])
end
%% Jumps
bb0_terminal -- "then" --> bb1
bb0_terminal -- "else" --> bb1
bb1_terminal -- "then" --> bb3
bb1_terminal -- "else" --> bb3
bb3_terminal -- "then" --> bb5
bb3_terminal -- "else" --> bb5
bb5_terminal -- "then" --> bb7
bb5_terminal -- "else" --> bb7
bb7_terminal -- "then" --> bb9
bb7_terminal -- "else" --> bb9
```
## Code
```javascript
@@ -52,19 +52,6 @@ function mutate(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -89,19 +76,6 @@ function cond(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -190,76 +164,6 @@ function Component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate a$12_@0:TObject[1:18] = Object { }
[2] Const mutate b$13_@0:TObject[1:18] = Object { }
[3] Const mutate c$14_@1:TObject = Object { }
[4] Const mutate d$15_@0:TObject[1:18] = Object { }
"]
bb0_instrs --> bb0_terminal(["While"])
end
subgraph bb1
bb1_instrs["
[6] Const mutate $16_@3:TPrimitive[6:8] = true
"]
bb1_instrs --> bb1_terminal(["If (read $16_@3:TPrimitive)"])
end
subgraph bb3
bb3_instrs["
[8] Call mutate mutate$6:TFunction(mutate a$12_@0:TObject, mutate b$13_@0:TObject)
[9] Const mutate $21_@0[1:18] = Call mutate cond$7:TFunction(mutate a$12_@0:TObject)
"]
bb3_instrs --> bb3_terminal(["If (read $21_@0)"])
end
subgraph bb4
bb4_terminal(["Goto"])
end
subgraph bb2
bb2_terminal(["If (read a$12_@0:TObject)"])
end
subgraph bb7
bb7_terminal(["If (read b$13_@0:TObject)"])
end
subgraph bb9
bb9_terminal(["If (read c$14_@1:TObject)"])
end
subgraph bb11
bb11_terminal(["If (read d$15_@0:TObject)"])
end
subgraph bb13
bb13_instrs["
[16] Const mutate $28_@4:TPrimitive = null
[17] Call mutate mutate$6:TFunction(mutate d$15_@0:TObject, read $28_@4:TPrimitive)
"]
bb13_instrs --> bb13_terminal(["Return"])
end
%% Jumps
bb0_terminal -- "test" --> bb1
bb0_terminal -- "loop" --> bb3
bb0_terminal -- "fallthrough" --> bb2
bb1_terminal -- "then" --> bb3
bb1_terminal -- "else" --> bb2
bb3_terminal -- "then" --> bb2
bb3_terminal -- "else" --> bb4
bb4_terminal --> bb1
bb2_terminal -- "then" --> bb7
bb2_terminal -- "else" --> bb7
bb7_terminal -- "then" --> bb9
bb7_terminal -- "else" --> bb9
bb9_terminal -- "then" --> bb11
bb9_terminal -- "else" --> bb11
bb11_terminal -- "then" --> bb13
bb11_terminal -- "else" --> bb13
```
## Code
```javascript
@@ -51,32 +51,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$9_@0:TFunction[1:6] = Array []
[2] Const mutate y$10_@0:TFunction[1:6] = Array []
"]
bb0_instrs --> bb0_terminal(["If (read x$9_@0:TFunction)"])
end
subgraph bb1
bb1_instrs["
[4] Call mutate y$10_@0.push(read a$6)
[5] Call mutate x$9_@0.push(read b$7)
"]
bb1_instrs --> bb1_terminal(["Return"])
end
%% Jumps
bb0_terminal -- "then" --> bb1
bb0_terminal -- "else" --> bb1
```
## Code
```javascript
@@ -41,25 +41,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$7_@0:TFunction[1:5] = Array []
[2] Const mutate y$8_@0:TFunction[1:5] = Array []
[3] Call mutate x$7_@0.push(read a$5)
[4] Call mutate y$8_@0.push(read b$6)
"]
bb0_instrs --> bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -45,25 +45,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$7_@0:TFunction[1:5] = Array []
[2] Const mutate y$8_@1:TFunction[2:4] = Array []
[3] Call mutate y$8_@1.push(read b$6)
[4] Call mutate x$7_@0.push(read a$5)
"]
bb0_instrs --> bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -79,51 +79,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$11_@0:TFunction[1:11] = Array []
"]
bb0_instrs --> bb0_terminal(["If (read a$8)"])
end
subgraph bb2
bb2_instrs["
[3] Const mutate y$12_@1:TFunction[3:7] = Array []
"]
bb2_instrs --> bb2_terminal(["If (read b$9)"])
end
subgraph bb4
bb4_instrs["
[5] Call mutate y$12_@1.push(read c$10)
"]
bb4_instrs --> bb4_terminal(["Goto"])
end
subgraph bb3
bb3_instrs["
[7] Const mutate $13_@2:TPrimitive = 'div'
[8] Const mutate $15_@3 = JSX <read $13_@2:TPrimitive>{freeze y$12_@1:TFunction}</read $13_@2:TPrimitive>
[9] Call mutate x$11_@0.push(read $15_@3)
"]
bb3_instrs --> bb3_terminal(["Goto"])
end
subgraph bb1
bb1_terminal(["Return freeze x$11_@0:TFunction"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb1
bb2_terminal -- "then" --> bb4
bb2_terminal -- "else" --> bb3
bb4_terminal --> bb3
bb3_terminal --> bb1
```
## Code
```javascript
@@ -57,42 +57,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$9_@0:TFunction[1:8] = Array []
[2] Const mutate y$10_@0:TFunction[1:8] = Array []
"]
bb0_instrs --> bb0_terminal(["While"])
end
subgraph bb1
bb1_terminal(["If (read c$8)"])
end
subgraph bb3
bb3_instrs["
[5] Call mutate y$10_@0.push(read b$7)
[6] Call mutate x$9_@0.push(read a$6)
"]
bb3_instrs --> bb3_terminal(["Goto"])
end
subgraph bb2
bb2_terminal(["Return"])
end
%% Jumps
bb0_terminal -- "test" --> bb1
bb0_terminal -- "loop" --> bb3
bb0_terminal -- "fallthrough" --> bb2
bb1_terminal -- "then" --> bb3
bb1_terminal -- "else" --> bb2
bb3_terminal --> bb1
```
## Code
```javascript
@@ -67,49 +67,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$9_@0:TFunction[1:9] = Array []
"]
bb0_instrs --> bb0_terminal(["If (read a$6)"])
end
subgraph bb2
bb2_instrs["
[3] Const mutate y$10_@0:TFunction[1:9] = Array []
"]
bb2_instrs --> bb2_terminal(["If (read b$7)"])
end
subgraph bb4
bb4_instrs["
[5] Call mutate y$10_@0.push(read c$8)
"]
bb4_instrs --> bb4_terminal(["Goto"])
end
subgraph bb3
bb3_instrs["
[7] Call mutate x$9_@0.push(mutate y$10_@0:TFunction)
"]
bb3_instrs --> bb3_terminal(["Goto"])
end
subgraph bb1
bb1_terminal(["Return freeze x$9_@0:TFunction"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb1
bb2_terminal -- "then" --> bb4
bb2_terminal -- "else" --> bb3
bb4_terminal --> bb3
bb3_terminal --> bb1
```
## Code
```javascript
@@ -54,27 +54,6 @@ function Component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$7_@0:TObject[1:6] = Object { }
[2] Const mutate y$8_@0[1:6] = Array []
[3] Reassign mutate x$7_@0.y[1:6] = read y$8_@0
[4] Const mutate child$9_@0[1:6] = JSX <read Component$0 data={freeze y$8_@0} ></read Component$0>
[5] Call mutate x$7_@0.y.push(read props$6.p0)
[6] Const mutate $10_@1 = JSX <read Component$0 data={freeze x$7_@0:TObject} >{read child$9_@0}</read Component$0>
"]
bb0_instrs --> bb0_terminal(["Return read $10_@1"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -47,26 +47,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$4_@0:TObject[1:6] = Object { }
[2] Const mutate y$5_@1:TFunction[2:5] = Array []
[3] Const mutate z$6_@1:TObject[2:5] = Object { }
[4] Call mutate y$5_@1.push(mutate z$6_@1:TObject)
[5] Reassign mutate x$4_@0.y[1:6] = read y$5_@1:TFunction
"]
bb0_instrs --> bb0_terminal(["Return freeze x$4_@0:TObject"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -76,46 +76,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$11_@0:TFunction[1:11] = Array []
"]
bb0_instrs --> bb0_terminal(["If (read a$8)"])
end
subgraph bb2
bb2_instrs["
[3] Const mutate y$12_@1:TFunction[3:5] = Array []
[4] Call mutate y$12_@1.push(read b$9)
[5] Const mutate $13_@2:TPrimitive = 'div'
[6] Const mutate $14_@3 = JSX <read $13_@2:TPrimitive>{freeze y$12_@1:TFunction}</read $13_@2:TPrimitive>
[7] Call mutate x$11_@0.push(read $14_@3)
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb3
bb3_instrs["
[9] Call mutate x$11_@0.push(read c$10)
"]
bb3_instrs --> bb3_terminal(["Goto"])
end
subgraph bb1
bb1_terminal(["Return freeze x$11_@0:TFunction"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb3
bb0_terminal -- "fallthrough" --> bb1
bb2_terminal --> bb1
bb3_terminal --> bb1
```
## Code
```javascript
@@ -72,45 +72,6 @@ function f(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$10_@0:TFunction[1:8] = Array []
[2] Const mutate $11_@1:TPrimitive = 1
[3] Const mutate $12_@2:TPrimitive = Binary read a$8.length === read $11_@1:TPrimitive
"]
bb0_instrs --> bb0_terminal(["If (read $12_@2:TPrimitive)"])
end
subgraph bb2
bb2_terminal(["If (read b$9)"])
end
subgraph bb4
bb4_instrs["
[6] Call mutate x$10_@0.push(read b$9)
"]
bb4_instrs --> bb4_terminal(["Goto"])
end
subgraph bb1
bb1_instrs["
[8] Const mutate $13_@3:TPrimitive = 'div'
[9] Const mutate $15_@4 = JSX <read $13_@3:TPrimitive>{freeze x$10_@0:TFunction}</read $13_@3:TPrimitive>
"]
bb1_instrs --> bb1_terminal(["Return read $15_@4"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb1
bb2_terminal -- "then" --> bb4
bb2_terminal -- "else" --> bb1
bb4_terminal --> bb1
```
## Code
```javascript
@@ -77,41 +77,6 @@ function Component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Let mutate x$7_@0:TFunction[1:7] = Array []
[2] Call mutate x$7_@0.push(read props$6.p0)
[3] Const mutate y$8_@0:TFunction[1:7] = read x$7_@0:TFunction
"]
bb0_instrs --> bb0_terminal(["If (read props$6.p1)"])
end
subgraph bb2
bb2_instrs["
[5] Reassign mutate x$7_@0:TFunction[1:7] = Array []
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb1
bb1_instrs["
[7] Const mutate _$12_@1 = JSX <read Component$0 x={freeze x$7_@0:TFunction} ></read Component$0>
[8] Call read y$8_@0.push(read props$6.p2)
[9] Const mutate $15_@2 = JSX <read Component$0 x={read x$7_@0:TFunction} y={read y$8_@0:TFunction} ></read Component$0>
"]
bb1_instrs --> bb1_terminal(["Return read $15_@2"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb1
bb2_terminal --> bb1
```
## Code
```javascript
@@ -132,69 +132,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$16_@0:TFunction[1:5] = Array []
"]
bb0_instrs --> bb0_terminal(["If (read a$13)"])
end
subgraph bb2
bb2_instrs["
[3] Call mutate x$16_@0.push(read a$13)
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb1
bb1_instrs["
[5] Const mutate $17_@1:TPrimitive = 'div'
[6] Const mutate y$19_@2 = JSX <read $17_@1:TPrimitive>{freeze x$16_@0:TFunction}</read $17_@1:TPrimitive>
[7] Const mutate $20_@3:TPrimitive = 0
[8] Let mutate x$22_@4:TFunction[8:15] = undefined
"]
bb1_instrs --> bb1_terminal(["Switch (read b$14)"])
end
subgraph bb5
bb5_instrs["
[9] Reassign mutate x$22_@4:TFunction[8:15] = Array []
[10] Call mutate x$22_@4.push(read b$14)
"]
bb5_instrs --> bb5_terminal(["Goto"])
end
subgraph bb4
bb4_instrs["
[12] Reassign mutate x$22_@4:TFunction[8:15] = Array []
[13] Call mutate x$22_@4.push(read c$15)
"]
bb4_instrs --> bb4_terminal(["Goto"])
end
subgraph bb3
bb3_instrs["
[15] Const mutate $25_@5:TPrimitive = 'div'
[16] Const mutate $26_@6 = '\n '
[17] Const mutate $27_@7 = '\n '
[18] Const mutate $28_@8 = '\n '
[19] Const mutate $31_@9 = JSX <read $25_@5:TPrimitive>{read $26_@6}{read y$19_@2}{read $27_@7}{freeze x$22_@4:TFunction}{read $28_@8}</read $25_@5:TPrimitive>
"]
bb3_instrs --> bb3_terminal(["Return read $31_@9"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb1
bb2_terminal --> bb1
bb1_terminal -- "read $20_@3:TPrimitive" --> bb5
bb1_terminal -- "default" --> bb4
bb1_terminal -- "fallthrough" --> bb3
bb5_terminal --> bb3
bb4_terminal --> bb3
```
## Code
```javascript
@@ -67,28 +67,6 @@ function Component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$7_@0:TFunction[1:7] = Array []
[2] Call mutate x$7_@0.push(read props$6.p0)
[3] Const mutate y$8_@0:TFunction[1:7] = read x$7_@0:TFunction
[4] Const mutate x$9_@1 = Array []
[5] Const mutate _$10_@2 = JSX <read Component$0 x={freeze x$9_@1} ></read Component$0>
[6] Call mutate y$8_@0.push(read props$6.p1)
[7] Const mutate $11_@3 = JSX <read Component$0 x={read x$9_@1} y={freeze y$8_@0:TFunction} ></read Component$0>
"]
bb0_instrs --> bb0_terminal(["Return read $11_@3"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -130,86 +130,6 @@ function Component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$7_@0:TPrimitive = undefined
[2] Let mutate x$11_@1:TProp[2:18] = undefined
"]
bb0_instrs --> bb0_terminal(["If (read props$6.cond)"])
end
subgraph bb2
bb2_instrs["
[3] Const mutate $8_@2:TPrimitive = 2
[4] Const mutate $9_@3:TPrimitive = 1
[5] Const mutate $10_@4:TPrimitive = 0
"]
bb2_instrs --> bb2_terminal(["Switch (read props$6.test)"])
end
subgraph bb8
bb8_instrs["
[7] Reassign mutate x$11_@1:TProp[2:18] = read props$6.v0
"]
bb8_instrs --> bb8_terminal(["Goto"])
end
subgraph bb6
bb6_instrs["
[9] Reassign mutate x$11_@1:TProp[2:18] = read props$6.v1
"]
bb6_instrs --> bb6_terminal(["Goto"])
end
subgraph bb4
bb4_instrs["
[11] Reassign mutate x$11_@1:TProp[2:18] = read props$6.v2
"]
bb4_instrs --> bb4_terminal(["Goto"])
end
subgraph bb10
bb10_terminal(["If (read props$6.cond2)"])
end
subgraph bb12
bb12_instrs["
[14] Reassign mutate x$11_@1:TProp[2:18] = read props$6.b
"]
bb12_instrs --> bb12_terminal(["Goto"])
end
subgraph bb13
bb13_instrs["
[16] Reassign mutate x$11_@1:TProp[2:18] = read props$6.c
"]
bb13_instrs --> bb13_terminal(["Goto"])
end
subgraph bb1
bb1_instrs["
[18] read x$11_@1:TProp
"]
bb1_instrs --> bb1_terminal(["Return"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb10
bb0_terminal -- "fallthrough" --> bb1
bb2_terminal -- "read $10_@4:TPrimitive" --> bb8
bb2_terminal -- "read $9_@3:TPrimitive" --> bb6
bb2_terminal -- "read $8_@2:TPrimitive" --> bb4
bb2_terminal -- "default" --> bb4
bb2_terminal -- "fallthrough" --> bb1
bb8_terminal --> bb1
bb6_terminal --> bb1
bb4_terminal --> bb1
bb10_terminal -- "then" --> bb12
bb10_terminal -- "else" --> bb13
bb10_terminal -- "fallthrough" --> bb1
bb12_terminal --> bb1
bb13_terminal --> bb1
```
## Code
```javascript
@@ -34,19 +34,6 @@ function mutate(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -89,28 +76,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate a$5_@0:TObject = Object { }
[2] Const mutate b$6_@1:TObject[2:8] = Object { }
[3] Const mutate c$7_@1:TObject[2:8] = Object { }
[4] Const mutate a$8_@1:TObject[2:8] = read b$6_@1:TObject
[5] Const mutate b$9_@1:TObject[2:8] = read c$7_@1:TObject
[6] Const mutate c$10_@1:TObject[2:8] = read a$8_@1:TObject
[7] Call mutate mutate$4:TFunction(mutate a$8_@1:TObject, mutate b$9_@1:TObject)
"]
bb0_instrs --> bb0_terminal(["Return freeze c$10_@1:TObject"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -62,36 +62,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["If (read x$8)"])
end
subgraph bb2
bb2_instrs["
[2] Const mutate $10_@0:TPrimitive = false
[3] Const mutate $11_@1 = Call read foo$0:TFunction(read $10_@0:TPrimitive, read y$9:TPrimitive)
"]
bb2_instrs --> bb2_terminal(["Return freeze $11_@1"])
end
subgraph bb1
bb1_instrs["
[5] Const mutate $12_@2:TPrimitive = 10
[6] Const mutate $13_@3:TPrimitive = Binary read y$9:TPrimitive * read $12_@2:TPrimitive
[7] Const mutate $14_@4 = Array [read $13_@3:TPrimitive]
"]
bb1_instrs --> bb1_terminal(["Return freeze $14_@4"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb1
```
## Code
```javascript
@@ -40,24 +40,6 @@ function Component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate a$6_@0:TPrimitive = 1
[2] Const mutate b$7_@1:TPrimitive = 2
[3] Const mutate x$8_@2 = Array [read a$6_@0:TPrimitive, read b$7_@1:TPrimitive]
"]
bb0_instrs --> bb0_terminal(["Return freeze x$8_@2"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -36,19 +36,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -113,43 +100,6 @@ function Component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate a$11_@0[1:10] = Array []
[2] Const mutate b$12_@0:TObject[1:10] = Object { }
[3] Call mutate foo$4:TFunction(mutate a$11_@0, mutate b$12_@0:TObject)
[4] Const mutate $13_@1 = Call mutate foo$4:TFunction()
"]
bb0_instrs --> bb0_terminal(["If (read $13_@1)"])
end
subgraph bb2
bb2_instrs["
[6] Const mutate $14_@2:TPrimitive = 'div'
[7] Const mutate _$15_@3 = JSX <read $14_@2:TPrimitive a={freeze a$11_@0} ></read $14_@2:TPrimitive>
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb1
bb1_instrs["
[9] Call mutate foo$4:TFunction(read a$11_@0, mutate b$12_@0:TObject)
[10] Const mutate $19_@4:TPrimitive = 'div'
[11] Const mutate $20_@5 = JSX <read $19_@4:TPrimitive a={freeze a$11_@0} b={freeze b$12_@0:TObject} ></read $19_@4:TPrimitive>
"]
bb1_instrs --> bb1_terminal(["Return read $20_@5"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb1
bb2_terminal --> bb1
```
## Code
```javascript
@@ -33,19 +33,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -98,29 +85,6 @@ function Component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate a$10_@0[1:7] = Array []
[2] Const mutate b$11_@0:TObject[1:7] = Object { }
[3] Call mutate foo$4:TFunction(mutate a$10_@0, mutate b$11_@0:TObject)
[4] Const mutate $12_@1:TPrimitive = 'div'
[5] Const mutate _$13_@2 = JSX <read $12_@1:TPrimitive a={freeze a$10_@0} ></read $12_@1:TPrimitive>
[6] Call mutate foo$4:TFunction(read a$10_@0, mutate b$11_@0:TObject)
[7] Const mutate $14_@3:TPrimitive = 'div'
[8] Const mutate $15_@4 = JSX <read $14_@3:TPrimitive a={read a$10_@0} b={freeze b$11_@0:TObject} ></read $14_@3:TPrimitive>
"]
bb0_instrs --> bb0_terminal(["Return read $15_@4"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -78,56 +78,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Let mutate x$7_@0:TPrimitive[1:13] = 1
[2] Const mutate y$8_@1:TPrimitive = 2
[3] Const mutate $9_@2:TPrimitive = 2
[4] Const mutate $10_@3:TPrimitive = Binary read y$8_@1:TPrimitive === read $9_@2:TPrimitive
"]
bb0_instrs --> bb0_terminal(["If (read $10_@3:TPrimitive)"])
end
subgraph bb2
bb2_instrs["
[6] Reassign mutate x$7_@0:TPrimitive[1:13] = 3
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb1
bb1_instrs["
[8] Const mutate $12_@4:TPrimitive = 3
[9] Const mutate $14_@5:TPrimitive = Binary read y$8_@1:TPrimitive === read $12_@4:TPrimitive
"]
bb1_instrs --> bb1_terminal(["If (read $14_@5:TPrimitive)"])
end
subgraph bb4
bb4_instrs["
[11] Reassign mutate x$7_@0:TPrimitive[1:13] = 5
"]
bb4_instrs --> bb4_terminal(["Goto"])
end
subgraph bb3
bb3_instrs["
[13] Const mutate y$18_@6 = read x$7_@0:TPrimitive
"]
bb3_instrs --> bb3_terminal(["Return"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb1
bb2_terminal --> bb1
bb1_terminal -- "then" --> bb4
bb1_terminal -- "else" --> bb3
bb4_terminal --> bb3
```
## Code
```javascript
@@ -58,40 +58,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Let mutate x$5_@0:TPrimitive[1:8] = 1
[2] Const mutate y$6_@1:TPrimitive = 2
[3] Const mutate $7_@2:TPrimitive = 2
[4] Const mutate $8_@3:TPrimitive = Binary read y$6_@1:TPrimitive === read $7_@2:TPrimitive
"]
bb0_instrs --> bb0_terminal(["If (read $8_@3:TPrimitive)"])
end
subgraph bb2
bb2_instrs["
[6] Reassign mutate x$5_@0:TPrimitive[1:8] = 3
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb1
bb1_instrs["
[8] Const mutate y$11_@4 = read x$5_@0:TPrimitive
"]
bb1_instrs --> bb1_terminal(["Return"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb1
bb2_terminal --> bb1
```
## Code
```javascript
@@ -54,50 +54,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate items$5_@0 = Array []
"]
bb0_instrs --> bb0_terminal(["Goto"])
end
subgraph bb1
bb1_terminal(["If (read items$5_@0)"])
end
subgraph bb3
bb3_instrs["
[4] Const mutate y$7_@1:TPrimitive = 0
"]
bb3_instrs --> bb3_terminal(["If (read cond$4)"])
end
subgraph bb5
bb5_instrs["
[6] Const mutate y$9_@2:TPrimitive = 1
"]
bb5_instrs --> bb5_terminal(["Goto"])
end
subgraph bb4
bb4_terminal(["Goto"])
end
subgraph bb2
bb2_terminal(["Return freeze items$5_@0"])
end
%% Jumps
bb0_terminal --> bb1
bb1_terminal -- "then" --> bb3
bb1_terminal -- "else" --> bb2
bb3_terminal -- "then" --> bb5
bb3_terminal -- "else" --> bb4
bb5_terminal --> bb4
bb4_terminal --> bb1
```
## Code
```javascript
@@ -69,61 +69,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Let mutate x$6_@1:TPrimitive[1:13] = 1
"]
bb0_instrs --> bb0_terminal(["For"])
end
subgraph bb3
bb3_instrs["
[3] Const mutate i$7_@1:TPrimitive[1:13] = 0
"]
bb3_instrs --> bb3_terminal(["Goto"])
end
subgraph bb1
bb1_instrs["
[5] Const mutate $8_@1:TPrimitive[1:13] = 10
[6] Const mutate $10_@3:TPrimitive[6:8] = Binary read i$7_@1:TPrimitive < read $8_@1:TPrimitive
"]
bb1_instrs --> bb1_terminal(["If (read $10_@3:TPrimitive)"])
end
subgraph bb5
bb5_instrs["
[8] Const mutate $11_@4:TPrimitive = 1
[9] Reassign mutate x$6_@1:TPrimitive[1:13] = Binary read x$6_@1:TPrimitive + read $11_@4:TPrimitive
"]
bb5_instrs --> bb5_terminal(["Goto"])
end
subgraph bb4
bb4_instrs["
[11] read i$7_@1:TPrimitive
"]
bb4_instrs --> bb4_terminal(["Goto"])
end
subgraph bb2
bb2_terminal(["Return read x$6_@1:TPrimitive"])
end
%% Jumps
bb0_terminal -- "init" --> bb3
bb0_terminal -- "test" --> bb1
bb0_terminal -- "update" --> bb4
bb0_terminal -- "loop" --> bb5
bb0_terminal -- "fallthrough" --> bb2
bb3_terminal --> bb1
bb1_terminal -- "then" --> bb5
bb1_terminal -- "else" --> bb2
bb5_terminal --> bb4
bb4_terminal --> bb1
```
## Code
```javascript
@@ -71,63 +71,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Let mutate x$7_@1:TPrimitive[1:15] = 1
"]
bb0_instrs --> bb0_terminal(["For"])
end
subgraph bb3
bb3_instrs["
[3] Let mutate i$8_@1:TPrimitive[1:15] = 0
"]
bb3_instrs --> bb3_terminal(["Goto"])
end
subgraph bb1
bb1_instrs["
[5] Const mutate $9_@1:TPrimitive[1:15] = 10
[6] Const mutate $11_@1:TPrimitive[1:15] = Binary read i$8_@1:TPrimitive < read $9_@1:TPrimitive
"]
bb1_instrs --> bb1_terminal(["If (read $11_@1:TPrimitive)"])
end
subgraph bb5
bb5_instrs["
[8] Const mutate $12_@3:TPrimitive = 1
[9] Reassign mutate x$7_@1:TPrimitive[1:15] = Binary read x$7_@1:TPrimitive + read $12_@3:TPrimitive
"]
bb5_instrs --> bb5_terminal(["Goto"])
end
subgraph bb4
bb4_instrs["
[11] Const mutate $15_@1:TPrimitive[1:15] = 1
[12] Reassign mutate i$8_@1:TPrimitive[1:15] = Binary read i$8_@1:TPrimitive + read $15_@1:TPrimitive
[13] read i$8_@1:TPrimitive
"]
bb4_instrs --> bb4_terminal(["Goto"])
end
subgraph bb2
bb2_terminal(["Return read x$7_@1:TPrimitive"])
end
%% Jumps
bb0_terminal -- "init" --> bb3
bb0_terminal -- "test" --> bb1
bb0_terminal -- "update" --> bb4
bb0_terminal -- "loop" --> bb5
bb0_terminal -- "fallthrough" --> bb2
bb3_terminal --> bb1
bb1_terminal -- "then" --> bb5
bb1_terminal -- "else" --> bb2
bb5_terminal --> bb4
bb4_terminal --> bb1
```
## Code
```javascript
@@ -57,43 +57,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$5_@0:TPrimitive = 1
[2] Const mutate y$6_@1:TPrimitive = 2
"]
bb0_instrs --> bb0_terminal(["If (read y$6_@1:TPrimitive)"])
end
subgraph bb2
bb2_instrs["
[4] Const mutate z$7_@2:TPrimitive = Binary read x$5_@0:TPrimitive + read y$6_@1:TPrimitive
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb3
bb3_instrs["
[6] Const mutate z$8_@3:TPrimitive = read x$5_@0:TPrimitive
"]
bb3_instrs --> bb3_terminal(["Goto"])
end
subgraph bb1
bb1_terminal(["Return"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb3
bb0_terminal -- "fallthrough" --> bb1
bb2_terminal --> bb1
bb3_terminal --> bb1
```
## Code
```javascript
@@ -113,93 +113,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$13_@0:TPrimitive = 0
[2] Const mutate $14_@1:TPrimitive = true
[3] Let mutate x$18_@2[3:20] = undefined
"]
bb0_instrs --> bb0_terminal(["If (read $14_@1:TPrimitive)"])
end
subgraph bb2
bb2_instrs["
[4] Const mutate $15_@3:TPrimitive = true
"]
bb2_instrs --> bb2_terminal(["If (read $15_@3:TPrimitive)"])
end
subgraph bb4
bb4_instrs["
[6] Reassign mutate x$18_@2[3:20] = read a$9
"]
bb4_instrs --> bb4_terminal(["Goto"])
end
subgraph bb5
bb5_instrs["
[8] Reassign mutate x$18_@2[3:20] = read b$10
"]
bb5_instrs --> bb5_terminal(["Goto"])
end
subgraph bb3
bb3_instrs["
[10] read x$18_@2
"]
bb3_instrs --> bb3_terminal(["Goto"])
end
subgraph bb6
bb6_instrs["
[12] Const mutate $19_@4:TPrimitive = true
"]
bb6_instrs --> bb6_terminal(["If (read $19_@4:TPrimitive)"])
end
subgraph bb8
bb8_instrs["
[14] Reassign mutate x$18_@2[3:20] = read c$11
"]
bb8_instrs --> bb8_terminal(["Goto"])
end
subgraph bb9
bb9_instrs["
[16] Reassign mutate x$18_@2[3:20] = read d$12
"]
bb9_instrs --> bb9_terminal(["Goto"])
end
subgraph bb7
bb7_instrs["
[18] read x$18_@2
"]
bb7_instrs --> bb7_terminal(["Goto"])
end
subgraph bb1
bb1_instrs["
[20] read x$18_@2
"]
bb1_instrs --> bb1_terminal(["Return"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb6
bb0_terminal -- "fallthrough" --> bb1
bb2_terminal -- "then" --> bb4
bb2_terminal -- "else" --> bb5
bb2_terminal -- "fallthrough" --> bb3
bb4_terminal --> bb3
bb5_terminal --> bb3
bb3_terminal --> bb1
bb6_terminal -- "then" --> bb8
bb6_terminal -- "else" --> bb9
bb6_terminal -- "fallthrough" --> bb7
bb8_terminal --> bb7
bb9_terminal --> bb7
bb7_terminal --> bb1
```
## Code
```javascript
@@ -84,71 +84,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$9_@0:TPrimitive = 0
"]
bb0_instrs --> bb0_terminal(["While"])
end
subgraph bb1
bb1_terminal(["If (read a$6)"])
end
subgraph bb3
bb3_terminal(["While"])
end
subgraph bb4
bb4_terminal(["If (read b$7)"])
end
subgraph bb6
bb6_terminal(["While"])
end
subgraph bb7
bb7_terminal(["If (read c$8)"])
end
subgraph bb9
bb9_instrs["
[8] Const mutate $13_@1:TPrimitive = 1
[9] Binary read x$9_@0:TPrimitive + read $13_@1:TPrimitive
"]
bb9_instrs --> bb9_terminal(["Goto"])
end
subgraph bb8
bb8_terminal(["Goto"])
end
subgraph bb5
bb5_terminal(["Goto"])
end
subgraph bb2
bb2_terminal(["Return read x$9_@0:TPrimitive"])
end
%% Jumps
bb0_terminal -- "test" --> bb1
bb0_terminal -- "loop" --> bb3
bb0_terminal -- "fallthrough" --> bb2
bb1_terminal -- "then" --> bb3
bb1_terminal -- "else" --> bb2
bb3_terminal -- "test" --> bb4
bb3_terminal -- "loop" --> bb6
bb3_terminal -- "fallthrough" --> bb5
bb4_terminal -- "then" --> bb6
bb4_terminal -- "else" --> bb5
bb6_terminal -- "test" --> bb7
bb6_terminal -- "loop" --> bb9
bb6_terminal -- "fallthrough" --> bb8
bb7_terminal -- "then" --> bb9
bb7_terminal -- "else" --> bb8
bb9_terminal --> bb7
bb8_terminal --> bb4
bb5_terminal --> bb1
```
## Code
```javascript
@@ -63,46 +63,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$8_@0[1:8] = read a$5
"]
bb0_instrs --> bb0_terminal(["If (read b$6)"])
end
subgraph bb2
bb2_terminal(["If (read c$7)"])
end
subgraph bb4
bb4_instrs["
[4] Reassign mutate x$8_@0[1:8] = read c$7
"]
bb4_instrs --> bb4_terminal(["Goto"])
end
subgraph bb3
bb3_instrs["
[6] read x$8_@0
"]
bb3_instrs --> bb3_terminal(["Goto"])
end
subgraph bb1
bb1_terminal(["Return"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb1
bb2_terminal -- "then" --> bb4
bb2_terminal -- "else" --> bb3
bb4_terminal --> bb3
bb3_terminal --> bb1
```
## Code
```javascript
@@ -68,47 +68,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Let mutate x$12_@0:TPrimitive[1:8] = null
"]
bb0_instrs --> bb0_terminal(["If (read a$7)"])
end
subgraph bb2
bb2_instrs["
[3] Reassign mutate x$12_@0:TPrimitive[1:8] = read b$8
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb3
bb3_terminal(["If (read c$9)"])
end
subgraph bb5
bb5_instrs["
[6] Reassign mutate x$12_@0:TPrimitive[1:8] = read d$10
"]
bb5_instrs --> bb5_terminal(["Goto"])
end
subgraph bb1
bb1_terminal(["Return read x$12_@0:TPrimitive"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb3
bb0_terminal -- "fallthrough" --> bb1
bb2_terminal --> bb1
bb3_terminal -- "then" --> bb5
bb3_terminal -- "else" --> bb1
bb5_terminal --> bb1
```
## Code
```javascript
@@ -31,19 +31,6 @@ function Foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -77,24 +64,6 @@ function Component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate a$7_@0[1:4] = Array []
[2] Const mutate b$8_@0:TObject[1:4] = Object { }
[3] Const mutate c$9_@0[1:4] = New mutate Foo$5(mutate a$7_@0, mutate b$8_@0:TObject)
"]
bb0_instrs --> bb0_terminal(["Return freeze c$9_@0"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -68,48 +68,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Let mutate x$6_@0:TPrimitive[1:10] = 1
[2] Let mutate y$7_@0:TPrimitive[1:10] = 2
[3] Const mutate $8_@2:TPrimitive = 1
[4] Const mutate $9_@0:TPrimitive[1:10] = Binary read x$6_@0:TPrimitive > read $8_@2:TPrimitive
"]
bb0_instrs --> bb0_terminal(["If (read $9_@0:TPrimitive)"])
end
subgraph bb2
bb2_instrs["
[6] Reassign mutate x$6_@0:TPrimitive[1:10] = 2
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb3
bb3_instrs["
[8] Reassign mutate y$7_@0:TPrimitive[1:10] = 3
"]
bb3_instrs --> bb3_terminal(["Goto"])
end
subgraph bb1
bb1_instrs["
[10] Const mutate t$14_@3:TObject = Object { x: read x$6_@0:TPrimitive, y: read y$7_@0:TPrimitive }
"]
bb1_instrs --> bb1_terminal(["Return freeze t$14_@3:TObject"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb3
bb0_terminal -- "fallthrough" --> bb1
bb2_terminal --> bb1
bb3_terminal --> bb1
```
## Code
```javascript
@@ -40,24 +40,6 @@ function Component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate a$6_@0:TPrimitive = 1
[2] Const mutate b$7_@1:TPrimitive = 2
[3] Const mutate x$8_@2:TObject = Object { a: read a$6_@0:TPrimitive, b: read b$7_@1:TPrimitive }
"]
bb0_instrs --> bb0_terminal(["Return freeze x$8_@2:TObject"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -66,48 +66,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate b$8_@0:TObject[1:11] = Object { }
[2] Const mutate x$9_@0:TObject[1:11] = read b$8_@0:TObject
"]
bb0_instrs --> bb0_terminal(["If (read a$7)"])
end
subgraph bb2
bb2_instrs["
[4] Const mutate y$10_@0:TObject[1:11] = Object { }
[5] Reassign mutate x$9_@0.y[1:11] = read y$10_@0:TObject
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb3
bb3_instrs["
[7] Const mutate z$11_@0:TObject[1:11] = Object { }
[8] Reassign mutate x$9_@0.z[1:11] = read z$11_@0:TObject
"]
bb3_instrs --> bb3_terminal(["Goto"])
end
subgraph bb1
bb1_instrs["
[10] Call mutate mutate$6:TFunction(mutate b$8_@0:TObject)
"]
bb1_instrs --> bb1_terminal(["Return freeze x$9_@0:TObject"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb3
bb0_terminal -- "fallthrough" --> bb1
bb2_terminal --> bb1
bb3_terminal --> bb1
```
## Code
```javascript
@@ -68,44 +68,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$6_@0:TObject[1:9] = Object { }
"]
bb0_instrs --> bb0_terminal(["If (read a$5)"])
end
subgraph bb2
bb2_instrs["
[3] Const mutate y$7_@1:TObject = Object { }
[4] Reassign mutate x$6_@0.y[1:9] = read y$7_@1:TObject
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb3
bb3_instrs["
[6] Const mutate z$8_@2:TObject = Object { }
[7] Reassign mutate x$6_@0.z[1:9] = read z$8_@2:TObject
"]
bb3_instrs --> bb3_terminal(["Goto"])
end
subgraph bb1
bb1_terminal(["Return freeze x$6_@0:TObject"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb3
bb0_terminal -- "fallthrough" --> bb1
bb2_terminal --> bb1
bb3_terminal --> bb1
```
## Code
```javascript
@@ -63,47 +63,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$7_@0:TObject[1:10] = Object { }
"]
bb0_instrs --> bb0_terminal(["If (read a$6)"])
end
subgraph bb2
bb2_instrs["
[3] Const mutate y$8_@0:TObject[1:10] = Object { }
[4] Reassign mutate x$7_@0.y[1:10] = read y$8_@0:TObject
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb3
bb3_instrs["
[6] Const mutate z$9_@0:TObject[1:10] = Object { }
[7] Reassign mutate x$7_@0.z[1:10] = read z$9_@0:TObject
"]
bb3_instrs --> bb3_terminal(["Goto"])
end
subgraph bb1
bb1_instrs["
[9] Call mutate mutate$5:TFunction(mutate x$7_@0:TObject)
"]
bb1_instrs --> bb1_terminal(["Return freeze x$7_@0:TObject"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb3
bb0_terminal -- "fallthrough" --> bb1
bb2_terminal --> bb1
bb3_terminal --> bb1
```
## Code
```javascript
@@ -67,45 +67,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$7_@0:TObject[1:10] = Object { }
"]
bb0_instrs --> bb0_terminal(["If (read a$6)"])
end
subgraph bb2
bb2_instrs["
[3] Const mutate y$8_@0:TObject[1:10] = Object { }
[4] Reassign mutate x$7_@0.y[1:10] = read y$8_@0:TObject
[5] Call mutate mutate$4:TFunction(mutate y$8_@0:TObject)
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb3
bb3_instrs["
[7] Const mutate z$9_@1:TObject = Object { }
[8] Reassign mutate x$7_@0.z[1:10] = read z$9_@1:TObject
"]
bb3_instrs --> bb3_terminal(["Goto"])
end
subgraph bb1
bb1_terminal(["Return freeze x$7_@0:TObject"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb3
bb0_terminal -- "fallthrough" --> bb1
bb2_terminal --> bb1
bb3_terminal --> bb1
```
## Code
```javascript
@@ -45,26 +45,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate a$5_@0:TObject[1:6] = Object { }
[2] Const mutate x$6_@0:TObject[1:6] = read a$5_@0:TObject
[3] Const mutate y$7_@0:TObject[1:6] = Object { }
[4] Reassign mutate y$7_@0.x[1:6] = read x$6_@0:TObject
[5] Call mutate mutate$4:TFunction(mutate a$5_@0:TObject)
"]
bb0_instrs --> bb0_terminal(["Return freeze y$7_@0:TObject"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -42,25 +42,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$4_@0 = Array []
[2] Const mutate y$5_@1:TObject[2:5] = Object { x: read x$4_@0 }
[3] Const mutate $6_@1[2:5] = Array []
[4] Call mutate y$5_@1.x.push(mutate $6_@1)
"]
bb0_instrs --> bb0_terminal(["Return freeze y$5_@1:TObject"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -40,25 +40,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$4_@0[1:5] = Array []
[2] Const mutate y$5_@0:TObject[1:5] = Object { }
[3] Reassign mutate y$5_@0.x[1:5] = read x$4_@0
[4] Call mutate mutate$3:TFunction(mutate x$4_@0)
"]
bb0_instrs --> bb0_terminal(["Return freeze y$5_@0:TObject"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -45,26 +45,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate a$5_@0:TObject[1:6] = Object { }
[2] Const mutate y$6_@0:TObject[1:6] = read a$5_@0:TObject
[3] Const mutate x$7_@0[1:6] = Array []
[4] Reassign mutate y$6_@0.x[1:6] = read x$7_@0
[5] Call mutate mutate$4:TFunction(mutate a$5_@0:TObject)
"]
bb0_instrs --> bb0_terminal(["Return freeze y$6_@0:TObject"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -40,25 +40,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$4_@0[1:5] = Array []
[2] Const mutate y$5_@0:TObject[1:5] = Object { }
[3] Reassign mutate y$5_@0.x[1:5] = read x$4_@0
[4] Call mutate mutate$3:TFunction(mutate y$5_@0:TObject)
"]
bb0_instrs --> bb0_terminal(["Return freeze y$5_@0:TObject"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -40,24 +40,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$3_@0 = Array []
[2] Const mutate y$4_@1:TObject[2:4] = Object { }
[3] Reassign mutate y$4_@1.x[2:4] = read x$3_@0
"]
bb0_instrs --> bb0_terminal(["Return freeze y$4_@1:TObject"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -46,25 +46,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$8_@0:TPrimitive = 0
[2] Const mutate x$9_@1 = read a$5
[3] Const mutate x$10_@2 = read b$6
[4] Const mutate x$11_@3 = read c$7
"]
bb0_instrs --> bb0_terminal(["Return read x$11_@3"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -49,36 +49,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Let mutate x$4_@0:TPrimitive[1:7] = 1
[2] Const mutate $5_@1:TPrimitive = 1
[3] Const mutate $6_@0:TPrimitive[1:7] = Binary read x$4_@0:TPrimitive === read $5_@1:TPrimitive
"]
bb0_instrs --> bb0_terminal(["If (read $6_@0:TPrimitive)"])
end
subgraph bb2
bb2_instrs["
[5] Reassign mutate x$4_@0:TPrimitive[1:7] = 2
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb1
bb1_terminal(["Return read x$4_@0:TPrimitive"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb1
bb2_terminal --> bb1
```
## Code
```javascript
@@ -35,19 +35,6 @@ function log(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -98,46 +85,6 @@ function Foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Let mutate str$6_@0:TPrimitive[1:8] = ''
"]
bb0_instrs --> bb0_terminal(["If (read cond$5)"])
end
subgraph bb2
bb2_instrs["
[3] Const mutate str$7_@1:TPrimitive = 'other test'
[4] Call mutate log$4:TFunction(read str$7_@1:TPrimitive)
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb3
bb3_instrs["
[6] Reassign mutate str$6_@0:TPrimitive[1:8] = 'fallthrough test'
"]
bb3_instrs --> bb3_terminal(["Goto"])
end
subgraph bb1
bb1_instrs["
[8] Call mutate log$4:TFunction(read str$6_@0:TPrimitive)
"]
bb1_instrs --> bb1_terminal(["Return"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb3
bb0_terminal -- "fallthrough" --> bb1
bb2_terminal --> bb1
bb3_terminal --> bb1
```
## Code
```javascript
@@ -117,91 +117,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$13_@0:TPrimitive = 0
[2] Const mutate $14_@1:TPrimitive = true
"]
bb0_instrs --> bb0_terminal(["If (read $14_@1:TPrimitive)"])
end
subgraph bb2
bb2_instrs["
[4] Const mutate $15_@2:TPrimitive = true
[5] Let mutate x$16_@3[5:10] = undefined
"]
bb2_instrs --> bb2_terminal(["If (read $15_@2:TPrimitive)"])
end
subgraph bb4
bb4_instrs["
[6] Reassign mutate x$16_@3[5:10] = read a$9
"]
bb4_instrs --> bb4_terminal(["Goto"])
end
subgraph bb5
bb5_instrs["
[8] Reassign mutate x$16_@3[5:10] = read b$10
"]
bb5_instrs --> bb5_terminal(["Goto"])
end
subgraph bb3
bb3_instrs["
[10] read x$16_@3
"]
bb3_instrs --> bb3_terminal(["Goto"])
end
subgraph bb6
bb6_instrs["
[12] Const mutate $19_@4:TPrimitive = true
[13] Let mutate x$20_@5[13:18] = undefined
"]
bb6_instrs --> bb6_terminal(["If (read $19_@4:TPrimitive)"])
end
subgraph bb8
bb8_instrs["
[14] Reassign mutate x$20_@5[13:18] = read c$11
"]
bb8_instrs --> bb8_terminal(["Goto"])
end
subgraph bb9
bb9_instrs["
[16] Reassign mutate x$20_@5[13:18] = read d$12
"]
bb9_instrs --> bb9_terminal(["Goto"])
end
subgraph bb7
bb7_instrs["
[18] read x$20_@5
"]
bb7_instrs --> bb7_terminal(["Goto"])
end
subgraph bb1
bb1_terminal(["Return"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb6
bb0_terminal -- "fallthrough" --> bb1
bb2_terminal -- "then" --> bb4
bb2_terminal -- "else" --> bb5
bb2_terminal -- "fallthrough" --> bb3
bb4_terminal --> bb3
bb5_terminal --> bb3
bb3_terminal --> bb1
bb6_terminal -- "then" --> bb8
bb6_terminal -- "else" --> bb9
bb6_terminal -- "fallthrough" --> bb7
bb8_terminal --> bb7
bb9_terminal --> bb7
bb7_terminal --> bb1
```
## Code
```javascript
@@ -68,48 +68,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate y$5_@0:TPrimitive = 2
[2] Const mutate $6_@1:TPrimitive = 1
[3] Const mutate $7_@2:TPrimitive = Binary read y$5_@0:TPrimitive > read $6_@1:TPrimitive
[4] Let mutate y$8_@3:TPrimitive[4:9] = undefined
"]
bb0_instrs --> bb0_terminal(["If (read $7_@2:TPrimitive)"])
end
subgraph bb2
bb2_instrs["
[5] Reassign mutate y$8_@3:TPrimitive[4:9] = 1
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb3
bb3_instrs["
[7] Reassign mutate y$8_@3:TPrimitive[4:9] = 2
"]
bb3_instrs --> bb3_terminal(["Goto"])
end
subgraph bb1
bb1_instrs["
[9] Const mutate x$11_@4 = read y$8_@3:TPrimitive
"]
bb1_instrs --> bb1_terminal(["Return"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb3
bb0_terminal -- "fallthrough" --> bb1
bb2_terminal --> bb1
bb3_terminal --> bb1
```
## Code
```javascript
@@ -31,23 +31,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$3_@0:TPrimitive = 1
[2] Const mutate y$4_@1:TPrimitive = 2
"]
bb0_instrs --> bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -47,35 +47,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$4_@0:TPrimitive = 1
[2] Const mutate y$5_@1:TPrimitive = 2
"]
bb0_instrs --> bb0_terminal(["If (read y$5_@1:TPrimitive)"])
end
subgraph bb2
bb2_instrs["
[4] Const mutate z$6_@2:TPrimitive = Binary read x$4_@0:TPrimitive + read y$5_@1:TPrimitive
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb1
bb1_terminal(["Return"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb1
bb2_terminal --> bb1
```
## Code
```javascript
@@ -111,61 +111,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$10_@0:TPrimitive = 1
[2] Const mutate $11_@1:TPrimitive = 2
[3] Const mutate $12_@2:TPrimitive = Binary read x$10_@0:TPrimitive === read $11_@1:TPrimitive
[4] Const mutate $13_@3:TPrimitive = 1
[5] Const mutate $14_@4:TPrimitive = Binary read x$10_@0:TPrimitive === read $13_@3:TPrimitive
[6] Let mutate x$16_@5:TPrimitive[6:16] = undefined
"]
bb0_instrs --> bb0_terminal(["Switch (read x$10_@0:TPrimitive)"])
end
subgraph bb5
bb5_instrs["
[7] Const mutate $15_@6:TPrimitive = 1
[8] Reassign mutate x$16_@5:TPrimitive[6:16] = Binary read x$10_@0:TPrimitive + read $15_@6:TPrimitive
"]
bb5_instrs --> bb5_terminal(["Goto"])
end
subgraph bb3
bb3_instrs["
[10] Const mutate $17_@7:TPrimitive = 2
[11] Reassign mutate x$16_@5:TPrimitive[6:16] = Binary read x$10_@0:TPrimitive + read $17_@7:TPrimitive
"]
bb3_instrs --> bb3_terminal(["Goto"])
end
subgraph bb2
bb2_instrs["
[13] Const mutate $19_@8:TPrimitive = 3
[14] Reassign mutate x$16_@5:TPrimitive[6:16] = Binary read x$10_@0:TPrimitive + read $19_@8:TPrimitive
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb1
bb1_instrs["
[16] Const mutate y$22_@9 = read x$16_@5:TPrimitive
"]
bb1_instrs --> bb1_terminal(["Return"])
end
%% Jumps
bb0_terminal -- "read $14_@4:TPrimitive" --> bb5
bb0_terminal -- "read $12_@2:TPrimitive" --> bb3
bb0_terminal -- "default" --> bb2
bb0_terminal -- "fallthrough" --> bb1
bb5_terminal --> bb1
bb3_terminal --> bb1
bb2_terminal --> bb1
```
## Code
```javascript
@@ -48,36 +48,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Let mutate x$4_@0:TPrimitive[1:7] = 1
[2] Const mutate $5_@1:TPrimitive = 1
[3] Const mutate $6_@0:TPrimitive[1:7] = Binary read x$4_@0:TPrimitive === read $5_@1:TPrimitive
"]
bb0_instrs --> bb0_terminal(["If (read $6_@0:TPrimitive)"])
end
subgraph bb2
bb2_instrs["
[5] Reassign mutate x$4_@0:TPrimitive[1:7] = 2
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb1
bb1_terminal(["Throw read x$4_@0:TPrimitive"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb1
bb2_terminal --> bb1
```
## Code
```javascript
@@ -61,45 +61,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$5_@0:TPrimitive = 1
"]
bb0_instrs --> bb0_terminal(["While"])
end
subgraph bb1
bb1_instrs["
[3] Const mutate $6_@1:TPrimitive[3:6] = 10
[4] Const mutate $8_@2:TPrimitive[4:6] = Binary read x$5_@0:TPrimitive < read $6_@1:TPrimitive
"]
bb1_instrs --> bb1_terminal(["If (read $8_@2:TPrimitive)"])
end
subgraph bb3
bb3_instrs["
[6] Const mutate $9_@3:TPrimitive = 1
[7] Binary read x$5_@0:TPrimitive + read $9_@3:TPrimitive
"]
bb3_instrs --> bb3_terminal(["Goto"])
end
subgraph bb2
bb2_terminal(["Return read x$5_@0:TPrimitive"])
end
%% Jumps
bb0_terminal -- "test" --> bb1
bb0_terminal -- "loop" --> bb3
bb0_terminal -- "fallthrough" --> bb2
bb1_terminal -- "then" --> bb3
bb1_terminal -- "else" --> bb2
bb3_terminal --> bb1
```
## Code
```javascript
@@ -56,45 +56,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Let mutate x$5_@0:TPrimitive[1:9] = 1
"]
bb0_instrs --> bb0_terminal(["While"])
end
subgraph bb1
bb1_instrs["
[3] Const mutate $6_@0:TPrimitive[1:9] = 10
[4] Const mutate $8_@0:TPrimitive[1:9] = Binary read x$5_@0:TPrimitive < read $6_@0:TPrimitive
"]
bb1_instrs --> bb1_terminal(["If (read $8_@0:TPrimitive)"])
end
subgraph bb3
bb3_instrs["
[6] Const mutate $9_@2:TPrimitive = 1
[7] Reassign mutate x$5_@0:TPrimitive[1:9] = Binary read x$5_@0:TPrimitive + read $9_@2:TPrimitive
"]
bb3_instrs --> bb3_terminal(["Goto"])
end
subgraph bb2
bb2_terminal(["Return read x$5_@0:TPrimitive"])
end
%% Jumps
bb0_terminal -- "test" --> bb1
bb0_terminal -- "loop" --> bb3
bb0_terminal -- "fallthrough" --> bb2
bb1_terminal -- "then" --> bb3
bb1_terminal -- "else" --> bb2
bb3_terminal --> bb1
```
## Code
```javascript
@@ -110,54 +110,6 @@ function Component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$10_@1:TFunction[1:12] = Array []
[2] Let mutate y$11_@1:TPrimitive[1:12] = undefined
[3] Const mutate $12_@2:TPrimitive = false
[4] Const mutate $13_@3:TPrimitive = true
[5] Const mutate $14_@4:TPrimitive = 1
"]
bb0_instrs --> bb0_terminal(["Switch (read props$9.p0)"])
end
subgraph bb6
bb6_instrs["
[7] Call mutate x$10_@1.push(read props$9.p2)
[8] Reassign mutate y$11_@1:TPrimitive[1:12] = Array []
"]
bb6_instrs --> bb6_terminal(["Goto"])
end
subgraph bb2
bb2_instrs["
[10] Reassign mutate y$11_@1:TPrimitive[1:12] = read x$10_@1:TFunction
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb1
bb1_instrs["
[12] Const mutate child$19_@5 = JSX <read Component$0 data={freeze x$10_@1:TFunction} ></read Component$0>
[13] Call read y$11_@1.push(read props$9.p4)
[14] Const mutate $22_@6 = JSX <read Component$0 data={freeze y$11_@1:TPrimitive} >{read child$19_@5}</read Component$0>
"]
bb1_instrs --> bb1_terminal(["Return read $22_@6"])
end
%% Jumps
bb0_terminal -- "read $14_@4:TPrimitive" --> bb1
bb0_terminal -- "read $13_@3:TPrimitive" --> bb6
bb0_terminal -- "default" --> bb1
bb0_terminal -- "read $12_@2:TPrimitive" --> bb2
bb0_terminal -- "fallthrough" --> bb1
bb6_terminal --> bb1
bb2_terminal --> bb1
```
## Code
```javascript
@@ -125,81 +125,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate y$10_@0:TPrimitive = undefined
[2] Const mutate $11_@1:TPrimitive = 5
[3] Const mutate $12_@2:TPrimitive = 4
[4] Const mutate $13_@3:TPrimitive = 3
[5] Const mutate $14_@4:TPrimitive = 2
[6] Const mutate $15_@5:TPrimitive = 1
[7] Const mutate $16_@6:TPrimitive = 0
"]
bb0_instrs --> bb0_terminal(["Switch (read x$9)"])
end
subgraph bb10
bb10_instrs["
[9] Const mutate y$17_@7:TPrimitive = 0
"]
bb10_instrs --> bb10_terminal(["Goto"])
end
subgraph bb9
bb9_instrs["
[11] Const mutate y$18_@8:TPrimitive = 1
"]
bb9_instrs --> bb9_terminal(["Goto"])
end
subgraph bb5
bb5_instrs["
[13] Const mutate y$19_@9:TPrimitive = 3
"]
bb5_instrs --> bb5_terminal(["Goto"])
end
subgraph bb4
bb4_instrs["
[15] Const mutate y$20_@10:TPrimitive = 4
"]
bb4_instrs --> bb4_terminal(["Goto"])
end
subgraph bb3
bb3_instrs["
[17] Const mutate y$21_@11:TPrimitive = 5
"]
bb3_instrs --> bb3_terminal(["Goto"])
end
subgraph bb2
bb2_instrs["
[19] Const mutate y$22_@12:TPrimitive = 0
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb1
bb1_terminal(["Return"])
end
%% Jumps
bb0_terminal -- "read $16_@6:TPrimitive" --> bb10
bb0_terminal -- "read $15_@5:TPrimitive" --> bb9
bb0_terminal -- "read $14_@4:TPrimitive" --> bb1
bb0_terminal -- "read $13_@3:TPrimitive" --> bb5
bb0_terminal -- "read $12_@2:TPrimitive" --> bb4
bb0_terminal -- "read $11_@1:TPrimitive" --> bb3
bb0_terminal -- "default" --> bb2
bb0_terminal -- "fallthrough" --> bb1
bb10_terminal --> bb9
bb9_terminal --> bb1
bb5_terminal --> bb1
bb4_terminal --> bb3
bb3_terminal --> bb2
bb2_terminal --> bb1
```
## Code
```javascript
@@ -100,53 +100,6 @@ function Component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$9_@1:TFunction[1:12] = Array []
[2] Let mutate y$10_@1:TPrimitive[1:12] = undefined
[3] Const mutate $11_@2:TPrimitive = false
[4] Const mutate $12_@3:TPrimitive = true
"]
bb0_instrs --> bb0_terminal(["Switch (read props$8.p0)"])
end
subgraph bb4
bb4_instrs["
[6] Call mutate x$9_@1.push(read props$8.p2)
[7] Call mutate x$9_@1.push(read props$8.p3)
[8] Const mutate y$13_@4 = Array []
"]
bb4_instrs --> bb4_terminal(["Goto"])
end
subgraph bb2
bb2_instrs["
[10] Reassign mutate y$10_@1:TPrimitive[1:12] = read x$9_@1:TFunction
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb1
bb1_instrs["
[12] Const mutate child$19_@5 = JSX <read Component$0 data={freeze x$9_@1:TFunction} ></read Component$0>
[13] Call read y$10_@1.push(read props$8.p4)
[14] Const mutate $23_@6 = JSX <read Component$0 data={read y$10_@1:TPrimitive} >{read child$19_@5}</read Component$0>
"]
bb1_instrs --> bb1_terminal(["Return read $23_@6"])
end
%% Jumps
bb0_terminal -- "read $12_@3:TPrimitive" --> bb4
bb0_terminal -- "read $11_@2:TPrimitive" --> bb2
bb0_terminal -- "default" --> bb1
bb0_terminal -- "fallthrough" --> bb1
bb4_terminal --> bb2
bb2_terminal --> bb1
```
## Code
```javascript
@@ -53,29 +53,6 @@ function component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$6_@0:TObject[1:9] = Object { }
[2] Const mutate p$7_@0:TObject[1:9] = Object { }
[3] Const mutate q$8_@0:TObject[1:9] = Object { }
[4] Const mutate y$9_@0:TObject[1:9] = Object { }
[5] Reassign mutate x$6_@0.y[1:9] = read y$9_@0:TObject
[6] Reassign mutate p$7_@0.y[1:9] = read x$6_@0.y
[7] Reassign mutate q$8_@0.y[1:9] = read p$7_@0.y
[8] Call mutate mutate$5:TFunction(mutate q$8_@0:TObject)
"]
bb0_instrs --> bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -46,34 +46,6 @@ function component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate $7_@0:TPrimitive = Binary read a$5:TPrimitive > read b$6:TPrimitive
"]
bb0_instrs --> bb0_terminal(["If (read $7_@0:TPrimitive)"])
end
subgraph bb2
bb2_instrs["
[3] Const mutate m$8_@1:TObject = Object { }
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb1
bb1_terminal(["Return"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb1
bb2_terminal --> bb1
```
## Code
```javascript
@@ -54,36 +54,6 @@ function component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate a$7_@0:TPrimitive = Call mutate some$2:TFunction()
[2] Const mutate b$8_@1:TPrimitive = Call mutate someOther$4:TFunction()
[3] Const mutate $9_@2:TPrimitive = Binary read a$7_@0:TPrimitive > read b$8_@1:TPrimitive
"]
bb0_instrs --> bb0_terminal(["If (read $9_@2:TPrimitive)"])
end
subgraph bb2
bb2_instrs["
[5] Const mutate m$10_@3:TObject = Object { }
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb1
bb1_terminal(["Return"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb1
bb2_terminal --> bb1
```
## Code
```javascript
@@ -38,24 +38,6 @@ function component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate $4_@0:TPrimitive = 1
[2] Const mutate x$5_@1:TObject = Object { t: read $4_@0:TPrimitive }
[3] Const mutate p$6_@2:TPrimitive = read x$5_@1.t
"]
bb0_instrs --> bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -73,36 +73,6 @@ function component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate $10_@0:TPrimitive = Call mutate makeSomePrimitive$2:TFunction()
[2] Const mutate $11_@1:TPrimitive = Call mutate makeSomePrimitive$2:TFunction()
[3] Const mutate x$12_@2:TObject = Object { u: read $10_@0:TPrimitive, v: read $11_@1:TPrimitive }
[4] Const mutate u$13_@3:TPrimitive = read x$12_@2.u
[5] Const mutate v$14_@4:TPrimitive = read x$12_@2.v
[6] Const mutate $15_@5:TPrimitive = Binary read u$13_@3:TPrimitive > read v$14_@4:TPrimitive
"]
bb0_instrs --> bb0_terminal(["If (read $15_@5:TPrimitive)"])
end
subgraph bb1
bb1_instrs["
[8] Const mutate y$16_@6:TPrimitive = read x$12_@2.u
[9] Const mutate z$17_@7:TPrimitive = read x$12_@2.v
"]
bb1_instrs --> bb1_terminal(["Return"])
end
%% Jumps
bb0_terminal -- "then" --> bb1
bb0_terminal -- "else" --> bb1
```
## Code
```javascript
@@ -44,25 +44,6 @@ function component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$4_@0:TObject[1:4] = Object { }
[2] Const mutate q$5_@1:TObject = Object { }
[3] Reassign mutate x$4_@0.t[1:4] = read q$5_@1:TObject
[4] Const mutate z$6_@2:TObject = read x$4_@0.t
"]
bb0_instrs --> bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -62,29 +62,6 @@ function component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate p$7_@0:TPrimitive = Call mutate makePrimitive$2:TFunction()
[2] Binary read p$7_@0:TPrimitive + read p$7_@0:TPrimitive
[3] Const mutate o$8_@1:TObject = Object { }
[4] Const mutate x$9_@2:TObject[4:8] = Object { }
[5] Reassign mutate x$9_@2.t[4:8] = read p$7_@0:TPrimitive
[6] Const mutate z$10_@2:TPrimitive[4:8] = read x$9_@2.t
[7] Reassign mutate x$9_@2.t[4:8] = read o$8_@1:TObject
[8] Const mutate y$11_@3:TPoly = read x$9_@2.t
"]
bb0_instrs --> bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -31,23 +31,6 @@ function component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$3_@0:TPrimitive = 1
[2] Const mutate y$4_@1:TPrimitive = 2
"]
bb0_instrs --> bb0_terminal(["Return"])
end
%% Jumps
%% empty
```
## Code
```javascript
@@ -60,39 +60,6 @@ function component(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_instrs["
[1] Const mutate x$7_@0:TPrimitive = Call mutate foo$2:TFunction()
[2] Const mutate y$8_@1:TPrimitive = Call mutate foo$2:TFunction()
[3] Const mutate $9_@2:TPrimitive = Binary read x$7_@0:TPrimitive > read y$8_@1:TPrimitive
"]
bb0_instrs --> bb0_terminal(["If (read $9_@2:TPrimitive)"])
end
subgraph bb2
bb2_instrs["
[5] Const mutate z$10_@3:TObject = Object { }
"]
bb2_instrs --> bb2_terminal(["Goto"])
end
subgraph bb1
bb1_instrs["
[7] Const mutate z$12_@4:TPrimitive = Call mutate foo$2:TFunction()
"]
bb1_instrs --> bb1_terminal(["Return"])
end
%% Jumps
bb0_terminal -- "then" --> bb2
bb0_terminal -- "else" --> bb1
bb2_terminal --> bb1
```
## Code
```javascript
@@ -42,30 +42,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["While"])
end
subgraph bb1
bb1_terminal(["If (read a$3)"])
end
subgraph bb2
bb2_terminal(["Return read b$4"])
end
%% Jumps
bb0_terminal -- "test" --> bb1
bb0_terminal -- "loop" --> bb2
bb0_terminal -- "fallthrough" --> bb2
bb1_terminal -- "then" --> bb2
bb1_terminal -- "else" --> bb2
```
## Code
```javascript
@@ -63,49 +63,6 @@ function foo(
```
### CFG
```mermaid
flowchart TB
%% Basic Blocks
subgraph bb0
bb0_terminal(["While"])
end
subgraph bb1
bb1_terminal(["If (read a$5)"])
end
subgraph bb3
bb3_terminal(["If (read b$6)"])
end
subgraph bb5
bb5_terminal(["Goto"])
end
subgraph bb4
bb4_instrs["
[5] Call read c$7:TFunction()
"]
bb4_instrs --> bb4_terminal(["Goto"])
end
subgraph bb2
bb2_instrs["
[7] Call read d$8:TFunction()
"]
bb2_instrs --> bb2_terminal(["Return"])
end
%% Jumps
bb0_terminal -- "test" --> bb1
bb0_terminal -- "loop" --> bb3
bb0_terminal -- "fallthrough" --> bb2
bb1_terminal -- "then" --> bb3
bb1_terminal -- "else" --> bb2
bb3_terminal -- "then" --> bb5
bb3_terminal -- "else" --> bb4
bb5_terminal --> bb1
bb4_terminal --> bb1
```
## Code
```javascript
+2 -9
View File
@@ -19,7 +19,6 @@ import { toggleLogging } from "../HIR/logger";
import run from "../HIR/Pipeline";
import { printFunction } from "../HIR/PrintHIR";
import { printReactiveFunction } from "../HIR/PrintReactiveFunction";
import visualizeHIRMermaid from "../HIR/VisualizeHIRMermaid";
import generateTestsFromFixtures from "./test-utils/generateTestsFromFixtures";
function wrapWithTripleBackticks(s: string, ext?: string) {
@@ -104,7 +103,7 @@ ${wrapWithTripleBackticks(error.message)}
}
function formatOutput(items: Array<TestOutput>): Array<string> {
return items.map(({ ir, js, mermaid, scopes }) => {
return items.map(({ ir, js, scopes }) => {
return `
## HIR
@@ -114,10 +113,6 @@ ${wrapWithTripleBackticks(ir)}
${wrapWithTripleBackticks(scopes)}
### CFG
${wrapWithTripleBackticks(mermaid, "mermaid")}
## Code
${wrapWithTripleBackticks(js, "javascript")}
@@ -128,7 +123,6 @@ ${wrapWithTripleBackticks(js, "javascript")}
type TestOutput = {
ir: string;
js: string;
mermaid: string;
scopes: string;
};
@@ -157,14 +151,13 @@ function transform(text: string, file: string): Array<TestOutput> {
const scopes = printReactiveFunction(reactiveFunction);
const textHIR = printFunction(ir);
const mermaid = visualizeHIRMermaid(ir);
invariant(ast !== null, "ast is null when codegen option is enabled");
const text = prettier.format(generate(ast).code.replace("\n\n", "\n"), {
semi: true,
parser: "babel-ts",
});
items.push({ ir: textHIR, js: text, scopes, mermaid });
items.push({ ir: textHIR, js: text, scopes });
},
},
});