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

Unified Diff: runtime/lib/growable_array.dart

Issue 10987004: Remove unnecessary throws in growablearray. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/growable_array.dart
===================================================================
--- runtime/lib/growable_array.dart (revision 12803)
+++ runtime/lib/growable_array.dart (working copy)
@@ -20,7 +20,7 @@
this.length = newLength;
return result;
}
-
+
void setRange(int start, int length, List<T> from, [int startFrom = 0]) {
if (length < 0) {
throw new IllegalArgumentException("negative length $length");
@@ -139,9 +139,6 @@
T removeLast() {
var len = length - 1;
- if (len < 0) {
- throw new IndexOutOfRangeException(-1);
- }
var elem = this[len];
this[len] = null;
_setLength(len);
@@ -149,9 +146,6 @@
}
T last() {
- if (length === 0) {
- throw new IndexOutOfRangeException(-1);
- }
return this[length - 1];
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698