MCPcopy Index your code
hub / github.com/angular/angular / applyIcuUpdateCase

Function applyIcuUpdateCase

packages/core/src/render3/i18n/i18n_apply.ts:504–518  ·  view source on GitHub ↗

* Apply OpCodes associated with updating an existing ICU. * * @param tView Current `TView` * @param tIcu Current `TIcu` * @param bindingsStartIndex Location of the first `ɵɵi18nApply` * @param lView Current `LView`

(tView: TView, tIcu: TIcu, bindingsStartIndex: number, lView: LView)

Source from the content-addressed store, hash-verified

502 * @param lView Current `LView`
503 */
504function applyIcuUpdateCase(tView: TView, tIcu: TIcu, bindingsStartIndex: number, lView: LView) {
505 ngDevMode && assertIndexInRange(lView, tIcu.currentCaseLViewIndex);
506 let activeCaseIndex = lView[tIcu.currentCaseLViewIndex];
507 if (activeCaseIndex !== null) {
508 let mask = changeMask;
509 if (activeCaseIndex < 0) {
510 // Clear the flag.
511 // Negative number means that the ICU was freshly created and we need to force the update.
512 activeCaseIndex = lView[tIcu.currentCaseLViewIndex] = ~activeCaseIndex;
513 // -1 is same as all bits on, which simulates creation since it marks all bits dirty
514 mask = -1;
515 }
516 applyUpdateOpCodes(tView, lView, tIcu.update[activeCaseIndex], bindingsStartIndex, mask);
517 }
518}
519
520/**
521 * Apply OpCodes associated with switching a case on ICU.

Callers 1

applyUpdateOpCodesFunction · 0.85

Calls 2

assertIndexInRangeFunction · 0.90
applyUpdateOpCodesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…