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

Unified Diff: runtime/lib/growable_array.dart

Issue 2759973004: Fix observatory tests broken by running dartfmt. Temporarily reverted formatting for evaluate_activ… (Closed)
Patch Set: Created 3 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 | « runtime/lib/function_patch.dart ('k') | runtime/lib/identical_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/growable_array.dart
diff --git a/runtime/lib/growable_array.dart b/runtime/lib/growable_array.dart
index d35c1c44f096ea8043fcbcd76c0e517fdd373690..b004b062b4406b2f38c4ab47da9ee4cbf6f8fc42 100644
--- a/runtime/lib/growable_array.dart
+++ b/runtime/lib/growable_array.dart
@@ -3,7 +3,6 @@
// BSD-style license that can be found in the LICENSE file.
class _GrowableList<T> extends ListBase<T> {
-
void insert(int index, T element) {
if ((index < 0) || (index > length)) {
throw new RangeError.range(index, 0, length);
@@ -100,12 +99,11 @@ class _GrowableList<T> extends ListBase<T> {
}
factory _GrowableList.withCapacity(int capacity) {
- var data = new _List((capacity == 0)? _kDefaultCapacity : capacity);
+ var data = new _List((capacity == 0) ? _kDefaultCapacity : capacity);
return new _GrowableList<T>.withData(data);
}
- factory _GrowableList.withData(_List data)
- native "GrowableList_allocate";
+ factory _GrowableList.withData(_List data) native "GrowableList_allocate";
int get _capacity native "GrowableList_getCapacity";
@@ -170,8 +168,7 @@ class _GrowableList<T> extends ListBase<T> {
void addAll(Iterable<T> iterable) {
var len = length;
final cid = ClassID.getID(iterable);
- final isVMList =
- (cid == ClassID.cidArray) ||
+ final isVMList = (cid == ClassID.cidArray) ||
(cid == ClassID.cidGrowableObjectArray) ||
(cid == ClassID.cidImmutableArray);
if (isVMList || (iterable is EfficientLengthIterable)) {
@@ -231,7 +228,8 @@ class _GrowableList<T> extends ListBase<T> {
T get single {
if (length == 1) return this[0];
if (length == 0) throw IterableElementError.noElement();
- throw IterableElementError.tooMany();;
+ throw IterableElementError.tooMany();
+ ;
}
void _grow(int new_capacity) {
@@ -348,7 +346,7 @@ class _GrowableList<T> extends ListBase<T> {
return new ListIterator<T>(this);
}
- List<T> toList({ bool growable: true }) {
+ List<T> toList({bool growable: true}) {
var length = this.length;
if (length > 0) {
List list = growable ? new _List(length) : new _List<T>(length);
« no previous file with comments | « runtime/lib/function_patch.dart ('k') | runtime/lib/identical_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698