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

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

Issue 2998803002: [kernel] Support for top-level generic functions. (Closed)
Patch Set: Review 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
1 library; 1 library;
2 import self as self; 2 import self as self;
3 import "dart:core" as core; 3 import "dart:core" as core;
4 4
5 class C extends core::Object { 5 class C extends core::Object {
6 field dynamic t; 6 field dynamic t;
7 constructor foo(dynamic f) → void 7 constructor foo(dynamic f) → void
8 : final Vector #context = MakeVector(2), dynamic #t1 = #context[1] = f, self ::C::t = MakeClosure<() → dynamic>(self::closure#C#foo#function, #context), supe r core::Object::•() { 8 : final Vector #context = MakeVector(3), dynamic #t1 = #context[2] = f, self ::C::t = MakeClosure<() → dynamic>(self::closure#C#foo#function, #context), supe r core::Object::•() {
9 core::print(1); 9 core::print(1);
10 } 10 }
11 } 11 }
12 static method main() → dynamic { 12 static method main() → dynamic {
13 core::print(0); 13 core::print(0);
14 dynamic c = new self::C::foo(MakeClosure<(dynamic) → dynamic>(self::closure#ma in#function, null)); 14 dynamic c = new self::C::foo(MakeClosure<(dynamic) → dynamic>(self::closure#ma in#function, null));
15 core::print(2); 15 core::print(2);
16 c.t().call("fisk"); 16 c.t().call("fisk");
17 core::print(3); 17 core::print(3);
18 } 18 }
19 static method closure#C#foo#function#function(Vector #contextParameter, dynamic x) → dynamic { 19 static method closure#C#foo#function#function(Vector #contextParameter, dynamic x) → dynamic {
20 (#contextParameter[0][1]).call("${#contextParameter[1]}${x}"); 20 (#contextParameter[1][2]).call("${#contextParameter[2]}${x}");
21 } 21 }
22 static method closure#C#foo#function(Vector #contextParameter) → dynamic { 22 static method closure#C#foo#function(Vector #contextParameter) → dynamic {
23 final Vector #context = MakeVector(2); 23 final Vector #context = MakeVector(3);
24 #context[0] = #contextParameter; 24 #context[1] = #contextParameter;
25 #context[1] = null; 25 #context[2] = null;
26 dynamic g = MakeClosure<(dynamic) → dynamic>(self::closure#C#foo#function#func tion, #context); 26 dynamic g = MakeClosure<(dynamic) → dynamic>(self::closure#C#foo#function#func tion, #context);
27 #context[1] = "hest"; 27 #context[2] = "hest";
28 return g; 28 return g;
29 } 29 }
30 static method closure#main#function(Vector #contextParameter, dynamic x) → dynam ic { 30 static method closure#main#function(Vector #contextParameter, dynamic x) → dynam ic {
31 return core::print(x); 31 return core::print(x);
32 } 32 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698