mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
[hir] Add Effect.Store
Effect.Store is exactly like Effect.Mutate, the only difference is that Store aliases one into a another value. There is no practical difference between Effect.Mutate and Effect.Store currently.
This commit is contained in:
@@ -376,6 +376,8 @@ export enum Effect {
|
||||
Read = "read",
|
||||
// This reference may write to (mutate) the value
|
||||
Mutate = "mutate",
|
||||
// This reference may alias to (mutate) the value
|
||||
Store = "store",
|
||||
}
|
||||
|
||||
export type ReactiveScope = {
|
||||
|
||||
@@ -72,6 +72,7 @@ function inferPlace(place: Place, instr: Instruction) {
|
||||
case Effect.Read:
|
||||
case Effect.Freeze:
|
||||
return;
|
||||
case Effect.Store:
|
||||
case Effect.Mutate: {
|
||||
place.identifier.mutableRange.end = makeInstructionId(instr.id + 1);
|
||||
return;
|
||||
|
||||
@@ -270,6 +270,18 @@ class Environment {
|
||||
}
|
||||
break;
|
||||
}
|
||||
case Effect.Store: {
|
||||
// TODO(gsn): Uncomment the invariant once
|
||||
// https://github.com/facebook/react-forget/pull/908#discussion_r1054294337
|
||||
// is fixed.
|
||||
//
|
||||
// invariant(
|
||||
// valueKind === ValueKind.Mutable,
|
||||
// `expected valueKind to be 'Mutable' but found to be '${valueKind}'`
|
||||
// );
|
||||
effect = Effect.Store;
|
||||
break;
|
||||
}
|
||||
case Effect.Read: {
|
||||
effect = Effect.Read;
|
||||
break;
|
||||
@@ -575,10 +587,10 @@ function inferBlock(env: Environment, block: BasicBlock) {
|
||||
env.define(lvalue.place, instrValue);
|
||||
} else if (instrValue.memberPath === null) {
|
||||
// no-op: `a.b.c = d`
|
||||
env.reference(lvalue.place, Effect.Mutate);
|
||||
env.reference(lvalue.place, Effect.Store);
|
||||
} else {
|
||||
// no-op: `a.b.c = d.e.f`
|
||||
env.reference(lvalue.place, Effect.Mutate);
|
||||
env.reference(lvalue.place, Effect.Store);
|
||||
}
|
||||
}
|
||||
continue;
|
||||
|
||||
+4
-4
@@ -19,9 +19,9 @@ function component() {
|
||||
bb0:
|
||||
[1] Const mutate z$5_@0[1:7] = Array []
|
||||
[2] Const mutate y$6_@0:TObject[1:7] = Object { }
|
||||
[3] Reassign mutate y$6_@0.z[1:7] = read z$5_@0
|
||||
[3] Reassign store y$6_@0.z[1:7] = read z$5_@0
|
||||
[4] Const mutate x$7_@0:TObject[1:7] = Object { }
|
||||
[5] Reassign mutate x$7_@0.y[1:7] = read y$6_@0:TObject
|
||||
[5] Reassign store x$7_@0.y[1:7] = read y$6_@0:TObject
|
||||
[6] Call mutate mutate$4:TFunction(mutate x$7_@0.y.z)
|
||||
[7] Return
|
||||
```
|
||||
@@ -33,9 +33,9 @@ function component(
|
||||
) {
|
||||
[1] Const mutate z$5_@0[1:7] = Array []
|
||||
[2] Const mutate y$6_@0:TObject[1:7] = Object { }
|
||||
[3] Reassign mutate y$6_@0.z[1:7] = read z$5_@0
|
||||
[3] Reassign store y$6_@0.z[1:7] = read z$5_@0
|
||||
[4] Const mutate x$7_@0:TObject[1:7] = Object { }
|
||||
[5] Reassign mutate x$7_@0.y[1:7] = read y$6_@0:TObject
|
||||
[5] Reassign store x$7_@0.y[1:7] = read y$6_@0:TObject
|
||||
[6] Call mutate mutate$4:TFunction(mutate x$7_@0.y.z)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -19,9 +19,9 @@ function component() {
|
||||
bb0:
|
||||
[1] Const mutate z$4_@0 = Array []
|
||||
[2] Const mutate y$5_@1:TObject[2:4] = Object { }
|
||||
[3] Reassign mutate y$5_@1.z[2:4] = read z$4_@0
|
||||
[3] Reassign store y$5_@1.z[2:4] = read z$4_@0
|
||||
[4] Const mutate x$6_@2:TObject[4:6] = Object { }
|
||||
[5] Reassign mutate x$6_@2.y[4:6] = read y$5_@1:TObject
|
||||
[5] Reassign store x$6_@2.y[4:6] = read y$5_@1:TObject
|
||||
[6] Return freeze x$6_@2:TObject
|
||||
```
|
||||
|
||||
@@ -35,11 +35,11 @@ function component(
|
||||
}
|
||||
scope @1 [2:4] deps=[read z$4_@0] out=[y$5_@1] {
|
||||
[2] Const mutate y$5_@1:TObject[2:4] = Object { }
|
||||
[3] Reassign mutate y$5_@1.z[2:4] = read z$4_@0
|
||||
[3] Reassign store y$5_@1.z[2:4] = read z$4_@0
|
||||
}
|
||||
scope @2 [4:6] deps=[read y$5_@1:TObject] out=[x$6_@2] {
|
||||
[4] Const mutate x$6_@2:TObject[4:6] = Object { }
|
||||
[5] Reassign mutate x$6_@2.y[4:6] = read y$5_@1:TObject
|
||||
[5] Reassign store x$6_@2.y[4:6] = read y$5_@1:TObject
|
||||
}
|
||||
return freeze x$6_@2:TObject
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ function f$0() {
|
||||
bb0:
|
||||
[1] Const mutate $6:TPrimitive = 1
|
||||
[2] Const mutate $7:TPrimitive = Binary read a$5_@0.b.c + read $6:TPrimitive
|
||||
[3] Reassign read a$5_@0.b.c[0:6] = read $7:TPrimitive
|
||||
[3] Reassign store a$5_@0.b.c[0:6] = read $7:TPrimitive
|
||||
[4] Const mutate $8:TPrimitive = 2
|
||||
[5] Reassign mutate a$5_@0.b.c[0:6] = Binary read a$5_@0.b.c * read $8:TPrimitive
|
||||
[6] Return
|
||||
@@ -78,7 +78,7 @@ function g(
|
||||
) {
|
||||
[1] Const mutate $6:TPrimitive = 1
|
||||
[2] Const mutate $7:TPrimitive = Binary read a$5_@0.b.c + read $6:TPrimitive
|
||||
[3] Reassign read a$5_@0.b.c[0:6] = read $7:TPrimitive
|
||||
[3] Reassign store a$5_@0.b.c[0:6] = read $7:TPrimitive
|
||||
[4] Const mutate $8:TPrimitive = 2
|
||||
[5] Reassign mutate a$5_@0.b.c[0:6] = Binary read a$5_@0.b.c * read $8:TPrimitive
|
||||
return
|
||||
|
||||
+2
-2
@@ -18,7 +18,7 @@ function foo(a, b, c) {
|
||||
bb0:
|
||||
[1] Const mutate x$9_@0:TObject[1:4] = Object { a: read a$6 }
|
||||
[2] Const mutate t6$10_@1 = Array [read b$7, read c$8]
|
||||
[3] Reassign mutate x$9_@0.y[1:4] = read t6$10_@1
|
||||
[3] Reassign store x$9_@0.y[1:4] = read t6$10_@1
|
||||
[4] Return freeze x$9_@0:TObject
|
||||
```
|
||||
|
||||
@@ -35,7 +35,7 @@ function foo(
|
||||
scope @1 [2:3] deps=[read b$7, read c$8] out=[$10_@1] {
|
||||
[2] Const mutate $10_@1 = Array [read b$7, read c$8]
|
||||
}
|
||||
[3] Reassign mutate x$9_@0.y[1:4] = read $10_@1
|
||||
[3] Reassign store x$9_@0.y[1:4] = read $10_@1
|
||||
}
|
||||
return freeze x$9_@0:TObject
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ bb0:
|
||||
[3] Const mutate c$13_@2:TObject = Object { }
|
||||
[4] Const mutate d$14_@1:TObject[2:15] = Object { c: read c$13_@2:TObject }
|
||||
[5] Const mutate x$15_@1:TObject[2:15] = Object { }
|
||||
[6] Reassign mutate x$15_@1.b[2:15] = read b$12_@1
|
||||
[6] Reassign store x$15_@1.b[2:15] = read b$12_@1
|
||||
[7] Const mutate y$16_@1[2:15] = Call mutate mutate$8:TFunction(mutate x$15_@1:TObject, mutate d$14_@1:TObject)
|
||||
[8] If (read a$11_@0:TObject) then:bb1 else:bb1 fallthrough=bb1
|
||||
bb1:
|
||||
@@ -106,7 +106,7 @@ function Component(
|
||||
}
|
||||
[4] Const mutate d$14_@1:TObject[2:15] = Object { c: read c$13_@2:TObject }
|
||||
[5] Const mutate x$15_@1:TObject[2:15] = Object { }
|
||||
[6] Reassign mutate x$15_@1.b[2:15] = read b$12_@1
|
||||
[6] Reassign store x$15_@1.b[2:15] = read b$12_@1
|
||||
[7] Const mutate y$16_@1[2:15] = Call mutate mutate$8:TFunction(mutate x$15_@1:TObject, mutate d$14_@1:TObject)
|
||||
if (read a$11_@0:TObject) {
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ function Component(props) {
|
||||
bb0:
|
||||
[1] Const mutate x$7_@0:TObject[1:6] = Object { }
|
||||
[2] Const mutate y$8_@0[1:6] = Array []
|
||||
[3] Reassign mutate x$7_@0.y[1:6] = read y$8_@0
|
||||
[3] Reassign store x$7_@0.y[1:6] = read y$8_@0
|
||||
[4] Const mutate child$9_@0[1:6] = JSX <read Component$0 data={freeze y$8_@0} ></read Component$0>
|
||||
[5] Call mutate x$7_@0.y.push(read props$6.p0)
|
||||
[6] Const mutate t5$10_@1 = JSX <read Component$0 data={freeze x$7_@0:TObject} >{read child$9_@0}</read Component$0>
|
||||
@@ -35,7 +35,7 @@ function Component(
|
||||
scope @0 [1:6] deps=[read props$6.p0] out=[x$7_@0, child$9_@0] {
|
||||
[1] Const mutate x$7_@0:TObject[1:6] = Object { }
|
||||
[2] Const mutate y$8_@0[1:6] = Array []
|
||||
[3] Reassign mutate x$7_@0.y[1:6] = read y$8_@0
|
||||
[3] Reassign store x$7_@0.y[1:6] = read y$8_@0
|
||||
[4] Const mutate child$9_@0[1:6] = JSX <read Component$0 data={freeze y$8_@0} ></read Component$0>
|
||||
[5] Call mutate x$7_@0.y.push(read props$6.p0)
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ bb0:
|
||||
[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
|
||||
[5] Reassign store x$4_@0.y[1:6] = read y$5_@1
|
||||
[6] Return freeze x$4_@0:TObject
|
||||
```
|
||||
|
||||
@@ -38,7 +38,7 @@ function foo(
|
||||
[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
|
||||
[5] Reassign store x$4_@0.y[1:6] = read y$5_@1
|
||||
}
|
||||
return freeze x$4_@0:TObject
|
||||
}
|
||||
|
||||
+4
-4
@@ -28,12 +28,12 @@ bb0:
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
[4] Const mutate y$10_@0:TObject[1:11] = Object { }
|
||||
[5] Reassign mutate x$9_@0.y[1:11] = read y$10_@0:TObject
|
||||
[5] Reassign store x$9_@0.y[1:11] = read y$10_@0:TObject
|
||||
[6] Goto bb1
|
||||
bb3:
|
||||
predecessor blocks: bb0
|
||||
[7] Const mutate z$11_@0:TObject[1:11] = Object { }
|
||||
[8] Reassign mutate x$9_@0.z[1:11] = read z$11_@0:TObject
|
||||
[8] Reassign store x$9_@0.z[1:11] = read z$11_@0:TObject
|
||||
[9] Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb2 bb3
|
||||
@@ -52,10 +52,10 @@ function foo(
|
||||
[2] Const mutate x$9_@0:TObject[1:11] = read b$8_@0:TObject
|
||||
if (read a$7) {
|
||||
[4] Const mutate y$10_@0:TObject[1:11] = Object { }
|
||||
[5] Reassign mutate x$9_@0.y[1:11] = read y$10_@0:TObject
|
||||
[5] Reassign store x$9_@0.y[1:11] = read y$10_@0:TObject
|
||||
} else {
|
||||
[7] Const mutate z$11_@0:TObject[1:11] = Object { }
|
||||
[8] Reassign mutate x$9_@0.z[1:11] = read z$11_@0:TObject
|
||||
[8] Reassign store x$9_@0.z[1:11] = read z$11_@0:TObject
|
||||
}
|
||||
[10] Call mutate mutate$6:TFunction(mutate b$8_@0:TObject)
|
||||
}
|
||||
|
||||
@@ -25,12 +25,12 @@ bb0:
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
[3] Const mutate y$7_@1:TObject = Object { }
|
||||
[4] Reassign mutate x$6_@0.y[1:9] = read y$7_@1:TObject
|
||||
[4] Reassign store x$6_@0.y[1:9] = read y$7_@1:TObject
|
||||
[5] Goto bb1
|
||||
bb3:
|
||||
predecessor blocks: bb0
|
||||
[6] Const mutate z$8_@2:TObject = Object { }
|
||||
[7] Reassign mutate x$6_@0.z[1:9] = read z$8_@2:TObject
|
||||
[7] Reassign store x$6_@0.z[1:9] = read z$8_@2:TObject
|
||||
[8] Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb2 bb3
|
||||
@@ -49,12 +49,12 @@ function foo(
|
||||
scope @1 [3:4] deps=[] out=[y$7_@1] {
|
||||
[3] Const mutate y$7_@1:TObject = Object { }
|
||||
}
|
||||
[4] Reassign mutate x$6_@0.y[1:9] = read y$7_@1:TObject
|
||||
[4] Reassign store x$6_@0.y[1:9] = read y$7_@1:TObject
|
||||
} else {
|
||||
scope @2 [6:7] deps=[] out=[z$8_@2] {
|
||||
[6] Const mutate z$8_@2:TObject = Object { }
|
||||
}
|
||||
[7] Reassign mutate x$6_@0.z[1:9] = read z$8_@2:TObject
|
||||
[7] Reassign store x$6_@0.z[1:9] = read z$8_@2:TObject
|
||||
}
|
||||
}
|
||||
return freeze x$6_@0:TObject
|
||||
|
||||
@@ -26,12 +26,12 @@ bb0:
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
[3] Const mutate y$8_@0:TObject[1:10] = Object { }
|
||||
[4] Reassign mutate x$7_@0.y[1:10] = read y$8_@0:TObject
|
||||
[4] Reassign store x$7_@0.y[1:10] = read y$8_@0:TObject
|
||||
[5] Goto bb1
|
||||
bb3:
|
||||
predecessor blocks: bb0
|
||||
[6] Const mutate z$9_@0:TObject[1:10] = Object { }
|
||||
[7] Reassign mutate x$7_@0.z[1:10] = read z$9_@0:TObject
|
||||
[7] Reassign store x$7_@0.z[1:10] = read z$9_@0:TObject
|
||||
[8] Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb2 bb3
|
||||
@@ -49,10 +49,10 @@ function foo(
|
||||
[1] Const mutate x$7_@0:TObject[1:10] = Object { }
|
||||
if (read a$6) {
|
||||
[3] Const mutate y$8_@0:TObject[1:10] = Object { }
|
||||
[4] Reassign mutate x$7_@0.y[1:10] = read y$8_@0:TObject
|
||||
[4] Reassign store x$7_@0.y[1:10] = read y$8_@0:TObject
|
||||
} else {
|
||||
[6] Const mutate z$9_@0:TObject[1:10] = Object { }
|
||||
[7] Reassign mutate x$7_@0.z[1:10] = read z$9_@0:TObject
|
||||
[7] Reassign store x$7_@0.z[1:10] = read z$9_@0:TObject
|
||||
}
|
||||
[9] Call mutate mutate$5:TFunction(mutate x$7_@0:TObject)
|
||||
}
|
||||
|
||||
+4
-4
@@ -26,13 +26,13 @@ bb0:
|
||||
bb2:
|
||||
predecessor blocks: bb0
|
||||
[3] Const mutate y$8_@0:TObject[1:10] = Object { }
|
||||
[4] Reassign mutate x$7_@0.y[1:10] = read y$8_@0:TObject
|
||||
[4] Reassign store x$7_@0.y[1:10] = read y$8_@0:TObject
|
||||
[5] Call mutate mutate$4:TFunction(mutate y$8_@0:TObject)
|
||||
[6] Goto bb1
|
||||
bb3:
|
||||
predecessor blocks: bb0
|
||||
[7] Const mutate z$9_@1:TObject = Object { }
|
||||
[8] Reassign mutate x$7_@0.z[1:10] = read z$9_@1:TObject
|
||||
[8] Reassign store x$7_@0.z[1:10] = read z$9_@1:TObject
|
||||
[9] Goto bb1
|
||||
bb1:
|
||||
predecessor blocks: bb2 bb3
|
||||
@@ -49,13 +49,13 @@ function foo(
|
||||
[1] Const mutate x$7_@0:TObject[1:10] = Object { }
|
||||
if (read a$6) {
|
||||
[3] Const mutate y$8_@0:TObject[1:10] = Object { }
|
||||
[4] Reassign mutate x$7_@0.y[1:10] = read y$8_@0:TObject
|
||||
[4] Reassign store x$7_@0.y[1:10] = read y$8_@0:TObject
|
||||
[5] Call mutate mutate$4:TFunction(mutate y$8_@0:TObject)
|
||||
} else {
|
||||
scope @1 [7:8] deps=[] out=[z$9_@1] {
|
||||
[7] Const mutate z$9_@1:TObject = Object { }
|
||||
}
|
||||
[8] Reassign mutate x$7_@0.z[1:10] = read z$9_@1:TObject
|
||||
[8] Reassign store x$7_@0.z[1:10] = read z$9_@1:TObject
|
||||
}
|
||||
}
|
||||
return freeze x$7_@0:TObject
|
||||
|
||||
@@ -22,7 +22,7 @@ bb0:
|
||||
[1] Const mutate a$5_@0:TObject[1:6] = Object { }
|
||||
[2] Const mutate x$6_@0:TObject[1:6] = read a$5_@0:TObject
|
||||
[3] Const mutate y$7_@0:TObject[1:6] = Object { }
|
||||
[4] Reassign mutate y$7_@0.x[1:6] = read x$6_@0:TObject
|
||||
[4] Reassign store y$7_@0.x[1:6] = read x$6_@0:TObject
|
||||
[5] Call mutate mutate$4:TFunction(mutate a$5_@0:TObject)
|
||||
[6] Return freeze y$7_@0:TObject
|
||||
```
|
||||
@@ -36,7 +36,7 @@ function foo(
|
||||
[1] Const mutate a$5_@0:TObject[1:6] = Object { }
|
||||
[2] Const mutate x$6_@0:TObject[1:6] = read a$5_@0:TObject
|
||||
[3] Const mutate y$7_@0:TObject[1:6] = Object { }
|
||||
[4] Reassign mutate y$7_@0.x[1:6] = read x$6_@0:TObject
|
||||
[4] Reassign store y$7_@0.x[1:6] = read x$6_@0:TObject
|
||||
[5] Call mutate mutate$4:TFunction(mutate a$5_@0:TObject)
|
||||
}
|
||||
return freeze y$7_@0:TObject
|
||||
|
||||
@@ -18,7 +18,7 @@ function foo() {
|
||||
bb0:
|
||||
[1] Const mutate x$4_@0[1:5] = Array []
|
||||
[2] Const mutate y$5_@0:TObject[1:5] = Object { }
|
||||
[3] Reassign mutate y$5_@0.x[1:5] = read x$4_@0
|
||||
[3] Reassign store y$5_@0.x[1:5] = read x$4_@0
|
||||
[4] Call mutate mutate$3:TFunction(mutate x$4_@0)
|
||||
[5] Return freeze y$5_@0:TObject
|
||||
```
|
||||
@@ -31,7 +31,7 @@ function foo(
|
||||
scope @0 [1:5] deps=[] out=[y$5_@0] {
|
||||
[1] Const mutate x$4_@0[1:5] = Array []
|
||||
[2] Const mutate y$5_@0:TObject[1:5] = Object { }
|
||||
[3] Reassign mutate y$5_@0.x[1:5] = read x$4_@0
|
||||
[3] Reassign store y$5_@0.x[1:5] = read x$4_@0
|
||||
[4] Call mutate mutate$3:TFunction(mutate x$4_@0)
|
||||
}
|
||||
return freeze y$5_@0:TObject
|
||||
|
||||
@@ -22,7 +22,7 @@ bb0:
|
||||
[1] Const mutate a$5_@0:TObject[1:6] = Object { }
|
||||
[2] Const mutate y$6_@0:TObject[1:6] = read a$5_@0:TObject
|
||||
[3] Const mutate x$7_@0[1:6] = Array []
|
||||
[4] Reassign mutate y$6_@0.x[1:6] = read x$7_@0
|
||||
[4] Reassign store y$6_@0.x[1:6] = read x$7_@0
|
||||
[5] Call mutate mutate$4:TFunction(mutate a$5_@0:TObject)
|
||||
[6] Return freeze y$6_@0:TObject
|
||||
```
|
||||
@@ -36,7 +36,7 @@ function foo(
|
||||
[1] Const mutate a$5_@0:TObject[1:6] = Object { }
|
||||
[2] Const mutate y$6_@0:TObject[1:6] = read a$5_@0:TObject
|
||||
[3] Const mutate x$7_@0[1:6] = Array []
|
||||
[4] Reassign mutate y$6_@0.x[1:6] = read x$7_@0
|
||||
[4] Reassign store y$6_@0.x[1:6] = read x$7_@0
|
||||
[5] Call mutate mutate$4:TFunction(mutate a$5_@0:TObject)
|
||||
}
|
||||
return freeze y$6_@0:TObject
|
||||
|
||||
@@ -18,7 +18,7 @@ function foo() {
|
||||
bb0:
|
||||
[1] Const mutate x$4_@0[1:5] = Array []
|
||||
[2] Const mutate y$5_@0:TObject[1:5] = Object { }
|
||||
[3] Reassign mutate y$5_@0.x[1:5] = read x$4_@0
|
||||
[3] Reassign store y$5_@0.x[1:5] = read x$4_@0
|
||||
[4] Call mutate mutate$3:TFunction(mutate y$5_@0:TObject)
|
||||
[5] Return freeze y$5_@0:TObject
|
||||
```
|
||||
@@ -31,7 +31,7 @@ function foo(
|
||||
scope @0 [1:5] deps=[] out=[y$5_@0] {
|
||||
[1] Const mutate x$4_@0[1:5] = Array []
|
||||
[2] Const mutate y$5_@0:TObject[1:5] = Object { }
|
||||
[3] Reassign mutate y$5_@0.x[1:5] = read x$4_@0
|
||||
[3] Reassign store y$5_@0.x[1:5] = read x$4_@0
|
||||
[4] Call mutate mutate$3:TFunction(mutate y$5_@0:TObject)
|
||||
}
|
||||
return freeze y$5_@0:TObject
|
||||
|
||||
@@ -17,7 +17,7 @@ function foo() {
|
||||
bb0:
|
||||
[1] Const mutate x$3_@0 = Array []
|
||||
[2] Const mutate y$4_@1:TObject[2:4] = Object { }
|
||||
[3] Reassign mutate y$4_@1.x[2:4] = read x$3_@0
|
||||
[3] Reassign store y$4_@1.x[2:4] = read x$3_@0
|
||||
[4] Return freeze y$4_@1:TObject
|
||||
```
|
||||
|
||||
@@ -31,7 +31,7 @@ function foo(
|
||||
}
|
||||
scope @1 [2:4] deps=[read x$3_@0] out=[y$4_@1] {
|
||||
[2] Const mutate y$4_@1:TObject[2:4] = Object { }
|
||||
[3] Reassign mutate y$4_@1.x[2:4] = read x$3_@0
|
||||
[3] Reassign store y$4_@1.x[2:4] = read x$3_@0
|
||||
}
|
||||
return freeze y$4_@1:TObject
|
||||
}
|
||||
|
||||
@@ -25,9 +25,9 @@ bb0:
|
||||
[2] Const mutate p$7_@0:TObject[1:9] = Object { }
|
||||
[3] Const mutate q$8_@0:TObject[1:9] = Object { }
|
||||
[4] Const mutate y$9_@0:TObject[1:9] = Object { }
|
||||
[5] Reassign mutate x$6_@0.y[1:9] = read y$9_@0:TObject
|
||||
[6] Reassign mutate p$7_@0.y[1:9] = read x$6_@0.y
|
||||
[7] Reassign mutate q$8_@0.y[1:9] = read p$7_@0.y
|
||||
[5] Reassign store x$6_@0.y[1:9] = read y$9_@0:TObject
|
||||
[6] Reassign store p$7_@0.y[1:9] = read x$6_@0.y
|
||||
[7] Reassign store q$8_@0.y[1:9] = read p$7_@0.y
|
||||
[8] Call mutate mutate$5:TFunction(mutate q$8_@0:TObject)
|
||||
[9] Return
|
||||
```
|
||||
@@ -41,9 +41,9 @@ function component(
|
||||
[2] Const mutate p$7_@0:TObject[1:9] = Object { }
|
||||
[3] Const mutate q$8_@0:TObject[1:9] = Object { }
|
||||
[4] Const mutate y$9_@0:TObject[1:9] = Object { }
|
||||
[5] Reassign mutate x$6_@0.y[1:9] = read y$9_@0:TObject
|
||||
[6] Reassign mutate p$7_@0.y[1:9] = read x$6_@0.y
|
||||
[7] Reassign mutate q$8_@0.y[1:9] = read p$7_@0.y
|
||||
[5] Reassign store x$6_@0.y[1:9] = read y$9_@0:TObject
|
||||
[6] Reassign store p$7_@0.y[1:9] = read x$6_@0.y
|
||||
[7] Reassign store q$8_@0.y[1:9] = read p$7_@0.y
|
||||
[8] Call mutate mutate$5:TFunction(mutate q$8_@0:TObject)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ function component() {
|
||||
bb0:
|
||||
[1] Const mutate x$4_@0:TObject[1:4] = Object { }
|
||||
[2] Const mutate q$5_@1:TObject = Object { }
|
||||
[3] Reassign mutate x$4_@0.t[1:4] = read q$5_@1:TObject
|
||||
[3] Reassign store x$4_@0.t[1:4] = read q$5_@1:TObject
|
||||
[4] Const mutate z$6:TObject = read x$4_@0.t
|
||||
[5] Return
|
||||
```
|
||||
@@ -32,7 +32,7 @@ function component(
|
||||
scope @1 [2:3] deps=[] out=[q$5_@1] {
|
||||
[2] Const mutate q$5_@1:TObject = Object { }
|
||||
}
|
||||
[3] Reassign mutate x$4_@0.t[1:4] = read q$5_@1:TObject
|
||||
[3] Reassign store x$4_@0.t[1:4] = read q$5_@1:TObject
|
||||
}
|
||||
[4] Const mutate z$6:TObject = read x$4_@0.t
|
||||
return
|
||||
|
||||
@@ -26,9 +26,9 @@ bb0:
|
||||
[2] Binary read p$7_@0:TPrimitive + read p$7_@0:TPrimitive
|
||||
[3] Const mutate o$8_@1:TObject = Object { }
|
||||
[4] Const mutate x$9_@2:TObject[4:8] = Object { }
|
||||
[5] Reassign mutate x$9_@2.t[4:8] = read p$7_@0:TPrimitive
|
||||
[5] Reassign store x$9_@2.t[4:8] = read p$7_@0:TPrimitive
|
||||
[6] Const mutate z$10_@2:TPrimitive[4:8] = read x$9_@2.t
|
||||
[7] Reassign mutate x$9_@2.t[4:8] = read o$8_@1:TObject
|
||||
[7] Reassign store x$9_@2.t[4:8] = read o$8_@1:TObject
|
||||
[8] Const mutate y$11:TPoly = read x$9_@2.t
|
||||
[9] Return
|
||||
```
|
||||
@@ -47,9 +47,9 @@ function component(
|
||||
}
|
||||
scope @2 [4:8] deps=[read p$7_@0:TPrimitive, read o$8_@1:TObject] out=[x$9_@2] {
|
||||
[4] Const mutate x$9_@2:TObject[4:8] = Object { }
|
||||
[5] Reassign mutate x$9_@2.t[4:8] = read p$7_@0:TPrimitive
|
||||
[5] Reassign store x$9_@2.t[4:8] = read p$7_@0:TPrimitive
|
||||
[6] Const mutate z$10_@2:TPrimitive[4:8] = read x$9_@2.t
|
||||
[7] Reassign mutate x$9_@2.t[4:8] = read o$8_@1:TObject
|
||||
[7] Reassign store x$9_@2.t[4:8] = read o$8_@1:TObject
|
||||
}
|
||||
[8] Const mutate y$11:TPoly = read x$9_@2.t
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user