refactor(ivy): rename bindX()
functions to interpolationX()
(#22229)
rationale: remove the confusion with `bind()` and `bind0()` PR Close #22229
This commit is contained in:
@ -53,15 +53,15 @@ export class Identifiers {
|
||||
|
||||
static bind: o.ExternalReference = {name: 'ɵb', moduleName: CORE};
|
||||
|
||||
static bind1: o.ExternalReference = {name: 'ɵb1', moduleName: CORE};
|
||||
static bind2: o.ExternalReference = {name: 'ɵb2', moduleName: CORE};
|
||||
static bind3: o.ExternalReference = {name: 'ɵb3', moduleName: CORE};
|
||||
static bind4: o.ExternalReference = {name: 'ɵb4', moduleName: CORE};
|
||||
static bind5: o.ExternalReference = {name: 'ɵb5', moduleName: CORE};
|
||||
static bind6: o.ExternalReference = {name: 'ɵb6', moduleName: CORE};
|
||||
static bind7: o.ExternalReference = {name: 'ɵb7', moduleName: CORE};
|
||||
static bind8: o.ExternalReference = {name: 'ɵb8', moduleName: CORE};
|
||||
static bindV: o.ExternalReference = {name: 'ɵbV', moduleName: CORE};
|
||||
static interpolation1: o.ExternalReference = {name: 'ɵi1', moduleName: CORE};
|
||||
static interpolation2: o.ExternalReference = {name: 'ɵi2', moduleName: CORE};
|
||||
static interpolation3: o.ExternalReference = {name: 'ɵi3', moduleName: CORE};
|
||||
static interpolation4: o.ExternalReference = {name: 'ɵi4', moduleName: CORE};
|
||||
static interpolation5: o.ExternalReference = {name: 'ɵi5', moduleName: CORE};
|
||||
static interpolation6: o.ExternalReference = {name: 'ɵi6', moduleName: CORE};
|
||||
static interpolation7: o.ExternalReference = {name: 'ɵi7', moduleName: CORE};
|
||||
static interpolation8: o.ExternalReference = {name: 'ɵi8', moduleName: CORE};
|
||||
static interpolationV: o.ExternalReference = {name: 'ɵiV', moduleName: CORE};
|
||||
|
||||
static memory: o.ExternalReference = {name: 'ɵm', moduleName: CORE};
|
||||
|
||||
|
@ -178,25 +178,25 @@ function interpolate(args: o.Expression[]): o.Expression {
|
||||
args = args.slice(1); // Ignore the length prefix added for render2
|
||||
switch (args.length) {
|
||||
case 3:
|
||||
return o.importExpr(R3.bind1).callFn(args);
|
||||
return o.importExpr(R3.interpolation1).callFn(args);
|
||||
case 5:
|
||||
return o.importExpr(R3.bind2).callFn(args);
|
||||
return o.importExpr(R3.interpolation2).callFn(args);
|
||||
case 7:
|
||||
return o.importExpr(R3.bind3).callFn(args);
|
||||
return o.importExpr(R3.interpolation3).callFn(args);
|
||||
case 9:
|
||||
return o.importExpr(R3.bind4).callFn(args);
|
||||
return o.importExpr(R3.interpolation4).callFn(args);
|
||||
case 11:
|
||||
return o.importExpr(R3.bind5).callFn(args);
|
||||
return o.importExpr(R3.interpolation5).callFn(args);
|
||||
case 13:
|
||||
return o.importExpr(R3.bind6).callFn(args);
|
||||
return o.importExpr(R3.interpolation6).callFn(args);
|
||||
case 15:
|
||||
return o.importExpr(R3.bind7).callFn(args);
|
||||
return o.importExpr(R3.interpolation7).callFn(args);
|
||||
case 17:
|
||||
return o.importExpr(R3.bind8).callFn(args);
|
||||
return o.importExpr(R3.interpolation8).callFn(args);
|
||||
}
|
||||
(args.length >= 19 && args.length % 2 == 1) ||
|
||||
error(`Invalid interpolation argument length ${args.length}`);
|
||||
return o.importExpr(R3.bindV).callFn([o.literalArr(args)]);
|
||||
return o.importExpr(R3.interpolationV).callFn([o.literalArr(args)]);
|
||||
}
|
||||
|
||||
class BindingScope {
|
||||
|
@ -114,7 +114,7 @@ describe('r3_view_compiler', () => {
|
||||
}
|
||||
};
|
||||
|
||||
const bV_call = `$r3$.ɵbV([' ',ctx.list[0],' ',ctx.list[1],' ',ctx.list[2],' ',ctx.list[3],
|
||||
const bV_call = `$r3$.ɵiV([' ',ctx.list[0],' ',ctx.list[1],' ',ctx.list[2],' ',ctx.list[3],
|
||||
' ',ctx.list[4],' ',ctx.list[5],' ',ctx.list[6],' ',ctx.list[7],' ',ctx.list[8],
|
||||
' '])`;
|
||||
const result = compile(files, angularFiles);
|
||||
@ -305,7 +305,7 @@ describe('r3_view_compiler', () => {
|
||||
$r3$.ɵT(1);
|
||||
$r3$.ɵe();
|
||||
}
|
||||
$r3$.ɵt(1, $r3$.ɵb2('', ctx.salutation, ' ', $foo$, ''));
|
||||
$r3$.ɵt(1, $r3$.ɵi2('', ctx.salutation, ' ', $foo$, ''));
|
||||
}
|
||||
}
|
||||
});`;
|
||||
@ -421,7 +421,7 @@ describe('r3_view_compiler', () => {
|
||||
$r3$.ɵT(2);
|
||||
}
|
||||
const $user$ = $r3$.ɵm(1);
|
||||
$r3$.ɵt(2, $r3$.ɵb1('Hello ', $user$.value, '!'));
|
||||
$r3$.ɵt(2, $r3$.ɵi1('Hello ', $user$.value, '!'));
|
||||
}
|
||||
});
|
||||
`;
|
||||
@ -634,7 +634,7 @@ describe('r3_view_compiler', () => {
|
||||
$r3$.ɵe();
|
||||
}
|
||||
const $item$ = ctx0.$implicit;
|
||||
$r3$.ɵt(1, $r3$.ɵb1('', $item$.name, ''));
|
||||
$r3$.ɵt(1, $r3$.ɵi1('', $item$.name, ''));
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -719,7 +719,7 @@ describe('r3_view_compiler', () => {
|
||||
const $item$ = ctx0.$implicit;
|
||||
$r3$.ɵp(4, 'forOf', $r3$.ɵb(IDENT.infos));
|
||||
$c2$.h(5,4);
|
||||
$r3$.ɵt(2, $r3$.ɵb1('', IDENT.name, ''));
|
||||
$r3$.ɵt(2, $r3$.ɵi1('', IDENT.name, ''));
|
||||
$r3$.ɵcR(4);
|
||||
$r3$.ɵr(5, 4);
|
||||
$r3$.ɵcr();
|
||||
@ -732,7 +732,7 @@ describe('r3_view_compiler', () => {
|
||||
$r3$.ɵe();
|
||||
}
|
||||
const $info$ = ctx1.$implicit;
|
||||
$r3$.ɵt(1, $r3$.ɵb2(' ', $item$.name, ': ', $info$.description, ' '));
|
||||
$r3$.ɵt(1, $r3$.ɵi2(' ', $item$.name, ': ', $info$.description, ' '));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user