8000 Reduce polymorphism resulting from unstable Node shapes by rbuckton · Pull Request #51682 · microsoft/TypeScript · GitHub
[go: up one dir, main page]

Skip to content

Reduce polymorphism resulting from unstable Node shapes #51682

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Dec 13, 2022
Prev Previous commit
Next Next commit
Move localSymbol to Declaration
  • Loading branch information
rbuckton committed Dec 13, 2022
commit 5a211fa779d6000285c3238ba327a44a0aa6cded
5 changes: 3 additions & 2 deletions src/compiler/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ export interface Node extends ReadonlyTextRange {

/** @internal */ locals?: SymbolTable; // Locals associated with node (initialized by binding)
/** @internal */ nextContainer?: Node; // Next container in declaration order (initialized by binding)
/** @internal */ localSymbol?: Symbol; // Local symbol declared by node (initialized by binding only for exported nodes)

/** @internal */ flowNode?: FlowNode; // Associated FlowNode (initialized by binding)
/** @internal */ emitNode?: EmitNode; // Associated EmitNode (initialized by transforms)
/** @internal */ contextualType?: Type; // Used to temporarily assign a contextual type during overload resolution
Expand Down Expand Up @@ -1666,7 +1666,8 @@ export type DeclarationName =

export interface Declaration extends Node {
_declarationBrand: any;
/** @internal */ symbol: Symbol; // Symbol declared by node (initialized by binding)
/** @internal */ symbol: Symbol; // Symbol declared by node (initialized by binding)
/** @internal */ localSymbol?: Symbol; // Local symbol declared by node (initialized by binding only for exported nodes)
}

export interface NamedDeclaration extends Declaration {
Expand Down
0