Skip to content

Commit

Permalink
Merge branch 'master' into pedanticPropertyLookup
Browse files Browse the repository at this point in the history
  • Loading branch information
Kingwl committed Sep 25, 2020
2 parents 3a1e53b + 62a86ec commit 9fad505
Show file tree
Hide file tree
Showing 838 changed files with 23,977 additions and 6,532 deletions.
1 change: 1 addition & 0 deletions .github/workflows/sync-branch.yaml
Expand Up @@ -21,6 +21,7 @@ jobs:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.branch_name || github.event.client_payload.branch_name }}
fetch-depth: 0
# This does a test post-merge and only pushes the result if the test succeeds
# required client_payload members:
# branch_name - the target branch
Expand Down
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -33,8 +33,8 @@ There are many ways to [contribute](https://github.com/microsoft/TypeScript/blob
* Help each other in the [TypeScript Community Discord](https://discord.gg/typescript).
* Join the [#typescript](https://twitter.com/search?q=%23TypeScript) discussion on Twitter.
* [Contribute bug fixes](https://github.com/microsoft/TypeScript/blob/master/CONTRIBUTING.md).
* Read the language specification ([docx](https://github.com/microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification.docx?raw=true),
[pdf](https://github.com/microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification.pdf?raw=true), [md](https://github.com/microsoft/TypeScript/blob/master/doc/spec.md)).
* Read the archived language specification ([docx](https://github.com/microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification%20-%20ARCHIVED.docx?raw=true),
[pdf](https://github.com/microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification%20-%20ARCHIVED.pdf?raw=true), [md](https://github.com/microsoft/TypeScript/blob/master/doc/spec-archived.md)).

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see
the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com)
Expand Down
86 changes: 47 additions & 39 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion scripts/produceLKG.ts
Expand Up @@ -15,9 +15,9 @@ async function produceLKG() {
await copyLibFiles();
await copyLocalizedDiagnostics();
await copyTypesMap();
await buildProtocol();
await copyScriptOutputs();
await copyDeclarationOutputs();
await buildProtocol();
await writeGitAttributes();
}

Expand Down
8 changes: 5 additions & 3 deletions src/compiler/binder.ts
Expand Up @@ -174,12 +174,14 @@ namespace ts {
const binder = createBinder();

export function bindSourceFile(file: SourceFile, options: CompilerOptions) {
tracing.begin(tracing.Phase.Bind, "bindSourceFile", { path: file.path });
performance.mark("beforeBind");
perfLogger.logStartBindFile("" + file.fileName);
binder(file, options);
perfLogger.logStopBindFile();
performance.mark("afterBind");
performance.measure("Bind", "beforeBind", "afterBind");
tracing.end();
}

function createBinder(): (file: SourceFile, options: CompilerOptions) => void {
Expand Down Expand Up @@ -2806,9 +2808,9 @@ namespace ts {
return symbol;
});
if (symbol) {
const flags = isClassExpression(node.right) ?
SymbolFlags.Property | SymbolFlags.ExportValue | SymbolFlags.Class :
SymbolFlags.Property | SymbolFlags.ExportValue;
const isAlias = isAliasableExpression(node.right) && (isExportsIdentifier(node.left.expression) || isModuleExportsAccessExpression(node.left.expression));
const flags = isAlias ? SymbolFlags.Alias : SymbolFlags.Property | SymbolFlags.ExportValue;
setParent(node.left, node);
declareSymbol(symbol.exports!, symbol, node.left, flags, SymbolFlags.None);
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/compiler/builder.ts
Expand Up @@ -493,10 +493,10 @@ namespace ts {
return !state.semanticDiagnosticsFromOldState.size;
}

function isChangedSignagure(state: BuilderProgramState, path: Path) {
function isChangedSignature(state: BuilderProgramState, path: Path) {
const newSignature = Debug.checkDefined(state.currentAffectedFilesSignatures).get(path);
const oldSignagure = Debug.checkDefined(state.fileInfos.get(path)).signature;
return newSignature !== oldSignagure;
const oldSignature = Debug.checkDefined(state.fileInfos.get(path)).signature;
return newSignature !== oldSignature;
}

/**
Expand All @@ -509,7 +509,7 @@ namespace ts {
return;
}

if (!isChangedSignagure(state, affectedFile.resolvedPath)) return;
if (!isChangedSignature(state, affectedFile.resolvedPath)) return;

// Since isolated modules dont change js files, files affected by change in signature is itself
// But we need to cleanup semantic diagnostics and queue dts emit for affected files
Expand All @@ -522,7 +522,7 @@ namespace ts {
if (!seenFileNamesMap.has(currentPath)) {
seenFileNamesMap.set(currentPath, true);
const result = fn(state, currentPath);
if (result && isChangedSignagure(state, currentPath)) {
if (result && isChangedSignature(state, currentPath)) {
const currentSourceFile = Debug.checkDefined(state.program).getSourceFileByPath(currentPath)!;
queue.push(...BuilderState.getReferencedByPaths(state, currentSourceFile.resolvedPath));
}
Expand Down

0 comments on commit 9fad505

Please sign in to comment.