| OLD | NEW |
| 1 var names = dart.defineLibrary(names, {}); | 1 var names = dart.defineLibrary(names, {}); |
| 2 var core = dart.import(core); | 2 var core = dart.import(core); |
| 3 (function(exports, core) { | 3 (function(exports, core) { |
| 4 'use strict'; | 4 'use strict'; |
| 5 exports.exports = 42; | 5 exports.exports = 42; |
| 6 let _foo$ = Symbol('_foo'); | 6 let _foo$ = Symbol('_foo'); |
| 7 class Foo extends core.Object { | 7 class Foo extends core.Object { |
| 8 [_foo$]() { | 8 [_foo$]() { |
| 9 return 123; | 9 return 123; |
| 10 } | 10 } |
| 11 } | 11 } |
| 12 // Function _foo: () → dynamic | 12 dart.setSignature(Foo, { |
| 13 methods: () => ({[_foo$]: dart.functionType(dart.dynamic, [])}) |
| 14 }); |
| 13 function _foo() { | 15 function _foo() { |
| 14 return 456; | 16 return 456; |
| 15 } | 17 } |
| 18 dart.fn(_foo); |
| 16 class Frame extends core.Object { | 19 class Frame extends core.Object { |
| 17 caller(arguments$) { | 20 caller(arguments$) { |
| 18 this.arguments = arguments$; | 21 this.arguments = arguments$; |
| 19 } | 22 } |
| 20 static callee() { | 23 static callee() { |
| 21 return null; | 24 return null; |
| 22 } | 25 } |
| 23 } | 26 } |
| 24 dart.defineNamedConstructor(Frame, 'caller'); | 27 dart.defineNamedConstructor(Frame, 'caller'); |
| 28 dart.setSignature(Frame, { |
| 29 statics: () => ({callee: dart.functionType(dart.dynamic, [])}), |
| 30 names: ['callee'] |
| 31 }); |
| 25 class Frame2 extends core.Object {} | 32 class Frame2 extends core.Object {} |
| 33 dart.setSignature(Frame2, {}); |
| 26 dart.defineLazyProperties(Frame2, { | 34 dart.defineLazyProperties(Frame2, { |
| 27 get caller() { | 35 get caller() { |
| 28 return 100; | 36 return 100; |
| 29 }, | 37 }, |
| 30 set caller(_) {}, | 38 set caller(_) {}, |
| 31 get arguments() { | 39 get arguments() { |
| 32 return 200; | 40 return 200; |
| 33 }, | 41 }, |
| 34 set arguments(_) {} | 42 set arguments(_) {} |
| 35 }); | 43 }); |
| 36 // Function main: () → dynamic | |
| 37 function main() { | 44 function main() { |
| 38 core.print(exports.exports); | 45 core.print(exports.exports); |
| 39 core.print(new Foo()[_foo$]()); | 46 core.print(new Foo()[_foo$]()); |
| 40 core.print(_foo()); | 47 core.print(_foo()); |
| 41 core.print(new Frame.caller([1, 2, 3])); | 48 core.print(new Frame.caller([1, 2, 3])); |
| 42 let eval$ = dart.bind(Frame, 'callee'); | 49 let eval$ = dart.bind(Frame, 'callee'); |
| 43 core.print(eval$); | 50 core.print(eval$); |
| 44 core.print(dart.notNull(Frame2.caller) + dart.notNull(Frame2.arguments)); | 51 core.print(dart.notNull(Frame2.caller) + dart.notNull(Frame2.arguments)); |
| 45 } | 52 } |
| 53 dart.fn(main); |
| 46 // Exports: | 54 // Exports: |
| 47 exports.Foo = Foo; | 55 exports.Foo = Foo; |
| 48 exports.Frame = Frame; | 56 exports.Frame = Frame; |
| 49 exports.Frame2 = Frame2; | 57 exports.Frame2 = Frame2; |
| 50 exports.main = main; | 58 exports.main = main; |
| 51 })(names, core); | 59 })(names, core); |
| OLD | NEW |