Skip to content

Commit

Permalink
Update LKG.
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielRosenwasser committed Jun 23, 2017
1 parent 14d95ed commit 8b2fe13
Show file tree
Hide file tree
Showing 5 changed files with 162 additions and 107 deletions.
51 changes: 30 additions & 21 deletions lib/tsc.js
Original file line number Diff line number Diff line change
Expand Up @@ -15554,7 +15554,7 @@ var ts;
}
function parseLeftHandSideExpressionOrHigher() {
var expression;
if (token() === 91) {
if (token() === 91 && lookAhead(nextTokenIsOpenParenOrLessThan)) {
sourceFile.flags |= 524288;
expression = parseTokenNode();
}
Expand Down Expand Up @@ -18760,7 +18760,20 @@ var ts;
ts.forEachChild(node, bind, bindEach);
}
function bindChildrenWorker(node) {
ts.forEach(node.jsDoc, bind);
if (node.jsDoc) {
if (ts.isInJavaScriptFile(node)) {
for (var _i = 0, _a = node.jsDoc; _i < _a.length; _i++) {
var j = _a[_i];
bind(j);
}
}
else {
for (var _b = 0, _c = node.jsDoc; _b < _c.length; _b++) {
var j = _c[_b];
setParentPointers(node, j);
}
}
}
if (checkUnreachable(node)) {
bindEachChild(node);
return;
Expand Down Expand Up @@ -19805,7 +19818,8 @@ var ts;
}
node.parent = parent;
var saveInStrictMode = inStrictMode;
bindJSDocTypedefTagIfAny(node);
if (ts.isInJavaScriptFile(node))
bindJSDocTypedefTagIfAny(node);
bindWorker(node);
if (node.kind > 142) {
var saveParent = parent;
Expand Down Expand Up @@ -19865,7 +19879,7 @@ var ts;
function bindWorker(node) {
switch (node.kind) {
case 71:
if (ts.isInJavaScriptFile(node) && node.isInJSDocNamespace) {
if (node.isInJSDocNamespace) {
var parentNode = node.parent;
while (parentNode && parentNode.kind !== 291) {
parentNode = parentNode.parent;
Expand Down Expand Up @@ -19925,10 +19939,7 @@ var ts;
case 158:
return checkTypePredicate(node);
case 145:
if (node.parent.kind !== 290 || ts.isInJavaScriptFile(node)) {
return declareSymbolAndAddToSymbolTable(node, 262144, 530920);
}
return;
return declareSymbolAndAddToSymbolTable(node, 262144, 530920);
case 146:
return bindParameter(node);
case 226:
Expand Down Expand Up @@ -19999,10 +20010,7 @@ var ts;
case 232:
return bindEnumDeclaration(node);
case 233:
if (node.parent.kind !== 291 || ts.isInJavaScriptFile(node)) {
return bindModuleDeclaration(node);
}
return undefined;
return bindModuleDeclaration(node);
case 254:
return bindJsxAttributes(node);
case 253:
Expand All @@ -20029,13 +20037,6 @@ var ts;
}
case 234:
return updateStrictModeStatementList(node.statements);
default:
if (ts.isInJavaScriptFile(node))
return bindJSDocWorker(node);
}
}
function bindJSDocWorker(node) {
switch (node.kind) {
case 276:
return bindPropertyWorker(node);
case 292:
Expand Down Expand Up @@ -21021,6 +21022,10 @@ var ts;
}
}
ts.getTransformFlagsSubtreeExclusions = getTransformFlagsSubtreeExclusions;
function setParentPointers(parent, child) {
child.parent = parent;
ts.forEachChild(child, function (childsChild) { return setParentPointers(child, childsChild); });
}
})(ts || (ts = {}));
var ts;
(function (ts) {
Expand Down Expand Up @@ -22632,8 +22637,9 @@ var ts;
error(errorLocation, ts.Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor, ts.declarationNameToString(propertyName), typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg));
return undefined;
}
if (meaning & 2 ||
((meaning & 32 || meaning & 384) && (meaning & 107455) === 107455)) {
if (errorLocation &&
(meaning & 2 ||
((meaning & 32 || meaning & 384) && (meaning & 107455) === 107455))) {
var exportOrLocalSymbol = getExportSymbolOfValueSymbolIfExported(result);
if (exportOrLocalSymbol.flags & 2 || exportOrLocalSymbol.flags & 32 || exportOrLocalSymbol.flags & 384) {
checkResolvedBlockScopedVariable(exportOrLocalSymbol, errorLocation);
Expand Down Expand Up @@ -55596,6 +55602,9 @@ var ts;
if (!ts.arrayIsEqualTo(oldSourceFile.moduleAugmentations, newSourceFile.moduleAugmentations, moduleNameIsEqualTo)) {
oldProgram.structureIsReused = 1;
}
if ((oldSourceFile.flags & 524288) !== (newSourceFile.flags & 524288)) {
oldProgram.structureIsReused = 1;
}
if (!ts.arrayIsEqualTo(oldSourceFile.typeReferenceDirectives, newSourceFile.typeReferenceDirectives, fileReferenceIsEqualTo)) {
oldProgram.structureIsReused = 1;
}
Expand Down
51 changes: 30 additions & 21 deletions lib/tsserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -17391,7 +17391,7 @@ var ts;
}
function parseLeftHandSideExpressionOrHigher() {
var expression;
if (token() === 91) {
if (token() === 91 && lookAhead(nextTokenIsOpenParenOrLessThan)) {
sourceFile.flags |= 524288;
expression = parseTokenNode();
}
Expand Down Expand Up @@ -20662,7 +20662,20 @@ var ts;
ts.forEachChild(node, bind, bindEach);
}
function bindChildrenWorker(node) {
ts.forEach(node.jsDoc, bind);
if (node.jsDoc) {
if (ts.isInJavaScriptFile(node)) {
for (var _i = 0, _a = node.jsDoc; _i < _a.length; _i++) {
var j = _a[_i];
bind(j);
}
}
else {
for (var _b = 0, _c = node.jsDoc; _b < _c.length; _b++) {
var j = _c[_b];
setParentPointers(node, j);
}
}
}
if (checkUnreachable(node)) {
bindEachChild(node);
return;
Expand Down Expand Up @@ -21712,7 +21725,8 @@ var ts;
}
node.parent = parent;
var saveInStrictMode = inStrictMode;
bindJSDocTypedefTagIfAny(node);
if (ts.isInJavaScriptFile(node))
bindJSDocTypedefTagIfAny(node);
bindWorker(node);
if (node.kind > 142) {
var saveParent = parent;
Expand Down Expand Up @@ -21772,7 +21786,7 @@ var ts;
function bindWorker(node) {
switch (node.kind) {
case 71:
if (ts.isInJavaScriptFile(node) && node.isInJSDocNamespace) {
if (node.isInJSDocNamespace) {
var parentNode = node.parent;
while (parentNode && parentNode.kind !== 291) {
parentNode = parentNode.parent;
Expand Down Expand Up @@ -21832,10 +21846,7 @@ var ts;
case 158:
return checkTypePredicate(node);
case 145:
if (node.parent.kind !== 290 || ts.isInJavaScriptFile(node)) {
return declareSymbolAndAddToSymbolTable(node, 262144, 530920);
}
return;
return declareSymbolAndAddToSymbolTable(node, 262144, 530920);
case 146:
return bindParameter(node);
case 226:
Expand Down Expand Up @@ -21906,10 +21917,7 @@ var ts;
case 232:
return bindEnumDeclaration(node);
case 233:
if (node.parent.kind !== 291 || ts.isInJavaScriptFile(node)) {
return bindModuleDeclaration(node);
}
return undefined;
return bindModuleDeclaration(node);
case 254:
return bindJsxAttributes(node);
case 253:
Expand All @@ -21936,13 +21944,6 @@ var ts;
}
case 234:
return updateStrictModeStatementList(node.statements);
default:
if (ts.isInJavaScriptFile(node))
return bindJSDocWorker(node);
}
}
function bindJSDocWorker(node) {
switch (node.kind) {
case 276:
return bindPropertyWorker(node);
case 292:
Expand Down Expand Up @@ -22928,6 +22929,10 @@ var ts;
}
}
ts.getTransformFlagsSubtreeExclusions = getTransformFlagsSubtreeExclusions;
function setParentPointers(parent, child) {
child.parent = parent;
ts.forEachChild(child, function (childsChild) { return setParentPointers(child, childsChild); });
}
})(ts || (ts = {}));
var ts;
(function (ts) {
Expand Down Expand Up @@ -23826,8 +23831,9 @@ var ts;
error(errorLocation, ts.Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor, ts.declarationNameToString(propertyName), typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg));
return undefined;
}
if (meaning & 2 ||
((meaning & 32 || meaning & 384) && (meaning & 107455) === 107455)) {
if (errorLocation &&
(meaning & 2 ||
((meaning & 32 || meaning & 384) && (meaning & 107455) === 107455))) {
var exportOrLocalSymbol = getExportSymbolOfValueSymbolIfExported(result);
if (exportOrLocalSymbol.flags & 2 || exportOrLocalSymbol.flags & 32 || exportOrLocalSymbol.flags & 384) {
checkResolvedBlockScopedVariable(exportOrLocalSymbol, errorLocation);
Expand Down Expand Up @@ -57028,6 +57034,9 @@ var ts;
if (!ts.arrayIsEqualTo(oldSourceFile.moduleAugmentations, newSourceFile.moduleAugmentations, moduleNameIsEqualTo)) {
oldProgram.structureIsReused = 1;
}
if ((oldSourceFile.flags & 524288) !== (newSourceFile.flags & 524288)) {
oldProgram.structureIsReused = 1;
}
if (!ts.arrayIsEqualTo(oldSourceFile.typeReferenceDirectives, newSourceFile.typeReferenceDirectives, fileReferenceIsEqualTo)) {
oldProgram.structureIsReused = 1;
}
Expand Down
51 changes: 30 additions & 21 deletions lib/tsserverlibrary.js
Original file line number Diff line number Diff line change
Expand Up @@ -18788,7 +18788,7 @@ var ts;
}
function parseLeftHandSideExpressionOrHigher() {
var expression;
if (token() === 91) {
if (token() === 91 && lookAhead(nextTokenIsOpenParenOrLessThan)) {
sourceFile.flags |= 524288;
expression = parseTokenNode();
}
Expand Down Expand Up @@ -22059,7 +22059,20 @@ var ts;
ts.forEachChild(node, bind, bindEach);
}
function bindChildrenWorker(node) {
ts.forEach(node.jsDoc, bind);
if (node.jsDoc) {
if (ts.isInJavaScriptFile(node)) {
for (var _i = 0, _a = node.jsDoc; _i < _a.length; _i++) {
var j = _a[_i];
bind(j);
}
}
else {
for (var _b = 0, _c = node.jsDoc; _b < _c.length; _b++) {
var j = _c[_b];
setParentPointers(node, j);
}
}
}
if (checkUnreachable(node)) {
bindEachChild(node);
return;
Expand Down Expand Up @@ -23109,7 +23122,8 @@ var ts;
}
node.parent = parent;
var saveInStrictMode = inStrictMode;
bindJSDocTypedefTagIfAny(node);
if (ts.isInJavaScriptFile(node))
bindJSDocTypedefTagIfAny(node);
bindWorker(node);
if (node.kind > 142) {
var saveParent = parent;
Expand Down Expand Up @@ -23169,7 +23183,7 @@ var ts;
function bindWorker(node) {
switch (node.kind) {
case 71:
if (ts.isInJavaScriptFile(node) && node.isInJSDocNamespace) {
if (node.isInJSDocNamespace) {
var parentNode = node.parent;
while (parentNode && parentNode.kind !== 291) {
parentNode = parentNode.parent;
Expand Down Expand Up @@ -23229,10 +23243,7 @@ var ts;
case 158:
return checkTypePredicate(node);
case 145:
if (node.parent.kind !== 290 || ts.isInJavaScriptFile(node)) {
return declareSymbolAndAddToSymbolTable(node, 262144, 530920);
}
return;
return declareSymbolAndAddToSymbolTable(node, 262144, 530920);
case 146:
return bindParameter(node);
case 226:
Expand Down Expand Up @@ -23303,10 +23314,7 @@ var ts;
case 232:
return bindEnumDeclaration(node);
case 233:
if (node.parent.kind !== 291 || ts.isInJavaScriptFile(node)) {
return bindModuleDeclaration(node);
}
return undefined;
return bindModuleDeclaration(node);
case 254:
return bindJsxAttributes(node);
case 253:
Expand All @@ -23333,13 +23341,6 @@ var ts;
}
case 234:
return updateStrictModeStatementList(node.statements);
default:
if (ts.isInJavaScriptFile(node))
return bindJSDocWorker(node);
}
}
function bindJSDocWorker(node) {
switch (node.kind) {
case 276:
return bindPropertyWorker(node);
case 292:
Expand Down Expand Up @@ -24325,6 +24326,10 @@ var ts;
}
}
ts.getTransformFlagsSubtreeExclusions = getTransformFlagsSubtreeExclusions;
function setParentPointers(parent, child) {
child.parent = parent;
ts.forEachChild(child, function (childsChild) { return setParentPointers(child, childsChild); });
}
})(ts || (ts = {}));
var ts;
(function (ts) {
Expand Down Expand Up @@ -25223,8 +25228,9 @@ var ts;
error(errorLocation, ts.Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor, ts.declarationNameToString(propertyName), typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg));
return undefined;
}
if (meaning & 2 ||
((meaning & 32 || meaning & 384) && (meaning & 107455) === 107455)) {
if (errorLocation &&
(meaning & 2 ||
((meaning & 32 || meaning & 384) && (meaning & 107455) === 107455))) {
var exportOrLocalSymbol = getExportSymbolOfValueSymbolIfExported(result);
if (exportOrLocalSymbol.flags & 2 || exportOrLocalSymbol.flags & 32 || exportOrLocalSymbol.flags & 384) {
checkResolvedBlockScopedVariable(exportOrLocalSymbol, errorLocation);
Expand Down Expand Up @@ -58425,6 +58431,9 @@ var ts;
if (!ts.arrayIsEqualTo(oldSourceFile.moduleAugmentations, newSourceFile.moduleAugmentations, moduleNameIsEqualTo)) {
oldProgram.structureIsReused = 1;
}
if ((oldSourceFile.flags & 524288) !== (newSourceFile.flags & 524288)) {
oldProgram.structureIsReused = 1;
}
if (!ts.arrayIsEqualTo(oldSourceFile.typeReferenceDirectives, newSourceFile.typeReferenceDirectives, fileReferenceIsEqualTo)) {
oldProgram.structureIsReused = 1;
}
Expand Down
Loading

0 comments on commit 8b2fe13

Please sign in to comment.