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

Unified Diff: sdk/lib/typed_data/dart2js/typed_data_dart2js.dart

Issue 18540002: Add fillRange to typed ungrowable lists. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Removed new lines. Created 7 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
« no previous file with comments | « no previous file | tests/corelib/list_ungrowable_fillRange_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/typed_data/dart2js/typed_data_dart2js.dart
diff --git a/sdk/lib/typed_data/dart2js/typed_data_dart2js.dart b/sdk/lib/typed_data/dart2js/typed_data_dart2js.dart
index b38c130533549b220e8f583e9c83c68153bfa410..1f36f23bb329c58ecf8f18db06ddfa0664260c97 100644
--- a/sdk/lib/typed_data/dart2js/typed_data_dart2js.dart
+++ b/sdk/lib/typed_data/dart2js/typed_data_dart2js.dart
@@ -430,7 +430,7 @@ class Float32List extends TypedData implements JavaScriptIndexingBehavior, List<
}
void fillRange(int start, int end, [num fillValue]) {
- throw new UnsupportedError("Cannot modify an immutable List.");
+ IterableMixinWorkaround.fillRangeList(this, start, end, fillValue);
}
Iterable<num> getRange(int start, int end) =>
@@ -652,7 +652,7 @@ class Float64List extends TypedData implements JavaScriptIndexingBehavior, List<
}
void fillRange(int start, int end, [num fillValue]) {
- throw new UnsupportedError("Cannot modify an immutable List.");
+ IterableMixinWorkaround.fillRangeList(this, start, end, fillValue);
}
Iterable<num> getRange(int start, int end) =>
@@ -874,7 +874,7 @@ class Int16List extends TypedData implements JavaScriptIndexingBehavior, List<in
}
void fillRange(int start, int end, [int fillValue]) {
- throw new UnsupportedError("Cannot modify an immutable List.");
+ IterableMixinWorkaround.fillRangeList(this, start, end, fillValue);
}
Iterable<int> getRange(int start, int end) =>
@@ -1096,7 +1096,7 @@ class Int32List extends TypedData implements JavaScriptIndexingBehavior, List<in
}
void fillRange(int start, int end, [int fillValue]) {
- throw new UnsupportedError("Cannot modify an immutable List.");
+ IterableMixinWorkaround.fillRangeList(this, start, end, fillValue);
}
Iterable<int> getRange(int start, int end) =>
@@ -1318,7 +1318,7 @@ class Int8List extends TypedData implements JavaScriptIndexingBehavior, List<int
}
void fillRange(int start, int end, [int fillValue]) {
- throw new UnsupportedError("Cannot modify an immutable List.");
+ IterableMixinWorkaround.fillRangeList(this, start, end, fillValue);
}
Iterable<int> getRange(int start, int end) =>
@@ -1540,7 +1540,7 @@ class Uint16List extends TypedData implements JavaScriptIndexingBehavior, List<i
}
void fillRange(int start, int end, [int fillValue]) {
- throw new UnsupportedError("Cannot modify an immutable List.");
+ IterableMixinWorkaround.fillRangeList(this, start, end, fillValue);
}
Iterable<int> getRange(int start, int end) =>
@@ -1762,7 +1762,7 @@ class Uint32List extends TypedData implements JavaScriptIndexingBehavior, List<i
}
void fillRange(int start, int end, [int fillValue]) {
- throw new UnsupportedError("Cannot modify an immutable List.");
+ IterableMixinWorkaround.fillRangeList(this, start, end, fillValue);
}
Iterable<int> getRange(int start, int end) =>
@@ -1983,7 +1983,7 @@ class Uint8ClampedList extends Uint8List implements JavaScriptIndexingBehavior,
}
void fillRange(int start, int end, [int fillValue]) {
- throw new UnsupportedError("Cannot modify an immutable List.");
+ IterableMixinWorkaround.fillRangeList(this, start, end, fillValue);
}
Iterable<int> getRange(int start, int end) =>
@@ -2205,7 +2205,7 @@ class Uint8List extends TypedData implements JavaScriptIndexingBehavior, List<in
}
void fillRange(int start, int end, [int fillValue]) {
- throw new UnsupportedError("Cannot modify an immutable List.");
+ IterableMixinWorkaround.fillRangeList(this, start, end, fillValue);
}
Iterable<int> getRange(int start, int end) =>
« no previous file with comments | « no previous file | tests/corelib/list_ungrowable_fillRange_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698