Skip to content

Commit 481d70d

Browse files
committed
Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/eslint
2 parents 5c2e000 + 9971e8b commit 481d70d

File tree

92 files changed

+2685
-2235
lines changed

Some content is hidden

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

92 files changed

+2685
-2235
lines changed

Gulpfile.js

+18-18
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const generateLibs = () => {
4141
.pipe(concat(relativeTarget, { newLine: "\n\n" }))
4242
.pipe(dest("built/local"))));
4343
};
44-
task("lib", generateLibs)
44+
task("lib", generateLibs);
4545
task("lib").description = "Builds the library targets";
4646

4747
const cleanLib = () => del(libs.map(lib => lib.target));
@@ -168,7 +168,7 @@ task("services", series(preBuild, buildServices));
168168
task("services").description = "Builds the language service";
169169
task("services").flags = {
170170
" --built": "Compile using the built version of the compiler."
171-
}
171+
};
172172

173173
const cleanServices = async () => {
174174
if (fs.existsSync("built/local/typescriptServices.tsconfig.json")) {
@@ -200,14 +200,14 @@ task("watch-services", series(preBuild, parallel(watchLib, watchDiagnostics, wat
200200
task("watch-services").description = "Watches for changes and rebuild language service only";
201201
task("watch-services").flags = {
202202
" --built": "Compile using the built version of the compiler."
203-
}
203+
};
204204

205205
const buildServer = () => buildProject("src/tsserver", cmdLineOptions);
206206
task("tsserver", series(preBuild, buildServer));
207207
task("tsserver").description = "Builds the language server";
208208
task("tsserver").flags = {
209209
" --built": "Compile using the built version of the compiler."
210-
}
210+
};
211211

212212
const cleanServer = () => cleanProject("src/tsserver");
213213
cleanTasks.push(cleanServer);
@@ -219,13 +219,13 @@ task("watch-tsserver", series(preBuild, parallel(watchLib, watchDiagnostics, wat
219219
task("watch-tsserver").description = "Watch for changes and rebuild the language server only";
220220
task("watch-tsserver").flags = {
221221
" --built": "Compile using the built version of the compiler."
222-
}
222+
};
223223

224224
task("min", series(preBuild, parallel(buildTsc, buildServer)));
225225
task("min").description = "Builds only tsc and tsserver";
226226
task("min").flags = {
227227
" --built": "Compile using the built version of the compiler."
228-
}
228+
};
229229

230230
task("clean-min", series(cleanTsc, cleanServer));
231231
task("clean-min").description = "Cleans outputs for tsc and tsserver";
@@ -234,7 +234,7 @@ task("watch-min", series(preBuild, parallel(watchLib, watchDiagnostics, watchTsc
234234
task("watch-min").description = "Watches for changes to a tsc and tsserver only";
235235
task("watch-min").flags = {
236236
" --built": "Compile using the built version of the compiler."
237-
}
237+
};
238238

239239
const buildLssl = (() => {
240240
// build tsserverlibrary.out.js
@@ -268,7 +268,7 @@ task("lssl", series(preBuild, buildLssl));
268268
task("lssl").description = "Builds language service server library";
269269
task("lssl").flags = {
270270
" --built": "Compile using the built version of the compiler."
271-
}
271+
};
272272

273273
const cleanLssl = async () => {
274274
if (fs.existsSync("built/local/tsserverlibrary.tsconfig.json")) {
@@ -302,14 +302,14 @@ task("watch-lssl", series(preBuild, parallel(watchLib, watchDiagnostics, watchLs
302302
task("watch-lssl").description = "Watch for changes and rebuild tsserverlibrary only";
303303
task("watch-lssl").flags = {
304304
" --built": "Compile using the built version of the compiler."
305-
}
305+
};
306306

307307
const buildTests = () => buildProject("src/testRunner");
308308
task("tests", series(preBuild, parallel(buildLssl, buildTests)));
309309
task("tests").description = "Builds the test infrastructure";
310310
task("tests").flags = {
311311
" --built": "Compile using the built version of the compiler."
312-
}
312+
};
313313

314314
const cleanTests = () => cleanProject("src/testRunner");
315315
cleanTasks.push(cleanTests);
@@ -396,13 +396,13 @@ task("local", series(buildFoldStart, preBuild, parallel(localize, buildTsc, buil
396396
task("local").description = "Builds the full compiler and services";
397397
task("local").flags = {
398398
" --built": "Compile using the built version of the compiler."
399-
}
399+
};
400400

401401
task("watch-local", series(preBuild, parallel(watchLib, watchDiagnostics, watchTsc, watchServices, watchServer, watchLssl)));
402402
task("watch-local").description = "Watches for changes to projects in src/ (but does not execute tests).";
403403
task("watch-local").flags = {
404404
" --built": "Compile using the built version of the compiler."
405-
}
405+
};
406406

407407
const generateCodeCoverage = () => exec("istanbul", ["cover", "node_modules/mocha/bin/_mocha", "--", "-R", "min", "-t", "" + cmdLineOptions.testTimeout, "built/local/run.js"]);
408408
task("generate-code-coverage", series(preBuild, buildTests, generateCodeCoverage));
@@ -432,7 +432,7 @@ task("runtests").flags = {
432432
" --built": "Compile using the built version of the compiler.",
433433
" --shards": "Total number of shards running tests (default: 1)",
434434
" --shardId": "1-based ID of this shard (default: 1)",
435-
}
435+
};
436436

437437
const runTestsParallel = () => runConsoleTests("built/local/run.js", "min", /*runInParallel*/ true, /*watchMode*/ false);
438438
task("runtests-parallel", series(preBuild, preTest, runTestsParallel, postTest));
@@ -493,7 +493,7 @@ task("tsc-instrumented", series(lkgPreBuild, parallel(localize, buildTsc, buildS
493493
task("tsc-instrumented").description = "Builds an instrumented tsc.js";
494494
task("tsc-instrumented").flags = {
495495
"-t --tests=<testname>": "The test to run."
496-
}
496+
};
497497

498498
// TODO(rbuckton): Determine if we still need this task. Depending on a relative
499499
// path here seems like a bad idea.
@@ -548,7 +548,7 @@ task("LKG", series(lkgPreBuild, parallel(localize, buildTsc, buildServer, buildS
548548
task("LKG").description = "Makes a new LKG out of the built js files";
549549
task("LKG").flags = {
550550
" --built": "Compile using the built version of the compiler.",
551-
}
551+
};
552552

553553
const generateSpec = () => exec("cscript", ["//nologo", "scripts/word2md.js", path.resolve("doc/TypeScript Language Specification.docx"), path.resolve("doc/spec.md")]);
554554
task("generate-spec", series(buildScripts, generateSpec));
@@ -557,15 +557,15 @@ task("generate-spec").description = "Generates a Markdown version of the Languag
557557
task("clean", series(parallel(cleanTasks), cleanBuilt));
558558
task("clean").description = "Cleans build outputs";
559559

560-
const configureNightly = () => exec(process.execPath, ["scripts/configurePrerelease.js", "dev", "package.json", "src/compiler/core.ts"])
560+
const configureNightly = () => exec(process.execPath, ["scripts/configurePrerelease.js", "dev", "package.json", "src/compiler/core.ts"]);
561561
task("configure-nightly", series(buildScripts, configureNightly));
562562
task("configure-nightly").description = "Runs scripts/configurePrerelease.ts to prepare a build for nightly publishing";
563563

564-
const configureInsiders = () => exec(process.execPath, ["scripts/configurePrerelease.js", "insiders", "package.json", "src/compiler/core.ts"])
564+
const configureInsiders = () => exec(process.execPath, ["scripts/configurePrerelease.js", "insiders", "package.json", "src/compiler/core.ts"]);
565565
task("configure-insiders", series(buildScripts, configureInsiders));
566566
task("configure-insiders").description = "Runs scripts/configurePrerelease.ts to prepare a build for insiders publishing";
567567

568-
const configureExperimental = () => exec(process.execPath, ["scripts/configurePrerelease.js", "experimental", "package.json", "src/compiler/core.ts"])
568+
const configureExperimental = () => exec(process.execPath, ["scripts/configurePrerelease.js", "experimental", "package.json", "src/compiler/core.ts"]);
569569
task("configure-experimental", series(buildScripts, configureExperimental));
570570
task("configure-experimental").description = "Runs scripts/configurePrerelease.ts to prepare a build for experimental publishing";
571571

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"@types/gulp-sourcemaps": "0.0.32",
4343
"@types/jake": "latest",
4444
"@types/merge2": "latest",
45+
"@types/microsoft__typescript-etw": "latest",
4546
"@types/minimatch": "latest",
4647
"@types/minimist": "latest",
4748
"@types/mkdirp": "latest",
@@ -121,7 +122,8 @@
121122
"browser": {
122123
"fs": false,
123124
"os": false,
124-
"path": false
125+
"path": false,
126+
"@microsoft/typescript-etw": false
125127
},
126128
"dependencies": {}
127129
}

src/compiler/binder.ts

+2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ namespace ts {
106106

107107
export function bindSourceFile(file: SourceFile, options: CompilerOptions) {
108108
performance.mark("beforeBind");
109+
perfLogger.logStartBindFile("" + file.fileName);
109110
binder(file, options);
111+
perfLogger.logStopBindFile();
110112
performance.mark("afterBind");
111113
performance.measure("Bind", "beforeBind", "afterBind");
112114
}

0 commit comments

Comments
 (0)