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

Side by Side Diff: lib/runtime/dart/collection.js

Issue 1093143004: fixes #52, fields shadowing getters/setters or other fields (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « lib/runtime/dart/async.js ('k') | lib/runtime/dart/convert.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 var collection; 1 var collection;
2 (function(exports) { 2 (function(exports) {
3 'use strict'; 3 'use strict';
4 let _source = Symbol('_source'); 4 let _source = Symbol('_source');
5 let UnmodifiableListView$ = dart.generic(function(E) { 5 let UnmodifiableListView$ = dart.generic(function(E) {
6 class UnmodifiableListView extends _internal.UnmodifiableListBase$(E) { 6 class UnmodifiableListView extends _internal.UnmodifiableListBase$(E) {
7 UnmodifiableListView(source) { 7 UnmodifiableListView(source) {
8 this[_source] = source; 8 this[_source] = source;
9 super.UnmodifiableListBase(); 9 super.UnmodifiableListBase();
10 } 10 }
(...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 } 960 }
961 IterableBase[dart.implements] = () => [core.Iterable$(E)]; 961 IterableBase[dart.implements] = () => [core.Iterable$(E)];
962 dart.defineLazyProperties(IterableBase, { 962 dart.defineLazyProperties(IterableBase, {
963 get _toStringVisiting() { 963 get _toStringVisiting() {
964 return new core.List.from([]); 964 return new core.List.from([]);
965 } 965 }
966 }); 966 });
967 return IterableBase; 967 return IterableBase;
968 }); 968 });
969 let IterableBase = IterableBase$(); 969 let IterableBase = IterableBase$();
970 let _NOT_MOVED_YET = Symbol('_NOT_MOVED_YET');
970 let _iterator = Symbol('_iterator'); 971 let _iterator = Symbol('_iterator');
971 let _NOT_MOVED_YET = Symbol('_NOT_MOVED_YET');
972 let _state = Symbol('_state'); 972 let _state = Symbol('_state');
973 let _move = Symbol('_move'); 973 let _move = Symbol('_move');
974 let _HAS_NEXT_AND_NEXT_IN_CURRENT = Symbol('_HAS_NEXT_AND_NEXT_IN_CURRENT'); 974 let _HAS_NEXT_AND_NEXT_IN_CURRENT = Symbol('_HAS_NEXT_AND_NEXT_IN_CURRENT');
975 let _NO_NEXT = Symbol('_NO_NEXT'); 975 let _NO_NEXT = Symbol('_NO_NEXT');
976 let HasNextIterator$ = dart.generic(function(E) { 976 let HasNextIterator$ = dart.generic(function(E) {
977 class HasNextIterator extends core.Object { 977 class HasNextIterator extends core.Object {
978 HasNextIterator(iterator) { 978 HasNextIterator(iterator) {
979 this[_iterator] = iterator; 979 dart.initField(HasNextIterator, this, _iterator, iterator);
980 this[_state] = HasNextIterator[_NOT_MOVED_YET]; 980 dart.initField(HasNextIterator, this, _state, HasNextIterator[_NOT_MOVED _YET]);
981 } 981 }
982 get hasNext() { 982 get hasNext() {
983 if (this[_state] == HasNextIterator[_NOT_MOVED_YET]) 983 if (this[_state] == HasNextIterator[_NOT_MOVED_YET])
984 this[_move](); 984 this[_move]();
985 return this[_state] == HasNextIterator[_HAS_NEXT_AND_NEXT_IN_CURRENT]; 985 return this[_state] == HasNextIterator[_HAS_NEXT_AND_NEXT_IN_CURRENT];
986 } 986 }
987 next() { 987 next() {
988 if (!dart.notNull(this.hasNext)) 988 if (!dart.notNull(this.hasNext))
989 throw new core.StateError("No more elements"); 989 throw new core.StateError("No more elements");
990 dart.assert(this[_state] == HasNextIterator[_HAS_NEXT_AND_NEXT_IN_CURREN T]); 990 dart.assert(this[_state] == HasNextIterator[_HAS_NEXT_AND_NEXT_IN_CURREN T]);
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
1265 let _LinkedListIterator = _LinkedListIterator$(); 1265 let _LinkedListIterator = _LinkedListIterator$();
1266 class _LinkedListLink extends core.Object { 1266 class _LinkedListLink extends core.Object {
1267 _LinkedListLink() { 1267 _LinkedListLink() {
1268 this[_next] = null; 1268 this[_next] = null;
1269 this[_previous] = null; 1269 this[_previous] = null;
1270 } 1270 }
1271 } 1271 }
1272 let LinkedListEntry$ = dart.generic(function(E) { 1272 let LinkedListEntry$ = dart.generic(function(E) {
1273 class LinkedListEntry extends core.Object { 1273 class LinkedListEntry extends core.Object {
1274 LinkedListEntry() { 1274 LinkedListEntry() {
1275 this[_list] = null; 1275 dart.initField(LinkedListEntry, this, _list, null);
1276 this[_next] = null; 1276 dart.initField(LinkedListEntry, this, _next, null);
1277 this[_previous] = null; 1277 dart.initField(LinkedListEntry, this, _previous, null);
1278 } 1278 }
1279 get list() { 1279 get list() {
1280 return this[_list]; 1280 return this[_list];
1281 } 1281 }
1282 unlink() { 1282 unlink() {
1283 this[_list][_unlink](this); 1283 this[_list][_unlink](this);
1284 } 1284 }
1285 get next() { 1285 get next() {
1286 if (core.identical(this[_next], this[_list])) 1286 if (core.identical(this[_next], this[_list]))
1287 return null; 1287 return null;
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
1912 return this[_current]; 1912 return this[_current];
1913 } 1913 }
1914 } 1914 }
1915 _MapBaseValueIterator[dart.implements] = () => [core.Iterator$(V)]; 1915 _MapBaseValueIterator[dart.implements] = () => [core.Iterator$(V)];
1916 return _MapBaseValueIterator; 1916 return _MapBaseValueIterator;
1917 }); 1917 });
1918 let _MapBaseValueIterator = _MapBaseValueIterator$(); 1918 let _MapBaseValueIterator = _MapBaseValueIterator$();
1919 let MapView$ = dart.generic(function(K, V) { 1919 let MapView$ = dart.generic(function(K, V) {
1920 class MapView extends core.Object { 1920 class MapView extends core.Object {
1921 MapView(map) { 1921 MapView(map) {
1922 this[_map] = map; 1922 dart.initField(MapView, this, _map, map);
1923 } 1923 }
1924 get(key) { 1924 get(key) {
1925 return this[_map].get(key); 1925 return this[_map].get(key);
1926 } 1926 }
1927 set(key, value) { 1927 set(key, value) {
1928 this[_map].set(key, value); 1928 this[_map].set(key, value);
1929 } 1929 }
1930 addAll(other) { 1930 addAll(other) {
1931 this[_map].addAll(other); 1931 this[_map].addAll(other);
1932 } 1932 }
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
2089 dart.defineNamedConstructor(Queue, 'from'); 2089 dart.defineNamedConstructor(Queue, 'from');
2090 return Queue; 2090 return Queue;
2091 }); 2091 });
2092 let Queue = Queue$(); 2092 let Queue = Queue$();
2093 let _element = Symbol('_element'); 2093 let _element = Symbol('_element');
2094 let _link = Symbol('_link'); 2094 let _link = Symbol('_link');
2095 let _asNonSentinelEntry = Symbol('_asNonSentinelEntry'); 2095 let _asNonSentinelEntry = Symbol('_asNonSentinelEntry');
2096 let DoubleLinkedQueueEntry$ = dart.generic(function(E) { 2096 let DoubleLinkedQueueEntry$ = dart.generic(function(E) {
2097 class DoubleLinkedQueueEntry extends core.Object { 2097 class DoubleLinkedQueueEntry extends core.Object {
2098 DoubleLinkedQueueEntry(e) { 2098 DoubleLinkedQueueEntry(e) {
2099 this[_element] = e; 2099 dart.initField(DoubleLinkedQueueEntry, this, _element, e);
2100 this[_previous] = null; 2100 dart.initField(DoubleLinkedQueueEntry, this, _previous, null);
2101 this[_next] = null; 2101 dart.initField(DoubleLinkedQueueEntry, this, _next, null);
2102 } 2102 }
2103 [_link](previous, next) { 2103 [_link](previous, next) {
2104 this[_next] = next; 2104 this[_next] = next;
2105 this[_previous] = previous; 2105 this[_previous] = previous;
2106 previous[_next] = this; 2106 previous[_next] = this;
2107 next[_previous] = this; 2107 next[_previous] = this;
2108 } 2108 }
2109 append(e) { 2109 append(e) {
2110 new (DoubleLinkedQueueEntry$(E))(e)[_link](this, this[_next]); 2110 new (DoubleLinkedQueueEntry$(E))(e)[_link](this, this[_next]);
2111 } 2111 }
(...skipping 1615 matching lines...) Expand 10 before | Expand all | Expand 10 after
3727 } 3727 }
3728 } 3728 }
3729 HashMapKeyIterable[dart.implements] = () => [_internal.EfficientLength]; 3729 HashMapKeyIterable[dart.implements] = () => [_internal.EfficientLength];
3730 return HashMapKeyIterable; 3730 return HashMapKeyIterable;
3731 }); 3731 });
3732 let HashMapKeyIterable = HashMapKeyIterable$(); 3732 let HashMapKeyIterable = HashMapKeyIterable$();
3733 let _offset = Symbol('_offset'); 3733 let _offset = Symbol('_offset');
3734 let HashMapKeyIterator$ = dart.generic(function(E) { 3734 let HashMapKeyIterator$ = dart.generic(function(E) {
3735 class HashMapKeyIterator extends core.Object { 3735 class HashMapKeyIterator extends core.Object {
3736 HashMapKeyIterator(map, keys) { 3736 HashMapKeyIterator(map, keys) {
3737 this[_map] = map; 3737 dart.initField(HashMapKeyIterator, this, _map, map);
3738 this[_keys] = keys; 3738 dart.initField(HashMapKeyIterator, this, _keys, keys);
3739 this[_offset] = 0; 3739 dart.initField(HashMapKeyIterator, this, _offset, 0);
3740 this[_current] = null; 3740 dart.initField(HashMapKeyIterator, this, _current, null);
3741 } 3741 }
3742 get current() { 3742 get current() {
3743 return this[_current]; 3743 return this[_current];
3744 } 3744 }
3745 moveNext() { 3745 moveNext() {
3746 let keys = this[_keys]; 3746 let keys = this[_keys];
3747 let offset = this[_offset]; 3747 let offset = this[_offset];
3748 if (keys !== dart.dload(this[_map], _keys)) { 3748 if (keys !== dart.dload(this[_map], _keys)) {
3749 throw new core.ConcurrentModificationError(this[_map]); 3749 throw new core.ConcurrentModificationError(this[_map]);
3750 } else if (dart.notNull(offset) >= keys.length) { 3750 } else if (dart.notNull(offset) >= keys.length) {
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
4094 return i; 4094 return i;
4095 } 4095 }
4096 return -1; 4096 return -1;
4097 } 4097 }
4098 } 4098 }
4099 return _LinkedCustomHashMap; 4099 return _LinkedCustomHashMap;
4100 }); 4100 });
4101 let _LinkedCustomHashMap = _LinkedCustomHashMap$(); 4101 let _LinkedCustomHashMap = _LinkedCustomHashMap$();
4102 class LinkedHashMapCell extends core.Object { 4102 class LinkedHashMapCell extends core.Object {
4103 LinkedHashMapCell(key, value) { 4103 LinkedHashMapCell(key, value) {
4104 this[_key] = key; 4104 dart.initField(LinkedHashMapCell, this, _key, key);
4105 this[_value] = value; 4105 dart.initField(LinkedHashMapCell, this, _value, value);
4106 this[_next] = null; 4106 dart.initField(LinkedHashMapCell, this, _next, null);
4107 this[_previous] = null; 4107 dart.initField(LinkedHashMapCell, this, _previous, null);
4108 } 4108 }
4109 } 4109 }
4110 let LinkedHashMapKeyIterable$ = dart.generic(function(E) { 4110 let LinkedHashMapKeyIterable$ = dart.generic(function(E) {
4111 class LinkedHashMapKeyIterable extends IterableBase$(E) { 4111 class LinkedHashMapKeyIterable extends IterableBase$(E) {
4112 LinkedHashMapKeyIterable(map) { 4112 LinkedHashMapKeyIterable(map) {
4113 this[_map] = map; 4113 this[_map] = map;
4114 super.IterableBase(); 4114 super.IterableBase();
4115 } 4115 }
4116 get [core.$length]() { 4116 get [core.$length]() {
4117 return dart.as(dart.dload(this[_map], _length), core.int); 4117 return dart.as(dart.dload(this[_map], _length), core.int);
(...skipping 20 matching lines...) Expand all
4138 } 4138 }
4139 } 4139 }
4140 LinkedHashMapKeyIterable[dart.implements] = () => [_internal.EfficientLength ]; 4140 LinkedHashMapKeyIterable[dart.implements] = () => [_internal.EfficientLength ];
4141 return LinkedHashMapKeyIterable; 4141 return LinkedHashMapKeyIterable;
4142 }); 4142 });
4143 let LinkedHashMapKeyIterable = LinkedHashMapKeyIterable$(); 4143 let LinkedHashMapKeyIterable = LinkedHashMapKeyIterable$();
4144 let _cell = Symbol('_cell'); 4144 let _cell = Symbol('_cell');
4145 let LinkedHashMapKeyIterator$ = dart.generic(function(E) { 4145 let LinkedHashMapKeyIterator$ = dart.generic(function(E) {
4146 class LinkedHashMapKeyIterator extends core.Object { 4146 class LinkedHashMapKeyIterator extends core.Object {
4147 LinkedHashMapKeyIterator(map, modifications) { 4147 LinkedHashMapKeyIterator(map, modifications) {
4148 this[_map] = map; 4148 dart.initField(LinkedHashMapKeyIterator, this, _map, map);
4149 this[_modifications] = modifications; 4149 dart.initField(LinkedHashMapKeyIterator, this, _modifications, modificat ions);
4150 this[_cell] = null; 4150 dart.initField(LinkedHashMapKeyIterator, this, _cell, null);
4151 this[_current] = null; 4151 dart.initField(LinkedHashMapKeyIterator, this, _current, null);
4152 this[_cell] = dart.as(dart.dload(this[_map], _first), LinkedHashMapCell) ; 4152 this[_cell] = dart.as(dart.dload(this[_map], _first), LinkedHashMapCell) ;
4153 } 4153 }
4154 get current() { 4154 get current() {
4155 return this[_current]; 4155 return this[_current];
4156 } 4156 }
4157 moveNext() { 4157 moveNext() {
4158 if (!dart.equals(this[_modifications], dart.dload(this[_map], _modificat ions))) { 4158 if (!dart.equals(this[_modifications], dart.dload(this[_map], _modificat ions))) {
4159 throw new core.ConcurrentModificationError(this[_map]); 4159 throw new core.ConcurrentModificationError(this[_map]);
4160 } else if (this[_cell] == null) { 4160 } else if (this[_cell] == null) {
4161 this[_current] = null; 4161 this[_current] = null;
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
4474 return false; 4474 return false;
4475 return super[_remove](object); 4475 return super[_remove](object);
4476 } 4476 }
4477 } 4477 }
4478 return _CustomHashSet; 4478 return _CustomHashSet;
4479 }); 4479 });
4480 let _CustomHashSet = _CustomHashSet$(); 4480 let _CustomHashSet = _CustomHashSet$();
4481 let HashSetIterator$ = dart.generic(function(E) { 4481 let HashSetIterator$ = dart.generic(function(E) {
4482 class HashSetIterator extends core.Object { 4482 class HashSetIterator extends core.Object {
4483 HashSetIterator(set, elements) { 4483 HashSetIterator(set, elements) {
4484 this[_set] = set; 4484 dart.initField(HashSetIterator, this, _set, set);
4485 this[_elements] = elements; 4485 dart.initField(HashSetIterator, this, _elements, elements);
4486 this[_offset] = 0; 4486 dart.initField(HashSetIterator, this, _offset, 0);
4487 this[_current] = null; 4487 dart.initField(HashSetIterator, this, _current, null);
4488 } 4488 }
4489 get current() { 4489 get current() {
4490 return this[_current]; 4490 return this[_current];
4491 } 4491 }
4492 moveNext() { 4492 moveNext() {
4493 let elements = this[_elements]; 4493 let elements = this[_elements];
4494 let offset = this[_offset]; 4494 let offset = this[_offset];
4495 if (elements !== dart.dload(this[_set], _elements)) { 4495 if (elements !== dart.dload(this[_set], _elements)) {
4496 throw new core.ConcurrentModificationError(this[_set]); 4496 throw new core.ConcurrentModificationError(this[_set]);
4497 } else if (dart.notNull(offset) >= elements.length) { 4497 } else if (dart.notNull(offset) >= elements.length) {
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
4859 super[_remove](element); 4859 super[_remove](element);
4860 } 4860 }
4861 } 4861 }
4862 } 4862 }
4863 } 4863 }
4864 return _LinkedCustomHashSet; 4864 return _LinkedCustomHashSet;
4865 }); 4865 });
4866 let _LinkedCustomHashSet = _LinkedCustomHashSet$(); 4866 let _LinkedCustomHashSet = _LinkedCustomHashSet$();
4867 class LinkedHashSetCell extends core.Object { 4867 class LinkedHashSetCell extends core.Object {
4868 LinkedHashSetCell(element) { 4868 LinkedHashSetCell(element) {
4869 this[_element] = element; 4869 dart.initField(LinkedHashSetCell, this, _element, element);
4870 this[_next] = null; 4870 dart.initField(LinkedHashSetCell, this, _next, null);
4871 this[_previous] = null; 4871 dart.initField(LinkedHashSetCell, this, _previous, null);
4872 } 4872 }
4873 } 4873 }
4874 let LinkedHashSetIterator$ = dart.generic(function(E) { 4874 let LinkedHashSetIterator$ = dart.generic(function(E) {
4875 class LinkedHashSetIterator extends core.Object { 4875 class LinkedHashSetIterator extends core.Object {
4876 LinkedHashSetIterator(set, modifications) { 4876 LinkedHashSetIterator(set, modifications) {
4877 this[_set] = set; 4877 dart.initField(LinkedHashSetIterator, this, _set, set);
4878 this[_modifications] = modifications; 4878 dart.initField(LinkedHashSetIterator, this, _modifications, modification s);
4879 this[_cell] = null; 4879 dart.initField(LinkedHashSetIterator, this, _cell, null);
4880 this[_current] = null; 4880 dart.initField(LinkedHashSetIterator, this, _current, null);
4881 this[_cell] = dart.as(dart.dload(this[_set], _first), LinkedHashSetCell) ; 4881 this[_cell] = dart.as(dart.dload(this[_set], _first), LinkedHashSetCell) ;
4882 } 4882 }
4883 get current() { 4883 get current() {
4884 return this[_current]; 4884 return this[_current];
4885 } 4885 }
4886 moveNext() { 4886 moveNext() {
4887 if (!dart.equals(this[_modifications], dart.dload(this[_set], _modificat ions))) { 4887 if (!dart.equals(this[_modifications], dart.dload(this[_set], _modificat ions))) {
4888 throw new core.ConcurrentModificationError(this[_set]); 4888 throw new core.ConcurrentModificationError(this[_set]);
4889 } else if (this[_cell] == null) { 4889 } else if (this[_cell] == null) {
4890 this[_current] = null; 4890 this[_current] = null;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
4959 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$; 4959 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$;
4960 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable; 4960 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable;
4961 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$; 4961 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$;
4962 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator; 4962 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator;
4963 exports.HashSetIterator$ = HashSetIterator$; 4963 exports.HashSetIterator$ = HashSetIterator$;
4964 exports.HashSetIterator = HashSetIterator; 4964 exports.HashSetIterator = HashSetIterator;
4965 exports.LinkedHashSetCell = LinkedHashSetCell; 4965 exports.LinkedHashSetCell = LinkedHashSetCell;
4966 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$; 4966 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$;
4967 exports.LinkedHashSetIterator = LinkedHashSetIterator; 4967 exports.LinkedHashSetIterator = LinkedHashSetIterator;
4968 })(collection || (collection = {})); 4968 })(collection || (collection = {}));
OLDNEW
« no previous file with comments | « lib/runtime/dart/async.js ('k') | lib/runtime/dart/convert.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698