mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
[hir] Add id to number Instruction
This commit is contained in:
@@ -582,6 +582,7 @@ function lowerStatement(
|
||||
};
|
||||
}
|
||||
builder.push({
|
||||
id: 0,
|
||||
lvalue: { place: id, kind },
|
||||
value,
|
||||
loc: declaration.node.loc ?? GeneratedSource,
|
||||
@@ -598,6 +599,7 @@ function lowerStatement(
|
||||
return;
|
||||
}
|
||||
builder.push({
|
||||
id: 0,
|
||||
lvalue: null,
|
||||
value,
|
||||
loc: stmt.node.loc ?? GeneratedSource,
|
||||
@@ -636,6 +638,7 @@ function lowerStatement(
|
||||
case "TSTypeAliasDeclaration":
|
||||
case "WithStatement": {
|
||||
builder.push({
|
||||
id: 0,
|
||||
lvalue: null,
|
||||
loc: stmtPath.node.loc ?? GeneratedSource,
|
||||
value: {
|
||||
@@ -835,6 +838,7 @@ function lowerExpression(
|
||||
loc: left.loc,
|
||||
};
|
||||
builder.push({
|
||||
id: 0,
|
||||
value: {
|
||||
kind: "Primitive",
|
||||
value: null,
|
||||
@@ -852,6 +856,7 @@ function lowerExpression(
|
||||
loc: left.loc,
|
||||
};
|
||||
builder.push({
|
||||
id: 0,
|
||||
lvalue: {
|
||||
place: { ...condPlace },
|
||||
kind: InstructionKind.Const,
|
||||
@@ -888,6 +893,7 @@ function lowerExpression(
|
||||
const operator = expr.node.operator;
|
||||
todoInvariant(operator === "=", "todo: support non-simple assignment");
|
||||
builder.push({
|
||||
id: 0,
|
||||
lvalue: { place: left, kind: InstructionKind.Reassign },
|
||||
value: right,
|
||||
loc: exprLoc,
|
||||
@@ -981,6 +987,7 @@ function lowerConditional(
|
||||
const consequentBlock = builder.enter((blockId) => {
|
||||
let value = consequent();
|
||||
builder.push({
|
||||
id: 0,
|
||||
value,
|
||||
lvalue: { place: { ...place }, kind: InstructionKind.Const },
|
||||
loc: value.loc,
|
||||
@@ -994,6 +1001,7 @@ function lowerConditional(
|
||||
const alternateBlock = builder.enter((blockId) => {
|
||||
let value = alternate();
|
||||
builder.push({
|
||||
id: 0,
|
||||
value,
|
||||
lvalue: { place: { ...place }, kind: InstructionKind.Const },
|
||||
loc: value.loc,
|
||||
@@ -1049,6 +1057,7 @@ function lowerJsxElementName(
|
||||
loc: exprLoc,
|
||||
};
|
||||
builder.push({
|
||||
id: 0,
|
||||
value: {
|
||||
kind: "Primitive",
|
||||
value: tag,
|
||||
@@ -1088,6 +1097,7 @@ function lowerJsxElement(
|
||||
loc: exprLoc,
|
||||
};
|
||||
builder.push({
|
||||
id: 0,
|
||||
value: {
|
||||
kind: "JSXText",
|
||||
value: exprPath.node.value,
|
||||
@@ -1110,6 +1120,7 @@ function lowerJsxElement(
|
||||
loc: exprLoc,
|
||||
};
|
||||
builder.push({
|
||||
id: 0,
|
||||
value: {
|
||||
kind: "OtherStatement",
|
||||
node: exprNode,
|
||||
@@ -1139,6 +1150,7 @@ function lowerExpressionToPlace(
|
||||
loc: exprLoc,
|
||||
};
|
||||
builder.push({
|
||||
id: 0,
|
||||
value: instr,
|
||||
loc: exprLoc,
|
||||
lvalue: { place: { ...place }, kind: InstructionKind.Const },
|
||||
|
||||
@@ -149,6 +149,7 @@ export type SwitchTerminal = {
|
||||
* or may occur only for side-effects (many expression statements).
|
||||
*/
|
||||
export type Instruction = {
|
||||
id: number;
|
||||
lvalue: LValue | null;
|
||||
value: InstructionValue;
|
||||
loc: SourceLocation;
|
||||
|
||||
@@ -18,6 +18,7 @@ import {
|
||||
makeBlockId,
|
||||
Terminal,
|
||||
} from "./HIR";
|
||||
import { printInstruction } from "./PrintHIR";
|
||||
|
||||
// *******************************************************************************************
|
||||
// *******************************************************************************************
|
||||
@@ -147,6 +148,7 @@ export default class HIRBuilder {
|
||||
});
|
||||
// then convert to reverse postorder
|
||||
const blocks = reversePostorderBlocks(reduced);
|
||||
markInstructionIds(blocks);
|
||||
markPredecessors(blocks);
|
||||
return blocks;
|
||||
}
|
||||
@@ -483,6 +485,16 @@ function reversePostorderBlocks(func: HIR): HIR {
|
||||
};
|
||||
}
|
||||
|
||||
function markInstructionIds(func: HIR) {
|
||||
let id = 0;
|
||||
for (const [_, block] of func.blocks) {
|
||||
for (const instr of block.instructions) {
|
||||
invariant(instr.id === 0, `${printInstruction(instr)} already visited!`);
|
||||
instr.id = ++id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function markPredecessors(func: HIR) {
|
||||
const visited: Set<BlockId> = new Set();
|
||||
function visit(blockId: BlockId, prevBlock?: BasicBlock) {
|
||||
|
||||
@@ -82,13 +82,14 @@ export function printMixedHIR(
|
||||
}
|
||||
}
|
||||
|
||||
function printInstruction(instr: Instruction): string {
|
||||
export function printInstruction(instr: Instruction): string {
|
||||
const id = `[${instr.id}]`;
|
||||
const value = printInstructionValue(instr.value);
|
||||
|
||||
if (instr.lvalue !== null) {
|
||||
return `${printLValue(instr.lvalue)} = ${value}`;
|
||||
return `${id} ${printLValue(instr.lvalue)} = ${value}`;
|
||||
} else {
|
||||
return value;
|
||||
return `${id} ${value}`;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -34,14 +34,14 @@ function foo$0() {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Const mutate a$10 = Array []
|
||||
Const mutate b$11 = Object { }
|
||||
Call mutate foo$4(mutate a$10, mutate b$11)
|
||||
Const mutate $12 = "div"
|
||||
Let mutate _$13 = JSX <read $12 a={freeze a$10} ></read $12>
|
||||
Call mutate foo$4(mutate b$11)
|
||||
Const mutate $14 = "div"
|
||||
Const mutate $15 = JSX <read $14 a={read a$10} b={freeze b$11} ></read $14>
|
||||
[1] Const mutate a$10 = Array []
|
||||
[2] Const mutate b$11 = Object { }
|
||||
[3] Call mutate foo$4(mutate a$10, mutate b$11)
|
||||
[4] Const mutate $12 = "div"
|
||||
[5] Let mutate _$13 = JSX <read $12 a={freeze a$10} ></read $12>
|
||||
[6] Call mutate foo$4(mutate b$11)
|
||||
[7] Const mutate $14 = "div"
|
||||
[8] Const mutate $15 = JSX <read $14 a={read a$10} b={freeze b$11} ></read $14>
|
||||
Return read $15
|
||||
```
|
||||
|
||||
|
||||
@@ -35,12 +35,12 @@ function Component(props) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Const mutate items$27 = read props$26.items
|
||||
Const mutate maxItems$28 = read props$26.maxItems
|
||||
Const mutate renderedItems$29 = Array []
|
||||
Const mutate seen$30 = New mutate Set$6()
|
||||
Const mutate $31 = 0
|
||||
Const mutate max$32 = Call mutate Math$8.max(read $31, read maxItems$28)
|
||||
[1] Const mutate items$27 = read props$26.items
|
||||
[2] Const mutate maxItems$28 = read props$26.maxItems
|
||||
[3] Const mutate renderedItems$29 = Array []
|
||||
[4] Const mutate seen$30 = New mutate Set$6()
|
||||
[5] Const mutate $31 = 0
|
||||
[6] Const mutate max$32 = Call mutate Math$8.max(read $31, read maxItems$28)
|
||||
Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb0 bb4 bb7
|
||||
@@ -52,16 +52,16 @@ bb1:
|
||||
If (read items$33) then:bb3 else:bb2
|
||||
bb3:
|
||||
predecessor blocks: bb1
|
||||
Const mutate $34 = null
|
||||
Const mutate $36 = Binary read item$35 == read $34
|
||||
[7] Const mutate $34 = null
|
||||
[8] Const mutate $36 = Binary read item$35 == read $34
|
||||
If (read $36) then:bb8 else:bb9
|
||||
bb8:
|
||||
predecessor blocks: bb3
|
||||
Const mutate $37 = read $36
|
||||
[9] Const mutate $37 = read $36
|
||||
Goto bb7
|
||||
bb9:
|
||||
predecessor blocks: bb3
|
||||
Const mutate $39 = Call mutate seen$38.has(mutate item$35)
|
||||
[10] Const mutate $39 = Call mutate seen$38.has(mutate item$35)
|
||||
Goto bb7
|
||||
bb7:
|
||||
predecessor blocks: bb9 bb8
|
||||
@@ -69,23 +69,23 @@ bb7:
|
||||
If (read $40) then:bb1 else:bb4
|
||||
bb4:
|
||||
predecessor blocks: bb7
|
||||
Call mutate seen$38.add(mutate item$35)
|
||||
Const mutate $43 = "div"
|
||||
Const mutate $44 = JSX <read $43>{read item$35}</read $43>
|
||||
Call mutate renderedItems$46.push(read $44)
|
||||
Const mutate $49 = Binary read renderedItems$46.length >= read max$48
|
||||
[11] Call mutate seen$38.add(mutate item$35)
|
||||
[12] Const mutate $43 = "div"
|
||||
[13] Const mutate $44 = JSX <read $43>{read item$35}</read $43>
|
||||
[14] Call mutate renderedItems$46.push(read $44)
|
||||
[15] Const mutate $49 = Binary read renderedItems$46.length >= read max$48
|
||||
If (read $49) then:bb2 else:bb1
|
||||
bb2:
|
||||
predecessor blocks: bb1 bb4
|
||||
Const mutate count$52 = read renderedItems$46.length
|
||||
Const mutate $53 = "div"
|
||||
Const mutate $54 = "\n "
|
||||
Const mutate $55 = "h1"
|
||||
Const mutate $56 = " Items"
|
||||
Const mutate $57 = JSX <read $55>{freeze count$52}{read $56}</read $55>
|
||||
Const mutate $58 = "\n "
|
||||
Const mutate $59 = "\n "
|
||||
Const mutate $60 = JSX <read $53>{read $54}{read $57}{read $58}{freeze renderedItems$46}{read $59}</read $53>
|
||||
[16] Const mutate count$52 = read renderedItems$46.length
|
||||
[17] Const mutate $53 = "div"
|
||||
[18] Const mutate $54 = "\n "
|
||||
[19] Const mutate $55 = "h1"
|
||||
[20] Const mutate $56 = " Items"
|
||||
[21] Const mutate $57 = JSX <read $55>{freeze count$52}{read $56}</read $55>
|
||||
[22] Const mutate $58 = "\n "
|
||||
[23] Const mutate $59 = "\n "
|
||||
[24] Const mutate $60 = JSX <read $53>{read $54}{read $57}{read $58}{freeze renderedItems$46}{read $59}</read $53>
|
||||
Return read $60
|
||||
```
|
||||
|
||||
|
||||
@@ -78,16 +78,16 @@ function Component(props) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Const mutate a_DEBUG$5 = Array []
|
||||
Call mutate a_DEBUG$5.push(read props$4.a)
|
||||
[1] Const mutate a_DEBUG$5 = Array []
|
||||
[2] Call mutate a_DEBUG$5.push(read props$4.a)
|
||||
If (read props$4.b) then:bb2 else:bb1
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
Const mutate $6 = null
|
||||
[3] Const mutate $6 = null
|
||||
Return read $6
|
||||
bb1:
|
||||
predecessor blocks: bb0
|
||||
Call mutate a_DEBUG$5.push(read props$4.d)
|
||||
[4] Call mutate a_DEBUG$5.push(read props$4.d)
|
||||
Return freeze a_DEBUG$5
|
||||
```
|
||||
|
||||
@@ -110,16 +110,16 @@ function Component$0(props$4) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Const mutate a$4 = Array []
|
||||
Call mutate a$4.push(read props$3.a)
|
||||
[1] Const mutate a$4 = Array []
|
||||
[2] Call mutate a$4.push(read props$3.a)
|
||||
If (read props$3.b) then:bb2 else:bb1
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
Call mutate a$4.push(read props$3.c)
|
||||
[3] Call mutate a$4.push(read props$3.c)
|
||||
Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb0 bb2
|
||||
Call mutate a$4.push(read props$3.d)
|
||||
[4] Call mutate a$4.push(read props$3.d)
|
||||
Return freeze a$4
|
||||
```
|
||||
|
||||
@@ -143,17 +143,17 @@ function Component$0(props$3) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Const mutate a$5 = Array []
|
||||
Call mutate a$5.push(read props$4.a)
|
||||
[1] Const mutate a$5 = Array []
|
||||
[2] Call mutate a$5.push(read props$4.a)
|
||||
If (read props$4.b) then:bb2 else:bb1
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
Call mutate a$5.push(read props$4.c)
|
||||
Const mutate $6 = null
|
||||
[3] Call mutate a$5.push(read props$4.c)
|
||||
[4] Const mutate $6 = null
|
||||
Return read $6
|
||||
bb1:
|
||||
predecessor blocks: bb0
|
||||
Call mutate a$5.push(read props$4.d)
|
||||
[5] Call mutate a$5.push(read props$4.d)
|
||||
Return freeze a$5
|
||||
```
|
||||
|
||||
@@ -177,16 +177,16 @@ function Component$0(props$4) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Const mutate a$4 = Array []
|
||||
Call mutate a$4.push(read props$3.a)
|
||||
[1] Const mutate a$4 = Array []
|
||||
[2] Call mutate a$4.push(read props$3.a)
|
||||
If (read props$3.b) then:bb2 else:bb1
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
Call mutate a$4.push(read props$3.c)
|
||||
[3] Call mutate a$4.push(read props$3.c)
|
||||
Return freeze a$4
|
||||
bb1:
|
||||
predecessor blocks: bb0
|
||||
Call mutate a$4.push(read props$3.d)
|
||||
[4] Call mutate a$4.push(read props$3.d)
|
||||
Return freeze a$4
|
||||
```
|
||||
|
||||
@@ -210,16 +210,16 @@ function Component$0(props$3) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Const mutate a$4 = Array []
|
||||
Call mutate a$4.push(read props$3.a)
|
||||
[1] Const mutate a$4 = Array []
|
||||
[2] Call mutate a$4.push(read props$3.a)
|
||||
If (read props$3.b) then:bb1 else:bb2
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
Call mutate a$4.push(read props$3.c)
|
||||
[3] Call mutate a$4.push(read props$3.c)
|
||||
Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb2 bb0
|
||||
Call mutate a$4.push(read props$3.d)
|
||||
[4] Call mutate a$4.push(read props$3.d)
|
||||
Return freeze a$4
|
||||
```
|
||||
|
||||
|
||||
@@ -67,23 +67,23 @@ function mayMutate() {}
|
||||
|
||||
```
|
||||
bb0:
|
||||
Const mutate a$7 = Array []
|
||||
Const mutate b$8 = Array []
|
||||
[1] Const mutate a$7 = Array []
|
||||
[2] Const mutate b$8 = Array []
|
||||
If (read b$8) then:bb2 else:bb1
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
Call mutate a$7.push(read props$6.p0)
|
||||
[3] Call mutate a$7.push(read props$6.p0)
|
||||
Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb0 bb2
|
||||
If (read props$6.p1) then:bb4 else:bb3
|
||||
bb4:
|
||||
predecessor blocks: bb1
|
||||
Call mutate b$8.push(read props$6.p2)
|
||||
[4] Call mutate b$8.push(read props$6.p2)
|
||||
Goto bb3
|
||||
bb3:
|
||||
predecessor blocks: bb1 bb4
|
||||
Const mutate $16 = JSX <read Foo$4 a={freeze a$7} b={freeze b$8} ></read Foo$4>
|
||||
[5] Const mutate $16 = JSX <read Foo$4 a={freeze a$7} b={freeze b$8} ></read Foo$4>
|
||||
Return read $16
|
||||
```
|
||||
|
||||
@@ -111,24 +111,24 @@ function Component$0(props$6) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Const mutate a$9 = Array []
|
||||
Const mutate b$10 = Array []
|
||||
Const mutate $11 = Call mutate mayMutate$4(mutate b$10)
|
||||
[1] Const mutate a$9 = Array []
|
||||
[2] Const mutate b$10 = Array []
|
||||
[3] Const mutate $11 = Call mutate mayMutate$4(mutate b$10)
|
||||
If (read $11) then:bb2 else:bb1
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
Call mutate a$9.push(read props$8.p0)
|
||||
[4] Call mutate a$9.push(read props$8.p0)
|
||||
Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb0 bb2
|
||||
If (read props$8.p1) then:bb4 else:bb3
|
||||
bb4:
|
||||
predecessor blocks: bb1
|
||||
Call mutate b$10.push(read props$8.p2)
|
||||
[5] Call mutate b$10.push(read props$8.p2)
|
||||
Goto bb3
|
||||
bb3:
|
||||
predecessor blocks: bb1 bb4
|
||||
Const mutate $19 = JSX <read Foo$6 a={freeze a$9} b={freeze b$10} ></read Foo$6>
|
||||
[6] Const mutate $19 = JSX <read Foo$6 a={freeze a$9} b={freeze b$10} ></read Foo$6>
|
||||
Return read $19
|
||||
```
|
||||
|
||||
|
||||
@@ -34,14 +34,14 @@ function Foo$0() {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Const mutate a$10 = Array []
|
||||
Const mutate b$11 = Object { }
|
||||
New mutate Foo$4(mutate a$10, mutate b$11)
|
||||
Const mutate $12 = "div"
|
||||
Let mutate _$13 = JSX <read $12 a={freeze a$10} ></read $12>
|
||||
New mutate Foo$4(mutate b$11)
|
||||
Const mutate $14 = "div"
|
||||
Const mutate $15 = JSX <read $14 a={read a$10} b={freeze b$11} ></read $14>
|
||||
[1] Const mutate a$10 = Array []
|
||||
[2] Const mutate b$11 = Object { }
|
||||
[3] New mutate Foo$4(mutate a$10, mutate b$11)
|
||||
[4] Const mutate $12 = "div"
|
||||
[5] Let mutate _$13 = JSX <read $12 a={freeze a$10} ></read $12>
|
||||
[6] New mutate Foo$4(mutate b$11)
|
||||
[7] Const mutate $14 = "div"
|
||||
[8] Const mutate $15 = JSX <read $14 a={read a$10} b={freeze b$11} ></read $14>
|
||||
Return read $15
|
||||
```
|
||||
|
||||
|
||||
@@ -18,10 +18,10 @@ function foo(x) {}
|
||||
|
||||
```
|
||||
bb0:
|
||||
Const mutate a$5 = Array []
|
||||
Const mutate b$6 = read a$5
|
||||
Call read useFreeze$3(freeze a$5)
|
||||
Call mutate foo$4(read b$6)
|
||||
[1] Const mutate a$5 = Array []
|
||||
[2] Const mutate b$6 = read a$5
|
||||
[3] Call read useFreeze$3(freeze a$5)
|
||||
[4] Call mutate foo$4(read b$6)
|
||||
Return
|
||||
```
|
||||
|
||||
|
||||
@@ -53,13 +53,13 @@ function foo$0() {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Const mutate x$11 = Array []
|
||||
Const mutate y$12 = Call read useFreeze$4(freeze x$11)
|
||||
Call mutate foo$5(read y$12, read x$11)
|
||||
Const mutate $13 = "\n "
|
||||
Const mutate $14 = "\n "
|
||||
Const mutate $15 = "\n "
|
||||
Const mutate $16 = JSX <read Component$0>{read $13}{read x$11}{read $14}{read y$12}{read $15}</read Component$0>
|
||||
[1] Const mutate x$11 = Array []
|
||||
[2] Const mutate y$12 = Call read useFreeze$4(freeze x$11)
|
||||
[3] Call mutate foo$5(read y$12, read x$11)
|
||||
[4] Const mutate $13 = "\n "
|
||||
[5] Const mutate $14 = "\n "
|
||||
[6] Const mutate $15 = "\n "
|
||||
[7] Const mutate $16 = JSX <read Component$0>{read $13}{read x$11}{read $14}{read y$12}{read $15}</read Component$0>
|
||||
Return read $16
|
||||
```
|
||||
|
||||
|
||||
@@ -19,10 +19,10 @@ function call(x) {}
|
||||
|
||||
```
|
||||
bb0:
|
||||
Const mutate a$4 = Array []
|
||||
Call read useFreeze$2(freeze a$4)
|
||||
Call read useFreeze$2(read a$4)
|
||||
Call mutate call$3(read a$4)
|
||||
[1] Const mutate a$4 = Array []
|
||||
[2] Call read useFreeze$2(freeze a$4)
|
||||
[3] Call read useFreeze$2(read a$4)
|
||||
[4] Call mutate call$3(read a$4)
|
||||
Return read a$4
|
||||
```
|
||||
|
||||
|
||||
+8
-8
@@ -26,24 +26,24 @@ function call(x) {}
|
||||
|
||||
```
|
||||
bb0:
|
||||
Const mutate cond$8 = read props$7.cond
|
||||
Const mutate x$9 = read props$7.x
|
||||
Let mutate a$10 = undefined
|
||||
[1] Const mutate cond$8 = read props$7.cond
|
||||
[2] Const mutate x$9 = read props$7.x
|
||||
[3] Let mutate a$10 = undefined
|
||||
If (read cond$8) then:bb2 else:bb3
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
Reassign mutate a$11 = read x$9
|
||||
[4] Reassign mutate a$11 = read x$9
|
||||
Goto bb1
|
||||
bb3:
|
||||
predecessor blocks: bb0
|
||||
Reassign mutate a$12 = Array []
|
||||
[5] Reassign mutate a$12 = Array []
|
||||
Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb3 bb2
|
||||
a$14: phi(bb3: a$12, bb2: a$11)
|
||||
Call read useFreeze$5(freeze a$14)
|
||||
Call read useFreeze$5(read a$14)
|
||||
Call mutate call$6(read a$14)
|
||||
[6] Call read useFreeze$5(freeze a$14)
|
||||
[7] Call read useFreeze$5(read a$14)
|
||||
[8] Call mutate call$6(read a$14)
|
||||
Return read a$14
|
||||
```
|
||||
|
||||
|
||||
@@ -97,17 +97,17 @@ function Foo$0() {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Const mutate a$9 = Call mutate compute$3(read props$8.a)
|
||||
Const mutate b$10 = Call mutate compute$3(read props$8.b)
|
||||
[1] Const mutate a$9 = Call mutate compute$3(read props$8.a)
|
||||
[2] Const mutate b$10 = Call mutate compute$3(read props$8.b)
|
||||
If (read props$8.c) then:bb2 else:bb1
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
Call mutate mutate$5(mutate a$9)
|
||||
Call mutate mutate$5(mutate b$10)
|
||||
[3] Call mutate mutate$5(mutate a$9)
|
||||
[4] Call mutate mutate$5(mutate b$10)
|
||||
Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb0 bb2
|
||||
Const mutate $14 = JSX <read Foo$6 a={freeze a$9} b={freeze b$10} ></read Foo$6>
|
||||
[5] Const mutate $14 = JSX <read Foo$6 a={freeze a$9} b={freeze b$10} ></read Foo$6>
|
||||
Return read $14
|
||||
```
|
||||
|
||||
|
||||
@@ -28,9 +28,9 @@ function Foo() {}
|
||||
|
||||
```
|
||||
bb0:
|
||||
Const mutate a$8 = Call mutate compute$3(read props$7.a)
|
||||
Const mutate b$9 = Call mutate compute$3(read props$7.b)
|
||||
Const mutate $10 = JSX <read Foo$5 a={freeze a$8} b={freeze b$9} ></read Foo$5>
|
||||
[1] Const mutate a$8 = Call mutate compute$3(read props$7.a)
|
||||
[2] Const mutate b$9 = Call mutate compute$3(read props$7.b)
|
||||
[3] Const mutate $10 = JSX <read Foo$5 a={freeze a$8} b={freeze b$9} ></read Foo$5>
|
||||
Return read $10
|
||||
```
|
||||
|
||||
|
||||
@@ -76,16 +76,16 @@ function Foo$0() {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Const mutate a$9 = Call mutate compute$3(read props$8.a)
|
||||
Const mutate b$10 = Call mutate compute$3(read props$8.b)
|
||||
[1] Const mutate a$9 = Call mutate compute$3(read props$8.a)
|
||||
[2] Const mutate b$10 = Call mutate compute$3(read props$8.b)
|
||||
If (read props$8.c) then:bb2 else:bb1
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
Call mutate foo$5(mutate a$9, mutate b$10)
|
||||
[3] Call mutate foo$5(mutate a$9, mutate b$10)
|
||||
Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb0 bb2
|
||||
Const mutate $14 = JSX <read Foo$6 a={freeze a$9} b={freeze b$10} ></read Foo$6>
|
||||
[4] Const mutate $14 = JSX <read Foo$6 a={freeze a$9} b={freeze b$10} ></read Foo$6>
|
||||
Return read $14
|
||||
```
|
||||
|
||||
|
||||
@@ -28,10 +28,10 @@ function Foo() {}
|
||||
|
||||
```
|
||||
bb0:
|
||||
Const mutate a$9 = Call mutate compute$3(read props$8.a)
|
||||
Const mutate b$10 = Call mutate compute$3(read props$8.b)
|
||||
Call mutate foo$5(mutate a$9, mutate b$10)
|
||||
Const mutate $11 = JSX <read Foo$6 a={freeze a$9} b={freeze b$10} ></read Foo$6>
|
||||
[1] Const mutate a$9 = Call mutate compute$3(read props$8.a)
|
||||
[2] Const mutate b$10 = Call mutate compute$3(read props$8.b)
|
||||
[3] Call mutate foo$5(mutate a$9, mutate b$10)
|
||||
[4] Const mutate $11 = JSX <read Foo$6 a={freeze a$9} b={freeze b$10} ></read Foo$6>
|
||||
Return read $11
|
||||
```
|
||||
|
||||
|
||||
@@ -23,15 +23,15 @@ function g() {}
|
||||
|
||||
```
|
||||
bb0:
|
||||
Const mutate $5 = Call mutate f$1()
|
||||
[1] Const mutate $5 = Call mutate f$1()
|
||||
If (read $5) then:bb2 else:bb3
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
Const mutate $6 = Call mutate g$4()
|
||||
[2] Const mutate $6 = Call mutate g$4()
|
||||
Goto bb1
|
||||
bb3:
|
||||
predecessor blocks: bb0
|
||||
Const mutate $7 = read $5
|
||||
[3] Const mutate $7 = read $5
|
||||
Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb3 bb2
|
||||
@@ -56,15 +56,15 @@ function And$0() {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Const mutate $5 = Call mutate f$1()
|
||||
[1] Const mutate $5 = Call mutate f$1()
|
||||
If (read $5) then:bb2 else:bb3
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
Const mutate $6 = read $5
|
||||
[2] Const mutate $6 = read $5
|
||||
Goto bb1
|
||||
bb3:
|
||||
predecessor blocks: bb0
|
||||
Const mutate $7 = Call mutate g$4()
|
||||
[3] Const mutate $7 = Call mutate g$4()
|
||||
Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb3 bb2
|
||||
@@ -89,17 +89,17 @@ function Or$0() {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Const mutate $9 = Call mutate f$2()
|
||||
Const mutate $10 = null
|
||||
Const mutate $11 = Binary read $9 != read $10
|
||||
[1] Const mutate $9 = Call mutate f$2()
|
||||
[2] Const mutate $10 = null
|
||||
[3] Const mutate $11 = Binary read $9 != read $10
|
||||
If (read $11) then:bb2 else:bb3
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
Const mutate $12 = read $9
|
||||
[4] Const mutate $12 = read $9
|
||||
Goto bb1
|
||||
bb3:
|
||||
predecessor blocks: bb0
|
||||
Const mutate $13 = Call mutate g$7()
|
||||
[5] Const mutate $13 = Call mutate g$7()
|
||||
Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb3 bb2
|
||||
|
||||
@@ -73,10 +73,10 @@ function cond$0(x$2) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Let mutate a$13 = Object { }
|
||||
Let mutate b$14 = Object { }
|
||||
Let mutate c$15 = Object { }
|
||||
Let mutate d$16 = Object { }
|
||||
[1] Let mutate a$13 = Object { }
|
||||
[2] Let mutate b$14 = Object { }
|
||||
[3] Let mutate c$15 = Object { }
|
||||
[4] Let mutate d$16 = Object { }
|
||||
Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb0 bb3
|
||||
@@ -86,17 +86,17 @@ bb1:
|
||||
d$24: phi(bb0: d$16, bb3: d$26)
|
||||
mutate$27: phi(bb0: mutate$7, bb3: mutate$27)
|
||||
cond$28: phi(bb0: cond$8, bb3: cond$28)
|
||||
Const mutate $17 = true
|
||||
[5] Const mutate $17 = true
|
||||
If (read $17) then:bb3 else:bb2
|
||||
bb3:
|
||||
predecessor blocks: bb1
|
||||
Let mutate z$19 = read a$18
|
||||
Reassign mutate a$21 = read b$20
|
||||
Reassign mutate b$23 = read c$22
|
||||
Reassign mutate c$25 = read d$24
|
||||
Reassign mutate d$26 = read z$19
|
||||
Call mutate mutate$27(mutate a$21, mutate b$23)
|
||||
Const mutate $29 = Call mutate cond$28(mutate a$21)
|
||||
[6] Let mutate z$19 = read a$18
|
||||
[7] Reassign mutate a$21 = read b$20
|
||||
[8] Reassign mutate b$23 = read c$22
|
||||
[9] Reassign mutate c$25 = read d$24
|
||||
[10] Reassign mutate d$26 = read z$19
|
||||
[11] Call mutate mutate$27(mutate a$21, mutate b$23)
|
||||
[12] Const mutate $29 = Call mutate cond$28(mutate a$21)
|
||||
If (read $29) then:bb2 else:bb1
|
||||
bb2:
|
||||
predecessor blocks: bb1 bb3
|
||||
@@ -116,8 +116,8 @@ bb11:
|
||||
If (read d$33) then:bb13 else:bb13
|
||||
bb13:
|
||||
predecessor blocks: bb11
|
||||
Const mutate $34 = null
|
||||
Call mutate mutate$27(mutate d$33, read $34)
|
||||
[13] Const mutate $34 = null
|
||||
[14] Call mutate mutate$27(mutate d$33, read $34)
|
||||
Return
|
||||
```
|
||||
|
||||
|
||||
@@ -54,13 +54,13 @@ function mutate$0(x$3, y$4) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Const mutate a$11 = Object { }
|
||||
Const mutate b$12 = Array [read a$11]
|
||||
Const mutate c$13 = Object { }
|
||||
Const mutate d$14 = Object { c: read c$13 }
|
||||
Const mutate x$15 = Object { }
|
||||
Reassign mutate x$15.b = read b$12
|
||||
Const mutate y$16 = Call mutate mutate$8(mutate x$15, mutate d$14)
|
||||
[1] Const mutate a$11 = Object { }
|
||||
[2] Const mutate b$12 = Array [read a$11]
|
||||
[3] Const mutate c$13 = Object { }
|
||||
[4] Const mutate d$14 = Object { c: read c$13 }
|
||||
[5] Const mutate x$15 = Object { }
|
||||
[6] Reassign mutate x$15.b = read b$12
|
||||
[7] Const mutate y$16 = Call mutate mutate$8(mutate x$15, mutate d$14)
|
||||
If (read a$11) then:bb1 else:bb1
|
||||
bb1:
|
||||
predecessor blocks: bb0
|
||||
@@ -76,8 +76,8 @@ bb7:
|
||||
If (read y$16) then:bb9 else:bb9
|
||||
bb9:
|
||||
predecessor blocks: bb7
|
||||
Const mutate $17 = null
|
||||
Call mutate mutate$8(mutate x$15, read $17)
|
||||
[8] Const mutate $17 = null
|
||||
[9] Call mutate mutate$8(mutate x$15, read $17)
|
||||
Return
|
||||
```
|
||||
|
||||
|
||||
@@ -17,12 +17,12 @@ function Component(props) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Const mutate x$7 = Object { }
|
||||
Const mutate y$8 = Array []
|
||||
Reassign mutate x$7.y = read y$8
|
||||
Const mutate child$9 = JSX <read Component$0 data={freeze y$8} ></read Component$0>
|
||||
Call mutate x$7.y.push(read props$6.p0)
|
||||
Const mutate $10 = JSX <read Component$0 data={freeze x$7} >{read child$9}</read Component$0>
|
||||
[1] Const mutate x$7 = Object { }
|
||||
[2] Const mutate y$8 = Array []
|
||||
[3] Reassign mutate x$7.y = read y$8
|
||||
[4] Const mutate child$9 = JSX <read Component$0 data={freeze y$8} ></read Component$0>
|
||||
[5] Call mutate x$7.y.push(read props$6.p0)
|
||||
[6] Const mutate $10 = JSX <read Component$0 data={freeze x$7} >{read child$9}</read Component$0>
|
||||
Return read $10
|
||||
```
|
||||
|
||||
|
||||
@@ -23,20 +23,20 @@ function Component(props) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Let mutate x$7 = Array []
|
||||
Call mutate x$7.push(read props$6.p0)
|
||||
Let mutate y$8 = read x$7
|
||||
[1] Let mutate x$7 = Array []
|
||||
[2] Call mutate x$7.push(read props$6.p0)
|
||||
[3] Let mutate y$8 = read x$7
|
||||
If (read props$6.p1) then:bb2 else:bb1
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
Reassign mutate x$9 = Array []
|
||||
[4] Reassign mutate x$9 = Array []
|
||||
Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb0 bb2
|
||||
x$11: phi(bb0: x$7, bb2: x$9)
|
||||
Let mutate _$12 = JSX <read Component$0 x={freeze x$11} ></read Component$0>
|
||||
Call read y$8.push(read props$6.p2)
|
||||
Const mutate $15 = JSX <read Component$0 x={read x$11} y={read y$8} ></read Component$0>
|
||||
[5] Let mutate _$12 = JSX <read Component$0 x={freeze x$11} ></read Component$0>
|
||||
[6] Call read y$8.push(read props$6.p2)
|
||||
[7] Const mutate $15 = JSX <read Component$0 x={read x$11} y={read y$8} ></read Component$0>
|
||||
Return read $15
|
||||
```
|
||||
|
||||
|
||||
@@ -21,13 +21,13 @@ function Component(props) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Let mutate x$7 = Array []
|
||||
Call mutate x$7.push(read props$6.p0)
|
||||
Let mutate y$8 = read x$7
|
||||
Reassign mutate x$9 = Array []
|
||||
Let mutate _$10 = JSX <read Component$0 x={freeze x$9} ></read Component$0>
|
||||
Call mutate y$8.push(read props$6.p1)
|
||||
Const mutate $11 = JSX <read Component$0 x={read x$9} y={freeze y$8} ></read Component$0>
|
||||
[1] Let mutate x$7 = Array []
|
||||
[2] Call mutate x$7.push(read props$6.p0)
|
||||
[3] Let mutate y$8 = read x$7
|
||||
[4] Reassign mutate x$9 = Array []
|
||||
[5] Let mutate _$10 = JSX <read Component$0 x={freeze x$9} ></read Component$0>
|
||||
[6] Call mutate y$8.push(read props$6.p1)
|
||||
[7] Const mutate $11 = JSX <read Component$0 x={read x$9} y={freeze y$8} ></read Component$0>
|
||||
Return read $11
|
||||
```
|
||||
|
||||
|
||||
@@ -36,13 +36,13 @@ function Component(props) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Let mutate x$7 = undefined
|
||||
[1] Let mutate x$7 = undefined
|
||||
If (read props$6.cond) then:bb2 else:bb10
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
Const mutate $8 = 2
|
||||
Const mutate $9 = 1
|
||||
Const mutate $10 = 0
|
||||
[2] Const mutate $8 = 2
|
||||
[3] Const mutate $9 = 1
|
||||
[4] Const mutate $10 = 0
|
||||
Switch (<unknown> props$6.test)
|
||||
Case read $10: bb8
|
||||
Case read $9: bb6
|
||||
@@ -50,31 +50,31 @@ bb2:
|
||||
Default: bb4
|
||||
bb8:
|
||||
predecessor blocks: bb2
|
||||
Reassign mutate x$11 = read props$6.v0
|
||||
[5] Reassign mutate x$11 = read props$6.v0
|
||||
Goto bb1
|
||||
bb6:
|
||||
predecessor blocks: bb2
|
||||
Reassign mutate x$12 = read props$6.v1
|
||||
[6] Reassign mutate x$12 = read props$6.v1
|
||||
Goto bb1
|
||||
bb4:
|
||||
predecessor blocks: bb2
|
||||
Reassign mutate x$13 = read props$6.v2
|
||||
[7] Reassign mutate x$13 = read props$6.v2
|
||||
Goto bb1
|
||||
bb10:
|
||||
predecessor blocks: bb0
|
||||
If (read props$6.cond2) then:bb12 else:bb13
|
||||
bb12:
|
||||
predecessor blocks: bb10
|
||||
Reassign mutate x$14 = read props$6.b
|
||||
[8] Reassign mutate x$14 = read props$6.b
|
||||
Goto bb1
|
||||
bb13:
|
||||
predecessor blocks: bb10
|
||||
Reassign mutate x$15 = read props$6.c
|
||||
[9] Reassign mutate x$15 = read props$6.c
|
||||
Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb13 bb12 bb8 bb6 bb4
|
||||
x$16: phi(bb13: x$15, bb12: x$14, bb8: x$11, bb6: x$12, bb4: x$13)
|
||||
read x$16
|
||||
[10] read x$16
|
||||
Return
|
||||
```
|
||||
|
||||
|
||||
@@ -18,14 +18,14 @@ bb0:
|
||||
If (read x$8) then:bb2 else:bb1
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
Const mutate $10 = false
|
||||
Const mutate $11 = Call read foo$0(read $10, read y$9)
|
||||
[1] Const mutate $10 = false
|
||||
[2] Const mutate $11 = Call read foo$0(read $10, read y$9)
|
||||
Return freeze $11
|
||||
bb1:
|
||||
predecessor blocks: bb0
|
||||
Const mutate $12 = 10
|
||||
Const mutate $13 = Binary read y$9 * read $12
|
||||
Const mutate $14 = Array [read $13]
|
||||
[3] Const mutate $12 = 10
|
||||
[4] Const mutate $13 = Binary read y$9 * read $12
|
||||
[5] Const mutate $14 = Array [read $13]
|
||||
Return freeze $14
|
||||
```
|
||||
|
||||
|
||||
@@ -15,9 +15,9 @@ function Component(props) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Const mutate a$6 = 1
|
||||
Const mutate b$7 = 2
|
||||
Const mutate x$8 = Array [read a$6, read b$7]
|
||||
[1] Const mutate a$6 = 1
|
||||
[2] Const mutate b$7 = 2
|
||||
[3] Const mutate x$8 = Array [read a$6, read b$7]
|
||||
Return freeze x$8
|
||||
```
|
||||
|
||||
|
||||
@@ -34,14 +34,14 @@ function foo$0() {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Const mutate a$10 = Array []
|
||||
Const mutate b$11 = Object { }
|
||||
Call mutate foo$4(mutate a$10, mutate b$11)
|
||||
Const mutate $12 = "div"
|
||||
Let mutate _$13 = JSX <read $12 a={freeze a$10} ></read $12>
|
||||
Call mutate foo$4(mutate b$11)
|
||||
Const mutate $14 = "div"
|
||||
Const mutate $15 = JSX <read $14 a={read a$10} b={freeze b$11} ></read $14>
|
||||
[1] Const mutate a$10 = Array []
|
||||
[2] Const mutate b$11 = Object { }
|
||||
[3] Call mutate foo$4(mutate a$10, mutate b$11)
|
||||
[4] Const mutate $12 = "div"
|
||||
[5] Let mutate _$13 = JSX <read $12 a={freeze a$10} ></read $12>
|
||||
[6] Call mutate foo$4(mutate b$11)
|
||||
[7] Const mutate $14 = "div"
|
||||
[8] Const mutate $15 = JSX <read $14 a={read a$10} b={freeze b$11} ></read $14>
|
||||
Return read $15
|
||||
```
|
||||
|
||||
|
||||
@@ -21,29 +21,29 @@ function foo() {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Let mutate x$7 = 1
|
||||
Let mutate y$8 = 2
|
||||
Const mutate $9 = 2
|
||||
Const mutate $10 = Binary read y$8 === read $9
|
||||
[1] Let mutate x$7 = 1
|
||||
[2] Let mutate y$8 = 2
|
||||
[3] Const mutate $9 = 2
|
||||
[4] Const mutate $10 = Binary read y$8 === read $9
|
||||
If (read $10) then:bb2 else:bb1
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
Reassign mutate x$11 = 3
|
||||
[5] Reassign mutate x$11 = 3
|
||||
Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb0 bb2
|
||||
x$17: phi(bb0: x$7, bb2: x$11)
|
||||
Const mutate $12 = 3
|
||||
Const mutate $14 = Binary read y$8 === read $12
|
||||
[6] Const mutate $12 = 3
|
||||
[7] Const mutate $14 = Binary read y$8 === read $12
|
||||
If (read $14) then:bb4 else:bb3
|
||||
bb4:
|
||||
predecessor blocks: bb1
|
||||
Reassign mutate x$15 = 5
|
||||
[8] Reassign mutate x$15 = 5
|
||||
Goto bb3
|
||||
bb3:
|
||||
predecessor blocks: bb1 bb4
|
||||
x$16: phi(bb1: x$17, bb4: x$15)
|
||||
Reassign mutate y$18 = read x$16
|
||||
[9] Reassign mutate y$18 = read x$16
|
||||
Return
|
||||
```
|
||||
|
||||
|
||||
@@ -18,19 +18,19 @@ function foo() {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Let mutate x$5 = 1
|
||||
Let mutate y$6 = 2
|
||||
Const mutate $7 = 2
|
||||
Const mutate $8 = Binary read y$6 === read $7
|
||||
[1] Let mutate x$5 = 1
|
||||
[2] Let mutate y$6 = 2
|
||||
[3] Const mutate $7 = 2
|
||||
[4] Const mutate $8 = Binary read y$6 === read $7
|
||||
If (read $8) then:bb2 else:bb1
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
Reassign mutate x$9 = 3
|
||||
[5] Reassign mutate x$9 = 3
|
||||
Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb0 bb2
|
||||
x$10: phi(bb0: x$5, bb2: x$9)
|
||||
Reassign mutate y$11 = read x$10
|
||||
[6] Reassign mutate y$11 = read x$10
|
||||
Return
|
||||
```
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ function foo(cond) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Let mutate items$5 = Array []
|
||||
[1] Let mutate items$5 = Array []
|
||||
Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb0 bb3 bb5
|
||||
@@ -28,11 +28,11 @@ bb1:
|
||||
If (read items$6) then:bb3 else:bb2
|
||||
bb3:
|
||||
predecessor blocks: bb1
|
||||
Let mutate y$7 = 0
|
||||
[2] Let mutate y$7 = 0
|
||||
If (read cond$8) then:bb5 else:bb1
|
||||
bb5:
|
||||
predecessor blocks: bb3
|
||||
Reassign mutate y$9 = 1
|
||||
[3] Reassign mutate y$9 = 1
|
||||
Goto bb1
|
||||
bb2:
|
||||
predecessor blocks: bb1
|
||||
|
||||
@@ -16,18 +16,18 @@ function foo() {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Let mutate x$5 = 0
|
||||
[1] Let mutate x$5 = 0
|
||||
Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb0 bb4
|
||||
x$7: phi(bb0: x$5, bb4: x$10)
|
||||
Const mutate $6 = 10
|
||||
Const mutate $8 = Binary read x$7 < read $6
|
||||
[2] Const mutate $6 = 10
|
||||
[3] Const mutate $8 = Binary read x$7 < read $6
|
||||
If (read $8) then:bb4 else:bb2
|
||||
bb4:
|
||||
predecessor blocks: bb1
|
||||
Const mutate $9 = 1
|
||||
Reassign mutate x$10 = Binary read x$7 + read $9
|
||||
[4] Const mutate $9 = 1
|
||||
[5] Reassign mutate x$10 = Binary read x$7 + read $9
|
||||
Goto bb1
|
||||
bb2:
|
||||
predecessor blocks: bb1
|
||||
|
||||
@@ -19,16 +19,16 @@ function foo() {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Let mutate x$5 = 1
|
||||
Let mutate y$6 = 2
|
||||
[1] Let mutate x$5 = 1
|
||||
[2] Let mutate y$6 = 2
|
||||
If (read y$6) then:bb2 else:bb3
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
Let mutate z$7 = Binary read x$5 + read y$6
|
||||
[3] Let mutate z$7 = Binary read x$5 + read y$6
|
||||
Goto bb1
|
||||
bb3:
|
||||
predecessor blocks: bb0
|
||||
Let mutate z$8 = read x$5
|
||||
[4] Let mutate z$8 = read x$5
|
||||
Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb3 bb2
|
||||
|
||||
@@ -32,9 +32,9 @@ function Foo$0() {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Const mutate a$7 = Array []
|
||||
Const mutate b$8 = Object { }
|
||||
Let mutate c$9 = New mutate Foo$5(mutate a$7, mutate b$8)
|
||||
[1] Const mutate a$7 = Array []
|
||||
[2] Const mutate b$8 = Object { }
|
||||
[3] Let mutate c$9 = New mutate Foo$5(mutate a$7, mutate b$8)
|
||||
Return freeze c$9
|
||||
```
|
||||
|
||||
|
||||
@@ -22,24 +22,24 @@ function foo() {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Let mutate x$6 = 1
|
||||
Let mutate y$7 = 2
|
||||
Const mutate $8 = 1
|
||||
Const mutate $9 = Binary read x$6 > read $8
|
||||
[1] Let mutate x$6 = 1
|
||||
[2] Let mutate y$7 = 2
|
||||
[3] Const mutate $8 = 1
|
||||
[4] Const mutate $9 = Binary read x$6 > read $8
|
||||
If (read $9) then:bb2 else:bb3
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
Reassign mutate x$10 = 2
|
||||
[5] Reassign mutate x$10 = 2
|
||||
Goto bb1
|
||||
bb3:
|
||||
predecessor blocks: bb0
|
||||
Reassign mutate y$11 = 3
|
||||
[6] Reassign mutate y$11 = 3
|
||||
Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb3 bb2
|
||||
x$12: phi(bb3: x$6, bb2: x$10)
|
||||
y$13: phi(bb3: y$11, bb2: y$7)
|
||||
Let mutate t$14 = Object { x: read x$12, y: read y$13 }
|
||||
[7] Let mutate t$14 = Object { x: read x$12, y: read y$13 }
|
||||
Return freeze t$14
|
||||
```
|
||||
|
||||
|
||||
@@ -15,9 +15,9 @@ function Component(props) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Const mutate a$6 = 1
|
||||
Const mutate b$7 = 2
|
||||
Const mutate x$8 = Object { a: read a$6, b: read b$7 }
|
||||
[1] Const mutate a$6 = 1
|
||||
[2] Const mutate b$7 = 2
|
||||
[3] Const mutate x$8 = Object { a: read a$6, b: read b$7 }
|
||||
Return freeze x$8
|
||||
```
|
||||
|
||||
|
||||
@@ -15,10 +15,10 @@ function foo() {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Const mutate x$4 = Array []
|
||||
Const mutate y$5 = Object { x: read x$4 }
|
||||
Const mutate $6 = Array []
|
||||
Call mutate y$5.x.push(mutate $6)
|
||||
[1] Const mutate x$4 = Array []
|
||||
[2] Const mutate y$5 = Object { x: read x$4 }
|
||||
[3] Const mutate $6 = Array []
|
||||
[4] Call mutate y$5.x.push(mutate $6)
|
||||
Return freeze y$5
|
||||
```
|
||||
|
||||
|
||||
@@ -15,9 +15,9 @@ function foo() {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Const mutate x$3 = Array []
|
||||
Const mutate y$4 = Object { }
|
||||
Reassign mutate y$4.x = read x$3
|
||||
[1] Const mutate x$3 = Array []
|
||||
[2] Const mutate y$4 = Object { }
|
||||
[3] Reassign mutate y$4.x = read x$3
|
||||
Return freeze y$4
|
||||
```
|
||||
|
||||
|
||||
@@ -17,13 +17,13 @@ function foo() {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Let mutate x$4 = 1
|
||||
Const mutate $5 = 1
|
||||
Const mutate $6 = Binary read x$4 === read $5
|
||||
[1] Let mutate x$4 = 1
|
||||
[2] Const mutate $5 = 1
|
||||
[3] Const mutate $6 = Binary read x$4 === read $5
|
||||
If (read $6) then:bb2 else:bb1
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
Reassign mutate x$7 = 2
|
||||
[4] Reassign mutate x$7 = 2
|
||||
Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb0 bb2
|
||||
|
||||
@@ -20,22 +20,22 @@ function foo() {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Let mutate y$5 = 2
|
||||
Const mutate $6 = 1
|
||||
Const mutate $7 = Binary read y$5 > read $6
|
||||
[1] Let mutate y$5 = 2
|
||||
[2] Const mutate $6 = 1
|
||||
[3] Const mutate $7 = Binary read y$5 > read $6
|
||||
If (read $7) then:bb2 else:bb3
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
Reassign mutate y$8 = 1
|
||||
[4] Reassign mutate y$8 = 1
|
||||
Goto bb1
|
||||
bb3:
|
||||
predecessor blocks: bb0
|
||||
Reassign mutate y$9 = 2
|
||||
[5] Reassign mutate y$9 = 2
|
||||
Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb3 bb2
|
||||
y$10: phi(bb3: y$9, bb2: y$8)
|
||||
Let mutate x$11 = read y$10
|
||||
[6] Let mutate x$11 = read y$10
|
||||
Return
|
||||
```
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ function foo() {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Let mutate x$3 = 1
|
||||
Let mutate y$4 = 2
|
||||
[1] Let mutate x$3 = 1
|
||||
[2] Let mutate y$4 = 2
|
||||
Return
|
||||
```
|
||||
|
||||
|
||||
@@ -17,12 +17,12 @@ function foo() {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Let mutate x$4 = 1
|
||||
Let mutate y$5 = 2
|
||||
[1] Let mutate x$4 = 1
|
||||
[2] Let mutate y$5 = 2
|
||||
If (read y$5) then:bb2 else:bb1
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
Let mutate z$6 = Binary read x$4 + read y$5
|
||||
[3] Let mutate z$6 = Binary read x$4 + read y$5
|
||||
Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb0 bb2
|
||||
|
||||
@@ -28,34 +28,34 @@ function foo() {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Let mutate x$10 = 1
|
||||
Const mutate $11 = 2
|
||||
Const mutate $12 = Binary read x$10 === read $11
|
||||
Const mutate $13 = 1
|
||||
Const mutate $14 = Binary read x$10 === read $13
|
||||
[1] Let mutate x$10 = 1
|
||||
[2] Const mutate $11 = 2
|
||||
[3] Const mutate $12 = Binary read x$10 === read $11
|
||||
[4] Const mutate $13 = 1
|
||||
[5] Const mutate $14 = Binary read x$10 === read $13
|
||||
Switch (<unknown> x$10)
|
||||
Case read $14: bb5
|
||||
Case read $12: bb3
|
||||
Default: bb2
|
||||
bb5:
|
||||
predecessor blocks: bb0
|
||||
Const mutate $15 = 1
|
||||
Reassign mutate x$16 = Binary read x$10 + read $15
|
||||
[6] Const mutate $15 = 1
|
||||
[7] Reassign mutate x$16 = Binary read x$10 + read $15
|
||||
Goto bb1
|
||||
bb3:
|
||||
predecessor blocks: bb0
|
||||
Const mutate $17 = 2
|
||||
Reassign mutate x$18 = Binary read x$10 + read $17
|
||||
[8] Const mutate $17 = 2
|
||||
[9] Reassign mutate x$18 = Binary read x$10 + read $17
|
||||
Goto bb1
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
Const mutate $19 = 3
|
||||
Reassign mutate x$20 = Binary read x$10 + read $19
|
||||
[10] Const mutate $19 = 3
|
||||
[11] Reassign mutate x$20 = Binary read x$10 + read $19
|
||||
Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb5 bb3 bb2
|
||||
x$21: phi(bb5: x$16, bb3: x$18, bb2: x$20)
|
||||
Let mutate y$22 = read x$21
|
||||
[12] Let mutate y$22 = read x$21
|
||||
Return
|
||||
```
|
||||
|
||||
|
||||
@@ -16,13 +16,13 @@ function foo() {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Let mutate x$4 = 1
|
||||
Const mutate $5 = 1
|
||||
Const mutate $6 = Binary read x$4 === read $5
|
||||
[1] Let mutate x$4 = 1
|
||||
[2] Const mutate $5 = 1
|
||||
[3] Const mutate $6 = Binary read x$4 === read $5
|
||||
If (read $6) then:bb2 else:bb1
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
Reassign mutate x$7 = 2
|
||||
[4] Reassign mutate x$7 = 2
|
||||
Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb0 bb2
|
||||
|
||||
@@ -17,18 +17,18 @@ function foo() {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Let mutate x$5 = 1
|
||||
[1] Let mutate x$5 = 1
|
||||
Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb0 bb3
|
||||
x$7: phi(bb0: x$5, bb3: x$10)
|
||||
Const mutate $6 = 10
|
||||
Const mutate $8 = Binary read x$7 < read $6
|
||||
[2] Const mutate $6 = 10
|
||||
[3] Const mutate $8 = Binary read x$7 < read $6
|
||||
If (read $8) then:bb3 else:bb2
|
||||
bb3:
|
||||
predecessor blocks: bb1
|
||||
Const mutate $9 = 1
|
||||
Reassign mutate x$10 = Binary read x$7 + read $9
|
||||
[4] Const mutate $9 = 1
|
||||
[5] Reassign mutate x$10 = Binary read x$7 + read $9
|
||||
Goto bb1
|
||||
bb2:
|
||||
predecessor blocks: bb1
|
||||
|
||||
@@ -32,11 +32,11 @@ function Component(props) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Let mutate x$10 = Array []
|
||||
Let mutate y$11 = undefined
|
||||
Const mutate $12 = false
|
||||
Const mutate $13 = true
|
||||
Const mutate $14 = 1
|
||||
[1] Let mutate x$10 = Array []
|
||||
[2] Let mutate y$11 = undefined
|
||||
[3] Const mutate $12 = false
|
||||
[4] Const mutate $13 = true
|
||||
[5] Const mutate $14 = 1
|
||||
Switch (<unknown> props$9.p0)
|
||||
Case read $14: bb1
|
||||
Case read $13: bb6
|
||||
@@ -44,19 +44,19 @@ bb0:
|
||||
Case read $12: bb2
|
||||
bb6:
|
||||
predecessor blocks: bb0
|
||||
Call mutate x$10.push(read props$9.p2)
|
||||
Reassign mutate y$15 = Array []
|
||||
[6] Call mutate x$10.push(read props$9.p2)
|
||||
[7] Reassign mutate y$15 = Array []
|
||||
Goto bb1
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
Reassign mutate y$16 = read x$10
|
||||
[8] Reassign mutate y$16 = read x$10
|
||||
Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb0 bb6 bb2
|
||||
y$20: phi(bb0: y$11, bb6: y$15, bb2: y$16)
|
||||
Const mutate child$19 = JSX <read Component$0 data={freeze x$10} ></read Component$0>
|
||||
Call read y$20.push(read props$9.p4)
|
||||
Const mutate $22 = JSX <read Component$0 data={freeze y$20} >{read child$19}</read Component$0>
|
||||
[9] Const mutate child$19 = JSX <read Component$0 data={freeze x$10} ></read Component$0>
|
||||
[10] Call read y$20.push(read props$9.p4)
|
||||
[11] Const mutate $22 = JSX <read Component$0 data={freeze y$20} >{read child$19}</read Component$0>
|
||||
Return read $22
|
||||
```
|
||||
|
||||
|
||||
@@ -28,30 +28,30 @@ function Component(props) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
Let mutate x$9 = Array []
|
||||
Let mutate y$10 = undefined
|
||||
Const mutate $11 = false
|
||||
Const mutate $12 = true
|
||||
[1] Let mutate x$9 = Array []
|
||||
[2] Let mutate y$10 = undefined
|
||||
[3] Const mutate $11 = false
|
||||
[4] Const mutate $12 = true
|
||||
Switch (<unknown> props$8.p0)
|
||||
Case read $12: bb4
|
||||
Case read $11: bb2
|
||||
Default: bb1
|
||||
bb4:
|
||||
predecessor blocks: bb0
|
||||
Call mutate x$9.push(read props$8.p2)
|
||||
Call mutate x$9.push(read props$8.p3)
|
||||
Reassign mutate y$13 = Array []
|
||||
[5] Call mutate x$9.push(read props$8.p2)
|
||||
[6] Call mutate x$9.push(read props$8.p3)
|
||||
[7] Reassign mutate y$13 = Array []
|
||||
Goto bb2
|
||||
bb2:
|
||||
predecessor blocks: bb4 bb0
|
||||
Reassign mutate y$15 = read x$9
|
||||
[8] Reassign mutate y$15 = read x$9
|
||||
Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb2 bb0
|
||||
y$20: phi(bb2: y$15, bb0: y$10)
|
||||
Const mutate child$19 = JSX <read Component$0 data={freeze x$9} ></read Component$0>
|
||||
Call read y$20.push(read props$8.p4)
|
||||
Const mutate $23 = JSX <read Component$0 data={read y$20} >{read child$19}</read Component$0>
|
||||
[9] Const mutate child$19 = JSX <read Component$0 data={freeze x$9} ></read Component$0>
|
||||
[10] Call read y$20.push(read props$8.p4)
|
||||
[11] Const mutate $23 = JSX <read Component$0 data={read y$20} >{read child$19}</read Component$0>
|
||||
Return read $23
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user