Skip to content

Commit 59d1a30

Browse files
committed
Direct import Debug in critical areas
1 parent edd16a7 commit 59d1a30

File tree

130 files changed

+142
-144
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+142
-144
lines changed

src/compiler/binder.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ import {
3939
createFileDiagnostic,
4040
createQueue,
4141
createSymbolTable,
42-
Debug,
4342
Declaration,
4443
declarationNameToString,
4544
DeleteExpression,
@@ -312,6 +311,7 @@ import {
312311
WithStatement,
313312
} from "./_namespaces/ts";
314313
import * as performance from "./_namespaces/ts.performance";
314+
import * as Debug from "./debug";
315315

316316
/** @internal */
317317
export const enum ModuleInstanceState {

src/compiler/builder.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import {
2525
createGetCanonicalFileName,
2626
createProgram,
2727
CustomTransformers,
28-
Debug,
2928
Diagnostic,
3029
DiagnosticCategory,
3130
DiagnosticMessageChain,
@@ -80,6 +79,7 @@ import {
8079
WriteFileCallback,
8180
WriteFileCallbackData,
8281
} from "./_namespaces/ts";
82+
import * as Debug from "./debug";
8383

8484
/** @internal */
8585
export interface ReusableDiagnostic extends ReusableDiagnosticRelatedInformation {

src/compiler/builderState.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {
33
CancellationToken,
44
computeSignatureWithDiagnostics,
55
CustomTransformers,
6-
Debug,
76
EmitOutput,
87
emptyArray,
98
ExportedModulesFromDeclarationEmit,
@@ -33,6 +32,7 @@ import {
3332
toPath,
3433
TypeChecker,
3534
} from "./_namespaces/ts";
35+
import * as Debug from "./debug";
3636

3737
/** @internal */
3838
export function getFileEmitOutput(program: Program, sourceFile: SourceFile, emitOnlyDtsFiles: boolean,

src/compiler/checker.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ import {
112112
createSymbolTable,
113113
createTextWriter,
114114
createUnderscoreEscapedMultiMap,
115-
Debug,
116115
Declaration,
117116
DeclarationName,
118117
declarationNameToString,
@@ -1040,6 +1039,7 @@ import {
10401039
} from "./_namespaces/ts";
10411040
import * as performance from "./_namespaces/ts.performance";
10421041
import * as moduleSpecifiers from "./_namespaces/ts.moduleSpecifiers";
1042+
import * as Debug from "./debug";
10431043

10441044
const ambientModuleSymbolRegex = /^".+"$/;
10451045
const anon = "(anonymous)" as __String & string;

src/compiler/commandLineParser.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import {
2020
createCompilerDiagnostic,
2121
createDiagnosticForNodeInSourceFile,
2222
createGetCanonicalFileName,
23-
Debug,
2423
Diagnostic,
2524
DiagnosticMessage,
2625
Diagnostics,
@@ -120,6 +119,7 @@ import {
120119
WatchFileKind,
121120
WatchOptions,
122121
} from "./_namespaces/ts";
122+
import * as Debug from "./debug";
123123

124124
/** @internal */
125125
export const compileOnSaveCommandLineOption: CommandLineOption = {

src/compiler/core.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {
33
CharacterCodes,
44
Comparer,
55
Comparison,
6-
Debug,
76
EqualityComparer,
87
isWhiteSpaceLike,
98
MapLike,
@@ -14,7 +13,7 @@ import {
1413
TextSpan,
1514
UnderscoreEscapedMap,
1615
} from "./_namespaces/ts";
17-
16+
import * as Debug from "./debug";
1817

1918
/** @internal */
2019
export const emptyArray: never[] = [] as never[];

src/compiler/emitter.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ import {
6868
createSourceMapGenerator,
6969
createTextWriter,
7070
CustomTransformers,
71-
Debug,
7271
DebuggerStatement,
7372
DeclarationName,
7473
Decorator,
@@ -449,6 +448,7 @@ import {
449448
YieldExpression,
450449
} from "./_namespaces/ts";
451450
import * as performance from "./_namespaces/ts.performance";
451+
import * as Debug from "./debug";
452452

453453
const brackets = createBracketsMap();
454454

src/compiler/factory/emitHelpers.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {
77
compareValues,
88
Comparison,
99
createExpressionFromEntityName,
10-
Debug,
1110
EmitFlags,
1211
EmitHelper,
1312
EmitHelperUniqueNameCallback,
@@ -33,6 +32,7 @@ import {
3332
TransformationContext,
3433
UnscopedEmitHelper,
3534
} from "../_namespaces/ts";
35+
import * as Debug from "../debug";
3636

3737
/** @internal */
3838
export interface EmitHelperFactory {

src/compiler/factory/emitNode.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {
33
append,
44
appendIfUnique,
55
AutoGenerateInfo,
6-
Debug,
76
EmitFlags,
87
EmitHelper,
98
EmitNode,
@@ -26,6 +25,7 @@ import {
2625
TypeNode,
2726
TypeParameterDeclaration,
2827
} from "../_namespaces/ts";
28+
import * as Debug from "../debug";
2929

3030
/**
3131
* Associates a node with the current transformation, initializing

src/compiler/factory/nodeConverters.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {
77
Block,
88
cast,
99
ConciseBody,
10-
Debug,
1110
Expression,
1211
FunctionDeclaration,
1312
getStartsOnNewLine,
@@ -32,6 +31,7 @@ import {
3231
setTextRange,
3332
SyntaxKind,
3433
} from "../_namespaces/ts";
34+
import * as Debug from "../debug";
3535

3636
/** @internal */
3737
export function createNodeConverters(factory: NodeFactory): NodeConverters {

src/compiler/factory/nodeFactory.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ import {
6363
createNodeConverters,
6464
createParenthesizerRules,
6565
createScanner,
66-
Debug,
6766
DebuggerStatement,
6867
Declaration,
6968
DeclarationName,
@@ -471,6 +470,7 @@ import {
471470
WithStatement,
472471
YieldExpression,
473472
} from "../_namespaces/ts";
473+
import * as Debug from "../debug";
474474

475475
let nextAutoGenerateId = 0;
476476

src/compiler/factory/utilities.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import {
2020
CommaListExpression,
2121
compareStringsCaseSensitive,
2222
CompilerOptions,
23-
Debug,
2423
Declaration,
2524
EmitFlags,
2625
EmitHelperFactory,
@@ -167,6 +166,7 @@ import {
167166
TypeNode,
168167
TypeParameterDeclaration,
169168
} from "../_namespaces/ts";
169+
import * as Debug from "../debug";
170170

171171
// Compound nodes
172172

src/compiler/moduleNameResolver.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import {
1414
contains,
1515
containsPath,
1616
createCompilerDiagnostic,
17-
Debug,
1817
deduplicate,
1918
Diagnostic,
2019
DiagnosticMessage,
@@ -108,6 +107,7 @@ import {
108107
versionMajorMinor,
109108
VersionRange,
110109
} from "./_namespaces/ts";
110+
import * as Debug from "./debug";
111111

112112
/** @internal */
113113
export function trace(host: ModuleResolutionHost, message: DiagnosticMessage, ...args: any[]): void;

src/compiler/moduleSpecifiers.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import {
1414
containsIgnoredPath,
1515
containsPath,
1616
createGetCanonicalFileName,
17-
Debug,
1817
directorySeparator,
1918
emptyArray,
2019
endsWith,
@@ -107,6 +106,7 @@ import {
107106
TypeChecker,
108107
UserPreferences,
109108
} from "./_namespaces/ts";
109+
import * as Debug from "./debug";
110110

111111
// Used by importFixes, getEditsForFileRename, and declaration emit to synthesize import module specifiers.
112112

src/compiler/parser.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ import {
5959
createScanner,
6060
createTextChangeRange,
6161
createTextSpanFromBounds,
62-
Debug,
6362
Decorator,
6463
DefaultClause,
6564
DeleteExpression,
@@ -389,6 +388,7 @@ import {
389388
YieldExpression,
390389
} from "./_namespaces/ts";
391390
import * as performance from "./_namespaces/ts.performance";
391+
import * as Debug from "./debug";
392392

393393
const enum SignatureFlags {
394394
None = 0,

src/compiler/path.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import {
44
compareStringsCaseSensitive,
55
compareValues,
66
Comparison,
7-
Debug,
87
endsWith,
98
equateStringsCaseInsensitive,
109
equateStringsCaseSensitive,
@@ -17,6 +16,7 @@ import {
1716
startsWith,
1817
stringContains,
1918
} from "./_namespaces/ts";
19+
import * as Debug from "./debug";
2020

2121
/**
2222
* Internally, we represent paths as strings with '/' as the directory separator.

src/compiler/performance.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import {
2-
Debug,
32
noop,
43
Performance,
54
PerformanceHooks,
@@ -8,6 +7,7 @@ import {
87
timestamp,
98
tryGetNativePerformanceHooks,
109
} from "./_namespaces/ts";
10+
import * as Debug from "./debug";
1111

1212
/** Performance measurements for the compiler. */
1313

src/compiler/program.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ import {
5151
createTypeChecker,
5252
createTypeReferenceDirectiveResolutionCache,
5353
CustomTransformers,
54-
Debug,
5554
DeclarationWithTypeParameterChildren,
5655
DeprecationVersion,
5756
Diagnostic,
@@ -316,6 +315,7 @@ import {
316315
zipToModeAwareCache,
317316
} from "./_namespaces/ts";
318317
import * as performance from "./_namespaces/ts.performance";
318+
import * as Debug from "./debug";
319319

320320
export function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean, configName = "tsconfig.json"): string | undefined {
321321
return forEachAncestorDirectory(searchPath, ancestor => {

src/compiler/resolutionCache.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import {
1212
createMultiMap,
1313
createTypeReferenceDirectiveResolutionCache,
1414
createTypeReferenceResolutionLoader,
15-
Debug,
1615
Diagnostics,
1716
directorySeparator,
1817
DirectoryWatcherCallback,
@@ -73,6 +72,7 @@ import {
7372
updateResolutionField,
7473
WatchDirectoryFlags,
7574
} from "./_namespaces/ts";
75+
import * as Debug from "./debug";
7676

7777
/**
7878
* This is the cache of module/typedirectives resolution that can be retained across program

src/compiler/scanner.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
CommentKind,
99
CommentRange,
1010
compareValues,
11-
Debug,
1211
DiagnosticMessage,
1312
Diagnostics,
1413
identity,
@@ -26,6 +25,7 @@ import {
2625
TokenFlags,
2726
trimStringStart,
2827
} from "./_namespaces/ts";
28+
import * as Debug from "./debug";
2929

3030
export type ErrorCallback = (message: DiagnosticMessage, length: number) => void;
3131

src/compiler/semver.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ import {
22
compareStringsCaseSensitive,
33
compareValues,
44
Comparison,
5-
Debug,
65
emptyArray,
76
every,
87
isArray,
98
map,
109
some,
1110
trimString,
1211
} from "./_namespaces/ts";
12+
import * as Debug from "./debug";
1313

1414
// https://semver.org/#spec-item-2
1515
// > A normal version number MUST take the form X.Y.Z where X, Y, and Z are non-negative
@@ -427,4 +427,4 @@ function formatAlternative(comparators: readonly Comparator[]) {
427427

428428
function formatComparator(comparator: Comparator) {
429429
return `${comparator.operator}${comparator.operand}`;
430-
}
430+
}

src/compiler/sourcemap.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import {
44
CharacterCodes,
55
combinePaths,
66
compareValues,
7-
Debug,
87
DocumentPosition,
98
DocumentPositionMapper,
109
DocumentPositionMapperHost,
@@ -27,6 +26,7 @@ import {
2726
trimStringEnd,
2827
} from "./_namespaces/ts";
2928
import * as performance from "./_namespaces/ts.performance";
29+
import * as Debug from "./debug";
3030

3131
/** @internal */
3232
export interface SourceMapGeneratorOptions {

src/compiler/sys.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
containsPath,
99
createGetCanonicalFileName,
1010
createMultiMap,
11-
Debug,
1211
directorySeparator,
1312
emptyArray,
1413
emptyFileSystemEntries,
@@ -47,6 +46,7 @@ import {
4746
WatchOptions,
4847
writeFileEnsuringDirectories,
4948
} from "./_namespaces/ts";
49+
import * as Debug from "./debug";
5050

5151
declare function setTimeout(handler: (...args: any[]) => void, timeout: number): any;
5252
declare function clearTimeout(handle: any): void;

src/compiler/tracing.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {
22
combinePaths,
33
ConditionalType,
4-
Debug,
54
EvolvingArrayType,
65
getLineAndCharacterOfPosition,
76
getSourceFileOfNode,
@@ -22,6 +21,7 @@ import {
2221
UnionType,
2322
} from "./_namespaces/ts";
2423
import * as performance from "./_namespaces/ts.performance";
24+
import * as Debug from "./debug";
2525

2626
/* Tracing events for the compiler. */
2727

0 commit comments

Comments
 (0)