Update LKG

This commit is contained in:
Mohamed Hegazy 2016-12-14 14:08:09 -08:00
parent a32e91769c
commit 9971b486d0
5 changed files with 37 additions and 31 deletions

View File

@ -19824,9 +19824,7 @@ var ts;
(target.valueDeclaration.kind === 230 && source.valueDeclaration.kind !== 230))) {
target.valueDeclaration = source.valueDeclaration;
}
ts.forEach(source.declarations, function (node) {
target.declarations.push(node);
});
ts.addRange(target.declarations, source.declarations);
if (source.members) {
if (!target.members)
target.members = ts.createMap();
@ -20286,7 +20284,7 @@ var ts;
}
}
function getDeclarationOfAliasSymbol(symbol) {
return ts.forEach(symbol.declarations, function (d) { return ts.isAliasSymbolDeclaration(d) ? d : undefined; });
return ts.find(symbol.declarations, ts.isAliasSymbolDeclaration);
}
function getTargetOfImportEqualsDeclaration(node) {
if (node.moduleReference.kind === 245) {
@ -40574,7 +40572,9 @@ var ts;
superCallExpression = ts.setOriginalNode(saveStateAndInvoke(superCall, visitImmediateSuperCallInBody), superCall);
}
}
if (superCallExpression && statementOffset === ctorStatements.length - 1) {
if (superCallExpression
&& statementOffset === ctorStatements.length - 1
&& !(ctor.transformFlags & (16384 | 32768))) {
var returnStatement = ts.createReturn(superCallExpression);
if (superCallExpression.kind !== 192
|| superCallExpression.left.kind !== 179) {

View File

@ -21332,9 +21332,7 @@ var ts;
(target.valueDeclaration.kind === 230 && source.valueDeclaration.kind !== 230))) {
target.valueDeclaration = source.valueDeclaration;
}
ts.forEach(source.declarations, function (node) {
target.declarations.push(node);
});
ts.addRange(target.declarations, source.declarations);
if (source.members) {
if (!target.members)
target.members = ts.createMap();
@ -21794,7 +21792,7 @@ var ts;
}
}
function getDeclarationOfAliasSymbol(symbol) {
return ts.forEach(symbol.declarations, function (d) { return ts.isAliasSymbolDeclaration(d) ? d : undefined; });
return ts.find(symbol.declarations, ts.isAliasSymbolDeclaration);
}
function getTargetOfImportEqualsDeclaration(node) {
if (node.moduleReference.kind === 245) {
@ -42082,7 +42080,9 @@ var ts;
superCallExpression = ts.setOriginalNode(saveStateAndInvoke(superCall, visitImmediateSuperCallInBody), superCall);
}
}
if (superCallExpression && statementOffset === ctorStatements.length - 1) {
if (superCallExpression
&& statementOffset === ctorStatements.length - 1
&& !(ctor.transformFlags & (16384 | 32768))) {
var returnStatement = ts.createReturn(superCallExpression);
if (superCallExpression.kind !== 192
|| superCallExpression.left.kind !== 179) {
@ -57649,6 +57649,7 @@ var ts;
"lends",
"link",
"memberOf",
"method",
"name",
"namespace",
"param",
@ -63224,8 +63225,8 @@ var ts;
else {
declarations.push(functionDeclaration);
}
ts.forEachChild(node, visit);
}
ts.forEachChild(node, visit);
break;
case 226:
case 197:

View File

@ -21332,9 +21332,7 @@ var ts;
(target.valueDeclaration.kind === 230 && source.valueDeclaration.kind !== 230))) {
target.valueDeclaration = source.valueDeclaration;
}
ts.forEach(source.declarations, function (node) {
target.declarations.push(node);
});
ts.addRange(target.declarations, source.declarations);
if (source.members) {
if (!target.members)
target.members = ts.createMap();
@ -21794,7 +21792,7 @@ var ts;
}
}
function getDeclarationOfAliasSymbol(symbol) {
return ts.forEach(symbol.declarations, function (d) { return ts.isAliasSymbolDeclaration(d) ? d : undefined; });
return ts.find(symbol.declarations, ts.isAliasSymbolDeclaration);
}
function getTargetOfImportEqualsDeclaration(node) {
if (node.moduleReference.kind === 245) {
@ -42082,7 +42080,9 @@ var ts;
superCallExpression = ts.setOriginalNode(saveStateAndInvoke(superCall, visitImmediateSuperCallInBody), superCall);
}
}
if (superCallExpression && statementOffset === ctorStatements.length - 1) {
if (superCallExpression
&& statementOffset === ctorStatements.length - 1
&& !(ctor.transformFlags & (16384 | 32768))) {
var returnStatement = ts.createReturn(superCallExpression);
if (superCallExpression.kind !== 192
|| superCallExpression.left.kind !== 179) {
@ -57649,6 +57649,7 @@ var ts;
"lends",
"link",
"memberOf",
"method",
"name",
"namespace",
"param",
@ -63224,8 +63225,8 @@ var ts;
else {
declarations.push(functionDeclaration);
}
ts.forEachChild(node, visit);
}
ts.forEachChild(node, visit);
break;
case 226:
case 197:

View File

@ -24506,9 +24506,7 @@ var ts;
// other kinds of value declarations take precedence over modules
target.valueDeclaration = source.valueDeclaration;
}
ts.forEach(source.declarations, function (node) {
target.declarations.push(node);
});
ts.addRange(target.declarations, source.declarations);
if (source.members) {
if (!target.members)
target.members = ts.createMap();
@ -25082,7 +25080,7 @@ var ts;
}
}
function getDeclarationOfAliasSymbol(symbol) {
return ts.forEach(symbol.declarations, function (d) { return ts.isAliasSymbolDeclaration(d) ? d : undefined; });
return ts.find(symbol.declarations, ts.isAliasSymbolDeclaration);
}
function getTargetOfImportEqualsDeclaration(node) {
if (node.moduleReference.kind === 245 /* ExternalModuleReference */) {
@ -49973,8 +49971,11 @@ var ts;
superCallExpression = ts.setOriginalNode(saveStateAndInvoke(superCall, visitImmediateSuperCallInBody), superCall);
}
}
// Return the result if we have an immediate super() call on the last statement.
if (superCallExpression && statementOffset === ctorStatements.length - 1) {
// Return the result if we have an immediate super() call on the last statement,
// but only if the constructor itself doesn't use 'this' elsewhere.
if (superCallExpression
&& statementOffset === ctorStatements.length - 1
&& !(ctor.transformFlags & (16384 /* ContainsLexicalThis */ | 32768 /* ContainsCapturedLexicalThis */))) {
var returnStatement = ts.createReturn(superCallExpression);
if (superCallExpression.kind !== 192 /* BinaryExpression */
|| superCallExpression.left.kind !== 179 /* CallExpression */) {
@ -70988,6 +70989,7 @@ var ts;
"lends",
"link",
"memberOf",
"method",
"name",
"namespace",
"param",
@ -78581,8 +78583,8 @@ var ts;
else {
declarations.push(functionDeclaration);
}
ts.forEachChild(node, visit);
}
ts.forEachChild(node, visit);
break;
case 226 /* ClassDeclaration */:
case 197 /* ClassExpression */:

View File

@ -24506,9 +24506,7 @@ var ts;
// other kinds of value declarations take precedence over modules
target.valueDeclaration = source.valueDeclaration;
}
ts.forEach(source.declarations, function (node) {
target.declarations.push(node);
});
ts.addRange(target.declarations, source.declarations);
if (source.members) {
if (!target.members)
target.members = ts.createMap();
@ -25082,7 +25080,7 @@ var ts;
}
}
function getDeclarationOfAliasSymbol(symbol) {
return ts.forEach(symbol.declarations, function (d) { return ts.isAliasSymbolDeclaration(d) ? d : undefined; });
return ts.find(symbol.declarations, ts.isAliasSymbolDeclaration);
}
function getTargetOfImportEqualsDeclaration(node) {
if (node.moduleReference.kind === 245 /* ExternalModuleReference */) {
@ -49973,8 +49971,11 @@ var ts;
superCallExpression = ts.setOriginalNode(saveStateAndInvoke(superCall, visitImmediateSuperCallInBody), superCall);
}
}
// Return the result if we have an immediate super() call on the last statement.
if (superCallExpression && statementOffset === ctorStatements.length - 1) {
// Return the result if we have an immediate super() call on the last statement,
// but only if the constructor itself doesn't use 'this' elsewhere.
if (superCallExpression
&& statementOffset === ctorStatements.length - 1
&& !(ctor.transformFlags & (16384 /* ContainsLexicalThis */ | 32768 /* ContainsCapturedLexicalThis */))) {
var returnStatement = ts.createReturn(superCallExpression);
if (superCallExpression.kind !== 192 /* BinaryExpression */
|| superCallExpression.left.kind !== 179 /* CallExpression */) {
@ -70988,6 +70989,7 @@ var ts;
"lends",
"link",
"memberOf",
"method",
"name",
"namespace",
"param",
@ -78581,8 +78583,8 @@ var ts;
else {
declarations.push(functionDeclaration);
}
ts.forEachChild(node, visit);
}
ts.forEachChild(node, visit);
break;
case 226 /* ClassDeclaration */:
case 197 /* ClassExpression */: