-
Notifications
You must be signed in to change notification settings - Fork 26.2k
Replace interpolation instructions #61639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Replaces all of the `stylePropInterpolateX` instructions with the existing `styleProp` with an interpolated value.
Replaces the `styleMapInterpolateX` instructions with the existing `styleMap` and a passed-in interpolated value in order to simplify the runtime.
Replaces the `classMapInterpolateX` instructions with `classMap` plus a call to `interpolate` in order to simplify the runtime. The only difference between `classMapInterpolateX` and `classMap` was that the former passes `keyValueArraySet` into `checkStylingMap` while the latter passes `classKeyValueArraySet`. This doesn't appear to matter, because the interpolation instructions always have a string value which means that the function is never called.
Updates the `ɵɵinterpolate` instruction so it doesn't call into `interpolation1` under the hood since it requires a prefix/suffix and we know there isn't one.
Replaces the `propertyInterpolateX` instructions with calls to `property` and the `interpolate` helper. This allows us to drop the dedicated interpolation instructions and simplify the runtime for future work.
@@ -28,7 +30,9 @@ import { | |||
* @codeGenApi | |||
*/ | |||
export function ɵɵinterpolate(v0: any): string | NO_CHANGE { | |||
return interpolation1(getLView(), '', v0, ''); | |||
// Avoid calling into the `interpolate` functions since | |||
// we know that we don't have a prefix or suffix. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I would drop this comment as it refers to something we don't do and I'm not sure it adds new information / value.
Caretaker note: we'll have to patch cl/762367094 together with these changes. |
Replaces the `styleMapInterpolateX` instructions with the existing `styleMap` and a passed-in interpolated value in order to simplify the runtime. PR Close #61639
Replaces the `classMapInterpolateX` instructions with `classMap` plus a call to `interpolate` in order to simplify the runtime. The only difference between `classMapInterpolateX` and `classMap` was that the former passes `keyValueArraySet` into `checkStylingMap` while the latter passes `classKeyValueArraySet`. This doesn't appear to matter, because the interpolation instructions always have a string value which means that the function is never called. PR Close #61639
Updates the `ɵɵinterpolate` instruction so it doesn't call into `interpolation1` under the hood since it requires a prefix/suffix and we know there isn't one. PR Close #61639
Replaces the `propertyInterpolateX` instructions with calls to `property` and the `interpolate` helper. This allows us to drop the dedicated interpolation instructions and simplify the runtime for future work. PR Close #61639
Replaces all of the `stylePropInterpolateX` instructions with the existing `styleProp` with an interpolated value. PR Close #61639
Replaces the `styleMapInterpolateX` instructions with the existing `styleMap` and a passed-in interpolated value in order to simplify the runtime. PR Close #61639
Replaces the `classMapInterpolateX` instructions with `classMap` plus a call to `interpolate` in order to simplify the runtime. The only difference between `classMapInterpolateX` and `classMap` was that the former passes `keyValueArraySet` into `checkStylingMap` while the latter passes `classKeyValueArraySet`. This doesn't appear to matter, because the interpolation instructions always have a string value which means that the function is never called. PR Close #61639
Updates the `ɵɵinterpolate` instruction so it doesn't call into `interpolation1` under the hood since it requires a prefix/suffix and we know there isn't one. PR Close #61639
Replaces the `propertyInterpolateX` instructions with calls to `property` and the `interpolate` helper. This allows us to drop the dedicated interpolation instructions and simplify the runtime for future work. PR Close #61639
This PR was merged into the repository by commit 289ae50. The changes were merged into the following branches: main, 20.0.x |
These changes replace the
propertyInterpolateX
,classMapInterpolateX
,styleMapInterpolateX
andstylePropInterpolateX
instructions with their non-interpolated equivalents and a call to theinterpolateX
helper introduced in #61557. In total this allows us to remove 37 instructions from the runtime, simplifying maintenance and making it easier to ship features in the future. Performance should be identical, because all of these instructions were calling into the same helpers asinterpolateX
under the hood. Furthermore it may lead to some byte savings, because we have more opportunities to chain instructions now.