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

Side by Side Diff: pkg/front_end/testcases/inference/downwards_inference_for_each.dart.strong.expect

Issue 2939533002: Apply transformations after comparing to golden files. (Closed)
Patch Set: Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 library test; 1 library test;
2 import self as self; 2 import self as self;
3 import "dart:core" as core; 3 import "dart:core" as core;
4 import "dart:async" as asy; 4 import "dart:async" as asy;
5 5
6 abstract class MyStream<T extends core::Object> extends asy::Stream<self::MyStre am::T> { 6 abstract class MyStream<T extends core::Object> extends asy::Stream<self::MyStre am::T> {
7 static factory •<T extends core::Object>() → self::MyStream<self::MyStream::•: :T> 7 static factory •<T extends core::Object>() → self::MyStream<self::MyStream::•: :T>
8 return null; 8 return null;
9 } 9 }
10 static method F<T extends core::Object>() → self::F::T 10 static method F<T extends core::Object>() → self::F::T
11 return null; 11 return null;
12 static method f() → asy::Future<dynamic> /* originally async */ { 12 static method f() → asy::Future<dynamic> async {
13 final asy::Completer<asy::FutureOr<dynamic>> :completer = asy::Completer::sync <asy::FutureOr<dynamic>>(); 13 dynamic d;
14 asy::FutureOr<dynamic> :return_value; 14 core::Object o;
15 dynamic :async_op_then; 15 for (dynamic x in self::F<dynamic>()) {
16 dynamic :async_op_error; 16 }
17 dynamic :await_jump_var = 0; 17 for (dynamic x in self::F<core::Iterable<dynamic>>()) {
18 dynamic :await_ctx_var; 18 }
19 dynamic :saved_try_context_var0; 19 for (core::Object x in self::F<core::Iterable<core::Object>>()) {
20 dynamic :saved_try_context_var1; 20 }
21 dynamic :exception0; 21 for (final dynamic #t1 in self::F<dynamic>()) {
22 dynamic :stack_trace0; 22 d = #t1;
23 function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace] ) → dynamic yielding 23 }
24 try { 24 for (final dynamic #t2 in self::F<dynamic>()) {
25 #L1: 25 o = #t2;
26 { 26 }
27 dynamic d; 27 await for (dynamic x in self::F<dynamic>()) {
28 core::Object o; 28 }
29 for (dynamic x in self::F<dynamic>()) { 29 await for (dynamic x in self::F<asy::Stream<dynamic>>()) {
30 } 30 }
31 for (dynamic x in self::F<core::Iterable<dynamic>>()) { 31 await for (core::Object x in self::F<asy::Stream<core::Object>>()) {
32 } 32 }
33 for (core::Object x in self::F<core::Iterable<core::Object>>()) { 33 await for (final dynamic #t3 in self::F<dynamic>()) {
34 } 34 d = #t3;
35 for (final dynamic #t1 in self::F<dynamic>()) { 35 }
36 d = #t1; 36 await for (final dynamic #t4 in self::F<dynamic>()) {
37 } 37 o = #t4;
38 for (final dynamic #t2 in self::F<dynamic>()) { 38 }
39 o = #t2;
40 }
41 {
42 dynamic :for-iterator = new asy::_StreamIterator::•<dynamic>(self::F<d ynamic>());
43 try
44 #L2:
45 while (true) {
46 asy::_awaitHelper(:for-iterator.moveNext(), :async_op_then, :async _op_error, :async_op);
47 [yield] null;
48 if(:result) {
49 dynamic x = :for-iterator.current;
50 {}
51 }
52 else
53 break #L2;
54 }
55 finally {
56 asy::_awaitHelper(:for-iterator.cancel(), :async_op_then, :async_op_ error, :async_op);
57 [yield] null;
58 :result;
59 }
60 }
61 {
62 dynamic :for-iterator = new asy::_StreamIterator::•<dynamic>(self::F<a sy::Stream<dynamic>>());
63 try
64 #L3:
65 while (true) {
66 asy::_awaitHelper(:for-iterator.moveNext(), :async_op_then, :async _op_error, :async_op);
67 [yield] null;
68 if(:result) {
69 dynamic x = :for-iterator.current;
70 {}
71 }
72 else
73 break #L3;
74 }
75 finally {
76 asy::_awaitHelper(:for-iterator.cancel(), :async_op_then, :async_op_ error, :async_op);
77 [yield] null;
78 :result;
79 }
80 }
81 {
82 dynamic :for-iterator = new asy::_StreamIterator::•<dynamic>(self::F<a sy::Stream<core::Object>>());
83 try
84 #L4:
85 while (true) {
86 asy::_awaitHelper(:for-iterator.moveNext(), :async_op_then, :async _op_error, :async_op);
87 [yield] null;
88 if(:result) {
89 core::Object x = :for-iterator.current;
90 {}
91 }
92 else
93 break #L4;
94 }
95 finally {
96 asy::_awaitHelper(:for-iterator.cancel(), :async_op_then, :async_op_ error, :async_op);
97 [yield] null;
98 :result;
99 }
100 }
101 {
102 dynamic :for-iterator = new asy::_StreamIterator::•<dynamic>(self::F<d ynamic>());
103 try
104 #L5:
105 while (true) {
106 asy::_awaitHelper(:for-iterator.moveNext(), :async_op_then, :async _op_error, :async_op);
107 [yield] null;
108 if(:result) {
109 final dynamic #t3 = :for-iterator.current;
110 {
111 d = #t3;
112 }
113 }
114 else
115 break #L5;
116 }
117 finally {
118 asy::_awaitHelper(:for-iterator.cancel(), :async_op_then, :async_op_ error, :async_op);
119 [yield] null;
120 :result;
121 }
122 }
123 {
124 dynamic :for-iterator = new asy::_StreamIterator::•<dynamic>(self::F<d ynamic>());
125 try
126 #L6:
127 while (true) {
128 asy::_awaitHelper(:for-iterator.moveNext(), :async_op_then, :async _op_error, :async_op);
129 [yield] null;
130 if(:result) {
131 final dynamic #t4 = :for-iterator.current;
132 {
133 o = #t4;
134 }
135 }
136 else
137 break #L6;
138 }
139 finally {
140 asy::_awaitHelper(:for-iterator.cancel(), :async_op_then, :async_op_ error, :async_op);
141 [yield] null;
142 :result;
143 }
144 }
145 }
146 :completer.complete(:return_value);
147 return;
148 }
149 on dynamic catch(dynamic :exception, dynamic :stack_trace) {
150 :completer.completeError(:exception, :stack_trace);
151 }
152 :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
153 :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
154 asy::Future::microtask<dynamic>(:async_op);
155 return :completer.future;
156 } 39 }
157 static method main() → asy::Future<dynamic> /* originally async */ { 40 static method main() → asy::Future<dynamic> async {
158 final asy::Completer<asy::FutureOr<dynamic>> :completer = asy::Completer::sync <asy::FutureOr<dynamic>>(); 41 for (core::int x in <core::int>[1, 2, 3]) {
159 asy::FutureOr<dynamic> :return_value; 42 }
160 dynamic :async_op_then; 43 for (core::num x in <core::num>[1, 2, 3]) {
161 dynamic :async_op_error; 44 }
162 dynamic :await_jump_var = 0; 45 for (core::int x in <core::int>[1, 2, 3]) {
163 dynamic :await_ctx_var; 46 }
164 dynamic :saved_try_context_var0; 47 await for (core::int x in self::MyStream::•<core::int>()) {
165 dynamic :saved_try_context_var1; 48 }
166 dynamic :exception0; 49 await for (core::int x in self::MyStream::•<core::int>()) {
167 dynamic :stack_trace0; 50 }
168 function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace] ) → dynamic yielding
169 try {
170 #L7:
171 {
172 for (core::int x in <core::int>[1, 2, 3]) {
173 }
174 for (core::num x in <core::num>[1, 2, 3]) {
175 }
176 for (core::int x in <core::int>[1, 2, 3]) {
177 }
178 {
179 dynamic :for-iterator = new asy::_StreamIterator::•<dynamic>(self::MyS tream::•<core::int>());
180 try
181 #L8:
182 while (true) {
183 asy::_awaitHelper(:for-iterator.moveNext(), :async_op_then, :async _op_error, :async_op);
184 [yield] null;
185 if(:result) {
186 core::int x = :for-iterator.current;
187 {}
188 }
189 else
190 break #L8;
191 }
192 finally {
193 asy::_awaitHelper(:for-iterator.cancel(), :async_op_then, :async_op_ error, :async_op);
194 [yield] null;
195 :result;
196 }
197 }
198 {
199 dynamic :for-iterator = new asy::_StreamIterator::•<dynamic>(self::MyS tream::•<core::int>());
200 try
201 #L9:
202 while (true) {
203 asy::_awaitHelper(:for-iterator.moveNext(), :async_op_then, :async _op_error, :async_op);
204 [yield] null;
205 if(:result) {
206 core::int x = :for-iterator.current;
207 {}
208 }
209 else
210 break #L9;
211 }
212 finally {
213 asy::_awaitHelper(:for-iterator.cancel(), :async_op_then, :async_op_ error, :async_op);
214 [yield] null;
215 :result;
216 }
217 }
218 }
219 :completer.complete(:return_value);
220 return;
221 }
222 on dynamic catch(dynamic :exception, dynamic :stack_trace) {
223 :completer.completeError(:exception, :stack_trace);
224 }
225 :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
226 :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
227 asy::Future::microtask<dynamic>(:async_op);
228 return :completer.future;
229 } 51 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698