perf(ivy): replace select instruction with advance (#32516)

Replaces the `select` instruction with a new one called `advance`. Instead of the jumping to a specific index, the new instruction goes forward X amount of elements. The advantage of doing this is that it should generate code the compresses better.

PR Close #32516
This commit is contained in:
crisbeto
2019-09-06 23:43:16 +02:00
committed by Matias Niemelä
parent 2230dfaea7
commit 664e0015d4
34 changed files with 280 additions and 304 deletions

View File

@ -774,7 +774,7 @@ describe('compiler compliance', () => {
if (rf & 2) {
const $myComp$ = $r3$.ɵɵnextContext();
const $foo$ = $r3$.ɵɵreference(1);
$r3$.ɵɵselect(1);
$r3$.ɵɵadvance(1);
$r3$.ɵɵtextInterpolate2("", $myComp$.salutation, " ", $foo$, "");
}
}
@ -1275,7 +1275,7 @@ describe('compiler compliance', () => {
}
if (rf & 2) {
$r3$.ɵɵproperty("ngIf", ctx.visible);
$r3$.ɵɵselect(1);
$r3$.ɵɵadvance(1);
$r3$.ɵɵproperty("ngIf", ctx.visible);
}
}
@ -2032,7 +2032,7 @@ describe('compiler compliance', () => {
}
if (rf & 2) {
$r3$.ɵɵtextInterpolate($r3$.ɵɵpipeBind2(1, 3, $r3$.ɵɵpipeBind2(2, 6, ctx.name, ctx.size), ctx.size));
$r3$.ɵɵselect(4);
$r3$.ɵɵadvance(4);
$r3$.ɵɵtextInterpolate2("", $r3$.ɵɵpipeBindV(5, 9, $r3$.ɵɵpureFunction1(18, $c0$, ctx.name)), " ", ctx.name ? 1 : $r3$.ɵɵpipeBind1(6, 16, 2), "");
}
},
@ -2216,7 +2216,7 @@ describe('compiler compliance', () => {
}
if (rf & 2) {
const $user$ = $r3$.ɵɵreference(1);
$r3$.ɵɵselect(2);
$r3$.ɵɵadvance(2);
$r3$.ɵɵtextInterpolate1("Hello ", $user$.value, "!");
}
},
@ -2279,7 +2279,7 @@ describe('compiler compliance', () => {
$r3$.ɵɵnextContext();
const $foo$ = $r3$.ɵɵreference(1);
const $baz$ = $r3$.ɵɵreference(5);
$r3$.ɵɵselect(1);
$r3$.ɵɵadvance(1);
$r3$.ɵɵtextInterpolate3("", $foo$, "-", $bar$, "-", $baz$, "");
}
}
@ -2295,7 +2295,7 @@ describe('compiler compliance', () => {
const $bar$ = $r3$.ɵɵreference(4);
$r3$.ɵɵnextContext();
const $foo$ = $r3$.ɵɵreference(1);
$r3$.ɵɵselect(1);
$r3$.ɵɵadvance(1);
$r3$.ɵɵtextInterpolate2(" ", $foo$, "-", $bar$, " ");
}
}
@ -2314,7 +2314,7 @@ describe('compiler compliance', () => {
}
if (rf & 2) {
const $foo$ = $r3$.ɵɵreference(1);
$r3$.ɵɵselect(2);
$r3$.ɵɵadvance(2);
$r3$.ɵɵtextInterpolate1(" ", $foo$, " ");
}
},
@ -2365,7 +2365,7 @@ describe('compiler compliance', () => {
if (rf & 2) {
const $item$ = $i0$.ɵɵnextContext().$implicit;
const $foo$ = $i0$.ɵɵreference(2);
$r3$.ɵɵselect(1);
$r3$.ɵɵadvance(1);
$i0$.ɵɵtextInterpolate2(" ", $foo$, " - ", $item$, " ");
}
}
@ -2379,7 +2379,7 @@ describe('compiler compliance', () => {
}
if (rf & 2) {
const $app$ = $i0$.ɵɵnextContext();
$r3$.ɵɵselect(3);
$r3$.ɵɵadvance(3);
$i0$.ɵɵproperty("ngIf", $app$.showing);
}
}
@ -2469,7 +2469,7 @@ describe('compiler compliance', () => {
}
if (rf & 2) {
$r3$.ɵɵproperty("name", ctx.name1);
$r3$.ɵɵselect(1);
$r3$.ɵɵadvance(1);
$r3$.ɵɵproperty("name", ctx.name2);
}
},
@ -2602,7 +2602,7 @@ describe('compiler compliance', () => {
$r3$.ɵɵelementEnd();
}
if (rf & 2) {
$r3$.ɵɵselect(1);
$r3$.ɵɵadvance(1);
$r3$.ɵɵproperty("forOf", ctx.items);
}
},
@ -2670,7 +2670,7 @@ describe('compiler compliance', () => {
}
if (rf & 2) {
const $item$ = ctx.$implicit;
$r3$.ɵɵselect(1);
$r3$.ɵɵadvance(1);
$r3$.ɵɵtextInterpolate($item$.name);
}
}
@ -2687,7 +2687,7 @@ describe('compiler compliance', () => {
$r3$.ɵɵelementEnd();
}
if (rf & 2) {
$r3$.ɵɵselect(1);
$r3$.ɵɵadvance(1);
$r3$.ɵɵproperty("forOf", ctx.items);
}
},
@ -2753,7 +2753,7 @@ describe('compiler compliance', () => {
if (rf & 2) {
const $info$ = ctx.$implicit;
const $item$ = $r3$.ɵɵnextContext().$implicit;
$r3$.ɵɵselect(1);
$r3$.ɵɵadvance(1);
$r3$.ɵɵtextInterpolate2(" ", $item$.name, ": ", $info$.description, " ");
}
}
@ -2771,9 +2771,9 @@ describe('compiler compliance', () => {
}
if (rf & 2) {
const $item$ = ctx.$implicit;
$r3$.ɵɵselect(2);
$r3$.ɵɵadvance(2);
$r3$.ɵɵtextInterpolate(IDENT.name);
$r3$.ɵɵselect(4);
$r3$.ɵɵadvance(2);
$r3$.ɵɵproperty("forOf", IDENT.infos);
}
}
@ -2791,7 +2791,7 @@ describe('compiler compliance', () => {
$r3$.ɵɵelementEnd();
}
if (rf & 2) {
$r3$.ɵɵselect(1);
$r3$.ɵɵadvance(1);
$r3$.ɵɵproperty("forOf", ctx.items);
}
},

View File

@ -44,7 +44,7 @@ describe('compiler compliance: bindings', () => {
$i0$.ɵɵelementEnd();
}
if (rf & 2) {
$r3$.ɵɵselect(1);
$r3$.ɵɵadvance(1);
$i0$.ɵɵtextInterpolate1("Hello ", $ctx$.name, "");
}
}`;
@ -360,9 +360,9 @@ describe('compiler compliance: bindings', () => {
if (rf & 2) {
$r3$.ɵɵproperty("title", ctx.myTitle)("id", ctx.buttonId)("tabindex", 1);
$r3$.ɵɵselect(1);
$r3$.ɵɵadvance(1);
$r3$.ɵɵproperty("id", 1)("title", "hello")("someProp", 1 + 2);
$r3$.ɵɵselect(2);
$r3$.ɵɵadvance(1);
$r3$.ɵɵproperty("prop", "one")("otherProp", 2);
}
}
@ -397,7 +397,7 @@ describe('compiler compliance: bindings', () => {
if (rf & 2) {
$r3$.ɵɵproperty("title", ctx.myTitle)("id", ctx.buttonId)("tabindex", 1);
$r3$.ɵɵselect(1);
$r3$.ɵɵadvance(1);
$r3$.ɵɵproperty("id", 1)("title", "hello")("someProp", 1 + 2);
}
}
@ -566,9 +566,9 @@ describe('compiler compliance: bindings', () => {
if (rf & 2) {
$r3$.ɵɵattribute("title", ctx.myTitle)("id", ctx.buttonId)("tabindex", 1);
$r3$.ɵɵselect(1);
$r3$.ɵɵadvance(1);
$r3$.ɵɵattribute("id", 1)("title", "hello")("some-attr", 1 + 2);
$r3$.ɵɵselect(2);
$r3$.ɵɵadvance(1);
$r3$.ɵɵattribute("some-attr", "one")("some-other-attr", 2);
}
}
@ -603,7 +603,7 @@ describe('compiler compliance: bindings', () => {
if (rf & 2) {
$r3$.ɵɵattribute("title", ctx.myTitle)("id", ctx.buttonId)("tabindex", 1);
$r3$.ɵɵselect(1);
$r3$.ɵɵadvance(1);
$r3$.ɵɵattribute("id", 1)("title", "hello")("some-attr", 1 + 2);
}
}
@ -1173,23 +1173,23 @@ describe('compiler compliance: bindings', () => {
if (rf & 2) {
i0.ɵɵpropertyInterpolateV("title", ["a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f", ctx.six, "g", ctx.seven, "h", ctx.eight, "i", ctx.nine, "j"]);
i0.ɵɵselect(1);
i0.ɵɵadvance(1);
i0.ɵɵpropertyInterpolate8("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f", ctx.six, "g", ctx.seven, "h", ctx.eight, "i");
i0.ɵɵselect(2);
i0.ɵɵadvance(1);
i0.ɵɵpropertyInterpolate7("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f", ctx.six, "g", ctx.seven, "h");
i0.ɵɵselect(3);
i0.ɵɵadvance(1);
i0.ɵɵpropertyInterpolate6("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f", ctx.six, "g");
i0.ɵɵselect(4);
i0.ɵɵadvance(1);
i0.ɵɵpropertyInterpolate5("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f");
i0.ɵɵselect(5);
i0.ɵɵadvance(1);
i0.ɵɵpropertyInterpolate4("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e");
i0.ɵɵselect(6);
i0.ɵɵadvance(1);
i0.ɵɵpropertyInterpolate3("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d");
i0.ɵɵselect(7);
i0.ɵɵadvance(1);
i0.ɵɵpropertyInterpolate2("title", "a", ctx.one, "b", ctx.two, "c");
i0.ɵɵselect(8);
i0.ɵɵadvance(1);
i0.ɵɵpropertyInterpolate1("title", "a", ctx.one, "b");
i0.ɵɵselect(9);
i0.ɵɵadvance(1);
i0.ɵɵpropertyInterpolate("title", ctx.one);
}
@ -1217,23 +1217,23 @@ describe('compiler compliance: bindings', () => {
if (rf & 2) {
i0.ɵɵattributeInterpolateV("title", ["a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f", ctx.six, "g", ctx.seven, "h", ctx.eight, "i", ctx.nine, "j"]);
i0.ɵɵselect(1);
i0.ɵɵadvance(1);
i0.ɵɵattributeInterpolate8("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f", ctx.six, "g", ctx.seven, "h", ctx.eight, "i");
i0.ɵɵselect(2);
i0.ɵɵadvance(1);
i0.ɵɵattributeInterpolate7("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f", ctx.six, "g", ctx.seven, "h");
i0.ɵɵselect(3);
i0.ɵɵadvance(1);
i0.ɵɵattributeInterpolate6("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f", ctx.six, "g");
i0.ɵɵselect(4);
i0.ɵɵadvance(1);
i0.ɵɵattributeInterpolate5("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f");
i0.ɵɵselect(5);
i0.ɵɵadvance(1);
i0.ɵɵattributeInterpolate4("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e");
i0.ɵɵselect(6);
i0.ɵɵadvance(1);
i0.ɵɵattributeInterpolate3("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d");
i0.ɵɵselect(7);
i0.ɵɵadvance(1);
i0.ɵɵattributeInterpolate2("title", "a", ctx.one, "b", ctx.two, "c");
i0.ɵɵselect(8);
i0.ɵɵadvance(1);
i0.ɵɵattributeInterpolate1("title", "a", ctx.one, "b");
i0.ɵɵselect(9);
i0.ɵɵadvance(1);
i0.ɵɵattribute("title", ctx.one);
}
@ -1267,7 +1267,7 @@ describe('compiler compliance: bindings', () => {
}
if (rf & 2) {
const $_r0$ = $i0$.ɵɵreference(1);
$r3$.ɵɵselect(4);
$r3$.ɵɵadvance(4);
$i0$.ɵɵtextInterpolate1(" ", $_r0$.id, " ");
}
}

View File

@ -488,7 +488,6 @@ describe('i18n support in the template compiler', () => {
if (rf & 2) {
$r3$.ɵɵi18nExp($r3$.ɵɵpipeBind1(1, 6, ctx.valueA))(ctx.valueB);
$r3$.ɵɵi18nApply(2);
$r3$.ɵɵselect(3);
$r3$.ɵɵi18nExp(ctx.valueA)(ctx.valueB)(ctx.valueA + ctx.valueB)(ctx.valueC);
$r3$.ɵɵi18nApply(4);
}
@ -575,7 +574,6 @@ describe('i18n support in the template compiler', () => {
}
if (rf & 2) {
const $outer_r1$ = ctx.$implicit;
$r3$.ɵɵselect(1);
$r3$.ɵɵi18nExp($r3$.ɵɵpipeBind1(2, 1, $outer_r1$));
$r3$.ɵɵi18nApply(3);
}
@ -746,7 +744,6 @@ describe('i18n support in the template compiler', () => {
if (rf & 2) {
$r3$.ɵɵi18nExp($r3$.ɵɵpipeBind1(1, 6, ctx.valueA))(ctx.valueB);
$r3$.ɵɵi18nApply(2);
$r3$.ɵɵselect(3);
$r3$.ɵɵi18nExp(ctx.valueA)(ctx.valueB)(ctx.valueA + ctx.valueB)(ctx.valueC);
$r3$.ɵɵi18nApply(4);
}
@ -793,7 +790,6 @@ describe('i18n support in the template compiler', () => {
}
if (rf & 2) {
const $outer_r1$ = ctx.$implicit;
$r3$.ɵɵselect(1);
$r3$.ɵɵi18nExp($r3$.ɵɵpipeBind1(2, 1, $outer_r1$));
$r3$.ɵɵi18nApply(3);
}
@ -1046,7 +1042,6 @@ describe('i18n support in the template compiler', () => {
$r3$.ɵɵelementEnd();
}
if (rf & 2) {
$r3$.ɵɵselect(1);
$r3$.ɵɵi18nExp(ctx.valueA)(ctx.valueB);
$r3$.ɵɵi18nApply(1);
}
@ -1081,7 +1076,6 @@ describe('i18n support in the template compiler', () => {
$r3$.ɵɵelementEnd();
}
if (rf & 2) {
$r3$.ɵɵselect(1);
$r3$.ɵɵi18nExp(ctx.valueA);
$r3$.ɵɵi18nApply(1);
}
@ -1126,7 +1120,6 @@ describe('i18n support in the template compiler', () => {
if (rf & 2) {
var $tmp_2_0$ = null;
const $currVal_2$ = ($tmp_2_0$ = ctx.valueA.getRawValue()) == null ? null : $tmp_2_0$.getTitle();
$r3$.ɵɵselect(1);
$r3$.ɵɵi18nExp($r3$.ɵɵpipeBind1(2, 3, ctx.valueA))(ctx.valueA == null ? null : ctx.valueA.a == null ? null : ctx.valueA.a.b)($currVal_2$);
$r3$.ɵɵi18nApply(1);
}
@ -1193,13 +1186,10 @@ describe('i18n support in the template compiler', () => {
$r3$.ɵɵelementEnd();
}
if (rf & 2) {
$r3$.ɵɵselect(1);
$r3$.ɵɵi18nExp(ctx.one);
$r3$.ɵɵi18nApply(1);
$r3$.ɵɵselect(3);
$r3$.ɵɵi18nExp($r3$.ɵɵpipeBind1(4, 3, ctx.two));
$r3$.ɵɵi18nApply(3);
$r3$.ɵɵselect(6);
$r3$.ɵɵi18nExp(ctx.three + ctx.four + ctx.five);
$r3$.ɵɵi18nApply(6);
}
@ -1289,10 +1279,8 @@ describe('i18n support in the template compiler', () => {
$r3$.ɵɵelementEnd();
}
if (rf & 2) {
$r3$.ɵɵselect(1);
$r3$.ɵɵi18nExp(ctx.one);
$r3$.ɵɵi18nApply(1);
$r3$.ɵɵselect(4);
$r3$.ɵɵi18nExp($r3$.ɵɵpipeBind1(5, 3, ctx.two))(ctx.nestedInBlockTwo);
$r3$.ɵɵi18nApply(4);
}
@ -1398,12 +1386,10 @@ describe('i18n support in the template compiler', () => {
$r3$.ɵɵelementEnd();
}
if (rf & 2) {
$r3$.ɵɵselect(2);
$r3$.ɵɵi18nExp(ctx.valueB)(ctx.valueC);
$r3$.ɵɵi18nApply(3);
$r3$.ɵɵi18nExp(ctx.valueA);
$r3$.ɵɵi18nApply(1);
$r3$.ɵɵselect(7);
$r3$.ɵɵi18nExp(ctx.valueE);
$r3$.ɵɵi18nApply(8);
$r3$.ɵɵi18nExp($r3$.ɵɵpipeBind1(6, 5, ctx.valueD));
@ -1463,7 +1449,6 @@ describe('i18n support in the template compiler', () => {
}
if (rf & 2) {
const $ctx_r0$ = $r3$.ɵɵnextContext();
$r3$.ɵɵselect(2);
$r3$.ɵɵi18nExp($ctx_r0$.valueA)($r3$.ɵɵpipeBind1(4, 2, $ctx_r0$.valueB));
$r3$.ɵɵi18nApply(2);
}
@ -1479,7 +1464,7 @@ describe('i18n support in the template compiler', () => {
$r3$.ɵɵelementEnd();
}
if (rf & 2) {
$r3$.ɵɵselect(2);
$r3$.ɵɵadvance(2);
$r3$.ɵɵproperty("ngIf", ctx.visible);
}
}
@ -1539,9 +1524,9 @@ describe('i18n support in the template compiler', () => {
$r3$.ɵɵtemplate(2, MyComponent_img_2_Template, 2, 1, "img", $_c2$);
}
if (rf & 2) {
$r3$.ɵɵselect(1);
$r3$.ɵɵadvance(1);
$r3$.ɵɵproperty("ngIf", ctx.visible);
$r3$.ɵɵselect(2);
$r3$.ɵɵadvance(1);
$r3$.ɵɵproperty("ngIf", ctx.visible);
}
}
@ -1604,7 +1589,7 @@ describe('i18n support in the template compiler', () => {
}
if (rf & 2) {
const $ctx_r0$ = $r3$.ɵɵnextContext();
$r3$.ɵɵselect(4);
$r3$.ɵɵadvance(4);
$r3$.ɵɵproperty("ngIf", $ctx_r0$.exists);
$r3$.ɵɵi18nExp($ctx_r0$.valueA)($r3$.ɵɵpipeBind1(3, 3, $ctx_r0$.valueB));
$r3$.ɵɵi18nApply(0);
@ -1683,9 +1668,9 @@ describe('i18n support in the template compiler', () => {
$r3$.ɵɵelementEnd();
}
if (rf & 2) {
$r3$.ɵɵselect(2);
$r3$.ɵɵadvance(2);
$r3$.ɵɵproperty("ngIf", ctx.visible);
$r3$.ɵɵselect(3);
$r3$.ɵɵadvance(1);
$r3$.ɵɵproperty("ngIf", !ctx.visible);
}
}
@ -1727,7 +1712,6 @@ describe('i18n support in the template compiler', () => {
}
if (rf & 2) {
const $ctx_r0$ = $r3$.ɵɵnextContext();
$r3$.ɵɵselect(1);
$r3$.ɵɵi18nExp($ctx_r0$.valueA);
$r3$.ɵɵi18nApply(1);
}
@ -1833,7 +1817,6 @@ describe('i18n support in the template compiler', () => {
$r3$.ɵɵelementEnd();
}
if (rf & 2) {
$r3$.ɵɵselect(1);
$r3$.ɵɵi18nExp(ctx.age);
$r3$.ɵɵi18nApply(1);
}
@ -1958,7 +1941,6 @@ describe('i18n support in the template compiler', () => {
$r3$.ɵɵelementContainerEnd();
}
if (rf & 2) {
$r3$.ɵɵselect(1);
$r3$.ɵɵi18nExp($r3$.ɵɵpipeBind1(2, 1, ctx.valueA));
$r3$.ɵɵi18nApply(1);
}
@ -2063,7 +2045,6 @@ describe('i18n support in the template compiler', () => {
$r3$.ɵɵelementEnd();
}
if (rf & 2) {
$r3$.ɵɵselect(1);
$r3$.ɵɵi18nExp($r3$.ɵɵpipeBind1(4, 1, ctx.valueB));
$r3$.ɵɵi18nApply(1);
}
@ -2123,7 +2104,6 @@ describe('i18n support in the template compiler', () => {
$r3$.ɵɵelementContainerEnd();
}
if (rf & 2) {
$r3$.ɵɵselect(2);
$r3$.ɵɵi18nExp(ctx.age);
$r3$.ɵɵi18nApply(2);
}
@ -2278,7 +2258,6 @@ describe('i18n support in the template compiler', () => {
$r3$.ɵɵtemplate(2, MyComponent_ng_template_2_Template, 1, 1, "ng-template");
}
if (rf & 2) {
$r3$.ɵɵselect(1);
$r3$.ɵɵi18nExp(ctx.gender);
$r3$.ɵɵi18nApply(1);
}
@ -2554,7 +2533,6 @@ describe('i18n support in the template compiler', () => {
$r3$.ɵɵelementEnd();
}
if (rf & 2) {
$r3$.ɵɵselect(1);
$r3$.ɵɵi18nExp(ctx.gender);
$r3$.ɵɵi18nApply(1);
}
@ -2667,7 +2645,6 @@ describe('i18n support in the template compiler', () => {
}
if (rf & 2) {
const $ctx_r0$ = $r3$.ɵɵnextContext();
$r3$.ɵɵselect(2);
$r3$.ɵɵi18nExp($ctx_r0$.age);
$r3$.ɵɵi18nApply(2);
}
@ -2695,7 +2672,6 @@ describe('i18n support in the template compiler', () => {
}
if (rf & 2) {
const $ctx_r1$ = $r3$.ɵɵnextContext();
$r3$.ɵɵselect(2);
$r3$.ɵɵi18nExp($ctx_r1$.count)($ctx_r1$.count);
$r3$.ɵɵi18nApply(2);
}
@ -2712,12 +2688,11 @@ describe('i18n support in the template compiler', () => {
$r3$.ɵɵtemplate(3, MyComponent_div_3_Template, 4, 2, "div", $_c1$);
}
if (rf & 2) {
$r3$.ɵɵselect(1);
$r3$.ɵɵi18nExp(ctx.gender);
$r3$.ɵɵi18nApply(1);
$r3$.ɵɵselect(2);
$r3$.ɵɵadvance(2);
$r3$.ɵɵproperty("ngIf", ctx.visible);
$r3$.ɵɵselect(3);
$r3$.ɵɵadvance(1);
$r3$.ɵɵproperty("ngIf", ctx.available);
}
}
@ -2752,7 +2727,6 @@ describe('i18n support in the template compiler', () => {
$r3$.ɵɵelementEnd();
}
if (rf & 2) {
$r3$.ɵɵselect(1);
$r3$.ɵɵi18nExp(ctx.age)(ctx.other);
$r3$.ɵɵi18nApply(1);
}
@ -2828,7 +2802,6 @@ describe('i18n support in the template compiler', () => {
$r3$.ɵɵelementEnd();
}
if (rf & 2) {
$r3$.ɵɵselect(1);
$r3$.ɵɵi18nExp(ctx.gender);
$r3$.ɵɵi18nApply(1);
}
@ -2866,7 +2839,6 @@ describe('i18n support in the template compiler', () => {
$r3$.ɵɵelementEnd();
}
if (rf & 2) {
$r3$.ɵɵselect(1);
$r3$.ɵɵi18nExp(ctx.gender)(ctx.ageA + ctx.ageB + ctx.ageC);
$r3$.ɵɵi18nApply(1);
}
@ -2929,7 +2901,6 @@ describe('i18n support in the template compiler', () => {
$r3$.ɵɵelementEnd();
}
if (rf & 2) {
$r3$.ɵɵselect(1);
$r3$.ɵɵi18nExp(ctx.gender)(ctx.age);
$r3$.ɵɵi18nApply(1);
}
@ -3035,7 +3006,7 @@ describe('i18n support in the template compiler', () => {
$r3$.ɵɵelementEnd();
}
if (rf & 2) {
$r3$.ɵɵselect(3);
$r3$.ɵɵadvance(3);
$r3$.ɵɵproperty("ngIf", ctx.visible);
$r3$.ɵɵi18nExp(ctx.gender)(ctx.gender);
$r3$.ɵɵi18nApply(1);
@ -3091,7 +3062,6 @@ describe('i18n support in the template compiler', () => {
$r3$.ɵɵelementEnd();
}
if (rf & 2) {
$r3$.ɵɵselect(1);
$r3$.ɵɵi18nExp(ctx.age)(ctx.gender);
$r3$.ɵɵi18nApply(1);
}
@ -3140,7 +3110,6 @@ describe('i18n support in the template compiler', () => {
$r3$.ɵɵelementEnd();
}
if (rf & 2) {
$r3$.ɵɵselect(1);
$r3$.ɵɵi18nExp(ctx.name)(ctx.count)(ctx.count);
$r3$.ɵɵi18nApply(1);
}
@ -3225,7 +3194,7 @@ describe('i18n support in the template compiler', () => {
$r3$.ɵɵelementEnd();
}
if (rf & 2) {
$r3$.ɵɵselect(2);
$r3$.ɵɵadvance(2);
$r3$.ɵɵproperty("ngIf", ctx.ageVisible);
$r3$.ɵɵi18nExp(ctx.gender);
$r3$.ɵɵi18nApply(1);
@ -3314,7 +3283,7 @@ describe('i18n support in the template compiler', () => {
$r3$.ɵɵelementEnd();
}
if (rf & 2) {
$r3$.ɵɵselect(2);
$r3$.ɵɵadvance(2);
$r3$.ɵɵproperty("ngIf", ctx.ageVisible);
$r3$.ɵɵi18nExp(ctx.gender)(ctx.weight)(ctx.height);
$r3$.ɵɵi18nApply(1);
@ -3361,7 +3330,6 @@ describe('i18n support in the template compiler', () => {
$r3$.ɵɵelementEnd();
}
if (rf & 2) {
$r3$.ɵɵselect(1);
$r3$.ɵɵi18nExp(ctx.gender)(ctx.weight)(ctx.height)(ctx.age);
$r3$.ɵɵi18nApply(1);
}

View File

@ -221,9 +221,9 @@ describe('compiler compliance: styling', () => {
}
if (rf & 2) {
$r3$.ɵɵproperty("@foo", ctx.exp);
$r3$.ɵɵselect(1);
$r3$.ɵɵadvance(1);
$r3$.ɵɵproperty("@bar", undefined);
$r3$.ɵɵselect(2);
$r3$.ɵɵadvance(1);
$r3$.ɵɵproperty("@baz", undefined);
}
},
@ -955,7 +955,7 @@ describe('compiler compliance: styling', () => {
$r3$.ɵɵstyleProp("baz", $r3$.ɵɵpipeBind2(3, 12, $ctx$.bazExp, 4000));
$r3$.ɵɵclassProp("foo", $r3$.ɵɵpipeBind2(4, 15, $ctx$.fooExp, 2000));
$r3$.ɵɵstylingApply();
$r3$.ɵɵselect(5);
$r3$.ɵɵadvance(5);
$r3$.ɵɵtextInterpolate1(" ", $ctx$.item, "");
}
}
@ -1000,13 +1000,13 @@ describe('compiler compliance: styling', () => {
if (rf & 2) {
$r3$.ɵɵstyleProp("width", $ctx$.w1);
$r3$.ɵɵstylingApply();
$r3$.ɵɵselect(1);
$r3$.ɵɵadvance(1);
$r3$.ɵɵstyleProp("height", $ctx$.h1);
$r3$.ɵɵstylingApply();
$r3$.ɵɵselect(2);
$r3$.ɵɵadvance(1);
$r3$.ɵɵclassProp("active", $ctx$.a1);
$r3$.ɵɵstylingApply();
$r3$.ɵɵselect(3);
$r3$.ɵɵadvance(1);
$r3$.ɵɵclassProp("removed", $ctx$.r1);
$r3$.ɵɵstylingApply();
}
@ -1337,31 +1337,31 @@ describe('compiler compliance: styling', () => {
if (rf & 2) {
$r3$.ɵɵclassMapInterpolateV(["a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f", ctx.six, "g", ctx.seven, "h", ctx.eight, "i", ctx.nine, "j"]);
$r3$.ɵɵstylingApply();
$r3$.ɵɵselect(1);
$r3$.ɵɵadvance(1);
$r3$.ɵɵclassMapInterpolate8("a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f", ctx.six, "g", ctx.seven, "h", ctx.eight, "i");
$r3$.ɵɵstylingApply();
$r3$.ɵɵselect(2);
$r3$.ɵɵadvance(1);
$r3$.ɵɵclassMapInterpolate7("a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f", ctx.six, "g", ctx.seven, "h");
$r3$.ɵɵstylingApply();
$r3$.ɵɵselect(3);
$r3$.ɵɵadvance(1);
$r3$.ɵɵclassMapInterpolate6("a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f", ctx.six, "g");
$r3$.ɵɵstylingApply();
$r3$.ɵɵselect(4);
$r3$.ɵɵadvance(1);
$r3$.ɵɵclassMapInterpolate5("a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f");
$r3$.ɵɵstylingApply();
$r3$.ɵɵselect(5);
$r3$.ɵɵadvance(1);
$r3$.ɵɵclassMapInterpolate4("a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e");
$r3$.ɵɵstylingApply();
$r3$.ɵɵselect(6);
$r3$.ɵɵadvance(1);
$r3$.ɵɵclassMapInterpolate3("a", ctx.one, "b", ctx.two, "c", ctx.three, "d");
$r3$.ɵɵstylingApply();
$r3$.ɵɵselect(7);
$r3$.ɵɵadvance(1);
$r3$.ɵɵclassMapInterpolate2("a", ctx.one, "b", ctx.two, "c");
$r3$.ɵɵstylingApply();
$r3$.ɵɵselect(8);
$r3$.ɵɵadvance(1);
$r3$.ɵɵclassMapInterpolate1("a", ctx.one, "b");
$r3$.ɵɵstylingApply();
$r3$.ɵɵselect(9);
$r3$.ɵɵadvance(1);
$r3$.ɵɵclassMap(ctx.one);
$r3$.ɵɵstylingApply();
}
@ -1439,31 +1439,31 @@ describe('compiler compliance: styling', () => {
if (rf & 2) {
$r3$.ɵɵstylePropInterpolateV("color", ["a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f", ctx.six, "g", ctx.seven, "h", ctx.eight, "i", ctx.nine, "j"]);
$r3$.ɵɵstylingApply();
$r3$.ɵɵselect(1);
$r3$.ɵɵadvance(1);
$r3$.ɵɵstylePropInterpolate8("color", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f", ctx.six, "g", ctx.seven, "h", ctx.eight, "i");
$r3$.ɵɵstylingApply();
$r3$.ɵɵselect(2);
$r3$.ɵɵadvance(1);
$r3$.ɵɵstylePropInterpolate7("color", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f", ctx.six, "g", ctx.seven, "h");
$r3$.ɵɵstylingApply();
$r3$.ɵɵselect(3);
$r3$.ɵɵadvance(1);
$r3$.ɵɵstylePropInterpolate6("color", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f", ctx.six, "g");
$r3$.ɵɵstylingApply();
$r3$.ɵɵselect(4);
$r3$.ɵɵadvance(1);
$r3$.ɵɵstylePropInterpolate5("color", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f");
$r3$.ɵɵstylingApply();
$r3$.ɵɵselect(5);
$r3$.ɵɵadvance(1);
$r3$.ɵɵstylePropInterpolate4("color", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e");
$r3$.ɵɵstylingApply();
$r3$.ɵɵselect(6);
$r3$.ɵɵadvance(1);
$r3$.ɵɵstylePropInterpolate3("color", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d");
$r3$.ɵɵstylingApply();
$r3$.ɵɵselect(7);
$r3$.ɵɵadvance(1);
$r3$.ɵɵstylePropInterpolate2("color", "a", ctx.one, "b", ctx.two, "c");
$r3$.ɵɵstylingApply();
$r3$.ɵɵselect(8);
$r3$.ɵɵadvance(1);
$r3$.ɵɵstylePropInterpolate1("color", "a", ctx.one, "b");
$r3$.ɵɵstylingApply();
$r3$.ɵɵselect(9);
$r3$.ɵɵadvance(1);
$r3$.ɵɵstyleProp("color", ctx.one);
$r3$.ɵɵstylingApply();
}

View File

@ -76,7 +76,7 @@ describe('compiler compliance: template', () => {
const $outer1$ = $i0$.ɵɵnextContext().$implicit;
const $myComp1$ = $i0$.ɵɵnextContext();
$i0$.ɵɵproperty("title", $myComp1$.format($outer1$, $middle1$, $inner1$, $myComp1$.component));
$r3$.ɵɵselect(1);
$r3$.ɵɵadvance(1);
$i0$.ɵɵtextInterpolate1(" ", $myComp1$.format($outer1$, $middle1$, $inner1$, $myComp1$.component), " ");
}
}
@ -89,7 +89,7 @@ describe('compiler compliance: template', () => {
}
if (rf & 2) {
const $myComp2$ = $i0$.ɵɵnextContext(2);
$r3$.ɵɵselect(1);
$r3$.ɵɵadvance(1);
$i0$.ɵɵproperty("ngForOf", $myComp2$.items);
}
}
@ -102,7 +102,7 @@ describe('compiler compliance: template', () => {
}
if (rf & 2) {
const $outer2$ = ctx.$implicit;
$r3$.ɵɵselect(1);
$r3$.ɵɵadvance(1);
$i0$.ɵɵproperty("ngForOf", $outer2$.items);
}
}
@ -192,7 +192,7 @@ describe('compiler compliance: template', () => {
\`
})
export class MyComponent {
greet(val: any) {}
greet(val: any) {}
}
@NgModule({declarations: [MyComponent]})
@ -263,7 +263,7 @@ describe('compiler compliance: template', () => {
if (rf & 2) {
const $item$ = ctx.$implicit;
const $i$ = ctx.index;
$r3$.ɵɵselect(1);
$r3$.ɵɵadvance(1);
$i0$.ɵɵtextInterpolate2(" ", $i$, " - ", $item$, " ");
}
}
@ -319,7 +319,7 @@ describe('compiler compliance: template', () => {
const $div$ = $i0$.ɵɵnextContext();
const $i$ = $div$.index;
const $item$ = $div$.$implicit;
$r3$.ɵɵselect(1);
$r3$.ɵɵadvance(1);
$i0$.ɵɵtextInterpolate2(" ", $i$, " - ", $item$, " ");
}
}
@ -332,7 +332,7 @@ describe('compiler compliance: template', () => {
}
if (rf & 2) {
const $app$ = $i0$.ɵɵnextContext();
$r3$.ɵɵselect(1);
$r3$.ɵɵadvance(1);
$i0$.ɵɵproperty("ngIf", $app$.showing);
}
}
@ -389,7 +389,7 @@ describe('compiler compliance: template', () => {
if (rf & 2) {
const $middle$ = $i0$.ɵɵnextContext().$implicit;
const $myComp$ = $i0$.ɵɵnextContext(2);
$r3$.ɵɵselect(1);
$r3$.ɵɵadvance(1);
$i0$.ɵɵtextInterpolate2(" ", $middle$.value, " - ", $myComp$.name, " ");
}
}
@ -402,7 +402,7 @@ describe('compiler compliance: template', () => {
}
if (rf & 2) {
const $middle$ = ctx.$implicit;
$r3$.ɵɵselect(1);
$r3$.ɵɵadvance(1);
$i0$.ɵɵproperty("ngForOf", $middle$.items);
}
}
@ -415,7 +415,7 @@ describe('compiler compliance: template', () => {
}
if (rf & 2) {
const $outer$ = ctx.$implicit;
$r3$.ɵɵselect(1);
$r3$.ɵɵadvance(1);
$i0$.ɵɵproperty("ngForOf", $outer$.items);
}
}