OLD | NEW |
1 dart_library.library('dart/_runtime', null, /* Imports */[ | 1 dart_library.library('dart/_runtime', null, /* Imports */[ |
2 ], /* Lazy imports */[ | 2 ], /* Lazy imports */[ |
3 'dart/core', | 3 'dart/core', |
4 'dart/_interceptors', | 4 'dart/_interceptors', |
5 'dart/_js_helper', | 5 'dart/_js_helper', |
6 'dart/async', | 6 'dart/async', |
7 'dart/collection' | 7 'dart/collection' |
8 ], function(exports, core, _interceptors, _js_helper, async$, collection) { | 8 ], function(exports, core, _interceptors, _js_helper, async$, collection) { |
9 'use strict'; | 9 'use strict'; |
10 function mixin(base, ...mixins) { | 10 function mixin(base, ...mixins) { |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 return true; | 419 return true; |
420 } | 420 } |
421 function throwNoSuchMethod(obj, name, pArgs, nArgs, extras) { | 421 function throwNoSuchMethod(obj, name, pArgs, nArgs, extras) { |
422 throw$(new core.NoSuchMethodError(obj, name, pArgs, nArgs, extras)); | 422 throw$(new core.NoSuchMethodError(obj, name, pArgs, nArgs, extras)); |
423 } | 423 } |
424 function throwNoSuchMethodFunc(obj, name, pArgs, opt_func) { | 424 function throwNoSuchMethodFunc(obj, name, pArgs, opt_func) { |
425 if (obj === void 0) obj = opt_func; | 425 if (obj === void 0) obj = opt_func; |
426 throwNoSuchMethod(obj, name, pArgs); | 426 throwNoSuchMethod(obj, name, pArgs); |
427 } | 427 } |
428 function checkAndCall(f, ftype, obj, args, name) { | 428 function checkAndCall(f, ftype, obj, args, name) { |
429 let originalFunction = f; | |
430 if (!(f instanceof Function)) { | 429 if (!(f instanceof Function)) { |
431 if (f != null) { | 430 if (f != null) { |
432 ftype = getMethodType(f, 'call'); | 431 ftype = getMethodType(f, 'call'); |
433 f = f.call; | 432 f = f.call; |
434 } | 433 } |
435 if (!(f instanceof Function)) { | 434 if (!(f instanceof Function)) { |
436 throwNoSuchMethodFunc(obj, name, args, originalFunction); | 435 throwNoSuchMethodFunc(obj, name, args); |
437 } | 436 } |
438 } | 437 } |
439 if (ftype === void 0) { | 438 if (ftype === void 0) { |
440 ftype = read(f); | 439 ftype = read(f); |
441 } | 440 } |
442 if (!ftype) { | 441 if (!ftype) { |
443 return f.apply(obj, args); | 442 return f.apply(obj, args); |
444 } | 443 } |
445 if (checkApply(ftype, args)) { | 444 if (checkApply(ftype, args)) { |
446 return f.apply(obj, args); | 445 return f.apply(obj, args); |
447 } | 446 } |
448 throwNoSuchMethodFunc(obj, name, args, originalFunction); | 447 throwNoSuchMethodFunc(obj, name, args, f); |
449 } | 448 } |
450 function dcall(f, ...args) { | 449 function dcall(f, ...args) { |
451 let ftype = read(f); | 450 let ftype = read(f); |
452 return checkAndCall(f, ftype, void 0, args, 'call'); | 451 return checkAndCall(f, ftype, void 0, args, 'call'); |
453 } | 452 } |
454 function callMethod(obj, name, args, displayName) { | 453 function callMethod(obj, name, args, displayName) { |
455 let symbol = _canonicalFieldName(obj, name, args, displayName); | 454 let symbol = _canonicalFieldName(obj, name, args, displayName); |
456 let f = obj != null ? obj[symbol] : null; | 455 let f = obj != null ? obj[symbol] : null; |
457 let ftype = getMethodType(obj, name); | 456 let ftype = getMethodType(obj, name); |
458 return checkAndCall(f, ftype, obj, args, displayName); | 457 return checkAndCall(f, ftype, obj, args, displayName); |
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1294 exports.copyProperties = copyProperties; | 1293 exports.copyProperties = copyProperties; |
1295 exports.export = export$; | 1294 exports.export = export$; |
1296 exports.defineLazyClass = defineLazyClass; | 1295 exports.defineLazyClass = defineLazyClass; |
1297 exports.defineLazyProperties = defineLazyProperties; | 1296 exports.defineLazyProperties = defineLazyProperties; |
1298 exports.defineLazyClassGeneric = defineLazyClassGeneric; | 1297 exports.defineLazyClassGeneric = defineLazyClassGeneric; |
1299 exports.as = as; | 1298 exports.as = as; |
1300 exports.is = is; | 1299 exports.is = is; |
1301 exports.global = global; | 1300 exports.global = global; |
1302 exports.JsSymbol = JsSymbol; | 1301 exports.JsSymbol = JsSymbol; |
1303 }); | 1302 }); |
OLD | NEW |