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

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

Issue 1783603009: simplify function coercions -- DDC can generate function types in place (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « no previous file | lib/runtime/dart/_isolate_helper.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 dart_library.library('dart/_internal', null, /* Imports */[ 1 dart_library.library('dart/_internal', null, /* Imports */[
2 'dart/_runtime', 2 'dart/_runtime',
3 'dart/core', 3 'dart/core',
4 'dart/collection' 4 'dart/collection'
5 ], /* Lazy imports */[ 5 ], /* Lazy imports */[
6 'dart/math', 6 'dart/math',
7 'dart/_interceptors', 7 'dart/_interceptors',
8 'dart/_js_primitives' 8 'dart/_js_primitives'
9 ], function(exports, dart, core, collection, math, _interceptors, _js_primitives ) { 9 ], function(exports, dart, core, collection, math, _interceptors, _js_primitives ) {
10 'use strict'; 10 'use strict';
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 }); 591 });
592 let _ExpandFunction = _ExpandFunction$(); 592 let _ExpandFunction = _ExpandFunction$();
593 const ExpandIterable$ = dart.generic(function(S, T) { 593 const ExpandIterable$ = dart.generic(function(S, T) {
594 class ExpandIterable extends collection.IterableBase$(T) { 594 class ExpandIterable extends collection.IterableBase$(T) {
595 ExpandIterable(iterable, f) { 595 ExpandIterable(iterable, f) {
596 this[_iterable] = iterable; 596 this[_iterable] = iterable;
597 this[_f] = f; 597 this[_f] = f;
598 super.IterableBase(); 598 super.IterableBase();
599 } 599 }
600 get iterator() { 600 get iterator() {
601 return new (ExpandIterator$(S, T))(this[_iterable][dartx.iterator], dart .as(this[_f], __CastType0)); 601 return new (ExpandIterator$(S, T))(this[_iterable][dartx.iterator], dart .as(this[_f], dart.functionType(core.Iterable$(T), [S])));
602 } 602 }
603 } 603 }
604 dart.setSignature(ExpandIterable, { 604 dart.setSignature(ExpandIterable, {
605 constructors: () => ({ExpandIterable: [ExpandIterable$(S, T), [core.Iterab le$(S), dart.functionType(core.Iterable$(T), [S])]]}) 605 constructors: () => ({ExpandIterable: [ExpandIterable$(S, T), [core.Iterab le$(S), dart.functionType(core.Iterable$(T), [S])]]})
606 }); 606 });
607 dart.defineExtensionMembers(ExpandIterable, ['iterator']); 607 dart.defineExtensionMembers(ExpandIterable, ['iterator']);
608 return ExpandIterable; 608 return ExpandIterable;
609 }); 609 });
610 let ExpandIterable = ExpandIterable$(); 610 let ExpandIterable = ExpandIterable$();
611 const _currentExpansion = dart.JsSymbol('_currentExpansion'); 611 const _currentExpansion = dart.JsSymbol('_currentExpansion');
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
1261 return new MappedListIterable(list, f); 1261 return new MappedListIterable(list, f);
1262 } 1262 }
1263 static expand(iterable, f) { 1263 static expand(iterable, f) {
1264 return new ExpandIterable(iterable, f); 1264 return new ExpandIterable(iterable, f);
1265 } 1265 }
1266 takeList(list, n) { 1266 takeList(list, n) {
1267 return new (SubListIterable$(T))(dart.as(list, core.Iterable$(T)), 0, n) ; 1267 return new (SubListIterable$(T))(dart.as(list, core.Iterable$(T)), 0, n) ;
1268 } 1268 }
1269 takeWhile(iterable, test) { 1269 takeWhile(iterable, test) {
1270 dart.as(test, dart.functionType(core.bool, [dart.dynamic])); 1270 dart.as(test, dart.functionType(core.bool, [dart.dynamic]));
1271 return new (TakeWhileIterable$(T))(dart.as(iterable, core.Iterable$(T)), dart.as(test, __CastType2)); 1271 return new (TakeWhileIterable$(T))(dart.as(iterable, core.Iterable$(T)), dart.as(test, dart.functionType(core.bool, [T])));
1272 } 1272 }
1273 skipList(list, n) { 1273 skipList(list, n) {
1274 return new (SubListIterable$(T))(dart.as(list, core.Iterable$(T)), n, nu ll); 1274 return new (SubListIterable$(T))(dart.as(list, core.Iterable$(T)), n, nu ll);
1275 } 1275 }
1276 skipWhile(iterable, test) { 1276 skipWhile(iterable, test) {
1277 dart.as(test, dart.functionType(core.bool, [dart.dynamic])); 1277 dart.as(test, dart.functionType(core.bool, [dart.dynamic]));
1278 return new (SkipWhileIterable$(T))(dart.as(iterable, core.Iterable$(T)), dart.as(test, dart.functionType(core.bool, [T]))); 1278 return new (SkipWhileIterable$(T))(dart.as(iterable, core.Iterable$(T)), dart.as(test, dart.functionType(core.bool, [T])));
1279 } 1279 }
1280 reversedList(list) { 1280 reversedList(list) {
1281 return new (ReversedListIterable$(T))(dart.as(list, core.Iterable$(T))); 1281 return new (ReversedListIterable$(T))(dart.as(list, core.Iterable$(T)));
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
1490 } 1490 }
1491 } 1491 }
1492 dart.setSignature(IterableElementError, { 1492 dart.setSignature(IterableElementError, {
1493 statics: () => ({ 1493 statics: () => ({
1494 noElement: [core.StateError, []], 1494 noElement: [core.StateError, []],
1495 tooMany: [core.StateError, []], 1495 tooMany: [core.StateError, []],
1496 tooFew: [core.StateError, []] 1496 tooFew: [core.StateError, []]
1497 }), 1497 }),
1498 names: ['noElement', 'tooMany', 'tooFew'] 1498 names: ['noElement', 'tooMany', 'tooFew']
1499 }); 1499 });
1500 const __CastType0$ = dart.generic(function(S, T) {
1501 const __CastType0 = dart.typedef('__CastType0', () => dart.functionType(core .Iterable$(T), [S]));
1502 return __CastType0;
1503 });
1504 let __CastType0 = __CastType0$();
1505 const __CastType2$ = dart.generic(function(T) {
1506 const __CastType2 = dart.typedef('__CastType2', () => dart.functionType(core .bool, [T]));
1507 return __CastType2;
1508 });
1509 let __CastType2 = __CastType2$();
1510 const FixedLengthListMixin$ = dart.generic(function(E) { 1500 const FixedLengthListMixin$ = dart.generic(function(E) {
1511 dart.defineExtensionNames([ 1501 dart.defineExtensionNames([
1512 'length', 1502 'length',
1513 'add', 1503 'add',
1514 'insert', 1504 'insert',
1515 'insertAll', 1505 'insertAll',
1516 'addAll', 1506 'addAll',
1517 'remove', 1507 'remove',
1518 'removeWhere', 1508 'removeWhere',
1519 'retainWhere', 1509 'retainWhere',
(...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after
2363 exports.ReversedListIterable$ = ReversedListIterable$; 2353 exports.ReversedListIterable$ = ReversedListIterable$;
2364 exports.ReversedListIterable = ReversedListIterable; 2354 exports.ReversedListIterable = ReversedListIterable;
2365 exports.UnmodifiableListError = UnmodifiableListError; 2355 exports.UnmodifiableListError = UnmodifiableListError;
2366 exports.NonGrowableListError = NonGrowableListError; 2356 exports.NonGrowableListError = NonGrowableListError;
2367 exports.makeListFixedLength = makeListFixedLength; 2357 exports.makeListFixedLength = makeListFixedLength;
2368 exports.Lists = Lists; 2358 exports.Lists = Lists;
2369 exports.printToConsole = printToConsole; 2359 exports.printToConsole = printToConsole;
2370 exports.Sort = Sort; 2360 exports.Sort = Sort;
2371 exports.Symbol = Symbol; 2361 exports.Symbol = Symbol;
2372 }); 2362 });
OLDNEW
« no previous file with comments | « no previous file | lib/runtime/dart/_isolate_helper.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698