Remove uses of getNodeId in compiler outside of checker.
This commit is contained in:
parent
ca13132e84
commit
6f76b625a1
|
@ -46,7 +46,7 @@ namespace ts {
|
|||
/** Whether the async function contains an element access on super (`super[x]`). */
|
||||
let hasSuperElementAccess: boolean;
|
||||
/** A set of node IDs for generated super accessors (variable statements). */
|
||||
const substitutedSuperAccessors: boolean[] = [];
|
||||
const substitutedSuperAccessors = new Set<Node>();
|
||||
|
||||
let contextFlags: ContextFlags = 0;
|
||||
|
||||
|
@ -503,7 +503,7 @@ namespace ts {
|
|||
enableSubstitutionForAsyncMethodsWithSuper();
|
||||
if (capturedSuperProperties.size) {
|
||||
const variableStatement = createSuperAccessVariableStatement(factory, resolver, node, capturedSuperProperties);
|
||||
substitutedSuperAccessors[getNodeId(variableStatement)] = true;
|
||||
substitutedSuperAccessors.add(variableStatement);
|
||||
insertStatementsAfterStandardPrologue(statements, [variableStatement]);
|
||||
}
|
||||
}
|
||||
|
@ -613,7 +613,7 @@ namespace ts {
|
|||
}
|
||||
}
|
||||
// Disable substitution in the generated super accessor itself.
|
||||
else if (enabledSubstitutions && substitutedSuperAccessors[getNodeId(node)]) {
|
||||
else if (enabledSubstitutions && substitutedSuperAccessors.has(node)) {
|
||||
const savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags;
|
||||
enclosingSuperContainerFlags = 0;
|
||||
previousOnEmitNode(hint, node, emitCallback);
|
||||
|
|
|
@ -70,7 +70,7 @@ namespace ts {
|
|||
/** Whether the async function contains an element access on super (`super[x]`). */
|
||||
let hasSuperElementAccess: boolean;
|
||||
/** A set of node IDs for generated super accessors. */
|
||||
const substitutedSuperAccessors: boolean[] = [];
|
||||
const substitutedSuperAccessors = new Set<Node>();
|
||||
|
||||
return chainBundle(context, transformSourceFile);
|
||||
|
||||
|
@ -972,7 +972,7 @@ namespace ts {
|
|||
if (emitSuperHelpers) {
|
||||
enableSubstitutionForAsyncMethodsWithSuper();
|
||||
const variableStatement = createSuperAccessVariableStatement(factory, resolver, node, capturedSuperProperties);
|
||||
substitutedSuperAccessors[getNodeId(variableStatement)] = true;
|
||||
substitutedSuperAccessors.add(variableStatement);
|
||||
insertStatementsAfterStandardPrologue(statements, [variableStatement]);
|
||||
}
|
||||
|
||||
|
@ -1087,7 +1087,7 @@ namespace ts {
|
|||
}
|
||||
}
|
||||
// Disable substitution in the generated super accessor itself.
|
||||
else if (enabledSubstitutions && substitutedSuperAccessors[getNodeId(node)]) {
|
||||
else if (enabledSubstitutions && substitutedSuperAccessors.has(node)) {
|
||||
const savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags;
|
||||
enclosingSuperContainerFlags = 0 as NodeCheckFlags;
|
||||
previousOnEmitNode(hint, node, emitCallback);
|
||||
|
|
Loading…
Reference in a new issue