refactor(ivy): rename flushHooksUpTo to select (#29527)
PR Close #29527
This commit is contained in:
@ -111,7 +111,7 @@ export {
|
||||
elementHostClassProp as ɵelementHostClassProp,
|
||||
elementHostStylingApply as ɵelementHostStylingApply,
|
||||
|
||||
flushHooksUpTo as ɵflushHooksUpTo,
|
||||
select as ɵselect,
|
||||
textBinding as ɵtextBinding,
|
||||
template as ɵtemplate,
|
||||
embeddedViewEnd as ɵembeddedViewEnd,
|
||||
|
@ -130,7 +130,7 @@ export function registerPostOrderHooks(tView: TView, tNode: TNode): void {
|
||||
* [[onInit1, onInit2], [afterContentInit1], [afterViewInit1, afterViewInit2, afterViewInit3]]
|
||||
* They are are stored as flags in LView[FLAGS].
|
||||
*
|
||||
* 2. Pre-order hooks can be executed in batches, because of the flushHooksUpTo instruction.
|
||||
* 2. Pre-order hooks can be executed in batches, because of the select instruction.
|
||||
* To be able to pause and resume their execution, we also need some state about the hook's array
|
||||
* that is being processed:
|
||||
* - the index of the next hook to be executed
|
||||
@ -151,7 +151,7 @@ export function registerPostOrderHooks(tView: TView, tNode: TNode): void {
|
||||
* - undefined: execute hooks only from the saved index until the end of the array (pre-order case,
|
||||
* when flushing the remaining hooks)
|
||||
* - number: execute hooks only from the saved index until that node index exclusive (pre-order
|
||||
* case, when executing flushHooksUpTo(number))
|
||||
* case, when executing select(number))
|
||||
*/
|
||||
export function executePreOrderHooks(
|
||||
currentView: LView, tView: TView, checkNoChangesMode: boolean,
|
||||
@ -178,7 +178,7 @@ export function executePreOrderHooks(
|
||||
* - null: execute hooks only from the saved index until the end of the array (pre-order case, when
|
||||
* flushing the remaining hooks)
|
||||
* - number: execute hooks only from the saved index until that node index exclusive (pre-order
|
||||
* case, when executing flushHooksUpTo(number))
|
||||
* case, when executing select(number))
|
||||
*/
|
||||
export function executeHooks(
|
||||
currentView: LView, firstPassHooks: HookData | null, checkHooks: HookData | null,
|
||||
@ -212,7 +212,7 @@ export function executeHooks(
|
||||
* - null: execute hooks only from the saved index until the end of the array (pre-order case, when
|
||||
* flushing the remaining hooks)
|
||||
* - number: execute hooks only from the saved index until that node index exclusive (pre-order
|
||||
* case, when executing flushHooksUpTo(number))
|
||||
* case, when executing select(number))
|
||||
*/
|
||||
function callHooks(
|
||||
currentView: LView, arr: HookData, initPhase: InitPhaseState,
|
||||
|
@ -63,7 +63,7 @@ export {
|
||||
elementHostClassProp,
|
||||
elementHostStylingApply,
|
||||
|
||||
flushHooksUpTo,
|
||||
select,
|
||||
|
||||
listener,
|
||||
store,
|
||||
|
@ -1097,7 +1097,7 @@ export function elementEnd(): void {
|
||||
*
|
||||
* @param index The index of the element in the `LView`
|
||||
*/
|
||||
export function flushHooksUpTo(index: number): void {
|
||||
export function select(index: number): void {
|
||||
const lView = getLView();
|
||||
executePreOrderHooks(lView, lView[TVIEW], getCheckNoChangesMode(), index);
|
||||
}
|
||||
@ -3110,4 +3110,4 @@ function handleError(lView: LView, error: any): void {
|
||||
const injector = lView[INJECTOR];
|
||||
const errorHandler = injector ? injector.get(ErrorHandler, null) : null;
|
||||
errorHandler && errorHandler.handleError(error);
|
||||
}
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ export const angularCoreEnv: {[name: string]: Function} = {
|
||||
'ɵelementHostStyleProp': r3.elementHostStyleProp,
|
||||
'ɵelementHostStylingApply': r3.elementHostStylingApply,
|
||||
'ɵelementHostClassProp': r3.elementHostClassProp,
|
||||
'ɵflushHooksUpTo': r3.flushHooksUpTo,
|
||||
'ɵselect': r3.select,
|
||||
'ɵtemplate': r3.template,
|
||||
'ɵtext': r3.text,
|
||||
'ɵtextBinding': r3.textBinding,
|
||||
|
Reference in New Issue
Block a user