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

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

Issue 3008923002: Improve the performance of closure-converted code. (Closed)
Patch Set: Additional bug fixes. Created 3 years, 3 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 dynamic #context = MakeVector(3), dynamic #t1 = #context[2] = f, sel f::C::t = MakeClosure<() → dynamic>(self::closure#C#foo#function, #context), sup er core::Object::•() { 8 : final dynamic #context = MakeVector(3), dynamic #t1 = #context[2] = f, dyn amic #t2 = f = null, self::C::t = MakeClosure<() → dynamic>(self::closure#C#foo# function, #context), super 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(dynamic #contextParameter, dynamic x) → dynamic { 19 static method closure#C#foo#function#function(dynamic #contextParameter, dynamic x) → dynamic {
20 (#contextParameter[1][2]).call("${#contextParameter[2]}${x}"); 20 (#contextParameter[1][2]).call("${#contextParameter[2]}${x}");
21 } 21 }
22 static method closure#C#foo#function(dynamic #contextParameter) → dynamic { 22 static method closure#C#foo#function(dynamic #contextParameter) → dynamic {
23 final dynamic #context = MakeVector(3); 23 final dynamic #context = MakeVector(3);
24 #context[1] = #contextParameter; 24 #context[1] = #contextParameter;
25 #context[2] = 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[2] = "hest"; 27 #context[2] = "hest";
28 return g; 28 return g;
29 } 29 }
30 static method closure#main#function(dynamic #contextParameter, dynamic x) → dyna mic { 30 static method closure#main#function(dynamic #contextParameter, dynamic x) → dyna mic {
31 return core::print(x); 31 return core::print(x);
32 } 32 }
OLDNEW
« no previous file with comments | « pkg/kernel/testcases/closures/closure_in_initializer.dart.expect ('k') | pkg/kernel/testcases/closures/closures.dart.expect » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698