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

Side by Side Diff: pkg/kernel/testcases/closures/blocks.dart.expect

Issue 3000333002: Fix several bugs in closure conversion. (Closed)
Patch Set: Comments. Created 3 years, 4 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
(Empty)
1 library;
2 import self as self;
3 import "dart:core" as core;
4
5 typedef fn = (dynamic) → dynamic;
6 typedef fn2 = (dynamic, dynamic) → dynamic;
7 class X extends core::Object {
8 default constructor •() → void
9 : super core::Object::•()
10 ;
11 }
12 static method startIsolateMock(dynamic parentPort, dynamic entryPoint, dynamic a rgs, dynamic message, dynamic isSpawnUri, dynamic controlPort, core::List<dynami c> capabilities) → void {
13 final Vector #context = MakeVector(7);
14 #context[2] = entryPoint;
15 #context[3] = args;
16 #context[4] = message;
17 #context[5] = isSpawnUri;
18 if(!controlPort.==(null)) {
19 controlPort.handler = MakeClosure<(dynamic) → dynamic>(self::closure#startIs olateMock#function, #context);
20 }
21 if(!parentPort.==(null)) {
22 dynamic readyMessage = core::List::_internal<dynamic>(2);
23 readyMessage.[]=(0, controlPort.sendPort);
24 readyMessage.[]=(1, capabilities);
25 capabilities = null;
26 parentPort.send(readyMessage);
27 }
28 assert(capabilities.==(null));
29 #context[6] = "abc";
30 (#context[6]).handler = MakeClosure<(dynamic) → dynamic>(self::closure#startIs olateMock#function#1, #context);
31 (#context[6]).sendPort.send(null);
32 }
33 static method main() → dynamic {}
34 static method closure#startIsolateMock#function(Vector #contextParameter, dynami c _) → dynamic {}
35 static method closure#startIsolateMock#function#1(Vector #contextParameter, dyna mic _) → dynamic {
36 (#contextParameter[6]).close();
37 if(#contextParameter[5]) {
38 if((#contextParameter[2]) is (dynamic, dynamic) → dynamic) {
39 (#contextParameter[2]).call(#contextParameter[3], #contextParameter[4]);
40 }
41 else
42 if((#contextParameter[2]) is (dynamic) → dynamic) {
43 (#contextParameter[2]).call(#contextParameter[3]);
44 }
45 else {
46 (#contextParameter[2]).call();
47 }
48 }
49 else {
50 (#contextParameter[2]).call(#contextParameter[4]);
51 }
52 }
OLDNEW
« no previous file with comments | « pkg/kernel/testcases/closures/blocks.dart ('k') | pkg/kernel/testcases/closures/for_in_closure.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698