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

Side by Side Diff: runtime/lib/collection_patch.dart

Issue 22685007: Implement updated method overriding rules in the vm. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/lib/date_patch.dart » ('j') | runtime/lib/date_patch.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 patch class HashMap<K, V> { 5 patch class HashMap<K, V> {
6 final _HashMapTable<K, V> _hashTable = new _HashMapTable<K, V>(); 6 final _HashMapTable<K, V> _hashTable = new _HashMapTable<K, V>();
7 7
8 /* patch */ HashMap() { 8 /* patch */ HashMap() {
9 _hashTable._container = this; 9 _hashTable._container = this;
10 } 10 }
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 _table._checkCapacity(); 148 _table._checkCapacity();
149 } 149 }
150 } 150 }
151 151
152 /* patch */ bool remove(Object object) { 152 /* patch */ bool remove(Object object) {
153 int offset = _table._remove(object); 153 int offset = _table._remove(object);
154 _table._checkCapacity(); 154 _table._checkCapacity();
155 return offset >= 0; 155 return offset >= 0;
156 } 156 }
157 157
158 /* patch */ void removeAll(Iterable objectsToRemove) { 158 /* patch */ void removeAll(Iterable<Object> objectsToRemove) {
159 for (Object object in objectsToRemove) { 159 for (Object object in objectsToRemove) {
160 _table._remove(object); 160 _table._remove(object);
161 _table._checkCapacity(); 161 _table._checkCapacity();
162 } 162 }
163 } 163 }
164 164
165 void _filterWhere(bool test(E element), bool removeMatching) { 165 void _filterWhere(bool test(E element), bool removeMatching) {
166 int entrySize = _table._entrySize; 166 int entrySize = _table._entrySize;
167 int length = _table._table.length; 167 int length = _table._table.length;
168 for (int offset = 0; offset < length; offset += entrySize) { 168 for (int offset = 0; offset < length; offset += entrySize) {
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 1001
1002 _LinkedHashMapTable() : super(_INITIAL_CAPACITY); 1002 _LinkedHashMapTable() : super(_INITIAL_CAPACITY);
1003 1003
1004 V _value(int offset) => _table[offset + _VALUE_INDEX]; 1004 V _value(int offset) => _table[offset + _VALUE_INDEX];
1005 void _setValue(int offset, V value) { _table[offset + _VALUE_INDEX] = value; } 1005 void _setValue(int offset, V value) { _table[offset + _VALUE_INDEX] = value; }
1006 1006
1007 _copyEntry(List oldTable, int fromOffset, int toOffset) { 1007 _copyEntry(List oldTable, int fromOffset, int toOffset) {
1008 _table[toOffset + _VALUE_INDEX] = oldTable[fromOffset + _VALUE_INDEX]; 1008 _table[toOffset + _VALUE_INDEX] = oldTable[fromOffset + _VALUE_INDEX];
1009 } 1009 }
1010 } 1010 }
OLDNEW
« no previous file with comments | « no previous file | runtime/lib/date_patch.dart » ('j') | runtime/lib/date_patch.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698