feat(ivy): support providers and viewProviders (#25803)
PR Close #25803
This commit is contained in:

committed by
Matias Niemelä

parent
9dc52d9d04
commit
b0476f308b
@ -46,6 +46,18 @@ export const enum TNodeFlags {
|
||||
DirectiveStartingIndexShift = 16,
|
||||
}
|
||||
|
||||
/**
|
||||
* Corresponds to the TNode.providerIndexes property.
|
||||
*/
|
||||
export const enum TNodeProviderIndexes {
|
||||
/** The index of the first provider on this node is encoded on the least significant bits */
|
||||
ProvidersStartIndexMask = 0b00000000000000001111111111111111,
|
||||
|
||||
/** The count of view providers from the component on this node is encoded on the 16 most
|
||||
significant bits */
|
||||
CptViewProvidersCountShift = 16,
|
||||
CptViewProvidersCountShifter = 0b00000000000000010000000000000000,
|
||||
}
|
||||
/**
|
||||
* A set of marker values to be used in the attributes arrays. Those markers indicate that some
|
||||
* items are not regular attributes and the processing should be adapted accordingly.
|
||||
@ -125,6 +137,14 @@ export interface TNode {
|
||||
*/
|
||||
flags: TNodeFlags;
|
||||
|
||||
/**
|
||||
* This number stores two values using its bits:
|
||||
*
|
||||
* - the index of the first provider on that node (first 16 bits)
|
||||
* - the count of view providers from the component on this node (last 16 bits)
|
||||
*/
|
||||
providerIndexes: TNodeProviderIndexes;
|
||||
|
||||
/** The tag name associated with this node. */
|
||||
tagName: string|null;
|
||||
|
||||
|
Reference in New Issue
Block a user