OLD | NEW |
1 dart_library.library('varargs', null, /* Imports */[ | 1 dart_library.library('varargs', null, /* Imports */[ |
2 'dart_sdk' | 2 'dart_sdk' |
3 ], function load__varargs(exports, dart_sdk) { | 3 ], function load__varargs(exports, dart_sdk) { |
4 'use strict'; | 4 'use strict'; |
5 const core = dart_sdk.core; | 5 const core = dart_sdk.core; |
6 const dart = dart_sdk.dart; | 6 const dart = dart_sdk.dart; |
7 const dartx = dart_sdk.dartx; | 7 const dartx = dart_sdk.dartx; |
8 const varargs = Object.create(null); | 8 const varargs = Object.create(null); |
9 const src__varargs = Object.create(null); | 9 const src__varargs = Object.create(null); |
10 let dynamicAnddynamicTodynamic = () => (dynamicAnddynamicTodynamic = dart.cons
tFn(dart.definiteFunctionType(dart.dynamic, [dart.dynamic, dart.dynamic])))(); | 10 let dynamicAnddynamicTodynamic = () => (dynamicAnddynamicTodynamic = dart.cons
tFn(dart.definiteFunctionType(dart.dynamic, [dart.dynamic, dart.dynamic])))(); |
11 let dynamicTodynamic = () => (dynamicTodynamic = dart.constFn(dart.definiteFun
ctionType(dart.dynamic, [dart.dynamic])))(); | 11 let dynamicTodynamic = () => (dynamicTodynamic = dart.constFn(dart.definiteFun
ctionType(dart.dynamic, [dart.dynamic])))(); |
12 varargs.varargsTest = function(x, ...others) { | 12 varargs.varargsTest = function(x, ...others) { |
13 let args = [1, others]; | 13 let args = [1, others]; |
14 dart.dsend(x, 'call', ...args); | 14 dart.dcall(x, ...args); |
15 }; | 15 }; |
16 dart.fn(varargs.varargsTest, dynamicAnddynamicTodynamic()); | 16 dart.fn(varargs.varargsTest, dynamicAnddynamicTodynamic()); |
17 varargs.varargsTest2 = function(x, ...others) { | 17 varargs.varargsTest2 = function(x, ...others) { |
18 let args = [1, others]; | 18 let args = [1, others]; |
19 dart.dsend(x, 'call', ...args); | 19 dart.dcall(x, ...args); |
20 }; | 20 }; |
21 dart.fn(varargs.varargsTest2, dynamicAnddynamicTodynamic()); | 21 dart.fn(varargs.varargsTest2, dynamicAnddynamicTodynamic()); |
22 src__varargs._Rest = class _Rest extends core.Object { | 22 src__varargs._Rest = class _Rest extends core.Object { |
23 new() { | 23 new() { |
24 } | 24 } |
25 }; | 25 }; |
26 dart.setSignature(src__varargs._Rest, { | 26 dart.setSignature(src__varargs._Rest, { |
27 constructors: () => ({new: dart.definiteFunctionType(src__varargs._Rest, [])
}) | 27 constructors: () => ({new: dart.definiteFunctionType(src__varargs._Rest, [])
}) |
28 }); | 28 }); |
29 src__varargs.rest = dart.const(new src__varargs._Rest()); | 29 src__varargs.rest = dart.const(new src__varargs._Rest()); |
30 src__varargs.spread = function(args) { | 30 src__varargs.spread = function(args) { |
31 dart.throw(new core.StateError('The spread function cannot be called, ' + 'i
t should be compiled away.')); | 31 dart.throw(new core.StateError('The spread function cannot be called, ' + 'i
t should be compiled away.')); |
32 }; | 32 }; |
33 dart.fn(src__varargs.spread, dynamicTodynamic()); | 33 dart.fn(src__varargs.spread, dynamicTodynamic()); |
34 // Exports: | 34 // Exports: |
35 exports.varargs = varargs; | 35 exports.varargs = varargs; |
36 exports.src__varargs = src__varargs; | 36 exports.src__varargs = src__varargs; |
37 }); | 37 }); |
OLD | NEW |