Skip to content

Commit

Permalink
fixup! perf(ivy): move attributes array into component def
Browse files Browse the repository at this point in the history
  • Loading branch information
crisbeto committed Sep 23, 2019
1 parent b83e97b commit 025ba88
Show file tree
Hide file tree
Showing 26 changed files with 157 additions and 157 deletions.
Expand Up @@ -49,7 +49,7 @@ describe('compiler compliance', () => {
// The template should look like this (where IDENT is a wild card for an identifier):
const template = `
attrs: [["title", "Hello", ${AttributeMarker.Classes}, "my-app"], ["cx", "20", "cy", "30", "r", "50"]],
consts: [["title", "Hello", ${AttributeMarker.Classes}, "my-app"], ["cx", "20", "cy", "30", "r", "50"]],
template: function MyComponent_Template(rf, ctx) {
if (rf & 1) {
$r3$.ɵɵelementStart(0, "div", 0);
Expand Down Expand Up @@ -98,7 +98,7 @@ describe('compiler compliance', () => {
// The template should look like this (where IDENT is a wild card for an identifier):
const template = `
attrs: [["title", "Hello", ${AttributeMarker.Classes}, "my-app"]],
consts: [["title", "Hello", ${AttributeMarker.Classes}, "my-app"]],
template: function MyComponent_Template(rf, ctx) {
if (rf & 1) {
$r3$.ɵɵelementStart(0, "div", 0);
Expand Down Expand Up @@ -146,7 +146,7 @@ describe('compiler compliance', () => {
// The template should look like this (where IDENT is a wild card for an identifier):
const template = `
attrs: [["title", "Hello", ${AttributeMarker.Classes}, "my-app"]],
consts: [["title", "Hello", ${AttributeMarker.Classes}, "my-app"]],
template: function MyComponent_Template(rf, ctx) {
if (rf & 1) {
$r3$.ɵɵelementStart(0, "div", 0);
Expand Down Expand Up @@ -194,7 +194,7 @@ describe('compiler compliance', () => {
// The template should look like this (where IDENT is a wild card for an identifier):
const template = `
attrs: [["class", "my-app", 0, "http://someuri/foo", "foo:bar", "baz", "title", "Hello", 0, "http://someuri/foo", "foo:qux", "quacks"]],
consts: [["class", "my-app", 0, "http://someuri/foo", "foo:bar", "baz", "title", "Hello", 0, "http://someuri/foo", "foo:qux", "quacks"]],
template: function MyComponent_Template(rf, ctx) {
if (rf & 1) {
$r3$.ɵɵelementStart(0, "div", 0);
Expand Down Expand Up @@ -308,7 +308,7 @@ describe('compiler compliance', () => {
'MyComponent.ngFactoryDef = function MyComponent_Factory(t) { return new (t || MyComponent)(); }';
const template = `
attrs: [[${AttributeMarker.Bindings}, "id"]],
consts: [[${AttributeMarker.Bindings}, "id"]],
template: function MyComponent_Template(rf, ctx) {
if (rf & 1) {
$r3$.ɵɵelement(0, "div", 0);
Expand Down Expand Up @@ -524,7 +524,7 @@ describe('compiler compliance', () => {

const template = `
attrs: [["title", "hi"]],
consts: [["title", "hi"]],
template: function MyComponent_Template(rf, ctx) {
if (rf & 1) {
$r3$.ɵɵelement(0, "div", 0);
Expand Down Expand Up @@ -600,7 +600,7 @@ describe('compiler compliance', () => {
selectors: [["my-component"]],
decls: 2,
vars: 0,
attrs: [["some-directive", ""]],
consts: [["some-directive", ""]],
template: function MyComponent_Template(rf, ctx) {
if (rf & 1) {
$r3$.ɵɵelement(0, "child", 0);
Expand Down Expand Up @@ -818,7 +818,7 @@ describe('compiler compliance', () => {
selectors: [["my-component"]],
decls: 3,
vars: 0,
attrs: [[${AttributeMarker.Template}, "if"]],
consts: [[${AttributeMarker.Template}, "if"]],
template: function MyComponent_Template(rf, ctx) {
if (rf & 1) {
$r3$.ɵɵelementStart(0, "ul", null, $c1$);
Expand Down Expand Up @@ -885,7 +885,7 @@ describe('compiler compliance', () => {
selectors: [["my-app"]],
decls: 1,
vars: 3,
attrs: [[${AttributeMarker.Bindings}, "names"]],
consts: [[${AttributeMarker.Bindings}, "names"]],
template: function MyApp_Template(rf, ctx) {
if (rf & 1) {
$r3$.ɵɵelement(0, "my-comp", 0);
Expand Down Expand Up @@ -966,7 +966,7 @@ describe('compiler compliance', () => {
selectors: [["my-app"]],
decls: 1,
vars: 11,
attrs: [[${AttributeMarker.Bindings}, "names"]],
consts: [[${AttributeMarker.Bindings}, "names"]],
template: function MyApp_Template(rf, ctx) {
if (rf & 1) {
$r3$.ɵɵelement(0, "my-comp", 0);
Expand Down Expand Up @@ -1028,7 +1028,7 @@ describe('compiler compliance', () => {
selectors: [["my-app"]],
decls: 1,
vars: 3,
attrs: [[${AttributeMarker.Bindings}, "config"]],
consts: [[${AttributeMarker.Bindings}, "config"]],
template: function MyApp_Template(rf, ctx) {
if (rf & 1) {
$r3$.ɵɵelement(0, "object-comp", 0);
Expand Down Expand Up @@ -1095,7 +1095,7 @@ describe('compiler compliance', () => {
selectors: [["my-app"]],
decls: 1,
vars: 8,
attrs: [[${AttributeMarker.Bindings}, "config"]],
consts: [[${AttributeMarker.Bindings}, "config"]],
template: function MyApp_Template(rf, ctx) {
if (rf & 1) {
$r3$.ɵɵelement(0, "nested-comp", 0);
Expand Down Expand Up @@ -1177,7 +1177,7 @@ describe('compiler compliance', () => {
ngContentSelectors: $c2$,
decls: 4,
vars: 0,
attrs: [["id","first"], ["id","second"]],
consts: [["id","first"], ["id","second"]],
template: function ComplexComponent_Template(rf, ctx) {
if (rf & 1) {
$r3$.ɵɵprojectionDef($c1$);
Expand Down Expand Up @@ -1296,7 +1296,7 @@ describe('compiler compliance', () => {
}
const $_c4$ = [[["span", "title", "tofirst"]], "*"];
attrs: [["id", "second", ${AttributeMarker.Template}, "ngIf"], ["id", "third", ${AttributeMarker.Template}, "ngIf"], ["id", "second"], ["id", "third"]],
consts: [["id", "second", ${AttributeMarker.Template}, "ngIf"], ["id", "third", ${AttributeMarker.Template}, "ngIf"], ["id", "second"], ["id", "third"]],
template: function Cmp_Template(rf, ctx) {
if (rf & 1) {
$r3$.ɵɵprojectionDef($_c4$);
Expand Down Expand Up @@ -1416,7 +1416,7 @@ describe('compiler compliance', () => {
selectors: [["my-app"]],
decls: 2,
vars: 0,
attrs: [[5, ["", "title", ""]]],
consts: [[5, ["", "title", ""]]],
template: function MyApp_Template(rf, ctx) {
if (rf & 1) {
$r3$.ɵɵelementStart(0, "simple");
Expand Down Expand Up @@ -1468,7 +1468,7 @@ describe('compiler compliance', () => {
selectors: [["my-app"]],
decls: 2,
vars: 0,
attrs: [[5, ["", "title", ""]]],
consts: [[5, ["", "title", ""]]],
template: function MyApp_Template(rf, ctx) {
if (rf & 1) {
$r3$.ɵɵelementStart(0, "simple");
Expand Down Expand Up @@ -1542,7 +1542,7 @@ describe('compiler compliance', () => {
},
decls: 1,
vars: 0,
attrs: [["someDir",""]],
consts: [["someDir",""]],
template: function ViewQueryComponent_Template(rf, ctx) {
if (rf & 1) {
$r3$.ɵɵelement(0, "div", 0);
Expand Down Expand Up @@ -1652,7 +1652,7 @@ describe('compiler compliance', () => {
},
decls: 1,
vars: 0,
attrs: [["someDir",""]],
consts: [["someDir",""]],
template: function ViewQueryComponent_Template(rf, ctx) {
if (rf & 1) {
$r3$.ɵɵelement(0, "div", 0);
Expand Down Expand Up @@ -2335,7 +2335,7 @@ describe('compiler compliance', () => {
selectors: [["my-component"]],
decls: 6,
vars: 1,
attrs: [[${AttributeMarker.Template}, "if"]],
consts: [[${AttributeMarker.Template}, "if"]],
template: function MyComponent_Template(rf, ctx) {
if (rf & 1) {
$r3$.ɵɵelement(0, "div", null, $c1$);
Expand Down Expand Up @@ -2414,7 +2414,7 @@ describe('compiler compliance', () => {
}
// ...
attrs: [[${AttributeMarker.Template}, "ngFor", "ngForOf"], [${AttributeMarker.Template}, "ngIf"]],
consts: [[${AttributeMarker.Template}, "ngFor", "ngForOf"], [${AttributeMarker.Template}, "ngIf"]],
template:function MyComponent_Template(rf, ctx){
if (rf & 1) {
$i0$.ɵɵtemplate(0, MyComponent_div_0_Template, 4, 1, "div", 0);
Expand Down Expand Up @@ -2492,7 +2492,7 @@ describe('compiler compliance', () => {
selectors: [["simple-layout"]],
decls: 2,
vars: 2,
attrs: [[3, "name"]],
consts: [[3, "name"]],
template: function SimpleLayout_Template(rf, ctx) {
if (rf & 1) {
$r3$.ɵɵelement(0, "lifecycle-comp", 0);
Expand Down Expand Up @@ -2624,7 +2624,7 @@ describe('compiler compliance', () => {
selectors: [["my-component"]],
decls: 2,
vars: 1,
attrs: [[${AttributeMarker.Template}, "for", "forOf"]],
consts: [[${AttributeMarker.Template}, "for", "forOf"]],
template: function MyComponent_Template(rf, ctx){
if (rf & 1) {
$r3$.ɵɵnamespaceSVG();
Expand Down Expand Up @@ -2710,7 +2710,7 @@ describe('compiler compliance', () => {
selectors: [["my-component"]],
decls: 2,
vars: 1,
attrs: [[${AttributeMarker.Template}, "for", "forOf"]],
consts: [[${AttributeMarker.Template}, "for", "forOf"]],
template: function MyComponent_Template(rf, ctx) {
if (rf & 1) {
$r3$.ɵɵelementStart(0, "ul");
Expand Down Expand Up @@ -2814,7 +2814,7 @@ describe('compiler compliance', () => {
selectors: [["my-component"]],
decls: 2,
vars: 1,
attrs: [[${AttributeMarker.Template}, "for", "forOf"]],
consts: [[${AttributeMarker.Template}, "for", "forOf"]],
template: function MyComponent_Template(rf, ctx) {
if (rf & 1) {
$r3$.ɵɵelementStart(0, "ul");
Expand Down
Expand Up @@ -75,7 +75,7 @@ describe('compiler compliance: bindings', () => {

const template = `
attrs: [[${AttributeMarker.Bindings}, "title"]],
consts: [[${AttributeMarker.Bindings}, "title"]],
template:function MyComponent_Template(rf, $ctx$){
if (rf & 1) {
$i0$.ɵɵelement(0, "a", 0);
Expand Down Expand Up @@ -109,7 +109,7 @@ describe('compiler compliance: bindings', () => {

const template = `
attrs: [[${AttributeMarker.Bindings}, "title"]],
consts: [[${AttributeMarker.Bindings}, "title"]],
template:function MyComponent_Template(rf, $ctx$){
if (rf & 1) {
$i0$.ɵɵelement(0, "a", 0);
Expand Down Expand Up @@ -162,7 +162,7 @@ describe('compiler compliance: bindings', () => {
};

const template = `
attrs: [[${AttributeMarker.Bindings}, "for"]]
consts: [[${AttributeMarker.Bindings}, "for"]]
// ...
Expand Down Expand Up @@ -640,7 +640,7 @@ describe('compiler compliance: bindings', () => {
};

const template = `
attrs: [["target", "_blank", "aria-label", "link", ${AttributeMarker.Bindings}, "title", "id", "customEvent"]],
consts: [["target", "_blank", "aria-label", "link", ${AttributeMarker.Bindings}, "title", "id", "customEvent"]],
`;
const result = compile(files, angularFiles);
Expand Down Expand Up @@ -1253,7 +1253,7 @@ describe('compiler compliance: bindings', () => {
const template = `
const $_c1$ = ["myRef", ""];
attrs: [["id", "my-id"]],
consts: [["id", "my-id"]],
template:function MyComponent_Template(rf, $ctx$){
if (rf & 1) {
$i0$.ɵɵelementStart(0, "b", 0, $_c1$);
Expand Down Expand Up @@ -1285,7 +1285,7 @@ describe('compiler compliance: bindings', () => {

const template = `
attrs: [["value", "one", "#myInput", ""]],
consts: [["value", "one", "#myInput", ""]],
template:function MyComponent_Template(rf, $ctx$){
if (rf & 1) {
$i0$.ɵɵelementStart(0, "div");
Expand All @@ -1309,7 +1309,7 @@ describe('compiler compliance: bindings', () => {

const template = `
attrs: [["[id]", "my-id", "(click)", "onclick"]],
consts: [["[id]", "my-id", "(click)", "onclick"]],
template:function MyComponent_Template(rf, $ctx$){
if (rf & 1) {
$i0$.ɵɵelementStart(0, "div");
Expand Down
Expand Up @@ -140,7 +140,7 @@ describe('compiler compliance: directives', () => {
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
attrs: [[${AttributeMarker.Bindings}, "someDirective"]],
consts: [[${AttributeMarker.Bindings}, "someDirective"]],
template: function MyComponent_Template(rf, ctx) {
if (rf & 1) {
$r3$.ɵɵelement(0, "div", 0);
Expand Down Expand Up @@ -198,7 +198,7 @@ describe('compiler compliance: directives', () => {
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
attrs: [["directiveA", ""]],
consts: [["directiveA", ""]],
template: function MyComponent_Template(rf, ctx) {
if (rf & 1) {
$r3$.ɵɵtemplate(0, MyComponent_ng_template_0_Template, 1, 0, "ng-template", 0);
Expand Down Expand Up @@ -253,7 +253,7 @@ describe('compiler compliance: directives', () => {
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
attrs: [["directiveA", "", ${AttributeMarker.Template}, "ngIf"], ["directiveA", ""]],
consts: [["directiveA", "", ${AttributeMarker.Template}, "ngIf"], ["directiveA", ""]],
template: function MyComponent_Template(rf, ctx) {
if (rf & 1) {
$r3$.ɵɵtemplate(0, MyComponent_ng_container_0_Template, 2, 0, "ng-container", 0);
Expand Down Expand Up @@ -299,7 +299,7 @@ describe('compiler compliance: directives', () => {
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
attrs: [[${AttributeMarker.Bindings}, "someDirective"]],
consts: [[${AttributeMarker.Bindings}, "someDirective"]],
template: function MyComponent_Template(rf, ctx) {
if (rf & 1) {
$r3$.ɵɵtemplate(0, MyComponent_ng_template_0_Template, 0, 0, "ng-template", 0);
Expand Down Expand Up @@ -346,7 +346,7 @@ describe('compiler compliance: directives', () => {
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
attrs: [[${AttributeMarker.Template}, "someDirective"]],
consts: [[${AttributeMarker.Template}, "someDirective"]],
template: function MyComponent_Template(rf, ctx) {
if (rf & 1) {
$r3$.ɵɵtemplate(0, MyComponent_div_0_Template, 1, 0, "div", 0);
Expand Down Expand Up @@ -394,7 +394,7 @@ describe('compiler compliance: directives', () => {
MyComponent.ngComponentDef = $r3$.ɵɵdefineComponent({
attrs: [[${AttributeMarker.Bindings}, "someDirective"]],
consts: [[${AttributeMarker.Bindings}, "someDirective"]],
template: function MyComponent_Template(rf, ctx) {
if (rf & 1) {
$r3$.ɵɵelementStart(0, "div", 0);
Expand Down

0 comments on commit 025ba88

Please sign in to comment.