Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Side by Side Diff: tests/compiler/dart2js/async_await_js_transform_test.dart

Issue 1427593003: dart2js: Bugfix for when 'await' occurs in an initializer list. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/pkg.status ('k') | tests/compiler/dart2js/dart2js.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 var __goto = 0, __completer = new Completer(), __handler = 1, __currentError, closures, v0, v1, v2, v3; 57 var __goto = 0, __completer = new Completer(), __handler = 1, __currentError, closures, v0, v1, v2, v3;
58 var body = _wrapJsFunctionForAsync(function(__errorCode, __result) { 58 var body = _wrapJsFunctionForAsync(function(__errorCode, __result) {
59 if (__errorCode === 1) { 59 if (__errorCode === 1) {
60 __currentError = __result; 60 __currentError = __result;
61 __goto = __handler; 61 __goto = __handler;
62 } 62 }
63 while (true) 63 while (true)
64 switch (__goto) { 64 switch (__goto) {
65 case 0: 65 case 0:
66 // Function start 66 // Function start
67 closures = [new A.main_closure()];
67 __goto = 2; 68 __goto = 2;
68 closures = [new A.main_closure()]; 69 return thenHelper(closures, body, __completer);
69 return thenHelper(closures, body, __completer);
70 case 2: 70 case 2:
71 // returning from await. 71 // returning from await.
72 v0 = __result, v1 = 0; 72 v0 = __result;
73 v1 = 0;
73 if (v1 < 0 || v1 >= v0.length) 74 if (v1 < 0 || v1 >= v0.length)
74 H.ioore(v0, v1); 75 H.ioore(v0, v1);
75 else 76 else
76 ; 77 ;
77 v2 = 4; 78 v2 = 4;
78 v3 = 2; 79 v3 = 2;
79 P.print(v0[v1].call$2(v2, v3)); 80 P.print(v0[v1].call$2(v2, v3));
80 // implicit return 81 // implicit return
81 return thenHelper(null, 0, __completer, null); 82 return thenHelper(null, 0, __completer, null);
82 case 1: 83 case 1:
(...skipping 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after
1230 // return 1231 // return
1231 return endOfIteration(); 1232 return endOfIteration();
1232 case 2: 1233 case 2:
1233 // rethrow 1234 // rethrow
1234 return uncaughtError(__currentError); 1235 return uncaughtError(__currentError);
1235 } 1236 }
1236 }; 1237 };
1237 }); 1238 });
1238 }"""); 1239 }""");
1239 } 1240 }
OLDNEW
« no previous file with comments | « pkg/pkg.status ('k') | tests/compiler/dart2js/dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698