Skip to content

Commit 7d5bc1c

Browse files
crisbetopkozlowski-opensource
authored andcommitted
fix(compiler): remove container index from conditional instruction (#55190)
Stops passing in the `containerIndex` argument to the `conditional` instruction since it isn't being used anymore. PR Close #55190
1 parent 32eb23d commit 7d5bc1c

File tree

20 files changed

+36
-53
lines changed

20 files changed

+36
-53
lines changed

packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/content_projection/ng_content_fallback.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ $r3$.ɵɵdefineComponent({
6969
}
7070
if (rf & 2) {
7171
$r3$.ɵɵadvance(5);
72-
$r3$.ɵɵconditional(5, ctx.hasFooter ? 5 : -1);
72+
$r3$.ɵɵconditional(ctx.hasFooter ? 5 : -1);
7373
$r3$.ɵɵadvance();
7474
$r3$.ɵɵproperty("ngIf", ctx.hasStructural);
7575
}

packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_control_flow/basic_if_else_if_template.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ function MyApp_Template(rf, ctx) {
3333
$r3$.ɵɵadvance();
3434
$r3$.ɵɵtextInterpolate1(" ", ctx.message, " ");
3535
$r3$.ɵɵadvance();
36-
$r3$.ɵɵconditional(2, ctx.value() === 1 ? 2 : ctx.otherValue() === 2 ? 3 : ctx.message ? 4 : 5);
36+
$r3$.ɵɵconditional(ctx.value() === 1 ? 2 : ctx.otherValue() === 2 ? 3 : ctx.message ? 4 : 5);
3737
}
3838
}

packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_control_flow/basic_if_else_template.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ function MyApp_Template(rf, ctx) {
2121
$r3$.ɵɵadvance();
2222
$r3$.ɵɵtextInterpolate1(" ", ctx.message, " ");
2323
$r3$.ɵɵadvance();
24-
$r3$.ɵɵconditional(2, ctx.value() ? 2 : 3);
24+
$r3$.ɵɵconditional(ctx.value() ? 2 : 3);
2525
}
2626
}

packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_control_flow/basic_if_template.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ function MyApp_Template(rf, ctx) {
1515
$r3$.ɵɵadvance();
1616
$r3$.ɵɵtextInterpolate1(" ", ctx.message, " ");
1717
$r3$.ɵɵadvance();
18-
$r3$.ɵɵconditional(2, ctx.value() ? 2 : -1);
18+
$r3$.ɵɵconditional(ctx.value() ? 2 : -1);
1919
}
2020
}

packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_control_flow/basic_switch_template.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ function MyApp_Template(rf, ctx) {
3434
$r3$.ɵɵadvance();
3535
$r3$.ɵɵtextInterpolate1(" ", ctx.message, " ");
3636
$r3$.ɵɵadvance();
37-
$r3$.ɵɵconditional(2, ($MyApp_contFlowTmp$ = ctx.value()) === 0 ? 2 : $MyApp_contFlowTmp$ === 1 ? 3 : $MyApp_contFlowTmp$ === 2 ? 4 : 5);
37+
$r3$.ɵɵconditional(($MyApp_contFlowTmp$ = ctx.value()) === 0 ? 2 : $MyApp_contFlowTmp$ === 1 ? 3 : $MyApp_contFlowTmp$ === 2 ? 4 : 5);
3838
}
3939
}

packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_control_flow/if_nested_alias_listeners_template.pipeline.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function MyApp_Conditional_0_Conditional_1_Conditional_1_Template(rf, ctx) {
3030
let $MyApp_Conditional_0_Conditional_1_contFlowTmp$;
3131
const $ctx_r2$ = $r3$.ɵɵnextContext(2);
3232
$r3$.ɵɵadvance();
33-
$r3$.ɵɵconditional(1, ($MyApp_Conditional_0_Conditional_1_contFlowTmp$ = $ctx_r2$.value()) ? 1 : -1, $MyApp_Conditional_0_Conditional_1_contFlowTmp$);
33+
$r3$.ɵɵconditional(($MyApp_Conditional_0_Conditional_1_contFlowTmp$ = $ctx_r2$.value()) ? 1 : -1, $MyApp_Conditional_0_Conditional_1_contFlowTmp$);
3434
}
3535
}
3636

@@ -50,7 +50,7 @@ function MyApp_Conditional_0_Conditional_1_Conditional_1_Template(rf, ctx) {
5050
let $MyApp_Conditional_0_contFlowTmp$;
5151
const $ctx_r0$ = $r3$.ɵɵnextContext();
5252
$r3$.ɵɵadvance();
53-
$r3$.ɵɵconditional(1, ($MyApp_Conditional_0_contFlowTmp$ = $ctx_r0$.value()) ? 1 : -1, $MyApp_Conditional_0_contFlowTmp$);
53+
$r3$.ɵɵconditional(($MyApp_Conditional_0_contFlowTmp$ = $ctx_r0$.value()) ? 1 : -1, $MyApp_Conditional_0_contFlowTmp$);
5454
}
5555
}
5656
@@ -60,6 +60,6 @@ function MyApp_Conditional_0_Conditional_1_Conditional_1_Template(rf, ctx) {
6060
}
6161
if (rf & 2) {
6262
let $MyApp_contFlowTmp$;
63-
$r3$.ɵɵconditional(0, ($MyApp_contFlowTmp$ = ctx.value()) ? 0 : -1, $MyApp_contFlowTmp$);
63+
$r3$.ɵɵconditional(($MyApp_contFlowTmp$ = ctx.value()) ? 0 : -1, $MyApp_contFlowTmp$);
6464
}
6565
}

packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_control_flow/if_nested_alias_template.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function MyApp_Conditional_0_Conditional_1_Template(rf, ctx) {
2525
2626
$r3$.ɵɵtextInterpolate3(" Inner: ", $ctx_r2$.value(), "/", $root_r1$, "/", ctx, " ");
2727
$r3$.ɵɵadvance();
28-
$r3$.ɵɵconditional(1, ($MyApp_Conditional_0_Conditional_1_contFlowTmp$ = $ctx_r2$.value()) ? 1 : -1, $MyApp_Conditional_0_Conditional_1_contFlowTmp$);
28+
$r3$.ɵɵconditional(($MyApp_Conditional_0_Conditional_1_contFlowTmp$ = $ctx_r2$.value()) ? 1 : -1, $MyApp_Conditional_0_Conditional_1_contFlowTmp$);
2929
}
3030
}
3131

@@ -40,7 +40,7 @@ function MyApp_Conditional_0_Template(rf, ctx) {
4040
4141
$r3$.ɵɵtextInterpolate2(" Root: ", $ctx_r0$.value(), "/", ctx, " ");
4242
$r3$.ɵɵadvance();
43-
$r3$.ɵɵconditional(1, ($MyApp_Conditional_0_contFlowTmp$ = $ctx_r0$.value()) ? 1 : -1, $MyApp_Conditional_0_contFlowTmp$);
43+
$r3$.ɵɵconditional(($MyApp_Conditional_0_contFlowTmp$ = $ctx_r0$.value()) ? 1 : -1, $MyApp_Conditional_0_contFlowTmp$);
4444
}
4545
}
4646
@@ -50,6 +50,6 @@ function MyApp_Template(rf, ctx) {
5050
}
5151
if (rf & 2) {
5252
let $MyApp_contFlowTmp$;
53-
$r3$.ɵɵconditional(0, ($MyApp_contFlowTmp$ = ctx.value()) ? 0 : -1, $MyApp_contFlowTmp$);
53+
$r3$.ɵɵconditional(($MyApp_contFlowTmp$ = ctx.value()) ? 0 : -1, $MyApp_contFlowTmp$);
5454
}
5555
}

packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_control_flow/if_with_alias_template.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ function MyApp_Template(rf, ctx) {
2020
$r3$.ɵɵadvance();
2121
$r3$.ɵɵtextInterpolate1(" ", ctx.message, " ");
2222
$r3$.ɵɵadvance();
23-
$r3$.ɵɵconditional(2, ($MyApp_contFlowTmp$ = ctx.value()) ? 2 : -1, $MyApp_contFlowTmp$);
23+
$r3$.ɵɵconditional(($MyApp_contFlowTmp$ = ctx.value()) ? 2 : -1, $MyApp_contFlowTmp$);
2424
}
2525
}

packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_control_flow/if_with_pipe_template.pipeline.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ function $MyApp_Conditional_3_Template$(rf, ctx) {
3030
$r3$.ɵɵadvance();
3131
$r3$.ɵɵtextInterpolate1(" ", ctx.message, " ");
3232
$r3$.ɵɵadvance();
33-
$r3$.ɵɵconditional(2, $r3$.ɵɵpipeBind1(3, 2, ctx.val) === 1 ? 2 : $r3$.ɵɵpipeBind1(4, 4, ctx.val) === 2 ? 5 : 6);
33+
$r3$.ɵɵconditional($r3$.ɵɵpipeBind1(3, 2, ctx.val) === 1 ? 2 : $r3$.ɵɵpipeBind1(4, 4, ctx.val) === 2 ? 5 : 6);
3434
}
3535
}

packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_control_flow/nested_if_template.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function MyApp_Conditional_4_Template(rf, ctx) {
4040
}
4141
if (rf & 2) {
4242
const $ctx_r2$ = $r3$.ɵɵnextContext();
43-
$r3$.ɵɵconditional(0, $ctx_r2$.innerVal === 0 ? 0 : $ctx_r2$.innerVal === 1 ? 1 : $ctx_r2$.innerVal === 2 ? 2 : 3);
43+
$r3$.ɵɵconditional($ctx_r2$.innerVal === 0 ? 0 : $ctx_r2$.innerVal === 1 ? 1 : $ctx_r2$.innerVal === 2 ? 2 : 3);
4444
}
4545
}
4646

@@ -61,6 +61,6 @@ function MyApp_Template(rf, ctx) {
6161
$r3$.ɵɵadvance();
6262
$r3$.ɵɵtextInterpolate1(" ", ctx.message, " ");
6363
$r3$.ɵɵadvance();
64-
$r3$.ɵɵconditional(2, ctx.val === 0 ? 2 : ctx.val === 1 ? 3 : ctx.val === 2 ? 4 : 5);
64+
$r3$.ɵɵconditional(ctx.val === 0 ? 2 : ctx.val === 1 ? 3 : ctx.val === 2 ? 4 : 5);
6565
}
6666
}

0 commit comments

Comments
 (0)