Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(455)

Side by Side Diff: lib/runtime/dart/_runtime.js

Issue 1625563002: Use the great new Devtools API for custom formatters. Now Dart objects are now generally as easy to… (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698