-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Monomorphize allocators for tsserver/public API, just like core compi…
…ler (#58045)
- Loading branch information
1 parent
39daa13
commit 3456c6e
Showing
114 changed files
with
153 additions
and
352 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Node } from "../_namespaces/ts"; | ||
|
||
const nodeChildren = new WeakMap<Node, Node[] | undefined>(); | ||
|
||
/** @internal */ | ||
export function getNodeChildren(node: Node): Node[] | undefined { | ||
return nodeChildren.get(node); | ||
} | ||
|
||
/** @internal */ | ||
export function setNodeChildren(node: Node, children: Node[]): Node[] { | ||
nodeChildren.set(node, children); | ||
return children; | ||
} | ||
|
||
/** @internal */ | ||
export function unsetNodeChildren(node: Node) { | ||
nodeChildren.delete(node); | ||
} |
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
Oops, something went wrong.