-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(vapor): use bitwise flags for v-for runtime optimizations
- Loading branch information
Showing
4 changed files
with
43 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
* Flags to optimize vapor `createFor` runtime behavior, shared between the | ||
* compiler and the runtime | ||
*/ | ||
export enum VaporVForFlags { | ||
/** | ||
* v-for is the only child of a parent container, so it can take the fast | ||
* path with textContent = '' when the whole list is emptied | ||
*/ | ||
FAST_REMOVE = 1, | ||
/** | ||
* v-for used on component - we can skip creating child scopes for each block | ||
* because the component itself already has a scope. | ||
*/ | ||
IS_COMPONENT = 1 << 1, | ||
/** | ||
* v-for inside v-ince | ||
*/ | ||
ONCE = 1 << 2, | ||
} |