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

Side by Side Diff: test/dart_codegen/expect/core/list.dart

Issue 963593002: Disable formatting and add new-lines to make tests faster. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
1 part of dart.core; 1 part of dart.core;
2 2 abstract class List<E> implements Iterable<E>, EfficientLength {factory List([i nt length = const _ListConstructorSentinel()]) {
3 abstract class List<E> implements Iterable<E>, EfficientLength { 3 if (length == const _ListConstructorSentinel()) {
4 factory List([int length = const _ListConstructorSentinel()]) { 4 return ((__x26) => DDC$RT.cast(__x26, dynamic, DDC$RT.type((List<E> _) {
5 if (length == const _ListConstructorSentinel()) { 5 }
6 return ((__x26) => DDC$RT.cast(__x26, dynamic, 6 ), "CastExact", """line 79, column 14 of dart:core/list.dart: """, __x26 is List<E>, false))(new JSArray<E>.emptyGrowable());
7 DDC$RT.type((List<E> _) {}), "CastExact",
8 """line 79, column 14 of dart:core/list.dart: """, __x26 is List<E>,
9 false))(new JSArray<E>.emptyGrowable());
10 } 7 }
11 return ((__x27) => DDC$RT.cast(__x27, dynamic, DDC$RT.type((List<E> _) {}), 8 return ((__x27) => DDC$RT.cast(__x27, dynamic, DDC$RT.type((List<E> _) {
12 "CastExact", """line 81, column 12 of dart:core/list.dart: """, 9 }
13 __x27 is List<E>, false))(new JSArray<E>.fixed(length)); 10 ), "CastExact", """line 81, column 12 of dart:core/list.dart: """, __x27 is Li st<E>, false))(new JSArray<E>.fixed(length));
14 } 11 }
15 factory List.filled(int length, E fill) { 12 factory List.filled(int length, E fill) {
16 List result = ((__x28) => DDC$RT.cast(__x28, dynamic, 13 List result = ((__x28) => DDC$RT.cast(__x28, dynamic, DDC$RT.type((List<dynami c> _) {
17 DDC$RT.type((List<dynamic> _) {}), "CastExact", 14 }
18 """line 93, column 19 of dart:core/list.dart: """, 15 ), "CastExact", """line 93, column 19 of dart:core/list.dart: """, __x28 is Li st<dynamic>, true))(new JSArray<E>.fixed(length));
19 __x28 is List<dynamic>, true))(new JSArray<E>.fixed(length)); 16 if (length != 0 && fill != null) {
20 if (length != 0 && fill != null) { 17 for (int i = 0;
21 for (int i = 0; i < result.length; i++) { 18 i < result.length;
22 result[i] = fill; 19 i++) {
20 result[i] = fill;
23 } 21 }
24 } 22 }
25 return DDC$RT.cast(result, DDC$RT.type((List<dynamic> _) {}), 23 return DDC$RT.cast(result, DDC$RT.type((List<dynamic> _) {
26 DDC$RT.type((List<E> _) {}), "CastDynamic", 24 }
27 """line 99, column 12 of dart:core/list.dart: """, result is List<E>, 25 ), DDC$RT.type((List<E> _) {
28 false); 26 }
27 ), "CastDynamic", """line 99, column 12 of dart:core/list.dart: """, result is List<E>, false);
29 } 28 }
30 factory List.from(Iterable elements, {bool growable: true}) { 29 factory List.from(Iterable elements, {
31 List<E> list = new List<E>(); 30 bool growable : true}
32 for (E e in elements) { 31 ) {
33 list.add(e); 32 List<E> list = new List<E>();
33 for (E e in elements) {
34 list.add(e);
34 } 35 }
35 if (growable) return list; 36 if (growable) return list;
36 return ((__x29) => DDC$RT.cast(__x29, DDC$RT.type((List<dynamic> _) {}), 37 return ((__x29) => DDC$RT.cast(__x29, DDC$RT.type((List<dynamic> _) {
37 DDC$RT.type((List<E> _) {}), "CastDynamic", 38 }
38 """line 116, column 12 of dart:core/list.dart: """, __x29 is List<E>, 39 ), DDC$RT.type((List<E> _) {
39 false))(makeListFixedLength(list)); 40 }
41 ), "CastDynamic", """line 116, column 12 of dart:core/list.dart: """, __x29 is List<E>, false))(makeListFixedLength(list));
40 } 42 }
41 factory List.generate(int length, E generator(int index), 43 factory List.generate(int length, E generator(int index), {
42 {bool growable: true}) { 44 bool growable : true}
43 List<E> result; 45 ) {
44 if (growable) { 46 List<E> result;
45 result = <E>[]..length = length; 47 if (growable) {
46 } else { 48 result = <E> []..length = length;
47 result = new List<E>(length);
48 } 49 }
49 for (int i = 0; i < length; i++) { 50 else {
50 result[i] = generator(i); 51 result = new List<E>(length);
51 } 52 }
52 return result; 53 for (int i = 0;
54 i < length;
55 i++) {
56 result[i] = generator(i);
57 }
58 return result;
53 } 59 }
54 E operator [](int index); 60 E operator [](int index);
55 void operator []=(int index, E value); 61 void operator []=(int index, E value);
56 int get length; 62 int get length;
57 void set length(int newLength); 63 void set length(int newLength);
58 void add(E value); 64 void add(E value);
59 void addAll(Iterable<E> iterable); 65 void addAll(Iterable<E> iterable);
60 Iterable<E> get reversed; 66 Iterable<E> get reversed;
61 void sort([int compare(E a, E b)]); 67 void sort([int compare(E a, E b)]);
62 void shuffle([Random random]); 68 void shuffle([Random random]);
63 int indexOf(E element, [int start = 0]); 69 int indexOf(E element, [int start = 0]);
64 int lastIndexOf(E element, [int start]); 70 int lastIndexOf(E element, [int start]);
65 void clear(); 71 void clear();
66 void insert(int index, E element); 72 void insert(int index, E element);
67 void insertAll(int index, Iterable<E> iterable); 73 void insertAll(int index, Iterable<E> iterable);
68 void setAll(int index, Iterable<E> iterable); 74 void setAll(int index, Iterable<E> iterable);
69 bool remove(Object value); 75 bool remove(Object value);
70 E removeAt(int index); 76 E removeAt(int index);
71 E removeLast(); 77 E removeLast();
72 void removeWhere(bool test(E element)); 78 void removeWhere(bool test(E element));
73 void retainWhere(bool test(E element)); 79 void retainWhere(bool test(E element));
74 List<E> sublist(int start, [int end]); 80 List<E> sublist(int start, [int end]);
75 Iterable<E> getRange(int start, int end); 81 Iterable<E> getRange(int start, int end);
76 void setRange(int start, int end, Iterable<E> iterable, [int skipCount = 0]); 82 void setRange(int start, int end, Iterable<E> iterable, [int skipCount = 0]);
77 void removeRange(int start, int end); 83 void removeRange(int start, int end);
78 void fillRange(int start, int end, [E fillValue]); 84 void fillRange(int start, int end, [E fillValue]);
79 void replaceRange(int start, int end, Iterable<E> replacement); 85 void replaceRange(int start, int end, Iterable<E> replacement);
80 Map<int, E> asMap(); 86 Map<int, E> asMap();
81 } 87 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698