@@ -10973,7 +10973,7 @@ namespace ts {
1097310973 // very high likelihood we're dealing with an infinite generic type that perpetually generates
1097410974 // new type identities as we descend into it. We stop the recursion here and mark this type
1097510975 // and the outer types as having circular constraints.
10976- tracing.instant(tracing.Phase.Check , "getImmediateBaseConstraint_DepthLimit", { typeId: t.id, originalTypeId: type.id, depth: constraintDepth });
10976+ tracing.instant(tracing.Phase.CheckTypes , "getImmediateBaseConstraint_DepthLimit", { typeId: t.id, originalTypeId: type.id, depth: constraintDepth });
1097710977 error(currentNode, Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite);
1097810978 nonTerminating = true;
1097910979 return t.immediateBaseConstraint = noConstraintType;
@@ -13083,7 +13083,7 @@ namespace ts {
1308313083 // caps union types at 5000 unique literal types and 1000 unique object types.
1308413084 const estimatedCount = (count / (len - i)) * len;
1308513085 if (estimatedCount > (primitivesOnly ? 25000000 : 1000000)) {
13086- tracing.instant(tracing.Phase.Check , "removeSubtypes_DepthLimit", { typeIds: types.map(t => t.id) });
13086+ tracing.instant(tracing.Phase.CheckTypes , "removeSubtypes_DepthLimit", { typeIds: types.map(t => t.id) });
1308713087 error(currentNode, Diagnostics.Expression_produces_a_union_type_that_is_too_complex_to_represent);
1308813088 return false;
1308913089 }
@@ -13505,7 +13505,7 @@ namespace ts {
1350513505 function checkCrossProductUnion(types: readonly Type[]) {
1350613506 const size = reduceLeft(types, (n, t) => n * (t.flags & TypeFlags.Union ? (<UnionType>t).types.length : t.flags & TypeFlags.Never ? 0 : 1), 1);
1350713507 if (size >= 100000) {
13508- tracing.instant(tracing.Phase.Check , "checkCrossProductUnion_DepthLimit", { typeIds: types.map(t => t.id), size });
13508+ tracing.instant(tracing.Phase.CheckTypes , "checkCrossProductUnion_DepthLimit", { typeIds: types.map(t => t.id), size });
1350913509 error(currentNode, Diagnostics.Expression_produces_a_union_type_that_is_too_complex_to_represent);
1351013510 return false;
1351113511 }
@@ -15381,7 +15381,7 @@ namespace ts {
1538115381 // We have reached 50 recursive type instantiations and there is a very high likelyhood we're dealing
1538215382 // with a combination of infinite generic types that perpetually generate new type identities. We stop
1538315383 // the recursion here by yielding the error type.
15384- tracing.instant(tracing.Phase.Check , "instantiateType_DepthLimit", { typeId: type.id, instantiationDepth, instantiationCount });
15384+ tracing.instant(tracing.Phase.CheckTypes , "instantiateType_DepthLimit", { typeId: type.id, instantiationDepth, instantiationCount });
1538515385 error(currentNode, Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite);
1538615386 return errorType;
1538715387 }
@@ -16504,7 +16504,7 @@ namespace ts {
1650416504 reportIncompatibleStack();
1650516505 }
1650616506 if (overflow) {
16507- tracing.instant(tracing.Phase.Check , "checkTypeRelatedTo_DepthLimit", { sourceId: source.id, targetId: target.id, depth });
16507+ tracing.instant(tracing.Phase.CheckTypes , "checkTypeRelatedTo_DepthLimit", { sourceId: source.id, targetId: target.id, depth });
1650816508 const diag = error(errorNode || currentNode, Diagnostics.Excessive_stack_depth_comparing_types_0_and_1, typeToString(source), typeToString(target));
1650916509 if (errorOutputContainer) {
1651016510 (errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag);
@@ -17327,7 +17327,7 @@ namespace ts {
1732717327 }
1732817328
1732917329 if (expandingFlags === ExpandingFlags.Both) {
17330- tracing.instant(tracing.Phase.Check , "recursiveTypeRelatedTo_DepthLimit", {
17330+ tracing.instant(tracing.Phase.CheckTypes , "recursiveTypeRelatedTo_DepthLimit", {
1733117331 sourceId: source.id,
1733217332 sourceIdStack: sourceStack.map(t => t.id),
1733317333 targetId: target.id,
@@ -17364,7 +17364,7 @@ namespace ts {
1736417364 }
1736517365
1736617366 function structuredTypeRelatedTo(source: Type, target: Type, reportErrors: boolean, intersectionState: IntersectionState): Ternary {
17367- tracing.push(tracing.Phase.Check , "structuredTypeRelatedTo", { sourceId: source.id, targetId: target.id });
17367+ tracing.push(tracing.Phase.CheckTypes , "structuredTypeRelatedTo", { sourceId: source.id, targetId: target.id });
1736817368 const result = structuredTypeRelatedToWorker(source, target, reportErrors, intersectionState);
1736917369 tracing.pop();
1737017370 return result;
@@ -17860,7 +17860,7 @@ namespace ts {
1786017860 numCombinations *= countTypes(getTypeOfSymbol(sourceProperty));
1786117861 if (numCombinations > 25) {
1786217862 // We've reached the complexity limit.
17863- tracing.instant(tracing.Phase.Check , "typeRelatedToDiscriminatedType_DepthLimit", { sourceId: source.id, targetId: target.id, numCombinations });
17863+ tracing.instant(tracing.Phase.CheckTypes , "typeRelatedToDiscriminatedType_DepthLimit", { sourceId: source.id, targetId: target.id, numCombinations });
1786417864 return Ternary.False;
1786517865 }
1786617866 }
@@ -18621,7 +18621,7 @@ namespace ts {
1862118621 function getVariancesWorker<TCache extends { variances?: VarianceFlags[] }>(typeParameters: readonly TypeParameter[] = emptyArray, cache: TCache, createMarkerType: (input: TCache, param: TypeParameter, marker: Type) => Type): VarianceFlags[] {
1862218622 let variances = cache.variances;
1862318623 if (!variances) {
18624- tracing.push(tracing.Phase.Check , "getVariancesWorker", { arity: typeParameters.length, id: (cache as any).id ?? (cache as any).declaredType?.id ?? -1 });
18624+ tracing.push(tracing.Phase.CheckTypes , "getVariancesWorker", { arity: typeParameters.length, id: (cache as any).id ?? (cache as any).declaredType?.id ?? -1 });
1862518625 // The emptyArray singleton is used to signal a recursive invocation.
1862618626 cache.variances = emptyArray;
1862718627 variances = [];
@@ -21719,7 +21719,7 @@ namespace ts {
2171921719 if (flowDepth === 2000) {
2172021720 // We have made 2000 recursive invocations. To avoid overflowing the call stack we report an error
2172121721 // and disable further control flow analysis in the containing function or module body.
21722- tracing.instant(tracing.Phase.Check , "getTypeAtFlowNode_DepthLimit", { flowId: flow.id });
21722+ tracing.instant(tracing.Phase.CheckTypes , "getTypeAtFlowNode_DepthLimit", { flowId: flow.id });
2172321723 flowAnalysisDisabled = true;
2172421724 reportFlowControlError(reference);
2172521725 return errorType;
0 commit comments