| 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 Closure#main#f extends core::Object implements core::Function { | 5 class Closure#main#f extends core::Object implements core::Function { |
| 7 field core::String note = "This is temporary. The VM doesn't need closure clas
ses."; | 6 field core::String note = "This is temporary. The VM doesn't need closure clas
ses."; |
| 8 field mock::Context context; | 7 field Vector context; |
| 9 constructor •(final mock::Context context) → dynamic | 8 constructor •(final Vector context) → dynamic |
| 10 : self::Closure#main#f::context = context | 9 : self::Closure#main#f::context = context |
| 11 ; | 10 ; |
| 12 method call() → dynamic { | 11 method call() → dynamic { |
| 13 "This is a temporary solution. In the VM, this will become an additional par
ameter."; | 12 "This is a temporary solution. In the VM, this will become an additional par
ameter."; |
| 14 final mock::Context #contextParameter = this.{self::Closure#main#f::context}
; | 13 final Vector #contextParameter = this.{self::Closure#main#f::context}; |
| 15 return null; | 14 return null; |
| 16 } | 15 } |
| 17 } | 16 } |
| 18 class Closure#main#g extends core::Object implements core::Function { | 17 class Closure#main#g extends core::Object implements core::Function { |
| 19 field core::String note = "This is temporary. The VM doesn't need closure clas
ses."; | 18 field core::String note = "This is temporary. The VM doesn't need closure clas
ses."; |
| 20 field mock::Context context; | 19 field Vector context; |
| 21 constructor •(final mock::Context context) → dynamic | 20 constructor •(final Vector context) → dynamic |
| 22 : self::Closure#main#g::context = context | 21 : self::Closure#main#g::context = context |
| 23 ; | 22 ; |
| 24 method call() → dynamic { | 23 method call() → dynamic { |
| 25 "This is a temporary solution. In the VM, this will become an additional par
ameter."; | 24 "This is a temporary solution. In the VM, this will become an additional par
ameter."; |
| 26 final mock::Context #contextParameter = this.{self::Closure#main#g::context}
; | 25 final Vector #contextParameter = this.{self::Closure#main#g::context}; |
| 27 return #contextParameter.[](0).call(); | 26 return (#contextParameter[1]).call(); |
| 28 } | 27 } |
| 29 } | 28 } |
| 30 static method main(dynamic arguments) → dynamic { | 29 static method main(dynamic arguments) → dynamic { |
| 31 final mock::Context #context = new mock::Context::•(1); | 30 final Vector #context = MakeVector(2); |
| 32 #context.[]=(0, new self::Closure#main#f::•(#context)); | 31 #context[1] = new self::Closure#main#f::•(#context); |
| 33 final () → dynamic g = new self::Closure#main#g::•(#context); | 32 final () → dynamic g = new self::Closure#main#g::•(#context); |
| 34 g.call(); | 33 g.call(); |
| 35 } | 34 } |
| OLD | NEW |