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

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

Issue 2891053003: Add support for converted closures with explicit contexts to VM (Closed)
Patch Set: Temporarily disable Run step in closures test suite Created 3 years, 5 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 f = MakeClosure<() → core::String>(self::closure#C#f#function, n ull); 6 field dynamic f = MakeClosure<() → dynamic>(self::closure#C#f#function, null);
7 constructor •() → void 7 default constructor •() → void
8 : super core::Object::•() 8 : super core::Object::•()
9 ; 9 ;
10 get g() → dynamic { 10 get g() → dynamic {
11 return MakeClosure<(dynamic) → core::String>(self::closure#C#g#function, nul l); 11 return MakeClosure<(dynamic) → dynamic>(self::closure#C#g#function, null);
12 } 12 }
13 method a() → dynamic { 13 method a() → dynamic {
14 return "a"; 14 return "a";
15 } 15 }
16 method b(dynamic x) → dynamic { 16 method b(dynamic x) → dynamic {
17 return x; 17 return x;
18 } 18 }
19 method c(dynamic x, [dynamic y = 2]) → dynamic { 19 method c(dynamic x, [dynamic y = 2]) → dynamic {
20 return x.+(y); 20 return x.+(y);
21 } 21 }
22 method d(dynamic x, {dynamic y = 2}) → dynamic { 22 method d(dynamic x, {dynamic y = 2}) → dynamic {
23 return x.+(y); 23 return x.+(y);
24 } 24 }
25 } 25 }
26 class D<T extends core::Object> extends core::Object { 26 class D<T extends core::Object> extends core::Object {
27 field dynamic f = MakeClosure<() → core::String>(self::closure#D#f#function, n ull); 27 field dynamic f = MakeClosure<() → dynamic>(self::closure#D#f#function, null);
28 constructor •() → void 28 default constructor •() → void
29 : super core::Object::•() 29 : super core::Object::•()
30 ; 30 ;
31 get g() → dynamic { 31 get g() → dynamic {
32 return MakeClosure<(dynamic) → core::String>(self::closure#D#g#function, nul l); 32 return MakeClosure<(dynamic) → dynamic>(self::closure#D#g#function, null);
33 } 33 }
34 method a() → dynamic { 34 method a() → dynamic {
35 return "a"; 35 return "a";
36 } 36 }
37 method b(dynamic x) → dynamic { 37 method b(dynamic x) → dynamic {
38 return x; 38 return x;
39 } 39 }
40 method c(dynamic x, [dynamic y = 2]) → dynamic { 40 method c(dynamic x, [dynamic y = 2]) → dynamic {
41 return x.+(y); 41 return x.+(y);
42 } 42 }
43 method d(dynamic x, {dynamic y = 2}) → dynamic { 43 method d(dynamic x, {dynamic y = 2}) → dynamic {
44 return x.+(y); 44 return x.+(y);
45 } 45 }
46 } 46 }
47 class E<T extends core::Object> extends core::Object { 47 class E<T extends core::Object> extends core::Object {
48 field dynamic f = MakeClosure<() → core::String>(self::closure#E#f#function, n ull); 48 field dynamic f = MakeClosure<() → dynamic>(self::closure#E#f#function, null);
49 constructor •() → void 49 default constructor •() → void
50 : super core::Object::•() 50 : super core::Object::•()
51 ; 51 ;
52 get g() → dynamic { 52 get g() → dynamic {
53 return MakeClosure<(dynamic) → core::String>(self::closure#E#g#function, nul l); 53 return MakeClosure<(dynamic) → dynamic>(self::closure#E#g#function, null);
54 } 54 }
55 method a() → dynamic { 55 method a() → dynamic {
56 return "a"; 56 return "a";
57 } 57 }
58 method b(self::E::T x) → dynamic { 58 method b(self::E::T x) → dynamic {
59 return x; 59 return x;
60 } 60 }
61 method c(self::E::T x, [self::E::T y = 2]) → dynamic { 61 method c(self::E::T x, [self::E::T y = 2]) → dynamic {
62 return x.+(y); 62 return x.+(y);
63 } 63 }
(...skipping 24 matching lines...) Expand all
88 self::expect(42, o.d(40)); 88 self::expect(42, o.d(40));
89 self::expect(42, o.d.call(40)); 89 self::expect(42, o.d.call(40));
90 self::expect(87, o.d(80, y: 7)); 90 self::expect(87, o.d(80, y: 7));
91 self::expect(87, o.d.call(80, y: 7)); 91 self::expect(87, o.d.call(80, y: 7));
92 } 92 }
93 static method main(dynamic arguments) → dynamic { 93 static method main(dynamic arguments) → dynamic {
94 self::test(new self::C::•()); 94 self::test(new self::C::•());
95 self::test(new self::D::•<core::int>()); 95 self::test(new self::D::•<core::int>());
96 self::test(new self::E::•<core::int>()); 96 self::test(new self::E::•<core::int>());
97 } 97 }
98 static method closure#C#g#function(Vector #contextParameter, dynamic x) → core:: String { 98 static method closure#C#g#function(Vector #contextParameter, dynamic x) → dynami c {
99 return "g(${x})"; 99 return "g(${x})";
100 } 100 }
101 static method closure#C#f#function(Vector #contextParameter) → core::String { 101 static method closure#C#f#function(Vector #contextParameter) → dynamic {
102 return "f"; 102 return "f";
103 } 103 }
104 static method closure#D#g#function(Vector #contextParameter, dynamic x) → core:: String { 104 static method closure#D#g#function(Vector #contextParameter, dynamic x) → dynami c {
105 return "g(${x})"; 105 return "g(${x})";
106 } 106 }
107 static method closure#D#f#function(Vector #contextParameter) → core::String { 107 static method closure#D#f#function(Vector #contextParameter) → dynamic {
108 return "f"; 108 return "f";
109 } 109 }
110 static method closure#E#g#function(Vector #contextParameter, dynamic x) → core:: String { 110 static method closure#E#g#function(Vector #contextParameter, dynamic x) → dynami c {
111 return "g(${x})"; 111 return "g(${x})";
112 } 112 }
113 static method closure#E#f#function(Vector #contextParameter) → core::String { 113 static method closure#E#f#function(Vector #contextParameter) → dynamic {
114 return "f"; 114 return "f";
115 } 115 }
OLDNEW
« no previous file with comments | « pkg/kernel/testcases/closures/for_in_closure.dart.expect ('k') | pkg/kernel/testcases/closures/static_tear_off.dart.expect » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698