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

Side by Side Diff: pkg/front_end/testcases/inference/downwards_inference_yield_yield_star.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 foo() → asy::Stream<core::List<core::int>> /* originally async* */ { 10 static method foo() → asy::Stream<core::List<core::int>> async* {
11 dynamic :controller; 11 yield<core::int>[];
12 dynamic :async_op_then; 12 yield self::MyStream::•<dynamic>();
13 dynamic :async_op_error; 13 yield*<dynamic>[];
14 dynamic :await_jump_var = 0; 14 yield* self::MyStream::•<core::List<core::int>>();
15 dynamic :await_ctx_var;
16 dynamic :saved_try_context_var0;
17 dynamic :saved_try_context_var1;
18 function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace] ) → dynamic yielding
19 try
20 try {
21 #L1:
22 {
23 if(:controller.add(<core::int>[]))
24 return null;
25 else
26 [yield] null;
27 if(:controller.add(self::MyStream::•<dynamic>()))
28 return null;
29 else
30 [yield] null;
31 if(:controller.addStream(<dynamic>[]))
32 return null;
33 else
34 [yield] null;
35 if(:controller.addStream(self::MyStream::•<core::List<core::int>>()))
36 return null;
37 else
38 [yield] null;
39 }
40 return;
41 }
42 on dynamic catch(dynamic :exception, dynamic :stack_trace) {
43 :controller.addError(:exception, :stack_trace);
44 }
45 finally {
46 :controller.close();
47 }
48 :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
49 :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
50 :controller = new asy::_AsyncStarStreamController::•(:async_op);
51 return :controller.stream;
52 } 15 }
53 static method bar() → core::Iterable<core::Map<core::int, core::int>> /* origina lly sync* */ { 16 static method bar() → core::Iterable<core::Map<core::int, core::int>> sync* {
54 dynamic :await_jump_var = 0; 17 yield<core::int, core::int>{};
55 dynamic :await_ctx_var; 18 yield core::List::_internal<dynamic>();
56 function :sync_op(core::Iterator<dynamic> :iterator) → core::bool yielding { 19 yield*<dynamic, dynamic>{};
57 { 20 yield* core::List::_internal<core::Map<core::int, core::int>>();
58 {
59 :iterator._current = <core::int, core::int>{};
60 [yield] true;
61 }
62 {
63 :iterator._current = core::List::_internal<dynamic>();
64 [yield] true;
65 }
66 {
67 :iterator.isYieldEach = true;
68 :iterator._current = <dynamic, dynamic>{};
69 [yield] true;
70 }
71 {
72 :iterator.isYieldEach = true;
73 :iterator._current = core::List::_internal<core::Map<core::int, core::in t>>();
74 [yield] true;
75 }
76 }
77 return false;
78 }
79 return new core::_SyncIterable::•(:sync_op);
80 } 21 }
81 static method main() → dynamic {} 22 static method main() → dynamic {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698