perf(ivy): avoid generating extra parameters for host property bindings (#31550)
Currently we reuse the same instruction both for regular property bindings and property bindings on the `host`. The only difference between the two is that when it's on the host we shouldn't support inputs. We have an optional parameter called `nativeOnly` which is used to differentiate the two, however since `nativeOnly` is preceeded by another optional parameter (`sanitizer`), we have to generate two extra parameters for each host property bindings every time (e.g. `property('someProp', 'someValue', null, true)`). These changes add a new instruction called `hostProperty` which avoids the need for the two parameters by removing `nativeOnly` which is always set and it allows us to omit `sanitizer` when it isn't being used. These changes also remove the `nativeOnly` parameter from the `updateSyntheticHostBinding` instruction, because it's only generated for host elements which means that we can assume that its value will always be `true`. PR Close #31550
This commit is contained in:
@ -441,12 +441,10 @@ describe('compiler compliance', () => {
|
||||
$r3$.ɵɵpureFunction2(5, $_c1$, ctx.getExpandedState(),
|
||||
$r3$.ɵɵpureFunction2(2, $_c0$, ctx.collapsedHeight, ctx.expandedHeight)
|
||||
)
|
||||
, null, true
|
||||
)("@expansionWidth",
|
||||
$r3$.ɵɵpureFunction2(11, $_c1$, ctx.getExpandedState(),
|
||||
$r3$.ɵɵpureFunction2(8, $_c2$, ctx.collapsedWidth, ctx.expandedWidth)
|
||||
)
|
||||
, null, true
|
||||
);
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user