Module flags

Source
Expand description

This module defines a collection of flags used for Vue’s runtime. Currently it includes preamble helper and vnode patch flags. Ideally we can make flags extensible by extracting them to trait. But currently it works well enough and adding traits makes compiler bloated with too many generic parameters.

Structs§

HelperCollector
HelperIter
PatchFlag
Patch flags are optimization hints generated by the compiler. when a block with dynamicChildren is encountered during diff, the algorithm enters “optimized mode”. In this mode, we know that the vdom is produced by a render function generated by the compiler, so the algorithm only needs to handle updates explicitly marked by these patch flags.

Enums§

RuntimeHelper
SlotFlag
StaticLevel
Static level describes how much an IR node can be statically generated. Higher levels implies lower levels. e.g. a node that can be stringified can always be hoisted and skipped for patch.