refactor(ivy): LView is a proper linked list (#28382)

- TView no longer stores childIndex
- LView now as CHILD_HEAD and CHILD_TAIL

TView used to store the head of the list, therefor all LViews had to have the same head, which is incorrect.

PR Close #28382
This commit is contained in:
Ben Lesh
2019-01-25 15:21:51 -08:00
parent ba6aa93aa3
commit 929fe029c2
7 changed files with 27 additions and 34 deletions

View File

@ -369,12 +369,6 @@ export function removeView(lContainer: LContainer, removeIndex: number) {
destroyLView(view);
}
/** Gets the child of the given LView */
export function getLViewChild(lView: LView): LView|LContainer|null {
const childIndex = lView[TVIEW].childIndex;
return childIndex === -1 ? null : lView[childIndex];
}
/**
* A standalone function which destroys an LView,
* conducting cleanup (e.g. removing listeners, calling onDestroys).