mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
[typer] Be more conservative with function type inference
It's not safe to infer types of arguments and return values because Javascript is so polymorphic. Instead just infer the type of the callee for non methods. Interestingly, even this is not conservative enough for JavaScript because Proxy can also be callable. But I think for our use cases we will treat Proxy and Functions similarly (they're all just objects) so it's ok.
This commit is contained in:
@@ -455,8 +455,6 @@ export type Type =
|
||||
export type PrimitiveType = { kind: "Primitive" };
|
||||
export type FunctionType = {
|
||||
kind: "Function";
|
||||
argTypes: Array<Type>;
|
||||
returnType: Type;
|
||||
};
|
||||
export type ObjectType = { kind: "Object"; properties: Map<string, Type> };
|
||||
export type PropType = { kind: "Prop"; objectType: Type; name: string };
|
||||
@@ -531,22 +529,5 @@ function propTypeEquals(tA: Type, tB: Type): boolean {
|
||||
}
|
||||
|
||||
function funcTypeEquals(tA: Type, tB: Type): boolean {
|
||||
if (tA.kind === "Function" && tB.kind === "Function") {
|
||||
if (tA.returnType !== tB.returnType) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (tA.argTypes.length !== tB.argTypes.length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (let i = 0; i < tA.argTypes.length; i++) {
|
||||
if (!typeVarEquals(tA.argTypes[i], tB.argTypes[i])) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return tA.kind === "Function" && tB.kind === "Function";
|
||||
}
|
||||
|
||||
@@ -132,20 +132,17 @@ function generateTypeEquation(
|
||||
break;
|
||||
}
|
||||
|
||||
// TODO(gsn): This is potentially unsafe if we're modeling JavaScript as
|
||||
// these should be PolyTypes. Modeling PolyTypes seems overkill for Forget
|
||||
// as we're super conservative anyway. Should we not model function
|
||||
// application?
|
||||
case "CallExpression": {
|
||||
const argTypes = value.args.map((a) => a.identifier.type);
|
||||
|
||||
// TODO(gsn): Handle method calls separately
|
||||
if (value.callee.memberPath !== null) {
|
||||
break;
|
||||
}
|
||||
|
||||
equations.push({
|
||||
left: value.callee.identifier.type,
|
||||
right: {
|
||||
kind: "Function",
|
||||
argTypes,
|
||||
returnType: left ?? makeType(),
|
||||
},
|
||||
right: { kind: "Function" },
|
||||
});
|
||||
|
||||
break;
|
||||
@@ -231,14 +228,6 @@ class Unifier {
|
||||
this.bindVariableTo(tB, tA);
|
||||
return;
|
||||
}
|
||||
|
||||
if (tA.kind === "Function" && tB.kind === "Function") {
|
||||
const len = Math.min(tA.argTypes.length, tB.argTypes.length);
|
||||
for (let i = 0; i < len; i++) {
|
||||
this.unify(tA.argTypes[i], tB.argTypes[i]);
|
||||
}
|
||||
this.unify(tA.returnType, tB.returnType);
|
||||
}
|
||||
}
|
||||
|
||||
bindVariableTo(v: TypeVar, type: Type): void {
|
||||
@@ -291,13 +280,6 @@ class Unifier {
|
||||
return this.occursCheck(v, this.substitutions.get(type.name)!);
|
||||
}
|
||||
|
||||
if (type.kind === "Function") {
|
||||
return (
|
||||
this.occursCheck(v, type.returnType) ||
|
||||
type.argTypes.some((a) => this.occursCheck(v, a))
|
||||
);
|
||||
}
|
||||
|
||||
if (type.kind === "Object") {
|
||||
return [...type.properties.values()].some((p) => this.occursCheck(v, p));
|
||||
}
|
||||
@@ -322,14 +304,6 @@ class Unifier {
|
||||
}
|
||||
}
|
||||
|
||||
if (type.kind === "Function") {
|
||||
return {
|
||||
kind: "Function",
|
||||
argTypes: type.argTypes.map((a) => this.get(a)),
|
||||
returnType: this.get(type.returnType),
|
||||
};
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ function Component(props) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
[1] Const mutate a$4_@0:TFunction[1:7] = Array []
|
||||
[1] Const mutate a$4_@0[1:7] = Array []
|
||||
[2] Call mutate a$4_@0.push(read props$3.a)
|
||||
[3] If (read props$3.b) then:bb1 else:bb2 fallthrough=bb2
|
||||
bb2:
|
||||
@@ -34,7 +34,7 @@ bb2:
|
||||
bb1:
|
||||
predecessor blocks: bb0 bb2
|
||||
[6] Call mutate a$4_@0.push(read props$3.d)
|
||||
[7] Return freeze a$4_@0:TFunction
|
||||
[7] Return freeze a$4_@0
|
||||
```
|
||||
|
||||
## Reactive Scopes
|
||||
@@ -44,11 +44,11 @@ function Component(
|
||||
props,
|
||||
) {
|
||||
scope @0 [1:7] deps=[read props$3.a, read props$3.b, read props$3.d, read props$3.c] out=[] {
|
||||
[1] Const mutate a$4_@0:TFunction[1:7] = Array []
|
||||
[1] Const mutate a$4_@0[1:7] = Array []
|
||||
[2] Call mutate a$4_@0.push(read props$3.a)
|
||||
if (read props$3.b) {
|
||||
[6] Call mutate a$4_@0.push(read props$3.d)
|
||||
return freeze a$4_@0:TFunction
|
||||
return freeze a$4_@0
|
||||
}
|
||||
[4] Call mutate a$4_@0.push(read props$3.c)
|
||||
}
|
||||
|
||||
@@ -42,14 +42,14 @@ function foo$0() {}
|
||||
|
||||
```
|
||||
bb0:
|
||||
[1] Const mutate a$10_@0:TObject[1:7] = Array []
|
||||
[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:TObject, mutate b$11_@0:TObject)
|
||||
[3] Call mutate foo$4:TFunction(mutate a$10_@0, mutate b$11_@0:TObject)
|
||||
[4] Const mutate $12:TPrimitive = "div"
|
||||
[5] Const mutate _$13_@1 = JSX <read $12:TPrimitive a={freeze a$10_@0:TObject} ></read $12:TPrimitive>
|
||||
[5] Const mutate _$13_@1 = JSX <read $12:TPrimitive a={freeze a$10_@0} ></read $12:TPrimitive>
|
||||
[6] Call mutate foo$4:TFunction(mutate b$11_@0:TObject)
|
||||
[7] Const mutate $14:TPrimitive = "div"
|
||||
[8] Const mutate t5$15_@2 = JSX <read $14:TPrimitive a={read a$10_@0:TObject} b={freeze b$11_@0:TObject} ></read $14:TPrimitive>
|
||||
[8] Const mutate t5$15_@2 = JSX <read $14:TPrimitive a={read a$10_@0} b={freeze b$11_@0:TObject} ></read $14:TPrimitive>
|
||||
[9] Return read t5$15_@2
|
||||
```
|
||||
|
||||
@@ -60,18 +60,18 @@ function Component(
|
||||
props,
|
||||
) {
|
||||
scope @0 [1:7] deps=[] out=[a$10_@0, b$11_@0] {
|
||||
[1] Const mutate a$10_@0:TObject[1:7] = Array []
|
||||
[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:TObject, mutate b$11_@0:TObject)
|
||||
[3] Call mutate foo$4:TFunction(mutate a$10_@0, mutate b$11_@0:TObject)
|
||||
[4] Const mutate $12:TPrimitive = "div"
|
||||
scope @1 [5:6] deps=[freeze a$10_@0:TObject] out=[] {
|
||||
[5] Const mutate _$13_@1 = JSX <read $12:TPrimitive a={freeze a$10_@0:TObject} ></read $12:TPrimitive>
|
||||
scope @1 [5:6] deps=[freeze a$10_@0] out=[] {
|
||||
[5] Const mutate _$13_@1 = JSX <read $12:TPrimitive a={freeze a$10_@0} ></read $12:TPrimitive>
|
||||
}
|
||||
[6] Call mutate foo$4:TFunction(mutate b$11_@0:TObject)
|
||||
}
|
||||
[7] Const mutate $14:TPrimitive = "div"
|
||||
scope @2 [8:9] deps=[read a$10_@0:TObject, freeze b$11_@0:TObject] out=[$15_@2] {
|
||||
[8] Const mutate $15_@2 = JSX <read $14:TPrimitive a={read a$10_@0:TObject} b={freeze b$11_@0:TObject} ></read $14:TPrimitive>
|
||||
scope @2 [8:9] deps=[read a$10_@0, freeze b$11_@0:TObject] out=[$15_@2] {
|
||||
[8] Const mutate $15_@2 = JSX <read $14:TPrimitive a={read a$10_@0} b={freeze b$11_@0:TObject} ></read $14:TPrimitive>
|
||||
}
|
||||
return read $15_@2
|
||||
}
|
||||
|
||||
@@ -37,8 +37,8 @@ function Component(props) {
|
||||
bb0:
|
||||
[1] Const mutate items$30:TProp = read props$29.items
|
||||
[2] Const mutate maxItems$31:TProp = read props$29.maxItems
|
||||
[3] Const mutate renderedItems$32_@0:TFunction[3:33] = Array []
|
||||
[4] Const mutate seen$33_@0:TFunction[3:33] = New mutate Set$6()
|
||||
[3] Const mutate renderedItems$32_@0:TPrimitive[3:33] = Array []
|
||||
[4] Const mutate seen$33_@0[3:33] = New mutate Set$6()
|
||||
[5] Const mutate $34:TPrimitive = 0
|
||||
[6] Const mutate max$35_@2:TPrimitive = Call mutate Math$8.max(read $34:TPrimitive, read maxItems$31:TProp)
|
||||
[7] For init=bb3 test=bb1 loop=bb5 update=bb4 fallthrough=bb2
|
||||
@@ -98,7 +98,7 @@ bb2:
|
||||
[38] Const mutate t7$71_@4 = JSX <read $69:TPrimitive>{freeze count$66:TProp}{read $70}</read $69:TPrimitive>
|
||||
[39] Const mutate $72 = "\n "
|
||||
[40] Const mutate $73 = "\n "
|
||||
[41] Const mutate t10$74_@5 = JSX <read $67:TPrimitive>{read $68}{read t7$71_@4}{read $72}{freeze renderedItems$32_@0:TFunction}{read $73}</read $67:TPrimitive>
|
||||
[41] Const mutate t10$74_@5 = JSX <read $67:TPrimitive>{read $68}{read t7$71_@4}{read $72}{freeze renderedItems$32_@0:TPrimitive}{read $73}</read $67:TPrimitive>
|
||||
[42] Return read t10$74_@5
|
||||
```
|
||||
|
||||
@@ -111,8 +111,8 @@ function Component(
|
||||
[1] Const mutate items$30:TProp = read props$29.items
|
||||
[2] Const mutate maxItems$31:TProp = read props$29.maxItems
|
||||
scope @0 [3:33] deps=[read maxItems$31:TProp, read items$30.length, read items$30] out=[renderedItems$32_@0] {
|
||||
[3] Const mutate renderedItems$32_@0:TFunction[3:33] = Array []
|
||||
[4] Const mutate seen$33_@0:TFunction[3:33] = New mutate Set$6()
|
||||
[3] Const mutate renderedItems$32_@0:TPrimitive[3:33] = Array []
|
||||
[4] Const mutate seen$33_@0[3:33] = New mutate Set$6()
|
||||
[5] Const mutate $34:TPrimitive = 0
|
||||
scope @2 [6:7] deps=[read maxItems$31:TProp] out=[max$35_@2] {
|
||||
[6] Const mutate max$35_@2:TPrimitive = Call mutate Math$8.max(read $34:TPrimitive, read maxItems$31:TProp)
|
||||
@@ -159,8 +159,8 @@ function Component(
|
||||
}
|
||||
[39] Const mutate $72 = "\n "
|
||||
[40] Const mutate $73 = "\n "
|
||||
scope @5 [41:42] deps=[read $71_@4, freeze renderedItems$32_@0:TFunction] out=[$74_@5] {
|
||||
[41] Const mutate $74_@5 = JSX <read $67:TPrimitive>{read $68}{read $71_@4}{read $72}{freeze renderedItems$32_@0:TFunction}{read $73}</read $67:TPrimitive>
|
||||
scope @5 [41:42] deps=[read $71_@4, freeze renderedItems$32_@0:TPrimitive] out=[$74_@5] {
|
||||
[41] Const mutate $74_@5 = JSX <read $67:TPrimitive>{read $68}{read $71_@4}{read $72}{freeze renderedItems$32_@0:TPrimitive}{read $73}</read $67:TPrimitive>
|
||||
}
|
||||
return read $74_@5
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ function Component(props) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
[1] Const mutate a_DEBUG$5_@0:TFunction[1:7] = Array []
|
||||
[1] Const mutate a_DEBUG$5_@0[1:7] = Array []
|
||||
[2] Call mutate a_DEBUG$5_@0.push(read props$4.a)
|
||||
[3] If (read props$4.b) then:bb2 else:bb1 fallthrough=bb1
|
||||
bb2:
|
||||
@@ -88,7 +88,7 @@ bb2:
|
||||
bb1:
|
||||
predecessor blocks: bb0
|
||||
[6] Call mutate a_DEBUG$5_@0.push(read props$4.d)
|
||||
[7] Return freeze a_DEBUG$5_@0:TFunction
|
||||
[7] Return freeze a_DEBUG$5_@0
|
||||
```
|
||||
|
||||
## Reactive Scopes
|
||||
@@ -98,7 +98,7 @@ function Component(
|
||||
props,
|
||||
) {
|
||||
scope @0 [1:7] deps=[read props$4.a, read props$4.b, read props$4.d] out=[a_DEBUG$5_@0] {
|
||||
[1] Const mutate a_DEBUG$5_@0:TFunction[1:7] = Array []
|
||||
[1] Const mutate a_DEBUG$5_@0[1:7] = Array []
|
||||
[2] Call mutate a_DEBUG$5_@0.push(read props$4.a)
|
||||
if (read props$4.b) {
|
||||
[4] Const mutate $6:TPrimitive = null
|
||||
@@ -106,7 +106,7 @@ function Component(
|
||||
}
|
||||
[6] Call mutate a_DEBUG$5_@0.push(read props$4.d)
|
||||
}
|
||||
return freeze a_DEBUG$5_@0:TFunction
|
||||
return freeze a_DEBUG$5_@0
|
||||
}
|
||||
|
||||
```
|
||||
@@ -145,7 +145,7 @@ function Component$0(props$4) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
[1] Const mutate a$4_@0:TFunction[1:7] = Array []
|
||||
[1] Const mutate a$4_@0[1:7] = Array []
|
||||
[2] Call mutate a$4_@0.push(read props$3.a)
|
||||
[3] If (read props$3.b) then:bb2 else:bb1 fallthrough=bb1
|
||||
bb2:
|
||||
@@ -155,7 +155,7 @@ bb2:
|
||||
bb1:
|
||||
predecessor blocks: bb2 bb0
|
||||
[6] Call mutate a$4_@0.push(read props$3.d)
|
||||
[7] Return freeze a$4_@0:TFunction
|
||||
[7] Return freeze a$4_@0
|
||||
```
|
||||
|
||||
## Reactive Scopes
|
||||
@@ -165,14 +165,14 @@ function Component(
|
||||
props,
|
||||
) {
|
||||
scope @0 [1:7] deps=[read props$3.a, read props$3.b, read props$3.c, read props$3.d] out=[a$4_@0] {
|
||||
[1] Const mutate a$4_@0:TFunction[1:7] = Array []
|
||||
[1] Const mutate a$4_@0[1:7] = Array []
|
||||
[2] Call mutate a$4_@0.push(read props$3.a)
|
||||
if (read props$3.b) {
|
||||
[4] Call mutate a$4_@0.push(read props$3.c)
|
||||
}
|
||||
[6] Call mutate a$4_@0.push(read props$3.d)
|
||||
}
|
||||
return freeze a$4_@0:TFunction
|
||||
return freeze a$4_@0
|
||||
}
|
||||
|
||||
```
|
||||
@@ -213,7 +213,7 @@ function Component$0(props$3) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
[1] Const mutate a$5_@0:TFunction[1:8] = Array []
|
||||
[1] Const mutate a$5_@0[1:8] = Array []
|
||||
[2] Call mutate a$5_@0.push(read props$4.a)
|
||||
[3] If (read props$4.b) then:bb2 else:bb1 fallthrough=bb1
|
||||
bb2:
|
||||
@@ -224,7 +224,7 @@ bb2:
|
||||
bb1:
|
||||
predecessor blocks: bb0
|
||||
[7] Call mutate a$5_@0.push(read props$4.d)
|
||||
[8] Return freeze a$5_@0:TFunction
|
||||
[8] Return freeze a$5_@0
|
||||
```
|
||||
|
||||
## Reactive Scopes
|
||||
@@ -234,7 +234,7 @@ function Component(
|
||||
props,
|
||||
) {
|
||||
scope @0 [1:8] deps=[read props$4.a, read props$4.b, read props$4.c, read props$4.d] out=[a$5_@0] {
|
||||
[1] Const mutate a$5_@0:TFunction[1:8] = Array []
|
||||
[1] Const mutate a$5_@0[1:8] = Array []
|
||||
[2] Call mutate a$5_@0.push(read props$4.a)
|
||||
if (read props$4.b) {
|
||||
[4] Call mutate a$5_@0.push(read props$4.c)
|
||||
@@ -243,7 +243,7 @@ function Component(
|
||||
}
|
||||
[7] Call mutate a$5_@0.push(read props$4.d)
|
||||
}
|
||||
return freeze a$5_@0:TFunction
|
||||
return freeze a$5_@0
|
||||
}
|
||||
|
||||
```
|
||||
@@ -285,17 +285,17 @@ function Component$0(props$4) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
[1] Const mutate a$4_@0:TFunction[1:7] = Array []
|
||||
[1] Const mutate a$4_@0[1:7] = Array []
|
||||
[2] Call mutate a$4_@0.push(read props$3.a)
|
||||
[3] If (read props$3.b) then:bb2 else:bb1 fallthrough=bb1
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
[4] Call mutate a$4_@0.push(read props$3.c)
|
||||
[5] Return freeze a$4_@0:TFunction
|
||||
[5] Return freeze a$4_@0
|
||||
bb1:
|
||||
predecessor blocks: bb0
|
||||
[6] Call mutate a$4_@0.push(read props$3.d)
|
||||
[7] Return freeze a$4_@0:TFunction
|
||||
[7] Return freeze a$4_@0
|
||||
```
|
||||
|
||||
## Reactive Scopes
|
||||
@@ -305,15 +305,15 @@ function Component(
|
||||
props,
|
||||
) {
|
||||
scope @0 [1:7] deps=[read props$3.a, read props$3.b, read props$3.c, read props$3.d] out=[a$4_@0] {
|
||||
[1] Const mutate a$4_@0:TFunction[1:7] = Array []
|
||||
[1] Const mutate a$4_@0[1:7] = Array []
|
||||
[2] Call mutate a$4_@0.push(read props$3.a)
|
||||
if (read props$3.b) {
|
||||
[4] Call mutate a$4_@0.push(read props$3.c)
|
||||
return freeze a$4_@0:TFunction
|
||||
return freeze a$4_@0
|
||||
}
|
||||
[6] Call mutate a$4_@0.push(read props$3.d)
|
||||
}
|
||||
return freeze a$4_@0:TFunction
|
||||
return freeze a$4_@0
|
||||
}
|
||||
|
||||
```
|
||||
@@ -355,7 +355,7 @@ function Component$0(props$3) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
[1] Const mutate a$4_@0:TFunction[1:7] = Array []
|
||||
[1] Const mutate a$4_@0[1:7] = Array []
|
||||
[2] Call mutate a$4_@0.push(read props$3.a)
|
||||
[3] If (read props$3.b) then:bb1 else:bb2 fallthrough=bb2
|
||||
bb2:
|
||||
@@ -365,7 +365,7 @@ bb2:
|
||||
bb1:
|
||||
predecessor blocks: bb0 bb2
|
||||
[6] Call mutate a$4_@0.push(read props$3.d)
|
||||
[7] Return freeze a$4_@0:TFunction
|
||||
[7] Return freeze a$4_@0
|
||||
```
|
||||
|
||||
## Reactive Scopes
|
||||
@@ -375,11 +375,11 @@ function Component(
|
||||
props,
|
||||
) {
|
||||
scope @0 [1:7] deps=[read props$3.a, read props$3.b, read props$3.d, read props$3.c] out=[] {
|
||||
[1] Const mutate a$4_@0:TFunction[1:7] = Array []
|
||||
[1] Const mutate a$4_@0[1:7] = Array []
|
||||
[2] Call mutate a$4_@0.push(read props$3.a)
|
||||
if (read props$3.b) {
|
||||
[6] Call mutate a$4_@0.push(read props$3.d)
|
||||
return freeze a$4_@0:TFunction
|
||||
return freeze a$4_@0
|
||||
}
|
||||
[4] Call mutate a$4_@0.push(read props$3.c)
|
||||
}
|
||||
|
||||
@@ -35,9 +35,9 @@ function mayMutate() {}
|
||||
|
||||
```
|
||||
bb0:
|
||||
[1] Const mutate a$7_@0:TFunction[1:9] = Array []
|
||||
[2] Const mutate b$8_@0:TFunction[1:9] = Array []
|
||||
[3] If (read b$8_@0:TFunction) then:bb2 else:bb1 fallthrough=bb1
|
||||
[1] Const mutate a$7_@0[1:9] = Array []
|
||||
[2] Const mutate b$8_@0[1:9] = Array []
|
||||
[3] If (read b$8_@0) then:bb2 else:bb1 fallthrough=bb1
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
[4] Call mutate a$7_@0.push(read props$6.p0)
|
||||
@@ -51,7 +51,7 @@ bb4:
|
||||
[8] Goto bb3
|
||||
bb3:
|
||||
predecessor blocks: bb4 bb1
|
||||
[9] Const mutate t6$16_@2 = JSX <read Foo$4 a={freeze a$7_@0:TFunction} b={freeze b$8_@0:TFunction} ></read Foo$4>
|
||||
[9] Const mutate t6$16_@2 = JSX <read Foo$4 a={freeze a$7_@0} b={freeze b$8_@0} ></read Foo$4>
|
||||
[10] Return read t6$16_@2
|
||||
```
|
||||
|
||||
@@ -62,17 +62,17 @@ function Component(
|
||||
props,
|
||||
) {
|
||||
scope @0 [1:9] deps=[read props$6.p0, read props$6.p1, read props$6.p2] out=[a$7_@0] {
|
||||
[1] Const mutate a$7_@0:TFunction[1:9] = Array []
|
||||
[2] Const mutate b$8_@0:TFunction[1:9] = Array []
|
||||
if (read b$8_@0:TFunction) {
|
||||
[1] Const mutate a$7_@0[1:9] = Array []
|
||||
[2] Const mutate b$8_@0[1:9] = Array []
|
||||
if (read b$8_@0) {
|
||||
[4] Call mutate a$7_@0.push(read props$6.p0)
|
||||
}
|
||||
if (read props$6.p1) {
|
||||
[7] Call mutate b$8_@0.push(read props$6.p2)
|
||||
}
|
||||
}
|
||||
scope @2 [9:10] deps=[freeze a$7_@0:TFunction, freeze b$8_@0:TFunction] out=[$16_@2] {
|
||||
[9] Const mutate $16_@2 = JSX <read Foo$4 a={freeze a$7_@0:TFunction} b={freeze b$8_@0:TFunction} ></read Foo$4>
|
||||
scope @2 [9:10] deps=[freeze a$7_@0, freeze b$8_@0] out=[$16_@2] {
|
||||
[9] Const mutate $16_@2 = JSX <read Foo$4 a={freeze a$7_@0} b={freeze b$8_@0} ></read Foo$4>
|
||||
}
|
||||
return read $16_@2
|
||||
}
|
||||
@@ -129,9 +129,9 @@ function Component$0(props$6) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
[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)
|
||||
[1] Const mutate a$9_@0[1:10] = Array []
|
||||
[2] Const mutate b$10_@0[1:10] = Array []
|
||||
[3] Const mutate $11_@0[1:10] = Call mutate mayMutate$4:TFunction(mutate b$10_@0)
|
||||
[4] If (read $11_@0) then:bb2 else:bb1 fallthrough=bb1
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
@@ -146,7 +146,7 @@ bb4:
|
||||
[9] Goto bb3
|
||||
bb3:
|
||||
predecessor blocks: bb4 bb1
|
||||
[10] Const mutate t6$19_@2 = JSX <read Foo$6 a={freeze a$9_@0:TFunction} b={freeze b$10_@0:TFunction} ></read Foo$6>
|
||||
[10] Const mutate t6$19_@2 = JSX <read Foo$6 a={freeze a$9_@0} b={freeze b$10_@0} ></read Foo$6>
|
||||
[11] Return read t6$19_@2
|
||||
```
|
||||
|
||||
@@ -157,9 +157,9 @@ function Component(
|
||||
props,
|
||||
) {
|
||||
scope @0 [1:10] deps=[read props$8.p0, read props$8.p1, read props$8.p2] out=[a$9_@0] {
|
||||
[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)
|
||||
[1] Const mutate a$9_@0[1:10] = Array []
|
||||
[2] Const mutate b$10_@0[1:10] = Array []
|
||||
[3] Const mutate $11_@0[1:10] = Call mutate mayMutate$4:TFunction(mutate b$10_@0)
|
||||
if (read $11_@0) {
|
||||
[5] Call mutate a$9_@0.push(read props$8.p0)
|
||||
}
|
||||
@@ -167,8 +167,8 @@ function Component(
|
||||
[8] Call mutate b$10_@0.push(read props$8.p2)
|
||||
}
|
||||
}
|
||||
scope @2 [10:11] deps=[freeze a$9_@0:TFunction, freeze b$10_@0:TFunction] out=[$19_@2] {
|
||||
[10] Const mutate $19_@2 = JSX <read Foo$6 a={freeze a$9_@0:TFunction} b={freeze b$10_@0:TFunction} ></read Foo$6>
|
||||
scope @2 [10:11] deps=[freeze a$9_@0, freeze b$10_@0] out=[$19_@2] {
|
||||
[10] Const mutate $19_@2 = JSX <read Foo$6 a={freeze a$9_@0} b={freeze b$10_@0} ></read Foo$6>
|
||||
}
|
||||
return read $19_@2
|
||||
}
|
||||
|
||||
@@ -22,22 +22,22 @@ function foo(a, b) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
[1] Const mutate x$8_@0:TFunction[1:3] = Array []
|
||||
[1] Const mutate x$8_@0[1:3] = Array []
|
||||
[2] Call mutate x$8_@0.push(read a$6)
|
||||
[3] Const mutate $9:TPrimitive = "div"
|
||||
[4] JSX <read $9:TPrimitive>{freeze x$8_@0:TFunction}</read $9:TPrimitive>
|
||||
[5] Const mutate y$10_@1:TFunction[5:12] = Array []
|
||||
[4] JSX <read $9:TPrimitive>{freeze x$8_@0}</read $9:TPrimitive>
|
||||
[5] Const mutate y$10_@1[5:12] = Array []
|
||||
[6] If (read x$8_@0.length) then:bb2 else:bb1 fallthrough=bb1
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
[7] Call mutate y$10_@1.push(read x$8_@0:TFunction)
|
||||
[7] Call mutate y$10_@1.push(read x$8_@0)
|
||||
[8] Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb2 bb0
|
||||
[9] If (read b$7:TFunction) then:bb4 else:bb3 fallthrough=bb3
|
||||
[9] If (read b$7) then:bb4 else:bb3 fallthrough=bb3
|
||||
bb4:
|
||||
predecessor blocks: bb1
|
||||
[10] Call mutate y$10_@1.push(read b$7:TFunction)
|
||||
[10] Call mutate y$10_@1.push(read b$7)
|
||||
[11] Goto bb3
|
||||
bb3:
|
||||
predecessor blocks: bb4 bb1
|
||||
@@ -52,18 +52,18 @@ function foo(
|
||||
b,
|
||||
) {
|
||||
scope @0 [1:3] deps=[read a$6] out=[x$8_@0] {
|
||||
[1] Const mutate x$8_@0:TFunction[1:3] = Array []
|
||||
[1] Const mutate x$8_@0[1:3] = Array []
|
||||
[2] Call mutate x$8_@0.push(read a$6)
|
||||
}
|
||||
[3] Const mutate $9:TPrimitive = "div"
|
||||
[4] JSX <read $9:TPrimitive>{freeze x$8_@0:TFunction}</read $9:TPrimitive>
|
||||
scope @1 [5:12] deps=[read x$8_@0:TFunction, read b$7:TFunction] out=[] {
|
||||
[5] Const mutate y$10_@1:TFunction[5:12] = Array []
|
||||
[4] JSX <read $9:TPrimitive>{freeze x$8_@0}</read $9:TPrimitive>
|
||||
scope @1 [5:12] deps=[read x$8_@0, read b$7] out=[] {
|
||||
[5] Const mutate y$10_@1[5:12] = Array []
|
||||
if (read x$8_@0.length) {
|
||||
[7] Call mutate y$10_@1.push(read x$8_@0:TFunction)
|
||||
[7] Call mutate y$10_@1.push(read x$8_@0)
|
||||
}
|
||||
if (read b$7:TFunction) {
|
||||
[10] Call mutate y$10_@1.push(read b$7:TFunction)
|
||||
if (read b$7) {
|
||||
[10] Call mutate y$10_@1.push(read b$7)
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
@@ -24,9 +24,9 @@ function foo(x, y, z) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
[1] Const mutate items$9_@0:TFunction[1:10] = Array [read z$8]
|
||||
[1] Const mutate items$9_@0[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 []
|
||||
[3] Const mutate items2$10_@1[3:7] = Array []
|
||||
[4] If (read x$6) then:bb2 else:bb1 fallthrough=bb1
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
@@ -41,7 +41,7 @@ bb4:
|
||||
[9] Goto bb3
|
||||
bb3:
|
||||
predecessor blocks: bb4 bb1
|
||||
[10] Return freeze items2$10_@1:TFunction
|
||||
[10] Return freeze items2$10_@1
|
||||
```
|
||||
|
||||
## Reactive Scopes
|
||||
@@ -53,10 +53,10 @@ function foo(
|
||||
z,
|
||||
) {
|
||||
scope @0 [1:10] deps=[read z$8, read x$6, read y$7] out=[] {
|
||||
[1] Const mutate items$9_@0:TFunction[1:10] = Array [read z$8]
|
||||
[1] Const mutate items$9_@0[1:10] = Array [read z$8]
|
||||
[2] Call mutate items$9_@0.push(read x$6)
|
||||
scope @1 [3:7] deps=[read x$6, read y$7] out=[items2$10_@1] {
|
||||
[3] Const mutate items2$10_@1:TFunction[3:7] = Array []
|
||||
[3] Const mutate items2$10_@1[3:7] = Array []
|
||||
if (read x$6) {
|
||||
[5] Call mutate items2$10_@1.push(read y$7)
|
||||
}
|
||||
@@ -65,7 +65,7 @@ function foo(
|
||||
[8] Call mutate items$9_@0.push(read x$6)
|
||||
}
|
||||
}
|
||||
return freeze items2$10_@1:TFunction
|
||||
return freeze items2$10_@1
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
@@ -23,7 +23,7 @@ function foo(a, b, c) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
[1] Const mutate x$10_@0:TFunction[1:8] = Array []
|
||||
[1] Const mutate x$10_@0[1:8] = Array []
|
||||
[2] If (read a$7) then:bb2 else:bb1 fallthrough=bb1
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
@@ -57,7 +57,7 @@ function foo(
|
||||
c,
|
||||
) {
|
||||
scope @0 [1:8] deps=[read a$7, read b$8, read c$9] out=[] {
|
||||
[1] Const mutate x$10_@0:TFunction[1:8] = Array []
|
||||
[1] Const mutate x$10_@0[1:8] = Array []
|
||||
if (read a$7) {
|
||||
if (read b$8) {
|
||||
if (read c$9) {
|
||||
|
||||
@@ -18,7 +18,7 @@ function foo(a, b, c) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
[1] Const mutate y$8_@0:TFunction[1:6] = Array []
|
||||
[1] Const mutate y$8_@0[1:6] = Array []
|
||||
[2] If (read a$5) then:bb3 else:bb1 fallthrough=bb1
|
||||
bb3:
|
||||
predecessor blocks: bb0
|
||||
@@ -41,7 +41,7 @@ function foo(
|
||||
c,
|
||||
) {
|
||||
scope @0 [1:6] deps=[read a$5, read b$6, read c$7] out=[] {
|
||||
[1] Const mutate y$8_@0:TFunction[1:6] = Array []
|
||||
[1] Const mutate y$8_@0[1:6] = Array []
|
||||
if (read a$5) {
|
||||
if (read b$6) {
|
||||
[4] Call mutate y$8_@0.push(read c$7)
|
||||
|
||||
@@ -94,7 +94,7 @@ function cond$0(x$2) {}
|
||||
bb0:
|
||||
[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 { }
|
||||
[3] Let mutate c$22_@0[1:23] = Object { }
|
||||
[4] Let mutate d$24_@0[1:23] = Object { }
|
||||
[5] While test=bb1 loop=bb3 fallthrough=bb2
|
||||
bb1:
|
||||
@@ -105,8 +105,8 @@ bb3:
|
||||
predecessor blocks: bb1
|
||||
[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
|
||||
[10] Reassign mutate b$20_@0[1:23] = read c$22_@0
|
||||
[11] Reassign mutate c$22_@0[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)
|
||||
@@ -122,7 +122,7 @@ bb7:
|
||||
[18] If (read b$20_@0) then:bb9 else:bb9 fallthrough=bb9
|
||||
bb9:
|
||||
predecessor blocks: bb7
|
||||
[19] If (read c$22_@0:TPrimitive) then:bb11 else:bb11 fallthrough=bb11
|
||||
[19] If (read c$22_@0) then:bb11 else:bb11 fallthrough=bb11
|
||||
bb11:
|
||||
predecessor blocks: bb9
|
||||
[20] If (read d$24_@0) then:bb13 else:bb13 fallthrough=bb13
|
||||
@@ -142,7 +142,7 @@ function Component(
|
||||
scope @0 [1:23] deps=[] out=[] {
|
||||
[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 { }
|
||||
[3] Let mutate c$22_@0[1:23] = Object { }
|
||||
[4] Let mutate d$24_@0[1:23] = Object { }
|
||||
while (
|
||||
[6] Const mutate $17:TPrimitive = true
|
||||
@@ -150,8 +150,8 @@ function Component(
|
||||
) {
|
||||
[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
|
||||
[10] Reassign mutate b$20_@0[1:23] = read c$22_@0
|
||||
[11] Reassign mutate c$22_@0[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)
|
||||
@@ -163,7 +163,7 @@ function Component(
|
||||
}
|
||||
if (read b$20_@0) {
|
||||
}
|
||||
if (read c$22_@0:TPrimitive) {
|
||||
if (read c$22_@0) {
|
||||
}
|
||||
if (read d$24_@0) {
|
||||
}
|
||||
|
||||
+6
-6
@@ -19,9 +19,9 @@ function foo(a, b, c) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
[1] Const mutate x$9_@0:TFunction[1:6] = Array []
|
||||
[2] Const mutate y$10_@0:TFunction[1:6] = Array []
|
||||
[3] If (read x$9_@0:TFunction) then:bb1 else:bb1 fallthrough=bb1
|
||||
[1] Const mutate x$9_@0[1:6] = Array []
|
||||
[2] Const mutate y$10_@0[1:6] = Array []
|
||||
[3] If (read x$9_@0) then:bb1 else:bb1 fallthrough=bb1
|
||||
bb1:
|
||||
predecessor blocks: bb0
|
||||
[4] Call mutate y$10_@0.push(read a$6)
|
||||
@@ -38,9 +38,9 @@ function foo(
|
||||
c,
|
||||
) {
|
||||
scope @0 [1:6] deps=[read a$6, read b$7] out=[] {
|
||||
[1] Const mutate x$9_@0:TFunction[1:6] = Array []
|
||||
[2] Const mutate y$10_@0:TFunction[1:6] = Array []
|
||||
if (read x$9_@0:TFunction) {
|
||||
[1] Const mutate x$9_@0[1:6] = Array []
|
||||
[2] Const mutate y$10_@0[1:6] = Array []
|
||||
if (read x$9_@0) {
|
||||
}
|
||||
[4] Call mutate y$10_@0.push(read a$6)
|
||||
[5] Call mutate x$9_@0.push(read b$7)
|
||||
|
||||
@@ -15,8 +15,8 @@ function foo(a, b) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
[1] Const mutate x$7_@0:TFunction[1:5] = Array []
|
||||
[2] Const mutate y$8_@0:TFunction[1:5] = Array []
|
||||
[1] Const mutate x$7_@0[1:5] = Array []
|
||||
[2] Const mutate y$8_@0[1:5] = Array []
|
||||
[3] Call mutate x$7_@0.push(read a$5)
|
||||
[4] Call mutate y$8_@0.push(read b$6)
|
||||
[5] Return
|
||||
@@ -30,8 +30,8 @@ function foo(
|
||||
b,
|
||||
) {
|
||||
scope @0 [1:5] deps=[read a$5, read b$6] out=[] {
|
||||
[1] Const mutate x$7_@0:TFunction[1:5] = Array []
|
||||
[2] Const mutate y$8_@0:TFunction[1:5] = Array []
|
||||
[1] Const mutate x$7_@0[1:5] = Array []
|
||||
[2] Const mutate y$8_@0[1:5] = Array []
|
||||
[3] Call mutate x$7_@0.push(read a$5)
|
||||
[4] Call mutate y$8_@0.push(read b$6)
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@ function foo(a, b) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
[1] Const mutate x$7_@0:TFunction[1:5] = Array []
|
||||
[2] Const mutate y$8_@1:TFunction[2:4] = Array []
|
||||
[1] Const mutate x$7_@0[1:5] = Array []
|
||||
[2] Const mutate y$8_@1[2:4] = Array []
|
||||
[3] Call mutate y$8_@1.push(read b$6)
|
||||
[4] Call mutate x$7_@0.push(read a$5)
|
||||
[5] Return
|
||||
@@ -30,9 +30,9 @@ function foo(
|
||||
b,
|
||||
) {
|
||||
scope @0 [1:5] deps=[read b$6, read a$5] out=[] {
|
||||
[1] Const mutate x$7_@0:TFunction[1:5] = Array []
|
||||
[1] Const mutate x$7_@0[1:5] = Array []
|
||||
scope @1 [2:4] deps=[read b$6] out=[] {
|
||||
[2] Const mutate y$8_@1:TFunction[2:4] = Array []
|
||||
[2] Const mutate y$8_@1[2:4] = Array []
|
||||
[3] Call mutate y$8_@1.push(read b$6)
|
||||
}
|
||||
[4] Call mutate x$7_@0.push(read a$5)
|
||||
|
||||
+9
-9
@@ -21,11 +21,11 @@ function foo(a, b, c) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
[1] Const mutate x$11_@0:TFunction[1:11] = Array []
|
||||
[1] Const mutate x$11_@0[1:11] = Array []
|
||||
[2] If (read a$8) then:bb2 else:bb1 fallthrough=bb1
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
[3] Const mutate y$12_@1:TFunction[3:7] = Array []
|
||||
[3] Const mutate y$12_@1[3:7] = Array []
|
||||
[4] If (read b$9) then:bb4 else:bb3 fallthrough=bb3
|
||||
bb4:
|
||||
predecessor blocks: bb2
|
||||
@@ -34,12 +34,12 @@ bb4:
|
||||
bb3:
|
||||
predecessor blocks: bb4 bb2
|
||||
[7] Const mutate $13:TPrimitive = "div"
|
||||
[8] Const mutate t8$15_@2 = JSX <read $13:TPrimitive>{freeze y$12_@1:TFunction}</read $13:TPrimitive>
|
||||
[8] Const mutate t8$15_@2 = JSX <read $13:TPrimitive>{freeze y$12_@1}</read $13:TPrimitive>
|
||||
[9] Call mutate x$11_@0.push(read t8$15_@2)
|
||||
[10] Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb3 bb0
|
||||
[11] Return freeze x$11_@0:TFunction
|
||||
[11] Return freeze x$11_@0
|
||||
```
|
||||
|
||||
## Reactive Scopes
|
||||
@@ -51,22 +51,22 @@ function foo(
|
||||
c,
|
||||
) {
|
||||
scope @0 [1:11] deps=[read a$8, read b$9, read c$10] out=[x$11_@0] {
|
||||
[1] Const mutate x$11_@0:TFunction[1:11] = Array []
|
||||
[1] Const mutate x$11_@0[1:11] = Array []
|
||||
if (read a$8) {
|
||||
scope @1 [3:7] deps=[read b$9, read c$10] out=[y$12_@1] {
|
||||
[3] Const mutate y$12_@1:TFunction[3:7] = Array []
|
||||
[3] Const mutate y$12_@1[3:7] = Array []
|
||||
if (read b$9) {
|
||||
[5] Call mutate y$12_@1.push(read c$10)
|
||||
}
|
||||
}
|
||||
[7] Const mutate $13:TPrimitive = "div"
|
||||
scope @2 [8:9] deps=[freeze y$12_@1:TFunction] out=[$15_@2] {
|
||||
[8] Const mutate $15_@2 = JSX <read $13:TPrimitive>{freeze y$12_@1:TFunction}</read $13:TPrimitive>
|
||||
scope @2 [8:9] deps=[freeze y$12_@1] out=[$15_@2] {
|
||||
[8] Const mutate $15_@2 = JSX <read $13:TPrimitive>{freeze y$12_@1}</read $13:TPrimitive>
|
||||
}
|
||||
[9] Call mutate x$11_@0.push(read $15_@2)
|
||||
}
|
||||
}
|
||||
return freeze x$11_@0:TFunction
|
||||
return freeze x$11_@0
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
@@ -17,8 +17,8 @@ function foo(a, b, c) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
[1] Const mutate x$9_@0:TFunction[1:8] = Array []
|
||||
[2] Const mutate y$10_@0:TFunction[1:8] = Array []
|
||||
[1] Const mutate x$9_@0[1:8] = Array []
|
||||
[2] Const mutate y$10_@0[1:8] = Array []
|
||||
[3] While test=bb1 loop=bb3 fallthrough=bb2
|
||||
bb1:
|
||||
predecessor blocks: bb0 bb3
|
||||
@@ -42,8 +42,8 @@ function foo(
|
||||
c,
|
||||
) {
|
||||
scope @0 [1:8] deps=[read c$8, read b$7, read a$6] out=[] {
|
||||
[1] Const mutate x$9_@0:TFunction[1:8] = Array []
|
||||
[2] Const mutate y$10_@0:TFunction[1:8] = Array []
|
||||
[1] Const mutate x$9_@0[1:8] = Array []
|
||||
[2] Const mutate y$10_@0[1:8] = Array []
|
||||
while (
|
||||
read c$8
|
||||
) {
|
||||
|
||||
+8
-8
@@ -21,11 +21,11 @@ function foo(a, b, c) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
[1] Const mutate x$9_@0:TFunction[1:9] = Array []
|
||||
[1] Const mutate x$9_@0[1:9] = Array []
|
||||
[2] If (read a$6) then:bb2 else:bb1 fallthrough=bb1
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
[3] Const mutate y$10_@0:TFunction[1:9] = Array []
|
||||
[3] Const mutate y$10_@0[1:9] = Array []
|
||||
[4] If (read b$7) then:bb4 else:bb3 fallthrough=bb3
|
||||
bb4:
|
||||
predecessor blocks: bb2
|
||||
@@ -33,11 +33,11 @@ bb4:
|
||||
[6] Goto bb3
|
||||
bb3:
|
||||
predecessor blocks: bb4 bb2
|
||||
[7] Call mutate x$9_@0.push(mutate y$10_@0:TFunction)
|
||||
[7] Call mutate x$9_@0.push(mutate y$10_@0)
|
||||
[8] Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb3 bb0
|
||||
[9] Return freeze x$9_@0:TFunction
|
||||
[9] Return freeze x$9_@0
|
||||
```
|
||||
|
||||
## Reactive Scopes
|
||||
@@ -49,16 +49,16 @@ function foo(
|
||||
c,
|
||||
) {
|
||||
scope @0 [1:9] deps=[read a$6, read b$7, read c$8] out=[x$9_@0] {
|
||||
[1] Const mutate x$9_@0:TFunction[1:9] = Array []
|
||||
[1] Const mutate x$9_@0[1:9] = Array []
|
||||
if (read a$6) {
|
||||
[3] Const mutate y$10_@0:TFunction[1:9] = Array []
|
||||
[3] Const mutate y$10_@0[1:9] = Array []
|
||||
if (read b$7) {
|
||||
[5] Call mutate y$10_@0.push(read c$8)
|
||||
}
|
||||
[7] Call mutate x$9_@0.push(mutate y$10_@0:TFunction)
|
||||
[7] Call mutate x$9_@0.push(mutate y$10_@0)
|
||||
}
|
||||
}
|
||||
return freeze x$9_@0:TFunction
|
||||
return freeze x$9_@0
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
@@ -19,10 +19,10 @@ function foo() {
|
||||
```
|
||||
bb0:
|
||||
[1] Const mutate x$4_@0:TObject[1:6] = Object { }
|
||||
[2] Const mutate y$5_@1:TFunction[2:5] = Array []
|
||||
[2] Const mutate y$5_@1[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
|
||||
[5] Reassign mutate x$4_@0.y[1:6] = read y$5_@1
|
||||
[6] Return freeze x$4_@0:TObject
|
||||
```
|
||||
|
||||
@@ -34,11 +34,11 @@ function foo(
|
||||
scope @0 [1:6] deps=[] out=[x$4_@0] {
|
||||
[1] Const mutate x$4_@0:TObject[1:6] = Object { }
|
||||
scope @1 [2:5] deps=[] out=[y$5_@1] {
|
||||
[2] Const mutate y$5_@1:TFunction[2:5] = Array []
|
||||
[2] Const mutate y$5_@1[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
|
||||
[5] Reassign mutate x$4_@0.y[1:6] = read y$5_@1
|
||||
}
|
||||
return freeze x$4_@0:TObject
|
||||
}
|
||||
|
||||
@@ -20,14 +20,14 @@ function foo(a, b, c) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
[1] Const mutate x$11_@0:TFunction[1:11] = Array []
|
||||
[1] Const mutate x$11_@0[1:11] = Array []
|
||||
[2] If (read a$8) then:bb2 else:bb3 fallthrough=bb1
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
[3] Const mutate y$12_@1:TFunction[3:5] = Array []
|
||||
[3] Const mutate y$12_@1[3:5] = Array []
|
||||
[4] Call mutate y$12_@1.push(read b$9)
|
||||
[5] Const mutate $13:TPrimitive = "div"
|
||||
[6] Const mutate t7$14_@2 = JSX <read $13:TPrimitive>{freeze y$12_@1:TFunction}</read $13:TPrimitive>
|
||||
[6] Const mutate t7$14_@2 = JSX <read $13:TPrimitive>{freeze y$12_@1}</read $13:TPrimitive>
|
||||
[7] Call mutate x$11_@0.push(read t7$14_@2)
|
||||
[8] Goto bb1
|
||||
bb3:
|
||||
@@ -36,7 +36,7 @@ bb3:
|
||||
[10] Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb2 bb3
|
||||
[11] Return freeze x$11_@0:TFunction
|
||||
[11] Return freeze x$11_@0
|
||||
```
|
||||
|
||||
## Reactive Scopes
|
||||
@@ -48,22 +48,22 @@ function foo(
|
||||
c,
|
||||
) {
|
||||
scope @0 [1:11] deps=[read a$8, read b$9, read c$10] out=[x$11_@0] {
|
||||
[1] Const mutate x$11_@0:TFunction[1:11] = Array []
|
||||
[1] Const mutate x$11_@0[1:11] = Array []
|
||||
if (read a$8) {
|
||||
scope @1 [3:5] deps=[read b$9] out=[y$12_@1] {
|
||||
[3] Const mutate y$12_@1:TFunction[3:5] = Array []
|
||||
[3] Const mutate y$12_@1[3:5] = Array []
|
||||
[4] Call mutate y$12_@1.push(read b$9)
|
||||
}
|
||||
[5] Const mutate $13:TPrimitive = "div"
|
||||
scope @2 [6:7] deps=[freeze y$12_@1:TFunction] out=[$14_@2] {
|
||||
[6] Const mutate $14_@2 = JSX <read $13:TPrimitive>{freeze y$12_@1:TFunction}</read $13:TPrimitive>
|
||||
scope @2 [6:7] deps=[freeze y$12_@1] out=[$14_@2] {
|
||||
[6] Const mutate $14_@2 = JSX <read $13:TPrimitive>{freeze y$12_@1}</read $13:TPrimitive>
|
||||
}
|
||||
[7] Call mutate x$11_@0.push(read $14_@2)
|
||||
} else {
|
||||
[9] Call mutate x$11_@0.push(read c$10)
|
||||
}
|
||||
}
|
||||
return freeze x$11_@0:TFunction
|
||||
return freeze x$11_@0
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
@@ -19,7 +19,7 @@ function f(a, b) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
[1] Const mutate x$10_@0:TFunction[1:8] = Array []
|
||||
[1] Const mutate x$10_@0[1:8] = Array []
|
||||
[2] Const mutate $11:TPrimitive = 1
|
||||
[3] Const mutate $12:TPrimitive = Binary read a$8.length === read $11:TPrimitive
|
||||
[4] If (read $12:TPrimitive) then:bb2 else:bb1 fallthrough=bb1
|
||||
@@ -33,7 +33,7 @@ bb4:
|
||||
bb1:
|
||||
predecessor blocks: bb4 bb2 bb0
|
||||
[8] Const mutate $13:TPrimitive = "div"
|
||||
[9] Const mutate t4$15_@1 = JSX <read $13:TPrimitive>{freeze x$10_@0:TFunction}</read $13:TPrimitive>
|
||||
[9] Const mutate t4$15_@1 = JSX <read $13:TPrimitive>{freeze x$10_@0}</read $13:TPrimitive>
|
||||
[10] Return read t4$15_@1
|
||||
```
|
||||
|
||||
@@ -45,7 +45,7 @@ function f(
|
||||
b,
|
||||
) {
|
||||
scope @0 [1:8] deps=[read a$8.length, read b$9] out=[x$10_@0] {
|
||||
[1] Const mutate x$10_@0:TFunction[1:8] = Array []
|
||||
[1] Const mutate x$10_@0[1:8] = Array []
|
||||
[2] Const mutate $11:TPrimitive = 1
|
||||
[3] Const mutate $12:TPrimitive = Binary read a$8.length === read $11:TPrimitive
|
||||
if (read $12:TPrimitive) {
|
||||
@@ -55,8 +55,8 @@ function f(
|
||||
}
|
||||
}
|
||||
[8] Const mutate $13:TPrimitive = "div"
|
||||
scope @1 [9:10] deps=[freeze x$10_@0:TFunction] out=[$15_@1] {
|
||||
[9] Const mutate $15_@1 = JSX <read $13:TPrimitive>{freeze x$10_@0:TFunction}</read $13:TPrimitive>
|
||||
scope @1 [9:10] deps=[freeze x$10_@0] out=[$15_@1] {
|
||||
[9] Const mutate $15_@1 = JSX <read $13:TPrimitive>{freeze x$10_@0}</read $13:TPrimitive>
|
||||
}
|
||||
return read $15_@1
|
||||
}
|
||||
|
||||
@@ -23,19 +23,19 @@ function Component(props) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
[1] Let mutate x$7_@0:TFunction[1:7] = Array []
|
||||
[1] Let mutate x$7_@0[1:7] = Array []
|
||||
[2] Call mutate x$7_@0.push(read props$6.p0)
|
||||
[3] Const mutate y$8:TFunction = read x$7_@0:TFunction
|
||||
[3] Const mutate y$8 = read x$7_@0
|
||||
[4] If (read props$6.p1) then:bb2 else:bb1 fallthrough=bb1
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
[5] Reassign mutate x$7_@0:TFunction[1:7] = Array []
|
||||
[5] Reassign mutate x$7_@0[1:7] = Array []
|
||||
[6] Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb2 bb0
|
||||
[7] Const mutate _$12_@1 = JSX <read Component$0 x={freeze x$7_@0:TFunction} ></read Component$0>
|
||||
[7] Const mutate _$12_@1 = JSX <read Component$0 x={freeze x$7_@0} ></read Component$0>
|
||||
[8] Call read y$8.push(read props$6.p2)
|
||||
[9] Const mutate t6$15_@2 = JSX <read Component$0 x={read x$7_@0:TFunction} y={read y$8:TFunction} ></read Component$0>
|
||||
[9] Const mutate t6$15_@2 = JSX <read Component$0 x={read x$7_@0} y={read y$8} ></read Component$0>
|
||||
[10] Return read t6$15_@2
|
||||
```
|
||||
|
||||
@@ -46,19 +46,19 @@ function Component(
|
||||
props,
|
||||
) {
|
||||
scope @0 [1:7] deps=[read props$6.p0, read props$6.p1] out=[x$7_@0] {
|
||||
[1] Let mutate x$7_@0:TFunction[1:7] = Array []
|
||||
[1] Let mutate x$7_@0[1:7] = Array []
|
||||
[2] Call mutate x$7_@0.push(read props$6.p0)
|
||||
[3] Const mutate y$8:TFunction = read x$7_@0:TFunction
|
||||
[3] Const mutate y$8 = read x$7_@0
|
||||
if (read props$6.p1) {
|
||||
[5] Reassign mutate x$7_@0:TFunction[1:7] = Array []
|
||||
[5] Reassign mutate x$7_@0[1:7] = Array []
|
||||
}
|
||||
}
|
||||
scope @1 [7:8] deps=[freeze x$7_@0:TFunction] out=[] {
|
||||
[7] Const mutate _$12_@1 = JSX <read Component$0 x={freeze x$7_@0:TFunction} ></read Component$0>
|
||||
scope @1 [7:8] deps=[freeze x$7_@0] out=[] {
|
||||
[7] Const mutate _$12_@1 = JSX <read Component$0 x={freeze x$7_@0} ></read Component$0>
|
||||
}
|
||||
[8] Call read y$8.push(read props$6.p2)
|
||||
scope @2 [9:10] deps=[read x$7_@0:TFunction, read y$8:TFunction] out=[$15_@2] {
|
||||
[9] Const mutate $15_@2 = JSX <read Component$0 x={read x$7_@0:TFunction} y={read y$8:TFunction} ></read Component$0>
|
||||
scope @2 [9:10] deps=[read x$7_@0, read y$8] out=[$15_@2] {
|
||||
[9] Const mutate $15_@2 = JSX <read Component$0 x={read x$7_@0} y={read y$8} ></read Component$0>
|
||||
}
|
||||
return read $15_@2
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ function foo(a, b, c) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
[1] Const mutate x$16_@0:TFunction[1:5] = Array []
|
||||
[1] Const mutate x$16_@0[1:5] = Array []
|
||||
[2] If (read a$13) then:bb2 else:bb1 fallthrough=bb1
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
@@ -43,21 +43,21 @@ bb2:
|
||||
bb1:
|
||||
predecessor blocks: bb2 bb0
|
||||
[5] Const mutate $17:TPrimitive = "div"
|
||||
[6] Const mutate y$19_@1 = JSX <read $17:TPrimitive>{freeze x$16_@0:TFunction}</read $17:TPrimitive>
|
||||
[6] Const mutate y$19_@1 = JSX <read $17:TPrimitive>{freeze x$16_@0}</read $17:TPrimitive>
|
||||
[7] Const mutate $20:TPrimitive = 0
|
||||
[8] Let mutate x$22_@2:TFunction[8:15] = undefined
|
||||
[8] Let mutate x$22_@2[8:15] = undefined
|
||||
[8] Switch (read b$14)
|
||||
Case read $20:TPrimitive: bb5
|
||||
Default: bb4
|
||||
Fallthrough: bb3
|
||||
bb5:
|
||||
predecessor blocks: bb1
|
||||
[9] Reassign mutate x$22_@2:TFunction[8:15] = Array []
|
||||
[9] Reassign mutate x$22_@2[8:15] = Array []
|
||||
[10] Call mutate x$22_@2.push(read b$14)
|
||||
[11] Goto bb3
|
||||
bb4:
|
||||
predecessor blocks: bb1
|
||||
[12] Reassign mutate x$22_@2:TFunction[8:15] = Array []
|
||||
[12] Reassign mutate x$22_@2[8:15] = Array []
|
||||
[13] Call mutate x$22_@2.push(read c$15)
|
||||
[14] Goto bb3
|
||||
bb3:
|
||||
@@ -66,7 +66,7 @@ bb3:
|
||||
[16] Const mutate $26 = "\n "
|
||||
[17] Const mutate $27 = "\n "
|
||||
[18] Const mutate $28 = "\n "
|
||||
[19] Const mutate t9$31_@3 = JSX <read $25:TPrimitive>{read $26}{read y$19_@1}{read $27}{freeze x$22_@2:TFunction}{read $28}</read $25:TPrimitive>
|
||||
[19] Const mutate t9$31_@3 = JSX <read $25:TPrimitive>{read $26}{read y$19_@1}{read $27}{freeze x$22_@2}{read $28}</read $25:TPrimitive>
|
||||
[20] Return read t9$31_@3
|
||||
```
|
||||
|
||||
@@ -79,26 +79,26 @@ function foo(
|
||||
c,
|
||||
) {
|
||||
scope @0 [1:5] deps=[read a$13] out=[x$16_@0] {
|
||||
[1] Const mutate x$16_@0:TFunction[1:5] = Array []
|
||||
[1] Const mutate x$16_@0[1:5] = Array []
|
||||
if (read a$13) {
|
||||
[3] Call mutate x$16_@0.push(read a$13)
|
||||
}
|
||||
}
|
||||
[5] Const mutate $17:TPrimitive = "div"
|
||||
scope @1 [6:7] deps=[freeze x$16_@0:TFunction] out=[y$19_@1] {
|
||||
[6] Const mutate y$19_@1 = JSX <read $17:TPrimitive>{freeze x$16_@0:TFunction}</read $17:TPrimitive>
|
||||
scope @1 [6:7] deps=[freeze x$16_@0] out=[y$19_@1] {
|
||||
[6] Const mutate y$19_@1 = JSX <read $17:TPrimitive>{freeze x$16_@0}</read $17:TPrimitive>
|
||||
}
|
||||
[7] Const mutate $20:TPrimitive = 0
|
||||
scope @2 [8:15] deps=[read b$14, read c$15] out=[x$22_@2] {
|
||||
[8] Let mutate x$22_@2:TFunction[8:15] = undefined
|
||||
[8] Let mutate x$22_@2[8:15] = undefined
|
||||
switch (read b$14) {
|
||||
case read $20:TPrimitive: {
|
||||
[9] Reassign mutate x$22_@2:TFunction[8:15] = Array []
|
||||
[9] Reassign mutate x$22_@2[8:15] = Array []
|
||||
[10] Call mutate x$22_@2.push(read b$14)
|
||||
break bb3
|
||||
}
|
||||
default: {
|
||||
[12] Reassign mutate x$22_@2:TFunction[8:15] = Array []
|
||||
[12] Reassign mutate x$22_@2[8:15] = Array []
|
||||
[13] Call mutate x$22_@2.push(read c$15)
|
||||
}
|
||||
}
|
||||
@@ -107,8 +107,8 @@ function foo(
|
||||
[16] Const mutate $26 = "\n "
|
||||
[17] Const mutate $27 = "\n "
|
||||
[18] Const mutate $28 = "\n "
|
||||
scope @3 [19:20] deps=[read y$19_@1, freeze x$22_@2:TFunction] out=[$31_@3] {
|
||||
[19] Const mutate $31_@3 = JSX <read $25:TPrimitive>{read $26}{read y$19_@1}{read $27}{freeze x$22_@2:TFunction}{read $28}</read $25:TPrimitive>
|
||||
scope @3 [19:20] deps=[read y$19_@1, freeze x$22_@2] out=[$31_@3] {
|
||||
[19] Const mutate $31_@3 = JSX <read $25:TPrimitive>{read $26}{read y$19_@1}{read $27}{freeze x$22_@2}{read $28}</read $25:TPrimitive>
|
||||
}
|
||||
return read $31_@3
|
||||
}
|
||||
|
||||
@@ -21,13 +21,13 @@ function Component(props) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
[1] Const mutate x$7_@0:TFunction[1:7] = Array []
|
||||
[1] Const mutate x$7_@0[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
|
||||
[3] Const mutate y$8_@0[1:7] = read x$7_@0
|
||||
[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 t7$11_@3 = JSX <read Component$0 x={read x$9_@1} y={freeze y$8_@0:TFunction} ></read Component$0>
|
||||
[7] Const mutate t7$11_@3 = JSX <read Component$0 x={read x$9_@1} y={freeze y$8_@0} ></read Component$0>
|
||||
[8] Return read t7$11_@3
|
||||
```
|
||||
|
||||
@@ -38,9 +38,9 @@ function Component(
|
||||
props,
|
||||
) {
|
||||
scope @0 [1:7] deps=[read props$6.p0, read props$6.p1] out=[y$8_@0] {
|
||||
[1] Const mutate x$7_@0:TFunction[1:7] = Array []
|
||||
[1] Const mutate x$7_@0[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
|
||||
[3] Const mutate y$8_@0[1:7] = read x$7_@0
|
||||
scope @1 [4:5] deps=[] out=[x$9_@1] {
|
||||
[4] Const mutate x$9_@1 = Array []
|
||||
}
|
||||
@@ -49,8 +49,8 @@ function Component(
|
||||
}
|
||||
[6] Call mutate y$8_@0.push(read props$6.p1)
|
||||
}
|
||||
scope @3 [7:8] deps=[read x$9_@1, freeze y$8_@0:TFunction] out=[$11_@3] {
|
||||
[7] Const mutate $11_@3 = JSX <read Component$0 x={read x$9_@1} y={freeze y$8_@0:TFunction} ></read Component$0>
|
||||
scope @3 [7:8] deps=[read x$9_@1, freeze y$8_@0] out=[$11_@3] {
|
||||
[7] Const mutate $11_@3 = JSX <read Component$0 x={read x$9_@1} y={freeze y$8_@0} ></read Component$0>
|
||||
}
|
||||
return read $11_@3
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ function Component(props) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
[1] Const mutate x$10_@1:TFunction[1:12] = Array []
|
||||
[1] Const mutate x$10_@1[1:12] = Array []
|
||||
[2] Let mutate y$11_@1:TPrimitive[1:12] = undefined
|
||||
[3] Const mutate $12:TPrimitive = false
|
||||
[4] Const mutate $13:TPrimitive = true
|
||||
@@ -50,11 +50,11 @@ bb6:
|
||||
[9] Goto bb1
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
[10] Reassign mutate y$11_@1:TPrimitive[1:12] = read x$10_@1:TFunction
|
||||
[10] Reassign mutate y$11_@1:TPrimitive[1:12] = read x$10_@1
|
||||
[11] Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb0 bb6 bb2
|
||||
[12] Const mutate child$19_@2 = JSX <read Component$0 data={freeze x$10_@1:TFunction} ></read Component$0>
|
||||
[12] Const mutate child$19_@2 = JSX <read Component$0 data={freeze x$10_@1} ></read Component$0>
|
||||
[13] Call read y$11_@1.push(read props$9.p4)
|
||||
[14] Const mutate t7$22_@3 = JSX <read Component$0 data={freeze y$11_@1:TPrimitive} >{read child$19_@2}</read Component$0>
|
||||
[15] Return read t7$22_@3
|
||||
@@ -67,7 +67,7 @@ function Component(
|
||||
props,
|
||||
) {
|
||||
scope @1 [1:12] deps=[read props$9.p0, read props$9.p2] out=[x$10_@1] {
|
||||
[1] Const mutate x$10_@1:TFunction[1:12] = Array []
|
||||
[1] Const mutate x$10_@1[1:12] = Array []
|
||||
[2] Let mutate y$11_@1:TPrimitive[1:12] = undefined
|
||||
[3] Const mutate $12:TPrimitive = false
|
||||
[4] Const mutate $13:TPrimitive = true
|
||||
@@ -85,12 +85,12 @@ function Component(
|
||||
break bb1
|
||||
}
|
||||
case read $12:TPrimitive: {
|
||||
[10] Reassign mutate y$11_@1:TPrimitive[1:12] = read x$10_@1:TFunction
|
||||
[10] Reassign mutate y$11_@1:TPrimitive[1:12] = read x$10_@1
|
||||
}
|
||||
}
|
||||
}
|
||||
scope @2 [12:13] deps=[freeze x$10_@1:TFunction] out=[child$19_@2] {
|
||||
[12] Const mutate child$19_@2 = JSX <read Component$0 data={freeze x$10_@1:TFunction} ></read Component$0>
|
||||
scope @2 [12:13] deps=[freeze x$10_@1] out=[child$19_@2] {
|
||||
[12] Const mutate child$19_@2 = JSX <read Component$0 data={freeze x$10_@1} ></read Component$0>
|
||||
}
|
||||
[13] Call read y$11_@1.push(read props$9.p4)
|
||||
scope @3 [14:15] deps=[freeze y$11_@1:TPrimitive, read child$19_@2] out=[$22_@3] {
|
||||
|
||||
@@ -27,7 +27,7 @@ function Component(props) {
|
||||
|
||||
```
|
||||
bb0:
|
||||
[1] Const mutate x$9_@1:TFunction[1:12] = Array []
|
||||
[1] Const mutate x$9_@1[1:12] = Array []
|
||||
[2] Let mutate y$10_@1:TPrimitive[1:12] = undefined
|
||||
[3] Const mutate $11:TPrimitive = false
|
||||
[4] Const mutate $12:TPrimitive = true
|
||||
@@ -44,11 +44,11 @@ bb4:
|
||||
[9] Goto bb2
|
||||
bb2:
|
||||
predecessor blocks: bb4 bb0
|
||||
[10] Reassign mutate y$10_@1:TPrimitive[1:12] = read x$9_@1:TFunction
|
||||
[10] Reassign mutate y$10_@1:TPrimitive[1:12] = read x$9_@1
|
||||
[11] Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb2 bb0
|
||||
[12] Const mutate child$19_@3 = JSX <read Component$0 data={freeze x$9_@1:TFunction} ></read Component$0>
|
||||
[12] Const mutate child$19_@3 = JSX <read Component$0 data={freeze x$9_@1} ></read Component$0>
|
||||
[13] Call read y$10_@1.push(read props$8.p4)
|
||||
[14] Const mutate t8$23_@4 = JSX <read Component$0 data={read y$10_@1:TPrimitive} >{read child$19_@3}</read Component$0>
|
||||
[15] Return read t8$23_@4
|
||||
@@ -61,7 +61,7 @@ function Component(
|
||||
props,
|
||||
) {
|
||||
scope @1 [1:12] deps=[read props$8.p0, read props$8.p2, read props$8.p3] out=[x$9_@1] {
|
||||
[1] Const mutate x$9_@1:TFunction[1:12] = Array []
|
||||
[1] Const mutate x$9_@1[1:12] = Array []
|
||||
[2] Let mutate y$10_@1:TPrimitive[1:12] = undefined
|
||||
[3] Const mutate $11:TPrimitive = false
|
||||
[4] Const mutate $12:TPrimitive = true
|
||||
@@ -74,12 +74,12 @@ function Component(
|
||||
}
|
||||
}
|
||||
case read $11:TPrimitive: {
|
||||
[10] Reassign mutate y$10_@1:TPrimitive[1:12] = read x$9_@1:TFunction
|
||||
[10] Reassign mutate y$10_@1:TPrimitive[1:12] = read x$9_@1
|
||||
}
|
||||
}
|
||||
}
|
||||
scope @3 [12:13] deps=[freeze x$9_@1:TFunction] out=[child$19_@3] {
|
||||
[12] Const mutate child$19_@3 = JSX <read Component$0 data={freeze x$9_@1:TFunction} ></read Component$0>
|
||||
scope @3 [12:13] deps=[freeze x$9_@1] out=[child$19_@3] {
|
||||
[12] Const mutate child$19_@3 = JSX <read Component$0 data={freeze x$9_@1} ></read Component$0>
|
||||
}
|
||||
[13] Call read y$10_@1.push(read props$8.p4)
|
||||
scope @4 [14:15] deps=[read y$10_@1:TPrimitive, read child$19_@3] out=[$23_@4] {
|
||||
|
||||
+2
-2
@@ -28,7 +28,7 @@ bb2:
|
||||
[6] Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb2 bb0
|
||||
[7] Const mutate z$12_@3:TPrimitive = Call mutate foo$2:TFunction()
|
||||
[7] Const mutate z$12_@3 = Call mutate foo$2:TFunction()
|
||||
[8] Return
|
||||
```
|
||||
|
||||
@@ -50,7 +50,7 @@ function component(
|
||||
}
|
||||
}
|
||||
scope @3 [7:8] deps=[] out=[] {
|
||||
[7] Const mutate z$12_@3:TPrimitive = Call mutate foo$2:TFunction()
|
||||
[7] Const mutate z$12_@3 = Call mutate foo$2:TFunction()
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user