refactor(ivy): inherently call ɵɵselect(0) (#30830)
- Refactors compiler to stop generating `ɵɵselect(0)` instructions - Alters template execution to always call the equivalent of `ɵɵselect(0)` before running a template in update mode - Updates tests to not check for or call `ɵɵselect(0)`. The goal here is to reduce the size of generated templates PR Close #30830
This commit is contained in:
@ -1072,7 +1072,9 @@ export class TemplateDefinitionBuilder implements t.Visitor<void>, LocalResolver
|
||||
nodeIndex: number, span: ParseSourceSpan|null, reference: o.ExternalReference,
|
||||
paramsOrFn?: o.Expression[]|(() => o.Expression[])) {
|
||||
if (this._lastNodeIndexWithFlush < nodeIndex) {
|
||||
this.instructionFn(this._updateCodeFns, span, R3.select, [o.literal(nodeIndex)]);
|
||||
if (nodeIndex > 0) {
|
||||
this.instructionFn(this._updateCodeFns, span, R3.select, [o.literal(nodeIndex)]);
|
||||
}
|
||||
this._lastNodeIndexWithFlush = nodeIndex;
|
||||
}
|
||||
this.instructionFn(this._updateCodeFns, span, reference, paramsOrFn || []);
|
||||
|
Reference in New Issue
Block a user