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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | lib/runtime/dart/_isolate_helper.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart/_internal.js
diff --git a/lib/runtime/dart/_internal.js b/lib/runtime/dart/_internal.js
index 3b36cd10299ced877b811d77aea7fe09ea9285f8..19781144c397fb9dfbb0a14efc9167fda8e5cb2f 100644
--- a/lib/runtime/dart/_internal.js
+++ b/lib/runtime/dart/_internal.js
@@ -598,7 +598,7 @@ dart_library.library('dart/_internal', null, /* Imports */[
super.IterableBase();
}
get iterator() {
- return new (ExpandIterator$(S, T))(this[_iterable][dartx.iterator], dart.as(this[_f], __CastType0));
+ return new (ExpandIterator$(S, T))(this[_iterable][dartx.iterator], dart.as(this[_f], dart.functionType(core.Iterable$(T), [S])));
}
}
dart.setSignature(ExpandIterable, {
@@ -1268,7 +1268,7 @@ dart_library.library('dart/_internal', null, /* Imports */[
}
takeWhile(iterable, test) {
dart.as(test, dart.functionType(core.bool, [dart.dynamic]));
- return new (TakeWhileIterable$(T))(dart.as(iterable, core.Iterable$(T)), dart.as(test, __CastType2));
+ return new (TakeWhileIterable$(T))(dart.as(iterable, core.Iterable$(T)), dart.as(test, dart.functionType(core.bool, [T])));
}
skipList(list, n) {
return new (SubListIterable$(T))(dart.as(list, core.Iterable$(T)), n, null);
@@ -1497,16 +1497,6 @@ dart_library.library('dart/_internal', null, /* Imports */[
}),
names: ['noElement', 'tooMany', 'tooFew']
});
- const __CastType0$ = dart.generic(function(S, T) {
- const __CastType0 = dart.typedef('__CastType0', () => dart.functionType(core.Iterable$(T), [S]));
- return __CastType0;
- });
- let __CastType0 = __CastType0$();
- const __CastType2$ = dart.generic(function(T) {
- const __CastType2 = dart.typedef('__CastType2', () => dart.functionType(core.bool, [T]));
- return __CastType2;
- });
- let __CastType2 = __CastType2$();
const FixedLengthListMixin$ = dart.generic(function(E) {
dart.defineExtensionNames([
'length',
« 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