| OLD | NEW |
| 1 dart_library.library('methods', null, /* Imports */[ | 1 dart_library.library('methods', null, /* Imports */[ |
| 2 "dart/_runtime", | 2 "dart/_runtime", |
| 3 'dart/core' | 3 'dart/core' |
| 4 ], /* Lazy imports */[ | 4 ], /* Lazy imports */[ |
| 5 ], function(exports, dart, core) { | 5 ], function(exports, dart, core) { |
| 6 'use strict'; | 6 'use strict'; |
| 7 let dartx = dart.dartx; | 7 let dartx = dart.dartx; |
| 8 const _c = Symbol('_c'); | 8 const _c = Symbol('_c'); |
| 9 class A extends core.Object { | 9 class A extends core.Object { |
| 10 A() { | 10 A() { |
| 11 this[_c] = 3; | 11 this[_c] = 3; |
| 12 } | 12 } |
| 13 x() { | 13 x() { |
| 14 return 42; | 14 return 42; |
| 15 } | 15 } |
| 16 y(a) { | 16 y(a) { |
| 17 return a; | 17 return a; |
| 18 } | 18 } |
| 19 z(b) { | 19 z(b) { |
| 20 if (b === void 0) | 20 if (b === void 0) |
| 21 b = null; | 21 b = null; |
| 22 return dart.asInt(b); | 22 return dart.asInt(b); |
| 23 } | 23 } |
| 24 zz(b) { | 24 zz(b) { |
| 25 if (b === void 0) | 25 if (b === void 0) |
| 26 b = 0; | 26 b = 0; |
| 27 return b; | 27 return b; |
| 28 } | 28 } |
| 29 w(a, opts) { | 29 w(a, {b = null} = {}) { |
| 30 let b = opts && 'b' in opts ? opts.b : null; | |
| 31 return dart.asInt(dart.notNull(a) + dart.notNull(b)); | 30 return dart.asInt(dart.notNull(a) + dart.notNull(b)); |
| 32 } | 31 } |
| 33 ww(a, opts) { | 32 clashWithObjectProperty({constructor = null} = Object.create(null)) { |
| 34 let b = opts && 'b' in opts ? opts.b : 0; | 33 return constructor; |
| 35 return dart.notNull(a) + dart.notNull(b); | 34 } |
| 35 clashWithJsReservedName(opts) { |
| 36 let func = opts && 'function' in opts ? opts.function : null; |
| 37 return func; |
| 36 } | 38 } |
| 37 get a() { | 39 get a() { |
| 38 return this.x(); | 40 return this.x(); |
| 39 } | 41 } |
| 40 set b(b) {} | 42 set b(b) {} |
| 41 get c() { | 43 get c() { |
| 42 return this[_c]; | 44 return this[_c]; |
| 43 } | 45 } |
| 44 set c(c) { | 46 set c(c) { |
| 45 this[_c] = c; | 47 this[_c] = c; |
| 46 } | 48 } |
| 47 } | 49 } |
| 48 dart.setSignature(A, { | 50 dart.setSignature(A, { |
| 49 methods: () => ({ | 51 methods: () => ({ |
| 50 x: [core.int, []], | 52 x: [core.int, []], |
| 51 y: [core.int, [core.int]], | 53 y: [core.int, [core.int]], |
| 52 z: [core.int, [], [core.num]], | 54 z: [core.int, [], [core.num]], |
| 53 zz: [core.int, [], [core.int]], | 55 zz: [core.int, [], [core.int]], |
| 54 w: [core.int, [core.int], {b: core.num}], | 56 w: [core.int, [core.int], {b: core.num}], |
| 55 ww: [core.int, [core.int], {b: core.int}] | 57 clashWithObjectProperty: [dart.dynamic, [], {constructor: dart.dynamic}], |
| 58 clashWithJsReservedName: [dart.dynamic, [], {function: dart.dynamic}] |
| 56 }) | 59 }) |
| 57 }); | 60 }); |
| 58 class Bar extends core.Object { | 61 class Bar extends core.Object { |
| 59 call(x) { | 62 call(x) { |
| 60 return core.print(`hello from ${x}`); | 63 return core.print(`hello from ${x}`); |
| 61 } | 64 } |
| 62 } | 65 } |
| 63 dart.setSignature(Bar, { | 66 dart.setSignature(Bar, { |
| 64 methods: () => ({call: [dart.dynamic, [dart.dynamic]]}) | 67 methods: () => ({call: [dart.dynamic, [dart.dynamic]]}) |
| 65 }); | 68 }); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 80 let c = dart.bind("", dartx.padLeft); | 83 let c = dart.bind("", dartx.padLeft); |
| 81 let r = dart.bind(3.0, dartx.floor); | 84 let r = dart.bind(3.0, dartx.floor); |
| 82 } | 85 } |
| 83 dart.fn(test); | 86 dart.fn(test); |
| 84 // Exports: | 87 // Exports: |
| 85 exports.A = A; | 88 exports.A = A; |
| 86 exports.Bar = Bar; | 89 exports.Bar = Bar; |
| 87 exports.Foo = Foo; | 90 exports.Foo = Foo; |
| 88 exports.test = test; | 91 exports.test = test; |
| 89 }); | 92 }); |
| OLD | NEW |