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

Unified Diff: lib/runtime/dart/async.js

Issue 1153003003: fixes #40, extension methods for primitive types (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 6 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
Index: lib/runtime/dart/async.js
diff --git a/lib/runtime/dart/async.js b/lib/runtime/dart/async.js
index f085ffee4a44a1eda1f6f94315e07f3a3e583184..8bf8b9cdb12e66cf73cc3000a0d270fce9c48b91 100644
--- a/lib/runtime/dart/async.js
+++ b/lib/runtime/dart/async.js
@@ -413,11 +413,11 @@ var collection = dart.import(collection);
return future;
}
toList() {
- let result = dart.setType([], core.List$(T));
+ let result = dart.list([], T);
let future = new (_Future$(core.List$(T)))();
this.listen(dart.fn(data => {
dart.as(data, T);
- result[core.$add](data);
+ result[dartx.add](data);
}, core.Object, [T]), {onError: dart.bind(future, _completeError), onDone: dart.fn(() => {
future[_complete](result);
}), cancelOnError: true});
@@ -1914,7 +1914,7 @@ var collection = dart.import(collection);
future.then(dart.fn(value => {
remaining = dart.notNull(remaining) - 1;
if (values != null) {
- values[core.$set](pos, value);
+ values[dartx.set](pos, value);
if (remaining == 0) {
result[_completeWithValue](values);
}
@@ -1938,7 +1938,7 @@ var collection = dart.import(collection);
}
static forEach(input, f) {
dart.as(f, dart.functionType(core.Object, [dart.bottom]));
- let iterator = input[core.$iterator];
+ let iterator = input[dartx.iterator];
return Future$().doWhile(dart.fn(() => {
if (!dart.notNull(iterator.moveNext()))
return false;
@@ -3576,7 +3576,7 @@ var collection = dart.import(collection);
let _IterablePendingEvents$ = dart.generic(function(T) {
class _IterablePendingEvents extends _PendingEvents {
_IterablePendingEvents(data) {
- this[_iterator] = data[core.$iterator];
+ this[_iterator] = data[dartx.iterator];
super._PendingEvents();
}
get isEmpty() {

Powered by Google App Engine
This is Rietveld 408576698