@samitouri / QOS-React-2 / commits / 01a6502baa

[hir] represent PropertyCall as receiver + PropertyLoad

How Forget currently lowers PropertyCall: ```js // source: [[ calleeExpr ]].propertyName( [[ argExpr0 ]]) $0 = [[ calleeExpr ]] $1 = [[ argExpr0 ]] $2 = PropertyCall callee=$0 property="propertyName" args=[$1] ``` This PR changes the lowering: ```js // source: [[ calleeExpr ]].propertyName( [[ argExpr0 ]]) $0 = [[ calleeExpr ]] $1 = PropertyLoad $0 "propertyName" $2 = [[ argExpr0 ]] $3 = PropertyCall callee=$0 fn=$1 args=[$2] ``` From my understanding, `PropertyCall` needs the receiver to properly model JS semantics which is something like `resolvedFn.apply(resolvedCallee, arg0, arg1, ...)`. This is additionally useful for: - Fine-grained mutability / alias analysis. The property call is technically a read of the resolved function, and a mutate of the callee. - Dependency tracking. While we could special case PropertyCall, this representation would correctly add both callee and callee.propertyName as dependencies for PropertyCall. e.g. ```js let x = []; mutate(x); useFreeze(x); let y = {}; y.a = x.bar(); return y; ```

Mofei Zhang committed Mar 21, 2023 at 14:57 UTC 01a6502baa9430e84b45d45989915f85aae4a1d3
13 files changed +306 -244
compiler/forget/src/HIR/BuildHIR.ts
+13 -6
@@ -926,21 +926,28 @@ function lowerExpression(
926 return { kind: "UnsupportedNode", node: exprNode, loc: exprLoc };
927 }
928 if (calleePath.isMemberExpression()) {
929 - const { object, property } = lowerMemberExpression(builder, calleePath);
929 + const memberExpr = lowerMemberExpression(builder, calleePath);
930 const args = lowerArguments(builder, expr.get("arguments"));
931 - if (typeof property === "string") {
931 + if (typeof memberExpr.property === "string") {
932 + const propertyPlace = buildTemporaryPlace(builder, GeneratedSource);
933 + builder.push({
934 + id: makeInstructionId(0),
935 + lvalue: { ...propertyPlace },
936 + value: memberExpr.value,
937 + loc: GeneratedSource,
938 + });
939 return {
940 kind: "PropertyCall",
934 - receiver: object,
935 - property,
941 + receiver: memberExpr.object,
942 + property: { ...propertyPlace },
943 args,
944 loc: exprLoc,
945 };
946 } else {
947 return {
948 kind: "ComputedCall",
942 - receiver: object,
943 - property,
949 + receiver: memberExpr.object,
950 + property: memberExpr.property,
951 args,
952 loc: exprLoc,
953 };
compiler/forget/src/HIR/HIR.ts
+23 -7
@@ -432,6 +432,28 @@ export type Phi = {
432 type: Type;
433 };
434
435 +/**
436 + * Forget currently does not handle PropertyCall / ComputedCall correctly in
437 + * all cases. Specifically, we do not bind the receiver and method property
438 + * before calling to args. Until we add a SequenceExpression to inline all
439 + * instructions generated when lowering args, we have a limited representation
440 + * with some constraints.
441 + *
442 + * Forget currently makes these assumptions (checked in codegen):
443 + * - {@link PropertyCall.property} is a temporary produced by a PropertyLoad on {@link PropertyCall.receiver}
444 + * - this is always true for PropertyCall, but property.object and receiver
445 + * may be different for ComputedCalls
446 + * - {@link PropertyCall.property} remains an rval (i.e. never promoted to a
447 + * named identifier). We currently rely on this for codegen.
448 + */
449 +type PropertyCall = {
450 + kind: "PropertyCall";
451 + receiver: Place;
452 + property: Place;
453 + args: Array<Place | SpreadPattern>;
454 + loc: SourceLocation;
455 +};
456 +
457 /**
458 * The value of a given instruction. Note that values are not recursive: complex
459 * values such as objects or arrays are always defined by instructions to define
@@ -488,13 +510,7 @@ export type InstructionValue =
510 args: Array<Place | SpreadPattern>;
511 loc: SourceLocation;
512 }
491 - | {
492 - kind: "PropertyCall";
493 - receiver: Place;
494 - property: string;
495 - args: Array<Place | SpreadPattern>;
496 - loc: SourceLocation;
497 - }
513 + | PropertyCall
514 | {
515 kind: "ComputedCall";
516 receiver: Place;
compiler/forget/src/HIR/visitors.ts
+2
@@ -57,6 +57,7 @@ export function* eachInstructionValueOperand(
57 }
58 case "PropertyCall": {
59 yield instrValue.receiver;
60 + yield instrValue.property;
61 yield* eachCallArgument(instrValue.args);
62 break;
63 }
@@ -357,6 +358,7 @@ export function mapInstructionOperands(
358 }
359 case "PropertyCall": {
360 instrValue.receiver = fn(instrValue.receiver);
361 + instrValue.property = fn(instrValue.property);
362 instrValue.args = mapCallArguments(instrValue.args, fn);
363 break;
364 }
compiler/forget/src/Inference/InferReferenceEffects.ts
+1
@@ -672,6 +672,7 @@ function inferBlock(
672 }
673
674 state.reference(instrValue.receiver, Effect.Mutate);
675 + state.reference(instrValue.property, Effect.Read);
676 for (const arg of instrValue.args) {
677 if (arg.kind === "Identifier") {
678 state.reference(arg, Effect.Mutate);
compiler/forget/src/ReactiveScopes/CodegenReactiveFunction.ts
+18 -5
@@ -590,13 +590,26 @@ function codegenInstructionValue(
590 break;
591 }
592 case "PropertyCall": {
593 - const receiver = codegenPlace(cx, instrValue.receiver);
594 - const callee = t.memberExpression(
595 - receiver,
596 - t.identifier(instrValue.property)
593 + const memberExpr = codegenPlace(cx, instrValue.property);
594 + invariant(
595 + t.isMemberExpression(memberExpr) ||
596 + t.isOptionalMemberExpression(memberExpr),
597 + "[Codegen] Internal error: PropertyCall::property must be an unpromoted + unmemoized MemberExpression."
598 + );
599 + invariant(
600 + memberExpr.computed === false,
601 + "[Codegen] Internal error: PropertyCall::property must be a non-computed MemberExpression."
602 + );
603 + invariant(
604 + t.isNodesEquivalent(
605 + memberExpr.object,
606 + codegenPlace(cx, instrValue.receiver)
607 + ),
608 + "[Codegen] Internal error: Forget should always generate PropertyCall::property " +
609 + "as a MemberExpression of PropertyCall::receiver"
610 );
611 const args = instrValue.args.map((arg) => codegenArgument(cx, arg));
599 - value = createCallExpression(instrValue.loc, callee, args);
612 + value = createCallExpression(instrValue.loc, memberExpr, args);
613 break;
614 }
615 case "ComputedCall": {
compiler/forget/src/__tests__/fixtures/compiler/capturing-function-member-expr-call.expect.md
+2 -2
@@ -19,9 +19,9 @@ function component({ mutator }) {
19 ## Code
20
21 ```javascript
22 -function component(t27) {
22 +function component(t29) {
23 const $ = React.unstable_useMemoCache(7);
24 - const { mutator } = t27;
24 + const { mutator } = t29;
25 const c_0 = $[0] !== mutator;
26 let t0;
27 if (c_0) {
compiler/forget/src/__tests__/fixtures/hir/ssa-renaming-ternary-destruction-with-mutation.expect.md
+36 -33
@@ -19,46 +19,49 @@ function foo(props) {
19
20 ```javascript
21 bb0 (block):
22 - [1] store $35[1:33]:TObject<Array> = Array []
23 - [2] store $37[2:33]:TObject<Array> = StoreLocal Let store x$36[2:33]:TObject<Array> = capture $35[1:33]:TObject<Array>
24 - [3] mutate $38[3:33]:TObject<Array> = LoadLocal capture x$36[2:33]:TObject<Array>
25 - [4] mutate $39 = LoadLocal read props$34
26 - [5] mutate $40 = PropertyLoad read $39.bar
27 - [6] mutate $41 = PropertyCall mutate $38[3:33]:TObject<Array>.push(read $40)
28 - [7] Ternary test:bb2 fallthrough=bb1
22 + [1] store $38[1:36]:TObject<Array> = Array []
23 + [2] store $40[2:36]:TObject<Array> = StoreLocal Let store x$39[2:36]:TObject<Array> = capture $38[1:36]:TObject<Array>
24 + [3] mutate $41[3:36]:TObject<Array> = LoadLocal capture x$39[2:36]:TObject<Array>
25 + [4] mutate $42 = LoadLocal read props$37
26 + [5] mutate $43 = PropertyLoad read $42.bar
27 + [6] mutate $44[6:36] = PropertyLoad read $41[3:36]:TObject<Array>.push
28 + [7] mutate $45 = PropertyCall mutate $41[3:36]:TObject<Array>.[object Object](read $43)
29 + [8] Ternary test:bb2 fallthrough=bb1
30 bb2 (value):
31 predecessor blocks: bb0
31 - [8] mutate $42 = LoadLocal read props$34
32 - [9] mutate $43 = PropertyLoad read $42.cond
33 - [10] Branch (read $43) then:bb3 else:bb4
32 + [9] mutate $46 = LoadLocal read props$37
33 + [10] mutate $47 = PropertyLoad read $46.cond
34 + [11] Branch (read $47) then:bb3 else:bb4
35 bb3 (value):
36 predecessor blocks: bb2
36 - [14] store $48[14:33]:TObject<Array> = Array []
37 - [15] store $49[15:33]:TObject<Array> = Array [capture $48[14:33]:TObject<Array>]
38 - [16] store $51[16:33] = Destructure Reassign [ mutate x$36[16:33] ] = capture $49[15:33]:TObject<Array>
39 - [17] mutate $52[17:33] = LoadLocal capture x$36[16:33]
40 - [18] mutate $53 = LoadLocal read props$34
41 - [19] mutate $54 = PropertyLoad read $53.foo
42 - [20] mutate $55[20:30] = PropertyCall mutate $52[17:33].push(read $54)
43 - [21] store $57[21:30] = StoreLocal Const mutate $56[7:30] = capture $55[20:30]
44 - [22] Goto bb1
37 + [15] store $52[15:36]:TObject<Array> = Array []
38 + [16] store $53[16:36]:TObject<Array> = Array [capture $52[15:36]:TObject<Array>]
39 + [17] store $55[17:36] = Destructure Reassign [ mutate x$39[17:36] ] = capture $53[16:36]:TObject<Array>
40 + [18] mutate $56[18:36] = LoadLocal capture x$39[17:36]
41 + [19] mutate $57 = LoadLocal read props$37
42 + [20] mutate $58 = PropertyLoad read $57.foo
43 + [21] mutate $59[21:36] = PropertyLoad read $56[18:36].push
44 + [22] mutate $60[22:33] = PropertyCall mutate $56[18:36].[object Object](read $58)
45 + [23] store $62[23:33] = StoreLocal Const mutate $61[8:33] = capture $60[22:33]
46 + [24] Goto bb1
47 bb4 (value):
48 predecessor blocks: bb2
47 - [23] mutate $58[23:30]:TPrimitive = null
48 - [24] store $60[24:30]:TPrimitive = StoreLocal Const mutate $56[7:30] = read $58[23:30]:TPrimitive
49 - [25] Goto bb1
49 + [25] mutate $63[25:33]:TPrimitive = null
50 + [26] store $65[26:33]:TPrimitive = StoreLocal Const mutate $61[8:33] = read $63[25:33]:TPrimitive
51 + [27] Goto bb1
52 bb1 (block):
53 predecessor blocks: bb3 bb4
52 - $63[7:30]:TPhi: phi(bb3: $56, bb4: $59)
53 - x$36[2:33]:TPhi: phi(bb3: x$36, bb4: x$36)
54 - [26] store $62[26:30] = StoreLocal Const mutate _$61[26:30] = capture $56[7:30]
55 - [27] mutate $64 = Global console
56 - [28] mutate $65[28:30] = LoadLocal capture _$61[26:30]
57 - [29] mutate $66 = PropertyCall read $64.log(mutate $65[28:30])
58 - [30] mutate $67:TFunction = Global mut
59 - [31] mutate $68[31:33] = LoadLocal capture x$36[2:33]
60 - [32] mutate $70 = Call read $67:TFunction(mutate $68[31:33])
61 - [33] mutate $71 = LoadLocal capture x$36[2:33]
62 - [34] Return freeze $71
54 + $68[8:33]:TPhi: phi(bb3: $61, bb4: $64)
55 + x$39[2:36]:TPhi: phi(bb3: x$39, bb4: x$39)
56 + [28] store $67[28:33] = StoreLocal Const mutate _$66[28:33] = capture $61[8:33]
57 + [29] mutate $69 = Global console
58 + [30] mutate $70[30:33] = LoadLocal capture _$66[28:33]
59 + [31] mutate $71 = PropertyLoad read $69.log
60 + [32] mutate $72 = PropertyCall read $69.[object Object](mutate $70[30:33])
61 + [33] mutate $73:TFunction = Global mut
62 + [34] mutate $74[34:36] = LoadLocal capture x$39[2:36]
63 + [35] mutate $76 = Call read $73:TFunction(mutate $74[34:36])
64 + [36] mutate $77 = LoadLocal capture x$39[2:36]
65 + [37] Return freeze $77
66 ```
67
\ No newline at end of file
compiler/forget/src/__tests__/fixtures/hir/ssa-renaming-ternary-destruction.expect.md
+33 -30
@@ -18,43 +18,46 @@ function foo(props) {
18
19 ```javascript
20 bb0 (block):
21 - [1] store $32[1:7]:TObject<Array> = Array []
22 - [2] store $34[2:7]:TObject<Array> = StoreLocal Let store x$33[2:7]:TObject<Array> = capture $32[1:7]:TObject<Array>
23 - [3] mutate $35[3:7]:TObject<Array> = LoadLocal capture x$33[2:7]:TObject<Array>
24 - [4] mutate $36 = LoadLocal read props$31
25 - [5] mutate $37 = PropertyLoad read $36.bar
26 - [6] mutate $38 = PropertyCall mutate $35[3:7]:TObject<Array>.push(read $37)
27 - [7] Ternary test:bb2 fallthrough=bb1
21 + [1] store $35[1:8]:TObject<Array> = Array []
22 + [2] store $37[2:8]:TObject<Array> = StoreLocal Let store x$36[2:8]:TObject<Array> = capture $35[1:8]:TObject<Array>
23 + [3] mutate $38[3:8]:TObject<Array> = LoadLocal capture x$36[2:8]:TObject<Array>
24 + [4] mutate $39 = LoadLocal read props$34
25 + [5] mutate $40 = PropertyLoad read $39.bar
26 + [6] mutate $41[6:8] = PropertyLoad read $38[3:8]:TObject<Array>.push
27 + [7] mutate $42 = PropertyCall mutate $38[3:8]:TObject<Array>.[object Object](read $40)
28 + [8] Ternary test:bb2 fallthrough=bb1
29 bb2 (value):
30 predecessor blocks: bb0
30 - [8] mutate $39 = LoadLocal read props$31
31 - [9] mutate $40 = PropertyLoad read $39.cond
32 - [10] Branch (read $40) then:bb3 else:bb4
31 + [9] mutate $43 = LoadLocal read props$34
32 + [10] mutate $44 = PropertyLoad read $43.cond
33 + [11] Branch (read $44) then:bb3 else:bb4
34 bb3 (value):
35 predecessor blocks: bb2
35 - [14] store $45[14:21]:TObject<Array> = Array []
36 - [15] store $46[15:21]:TObject<Array> = Array [capture $45[14:21]:TObject<Array>]
37 - [16] store $48[16:21] = Destructure Reassign [ mutate x$33[16:21] ] = capture $46[15:21]:TObject<Array>
38 - [17] mutate $49[17:21] = LoadLocal capture x$33[16:21]
39 - [18] mutate $50 = LoadLocal read props$31
40 - [19] mutate $51 = PropertyLoad read $50.foo
41 - [20] mutate $52[20:30] = PropertyCall mutate $49[17:21].push(read $51)
42 - [21] store $54[21:30] = StoreLocal Const mutate $53[7:30] = capture $52[20:30]
43 - [22] Goto bb1
36 + [15] store $49[15:23]:TObject<Array> = Array []
37 + [16] store $50[16:23]:TObject<Array> = Array [capture $49[15:23]:TObject<Array>]
38 + [17] store $52[17:23] = Destructure Reassign [ mutate x$36[17:23] ] = capture $50[16:23]:TObject<Array>
39 + [18] mutate $53[18:23] = LoadLocal capture x$36[17:23]
40 + [19] mutate $54 = LoadLocal read props$34
41 + [20] mutate $55 = PropertyLoad read $54.foo
42 + [21] mutate $56[21:23] = PropertyLoad read $53[18:23].push
43 + [22] mutate $57[22:33] = PropertyCall mutate $53[18:23].[object Object](read $55)
44 + [23] store $59[23:33] = StoreLocal Const mutate $58[8:33] = capture $57[22:33]
45 + [24] Goto bb1
46 bb4 (value):
47 predecessor blocks: bb2
46 - [23] mutate $55[23:30]:TPrimitive = null
47 - [24] store $57[24:30]:TPrimitive = StoreLocal Const mutate $53[7:30] = read $55[23:30]:TPrimitive
48 - [25] Goto bb1
48 + [25] mutate $60[25:33]:TPrimitive = null
49 + [26] store $62[26:33]:TPrimitive = StoreLocal Const mutate $58[8:33] = read $60[25:33]:TPrimitive
50 + [27] Goto bb1
51 bb1 (block):
52 predecessor blocks: bb3 bb4
51 - $60[7:30]:TPhi: phi(bb3: $53, bb4: $56)
52 - x$33:TPhi: phi(bb3: x$33, bb4: x$33)
53 - [26] store $59[26:30] = StoreLocal Const mutate _$58[26:30] = capture $53[7:30]
54 - [27] mutate $61 = Global console
55 - [28] mutate $62[28:30] = LoadLocal capture _$58[26:30]
56 - [29] mutate $63 = PropertyCall read $61.log(mutate $62[28:30])
57 - [30] mutate $64 = LoadLocal capture x$33
58 - [31] Return freeze $64
53 + $65[8:33]:TPhi: phi(bb3: $58, bb4: $61)
54 + x$36:TPhi: phi(bb3: x$36, bb4: x$36)
55 + [28] store $64[28:33] = StoreLocal Const mutate _$63[28:33] = capture $58[8:33]
56 + [29] mutate $66 = Global console
57 + [30] mutate $67[30:33] = LoadLocal capture _$63[28:33]
58 + [31] mutate $68 = PropertyLoad read $66.log
59 + [32] mutate $69 = PropertyCall read $66.[object Object](mutate $67[30:33])
60 + [33] mutate $70 = LoadLocal capture x$36
61 + [34] Return freeze $70
62 ```
63
\ No newline at end of file
compiler/forget/src/__tests__/fixtures/hir/ssa-renaming-ternary-with-mutation.expect.md
+35 -32
@@ -17,45 +17,48 @@ function foo(props) {
17
18 ```javascript
19 bb0 (block):
20 - [1] store $33[1:31]:TObject<Array> = Array []
21 - [2] store $35[2:31]:TObject<Array> = StoreLocal Let store x$34[2:31]:TObject<Array> = capture $33[1:31]:TObject<Array>
22 - [3] mutate $36[3:31]:TObject<Array> = LoadLocal capture x$34[2:31]:TObject<Array>
23 - [4] mutate $37 = LoadLocal read props$32
24 - [5] mutate $38 = PropertyLoad read $37.bar
25 - [6] mutate $39 = PropertyCall mutate $36[3:31]:TObject<Array>.push(read $38)
26 - [7] Ternary test:bb2 fallthrough=bb1
20 + [1] store $36[1:34]:TObject<Array> = Array []
21 + [2] store $38[2:34]:TObject<Array> = StoreLocal Let store x$37[2:34]:TObject<Array> = capture $36[1:34]:TObject<Array>
22 + [3] mutate $39[3:34]:TObject<Array> = LoadLocal capture x$37[2:34]:TObject<Array>
23 + [4] mutate $40 = LoadLocal read props$35
24 + [5] mutate $41 = PropertyLoad read $40.bar
25 + [6] mutate $42[6:34] = PropertyLoad read $39[3:34]:TObject<Array>.push
26 + [7] mutate $43 = PropertyCall mutate $39[3:34]:TObject<Array>.[object Object](read $41)
27 + [8] Ternary test:bb2 fallthrough=bb1
28 bb2 (value):
29 predecessor blocks: bb0
29 - [8] mutate $40 = LoadLocal read props$32
30 - [9] mutate $41 = PropertyLoad read $40.cond
31 - [10] Branch (read $41) then:bb3 else:bb4
30 + [9] mutate $44 = LoadLocal read props$35
31 + [10] mutate $45 = PropertyLoad read $44.cond
32 + [11] Branch (read $45) then:bb3 else:bb4
33 bb3 (value):
34 predecessor blocks: bb2
34 - [13] store $45[13:31]:TObject<Array> = Array []
35 - [14] store $47[14:31]:TObject<Array> = StoreLocal Reassign store x$34[14:31]:TObject<Array> = capture $45[13:31]:TObject<Array>
36 - [15] mutate $48[15:31]:TObject<Array> = LoadLocal capture x$34[14:31]:TObject<Array>
37 - [16] mutate $49 = LoadLocal read props$32
38 - [17] mutate $50 = PropertyLoad read $49.foo
39 - [18] mutate $51[18:28] = PropertyCall mutate $48[15:31]:TObject<Array>.push(read $50)
40 - [19] store $53[19:28] = StoreLocal Const mutate $52[7:28] = capture $51[18:28]
41 - [20] Goto bb1
35 + [14] store $49[14:34]:TObject<Array> = Array []
36 + [15] store $51[15:34]:TObject<Array> = StoreLocal Reassign store x$37[15:34]:TObject<Array> = capture $49[14:34]:TObject<Array>
37 + [16] mutate $52[16:34]:TObject<Array> = LoadLocal capture x$37[15:34]:TObject<Array>
38 + [17] mutate $53 = LoadLocal read props$35
39 + [18] mutate $54 = PropertyLoad read $53.foo
40 + [19] mutate $55[19:34] = PropertyLoad read $52[16:34]:TObject<Array>.push
41 + [20] mutate $56[20:31] = PropertyCall mutate $52[16:34]:TObject<Array>.[object Object](read $54)
42 + [21] store $58[21:31] = StoreLocal Const mutate $57[8:31] = capture $56[20:31]
43 + [22] Goto bb1
44 bb4 (value):
45 predecessor blocks: bb2
44 - [21] mutate $54[21:28]:TPrimitive = null
45 - [22] store $56[22:28]:TPrimitive = StoreLocal Const mutate $52[7:28] = read $54[21:28]:TPrimitive
46 - [23] Goto bb1
46 + [23] mutate $59[23:31]:TPrimitive = null
47 + [24] store $61[24:31]:TPrimitive = StoreLocal Const mutate $57[8:31] = read $59[23:31]:TPrimitive
48 + [25] Goto bb1
49 bb1 (block):
50 predecessor blocks: bb3 bb4
49 - $59[7:28]:TPhi: phi(bb3: $52, bb4: $55)
50 - x$34[2:31]:TObject<Array>: phi(bb3: x$34, bb4: x$34)
51 - [24] store $58[24:28] = StoreLocal Const mutate _$57[24:28] = capture $52[7:28]
52 - [25] mutate $60 = Global console
53 - [26] mutate $61[26:28] = LoadLocal capture _$57[24:28]
54 - [27] mutate $62 = PropertyCall read $60.log(mutate $61[26:28])
55 - [28] mutate $63:TFunction = Global mut
56 - [29] mutate $64[29:31] = LoadLocal capture x$34[2:31]
57 - [30] mutate $66 = Call read $63:TFunction(mutate $64[29:31])
58 - [31] mutate $67 = LoadLocal capture x$34[2:31]
59 - [32] Return freeze $67
51 + $64[8:31]:TPhi: phi(bb3: $57, bb4: $60)
52 + x$37[2:34]:TObject<Array>: phi(bb3: x$37, bb4: x$37)
53 + [26] store $63[26:31] = StoreLocal Const mutate _$62[26:31] = capture $57[8:31]
54 + [27] mutate $65 = Global console
55 + [28] mutate $66[28:31] = LoadLocal capture _$62[26:31]
56 + [29] mutate $67 = PropertyLoad read $65.log
57 + [30] mutate $68 = PropertyCall read $65.[object Object](mutate $66[28:31])
58 + [31] mutate $69:TFunction = Global mut
59 + [32] mutate $70[32:34] = LoadLocal capture x$37[2:34]
60 + [33] mutate $72 = Call read $69:TFunction(mutate $70[32:34])
61 + [34] mutate $73 = LoadLocal capture x$37[2:34]
62 + [35] Return freeze $73
63 ```
64
\ No newline at end of file
compiler/forget/src/__tests__/fixtures/hir/ssa-renaming-ternary.expect.md
+32 -29
@@ -16,42 +16,45 @@ function foo(props) {
16
17 ```javascript
18 bb0 (block):
19 - [1] store $30[1:7]:TObject<Array> = Array []
20 - [2] store $32[2:7]:TObject<Array> = StoreLocal Let store x$31[2:7]:TObject<Array> = capture $30[1:7]:TObject<Array>
21 - [3] mutate $33[3:7]:TObject<Array> = LoadLocal capture x$31[2:7]:TObject<Array>
22 - [4] mutate $34 = LoadLocal read props$29
23 - [5] mutate $35 = PropertyLoad read $34.bar
24 - [6] mutate $36 = PropertyCall mutate $33[3:7]:TObject<Array>.push(read $35)
25 - [7] Ternary test:bb2 fallthrough=bb1
19 + [1] store $33[1:8]:TObject<Array> = Array []
20 + [2] store $35[2:8]:TObject<Array> = StoreLocal Let store x$34[2:8]:TObject<Array> = capture $33[1:8]:TObject<Array>
21 + [3] mutate $36[3:8]:TObject<Array> = LoadLocal capture x$34[2:8]:TObject<Array>
22 + [4] mutate $37 = LoadLocal read props$32
23 + [5] mutate $38 = PropertyLoad read $37.bar
24 + [6] mutate $39[6:8] = PropertyLoad read $36[3:8]:TObject<Array>.push
25 + [7] mutate $40 = PropertyCall mutate $36[3:8]:TObject<Array>.[object Object](read $38)
26 + [8] Ternary test:bb2 fallthrough=bb1
27 bb2 (value):
28 predecessor blocks: bb0
28 - [8] mutate $37 = LoadLocal read props$29
29 - [9] mutate $38 = PropertyLoad read $37.cond
30 - [10] Branch (read $38) then:bb3 else:bb4
29 + [9] mutate $41 = LoadLocal read props$32
30 + [10] mutate $42 = PropertyLoad read $41.cond
31 + [11] Branch (read $42) then:bb3 else:bb4
32 bb3 (value):
33 predecessor blocks: bb2
33 - [13] store $42[13:19]:TObject<Array> = Array []
34 - [14] store $44[14:19]:TObject<Array> = StoreLocal Reassign store x$31[14:19]:TObject<Array> = capture $42[13:19]:TObject<Array>
35 - [15] mutate $45[15:19]:TObject<Array> = LoadLocal capture x$31[14:19]:TObject<Array>
36 - [16] mutate $46 = LoadLocal read props$29
37 - [17] mutate $47 = PropertyLoad read $46.foo
38 - [18] mutate $48[18:28] = PropertyCall mutate $45[15:19]:TObject<Array>.push(read $47)
39 - [19] store $50[19:28] = StoreLocal Const mutate $49[7:28] = capture $48[18:28]
40 - [20] Goto bb1
34 + [14] store $46[14:21]:TObject<Array> = Array []
35 + [15] store $48[15:21]:TObject<Array> = StoreLocal Reassign store x$34[15:21]:TObject<Array> = capture $46[14:21]:TObject<Array>
36 + [16] mutate $49[16:21]:TObject<Array> = LoadLocal capture x$34[15:21]:TObject<Array>
37 + [17] mutate $50 = LoadLocal read props$32
38 + [18] mutate $51 = PropertyLoad read $50.foo
39 + [19] mutate $52[19:21] = PropertyLoad read $49[16:21]:TObject<Array>.push
40 + [20] mutate $53[20:31] = PropertyCall mutate $49[16:21]:TObject<Array>.[object Object](read $51)
41 + [21] store $55[21:31] = StoreLocal Const mutate $54[8:31] = capture $53[20:31]
42 + [22] Goto bb1
43 bb4 (value):
44 predecessor blocks: bb2
43 - [21] mutate $51[21:28]:TPrimitive = null
44 - [22] store $53[22:28]:TPrimitive = StoreLocal Const mutate $49[7:28] = read $51[21:28]:TPrimitive
45 - [23] Goto bb1
45 + [23] mutate $56[23:31]:TPrimitive = null
46 + [24] store $58[24:31]:TPrimitive = StoreLocal Const mutate $54[8:31] = read $56[23:31]:TPrimitive
47 + [25] Goto bb1
48 bb1 (block):
49 predecessor blocks: bb3 bb4
48 - $56[7:28]:TPhi: phi(bb3: $49, bb4: $52)
49 - x$31:TObject<Array>: phi(bb3: x$31, bb4: x$31)
50 - [24] store $55[24:28] = StoreLocal Const mutate _$54[24:28] = capture $49[7:28]
51 - [25] mutate $57 = Global console
52 - [26] mutate $58[26:28] = LoadLocal capture _$54[24:28]
53 - [27] mutate $59 = PropertyCall read $57.log(mutate $58[26:28])
54 - [28] mutate $60 = LoadLocal capture x$31
55 - [29] Return freeze $60
50 + $61[8:31]:TPhi: phi(bb3: $54, bb4: $57)
51 + x$34:TObject<Array>: phi(bb3: x$34, bb4: x$34)
52 + [26] store $60[26:31] = StoreLocal Const mutate _$59[26:31] = capture $54[8:31]
53 + [27] mutate $62 = Global console
54 + [28] mutate $63[28:31] = LoadLocal capture _$59[26:31]
55 + [29] mutate $64 = PropertyLoad read $62.log
56 + [30] mutate $65 = PropertyCall read $62.[object Object](mutate $63[28:31])
57 + [31] mutate $66 = LoadLocal capture x$34
58 + [32] Return freeze $66
59 ```
60
\ No newline at end of file
compiler/forget/src/__tests__/fixtures/hir/ssa-renaming-unconditional-ternary-with-mutation.expect.md
+41 -37
@@ -19,50 +19,54 @@ function foo(props) {
19
20 ```javascript
21 bb0 (block):
22 - [1] store $40[1:7]:TObject<Array> = Array []
23 - [2] store $42[2:7]:TObject<Array> = StoreLocal Let store x$41[2:38]:TObject<Array> = capture $40[1:7]:TObject<Array>
24 - [3] mutate $43[3:7]:TObject<Array> = LoadLocal capture x$41[2:38]:TObject<Array>
25 - [4] mutate $44 = LoadLocal read props$39
26 - [5] mutate $45 = PropertyLoad read $44.bar
27 - [6] mutate $46 = PropertyCall mutate $43[3:7]:TObject<Array>.push(read $45)
28 - [7] Ternary test:bb2 fallthrough=bb1
22 + [1] store $44[1:8]:TObject<Array> = Array []
23 + [2] store $46[2:8]:TObject<Array> = StoreLocal Let store x$45[2:42]:TObject<Array> = capture $44[1:8]:TObject<Array>
24 + [3] mutate $47[3:8]:TObject<Array> = LoadLocal capture x$45[2:42]:TObject<Array>
25 + [4] mutate $48 = LoadLocal read props$43
26 + [5] mutate $49 = PropertyLoad read $48.bar
27 + [6] mutate $50[6:8] = PropertyLoad read $47[3:8]:TObject<Array>.push
28 + [7] mutate $51 = PropertyCall mutate $47[3:8]:TObject<Array>.[object Object](read $49)
29 + [8] Ternary test:bb2 fallthrough=bb1
30 bb2 (value):
31 predecessor blocks: bb0
31 - [8] mutate $47 = LoadLocal read props$39
32 - [9] mutate $48 = PropertyLoad read $47.cond
33 - [10] Branch (read $48) then:bb3 else:bb4
32 + [9] mutate $52 = LoadLocal read props$43
33 + [10] mutate $53 = PropertyLoad read $52.cond
34 + [11] Branch (read $53) then:bb3 else:bb4
35 bb3 (value):
36 predecessor blocks: bb2
36 - [13] store $52[13:38]:TObject<Array> = Array []
37 - [14] store $54[14:38]:TObject<Array> = StoreLocal Reassign store x$41[14:38]:TObject<Array> = capture $52[13:38]:TObject<Array>
38 - [15] mutate $55[15:38]:TObject<Array> = LoadLocal capture x$41[14:38]:TObject<Array>
39 - [16] mutate $56 = LoadLocal read props$39
40 - [17] mutate $57 = PropertyLoad read $56.foo
41 - [18] mutate $58[18:35] = PropertyCall mutate $55[15:38]:TObject<Array>.push(read $57)
42 - [19] store $60[19:35] = StoreLocal Const mutate $59[7:35] = capture $58[18:35]
43 - [20] Goto bb1
37 + [14] store $57[14:42]:TObject<Array> = Array []
38 + [15] store $59[15:42]:TObject<Array> = StoreLocal Reassign store x$45[15:42]:TObject<Array> = capture $57[14:42]:TObject<Array>
39 + [16] mutate $60[16:42]:TObject<Array> = LoadLocal capture x$45[15:42]:TObject<Array>
40 + [17] mutate $61 = LoadLocal read props$43
41 + [18] mutate $62 = PropertyLoad read $61.foo
42 + [19] mutate $63[19:42] = PropertyLoad read $60[16:42]:TObject<Array>.push
43 + [20] mutate $64[20:39] = PropertyCall mutate $60[16:42]:TObject<Array>.[object Object](read $62)
44 + [21] store $66[21:39] = StoreLocal Const mutate $65[8:39] = capture $64[20:39]
45 + [22] Goto bb1
46 bb4 (value):
47 predecessor blocks: bb2
46 - [23] store $64[23:38]:TObject<Array> = Array []
47 - [24] store $66[24:38]:TObject<Array> = StoreLocal Reassign store x$41[24:38]:TObject<Array> = capture $64[23:38]:TObject<Array>
48 - [25] mutate $67[25:38]:TObject<Array> = LoadLocal capture x$41[24:38]:TObject<Array>
49 - [26] mutate $68 = LoadLocal read props$39
50 - [27] mutate $69 = PropertyLoad read $68.bar
51 - [28] mutate $70[28:35] = PropertyCall mutate $67[25:38]:TObject<Array>.push(read $69)
52 - [29] store $72[29:35] = StoreLocal Const mutate $59[7:35] = capture $70[28:35]
53 - [30] Goto bb1
48 + [25] store $70[25:42]:TObject<Array> = Array []
49 + [26] store $72[26:42]:TObject<Array> = StoreLocal Reassign store x$45[26:42]:TObject<Array> = capture $70[25:42]:TObject<Array>
50 + [27] mutate $73[27:42]:TObject<Array> = LoadLocal capture x$45[26:42]:TObject<Array>
51 + [28] mutate $74 = LoadLocal read props$43
52 + [29] mutate $75 = PropertyLoad read $74.bar
53 + [30] mutate $76[30:42] = PropertyLoad read $73[27:42]:TObject<Array>.push
54 + [31] mutate $77[31:39] = PropertyCall mutate $73[27:42]:TObject<Array>.[object Object](read $75)
55 + [32] store $79[32:39] = StoreLocal Const mutate $65[8:39] = capture $77[31:39]
56 + [33] Goto bb1
57 bb1 (block):
58 predecessor blocks: bb3 bb4
56 - $75[7:35]:TPhi: phi(bb3: $59, bb4: $71)
57 - x$41[14:38]:TObject<Array>: phi(bb3: x$41, bb4: x$41)
58 - [31] store $74[31:35] = StoreLocal Const mutate _$73[31:35] = capture $59[7:35]
59 - [32] mutate $76 = Global console
60 - [33] mutate $77[33:35] = LoadLocal capture _$73[31:35]
61 - [34] mutate $78 = PropertyCall read $76.log(mutate $77[33:35])
62 - [35] mutate $79:TFunction = Global mut
63 - [36] mutate $80[36:38] = LoadLocal capture x$41[14:38]
64 - [37] mutate $82 = Call read $79:TFunction(mutate $80[36:38])
65 - [38] mutate $83 = LoadLocal capture x$41[14:38]
66 - [39] Return freeze $83
59 + $82[8:39]:TPhi: phi(bb3: $65, bb4: $78)
60 + x$45[15:42]:TObject<Array>: phi(bb3: x$45, bb4: x$45)
61 + [34] store $81[34:39] = StoreLocal Const mutate _$80[34:39] = capture $65[8:39]
62 + [35] mutate $83 = Global console
63 + [36] mutate $84[36:39] = LoadLocal capture _$80[34:39]
64 + [37] mutate $85 = PropertyLoad read $83.log
65 + [38] mutate $86 = PropertyCall read $83.[object Object](mutate $84[36:39])
66 + [39] mutate $87:TFunction = Global mut
67 + [40] mutate $88[40:42] = LoadLocal capture x$45[15:42]
68 + [41] mutate $90 = Call read $87:TFunction(mutate $88[40:42])
69 + [42] mutate $91 = LoadLocal capture x$45[15:42]
70 + [43] Return freeze $91
71 ```
72
\ No newline at end of file
compiler/forget/src/__tests__/fixtures/hir/ssa-renaming-unconditional-ternary.expect.md
+38 -34
@@ -18,47 +18,51 @@ function foo(props) {
18
19 ```javascript
20 bb0 (block):
21 - [1] store $37[1:7]:TObject<Array> = Array []
22 - [2] store $39[2:7]:TObject<Array> = StoreLocal Let store x$38[2:7]:TObject<Array> = capture $37[1:7]:TObject<Array>
23 - [3] mutate $40[3:7]:TObject<Array> = LoadLocal capture x$38[2:7]:TObject<Array>
24 - [4] mutate $41 = LoadLocal read props$36
25 - [5] mutate $42 = PropertyLoad read $41.bar
26 - [6] mutate $43 = PropertyCall mutate $40[3:7]:TObject<Array>.push(read $42)
27 - [7] Ternary test:bb2 fallthrough=bb1
21 + [1] store $41[1:8]:TObject<Array> = Array []
22 + [2] store $43[2:8]:TObject<Array> = StoreLocal Let store x$42[2:8]:TObject<Array> = capture $41[1:8]:TObject<Array>
23 + [3] mutate $44[3:8]:TObject<Array> = LoadLocal capture x$42[2:8]:TObject<Array>
24 + [4] mutate $45 = LoadLocal read props$40
25 + [5] mutate $46 = PropertyLoad read $45.bar
26 + [6] mutate $47[6:8] = PropertyLoad read $44[3:8]:TObject<Array>.push
27 + [7] mutate $48 = PropertyCall mutate $44[3:8]:TObject<Array>.[object Object](read $46)
28 + [8] Ternary test:bb2 fallthrough=bb1
29 bb2 (value):
30 predecessor blocks: bb0
30 - [8] mutate $44 = LoadLocal read props$36
31 - [9] mutate $45 = PropertyLoad read $44.cond
32 - [10] Branch (read $45) then:bb3 else:bb4
31 + [9] mutate $49 = LoadLocal read props$40
32 + [10] mutate $50 = PropertyLoad read $49.cond
33 + [11] Branch (read $50) then:bb3 else:bb4
34 bb3 (value):
35 predecessor blocks: bb2
35 - [13] store $49[13:19]:TObject<Array> = Array []
36 - [14] store $51[14:19]:TObject<Array> = StoreLocal Reassign store x$38[14:19]:TObject<Array> = capture $49[13:19]:TObject<Array>
37 - [15] mutate $52[15:19]:TObject<Array> = LoadLocal capture x$38[14:19]:TObject<Array>
38 - [16] mutate $53 = LoadLocal read props$36
39 - [17] mutate $54 = PropertyLoad read $53.foo
40 - [18] mutate $55[18:35] = PropertyCall mutate $52[15:19]:TObject<Array>.push(read $54)
41 - [19] store $57[19:35] = StoreLocal Const mutate $56[7:35] = capture $55[18:35]
42 - [20] Goto bb1
36 + [14] store $54[14:21]:TObject<Array> = Array []
37 + [15] store $56[15:21]:TObject<Array> = StoreLocal Reassign store x$42[15:21]:TObject<Array> = capture $54[14:21]:TObject<Array>
38 + [16] mutate $57[16:21]:TObject<Array> = LoadLocal capture x$42[15:21]:TObject<Array>
39 + [17] mutate $58 = LoadLocal read props$40
40 + [18] mutate $59 = PropertyLoad read $58.foo
41 + [19] mutate $60[19:21] = PropertyLoad read $57[16:21]:TObject<Array>.push
42 + [20] mutate $61[20:39] = PropertyCall mutate $57[16:21]:TObject<Array>.[object Object](read $59)
43 + [21] store $63[21:39] = StoreLocal Const mutate $62[8:39] = capture $61[20:39]
44 + [22] Goto bb1
45 bb4 (value):
46 predecessor blocks: bb2
45 - [23] store $61[23:29]:TObject<Array> = Array []
46 - [24] store $63[24:29]:TObject<Array> = StoreLocal Reassign store x$38[24:29]:TObject<Array> = capture $61[23:29]:TObject<Array>
47 - [25] mutate $64[25:29]:TObject<Array> = LoadLocal capture x$38[24:29]:TObject<Array>
48 - [26] mutate $65 = LoadLocal read props$36
49 - [27] mutate $66 = PropertyLoad read $65.bar
50 - [28] mutate $67[28:35] = PropertyCall mutate $64[25:29]:TObject<Array>.push(read $66)
51 - [29] store $69[29:35] = StoreLocal Const mutate $56[7:35] = capture $67[28:35]
52 - [30] Goto bb1
47 + [25] store $67[25:32]:TObject<Array> = Array []
48 + [26] store $69[26:32]:TObject<Array> = StoreLocal Reassign store x$42[26:32]:TObject<Array> = capture $67[25:32]:TObject<Array>
49 + [27] mutate $70[27:32]:TObject<Array> = LoadLocal capture x$42[26:32]:TObject<Array>
50 + [28] mutate $71 = LoadLocal read props$40
51 + [29] mutate $72 = PropertyLoad read $71.bar
52 + [30] mutate $73[30:32] = PropertyLoad read $70[27:32]:TObject<Array>.push
53 + [31] mutate $74[31:39] = PropertyCall mutate $70[27:32]:TObject<Array>.[object Object](read $72)
54 + [32] store $76[32:39] = StoreLocal Const mutate $62[8:39] = capture $74[31:39]
55 + [33] Goto bb1
56 bb1 (block):
57 predecessor blocks: bb3 bb4
55 - $72[7:35]:TPhi: phi(bb3: $56, bb4: $68)
56 - x$38:TObject<Array>: phi(bb3: x$38, bb4: x$38)
57 - [31] store $71[31:35] = StoreLocal Const mutate _$70[31:35] = capture $56[7:35]
58 - [32] mutate $73 = Global console
59 - [33] mutate $74[33:35] = LoadLocal capture _$70[31:35]
60 - [34] mutate $75 = PropertyCall read $73.log(mutate $74[33:35])
61 - [35] mutate $76 = LoadLocal capture x$38
62 - [36] Return freeze $76
58 + $79[8:39]:TPhi: phi(bb3: $62, bb4: $75)
59 + x$42:TObject<Array>: phi(bb3: x$42, bb4: x$42)
60 + [34] store $78[34:39] = StoreLocal Const mutate _$77[34:39] = capture $62[8:39]
61 + [35] mutate $80 = Global console
62 + [36] mutate $81[36:39] = LoadLocal capture _$77[34:39]
63 + [37] mutate $82 = PropertyLoad read $80.log
64 + [38] mutate $83 = PropertyCall read $80.[object Object](mutate $81[36:39])
65 + [39] mutate $84 = LoadLocal capture x$42
66 + [40] Return freeze $84
67 ```
68
\ No newline at end of file
compiler/forget/src/__tests__/fixtures/hir/ssa-renaming-unconditional-with-mutation.expect.md
+32 -29
@@ -24,40 +24,43 @@ function foo(props) {
24
25 ```javascript
26 bb0 (block):
27 - [1] store $32[1:7]:TObject<Array> = Array []
28 - [2] store $34[2:7]:TObject<Array> = StoreLocal Let store x$33[2:31]:TObject<Array> = capture $32[1:7]:TObject<Array>
29 - [3] mutate $35[3:7]:TObject<Array> = LoadLocal capture x$33[2:31]:TObject<Array>
30 - [4] mutate $36 = LoadLocal read props$31
31 - [5] mutate $37 = PropertyLoad read $36.bar
32 - [6] mutate $38 = PropertyCall mutate $35[3:7]:TObject<Array>.push(read $37)
33 - [7] mutate $39 = LoadLocal read props$31
34 - [8] mutate $40 = PropertyLoad read $39.cond
35 - [9] If (read $40) then:bb2 else:bb3 fallthrough=bb1
27 + [1] store $35[1:8]:TObject<Array> = Array []
28 + [2] store $37[2:8]:TObject<Array> = StoreLocal Let store x$36[2:34]:TObject<Array> = capture $35[1:8]:TObject<Array>
29 + [3] mutate $38[3:8]:TObject<Array> = LoadLocal capture x$36[2:34]:TObject<Array>
30 + [4] mutate $39 = LoadLocal read props$34
31 + [5] mutate $40 = PropertyLoad read $39.bar
32 + [6] mutate $41[6:8] = PropertyLoad read $38[3:8]:TObject<Array>.push
33 + [7] mutate $42 = PropertyCall mutate $38[3:8]:TObject<Array>.[object Object](read $40)
34 + [8] mutate $43 = LoadLocal read props$34
35 + [9] mutate $44 = PropertyLoad read $43.cond
36 + [10] If (read $44) then:bb2 else:bb3 fallthrough=bb1
37 bb2 (block):
38 predecessor blocks: bb0
38 - [12] store $44[12:31]:TObject<Array> = Array []
39 - [13] store $46[13:31]:TObject<Array> = StoreLocal Reassign store x$33[13:31]:TObject<Array> = capture $44[12:31]:TObject<Array>
40 - [14] mutate $47[14:31]:TObject<Array> = LoadLocal capture x$33[13:31]:TObject<Array>
41 - [15] mutate $48 = LoadLocal read props$31
42 - [16] mutate $49 = PropertyLoad read $48.foo
43 - [17] mutate $50 = PropertyCall mutate $47[14:31]:TObject<Array>.push(read $49)
44 - [18] Goto bb1
39 + [13] store $48[13:34]:TObject<Array> = Array []
40 + [14] store $50[14:34]:TObject<Array> = StoreLocal Reassign store x$36[14:34]:TObject<Array> = capture $48[13:34]:TObject<Array>
41 + [15] mutate $51[15:34]:TObject<Array> = LoadLocal capture x$36[14:34]:TObject<Array>
42 + [16] mutate $52 = LoadLocal read props$34
43 + [17] mutate $53 = PropertyLoad read $52.foo
44 + [18] mutate $54[18:34] = PropertyLoad read $51[15:34]:TObject<Array>.push
45 + [19] mutate $55 = PropertyCall mutate $51[15:34]:TObject<Array>.[object Object](read $53)
46 + [20] Goto bb1
47 bb3 (block):
48 predecessor blocks: bb0
47 - [21] store $54[21:31]:TObject<Array> = Array []
48 - [22] store $56[22:31]:TObject<Array> = StoreLocal Reassign store x$33[22:31]:TObject<Array> = capture $54[21:31]:TObject<Array>
49 - [23] mutate $57[23:31]:TObject<Array> = LoadLocal capture x$33[22:31]:TObject<Array>
50 - [24] mutate $58 = LoadLocal read props$31
51 - [25] mutate $59 = PropertyLoad read $58.bar
52 - [26] mutate $60 = PropertyCall mutate $57[23:31]:TObject<Array>.push(read $59)
53 - [27] Goto bb1
49 + [23] store $59[23:34]:TObject<Array> = Array []
50 + [24] store $61[24:34]:TObject<Array> = StoreLocal Reassign store x$36[24:34]:TObject<Array> = capture $59[23:34]:TObject<Array>
51 + [25] mutate $62[25:34]:TObject<Array> = LoadLocal capture x$36[24:34]:TObject<Array>
52 + [26] mutate $63 = LoadLocal read props$34
53 + [27] mutate $64 = PropertyLoad read $63.bar
54 + [28] mutate $65[28:34] = PropertyLoad read $62[25:34]:TObject<Array>.push
55 + [29] mutate $66 = PropertyCall mutate $62[25:34]:TObject<Array>.[object Object](read $64)
56 + [30] Goto bb1
57 bb1 (block):
58 predecessor blocks: bb2 bb3
56 - x$33[13:31]:TObject<Array>: phi(bb2: x$33, bb3: x$33)
57 - [28] mutate $61:TFunction = Global mut
58 - [29] mutate $62[29:31] = LoadLocal capture x$33[13:31]
59 - [30] mutate $64 = Call read $61:TFunction(mutate $62[29:31])
60 - [31] mutate $65 = LoadLocal capture x$33[13:31]
61 - [32] Return freeze $65
59 + x$36[14:34]:TObject<Array>: phi(bb2: x$36, bb3: x$36)
60 + [31] mutate $67:TFunction = Global mut
61 + [32] mutate $68[32:34] = LoadLocal capture x$36[14:34]
62 + [33] mutate $70 = Call read $67:TFunction(mutate $68[32:34])
63 + [34] mutate $71 = LoadLocal capture x$36[14:34]
64 + [35] Return freeze $71
65 ```
66
\ No newline at end of file