From 8434fdef2d83d4c51ec31de842ba385c2597ccb1 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Mon, 5 Dec 2016 12:30:14 -0800 Subject: [PATCH 1/2] Improve SourceMap emit for down-level async functions --- src/compiler/emitter.ts | 40 ++++++--- src/compiler/transformers/generators.ts | 114 +++++++++++++++--------- 2 files changed, 96 insertions(+), 58 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 90738d828be..2f19c9b3d32 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -1305,28 +1305,28 @@ namespace ts { writeToken(SyntaxKind.OpenParenToken, openParenPos, node); emitExpression(node.expression); writeToken(SyntaxKind.CloseParenToken, node.expression.end, node); - emitEmbeddedStatement(node.thenStatement); + emitEmbeddedStatement(node, node.thenStatement); if (node.elseStatement) { - writeLine(); + writeLineOrSpace(node); writeToken(SyntaxKind.ElseKeyword, node.thenStatement.end, node); if (node.elseStatement.kind === SyntaxKind.IfStatement) { write(" "); emit(node.elseStatement); } else { - emitEmbeddedStatement(node.elseStatement); + emitEmbeddedStatement(node, node.elseStatement); } } } function emitDoStatement(node: DoStatement) { write("do"); - emitEmbeddedStatement(node.statement); + emitEmbeddedStatement(node, node.statement); if (isBlock(node.statement)) { write(" "); } else { - writeLine(); + writeLineOrSpace(node); } write("while ("); @@ -1338,7 +1338,7 @@ namespace ts { write("while ("); emitExpression(node.expression); write(")"); - emitEmbeddedStatement(node.statement); + emitEmbeddedStatement(node, node.statement); } function emitForStatement(node: ForStatement) { @@ -1351,7 +1351,7 @@ namespace ts { write(";"); emitExpressionWithPrefix(" ", node.incrementor); write(")"); - emitEmbeddedStatement(node.statement); + emitEmbeddedStatement(node, node.statement); } function emitForInStatement(node: ForInStatement) { @@ -1362,7 +1362,7 @@ namespace ts { write(" in "); emitExpression(node.expression); writeToken(SyntaxKind.CloseParenToken, node.expression.end); - emitEmbeddedStatement(node.statement); + emitEmbeddedStatement(node, node.statement); } function emitForOfStatement(node: ForOfStatement) { @@ -1373,7 +1373,7 @@ namespace ts { write(" of "); emitExpression(node.expression); writeToken(SyntaxKind.CloseParenToken, node.expression.end); - emitEmbeddedStatement(node.statement); + emitEmbeddedStatement(node, node.statement); } function emitForBinding(node: VariableDeclarationList | Expression) { @@ -1409,7 +1409,7 @@ namespace ts { write("with ("); emitExpression(node.expression); write(")"); - emitEmbeddedStatement(node.statement); + emitEmbeddedStatement(node, node.statement); } function emitSwitchStatement(node: SwitchStatement) { @@ -1437,9 +1437,12 @@ namespace ts { function emitTryStatement(node: TryStatement) { write("try "); emit(node.tryBlock); - emit(node.catchClause); + if (node.catchClause) { + writeLineOrSpace(node); + emit(node.catchClause); + } if (node.finallyBlock) { - writeLine(); + writeLineOrSpace(node); write("finally "); emit(node.finallyBlock); } @@ -2125,8 +2128,8 @@ namespace ts { } } - function emitEmbeddedStatement(node: Statement) { - if (isBlock(node)) { + function emitEmbeddedStatement(parent: Node, node: Statement) { + if (isBlock(node) || getEmitFlags(parent) & EmitFlags.SingleLine) { write(" "); emit(node); } @@ -2291,6 +2294,15 @@ namespace ts { } } + function writeLineOrSpace(node: Node) { + if (getEmitFlags(node) & EmitFlags.SingleLine) { + write(" "); + } + else { + writeLine(); + } + } + function writeIfAny(nodes: NodeArray, text: string) { if (nodes && nodes.length > 0) { write(text); diff --git a/src/compiler/transformers/generators.ts b/src/compiler/transformers/generators.ts index c383902d495..1b909da4f6a 100644 --- a/src/compiler/transformers/generators.ts +++ b/src/compiler/transformers/generators.ts @@ -938,7 +938,7 @@ namespace ts { } markLabel(resumeLabel); - return createGeneratorResume(); + return createGeneratorResume(/*location*/ node); } /** @@ -1234,7 +1234,9 @@ namespace ts { function transformAndEmitVariableDeclarationList(node: VariableDeclarationList): VariableDeclarationList { for (const variable of node.declarations) { - hoistVariableDeclaration(variable.name); + const name = getSynthesizedClone(variable.name); + setCommentRange(name, variable.name); + hoistVariableDeclaration(name); } const variables = getInitializedVariables(node); @@ -1287,7 +1289,7 @@ namespace ts { if (containsYield(node.thenStatement) || containsYield(node.elseStatement)) { const endLabel = defineLabel(); const elseLabel = node.elseStatement ? defineLabel() : undefined; - emitBreakWhenFalse(node.elseStatement ? elseLabel : endLabel, visitNode(node.expression, visitor, isExpression)); + emitBreakWhenFalse(node.elseStatement ? elseLabel : endLabel, visitNode(node.expression, visitor, isExpression), /*location*/ node.expression); transformAndEmitEmbeddedStatement(node.thenStatement); if (node.elseStatement) { emitBreak(endLabel); @@ -2965,12 +2967,15 @@ namespace ts { lastOperationWasAbrupt = true; lastOperationWasCompletion = true; writeStatement( - createReturn( - createArrayLiteral(expression - ? [createInstruction(Instruction.Return), expression] - : [createInstruction(Instruction.Return)] + setEmitFlags( + createReturn( + createArrayLiteral(expression + ? [createInstruction(Instruction.Return), expression] + : [createInstruction(Instruction.Return)] + ), + operationLocation ), - operationLocation + EmitFlags.NoTokenSourceMaps ) ); } @@ -2984,12 +2989,15 @@ namespace ts { function writeBreak(label: Label, operationLocation: TextRange): void { lastOperationWasAbrupt = true; writeStatement( - createReturn( - createArrayLiteral([ - createInstruction(Instruction.Break), - createLabel(label) - ]), - operationLocation + setEmitFlags( + createReturn( + createArrayLiteral([ + createInstruction(Instruction.Break), + createLabel(label) + ]), + operationLocation + ), + EmitFlags.NoTokenSourceMaps ) ); } @@ -3003,15 +3011,21 @@ namespace ts { */ function writeBreakWhenTrue(label: Label, condition: Expression, operationLocation: TextRange): void { writeStatement( - createIf( - condition, - createReturn( - createArrayLiteral([ - createInstruction(Instruction.Break), - createLabel(label) - ]), - operationLocation - ) + setEmitFlags( + createIf( + condition, + setEmitFlags( + createReturn( + createArrayLiteral([ + createInstruction(Instruction.Break), + createLabel(label) + ]), + operationLocation + ), + EmitFlags.NoTokenSourceMaps + ) + ), + EmitFlags.SingleLine ) ); } @@ -3025,15 +3039,21 @@ namespace ts { */ function writeBreakWhenFalse(label: Label, condition: Expression, operationLocation: TextRange): void { writeStatement( - createIf( - createLogicalNot(condition), - createReturn( - createArrayLiteral([ - createInstruction(Instruction.Break), - createLabel(label) - ]), - operationLocation - ) + setEmitFlags( + createIf( + createLogicalNot(condition), + setEmitFlags( + createReturn( + createArrayLiteral([ + createInstruction(Instruction.Break), + createLabel(label) + ]), + operationLocation + ), + EmitFlags.NoTokenSourceMaps + ) + ), + EmitFlags.SingleLine ) ); } @@ -3047,13 +3067,16 @@ namespace ts { function writeYield(expression: Expression, operationLocation: TextRange): void { lastOperationWasAbrupt = true; writeStatement( - createReturn( - createArrayLiteral( - expression - ? [createInstruction(Instruction.Yield), expression] - : [createInstruction(Instruction.Yield)] + setEmitFlags( + createReturn( + createArrayLiteral( + expression + ? [createInstruction(Instruction.Yield), expression] + : [createInstruction(Instruction.Yield)] + ), + operationLocation ), - operationLocation + EmitFlags.NoTokenSourceMaps ) ); } @@ -3067,12 +3090,15 @@ namespace ts { function writeYieldStar(expression: Expression, operationLocation: TextRange): void { lastOperationWasAbrupt = true; writeStatement( - createReturn( - createArrayLiteral([ - createInstruction(Instruction.YieldStar), - expression - ]), - operationLocation + setEmitFlags( + createReturn( + createArrayLiteral([ + createInstruction(Instruction.YieldStar), + expression + ]), + operationLocation + ), + EmitFlags.NoTokenSourceMaps ) ); } From b195ef8ec57ec8ebd9611df2626854fdd4b77a8d Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Mon, 5 Dec 2016 13:13:50 -0800 Subject: [PATCH 2/2] Updated baselines --- .../asyncAwaitWithCapturedBlockScopeVar.js | 12 ++-- .../es5-asyncFunctionBinaryExpressions.js | 3 +- .../es5-asyncFunctionConditionals.js | 6 +- .../es5-asyncFunctionDoStatements.js | 42 +++++--------- .../es5-asyncFunctionForInStatements.js | 21 +++---- .../es5-asyncFunctionForOfStatements.js | 57 +++++++------------ .../es5-asyncFunctionForStatements.js | 12 ++-- .../es5-asyncFunctionIfStatements.js | 6 +- .../reference/es5-asyncFunctionNestedLoops.js | 3 +- .../es5-asyncFunctionWhileStatements.js | 42 +++++--------- .../reference/exportStarForValues10.js | 3 +- .../reference/generatorTransformFinalLabel.js | 3 +- .../sourceMapValidationStatements.js.map | 2 +- ...ourceMapValidationStatements.sourcemap.txt | 12 ++-- .../sourceMapValidationTryCatchFinally.js.map | 2 +- ...MapValidationTryCatchFinally.sourcemap.txt | 14 ++--- tests/baselines/reference/systemModule11.js | 12 ++-- tests/baselines/reference/systemModule16.js | 3 +- tests/baselines/reference/systemModule9.js | 3 +- 19 files changed, 91 insertions(+), 167 deletions(-) diff --git a/tests/baselines/reference/asyncAwaitWithCapturedBlockScopeVar.js b/tests/baselines/reference/asyncAwaitWithCapturedBlockScopeVar.js index 49566904ae1..6d167a00089 100644 --- a/tests/baselines/reference/asyncAwaitWithCapturedBlockScopeVar.js +++ b/tests/baselines/reference/asyncAwaitWithCapturedBlockScopeVar.js @@ -57,8 +57,7 @@ function fn1() { i = 0; _a.label = 1; case 1: - if (!(i < 1)) - return [3 /*break*/, 4]; + if (!(i < 1)) return [3 /*break*/, 4]; return [5 /*yield**/, _loop_1(i)]; case 2: _a.sent(); @@ -92,8 +91,7 @@ function fn2() { i = 0; _a.label = 1; case 1: - if (!(i < 1)) - return [3 /*break*/, 4]; + if (!(i < 1)) return [3 /*break*/, 4]; return [5 /*yield**/, _loop_2(i)]; case 2: state_1 = _a.sent(); @@ -129,8 +127,7 @@ function fn3() { i = 0; _a.label = 1; case 1: - if (!(i < 1)) - return [3 /*break*/, 4]; + if (!(i < 1)) return [3 /*break*/, 4]; return [5 /*yield**/, _loop_3(i)]; case 2: _a.sent(); @@ -164,8 +161,7 @@ function fn4() { i = 0; _a.label = 1; case 1: - if (!(i < 1)) - return [3 /*break*/, 4]; + if (!(i < 1)) return [3 /*break*/, 4]; return [5 /*yield**/, _loop_4(i)]; case 2: state_2 = _a.sent(); diff --git a/tests/baselines/reference/es5-asyncFunctionBinaryExpressions.js b/tests/baselines/reference/es5-asyncFunctionBinaryExpressions.js index a7aff630256..23a79cef343 100644 --- a/tests/baselines/reference/es5-asyncFunctionBinaryExpressions.js +++ b/tests/baselines/reference/es5-asyncFunctionBinaryExpressions.js @@ -169,8 +169,7 @@ function binaryLogicalAnd1() { switch (_b.label) { case 0: _a = x; - if (!_a) - return [3 /*break*/, 2]; + if (!_a) return [3 /*break*/, 2]; return [4 /*yield*/, y]; case 1: _a = (_b.sent()); diff --git a/tests/baselines/reference/es5-asyncFunctionConditionals.js b/tests/baselines/reference/es5-asyncFunctionConditionals.js index b42b0c07b0a..e9fc995fc2d 100644 --- a/tests/baselines/reference/es5-asyncFunctionConditionals.js +++ b/tests/baselines/reference/es5-asyncFunctionConditionals.js @@ -32,8 +32,7 @@ function conditional1() { return __generator(this, function (_b) { switch (_b.label) { case 0: - if (!x) - return [3 /*break*/, 2]; + if (!x) return [3 /*break*/, 2]; return [4 /*yield*/, y]; case 1: _a = _b.sent(); @@ -54,8 +53,7 @@ function conditional2() { return __generator(this, function (_b) { switch (_b.label) { case 0: - if (!x) - return [3 /*break*/, 1]; + if (!x) return [3 /*break*/, 1]; _a = y; return [3 /*break*/, 3]; case 1: return [4 /*yield*/, z]; diff --git a/tests/baselines/reference/es5-asyncFunctionDoStatements.js b/tests/baselines/reference/es5-asyncFunctionDoStatements.js index 7151446dddf..32a7e9b0435 100644 --- a/tests/baselines/reference/es5-asyncFunctionDoStatements.js +++ b/tests/baselines/reference/es5-asyncFunctionDoStatements.js @@ -97,8 +97,7 @@ function doStatement1() { _a.sent(); _a.label = 2; case 2: - if (y) - return [3 /*break*/, 0]; + if (y) return [3 /*break*/, 0]; _a.label = 3; case 3: return [2 /*return*/]; } @@ -114,8 +113,7 @@ function doStatement2() { _a.label = 1; case 1: return [4 /*yield*/, y]; case 2: - if (_a.sent()) - return [3 /*break*/, 0]; + if (_a.sent()) return [3 /*break*/, 0]; _a.label = 3; case 3: return [2 /*return*/]; } @@ -141,8 +139,7 @@ function doStatement4() { _a.sent(); return [3 /*break*/, 2]; case 2: - if (y) - return [3 /*break*/, 0]; + if (y) return [3 /*break*/, 0]; _a.label = 3; case 3: return [2 /*return*/]; } @@ -161,8 +158,7 @@ function doStatement5() { _a.sent(); _a.label = 2; case 2: - if (y) - return [3 /*break*/, 0]; + if (y) return [3 /*break*/, 0]; _a.label = 3; case 3: return [2 /*return*/]; } @@ -176,8 +172,7 @@ function doStatement6() { case 0: return [3 /*break*/, 1]; case 1: return [4 /*yield*/, y]; case 2: - if (_a.sent()) - return [3 /*break*/, 0]; + if (_a.sent()) return [3 /*break*/, 0]; _a.label = 3; case 3: return [2 /*return*/]; } @@ -203,8 +198,7 @@ function doStatement8() { _a.sent(); return [3 /*break*/, 2]; case 2: - if (y) - return [3 /*break*/, 0]; + if (y) return [3 /*break*/, 0]; _a.label = 3; case 3: return [2 /*return*/]; } @@ -223,8 +217,7 @@ function doStatement9() { _a.sent(); _a.label = 2; case 2: - if (y) - return [3 /*break*/, 0]; + if (y) return [3 /*break*/, 0]; _a.label = 3; case 3: return [2 /*return*/]; } @@ -238,8 +231,7 @@ function doStatement10() { case 0: return [3 /*break*/, 1]; case 1: return [4 /*yield*/, y]; case 2: - if (_a.sent()) - return [3 /*break*/, 0]; + if (_a.sent()) return [3 /*break*/, 0]; _a.label = 3; case 3: return [2 /*return*/]; } @@ -265,8 +257,7 @@ function doStatement12() { _a.sent(); return [3 /*break*/, 3]; case 2: - if (y) - return [3 /*break*/, 0]; + if (y) return [3 /*break*/, 0]; _a.label = 3; case 3: return [2 /*return*/]; } @@ -285,8 +276,7 @@ function doStatement13() { _a.sent(); _a.label = 2; case 2: - if (y) - return [3 /*break*/, 0]; + if (y) return [3 /*break*/, 0]; _a.label = 3; case 3: return [2 /*return*/]; } @@ -300,8 +290,7 @@ function doStatement14() { case 0: return [3 /*break*/, 3]; case 1: return [4 /*yield*/, y]; case 2: - if (_a.sent()) - return [3 /*break*/, 0]; + if (_a.sent()) return [3 /*break*/, 0]; _a.label = 3; case 3: return [2 /*return*/]; } @@ -327,8 +316,7 @@ function doStatement16() { _a.sent(); return [3 /*break*/, 3]; case 2: - if (y) - return [3 /*break*/, 0]; + if (y) return [3 /*break*/, 0]; _a.label = 3; case 3: return [2 /*return*/]; } @@ -347,8 +335,7 @@ function doStatement17() { _a.sent(); _a.label = 2; case 2: - if (y) - return [3 /*break*/, 0]; + if (y) return [3 /*break*/, 0]; _a.label = 3; case 3: return [2 /*return*/]; } @@ -362,8 +349,7 @@ function doStatement18() { case 0: return [3 /*break*/, 3]; case 1: return [4 /*yield*/, y]; case 2: - if (_a.sent()) - return [3 /*break*/, 0]; + if (_a.sent()) return [3 /*break*/, 0]; _a.label = 3; case 3: return [2 /*return*/]; } diff --git a/tests/baselines/reference/es5-asyncFunctionForInStatements.js b/tests/baselines/reference/es5-asyncFunctionForInStatements.js index 30946fca56d..ec6bfbb97e1 100644 --- a/tests/baselines/reference/es5-asyncFunctionForInStatements.js +++ b/tests/baselines/reference/es5-asyncFunctionForInStatements.js @@ -62,8 +62,7 @@ function forInStatement1() { _i = 0; _c.label = 2; case 2: - if (!(_i < _a.length)) - return [3 /*break*/, 4]; + if (!(_i < _a.length)) return [3 /*break*/, 4]; x = _a[_i]; z; _c.label = 3; @@ -87,8 +86,7 @@ function forInStatement2() { _i = 0; _c.label = 1; case 1: - if (!(_i < _a.length)) - return [3 /*break*/, 4]; + if (!(_i < _a.length)) return [3 /*break*/, 4]; x = _a[_i]; return [4 /*yield*/, z]; case 2: @@ -114,8 +112,7 @@ function forInStatement3() { _i = 0; _c.label = 1; case 1: - if (!(_i < _a.length)) - return [3 /*break*/, 4]; + if (!(_i < _a.length)) return [3 /*break*/, 4]; return [4 /*yield*/, x]; case 2: (_c.sent()).a = _a[_i]; @@ -143,8 +140,7 @@ function forInStatement4() { _i = 0; _c.label = 2; case 2: - if (!(_i < _a.length)) - return [3 /*break*/, 4]; + if (!(_i < _a.length)) return [3 /*break*/, 4]; x.a = _a[_i]; z; _c.label = 3; @@ -168,8 +164,7 @@ function forInStatement5() { _i = 0; _c.label = 1; case 1: - if (!(_i < _a.length)) - return [3 /*break*/, 4]; + if (!(_i < _a.length)) return [3 /*break*/, 4]; x.a = _a[_i]; return [4 /*yield*/, z]; case 2: @@ -208,8 +203,7 @@ function forInStatement7() { _i = 0; _c.label = 2; case 2: - if (!(_i < _a.length)) - return [3 /*break*/, 4]; + if (!(_i < _a.length)) return [3 /*break*/, 4]; b = _a[_i]; z; _c.label = 3; @@ -233,8 +227,7 @@ function forInStatement8() { _i = 0; _c.label = 1; case 1: - if (!(_i < _a.length)) - return [3 /*break*/, 4]; + if (!(_i < _a.length)) return [3 /*break*/, 4]; c = _a[_i]; return [4 /*yield*/, z]; case 2: diff --git a/tests/baselines/reference/es5-asyncFunctionForOfStatements.js b/tests/baselines/reference/es5-asyncFunctionForOfStatements.js index e12f1e18d44..9cf1d0098b2 100644 --- a/tests/baselines/reference/es5-asyncFunctionForOfStatements.js +++ b/tests/baselines/reference/es5-asyncFunctionForOfStatements.js @@ -102,8 +102,7 @@ function forOfStatement1() { _a = _b.sent(); _b.label = 2; case 2: - if (!(_i < _a.length)) - return [3 /*break*/, 4]; + if (!(_i < _a.length)) return [3 /*break*/, 4]; x = _a[_i]; z; _b.label = 3; @@ -124,8 +123,7 @@ function forOfStatement2() { _i = 0, y_2 = y; _a.label = 1; case 1: - if (!(_i < y_2.length)) - return [3 /*break*/, 4]; + if (!(_i < y_2.length)) return [3 /*break*/, 4]; x = y_2[_i]; return [4 /*yield*/, z]; case 2: @@ -148,8 +146,7 @@ function forOfStatement3() { _i = 0, y_3 = y; _a.label = 1; case 1: - if (!(_i < y_3.length)) - return [3 /*break*/, 4]; + if (!(_i < y_3.length)) return [3 /*break*/, 4]; return [4 /*yield*/, x]; case 2: (_a.sent()).a = y_3[_i]; @@ -175,8 +172,7 @@ function forOfStatement4() { _a = _b.sent(); _b.label = 2; case 2: - if (!(_i < _a.length)) - return [3 /*break*/, 4]; + if (!(_i < _a.length)) return [3 /*break*/, 4]; x.a = _a[_i]; z; _b.label = 3; @@ -197,8 +193,7 @@ function forOfStatement5() { _i = 0, y_4 = y; _a.label = 1; case 1: - if (!(_i < y_4.length)) - return [3 /*break*/, 4]; + if (!(_i < y_4.length)) return [3 /*break*/, 4]; x.a = y_4[_i]; return [4 /*yield*/, z]; case 2: @@ -236,8 +231,7 @@ function forOfStatement7() { _a = _b.sent(); _b.label = 2; case 2: - if (!(_i < _a.length)) - return [3 /*break*/, 4]; + if (!(_i < _a.length)) return [3 /*break*/, 4]; c = _a[_i]; z; _b.label = 3; @@ -258,8 +252,7 @@ function forOfStatement8() { _i = 0, y_6 = y; _a.label = 1; case 1: - if (!(_i < y_6.length)) - return [3 /*break*/, 4]; + if (!(_i < y_6.length)) return [3 /*break*/, 4]; d = y_6[_i]; return [4 /*yield*/, z]; case 2: @@ -285,8 +278,7 @@ function forOfStatement9() { _a = _b.sent(); _b.label = 2; case 2: - if (!(_i < _a.length)) - return [3 /*break*/, 4]; + if (!(_i < _a.length)) return [3 /*break*/, 4]; x = _a[_i][0]; z; _b.label = 3; @@ -307,8 +299,7 @@ function forOfStatement10() { _i = 0, y_7 = y; _a.label = 1; case 1: - if (!(_i < y_7.length)) - return [3 /*break*/, 4]; + if (!(_i < y_7.length)) return [3 /*break*/, 4]; x = y_7[_i][0]; return [4 /*yield*/, z]; case 2: @@ -331,11 +322,9 @@ function forOfStatement11() { _i = 0, y_8 = y; _c.label = 1; case 1: - if (!(_i < y_8.length)) - return [3 /*break*/, 6]; + if (!(_i < y_8.length)) return [3 /*break*/, 6]; _b = y_8[_i][0]; - if (!(_b === void 0)) - return [3 /*break*/, 3]; + if (!(_b === void 0)) return [3 /*break*/, 3]; return [4 /*yield*/, a]; case 2: _a = _c.sent(); @@ -367,8 +356,7 @@ function forOfStatement12() { _a = _c.sent(); _c.label = 2; case 2: - if (!(_i < _a.length)) - return [3 /*break*/, 4]; + if (!(_i < _a.length)) return [3 /*break*/, 4]; _b = _a[_i][0], x = _b === void 0 ? a : _b; z; _c.label = 3; @@ -389,8 +377,7 @@ function forOfStatement13() { _i = 0, y_9 = y; _b.label = 1; case 1: - if (!(_i < y_9.length)) - return [3 /*break*/, 4]; + if (!(_i < y_9.length)) return [3 /*break*/, 4]; _a = y_9[_i][0], x = _a === void 0 ? a : _a; return [4 /*yield*/, z]; case 2: @@ -416,8 +403,7 @@ function forOfStatement14() { _a = _b.sent(); _b.label = 2; case 2: - if (!(_i < _a.length)) - return [3 /*break*/, 4]; + if (!(_i < _a.length)) return [3 /*break*/, 4]; x = _a[_i].x; z; _b.label = 3; @@ -438,8 +424,7 @@ function forOfStatement15() { _i = 0, y_10 = y; _a.label = 1; case 1: - if (!(_i < y_10.length)) - return [3 /*break*/, 4]; + if (!(_i < y_10.length)) return [3 /*break*/, 4]; x = y_10[_i].x; return [4 /*yield*/, z]; case 2: @@ -462,11 +447,9 @@ function forOfStatement16() { _i = 0, y_11 = y; _c.label = 1; case 1: - if (!(_i < y_11.length)) - return [3 /*break*/, 6]; + if (!(_i < y_11.length)) return [3 /*break*/, 6]; _b = y_11[_i].x; - if (!(_b === void 0)) - return [3 /*break*/, 3]; + if (!(_b === void 0)) return [3 /*break*/, 3]; return [4 /*yield*/, a]; case 2: _a = _c.sent(); @@ -498,8 +481,7 @@ function forOfStatement17() { _a = _c.sent(); _c.label = 2; case 2: - if (!(_i < _a.length)) - return [3 /*break*/, 4]; + if (!(_i < _a.length)) return [3 /*break*/, 4]; _b = _a[_i].x, x = _b === void 0 ? a : _b; z; _c.label = 3; @@ -520,8 +502,7 @@ function forOfStatement18() { _i = 0, y_12 = y; _b.label = 1; case 1: - if (!(_i < y_12.length)) - return [3 /*break*/, 4]; + if (!(_i < y_12.length)) return [3 /*break*/, 4]; _a = y_12[_i].x, x = _a === void 0 ? a : _a; return [4 /*yield*/, z]; case 2: diff --git a/tests/baselines/reference/es5-asyncFunctionForStatements.js b/tests/baselines/reference/es5-asyncFunctionForStatements.js index e02d20c7864..aad8a1f46ef 100644 --- a/tests/baselines/reference/es5-asyncFunctionForStatements.js +++ b/tests/baselines/reference/es5-asyncFunctionForStatements.js @@ -49,8 +49,7 @@ function forStatement1() { _a.sent(); _a.label = 2; case 2: - if (!y) - return [3 /*break*/, 4]; + if (!y) return [3 /*break*/, 4]; a; _a.label = 3; case 3: @@ -70,8 +69,7 @@ function forStatement2() { _a.label = 1; case 1: return [4 /*yield*/, y]; case 2: - if (!_a.sent()) - return [3 /*break*/, 4]; + if (!_a.sent()) return [3 /*break*/, 4]; a; _a.label = 3; case 3: @@ -90,8 +88,7 @@ function forStatement3() { x; _a.label = 1; case 1: - if (!y) - return [3 /*break*/, 4]; + if (!y) return [3 /*break*/, 4]; a; _a.label = 2; case 2: return [4 /*yield*/, z]; @@ -111,8 +108,7 @@ function forStatement4() { x; _a.label = 1; case 1: - if (!y) - return [3 /*break*/, 4]; + if (!y) return [3 /*break*/, 4]; return [4 /*yield*/, a]; case 2: _a.sent(); diff --git a/tests/baselines/reference/es5-asyncFunctionIfStatements.js b/tests/baselines/reference/es5-asyncFunctionIfStatements.js index 7ac35c995e7..39fc2ade726 100644 --- a/tests/baselines/reference/es5-asyncFunctionIfStatements.js +++ b/tests/baselines/reference/es5-asyncFunctionIfStatements.js @@ -36,8 +36,7 @@ function ifStatement2() { return __generator(this, function (_a) { switch (_a.label) { case 0: - if (!x) - return [3 /*break*/, 2]; + if (!x) return [3 /*break*/, 2]; return [4 /*yield*/, y]; case 1: _a.sent(); @@ -55,8 +54,7 @@ function ifStatement3() { return __generator(this, function (_a) { switch (_a.label) { case 0: - if (!x) - return [3 /*break*/, 1]; + if (!x) return [3 /*break*/, 1]; y; return [3 /*break*/, 3]; case 1: return [4 /*yield*/, z]; diff --git a/tests/baselines/reference/es5-asyncFunctionNestedLoops.js b/tests/baselines/reference/es5-asyncFunctionNestedLoops.js index 28ccc288b7e..36408e241a0 100644 --- a/tests/baselines/reference/es5-asyncFunctionNestedLoops.js +++ b/tests/baselines/reference/es5-asyncFunctionNestedLoops.js @@ -19,8 +19,7 @@ function nestedLoops() { return __generator(this, function (_a) { switch (_a.label) { case 0: - if (!x) - return [3 /*break*/, 2]; + if (!x) return [3 /*break*/, 2]; return [4 /*yield*/, y]; case 1: _a.sent(); diff --git a/tests/baselines/reference/es5-asyncFunctionWhileStatements.js b/tests/baselines/reference/es5-asyncFunctionWhileStatements.js index c85aabb01e3..750673fb6c4 100644 --- a/tests/baselines/reference/es5-asyncFunctionWhileStatements.js +++ b/tests/baselines/reference/es5-asyncFunctionWhileStatements.js @@ -94,8 +94,7 @@ function whileStatement1() { switch (_a.label) { case 0: return [4 /*yield*/, x]; case 1: - if (!_a.sent()) - return [3 /*break*/, 2]; + if (!_a.sent()) return [3 /*break*/, 2]; y; return [3 /*break*/, 0]; case 2: return [2 /*return*/]; @@ -108,8 +107,7 @@ function whileStatement2() { return __generator(this, function (_a) { switch (_a.label) { case 0: - if (!x) - return [3 /*break*/, 2]; + if (!x) return [3 /*break*/, 2]; return [4 /*yield*/, y]; case 1: _a.sent(); @@ -135,8 +133,7 @@ function whileStatement4() { switch (_a.label) { case 0: return [4 /*yield*/, x]; case 1: - if (!_a.sent()) - return [3 /*break*/, 2]; + if (!_a.sent()) return [3 /*break*/, 2]; return [3 /*break*/, 0]; case 2: return [2 /*return*/]; } @@ -148,8 +145,7 @@ function whileStatement5() { return __generator(this, function (_a) { switch (_a.label) { case 0: - if (!x) - return [3 /*break*/, 2]; + if (!x) return [3 /*break*/, 2]; return [4 /*yield*/, y]; case 1: _a.sent(); @@ -164,8 +160,7 @@ function whileStatement6() { return __generator(this, function (_a) { switch (_a.label) { case 0: - if (!x) - return [3 /*break*/, 2]; + if (!x) return [3 /*break*/, 2]; if (1) return [3 /*break*/, 0]; return [4 /*yield*/, y]; @@ -193,8 +188,7 @@ function whileStatement8() { switch (_a.label) { case 0: return [4 /*yield*/, x]; case 1: - if (!_a.sent()) - return [3 /*break*/, 2]; + if (!_a.sent()) return [3 /*break*/, 2]; return [3 /*break*/, 0]; case 2: return [2 /*return*/]; } @@ -206,8 +200,7 @@ function whileStatement9() { return __generator(this, function (_a) { switch (_a.label) { case 0: - if (!x) - return [3 /*break*/, 2]; + if (!x) return [3 /*break*/, 2]; return [4 /*yield*/, y]; case 1: _a.sent(); @@ -222,8 +215,7 @@ function whileStatement10() { return __generator(this, function (_a) { switch (_a.label) { case 0: - if (!x) - return [3 /*break*/, 2]; + if (!x) return [3 /*break*/, 2]; if (1) return [3 /*break*/, 0]; return [4 /*yield*/, y]; @@ -251,8 +243,7 @@ function whileStatement12() { switch (_a.label) { case 0: return [4 /*yield*/, x]; case 1: - if (!_a.sent()) - return [3 /*break*/, 2]; + if (!_a.sent()) return [3 /*break*/, 2]; return [3 /*break*/, 2]; case 2: return [2 /*return*/]; } @@ -264,8 +255,7 @@ function whileStatement13() { return __generator(this, function (_a) { switch (_a.label) { case 0: - if (!x) - return [3 /*break*/, 2]; + if (!x) return [3 /*break*/, 2]; return [4 /*yield*/, y]; case 1: _a.sent(); @@ -280,8 +270,7 @@ function whileStatement14() { return __generator(this, function (_a) { switch (_a.label) { case 0: - if (!x) - return [3 /*break*/, 2]; + if (!x) return [3 /*break*/, 2]; if (1) return [3 /*break*/, 2]; return [4 /*yield*/, y]; @@ -309,8 +298,7 @@ function whileStatement16() { switch (_a.label) { case 0: return [4 /*yield*/, x]; case 1: - if (!_a.sent()) - return [3 /*break*/, 2]; + if (!_a.sent()) return [3 /*break*/, 2]; return [3 /*break*/, 2]; case 2: return [2 /*return*/]; } @@ -322,8 +310,7 @@ function whileStatement17() { return __generator(this, function (_a) { switch (_a.label) { case 0: - if (!x) - return [3 /*break*/, 2]; + if (!x) return [3 /*break*/, 2]; return [4 /*yield*/, y]; case 1: _a.sent(); @@ -338,8 +325,7 @@ function whileStatement18() { return __generator(this, function (_a) { switch (_a.label) { case 0: - if (!x) - return [3 /*break*/, 2]; + if (!x) return [3 /*break*/, 2]; if (1) return [3 /*break*/, 2]; return [4 /*yield*/, y]; diff --git a/tests/baselines/reference/exportStarForValues10.js b/tests/baselines/reference/exportStarForValues10.js index 3da80002780..f7dd6e94ce5 100644 --- a/tests/baselines/reference/exportStarForValues10.js +++ b/tests/baselines/reference/exportStarForValues10.js @@ -42,8 +42,7 @@ System.register(["file0"], function (exports_1, context_1) { function exportStar_1(m) { var exports = {}; for (var n in m) { - if (n !== "default") - exports[n] = m[n]; + if (n !== "default") exports[n] = m[n]; } exports_1(exports); } diff --git a/tests/baselines/reference/generatorTransformFinalLabel.js b/tests/baselines/reference/generatorTransformFinalLabel.js index 32272ae0748..58cffc80bee 100644 --- a/tests/baselines/reference/generatorTransformFinalLabel.js +++ b/tests/baselines/reference/generatorTransformFinalLabel.js @@ -14,8 +14,7 @@ function test(skip) { return __generator(this, function (_a) { switch (_a.label) { case 0: - if (!!skip) - return [3 /*break*/, 2]; + if (!!skip) return [3 /*break*/, 2]; return [4 /*yield*/, 1]; case 1: _a.sent(); diff --git a/tests/baselines/reference/sourceMapValidationStatements.js.map b/tests/baselines/reference/sourceMapValidationStatements.js.map index 464ab4dc002..5841f329e5e 100644 --- a/tests/baselines/reference/sourceMapValidationStatements.js.map +++ b/tests/baselines/reference/sourceMapValidationStatements.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationStatements.js.map] -{"version":3,"file":"sourceMapValidationStatements.js","sourceRoot":"","sources":["sourceMapValidationStatements.ts"],"names":[],"mappings":"AAAA;IACI,IAAI,CAAC,CAAC;IACN,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;QAC1B,CAAC,IAAI,CAAC,CAAC;QACP,CAAC,IAAI,CAAC,CAAC;IACX,CAAC;IACD,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QACT,CAAC,IAAI,CAAC,CAAC;IACX,CAAC;IAAC,IAAI,CAAC,CAAC;QACJ,CAAC,IAAI,EAAE,CAAC;QACR,CAAC,EAAE,CAAC;IACR,CAAC;IACD,IAAI,CAAC,GAAG;QACJ,CAAC;QACD,CAAC;QACD,CAAC;KACJ,CAAC;IACF,IAAI,GAAG,GAAG;QACN,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,OAAO;KACb,CAAC;IACF,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACd,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QACb,IAAI,CAAC,GAAG,EAAE,CAAC;IACf,CAAC;IACD,IAAI,CAAC;QACD,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC;IACnB,CAAE;IAAA,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACT,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;YACb,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;QACf,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;QAClB,CAAC;IACL,CAAC;IACD,IAAI,CAAC;QACD,MAAM,IAAI,KAAK,EAAE,CAAC;IACtB,CAAE;IAAA,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACV,IAAI,CAAC,GAAG,EAAE,CAAC;IACf,CAAC;YAAS,CAAC;QACP,CAAC,GAAG,EAAE,CAAC;IACX,CAAC;IACD,MAAM,GAAG,EAAE,CAAC;QACR,CAAC,GAAG,CAAC,CAAC;QACN,CAAC,GAAG,EAAE,CAAC;IACX,CAAC;IACD,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QACZ,KAAK,CAAC,EAAE,CAAC;YACL,CAAC,EAAE,CAAC;YACJ,KAAK,CAAC;QAEV,CAAC;QACD,KAAK,CAAC,EAAE,CAAC;YACL,CAAC,EAAE,CAAC;YACJ,KAAK,CAAC;QAEV,CAAC;QACD,SAAS,CAAC;YACN,CAAC,IAAI,CAAC,CAAC;YACP,CAAC,GAAG,EAAE,CAAC;YACP,KAAK,CAAC;QAEV,CAAC;IACL,CAAC;IACD,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC;QACZ,CAAC,EAAE,CAAC;IACR,CAAC;IACD,GAAG,CAAC;QACA,CAAC,EAAE,CAAC;IACR,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAC;IACf,CAAC,GAAG,CAAC,CAAC;IACN,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACjC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC,KAAK,CAAC,CAAC;IACR,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;IACX,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,MAAM,CAAC;AACX,CAAC;AACD,IAAI,CAAC,GAAG;IACJ,IAAI,CAAC,GAAG,EAAE,CAAC;IACX,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACd,CAAC,CAAC;AACF,CAAC,EAAE,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationStatements.js","sourceRoot":"","sources":["sourceMapValidationStatements.ts"],"names":[],"mappings":"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"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationStatements.sourcemap.txt b/tests/baselines/reference/sourceMapValidationStatements.sourcemap.txt index ed7c9395d2f..7c5c5bfcfeb 100644 --- a/tests/baselines/reference/sourceMapValidationStatements.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationStatements.sourcemap.txt @@ -525,9 +525,9 @@ sourceFile:sourceMapValidationStatements.ts 3 > ^^^^^^^^^^^-> 1 > > -2 > } +2 > } 1 >Emitted(30, 5) Source(29, 5) + SourceIndex(0) -2 >Emitted(30, 6) Source(29, 7) + SourceIndex(0) +2 >Emitted(30, 6) Source(29, 6) + SourceIndex(0) --- >>> catch (e) { 1->^^^^ @@ -539,7 +539,7 @@ sourceFile:sourceMapValidationStatements.ts 7 > ^ 8 > ^ 9 > ^^^^^^^^^^^-> -1-> +1-> 2 > catch 3 > 4 > ( @@ -727,9 +727,9 @@ sourceFile:sourceMapValidationStatements.ts 3 > ^^^^^^^^^^^^-> 1 > > -2 > } +2 > } 1 >Emitted(41, 5) Source(38, 5) + SourceIndex(0) -2 >Emitted(41, 6) Source(38, 7) + SourceIndex(0) +2 >Emitted(41, 6) Source(38, 6) + SourceIndex(0) --- >>> catch (e1) { 1->^^^^ @@ -741,7 +741,7 @@ sourceFile:sourceMapValidationStatements.ts 7 > ^ 8 > ^ 9 > ^^^^-> -1-> +1-> 2 > catch 3 > 4 > ( diff --git a/tests/baselines/reference/sourceMapValidationTryCatchFinally.js.map b/tests/baselines/reference/sourceMapValidationTryCatchFinally.js.map index 46506410856..8b8690b470d 100644 --- a/tests/baselines/reference/sourceMapValidationTryCatchFinally.js.map +++ b/tests/baselines/reference/sourceMapValidationTryCatchFinally.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationTryCatchFinally.js.map] -{"version":3,"file":"sourceMapValidationTryCatchFinally.js","sourceRoot":"","sources":["sourceMapValidationTryCatchFinally.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,EAAE,CAAC;AACX,IAAI,CAAC;IACD,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACd,CAAE;AAAA,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACT,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACd,CAAC;QAAS,CAAC;IACP,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;AACf,CAAC;AACD,IACA,CAAC;IACG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACV,MAAM,IAAI,KAAK,EAAE,CAAC;AACtB,CACA;AAAA,KAAK,CAAC,CAAC,CAAC,CAAC,CACT,CAAC;IACG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACd,CAAC;QAED,CAAC;IACG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;AACf,CAAC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationTryCatchFinally.js","sourceRoot":"","sources":["sourceMapValidationTryCatchFinally.ts"],"names":[],"mappings":"AAAA,IAAI,CAAC,GAAG,EAAE,CAAC;AACX,IAAI,CAAC;IACD,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACd,CAAC;AAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACT,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACd,CAAC;QAAS,CAAC;IACP,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;AACf,CAAC;AACD,IACA,CAAC;IACG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACV,MAAM,IAAI,KAAK,EAAE,CAAC;AACtB,CAAC;AACD,KAAK,CAAC,CAAC,CAAC,CAAC,CACT,CAAC;IACG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACd,CAAC;QAED,CAAC;IACG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;AACf,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationTryCatchFinally.sourcemap.txt b/tests/baselines/reference/sourceMapValidationTryCatchFinally.sourcemap.txt index d625e74c262..845ec5eeb27 100644 --- a/tests/baselines/reference/sourceMapValidationTryCatchFinally.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationTryCatchFinally.sourcemap.txt @@ -71,9 +71,9 @@ sourceFile:sourceMapValidationTryCatchFinally.ts 3 > ^^^^^^^^^^^-> 1 > > -2 >} +2 >} 1 >Emitted(4, 1) Source(4, 1) + SourceIndex(0) -2 >Emitted(4, 2) Source(4, 3) + SourceIndex(0) +2 >Emitted(4, 2) Source(4, 2) + SourceIndex(0) --- >>>catch (e) { 1-> @@ -85,7 +85,7 @@ sourceFile:sourceMapValidationTryCatchFinally.ts 7 > ^ 8 > ^ 9 > ^^^^-> -1-> +1-> 2 >catch 3 > 4 > ( @@ -245,10 +245,9 @@ sourceFile:sourceMapValidationTryCatchFinally.ts 3 > ^^^^^^^^^^^-> 1 > > -2 >} - > +2 >} 1 >Emitted(14, 1) Source(13, 1) + SourceIndex(0) -2 >Emitted(14, 2) Source(14, 1) + SourceIndex(0) +2 >Emitted(14, 2) Source(13, 2) + SourceIndex(0) --- >>>catch (e) { 1-> @@ -260,7 +259,8 @@ sourceFile:sourceMapValidationTryCatchFinally.ts 7 > ^ 8 > ^ 9 > ^^^^-> -1-> +1-> + > 2 >catch 3 > 4 > ( diff --git a/tests/baselines/reference/systemModule11.js b/tests/baselines/reference/systemModule11.js index 41574af1d9a..212a24b5e20 100644 --- a/tests/baselines/reference/systemModule11.js +++ b/tests/baselines/reference/systemModule11.js @@ -55,8 +55,7 @@ System.register(["bar"], function (exports_1, context_1) { function exportStar_1(m) { var exports = {}; for (var n in m) { - if (n !== "default" && !exportedNames_1.hasOwnProperty(n)) - exports[n] = m[n]; + if (n !== "default" && !exportedNames_1.hasOwnProperty(n)) exports[n] = m[n]; } exports_1(exports); } @@ -83,8 +82,7 @@ System.register(["bar"], function (exports_1, context_1) { function exportStar_1(m) { var exports = {}; for (var n in m) { - if (n !== "default" && !exportedNames_1.hasOwnProperty(n)) - exports[n] = m[n]; + if (n !== "default" && !exportedNames_1.hasOwnProperty(n)) exports[n] = m[n]; } exports_1(exports); } @@ -111,8 +109,7 @@ System.register(["a", "bar"], function (exports_1, context_1) { function exportStar_1(m) { var exports = {}; for (var n in m) { - if (n !== "default" && !exportedNames_1.hasOwnProperty(n)) - exports[n] = m[n]; + if (n !== "default" && !exportedNames_1.hasOwnProperty(n)) exports[n] = m[n]; } exports_1(exports); } @@ -162,8 +159,7 @@ System.register(["a"], function (exports_1, context_1) { function exportStar_1(m) { var exports = {}; for (var n in m) { - if (n !== "default") - exports[n] = m[n]; + if (n !== "default") exports[n] = m[n]; } exports_1(exports); } diff --git a/tests/baselines/reference/systemModule16.js b/tests/baselines/reference/systemModule16.js index 8058e0f2ea1..86b6a448215 100644 --- a/tests/baselines/reference/systemModule16.js +++ b/tests/baselines/reference/systemModule16.js @@ -27,8 +27,7 @@ System.register(["foo", "bar"], function (exports_1, context_1) { function exportStar_1(m) { var exports = {}; for (var n in m) { - if (n !== "default" && !exportedNames_1.hasOwnProperty(n)) - exports[n] = m[n]; + if (n !== "default" && !exportedNames_1.hasOwnProperty(n)) exports[n] = m[n]; } exports_1(exports); } diff --git a/tests/baselines/reference/systemModule9.js b/tests/baselines/reference/systemModule9.js index 9e497140083..fce3aa1bdf4 100644 --- a/tests/baselines/reference/systemModule9.js +++ b/tests/baselines/reference/systemModule9.js @@ -33,8 +33,7 @@ System.register(["file1", "file2", "file3", "file4", "file5", "file6", "file7"], function exportStar_1(m) { var exports = {}; for (var n in m) { - if (n !== "default" && !exportedNames_1.hasOwnProperty(n)) - exports[n] = m[n]; + if (n !== "default" && !exportedNames_1.hasOwnProperty(n)) exports[n] = m[n]; } exports_1(exports); }