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

Unified Diff: tests/compiler/dart2js/async_await_js_transform_test.dart

Issue 996103002: Fix handling of lazy and and or in async functions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address Review Created 5 years, 9 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/js/rewrite_async.dart ('k') | tests/language/async_and_or_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/async_await_js_transform_test.dart
diff --git a/tests/compiler/dart2js/async_await_js_transform_test.dart b/tests/compiler/dart2js/async_await_js_transform_test.dart
index 2483ceb0dbf5475acccb7df1089b994eb472a777..be164df6ada8e8fa8a919b81003b50e91927c2e5 100644
--- a/tests/compiler/dart2js/async_await_js_transform_test.dart
+++ b/tests/compiler/dart2js/async_await_js_transform_test.dart
@@ -262,12 +262,13 @@ function(d2) {
case 0:
// Function start
__temp1 = foo1();
- if (__temp1) {
+ if (__temp1)
+ __result = __temp1;
+ else {
// goto then
__goto = 2;
break;
- } else
- __result = __temp1;
+ }
// goto join
__goto = 3;
break;
@@ -290,12 +291,13 @@ function(d2) {
case 8:
// returning from await.
__temp1 = __result;
- if (__temp1) {
+ if (__temp1)
+ __result = __temp1;
+ else {
// goto then
__goto = 6;
break;
- } else
- __result = __temp1;
+ }
// goto join
__goto = 7;
break;
@@ -312,13 +314,12 @@ function(d2) {
c = __result;
d = foo1() || foo2();
__temp1 = foo1();
- if (__temp1)
- __result = __temp1;
- else {
+ if (__temp1) {
// goto then
__goto = 10;
break;
- }
+ } else
+ __result = __temp1;
// goto join
__goto = 11;
break;
@@ -341,13 +342,12 @@ function(d2) {
case 16:
// returning from await.
__temp1 = __result;
- if (__temp1)
- __result = __temp1;
- else {
+ if (__temp1) {
// goto then
__goto = 14;
break;
- }
+ } else
+ __result = __temp1;
// goto join
__goto = 15;
break;
« no previous file with comments | « pkg/compiler/lib/src/js/rewrite_async.dart ('k') | tests/language/async_and_or_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698