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 | 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 } |
OLD | NEW |