refactor(ivy): prefix all generated instructions (#29692)
- Updates all instructions to be prefixed with the Greek delta symbol PR Close #29692
This commit is contained in:
@ -39,13 +39,13 @@ describe('compiler compliance: bindings', () => {
|
||||
const template = `
|
||||
template:function MyComponent_Template(rf, $ctx$){
|
||||
if (rf & 1) {
|
||||
$i0$.ɵelementStart(0, "div");
|
||||
$i0$.ɵtext(1);
|
||||
$i0$.ɵelementEnd();
|
||||
$i0$.ΔelementStart(0, "div");
|
||||
$i0$.Δtext(1);
|
||||
$i0$.ΔelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ɵselect(1);
|
||||
$i0$.ɵtextBinding(1, $i0$.ɵinterpolation1("Hello ", $ctx$.name, ""));
|
||||
$r3$.Δselect(1);
|
||||
$i0$.ΔtextBinding(1, $i0$.Δinterpolation1("Hello ", $ctx$.name, ""));
|
||||
}
|
||||
}`;
|
||||
const result = compile(files, angularFiles);
|
||||
@ -78,11 +78,11 @@ describe('compiler compliance: bindings', () => {
|
||||
…
|
||||
template:function MyComponent_Template(rf, $ctx$){
|
||||
if (rf & 1) {
|
||||
$i0$.ɵelement(0, "a", $e0_attrs$);
|
||||
$i0$.Δelement(0, "a", $e0_attrs$);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$i0$.ɵselect(0);
|
||||
$i0$.ɵelementProperty(0, "title", $i0$.ɵbind($ctx$.title));
|
||||
$i0$.Δselect(0);
|
||||
$i0$.ΔelementProperty(0, "title", $i0$.Δbind($ctx$.title));
|
||||
}
|
||||
}`;
|
||||
const result = compile(files, angularFiles);
|
||||
@ -113,11 +113,11 @@ describe('compiler compliance: bindings', () => {
|
||||
…
|
||||
template:function MyComponent_Template(rf, $ctx$){
|
||||
if (rf & 1) {
|
||||
$i0$.ɵelement(0, "a", $e0_attrs$);
|
||||
$i0$.Δelement(0, "a", $e0_attrs$);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$i0$.ɵselect(0);
|
||||
$i0$.ɵelementProperty(0, "title", $i0$.ɵinterpolation1("Hello ", $ctx$.name, ""));
|
||||
$i0$.Δselect(0);
|
||||
$i0$.ΔelementProperty(0, "title", $i0$.Δinterpolation1("Hello ", $ctx$.name, ""));
|
||||
}
|
||||
}`;
|
||||
const result = compile(files, angularFiles);
|
||||
@ -138,7 +138,7 @@ describe('compiler compliance: bindings', () => {
|
||||
}
|
||||
};
|
||||
const result = compile(files, angularFiles);
|
||||
expect(result.source).not.toContain('i0.ɵelementProperty');
|
||||
expect(result.source).not.toContain('i0.ΔelementProperty');
|
||||
});
|
||||
|
||||
it('should not remap property names whose names do not correspond to their attribute names',
|
||||
@ -170,11 +170,11 @@ describe('compiler compliance: bindings', () => {
|
||||
|
||||
function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$i0$.ɵelement(0, "label", _c0);
|
||||
$i0$.Δelement(0, "label", _c0);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$i0$.ɵselect(0);
|
||||
$i0$.ɵelementProperty(0, "for", $i0$.ɵbind(ctx.forValue));
|
||||
$i0$.Δselect(0);
|
||||
$i0$.ΔelementProperty(0, "for", $i0$.Δbind(ctx.forValue));
|
||||
}
|
||||
}`;
|
||||
|
||||
@ -204,16 +204,16 @@ describe('compiler compliance: bindings', () => {
|
||||
};
|
||||
|
||||
const HostBindingDirDeclaration = `
|
||||
HostBindingDir.ngDirectiveDef = $r3$.ɵdefineDirective({
|
||||
HostBindingDir.ngDirectiveDef = $r3$.ΔdefineDirective({
|
||||
type: HostBindingDir,
|
||||
selectors: [["", "hostBindingDir", ""]],
|
||||
factory: function HostBindingDir_Factory(t) { return new (t || HostBindingDir)(); },
|
||||
hostBindings: function HostBindingDir_HostBindings(rf, ctx, elIndex) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵallocHostVars(1);
|
||||
$r3$.ΔallocHostVars(1);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ɵelementProperty(elIndex, "id", $r3$.ɵbind(ctx.dirId), null, true);
|
||||
$r3$.ΔelementProperty(elIndex, "id", $r3$.Δbind(ctx.dirId), null, true);
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -251,16 +251,16 @@ describe('compiler compliance: bindings', () => {
|
||||
const HostBindingCompDeclaration = `
|
||||
const $ff$ = function ($v$) { return ["red", $v$]; };
|
||||
…
|
||||
HostBindingComp.ngComponentDef = $r3$.ɵdefineComponent({
|
||||
HostBindingComp.ngComponentDef = $r3$.ΔdefineComponent({
|
||||
type: HostBindingComp,
|
||||
selectors: [["host-binding-comp"]],
|
||||
factory: function HostBindingComp_Factory(t) { return new (t || HostBindingComp)(); },
|
||||
hostBindings: function HostBindingComp_HostBindings(rf, ctx, elIndex) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵallocHostVars(3);
|
||||
$r3$.ΔallocHostVars(3);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ɵelementProperty(elIndex, "id", $r3$.ɵbind($r3$.ɵpureFunction1(1, $ff$, ctx.id)), null, true);
|
||||
$r3$.ΔelementProperty(elIndex, "id", $r3$.Δbind($r3$.ΔpureFunction1(1, $ff$, ctx.id)), null, true);
|
||||
}
|
||||
},
|
||||
consts: 0,
|
||||
@ -299,16 +299,16 @@ describe('compiler compliance: bindings', () => {
|
||||
};
|
||||
|
||||
const HostAttributeDirDeclaration = `
|
||||
HostAttributeDir.ngDirectiveDef = $r3$.ɵdefineDirective({
|
||||
HostAttributeDir.ngDirectiveDef = $r3$.ΔdefineDirective({
|
||||
type: HostAttributeDir,
|
||||
selectors: [["", "hostAttributeDir", ""]],
|
||||
factory: function HostAttributeDir_Factory(t) { return new (t || HostAttributeDir)(); },
|
||||
hostBindings: function HostAttributeDir_HostBindings(rf, ctx, elIndex) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵallocHostVars(1);
|
||||
$r3$.ΔallocHostVars(1);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ɵelementAttribute(elIndex, "required", $r3$.ɵbind(ctx.required));
|
||||
$r3$.ΔelementAttribute(elIndex, "required", $r3$.Δbind(ctx.required));
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -344,13 +344,13 @@ describe('compiler compliance: bindings', () => {
|
||||
const HostAttributeDirDeclaration = `
|
||||
const $c0$ = ["aria-label", "label"];
|
||||
…
|
||||
HostAttributeDir.ngDirectiveDef = $r3$.ɵdefineDirective({
|
||||
HostAttributeDir.ngDirectiveDef = $r3$.ΔdefineDirective({
|
||||
type: HostAttributeDir,
|
||||
selectors: [["", "hostAttributeDir", ""]],
|
||||
factory: function HostAttributeDir_Factory(t) { return new (t || HostAttributeDir)(); },
|
||||
hostBindings: function HostAttributeDir_HostBindings(rf, ctx, elIndex) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelementHostAttrs($c0$);
|
||||
$r3$.ΔelementHostAttrs($c0$);
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -402,25 +402,25 @@ describe('compiler compliance: bindings', () => {
|
||||
const $c0$ = ["title", "hello there from component", ${AttributeMarker.Styles}, "opacity", "1"];
|
||||
const $c1$ = ["title", "hello there from directive", ${AttributeMarker.Classes}, "one", "two", ${AttributeMarker.Styles}, "width", "200px", "height", "500px"];
|
||||
…
|
||||
HostAttributeComp.ngComponentDef = $r3$.ɵdefineComponent({
|
||||
HostAttributeComp.ngComponentDef = $r3$.ΔdefineComponent({
|
||||
type: HostAttributeComp,
|
||||
selectors: [["my-host-attribute-component"]],
|
||||
factory: function HostAttributeComp_Factory(t) { return new (t || HostAttributeComp)(); },
|
||||
hostBindings: function HostAttributeComp_HostBindings(rf, ctx, elIndex) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelementHostAttrs($c0$);
|
||||
$r3$.ΔelementHostAttrs($c0$);
|
||||
…
|
||||
}
|
||||
…
|
||||
}
|
||||
…
|
||||
HostAttributeDir.ngDirectiveDef = $r3$.ɵdefineDirective({
|
||||
HostAttributeDir.ngDirectiveDef = $r3$.ΔdefineDirective({
|
||||
type: HostAttributeDir,
|
||||
selectors: [["", "hostAttributeDir", ""]],
|
||||
factory: function HostAttributeDir_Factory(t) { return new (t || HostAttributeDir)(); },
|
||||
hostBindings: function HostAttributeDir_HostBindings(rf, ctx, elIndex) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵelementHostAttrs($c1$);
|
||||
$r3$.ΔelementHostAttrs($c1$);
|
||||
…
|
||||
}
|
||||
…
|
||||
@ -466,19 +466,19 @@ describe('compiler compliance: bindings', () => {
|
||||
…
|
||||
template:function MyComponent_Template(rf, $ctx$){
|
||||
if (rf & 1) {
|
||||
$i0$.ɵelementStart(0, "b", $_c0$, $_c1$);
|
||||
$i0$.ɵdisableBindings();
|
||||
$i0$.ɵelementStart(2, "i");
|
||||
$i0$.ɵtext(3, "Hello {{ name }}!");
|
||||
$i0$.ɵelementEnd();
|
||||
$i0$.ɵenableBindings();
|
||||
$i0$.ɵelementEnd();
|
||||
$i0$.ɵtext(4);
|
||||
$i0$.ΔelementStart(0, "b", $_c0$, $_c1$);
|
||||
$i0$.ΔdisableBindings();
|
||||
$i0$.ΔelementStart(2, "i");
|
||||
$i0$.Δtext(3, "Hello {{ name }}!");
|
||||
$i0$.ΔelementEnd();
|
||||
$i0$.ΔenableBindings();
|
||||
$i0$.ΔelementEnd();
|
||||
$i0$.Δtext(4);
|
||||
}
|
||||
if (rf & 2) {
|
||||
const $_r0$ = $i0$.ɵreference(1);
|
||||
$r3$.ɵselect(4);
|
||||
$i0$.ɵtextBinding(4, $i0$.ɵinterpolation1(" ", $_r0$.id, " "));
|
||||
const $_r0$ = $i0$.Δreference(1);
|
||||
$r3$.Δselect(4);
|
||||
$i0$.ΔtextBinding(4, $i0$.Δinterpolation1(" ", $_r0$.id, " "));
|
||||
}
|
||||
}
|
||||
`;
|
||||
@ -498,12 +498,12 @@ describe('compiler compliance: bindings', () => {
|
||||
…
|
||||
template:function MyComponent_Template(rf, $ctx$){
|
||||
if (rf & 1) {
|
||||
$i0$.ɵelementStart(0, "div");
|
||||
$i0$.ɵdisableBindings();
|
||||
$i0$.ɵelement(1, "input", $_c0$);
|
||||
$i0$.ɵtext(2, " {{ myInput.value }} ");
|
||||
$i0$.ɵenableBindings();
|
||||
$i0$.ɵelementEnd();
|
||||
$i0$.ΔelementStart(0, "div");
|
||||
$i0$.ΔdisableBindings();
|
||||
$i0$.Δelement(1, "input", $_c0$);
|
||||
$i0$.Δtext(2, " {{ myInput.value }} ");
|
||||
$i0$.ΔenableBindings();
|
||||
$i0$.ΔelementEnd();
|
||||
}
|
||||
`;
|
||||
const result = compile(files, angularFiles);
|
||||
@ -522,11 +522,11 @@ describe('compiler compliance: bindings', () => {
|
||||
…
|
||||
template:function MyComponent_Template(rf, $ctx$){
|
||||
if (rf & 1) {
|
||||
$i0$.ɵelementStart(0, "div");
|
||||
$i0$.ɵdisableBindings();
|
||||
$i0$.ɵelement(1, "div", $_c0$);
|
||||
$i0$.ɵenableBindings();
|
||||
$i0$.ɵelementEnd();
|
||||
$i0$.ΔelementStart(0, "div");
|
||||
$i0$.ΔdisableBindings();
|
||||
$i0$.Δelement(1, "div", $_c0$);
|
||||
$i0$.ΔenableBindings();
|
||||
$i0$.ΔelementEnd();
|
||||
}
|
||||
`;
|
||||
const result = compile(files, angularFiles);
|
||||
@ -541,7 +541,7 @@ describe('compiler compliance: bindings', () => {
|
||||
const template = `
|
||||
template:function MyComponent_Template(rf, $ctx$){
|
||||
if (rf & 1) {
|
||||
$i0$.ɵelement(0, "div");
|
||||
$i0$.Δelement(0, "div");
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
Reference in New Issue
Block a user