| OLD | NEW |
| 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 import "dart:mock" as mock; | |
| 5 | 4 |
| 6 class C extends core::Object { | 5 class C extends core::Object { |
| 7 field dynamic f = new self::Closure#C#f#function::•(null); | 6 field dynamic f = new self::Closure#C#f#function::•(null); |
| 8 constructor •() → void | 7 constructor •() → void |
| 9 : super core::Object::•() | 8 : super core::Object::•() |
| 10 ; | 9 ; |
| 11 get g() → dynamic { | 10 get g() → dynamic { |
| 12 return new self::Closure#C#g#function::•(null); | 11 return new self::Closure#C#g#function::•(null); |
| 13 } | 12 } |
| 14 method a() → dynamic { | 13 method a() → dynamic { |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 return new self::Closure#E#a::•<self::E::T>(this); | 84 return new self::Closure#E#a::•<self::E::T>(this); |
| 86 get b#get() → dynamic | 85 get b#get() → dynamic |
| 87 return new self::Closure#E#b::•<self::E::T>(this); | 86 return new self::Closure#E#b::•<self::E::T>(this); |
| 88 get c#get() → dynamic | 87 get c#get() → dynamic |
| 89 return new self::Closure#E#c::•<self::E::T>(this); | 88 return new self::Closure#E#c::•<self::E::T>(this); |
| 90 get d#get() → dynamic | 89 get d#get() → dynamic |
| 91 return new self::Closure#E#d::•<self::E::T>(this); | 90 return new self::Closure#E#d::•<self::E::T>(this); |
| 92 } | 91 } |
| 93 class Closure#C#g#function extends core::Object implements core::Function { | 92 class Closure#C#g#function extends core::Object implements core::Function { |
| 94 field core::String note = "This is temporary. The VM doesn't need closure clas
ses."; | 93 field core::String note = "This is temporary. The VM doesn't need closure clas
ses."; |
| 95 field mock::Context context; | 94 field Vector context; |
| 96 constructor •(final mock::Context context) → dynamic | 95 constructor •(final Vector context) → dynamic |
| 97 : self::Closure#C#g#function::context = context | 96 : self::Closure#C#g#function::context = context |
| 98 ; | 97 ; |
| 99 method call(dynamic x) → dynamic { | 98 method call(dynamic x) → dynamic { |
| 100 "This is a temporary solution. In the VM, this will become an additional par
ameter."; | 99 "This is a temporary solution. In the VM, this will become an additional par
ameter."; |
| 101 final mock::Context #contextParameter = this.{self::Closure#C#g#function::co
ntext}; | 100 final Vector #contextParameter = this.{self::Closure#C#g#function::context}; |
| 102 return "g(${x})"; | 101 return "g(${x})"; |
| 103 } | 102 } |
| 104 } | 103 } |
| 105 class Closure#C#a extends core::Object implements core::Function { | 104 class Closure#C#a extends core::Object implements core::Function { |
| 106 field core::String note = "This is temporary. The VM doesn't need closure clas
ses."; | 105 field core::String note = "This is temporary. The VM doesn't need closure clas
ses."; |
| 107 field self::C self; | 106 field self::C self; |
| 108 constructor •(final self::C self) → dynamic | 107 constructor •(final self::C self) → dynamic |
| 109 : self::Closure#C#a::self = self | 108 : self::Closure#C#a::self = self |
| 110 ; | 109 ; |
| 111 method call() → dynamic | 110 method call() → dynamic |
| (...skipping 21 matching lines...) Expand all Loading... |
| 133 field core::String note = "This is temporary. The VM doesn't need closure clas
ses."; | 132 field core::String note = "This is temporary. The VM doesn't need closure clas
ses."; |
| 134 field self::C self; | 133 field self::C self; |
| 135 constructor •(final self::C self) → dynamic | 134 constructor •(final self::C self) → dynamic |
| 136 : self::Closure#C#d::self = self | 135 : self::Closure#C#d::self = self |
| 137 ; | 136 ; |
| 138 method call(dynamic x, {dynamic y = 2}) → dynamic | 137 method call(dynamic x, {dynamic y = 2}) → dynamic |
| 139 return this.{self::Closure#C#d::self}.{self::C::d}(x, y: y); | 138 return this.{self::Closure#C#d::self}.{self::C::d}(x, y: y); |
| 140 } | 139 } |
| 141 class Closure#C#f#function extends core::Object implements core::Function { | 140 class Closure#C#f#function extends core::Object implements core::Function { |
| 142 field core::String note = "This is temporary. The VM doesn't need closure clas
ses."; | 141 field core::String note = "This is temporary. The VM doesn't need closure clas
ses."; |
| 143 field mock::Context context; | 142 field Vector context; |
| 144 constructor •(final mock::Context context) → dynamic | 143 constructor •(final Vector context) → dynamic |
| 145 : self::Closure#C#f#function::context = context | 144 : self::Closure#C#f#function::context = context |
| 146 ; | 145 ; |
| 147 method call() → dynamic { | 146 method call() → dynamic { |
| 148 "This is a temporary solution. In the VM, this will become an additional par
ameter."; | 147 "This is a temporary solution. In the VM, this will become an additional par
ameter."; |
| 149 final mock::Context #contextParameter = this.{self::Closure#C#f#function::co
ntext}; | 148 final Vector #contextParameter = this.{self::Closure#C#f#function::context}; |
| 150 return "f"; | 149 return "f"; |
| 151 } | 150 } |
| 152 } | 151 } |
| 153 class Closure#D#g#function extends core::Object implements core::Function { | 152 class Closure#D#g#function extends core::Object implements core::Function { |
| 154 field core::String note = "This is temporary. The VM doesn't need closure clas
ses."; | 153 field core::String note = "This is temporary. The VM doesn't need closure clas
ses."; |
| 155 field mock::Context context; | 154 field Vector context; |
| 156 constructor •(final mock::Context context) → dynamic | 155 constructor •(final Vector context) → dynamic |
| 157 : self::Closure#D#g#function::context = context | 156 : self::Closure#D#g#function::context = context |
| 158 ; | 157 ; |
| 159 method call(dynamic x) → dynamic { | 158 method call(dynamic x) → dynamic { |
| 160 "This is a temporary solution. In the VM, this will become an additional par
ameter."; | 159 "This is a temporary solution. In the VM, this will become an additional par
ameter."; |
| 161 final mock::Context #contextParameter = this.{self::Closure#D#g#function::co
ntext}; | 160 final Vector #contextParameter = this.{self::Closure#D#g#function::context}; |
| 162 return "g(${x})"; | 161 return "g(${x})"; |
| 163 } | 162 } |
| 164 } | 163 } |
| 165 class Closure#D#a<T extends core::Object> extends core::Object implements core::
Function { | 164 class Closure#D#a<T extends core::Object> extends core::Object implements core::
Function { |
| 166 field core::String note = "This is temporary. The VM doesn't need closure clas
ses."; | 165 field core::String note = "This is temporary. The VM doesn't need closure clas
ses."; |
| 167 field self::D<self::Closure#D#a::T> self; | 166 field self::D<self::Closure#D#a::T> self; |
| 168 constructor •(final self::D<self::Closure#D#a::T> self) → dynamic | 167 constructor •(final self::D<self::Closure#D#a::T> self) → dynamic |
| 169 : self::Closure#D#a::self = self | 168 : self::Closure#D#a::self = self |
| 170 ; | 169 ; |
| 171 method call() → dynamic | 170 method call() → dynamic |
| (...skipping 21 matching lines...) Expand all Loading... |
| 193 field core::String note = "This is temporary. The VM doesn't need closure clas
ses."; | 192 field core::String note = "This is temporary. The VM doesn't need closure clas
ses."; |
| 194 field self::D<self::Closure#D#d::T> self; | 193 field self::D<self::Closure#D#d::T> self; |
| 195 constructor •(final self::D<self::Closure#D#d::T> self) → dynamic | 194 constructor •(final self::D<self::Closure#D#d::T> self) → dynamic |
| 196 : self::Closure#D#d::self = self | 195 : self::Closure#D#d::self = self |
| 197 ; | 196 ; |
| 198 method call(dynamic x, {dynamic y = 2}) → dynamic | 197 method call(dynamic x, {dynamic y = 2}) → dynamic |
| 199 return this.{self::Closure#D#d::self}.{self::D::d}(x, y: y); | 198 return this.{self::Closure#D#d::self}.{self::D::d}(x, y: y); |
| 200 } | 199 } |
| 201 class Closure#D#f#function extends core::Object implements core::Function { | 200 class Closure#D#f#function extends core::Object implements core::Function { |
| 202 field core::String note = "This is temporary. The VM doesn't need closure clas
ses."; | 201 field core::String note = "This is temporary. The VM doesn't need closure clas
ses."; |
| 203 field mock::Context context; | 202 field Vector context; |
| 204 constructor •(final mock::Context context) → dynamic | 203 constructor •(final Vector context) → dynamic |
| 205 : self::Closure#D#f#function::context = context | 204 : self::Closure#D#f#function::context = context |
| 206 ; | 205 ; |
| 207 method call() → dynamic { | 206 method call() → dynamic { |
| 208 "This is a temporary solution. In the VM, this will become an additional par
ameter."; | 207 "This is a temporary solution. In the VM, this will become an additional par
ameter."; |
| 209 final mock::Context #contextParameter = this.{self::Closure#D#f#function::co
ntext}; | 208 final Vector #contextParameter = this.{self::Closure#D#f#function::context}; |
| 210 return "f"; | 209 return "f"; |
| 211 } | 210 } |
| 212 } | 211 } |
| 213 class Closure#E#g#function<T extends core::Object> extends core::Object implemen
ts core::Function { | 212 class Closure#E#g#function<T extends core::Object> extends core::Object implemen
ts core::Function { |
| 214 field core::String note = "This is temporary. The VM doesn't need closure clas
ses."; | 213 field core::String note = "This is temporary. The VM doesn't need closure clas
ses."; |
| 215 field mock::Context context; | 214 field Vector context; |
| 216 constructor •(final mock::Context context) → dynamic | 215 constructor •(final Vector context) → dynamic |
| 217 : self::Closure#E#g#function::context = context | 216 : self::Closure#E#g#function::context = context |
| 218 ; | 217 ; |
| 219 method call(self::Closure#E#g#function::T x) → dynamic { | 218 method call(self::Closure#E#g#function::T x) → dynamic { |
| 220 "This is a temporary solution. In the VM, this will become an additional par
ameter."; | 219 "This is a temporary solution. In the VM, this will become an additional par
ameter."; |
| 221 final mock::Context #contextParameter = this.{self::Closure#E#g#function::co
ntext}; | 220 final Vector #contextParameter = this.{self::Closure#E#g#function::context}; |
| 222 return "g(${x})"; | 221 return "g(${x})"; |
| 223 } | 222 } |
| 224 } | 223 } |
| 225 class Closure#E#a<T extends core::Object> extends core::Object implements core::
Function { | 224 class Closure#E#a<T extends core::Object> extends core::Object implements core::
Function { |
| 226 field core::String note = "This is temporary. The VM doesn't need closure clas
ses."; | 225 field core::String note = "This is temporary. The VM doesn't need closure clas
ses."; |
| 227 field self::E<self::Closure#E#a::T> self; | 226 field self::E<self::Closure#E#a::T> self; |
| 228 constructor •(final self::E<self::Closure#E#a::T> self) → dynamic | 227 constructor •(final self::E<self::Closure#E#a::T> self) → dynamic |
| 229 : self::Closure#E#a::self = self | 228 : self::Closure#E#a::self = self |
| 230 ; | 229 ; |
| 231 method call() → dynamic | 230 method call() → dynamic |
| (...skipping 21 matching lines...) Expand all Loading... |
| 253 field core::String note = "This is temporary. The VM doesn't need closure clas
ses."; | 252 field core::String note = "This is temporary. The VM doesn't need closure clas
ses."; |
| 254 field self::E<self::Closure#E#d::T> self; | 253 field self::E<self::Closure#E#d::T> self; |
| 255 constructor •(final self::E<self::Closure#E#d::T> self) → dynamic | 254 constructor •(final self::E<self::Closure#E#d::T> self) → dynamic |
| 256 : self::Closure#E#d::self = self | 255 : self::Closure#E#d::self = self |
| 257 ; | 256 ; |
| 258 method call(self::Closure#E#d::T x, {self::Closure#E#d::T y = 2}) → dynamic | 257 method call(self::Closure#E#d::T x, {self::Closure#E#d::T y = 2}) → dynamic |
| 259 return this.{self::Closure#E#d::self}.{self::E::d}(x, y: y); | 258 return this.{self::Closure#E#d::self}.{self::E::d}(x, y: y); |
| 260 } | 259 } |
| 261 class Closure#E#f#function extends core::Object implements core::Function { | 260 class Closure#E#f#function extends core::Object implements core::Function { |
| 262 field core::String note = "This is temporary. The VM doesn't need closure clas
ses."; | 261 field core::String note = "This is temporary. The VM doesn't need closure clas
ses."; |
| 263 field mock::Context context; | 262 field Vector context; |
| 264 constructor •(final mock::Context context) → dynamic | 263 constructor •(final Vector context) → dynamic |
| 265 : self::Closure#E#f#function::context = context | 264 : self::Closure#E#f#function::context = context |
| 266 ; | 265 ; |
| 267 method call() → dynamic { | 266 method call() → dynamic { |
| 268 "This is a temporary solution. In the VM, this will become an additional par
ameter."; | 267 "This is a temporary solution. In the VM, this will become an additional par
ameter."; |
| 269 final mock::Context #contextParameter = this.{self::Closure#E#f#function::co
ntext}; | 268 final Vector #contextParameter = this.{self::Closure#E#f#function::context}; |
| 270 return "f"; | 269 return "f"; |
| 271 } | 270 } |
| 272 } | 271 } |
| 273 static method expect(dynamic expected, dynamic actual) → dynamic { | 272 static method expect(dynamic expected, dynamic actual) → dynamic { |
| 274 core::print("Expecting '${expected}' and got '${actual}'"); | 273 core::print("Expecting '${expected}' and got '${actual}'"); |
| 275 if(!expected.==(actual)) { | 274 if(!expected.==(actual)) { |
| 276 core::print("Expected '${expected}' but got '${actual}'"); | 275 core::print("Expected '${expected}' but got '${actual}'"); |
| 277 throw "Expected '${expected}' but got '${actual}'"; | 276 throw "Expected '${expected}' but got '${actual}'"; |
| 278 } | 277 } |
| 279 } | 278 } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 293 self::expect(42, o.d(40)); | 292 self::expect(42, o.d(40)); |
| 294 self::expect(42, o.d#get.call(40)); | 293 self::expect(42, o.d#get.call(40)); |
| 295 self::expect(87, o.d(80, y: 7)); | 294 self::expect(87, o.d(80, y: 7)); |
| 296 self::expect(87, o.d#get.call(80, y: 7)); | 295 self::expect(87, o.d#get.call(80, y: 7)); |
| 297 } | 296 } |
| 298 static method main(dynamic arguments) → dynamic { | 297 static method main(dynamic arguments) → dynamic { |
| 299 self::test(new self::C::•()); | 298 self::test(new self::C::•()); |
| 300 self::test(new self::D::•<core::int>()); | 299 self::test(new self::D::•<core::int>()); |
| 301 self::test(new self::E::•<core::int>()); | 300 self::test(new self::E::•<core::int>()); |
| 302 } | 301 } |
| OLD | NEW |