Skip to content

Commit 949b0ec

Browse files
committed
CONVERSION STEP - inlineImports
This step converts as many explicit accesses as possible in favor of direct imports from the modules in which things were declared. This restores the code (as much as possible) back to how it looked originally before the explicitify step, e.g. instead of "ts.Node" and "ts.Symbol", we have just "Node" and "Symbol".
1 parent f463aba commit 949b0ec

File tree

238 files changed

+59207
-56203
lines changed

Some content is hidden

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

238 files changed

+59207
-56203
lines changed

src/compiler/binder.ts

Lines changed: 1240 additions & 1181 deletions
Large diffs are not rendered by default.

src/compiler/builder.ts

Lines changed: 334 additions & 319 deletions
Large diffs are not rendered by default.

src/compiler/builderPublic.ts

Lines changed: 40 additions & 35 deletions
Large diffs are not rendered by default.

src/compiler/builderState.ts

Lines changed: 100 additions & 93 deletions
Large diffs are not rendered by default.

src/compiler/builderStatePublic.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
import * as ts from "./_namespaces/ts";
1+
import { BuildInfo, Diagnostic } from "./_namespaces/ts";
22

33
export interface EmitOutput {
44
outputFiles: OutputFile[];
55
emitSkipped: boolean;
6-
/* @internal */ diagnostics: readonly ts.Diagnostic[];
6+
/* @internal */ diagnostics: readonly Diagnostic[];
77
}
88

99
export interface OutputFile {
1010
name: string;
1111
writeByteOrderMark: boolean;
1212
text: string;
13-
/* @internal */ buildInfo?: ts.BuildInfo
13+
/* @internal */ buildInfo?: BuildInfo
1414
}

src/compiler/checker.ts

Lines changed: 13515 additions & 13316 deletions
Large diffs are not rendered by default.

src/compiler/commandLineParser.ts

Lines changed: 836 additions & 815 deletions
Large diffs are not rendered by default.

src/compiler/core.ts

Lines changed: 169 additions & 165 deletions
Large diffs are not rendered by default.

src/compiler/debug.ts

Lines changed: 245 additions & 228 deletions
Large diffs are not rendered by default.

src/compiler/emitter.ts

Lines changed: 1710 additions & 1631 deletions
Large diffs are not rendered by default.
Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
import * as ts from "../_namespaces/ts";
1+
import { Node, objectAllocator, SyntaxKind } from "../_namespaces/ts";
22

33
/**
44
* A `BaseNodeFactory` is an abstraction over an `ObjectAllocator` that handles caching `Node` constructors
55
* and allocating `Node` instances based on a set of predefined types.
66
*/
77
/* @internal */
88
export interface BaseNodeFactory {
9-
createBaseSourceFileNode(kind: ts.SyntaxKind): ts.Node;
10-
createBaseIdentifierNode(kind: ts.SyntaxKind): ts.Node;
11-
createBasePrivateIdentifierNode(kind: ts.SyntaxKind): ts.Node;
12-
createBaseTokenNode(kind: ts.SyntaxKind): ts.Node;
13-
createBaseNode(kind: ts.SyntaxKind): ts.Node;
9+
createBaseSourceFileNode(kind: SyntaxKind): Node;
10+
createBaseIdentifierNode(kind: SyntaxKind): Node;
11+
createBasePrivateIdentifierNode(kind: SyntaxKind): Node;
12+
createBaseTokenNode(kind: SyntaxKind): Node;
13+
createBaseNode(kind: SyntaxKind): Node;
1414
}
1515

1616
/** @internal */
@@ -19,11 +19,11 @@ export interface BaseNodeFactory {
1919
*/
2020
export function createBaseNodeFactory(): BaseNodeFactory {
2121
// tslint:disable variable-name
22-
let NodeConstructor: new (kind: ts.SyntaxKind, pos?: number, end?: number) => ts.Node;
23-
let TokenConstructor: new (kind: ts.SyntaxKind, pos?: number, end?: number) => ts.Node;
24-
let IdentifierConstructor: new (kind: ts.SyntaxKind, pos?: number, end?: number) => ts.Node;
25-
let PrivateIdentifierConstructor: new (kind: ts.SyntaxKind, pos?: number, end?: number) => ts.Node;
26-
let SourceFileConstructor: new (kind: ts.SyntaxKind, pos?: number, end?: number) => ts.Node;
22+
let NodeConstructor: new (kind: SyntaxKind, pos?: number, end?: number) => Node;
23+
let TokenConstructor: new (kind: SyntaxKind, pos?: number, end?: number) => Node;
24+
let IdentifierConstructor: new (kind: SyntaxKind, pos?: number, end?: number) => Node;
25+
let PrivateIdentifierConstructor: new (kind: SyntaxKind, pos?: number, end?: number) => Node;
26+
let SourceFileConstructor: new (kind: SyntaxKind, pos?: number, end?: number) => Node;
2727
// tslint:enable variable-name
2828

2929
return {
@@ -34,23 +34,23 @@ export function createBaseNodeFactory(): BaseNodeFactory {
3434
createBaseNode
3535
};
3636

37-
function createBaseSourceFileNode(kind: ts.SyntaxKind): ts.Node {
38-
return new (SourceFileConstructor || (SourceFileConstructor = ts.objectAllocator.getSourceFileConstructor()))(kind, /*pos*/ -1, /*end*/ -1);
37+
function createBaseSourceFileNode(kind: SyntaxKind): Node {
38+
return new (SourceFileConstructor || (SourceFileConstructor = objectAllocator.getSourceFileConstructor()))(kind, /*pos*/ -1, /*end*/ -1);
3939
}
4040

41-
function createBaseIdentifierNode(kind: ts.SyntaxKind): ts.Node {
42-
return new (IdentifierConstructor || (IdentifierConstructor = ts.objectAllocator.getIdentifierConstructor()))(kind, /*pos*/ -1, /*end*/ -1);
41+
function createBaseIdentifierNode(kind: SyntaxKind): Node {
42+
return new (IdentifierConstructor || (IdentifierConstructor = objectAllocator.getIdentifierConstructor()))(kind, /*pos*/ -1, /*end*/ -1);
4343
}
4444

45-
function createBasePrivateIdentifierNode(kind: ts.SyntaxKind): ts.Node {
46-
return new (PrivateIdentifierConstructor || (PrivateIdentifierConstructor = ts.objectAllocator.getPrivateIdentifierConstructor()))(kind, /*pos*/ -1, /*end*/ -1);
45+
function createBasePrivateIdentifierNode(kind: SyntaxKind): Node {
46+
return new (PrivateIdentifierConstructor || (PrivateIdentifierConstructor = objectAllocator.getPrivateIdentifierConstructor()))(kind, /*pos*/ -1, /*end*/ -1);
4747
}
4848

49-
function createBaseTokenNode(kind: ts.SyntaxKind): ts.Node {
50-
return new (TokenConstructor || (TokenConstructor = ts.objectAllocator.getTokenConstructor()))(kind, /*pos*/ -1, /*end*/ -1);
49+
function createBaseTokenNode(kind: SyntaxKind): Node {
50+
return new (TokenConstructor || (TokenConstructor = objectAllocator.getTokenConstructor()))(kind, /*pos*/ -1, /*end*/ -1);
5151
}
5252

53-
function createBaseNode(kind: ts.SyntaxKind): ts.Node {
54-
return new (NodeConstructor || (NodeConstructor = ts.objectAllocator.getNodeConstructor()))(kind, /*pos*/ -1, /*end*/ -1);
53+
function createBaseNode(kind: SyntaxKind): Node {
54+
return new (NodeConstructor || (NodeConstructor = objectAllocator.getNodeConstructor()))(kind, /*pos*/ -1, /*end*/ -1);
5555
}
5656
}

0 commit comments

Comments
 (0)