| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import "package:expect/expect.dart"; | 5 import "package:expect/expect.dart"; |
| 6 import "package:compiler/src/js/js.dart"; | 6 import "package:compiler/src/js/js.dart"; |
| 7 import "package:compiler/src/js/rewrite_async.dart"; | 7 import "package:compiler/src/js/rewrite_async.dart"; |
| 8 import "package:compiler/src/js_backend/js_backend.dart" show StringBackedName; | 8 import "package:compiler/src/js_backend/js_backend.dart" show StringBackedName; |
| 9 | 9 |
| 10 void testTransform(String source, String expected, AsyncRewriterBase rewriter) { | 10 void testTransform(String source, String expected, AsyncRewriterBase rewriter) { |
| (...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 975 return y; | 975 return y; |
| 976 case await bar(): // await in case | 976 case await bar(): // await in case |
| 977 print(await foobar(x)); | 977 print(await foobar(x)); |
| 978 return y; | 978 return y; |
| 979 case x: | 979 case x: |
| 980 if (a) { | 980 if (a) { |
| 981 throw new Error(); | 981 throw new Error(); |
| 982 } else { | 982 } else { |
| 983 continue; | 983 continue; |
| 984 } | 984 } |
| 985 default: // defaul case | 985 default: // default case |
| 986 break lab; // break to label | 986 break lab; // break to label |
| 987 } | 987 } |
| 988 foo(); | 988 foo(); |
| 989 } | 989 } |
| 990 } | 990 } |
| 991 }""", | 991 }""", |
| 992 """ | 992 """ |
| 993 function(x, y, k) { | 993 function(x, y, k) { |
| 994 var __goto = 0, __completer = new Completer(), __returnValue, __handler = 2, _
_currentError, __temp1; | 994 var __goto = 0, __completer = new Completer(), __returnValue, __handler = 2, _
_currentError, __temp1; |
| 995 var body = _wrapJsFunctionForAsync(function(__errorCode, __result) { | 995 var body = _wrapJsFunctionForAsync(function(__errorCode, __result) { |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1265 // return | 1265 // return |
| 1266 return endOfIteration(); | 1266 return endOfIteration(); |
| 1267 case 2: | 1267 case 2: |
| 1268 // rethrow | 1268 // rethrow |
| 1269 return uncaughtError(__currentError); | 1269 return uncaughtError(__currentError); |
| 1270 } | 1270 } |
| 1271 }; | 1271 }; |
| 1272 }); | 1272 }); |
| 1273 }"""); | 1273 }"""); |
| 1274 } | 1274 } |
| OLD | NEW |