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

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

Issue 1355893003: Rewire DDC to use the analyzer task model (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Fix for identifiers Created 5 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 unified diff | Download patch
OLDNEW
1 dart_library.library('dart/collection', null, /* Imports */[ 1 dart_library.library('dart/collection', null, /* Imports */[
2 "dart_runtime/dart", 2 "dart_runtime/dart",
3 'dart/core' 3 'dart/core'
4 ], /* Lazy imports */[ 4 ], /* Lazy imports */[
5 'dart/_internal', 5 'dart/_internal',
6 'dart/_js_helper', 6 'dart/_js_helper',
7 'dart/math' 7 'dart/math'
8 ], function(exports, dart, core, _internal, _js_helper, math) { 8 ], function(exports, dart, core, _internal, _js_helper, math) {
9 'use strict'; 9 'use strict';
10 let dartx = dart.dartx; 10 let dartx = dart.dartx;
11 let _source = Symbol('_source'); 11 let _source = Symbol('_source');
12 let UnmodifiableListView$ = dart.generic(function(E) { 12 let UnmodifiableListView$ = dart.generic(function(E) {
13 class UnmodifiableListView extends _internal.UnmodifiableListBase$(E) { 13 class UnmodifiableListView extends _internal.UnmodifiableListBase$(E) {
14 UnmodifiableListView(source) { 14 UnmodifiableListView(source) {
15 this[_source] = source; 15 this[_source] = source;
16 } 16 }
17 get length() { 17 get length() {
18 return this[_source][dartx.length]; 18 return this[_source][dartx.length];
19 } 19 }
20 get(index) { 20 get(index) {
21 return this[_source][dartx.elementAt](index); 21 return dart.dcall(this[_source][dartx.elementAt], index);
22 } 22 }
23 } 23 }
24 dart.setSignature(UnmodifiableListView, { 24 dart.setSignature(UnmodifiableListView, {
25 constructors: () => ({UnmodifiableListView: [exports.UnmodifiableListView$ (E), [core.Iterable$(E)]]}), 25 constructors: () => ({UnmodifiableListView: [exports.UnmodifiableListView$ (E), [core.Iterable$(E)]]}),
26 methods: () => ({get: [E, [core.int]]}) 26 methods: () => ({get: [E, [core.int]]})
27 }); 27 });
28 dart.defineExtensionMembers(UnmodifiableListView, ['get', 'length']); 28 dart.defineExtensionMembers(UnmodifiableListView, ['get', 'length']);
29 return UnmodifiableListView; 29 return UnmodifiableListView;
30 }); 30 });
31 dart.defineLazyClassGeneric(exports, 'UnmodifiableListView', {get: Unmodifiabl eListView$}); 31 dart.defineLazyClassGeneric(exports, 'UnmodifiableListView', {get: Unmodifiabl eListView$});
(...skipping 21 matching lines...) Expand all
53 let equals = opts && 'equals' in opts ? opts.equals : null; 53 let equals = opts && 'equals' in opts ? opts.equals : null;
54 let hashCode = opts && 'hashCode' in opts ? opts.hashCode : null; 54 let hashCode = opts && 'hashCode' in opts ? opts.hashCode : null;
55 let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null; 55 let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null;
56 if (isValidKey == null) { 56 if (isValidKey == null) {
57 if (hashCode == null) { 57 if (hashCode == null) {
58 if (equals == null) { 58 if (equals == null) {
59 return new (_HashMap$(K, V))(); 59 return new (_HashMap$(K, V))();
60 } 60 }
61 hashCode = _defaultHashCode; 61 hashCode = _defaultHashCode;
62 } else { 62 } else {
63 if (dart.notNull(core.identical(core.identityHashCode, hashCode)) && dart.notNull(core.identical(core.identical, equals))) { 63 if (dart.notNull(dart.dcall(core.identical, core.identityHashCode, h ashCode)) && dart.notNull(dart.dcall(core.identical, core.identical, equals))) {
Jennifer Messerly 2015/09/19 00:18:46 we seem to have lost a bunch of types -- lots more
64 return new (_IdentityHashMap$(K, V))(); 64 return new (_IdentityHashMap$(K, V))();
65 } 65 }
66 if (equals == null) { 66 if (equals == null) {
67 equals = _defaultEquals; 67 equals = _defaultEquals;
68 } 68 }
69 } 69 }
70 } else { 70 } else {
71 if (hashCode == null) { 71 if (hashCode == null) {
72 hashCode = _defaultHashCode; 72 hashCode = _defaultHashCode;
73 } 73 }
74 if (equals == null) { 74 if (equals == null) {
75 equals = _defaultEquals; 75 equals = _defaultEquals;
76 } 76 }
77 } 77 }
78 return new (_CustomHashMap$(K, V))(equals, hashCode, isValidKey); 78 return new (_CustomHashMap$(K, V))(equals, hashCode, isValidKey);
79 } 79 }
80 static identity() { 80 static identity() {
81 return new (_IdentityHashMap$(K, V))(); 81 return new (_IdentityHashMap$(K, V))();
82 } 82 }
83 static from(other) { 83 static from(other) {
84 let result = HashMap$(K, V).new(); 84 let result = HashMap$(K, V).new();
85 other.forEach(dart.fn((k, v) => { 85 dart.dcall(other.forEach, dart.fn((k, v) => {
86 result.set(dart.as(k, K), dart.as(v, V)); 86 result.set(dart.as(k, K), dart.as(v, V));
87 })); 87 }));
88 return result; 88 return result;
89 } 89 }
90 static fromIterable(iterable, opts) { 90 static fromIterable(iterable, opts) {
91 let key = opts && 'key' in opts ? opts.key : null; 91 let key = opts && 'key' in opts ? opts.key : null;
92 let value = opts && 'value' in opts ? opts.value : null; 92 let value = opts && 'value' in opts ? opts.value : null;
93 let map = HashMap$(K, V).new(); 93 let map = HashMap$(K, V).new();
94 Maps._fillMapWithMappedIterable(map, iterable, key, value); 94 dart.dcall(Maps._fillMapWithMappedIterable, map, iterable, key, value);
95 return map; 95 return map;
96 } 96 }
97 static fromIterables(keys, values) { 97 static fromIterables(keys, values) {
98 let map = HashMap$(K, V).new(); 98 let map = HashMap$(K, V).new();
99 Maps._fillMapWithIterables(map, keys, values); 99 dart.dcall(Maps._fillMapWithIterables, map, keys, values);
100 return map; 100 return map;
101 } 101 }
102 } 102 }
103 HashMap[dart.implements] = () => [core.Map$(K, V)]; 103 HashMap[dart.implements] = () => [core.Map$(K, V)];
104 dart.setSignature(HashMap, { 104 dart.setSignature(HashMap, {
105 constructors: () => ({ 105 constructors: () => ({
106 new: [HashMap$(K, V), [], {equals: dart.functionType(core.bool, [K, K]), hashCode: dart.functionType(core.int, [K]), isValidKey: dart.functionType(core. bool, [core.Object])}], 106 new: [HashMap$(K, V), [], {equals: dart.functionType(core.bool, [K, K]), hashCode: dart.functionType(core.int, [K]), isValidKey: dart.functionType(core. bool, [core.Object])}],
107 identity: [HashMap$(K, V), []], 107 identity: [HashMap$(K, V), []],
108 from: [HashMap$(K, V), [core.Map]], 108 from: [HashMap$(K, V), [core.Map]],
109 fromIterable: [HashMap$(K, V), [core.Iterable], {key: dart.functionType( K, [dart.dynamic]), value: dart.functionType(V, [dart.dynamic])}], 109 fromIterable: [HashMap$(K, V), [core.Iterable], {key: dart.functionType( K, [dart.dynamic]), value: dart.functionType(V, [dart.dynamic])}],
110 fromIterables: [HashMap$(K, V), [core.Iterable$(K), core.Iterable$(V)]] 110 fromIterables: [HashMap$(K, V), [core.Iterable$(K), core.Iterable$(V)]]
111 }) 111 })
112 }); 112 });
113 return HashMap; 113 return HashMap;
114 }); 114 });
115 let HashMap = HashMap$(); 115 let HashMap = HashMap$();
116 let SetMixin$ = dart.generic(function(E) { 116 let SetMixin$ = dart.generic(function(E) {
117 class SetMixin extends core.Object { 117 class SetMixin extends core.Object {
118 [Symbol.iterator]() { 118 [Symbol.iterator]() {
119 return new dart.JsIterator(this.iterator); 119 return new dart.JsIterator(this.iterator);
120 } 120 }
121 get isEmpty() { 121 get isEmpty() {
122 return this.length == 0; 122 return this.length == 0;
123 } 123 }
124 get isNotEmpty() { 124 get isNotEmpty() {
125 return this.length != 0; 125 return this.length != 0;
126 } 126 }
127 clear() { 127 clear() {
128 this.removeAll(this.toList()); 128 dart.dcall(this.removeAll, dart.dcall(this.toList));
129 } 129 }
130 addAll(elements) { 130 addAll(elements) {
131 dart.as(elements, core.Iterable$(E)); 131 dart.as(elements, core.Iterable$(E));
132 for (let element of elements) 132 for (let element of elements)
133 this.add(element); 133 dart.dcall(this.add, element);
134 } 134 }
135 removeAll(elements) { 135 removeAll(elements) {
136 for (let element of elements) 136 for (let element of elements)
137 this.remove(element); 137 dart.dcall(this.remove, element);
138 } 138 }
139 retainAll(elements) { 139 retainAll(elements) {
140 let toRemove = this.toSet(); 140 let toRemove = dart.dcall(this.toSet);
141 for (let o of elements) { 141 for (let o of elements) {
142 toRemove.remove(o); 142 dart.dcall(toRemove.remove, o);
143 } 143 }
144 this.removeAll(toRemove); 144 dart.dcall(this.removeAll, toRemove);
145 } 145 }
146 removeWhere(test) { 146 removeWhere(test) {
147 dart.as(test, dart.functionType(core.bool, [E])); 147 dart.as(test, dart.functionType(core.bool, [E]));
148 let toRemove = []; 148 let toRemove = [];
149 for (let element of this) { 149 for (let element of this) {
150 if (dart.notNull(test(element))) 150 if (dart.notNull(test(element)))
151 toRemove[dartx.add](element); 151 dart.dcall(toRemove[dartx.add], element);
152 } 152 }
153 this.removeAll(toRemove); 153 dart.dcall(this.removeAll, toRemove);
154 } 154 }
155 retainWhere(test) { 155 retainWhere(test) {
156 dart.as(test, dart.functionType(core.bool, [E])); 156 dart.as(test, dart.functionType(core.bool, [E]));
157 let toRemove = []; 157 let toRemove = [];
158 for (let element of this) { 158 for (let element of this) {
159 if (!dart.notNull(test(element))) 159 if (!dart.notNull(test(element)))
160 toRemove[dartx.add](element); 160 dart.dcall(toRemove[dartx.add], element);
161 } 161 }
162 this.removeAll(toRemove); 162 dart.dcall(this.removeAll, toRemove);
163 } 163 }
164 containsAll(other) { 164 containsAll(other) {
165 for (let o of other) { 165 for (let o of other) {
166 if (!dart.notNull(this.contains(o))) 166 if (!dart.notNull(dart.dcall(this.contains, o)))
167 return false; 167 return false;
168 } 168 }
169 return true; 169 return true;
170 } 170 }
171 union(other) { 171 union(other) {
172 dart.as(other, core.Set$(E)); 172 dart.as(other, core.Set$(E));
173 let _ = this.toSet(); 173 let _ = dart.dcall(this.toSet);
174 _.addAll(other); 174 dart.dcall(_.addAll, other);
175 return _; 175 return _;
176 } 176 }
177 intersection(other) { 177 intersection(other) {
178 let result = this.toSet(); 178 let result = dart.dcall(this.toSet);
179 for (let element of this) { 179 for (let element of this) {
180 if (!dart.notNull(other.contains(element))) 180 if (!dart.notNull(dart.dcall(other.contains, element)))
181 result.remove(element); 181 dart.dcall(result.remove, element);
182 } 182 }
183 return result; 183 return result;
184 } 184 }
185 difference(other) { 185 difference(other) {
186 let result = this.toSet(); 186 let result = dart.dcall(this.toSet);
187 for (let element of this) { 187 for (let element of this) {
188 if (dart.notNull(other.contains(element))) 188 if (dart.notNull(dart.dcall(other.contains, element)))
189 result.remove(element); 189 dart.dcall(result.remove, element);
190 } 190 }
191 return result; 191 return result;
192 } 192 }
193 toList(opts) { 193 toList(opts) {
194 let growable = opts && 'growable' in opts ? opts.growable : true; 194 let growable = opts && 'growable' in opts ? opts.growable : true;
195 let result = dart.notNull(growable) ? (() => { 195 let result = dart.notNull(growable) ? (() => {
196 let _ = core.List$(E).new(); 196 let _ = core.List$(E).new();
197 _[dartx.length] = this.length; 197 _[dartx.length] = this.length;
198 return _; 198 return _;
199 }).bind(this)() : core.List$(E).new(this.length); 199 }).bind(this)() : core.List$(E).new(this.length);
200 let i = 0; 200 let i = 0;
201 for (let element of this) 201 for (let element of this)
202 result[dartx.set]((() => { 202 result[dartx.set]((() => {
203 let x = i; 203 let x = i;
204 i = dart.notNull(x) + 1; 204 i = dart.notNull(x) + 1;
205 return x; 205 return x;
206 })(), element); 206 })(), element);
207 return result; 207 return result;
208 } 208 }
209 map(f) { 209 map(f) {
210 dart.as(f, dart.functionType(dart.dynamic, [E])); 210 dart.as(f, dart.functionType(dart.dynamic, [E]));
211 return new (_internal.EfficientLengthMappedIterable$(E, dart.dynamic))(t his, f); 211 return new (_internal.EfficientLengthMappedIterable$(E, dart.dynamic))(t his, f);
212 } 212 }
213 get single() { 213 get single() {
214 if (dart.notNull(this.length) > 1) 214 if (dart.notNull(this.length) > 1)
215 dart.throw(_internal.IterableElementError.tooMany()); 215 dart.throw(dart.dcall(_internal.IterableElementError.tooMany));
216 let it = this.iterator; 216 let it = this.iterator;
217 if (!dart.notNull(it.moveNext())) 217 if (!dart.notNull(dart.dcall(it.moveNext)))
218 dart.throw(_internal.IterableElementError.noElement()); 218 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
219 let result = it.current; 219 let result = it.current;
220 return result; 220 return result;
221 } 221 }
222 toString() { 222 toString() {
223 return IterableBase.iterableToFullString(this, '{', '}'); 223 return dart.dcall(IterableBase.iterableToFullString, this, '{', '}');
224 } 224 }
225 where(f) { 225 where(f) {
226 dart.as(f, dart.functionType(core.bool, [E])); 226 dart.as(f, dart.functionType(core.bool, [E]));
227 return new (_internal.WhereIterable$(E))(this, f); 227 return new (_internal.WhereIterable$(E))(this, f);
228 } 228 }
229 expand(f) { 229 expand(f) {
230 dart.as(f, dart.functionType(core.Iterable, [E])); 230 dart.as(f, dart.functionType(core.Iterable, [E]));
231 return new (_internal.ExpandIterable$(E, dart.dynamic))(this, f); 231 return new (_internal.ExpandIterable$(E, dart.dynamic))(this, f);
232 } 232 }
233 forEach(f) { 233 forEach(f) {
234 dart.as(f, dart.functionType(dart.void, [E])); 234 dart.as(f, dart.functionType(dart.void, [E]));
235 for (let element of this) 235 for (let element of this)
236 f(element); 236 f(element);
237 } 237 }
238 reduce(combine) { 238 reduce(combine) {
239 dart.as(combine, dart.functionType(E, [E, E])); 239 dart.as(combine, dart.functionType(E, [E, E]));
240 let iterator = this.iterator; 240 let iterator = this.iterator;
241 if (!dart.notNull(iterator.moveNext())) { 241 if (!dart.notNull(dart.dcall(iterator.moveNext))) {
242 dart.throw(_internal.IterableElementError.noElement()); 242 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
243 } 243 }
244 let value = iterator.current; 244 let value = iterator.current;
245 while (dart.notNull(iterator.moveNext())) { 245 while (dart.notNull(dart.dcall(iterator.moveNext))) {
246 value = combine(value, iterator.current); 246 value = combine(value, iterator.current);
247 } 247 }
248 return value; 248 return value;
249 } 249 }
250 fold(initialValue, combine) { 250 fold(initialValue, combine) {
251 dart.as(combine, dart.functionType(dart.dynamic, [dart.dynamic, E])); 251 dart.as(combine, dart.functionType(dart.dynamic, [dart.dynamic, E]));
252 let value = initialValue; 252 let value = initialValue;
253 for (let element of this) 253 for (let element of this)
254 value = dart.dcall(combine, value, element); 254 value = dart.dcall(combine, value, element);
255 return value; 255 return value;
256 } 256 }
257 every(f) { 257 every(f) {
258 dart.as(f, dart.functionType(core.bool, [E])); 258 dart.as(f, dart.functionType(core.bool, [E]));
259 for (let element of this) { 259 for (let element of this) {
260 if (!dart.notNull(f(element))) 260 if (!dart.notNull(f(element)))
261 return false; 261 return false;
262 } 262 }
263 return true; 263 return true;
264 } 264 }
265 join(separator) { 265 join(separator) {
266 if (separator === void 0) 266 if (separator === void 0)
267 separator = ""; 267 separator = "";
268 let iterator = this.iterator; 268 let iterator = this.iterator;
269 if (!dart.notNull(iterator.moveNext())) 269 if (!dart.notNull(dart.dcall(iterator.moveNext)))
270 return ""; 270 return "";
271 let buffer = new core.StringBuffer(); 271 let buffer = new core.StringBuffer();
272 if (separator == null || separator == "") { 272 if (separator == null || separator == "") {
273 do { 273 do {
274 buffer.write(`${iterator.current}`); 274 dart.dcall(buffer.write, `${iterator.current}`);
275 } while (dart.notNull(iterator.moveNext())); 275 } while (dart.notNull(dart.dcall(iterator.moveNext)));
276 } else { 276 } else {
277 buffer.write(`${iterator.current}`); 277 dart.dcall(buffer.write, `${iterator.current}`);
278 while (dart.notNull(iterator.moveNext())) { 278 while (dart.notNull(dart.dcall(iterator.moveNext))) {
279 buffer.write(separator); 279 dart.dcall(buffer.write, separator);
280 buffer.write(`${iterator.current}`); 280 dart.dcall(buffer.write, `${iterator.current}`);
281 } 281 }
282 } 282 }
283 return dart.toString(buffer); 283 return dart.dcall(buffer.toString);
284 } 284 }
285 any(test) { 285 any(test) {
286 dart.as(test, dart.functionType(core.bool, [E])); 286 dart.as(test, dart.functionType(core.bool, [E]));
287 for (let element of this) { 287 for (let element of this) {
288 if (dart.notNull(test(element))) 288 if (dart.notNull(test(element)))
289 return true; 289 return true;
290 } 290 }
291 return false; 291 return false;
292 } 292 }
293 take(n) { 293 take(n) {
294 return _internal.TakeIterable$(E).new(this, n); 294 return _internal.TakeIterable$(E).new(this, n);
295 } 295 }
296 takeWhile(test) { 296 takeWhile(test) {
297 dart.as(test, dart.functionType(core.bool, [E])); 297 dart.as(test, dart.functionType(core.bool, [E]));
298 return new (_internal.TakeWhileIterable$(E))(this, test); 298 return new (_internal.TakeWhileIterable$(E))(this, test);
299 } 299 }
300 skip(n) { 300 skip(n) {
301 return _internal.SkipIterable$(E).new(this, n); 301 return _internal.SkipIterable$(E).new(this, n);
302 } 302 }
303 skipWhile(test) { 303 skipWhile(test) {
304 dart.as(test, dart.functionType(core.bool, [E])); 304 dart.as(test, dart.functionType(core.bool, [E]));
305 return new (_internal.SkipWhileIterable$(E))(this, test); 305 return new (_internal.SkipWhileIterable$(E))(this, test);
306 } 306 }
307 get first() { 307 get first() {
308 let it = this.iterator; 308 let it = this.iterator;
309 if (!dart.notNull(it.moveNext())) { 309 if (!dart.notNull(dart.dcall(it.moveNext))) {
310 dart.throw(_internal.IterableElementError.noElement()); 310 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
311 } 311 }
312 return it.current; 312 return it.current;
313 } 313 }
314 get last() { 314 get last() {
315 let it = this.iterator; 315 let it = this.iterator;
316 if (!dart.notNull(it.moveNext())) { 316 if (!dart.notNull(dart.dcall(it.moveNext))) {
317 dart.throw(_internal.IterableElementError.noElement()); 317 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
318 } 318 }
319 let result = null; 319 let result = null;
320 do { 320 do {
321 result = it.current; 321 result = it.current;
322 } while (dart.notNull(it.moveNext())); 322 } while (dart.notNull(dart.dcall(it.moveNext)));
323 return result; 323 return result;
324 } 324 }
325 firstWhere(test, opts) { 325 firstWhere(test, opts) {
326 dart.as(test, dart.functionType(core.bool, [E])); 326 dart.as(test, dart.functionType(core.bool, [E]));
327 let orElse = opts && 'orElse' in opts ? opts.orElse : null; 327 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
328 dart.as(orElse, dart.functionType(E, [])); 328 dart.as(orElse, dart.functionType(E, []));
329 for (let element of this) { 329 for (let element of this) {
330 if (dart.notNull(test(element))) 330 if (dart.notNull(test(element)))
331 return element; 331 return element;
332 } 332 }
333 if (orElse != null) 333 if (orElse != null)
334 return orElse(); 334 return orElse();
335 dart.throw(_internal.IterableElementError.noElement()); 335 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
336 } 336 }
337 lastWhere(test, opts) { 337 lastWhere(test, opts) {
338 dart.as(test, dart.functionType(core.bool, [E])); 338 dart.as(test, dart.functionType(core.bool, [E]));
339 let orElse = opts && 'orElse' in opts ? opts.orElse : null; 339 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
340 dart.as(orElse, dart.functionType(E, [])); 340 dart.as(orElse, dart.functionType(E, []));
341 let result = null; 341 let result = null;
342 let foundMatching = false; 342 let foundMatching = false;
343 for (let element of this) { 343 for (let element of this) {
344 if (dart.notNull(test(element))) { 344 if (dart.notNull(test(element))) {
345 result = element; 345 result = element;
346 foundMatching = true; 346 foundMatching = true;
347 } 347 }
348 } 348 }
349 if (dart.notNull(foundMatching)) 349 if (dart.notNull(foundMatching))
350 return result; 350 return result;
351 if (orElse != null) 351 if (orElse != null)
352 return orElse(); 352 return orElse();
353 dart.throw(_internal.IterableElementError.noElement()); 353 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
354 } 354 }
355 singleWhere(test) { 355 singleWhere(test) {
356 dart.as(test, dart.functionType(core.bool, [E])); 356 dart.as(test, dart.functionType(core.bool, [E]));
357 let result = null; 357 let result = null;
358 let foundMatching = false; 358 let foundMatching = false;
359 for (let element of this) { 359 for (let element of this) {
360 if (dart.notNull(test(element))) { 360 if (dart.notNull(test(element))) {
361 if (dart.notNull(foundMatching)) { 361 if (dart.notNull(foundMatching)) {
362 dart.throw(_internal.IterableElementError.tooMany()); 362 dart.throw(dart.dcall(_internal.IterableElementError.tooMany));
363 } 363 }
364 result = element; 364 result = element;
365 foundMatching = true; 365 foundMatching = true;
366 } 366 }
367 } 367 }
368 if (dart.notNull(foundMatching)) 368 if (dart.notNull(foundMatching))
369 return result; 369 return result;
370 dart.throw(_internal.IterableElementError.noElement()); 370 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
371 } 371 }
372 elementAt(index) { 372 elementAt(index) {
373 if (!(typeof index == 'number')) 373 if (!(typeof index == 'number'))
374 dart.throw(new core.ArgumentError.notNull("index")); 374 dart.throw(new core.ArgumentError.notNull("index"));
375 core.RangeError.checkNotNegative(index, "index"); 375 dart.dcall(core.RangeError.checkNotNegative, index, "index");
376 let elementIndex = 0; 376 let elementIndex = 0;
377 for (let element of this) { 377 for (let element of this) {
378 if (index == elementIndex) 378 if (index == elementIndex)
379 return element; 379 return element;
380 elementIndex = dart.notNull(elementIndex) + 1; 380 elementIndex = dart.notNull(elementIndex) + 1;
381 } 381 }
382 dart.throw(core.RangeError.index(index, this, "index", null, elementInde x)); 382 dart.throw(core.RangeError.index(index, this, "index", null, elementInde x));
383 } 383 }
384 } 384 }
385 SetMixin[dart.implements] = () => [core.Set$(E)]; 385 SetMixin[dart.implements] = () => [core.Set$(E)];
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 'single', 439 'single',
440 'first', 440 'first',
441 'last' 441 'last'
442 ]); 442 ]);
443 return SetMixin; 443 return SetMixin;
444 }); 444 });
445 let SetMixin = SetMixin$(); 445 let SetMixin = SetMixin$();
446 let SetBase$ = dart.generic(function(E) { 446 let SetBase$ = dart.generic(function(E) {
447 class SetBase extends SetMixin$(E) { 447 class SetBase extends SetMixin$(E) {
448 static setToString(set) { 448 static setToString(set) {
449 return IterableBase.iterableToFullString(set, '{', '}'); 449 return dart.dcall(IterableBase.iterableToFullString, set, '{', '}');
450 } 450 }
451 } 451 }
452 dart.setSignature(SetBase, { 452 dart.setSignature(SetBase, {
453 statics: () => ({setToString: [core.String, [core.Set]]}), 453 statics: () => ({setToString: [core.String, [core.Set]]}),
454 names: ['setToString'] 454 names: ['setToString']
455 }); 455 });
456 return SetBase; 456 return SetBase;
457 }); 457 });
458 let SetBase = SetBase$(); 458 let SetBase = SetBase$();
459 let _newSet = Symbol('_newSet'); 459 let _newSet = Symbol('_newSet');
460 let _HashSetBase$ = dart.generic(function(E) { 460 let _HashSetBase$ = dart.generic(function(E) {
461 class _HashSetBase extends SetBase$(E) { 461 class _HashSetBase extends SetBase$(E) {
462 difference(other) { 462 difference(other) {
463 let result = this[_newSet](); 463 let result = dart.dcall(this[_newSet]);
464 for (let element of this) { 464 for (let element of this) {
465 if (!dart.notNull(other.contains(element))) 465 if (!dart.notNull(dart.dcall(other.contains, element)))
466 result.add(element); 466 dart.dcall(result.add, element);
467 } 467 }
468 return result; 468 return result;
469 } 469 }
470 intersection(other) { 470 intersection(other) {
471 let result = this[_newSet](); 471 let result = dart.dcall(this[_newSet]);
472 for (let element of this) { 472 for (let element of this) {
473 if (dart.notNull(other.contains(element))) 473 if (dart.notNull(dart.dcall(other.contains, element)))
474 result.add(element); 474 dart.dcall(result.add, element);
475 } 475 }
476 return result; 476 return result;
477 } 477 }
478 toSet() { 478 toSet() {
479 return (() => { 479 return (() => {
480 let _ = this[_newSet](); 480 let _ = dart.dcall(this[_newSet]);
481 _.addAll(this); 481 dart.dcall(_.addAll, this);
482 return _; 482 return _;
483 }).bind(this)(); 483 }).bind(this)();
484 } 484 }
485 } 485 }
486 dart.setSignature(_HashSetBase, { 486 dart.setSignature(_HashSetBase, {
487 methods: () => ({ 487 methods: () => ({
488 difference: [core.Set$(E), [core.Set$(core.Object)]], 488 difference: [core.Set$(E), [core.Set$(core.Object)]],
489 intersection: [core.Set$(E), [core.Set$(core.Object)]], 489 intersection: [core.Set$(E), [core.Set$(core.Object)]],
490 toSet: [core.Set$(E), []] 490 toSet: [core.Set$(E), []]
491 }) 491 })
492 }); 492 });
493 dart.defineExtensionMembers(_HashSetBase, ['toSet']); 493 dart.defineExtensionMembers(_HashSetBase, ['toSet']);
494 return _HashSetBase; 494 return _HashSetBase;
495 }); 495 });
496 let _HashSetBase = _HashSetBase$(); 496 let _HashSetBase = _HashSetBase$();
497 let HashSet$ = dart.generic(function(E) { 497 let HashSet$ = dart.generic(function(E) {
498 class HashSet extends core.Object { 498 class HashSet extends core.Object {
499 static new(opts) { 499 static new(opts) {
500 let equals = opts && 'equals' in opts ? opts.equals : null; 500 let equals = opts && 'equals' in opts ? opts.equals : null;
501 let hashCode = opts && 'hashCode' in opts ? opts.hashCode : null; 501 let hashCode = opts && 'hashCode' in opts ? opts.hashCode : null;
502 let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null; 502 let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null;
503 if (isValidKey == null) { 503 if (isValidKey == null) {
504 if (hashCode == null) { 504 if (hashCode == null) {
505 if (equals == null) { 505 if (equals == null) {
506 return new (_HashSet$(E))(); 506 return new (_HashSet$(E))();
507 } 507 }
508 hashCode = _defaultHashCode; 508 hashCode = _defaultHashCode;
509 } else { 509 } else {
510 if (dart.notNull(core.identical(core.identityHashCode, hashCode)) && dart.notNull(core.identical(core.identical, equals))) { 510 if (dart.notNull(dart.dcall(core.identical, core.identityHashCode, h ashCode)) && dart.notNull(dart.dcall(core.identical, core.identical, equals))) {
511 return new (_IdentityHashSet$(E))(); 511 return new (_IdentityHashSet$(E))();
512 } 512 }
513 if (equals == null) { 513 if (equals == null) {
514 equals = _defaultEquals; 514 equals = _defaultEquals;
515 } 515 }
516 } 516 }
517 } else { 517 } else {
518 if (hashCode == null) { 518 if (hashCode == null) {
519 hashCode = _defaultHashCode; 519 hashCode = _defaultHashCode;
520 } 520 }
521 if (equals == null) { 521 if (equals == null) {
522 equals = _defaultEquals; 522 equals = _defaultEquals;
523 } 523 }
524 } 524 }
525 return new (_CustomHashSet$(E))(equals, hashCode, isValidKey); 525 return new (_CustomHashSet$(E))(equals, hashCode, isValidKey);
526 } 526 }
527 static identity() { 527 static identity() {
528 return new (_IdentityHashSet$(E))(); 528 return new (_IdentityHashSet$(E))();
529 } 529 }
530 static from(elements) { 530 static from(elements) {
531 let result = HashSet$(E).new(); 531 let result = HashSet$(E).new();
532 for (let e of dart.as(elements, core.Iterable$(E))) 532 for (let e of dart.as(elements, core.Iterable$(E)))
533 result.add(e); 533 dart.dcall(result.add, e);
534 return result; 534 return result;
535 } 535 }
536 [Symbol.iterator]() { 536 [Symbol.iterator]() {
537 return new dart.JsIterator(this.iterator); 537 return new dart.JsIterator(this.iterator);
538 } 538 }
539 } 539 }
540 HashSet[dart.implements] = () => [core.Set$(E)]; 540 HashSet[dart.implements] = () => [core.Set$(E)];
541 dart.setSignature(HashSet, { 541 dart.setSignature(HashSet, {
542 constructors: () => ({ 542 constructors: () => ({
543 new: [HashSet$(E), [], {equals: dart.functionType(core.bool, [E, E]), ha shCode: dart.functionType(core.int, [E]), isValidKey: dart.functionType(core.boo l, [core.Object])}], 543 new: [HashSet$(E), [], {equals: dart.functionType(core.bool, [E, E]), ha shCode: dart.functionType(core.int, [E]), isValidKey: dart.functionType(core.boo l, [core.Object])}],
(...skipping 26 matching lines...) Expand all
570 return false; 570 return false;
571 } 571 }
572 forEach(f) { 572 forEach(f) {
573 dart.as(f, dart.functionType(dart.void, [E])); 573 dart.as(f, dart.functionType(dart.void, [E]));
574 for (let element of this) 574 for (let element of this)
575 f(element); 575 f(element);
576 } 576 }
577 reduce(combine) { 577 reduce(combine) {
578 dart.as(combine, dart.functionType(E, [E, E])); 578 dart.as(combine, dart.functionType(E, [E, E]));
579 let iterator = this.iterator; 579 let iterator = this.iterator;
580 if (!dart.notNull(iterator.moveNext())) { 580 if (!dart.notNull(dart.dcall(iterator.moveNext))) {
581 dart.throw(_internal.IterableElementError.noElement()); 581 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
582 } 582 }
583 let value = iterator.current; 583 let value = iterator.current;
584 while (dart.notNull(iterator.moveNext())) { 584 while (dart.notNull(dart.dcall(iterator.moveNext))) {
585 value = combine(value, iterator.current); 585 value = combine(value, iterator.current);
586 } 586 }
587 return value; 587 return value;
588 } 588 }
589 fold(initialValue, combine) { 589 fold(initialValue, combine) {
590 dart.as(combine, dart.functionType(dart.dynamic, [dart.dynamic, E])); 590 dart.as(combine, dart.functionType(dart.dynamic, [dart.dynamic, E]));
591 let value = initialValue; 591 let value = initialValue;
592 for (let element of this) 592 for (let element of this)
593 value = dart.dcall(combine, value, element); 593 value = dart.dcall(combine, value, element);
594 return value; 594 return value;
595 } 595 }
596 every(f) { 596 every(f) {
597 dart.as(f, dart.functionType(core.bool, [E])); 597 dart.as(f, dart.functionType(core.bool, [E]));
598 for (let element of this) { 598 for (let element of this) {
599 if (!dart.notNull(f(element))) 599 if (!dart.notNull(f(element)))
600 return false; 600 return false;
601 } 601 }
602 return true; 602 return true;
603 } 603 }
604 join(separator) { 604 join(separator) {
605 if (separator === void 0) 605 if (separator === void 0)
606 separator = ""; 606 separator = "";
607 let iterator = this.iterator; 607 let iterator = this.iterator;
608 if (!dart.notNull(iterator.moveNext())) 608 if (!dart.notNull(dart.dcall(iterator.moveNext)))
609 return ""; 609 return "";
610 let buffer = new core.StringBuffer(); 610 let buffer = new core.StringBuffer();
611 if (separator == null || separator == "") { 611 if (separator == null || separator == "") {
612 do { 612 do {
613 buffer.write(`${iterator.current}`); 613 dart.dcall(buffer.write, `${iterator.current}`);
614 } while (dart.notNull(iterator.moveNext())); 614 } while (dart.notNull(dart.dcall(iterator.moveNext)));
615 } else { 615 } else {
616 buffer.write(`${iterator.current}`); 616 dart.dcall(buffer.write, `${iterator.current}`);
617 while (dart.notNull(iterator.moveNext())) { 617 while (dart.notNull(dart.dcall(iterator.moveNext))) {
618 buffer.write(separator); 618 dart.dcall(buffer.write, separator);
619 buffer.write(`${iterator.current}`); 619 dart.dcall(buffer.write, `${iterator.current}`);
620 } 620 }
621 } 621 }
622 return dart.toString(buffer); 622 return dart.dcall(buffer.toString);
623 } 623 }
624 any(f) { 624 any(f) {
625 dart.as(f, dart.functionType(core.bool, [E])); 625 dart.as(f, dart.functionType(core.bool, [E]));
626 for (let element of this) { 626 for (let element of this) {
627 if (dart.notNull(f(element))) 627 if (dart.notNull(f(element)))
628 return true; 628 return true;
629 } 629 }
630 return false; 630 return false;
631 } 631 }
632 toList(opts) { 632 toList(opts) {
633 let growable = opts && 'growable' in opts ? opts.growable : true; 633 let growable = opts && 'growable' in opts ? opts.growable : true;
634 return core.List$(E).from(this, {growable: growable}); 634 return core.List$(E).from(this, {growable: growable});
635 } 635 }
636 toSet() { 636 toSet() {
637 return core.Set$(E).from(this); 637 return core.Set$(E).from(this);
638 } 638 }
639 get length() { 639 get length() {
640 dart.assert(!dart.is(this, _internal.EfficientLength)); 640 dart.assert(!dart.is(this, _internal.EfficientLength));
641 let count = 0; 641 let count = 0;
642 let it = this[dartx.iterator]; 642 let it = this[dartx.iterator];
643 while (dart.notNull(it.moveNext())) { 643 while (dart.notNull(dart.dcall(it.moveNext))) {
644 count = dart.notNull(count) + 1; 644 count = dart.notNull(count) + 1;
645 } 645 }
646 return count; 646 return count;
647 } 647 }
648 get isEmpty() { 648 get isEmpty() {
649 return !dart.notNull(this[dartx.iterator].moveNext()); 649 return !dart.notNull(dart.dcall(this[dartx.iterator].moveNext));
650 } 650 }
651 get isNotEmpty() { 651 get isNotEmpty() {
652 return !dart.notNull(this.isEmpty); 652 return !dart.notNull(this.isEmpty);
653 } 653 }
654 take(n) { 654 take(n) {
655 return _internal.TakeIterable$(E).new(this, n); 655 return _internal.TakeIterable$(E).new(this, n);
656 } 656 }
657 takeWhile(test) { 657 takeWhile(test) {
658 dart.as(test, dart.functionType(core.bool, [E])); 658 dart.as(test, dart.functionType(core.bool, [E]));
659 return new (_internal.TakeWhileIterable$(E))(this, test); 659 return new (_internal.TakeWhileIterable$(E))(this, test);
660 } 660 }
661 skip(n) { 661 skip(n) {
662 return _internal.SkipIterable$(E).new(this, n); 662 return _internal.SkipIterable$(E).new(this, n);
663 } 663 }
664 skipWhile(test) { 664 skipWhile(test) {
665 dart.as(test, dart.functionType(core.bool, [E])); 665 dart.as(test, dart.functionType(core.bool, [E]));
666 return new (_internal.SkipWhileIterable$(E))(this, test); 666 return new (_internal.SkipWhileIterable$(E))(this, test);
667 } 667 }
668 get first() { 668 get first() {
669 let it = this[dartx.iterator]; 669 let it = this[dartx.iterator];
670 if (!dart.notNull(it.moveNext())) { 670 if (!dart.notNull(dart.dcall(it.moveNext))) {
671 dart.throw(_internal.IterableElementError.noElement()); 671 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
672 } 672 }
673 return it.current; 673 return it.current;
674 } 674 }
675 get last() { 675 get last() {
676 let it = this[dartx.iterator]; 676 let it = this[dartx.iterator];
677 if (!dart.notNull(it.moveNext())) { 677 if (!dart.notNull(dart.dcall(it.moveNext))) {
678 dart.throw(_internal.IterableElementError.noElement()); 678 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
679 } 679 }
680 let result = null; 680 let result = null;
681 do { 681 do {
682 result = it.current; 682 result = it.current;
683 } while (dart.notNull(it.moveNext())); 683 } while (dart.notNull(dart.dcall(it.moveNext)));
684 return result; 684 return result;
685 } 685 }
686 get single() { 686 get single() {
687 let it = this[dartx.iterator]; 687 let it = this[dartx.iterator];
688 if (!dart.notNull(it.moveNext())) 688 if (!dart.notNull(dart.dcall(it.moveNext)))
689 dart.throw(_internal.IterableElementError.noElement()); 689 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
690 let result = it.current; 690 let result = it.current;
691 if (dart.notNull(it.moveNext())) 691 if (dart.notNull(dart.dcall(it.moveNext)))
692 dart.throw(_internal.IterableElementError.tooMany()); 692 dart.throw(dart.dcall(_internal.IterableElementError.tooMany));
693 return result; 693 return result;
694 } 694 }
695 firstWhere(test, opts) { 695 firstWhere(test, opts) {
696 dart.as(test, dart.functionType(core.bool, [E])); 696 dart.as(test, dart.functionType(core.bool, [E]));
697 let orElse = opts && 'orElse' in opts ? opts.orElse : null; 697 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
698 dart.as(orElse, dart.functionType(E, [])); 698 dart.as(orElse, dart.functionType(E, []));
699 for (let element of this) { 699 for (let element of this) {
700 if (dart.notNull(test(element))) 700 if (dart.notNull(test(element)))
701 return element; 701 return element;
702 } 702 }
703 if (orElse != null) 703 if (orElse != null)
704 return orElse(); 704 return orElse();
705 dart.throw(_internal.IterableElementError.noElement()); 705 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
706 } 706 }
707 lastWhere(test, opts) { 707 lastWhere(test, opts) {
708 dart.as(test, dart.functionType(core.bool, [E])); 708 dart.as(test, dart.functionType(core.bool, [E]));
709 let orElse = opts && 'orElse' in opts ? opts.orElse : null; 709 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
710 dart.as(orElse, dart.functionType(E, [])); 710 dart.as(orElse, dart.functionType(E, []));
711 let result = null; 711 let result = null;
712 let foundMatching = false; 712 let foundMatching = false;
713 for (let element of this) { 713 for (let element of this) {
714 if (dart.notNull(test(element))) { 714 if (dart.notNull(test(element))) {
715 result = element; 715 result = element;
716 foundMatching = true; 716 foundMatching = true;
717 } 717 }
718 } 718 }
719 if (dart.notNull(foundMatching)) 719 if (dart.notNull(foundMatching))
720 return result; 720 return result;
721 if (orElse != null) 721 if (orElse != null)
722 return orElse(); 722 return orElse();
723 dart.throw(_internal.IterableElementError.noElement()); 723 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
724 } 724 }
725 singleWhere(test) { 725 singleWhere(test) {
726 dart.as(test, dart.functionType(core.bool, [E])); 726 dart.as(test, dart.functionType(core.bool, [E]));
727 let result = null; 727 let result = null;
728 let foundMatching = false; 728 let foundMatching = false;
729 for (let element of this) { 729 for (let element of this) {
730 if (dart.notNull(test(element))) { 730 if (dart.notNull(test(element))) {
731 if (dart.notNull(foundMatching)) { 731 if (dart.notNull(foundMatching)) {
732 dart.throw(_internal.IterableElementError.tooMany()); 732 dart.throw(dart.dcall(_internal.IterableElementError.tooMany));
733 } 733 }
734 result = element; 734 result = element;
735 foundMatching = true; 735 foundMatching = true;
736 } 736 }
737 } 737 }
738 if (dart.notNull(foundMatching)) 738 if (dart.notNull(foundMatching))
739 return result; 739 return result;
740 dart.throw(_internal.IterableElementError.noElement()); 740 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
741 } 741 }
742 elementAt(index) { 742 elementAt(index) {
743 if (!(typeof index == 'number')) 743 if (!(typeof index == 'number'))
744 dart.throw(new core.ArgumentError.notNull("index")); 744 dart.throw(new core.ArgumentError.notNull("index"));
745 core.RangeError.checkNotNegative(index, "index"); 745 dart.dcall(core.RangeError.checkNotNegative, index, "index");
746 let elementIndex = 0; 746 let elementIndex = 0;
747 for (let element of this) { 747 for (let element of this) {
748 if (index == elementIndex) 748 if (index == elementIndex)
749 return element; 749 return element;
750 elementIndex = dart.notNull(elementIndex) + 1; 750 elementIndex = dart.notNull(elementIndex) + 1;
751 } 751 }
752 dart.throw(core.RangeError.index(index, this, "index", null, elementInde x)); 752 dart.throw(core.RangeError.index(index, this, "index", null, elementInde x));
753 } 753 }
754 toString() { 754 toString() {
755 return IterableBase.iterableToShortString(this, '(', ')'); 755 return dart.dcall(IterableBase.iterableToShortString, this, '(', ')');
756 } 756 }
757 [Symbol.iterator]() { 757 [Symbol.iterator]() {
758 return new dart.JsIterator(this.iterator); 758 return new dart.JsIterator(this.iterator);
759 } 759 }
760 } 760 }
761 IterableMixin[dart.implements] = () => [core.Iterable$(E)]; 761 IterableMixin[dart.implements] = () => [core.Iterable$(E)];
762 dart.setSignature(IterableMixin, { 762 dart.setSignature(IterableMixin, {
763 methods: () => ({ 763 methods: () => ({
764 map: [core.Iterable, [dart.functionType(dart.dynamic, [E])]], 764 map: [core.Iterable, [dart.functionType(dart.dynamic, [E])]],
765 where: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], 765 where: [core.Iterable$(E), [dart.functionType(core.bool, [E])]],
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 return false; 838 return false;
839 } 839 }
840 forEach(f) { 840 forEach(f) {
841 dart.as(f, dart.functionType(dart.void, [E])); 841 dart.as(f, dart.functionType(dart.void, [E]));
842 for (let element of this) 842 for (let element of this)
843 f(element); 843 f(element);
844 } 844 }
845 reduce(combine) { 845 reduce(combine) {
846 dart.as(combine, dart.functionType(E, [E, E])); 846 dart.as(combine, dart.functionType(E, [E, E]));
847 let iterator = this.iterator; 847 let iterator = this.iterator;
848 if (!dart.notNull(iterator.moveNext())) { 848 if (!dart.notNull(dart.dcall(iterator.moveNext))) {
849 dart.throw(_internal.IterableElementError.noElement()); 849 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
850 } 850 }
851 let value = iterator.current; 851 let value = iterator.current;
852 while (dart.notNull(iterator.moveNext())) { 852 while (dart.notNull(dart.dcall(iterator.moveNext))) {
853 value = combine(value, iterator.current); 853 value = combine(value, iterator.current);
854 } 854 }
855 return value; 855 return value;
856 } 856 }
857 fold(initialValue, combine) { 857 fold(initialValue, combine) {
858 dart.as(combine, dart.functionType(dart.dynamic, [dart.dynamic, E])); 858 dart.as(combine, dart.functionType(dart.dynamic, [dart.dynamic, E]));
859 let value = initialValue; 859 let value = initialValue;
860 for (let element of this) 860 for (let element of this)
861 value = dart.dcall(combine, value, element); 861 value = dart.dcall(combine, value, element);
862 return value; 862 return value;
863 } 863 }
864 every(f) { 864 every(f) {
865 dart.as(f, dart.functionType(core.bool, [E])); 865 dart.as(f, dart.functionType(core.bool, [E]));
866 for (let element of this) { 866 for (let element of this) {
867 if (!dart.notNull(f(element))) 867 if (!dart.notNull(f(element)))
868 return false; 868 return false;
869 } 869 }
870 return true; 870 return true;
871 } 871 }
872 join(separator) { 872 join(separator) {
873 if (separator === void 0) 873 if (separator === void 0)
874 separator = ""; 874 separator = "";
875 let iterator = this.iterator; 875 let iterator = this.iterator;
876 if (!dart.notNull(iterator.moveNext())) 876 if (!dart.notNull(dart.dcall(iterator.moveNext)))
877 return ""; 877 return "";
878 let buffer = new core.StringBuffer(); 878 let buffer = new core.StringBuffer();
879 if (separator == null || separator == "") { 879 if (separator == null || separator == "") {
880 do { 880 do {
881 buffer.write(`${iterator.current}`); 881 dart.dcall(buffer.write, `${iterator.current}`);
882 } while (dart.notNull(iterator.moveNext())); 882 } while (dart.notNull(dart.dcall(iterator.moveNext)));
883 } else { 883 } else {
884 buffer.write(`${iterator.current}`); 884 dart.dcall(buffer.write, `${iterator.current}`);
885 while (dart.notNull(iterator.moveNext())) { 885 while (dart.notNull(dart.dcall(iterator.moveNext))) {
886 buffer.write(separator); 886 dart.dcall(buffer.write, separator);
887 buffer.write(`${iterator.current}`); 887 dart.dcall(buffer.write, `${iterator.current}`);
888 } 888 }
889 } 889 }
890 return dart.toString(buffer); 890 return dart.dcall(buffer.toString);
891 } 891 }
892 any(f) { 892 any(f) {
893 dart.as(f, dart.functionType(core.bool, [E])); 893 dart.as(f, dart.functionType(core.bool, [E]));
894 for (let element of this) { 894 for (let element of this) {
895 if (dart.notNull(f(element))) 895 if (dart.notNull(f(element)))
896 return true; 896 return true;
897 } 897 }
898 return false; 898 return false;
899 } 899 }
900 toList(opts) { 900 toList(opts) {
901 let growable = opts && 'growable' in opts ? opts.growable : true; 901 let growable = opts && 'growable' in opts ? opts.growable : true;
902 return core.List$(E).from(this, {growable: growable}); 902 return core.List$(E).from(this, {growable: growable});
903 } 903 }
904 toSet() { 904 toSet() {
905 return core.Set$(E).from(this); 905 return core.Set$(E).from(this);
906 } 906 }
907 get length() { 907 get length() {
908 dart.assert(!dart.is(this, _internal.EfficientLength)); 908 dart.assert(!dart.is(this, _internal.EfficientLength));
909 let count = 0; 909 let count = 0;
910 let it = this[dartx.iterator]; 910 let it = this[dartx.iterator];
911 while (dart.notNull(it.moveNext())) { 911 while (dart.notNull(dart.dcall(it.moveNext))) {
912 count = dart.notNull(count) + 1; 912 count = dart.notNull(count) + 1;
913 } 913 }
914 return count; 914 return count;
915 } 915 }
916 get isEmpty() { 916 get isEmpty() {
917 return !dart.notNull(this[dartx.iterator].moveNext()); 917 return !dart.notNull(dart.dcall(this[dartx.iterator].moveNext));
918 } 918 }
919 get isNotEmpty() { 919 get isNotEmpty() {
920 return !dart.notNull(this.isEmpty); 920 return !dart.notNull(this.isEmpty);
921 } 921 }
922 take(n) { 922 take(n) {
923 return _internal.TakeIterable$(E).new(this, n); 923 return _internal.TakeIterable$(E).new(this, n);
924 } 924 }
925 takeWhile(test) { 925 takeWhile(test) {
926 dart.as(test, dart.functionType(core.bool, [E])); 926 dart.as(test, dart.functionType(core.bool, [E]));
927 return new (_internal.TakeWhileIterable$(E))(this, test); 927 return new (_internal.TakeWhileIterable$(E))(this, test);
928 } 928 }
929 skip(n) { 929 skip(n) {
930 return _internal.SkipIterable$(E).new(this, n); 930 return _internal.SkipIterable$(E).new(this, n);
931 } 931 }
932 skipWhile(test) { 932 skipWhile(test) {
933 dart.as(test, dart.functionType(core.bool, [E])); 933 dart.as(test, dart.functionType(core.bool, [E]));
934 return new (_internal.SkipWhileIterable$(E))(this, test); 934 return new (_internal.SkipWhileIterable$(E))(this, test);
935 } 935 }
936 get first() { 936 get first() {
937 let it = this[dartx.iterator]; 937 let it = this[dartx.iterator];
938 if (!dart.notNull(it.moveNext())) { 938 if (!dart.notNull(dart.dcall(it.moveNext))) {
939 dart.throw(_internal.IterableElementError.noElement()); 939 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
940 } 940 }
941 return it.current; 941 return it.current;
942 } 942 }
943 get last() { 943 get last() {
944 let it = this[dartx.iterator]; 944 let it = this[dartx.iterator];
945 if (!dart.notNull(it.moveNext())) { 945 if (!dart.notNull(dart.dcall(it.moveNext))) {
946 dart.throw(_internal.IterableElementError.noElement()); 946 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
947 } 947 }
948 let result = null; 948 let result = null;
949 do { 949 do {
950 result = it.current; 950 result = it.current;
951 } while (dart.notNull(it.moveNext())); 951 } while (dart.notNull(dart.dcall(it.moveNext)));
952 return result; 952 return result;
953 } 953 }
954 get single() { 954 get single() {
955 let it = this[dartx.iterator]; 955 let it = this[dartx.iterator];
956 if (!dart.notNull(it.moveNext())) 956 if (!dart.notNull(dart.dcall(it.moveNext)))
957 dart.throw(_internal.IterableElementError.noElement()); 957 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
958 let result = it.current; 958 let result = it.current;
959 if (dart.notNull(it.moveNext())) 959 if (dart.notNull(dart.dcall(it.moveNext)))
960 dart.throw(_internal.IterableElementError.tooMany()); 960 dart.throw(dart.dcall(_internal.IterableElementError.tooMany));
961 return result; 961 return result;
962 } 962 }
963 firstWhere(test, opts) { 963 firstWhere(test, opts) {
964 dart.as(test, dart.functionType(core.bool, [E])); 964 dart.as(test, dart.functionType(core.bool, [E]));
965 let orElse = opts && 'orElse' in opts ? opts.orElse : null; 965 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
966 dart.as(orElse, dart.functionType(E, [])); 966 dart.as(orElse, dart.functionType(E, []));
967 for (let element of this) { 967 for (let element of this) {
968 if (dart.notNull(test(element))) 968 if (dart.notNull(test(element)))
969 return element; 969 return element;
970 } 970 }
971 if (orElse != null) 971 if (orElse != null)
972 return orElse(); 972 return orElse();
973 dart.throw(_internal.IterableElementError.noElement()); 973 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
974 } 974 }
975 lastWhere(test, opts) { 975 lastWhere(test, opts) {
976 dart.as(test, dart.functionType(core.bool, [E])); 976 dart.as(test, dart.functionType(core.bool, [E]));
977 let orElse = opts && 'orElse' in opts ? opts.orElse : null; 977 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
978 dart.as(orElse, dart.functionType(E, [])); 978 dart.as(orElse, dart.functionType(E, []));
979 let result = null; 979 let result = null;
980 let foundMatching = false; 980 let foundMatching = false;
981 for (let element of this) { 981 for (let element of this) {
982 if (dart.notNull(test(element))) { 982 if (dart.notNull(test(element))) {
983 result = element; 983 result = element;
984 foundMatching = true; 984 foundMatching = true;
985 } 985 }
986 } 986 }
987 if (dart.notNull(foundMatching)) 987 if (dart.notNull(foundMatching))
988 return result; 988 return result;
989 if (orElse != null) 989 if (orElse != null)
990 return orElse(); 990 return orElse();
991 dart.throw(_internal.IterableElementError.noElement()); 991 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
992 } 992 }
993 singleWhere(test) { 993 singleWhere(test) {
994 dart.as(test, dart.functionType(core.bool, [E])); 994 dart.as(test, dart.functionType(core.bool, [E]));
995 let result = null; 995 let result = null;
996 let foundMatching = false; 996 let foundMatching = false;
997 for (let element of this) { 997 for (let element of this) {
998 if (dart.notNull(test(element))) { 998 if (dart.notNull(test(element))) {
999 if (dart.notNull(foundMatching)) { 999 if (dart.notNull(foundMatching)) {
1000 dart.throw(_internal.IterableElementError.tooMany()); 1000 dart.throw(dart.dcall(_internal.IterableElementError.tooMany));
1001 } 1001 }
1002 result = element; 1002 result = element;
1003 foundMatching = true; 1003 foundMatching = true;
1004 } 1004 }
1005 } 1005 }
1006 if (dart.notNull(foundMatching)) 1006 if (dart.notNull(foundMatching))
1007 return result; 1007 return result;
1008 dart.throw(_internal.IterableElementError.noElement()); 1008 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
1009 } 1009 }
1010 elementAt(index) { 1010 elementAt(index) {
1011 if (!(typeof index == 'number')) 1011 if (!(typeof index == 'number'))
1012 dart.throw(new core.ArgumentError.notNull("index")); 1012 dart.throw(new core.ArgumentError.notNull("index"));
1013 core.RangeError.checkNotNegative(index, "index"); 1013 dart.dcall(core.RangeError.checkNotNegative, index, "index");
1014 let elementIndex = 0; 1014 let elementIndex = 0;
1015 for (let element of this) { 1015 for (let element of this) {
1016 if (index == elementIndex) 1016 if (index == elementIndex)
1017 return element; 1017 return element;
1018 elementIndex = dart.notNull(elementIndex) + 1; 1018 elementIndex = dart.notNull(elementIndex) + 1;
1019 } 1019 }
1020 dart.throw(core.RangeError.index(index, this, "index", null, elementInde x)); 1020 dart.throw(core.RangeError.index(index, this, "index", null, elementInde x));
1021 } 1021 }
1022 toString() { 1022 toString() {
1023 return IterableBase$().iterableToShortString(this, '(', ')'); 1023 return dart.dcall(IterableBase$().iterableToShortString, this, '(', ')') ;
1024 } 1024 }
1025 static iterableToShortString(iterable, leftDelimiter, rightDelimiter) { 1025 static iterableToShortString(iterable, leftDelimiter, rightDelimiter) {
1026 if (leftDelimiter === void 0) 1026 if (leftDelimiter === void 0)
1027 leftDelimiter = '('; 1027 leftDelimiter = '(';
1028 if (rightDelimiter === void 0) 1028 if (rightDelimiter === void 0)
1029 rightDelimiter = ')'; 1029 rightDelimiter = ')';
1030 if (dart.notNull(IterableBase$()._isToStringVisiting(iterable))) { 1030 if (dart.notNull(dart.dcall(IterableBase$()._isToStringVisiting, iterabl e))) {
1031 if (leftDelimiter == "(" && rightDelimiter == ")") { 1031 if (leftDelimiter == "(" && rightDelimiter == ")") {
1032 return "(...)"; 1032 return "(...)";
1033 } 1033 }
1034 return `${leftDelimiter}...${rightDelimiter}`; 1034 return `${leftDelimiter}...${rightDelimiter}`;
1035 } 1035 }
1036 let parts = []; 1036 let parts = [];
1037 IterableBase$()._toStringVisiting[dartx.add](iterable); 1037 dart.dcall(IterableBase$()._toStringVisiting[dartx.add], iterable);
1038 try { 1038 try {
1039 IterableBase$()._iterablePartsToStrings(iterable, parts); 1039 dart.dcall(IterableBase$()._iterablePartsToStrings, iterable, parts);
1040 } finally { 1040 } finally {
1041 dart.assert(core.identical(IterableBase$()._toStringVisiting[dartx.las t], iterable)); 1041 dart.assert(dart.dcall(core.identical, IterableBase$()._toStringVisiti ng[dartx.last], iterable));
1042 IterableBase$()._toStringVisiting[dartx.removeLast](); 1042 dart.dcall(IterableBase$()._toStringVisiting[dartx.removeLast]);
1043 } 1043 }
1044 return dart.toString((() => { 1044 return dart.dcall((() => {
1045 let _ = new core.StringBuffer(leftDelimiter); 1045 let _ = new core.StringBuffer(leftDelimiter);
1046 _.writeAll(parts, ", "); 1046 dart.dcall(_.writeAll, parts, ", ");
1047 _.write(rightDelimiter); 1047 dart.dcall(_.write, rightDelimiter);
1048 return _; 1048 return _;
1049 })()); 1049 })().toString);
1050 } 1050 }
1051 static iterableToFullString(iterable, leftDelimiter, rightDelimiter) { 1051 static iterableToFullString(iterable, leftDelimiter, rightDelimiter) {
1052 if (leftDelimiter === void 0) 1052 if (leftDelimiter === void 0)
1053 leftDelimiter = '('; 1053 leftDelimiter = '(';
1054 if (rightDelimiter === void 0) 1054 if (rightDelimiter === void 0)
1055 rightDelimiter = ')'; 1055 rightDelimiter = ')';
1056 if (dart.notNull(IterableBase$()._isToStringVisiting(iterable))) { 1056 if (dart.notNull(dart.dcall(IterableBase$()._isToStringVisiting, iterabl e))) {
1057 return `${leftDelimiter}...${rightDelimiter}`; 1057 return `${leftDelimiter}...${rightDelimiter}`;
1058 } 1058 }
1059 let buffer = new core.StringBuffer(leftDelimiter); 1059 let buffer = new core.StringBuffer(leftDelimiter);
1060 IterableBase$()._toStringVisiting[dartx.add](iterable); 1060 dart.dcall(IterableBase$()._toStringVisiting[dartx.add], iterable);
1061 try { 1061 try {
1062 buffer.writeAll(iterable, ", "); 1062 dart.dcall(buffer.writeAll, iterable, ", ");
1063 } finally { 1063 } finally {
1064 dart.assert(core.identical(IterableBase$()._toStringVisiting[dartx.las t], iterable)); 1064 dart.assert(dart.dcall(core.identical, IterableBase$()._toStringVisiti ng[dartx.last], iterable));
1065 IterableBase$()._toStringVisiting[dartx.removeLast](); 1065 dart.dcall(IterableBase$()._toStringVisiting[dartx.removeLast]);
1066 } 1066 }
1067 buffer.write(rightDelimiter); 1067 dart.dcall(buffer.write, rightDelimiter);
1068 return dart.toString(buffer); 1068 return dart.dcall(buffer.toString);
1069 } 1069 }
1070 static _isToStringVisiting(o) { 1070 static _isToStringVisiting(o) {
1071 for (let i = 0; dart.notNull(i) < dart.notNull(IterableBase$()._toString Visiting[dartx.length]); i = dart.notNull(i) + 1) { 1071 for (let i = 0; dart.notNull(i) < dart.notNull(IterableBase$()._toString Visiting[dartx.length]); i = dart.notNull(i) + 1) {
1072 if (dart.notNull(core.identical(o, IterableBase$()._toStringVisiting[d artx.get](i)))) 1072 if (dart.notNull(dart.dcall(core.identical, o, IterableBase$()._toStri ngVisiting[dartx.get](i))))
1073 return true; 1073 return true;
1074 } 1074 }
1075 return false; 1075 return false;
1076 } 1076 }
1077 static _iterablePartsToStrings(iterable, parts) { 1077 static _iterablePartsToStrings(iterable, parts) {
1078 let LENGTH_LIMIT = 80; 1078 let LENGTH_LIMIT = 80;
1079 let HEAD_COUNT = 3; 1079 let HEAD_COUNT = 3;
1080 let TAIL_COUNT = 2; 1080 let TAIL_COUNT = 2;
1081 let MAX_COUNT = 100; 1081 let MAX_COUNT = 100;
1082 let OVERHEAD = 2; 1082 let OVERHEAD = 2;
1083 let ELLIPSIS_SIZE = 3; 1083 let ELLIPSIS_SIZE = 3;
1084 let length = 0; 1084 let length = 0;
1085 let count = 0; 1085 let count = 0;
1086 let it = iterable[dartx.iterator]; 1086 let it = iterable[dartx.iterator];
1087 while (dart.notNull(length) < dart.notNull(LENGTH_LIMIT) || dart.notNull (count) < dart.notNull(HEAD_COUNT)) { 1087 while (dart.notNull(length) < dart.notNull(LENGTH_LIMIT) || dart.notNull (count) < dart.notNull(HEAD_COUNT)) {
1088 if (!dart.notNull(it.moveNext())) 1088 if (!dart.notNull(dart.dcall(it.moveNext)))
1089 return; 1089 return;
1090 let next = `${it.current}`; 1090 let next = `${it.current}`;
1091 parts[dartx.add](next); 1091 dart.dcall(parts[dartx.add], next);
1092 length = dart.notNull(length) + (dart.notNull(next[dartx.length]) + da rt.notNull(OVERHEAD)); 1092 length = dart.notNull(length) + (dart.notNull(next[dartx.length]) + da rt.notNull(OVERHEAD));
1093 count = dart.notNull(count) + 1; 1093 count = dart.notNull(count) + 1;
1094 } 1094 }
1095 let penultimateString = null; 1095 let penultimateString = null;
1096 let ultimateString = null; 1096 let ultimateString = null;
1097 let penultimate = null; 1097 let penultimate = null;
1098 let ultimate = null; 1098 let ultimate = null;
1099 if (!dart.notNull(it.moveNext())) { 1099 if (!dart.notNull(dart.dcall(it.moveNext))) {
1100 if (dart.notNull(count) <= dart.notNull(HEAD_COUNT) + dart.notNull(TAI L_COUNT)) 1100 if (dart.notNull(count) <= dart.notNull(HEAD_COUNT) + dart.notNull(TAI L_COUNT))
1101 return; 1101 return;
1102 ultimateString = dart.as(parts[dartx.removeLast](), core.String); 1102 ultimateString = dart.as(dart.dcall(parts[dartx.removeLast]), core.Str ing);
1103 penultimateString = dart.as(parts[dartx.removeLast](), core.String); 1103 penultimateString = dart.as(dart.dcall(parts[dartx.removeLast]), core. String);
1104 } else { 1104 } else {
1105 penultimate = it.current; 1105 penultimate = it.current;
1106 count = dart.notNull(count) + 1; 1106 count = dart.notNull(count) + 1;
1107 if (!dart.notNull(it.moveNext())) { 1107 if (!dart.notNull(dart.dcall(it.moveNext))) {
1108 if (dart.notNull(count) <= dart.notNull(HEAD_COUNT) + 1) { 1108 if (dart.notNull(count) <= dart.notNull(HEAD_COUNT) + 1) {
1109 parts[dartx.add](`${penultimate}`); 1109 dart.dcall(parts[dartx.add], `${penultimate}`);
1110 return; 1110 return;
1111 } 1111 }
1112 ultimateString = `${penultimate}`; 1112 ultimateString = `${penultimate}`;
1113 penultimateString = dart.as(parts[dartx.removeLast](), core.String); 1113 penultimateString = dart.as(dart.dcall(parts[dartx.removeLast]), cor e.String);
1114 length = dart.notNull(length) + (dart.notNull(ultimateString[dartx.l ength]) + dart.notNull(OVERHEAD)); 1114 length = dart.notNull(length) + (dart.notNull(ultimateString[dartx.l ength]) + dart.notNull(OVERHEAD));
1115 } else { 1115 } else {
1116 ultimate = it.current; 1116 ultimate = it.current;
1117 count = dart.notNull(count) + 1; 1117 count = dart.notNull(count) + 1;
1118 dart.assert(dart.notNull(count) < dart.notNull(MAX_COUNT)); 1118 dart.assert(dart.notNull(count) < dart.notNull(MAX_COUNT));
1119 while (dart.notNull(it.moveNext())) { 1119 while (dart.notNull(dart.dcall(it.moveNext))) {
1120 penultimate = ultimate; 1120 penultimate = ultimate;
1121 ultimate = it.current; 1121 ultimate = it.current;
1122 count = dart.notNull(count) + 1; 1122 count = dart.notNull(count) + 1;
1123 if (dart.notNull(count) > dart.notNull(MAX_COUNT)) { 1123 if (dart.notNull(count) > dart.notNull(MAX_COUNT)) {
1124 while (dart.notNull(length) > dart.notNull(LENGTH_LIMIT) - dart. notNull(ELLIPSIS_SIZE) - dart.notNull(OVERHEAD) && dart.notNull(count) > dart.no tNull(HEAD_COUNT)) { 1124 while (dart.notNull(length) > dart.notNull(LENGTH_LIMIT) - dart. notNull(ELLIPSIS_SIZE) - dart.notNull(OVERHEAD) && dart.notNull(count) > dart.no tNull(HEAD_COUNT)) {
1125 length = dart.notNull(length) - dart.notNull(dart.as(dart.dsen d(dart.dload(parts[dartx.removeLast](), 'length'), '+', OVERHEAD), core.int)); 1125 length = dart.notNull(length) - dart.notNull(dart.as(dart.dsen d(dart.dload(dart.dcall(parts[dartx.removeLast]), 'length'), '+', OVERHEAD), cor e.int));
1126 count = dart.notNull(count) - 1; 1126 count = dart.notNull(count) - 1;
1127 } 1127 }
1128 parts[dartx.add]("..."); 1128 dart.dcall(parts[dartx.add], "...");
1129 return; 1129 return;
1130 } 1130 }
1131 } 1131 }
1132 penultimateString = `${penultimate}`; 1132 penultimateString = `${penultimate}`;
1133 ultimateString = `${ultimate}`; 1133 ultimateString = `${ultimate}`;
1134 length = dart.notNull(length) + (dart.notNull(ultimateString[dartx.l ength]) + dart.notNull(penultimateString[dartx.length]) + 2 * dart.notNull(OVERH EAD)); 1134 length = dart.notNull(length) + (dart.notNull(ultimateString[dartx.l ength]) + dart.notNull(penultimateString[dartx.length]) + 2 * dart.notNull(OVERH EAD));
1135 } 1135 }
1136 } 1136 }
1137 let elision = null; 1137 let elision = null;
1138 if (dart.notNull(count) > dart.notNull(parts[dartx.length]) + dart.notNu ll(TAIL_COUNT)) { 1138 if (dart.notNull(count) > dart.notNull(parts[dartx.length]) + dart.notNu ll(TAIL_COUNT)) {
1139 elision = "..."; 1139 elision = "...";
1140 length = dart.notNull(length) + (dart.notNull(ELLIPSIS_SIZE) + dart.no tNull(OVERHEAD)); 1140 length = dart.notNull(length) + (dart.notNull(ELLIPSIS_SIZE) + dart.no tNull(OVERHEAD));
1141 } 1141 }
1142 while (dart.notNull(length) > dart.notNull(LENGTH_LIMIT) && dart.notNull (parts[dartx.length]) > dart.notNull(HEAD_COUNT)) { 1142 while (dart.notNull(length) > dart.notNull(LENGTH_LIMIT) && dart.notNull (parts[dartx.length]) > dart.notNull(HEAD_COUNT)) {
1143 length = dart.notNull(length) - dart.notNull(dart.as(dart.dsend(dart.d load(parts[dartx.removeLast](), 'length'), '+', OVERHEAD), core.int)); 1143 length = dart.notNull(length) - dart.notNull(dart.as(dart.dsend(dart.d load(dart.dcall(parts[dartx.removeLast]), 'length'), '+', OVERHEAD), core.int));
1144 if (elision == null) { 1144 if (elision == null) {
1145 elision = "..."; 1145 elision = "...";
1146 length = dart.notNull(length) + (dart.notNull(ELLIPSIS_SIZE) + dart. notNull(OVERHEAD)); 1146 length = dart.notNull(length) + (dart.notNull(ELLIPSIS_SIZE) + dart. notNull(OVERHEAD));
1147 } 1147 }
1148 } 1148 }
1149 if (elision != null) { 1149 if (elision != null) {
1150 parts[dartx.add](elision); 1150 dart.dcall(parts[dartx.add], elision);
1151 } 1151 }
1152 parts[dartx.add](penultimateString); 1152 dart.dcall(parts[dartx.add], penultimateString);
1153 parts[dartx.add](ultimateString); 1153 dart.dcall(parts[dartx.add], ultimateString);
1154 } 1154 }
1155 [Symbol.iterator]() { 1155 [Symbol.iterator]() {
1156 return new dart.JsIterator(this.iterator); 1156 return new dart.JsIterator(this.iterator);
1157 } 1157 }
1158 } 1158 }
1159 IterableBase[dart.implements] = () => [core.Iterable$(E)]; 1159 IterableBase[dart.implements] = () => [core.Iterable$(E)];
1160 dart.setSignature(IterableBase, { 1160 dart.setSignature(IterableBase, {
1161 constructors: () => ({IterableBase: [IterableBase$(E), []]}), 1161 constructors: () => ({IterableBase: [IterableBase$(E), []]}),
1162 methods: () => ({ 1162 methods: () => ({
1163 map: [core.Iterable, [dart.functionType(dart.dynamic, [E])]], 1163 map: [core.Iterable, [dart.functionType(dart.dynamic, [E])]],
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
1229 let _state = Symbol('_state'); 1229 let _state = Symbol('_state');
1230 let _move = Symbol('_move'); 1230 let _move = Symbol('_move');
1231 let HasNextIterator$ = dart.generic(function(E) { 1231 let HasNextIterator$ = dart.generic(function(E) {
1232 class HasNextIterator extends core.Object { 1232 class HasNextIterator extends core.Object {
1233 HasNextIterator(iterator) { 1233 HasNextIterator(iterator) {
1234 this[_iterator] = iterator; 1234 this[_iterator] = iterator;
1235 this[_state] = HasNextIterator$()._NOT_MOVED_YET; 1235 this[_state] = HasNextIterator$()._NOT_MOVED_YET;
1236 } 1236 }
1237 get hasNext() { 1237 get hasNext() {
1238 if (this[_state] == HasNextIterator$()._NOT_MOVED_YET) 1238 if (this[_state] == HasNextIterator$()._NOT_MOVED_YET)
1239 this[_move](); 1239 dart.dcall(this[_move]);
1240 return this[_state] == HasNextIterator$()._HAS_NEXT_AND_NEXT_IN_CURRENT; 1240 return this[_state] == HasNextIterator$()._HAS_NEXT_AND_NEXT_IN_CURRENT;
1241 } 1241 }
1242 next() { 1242 next() {
1243 if (!dart.notNull(this.hasNext)) 1243 if (!dart.notNull(this.hasNext))
1244 dart.throw(new core.StateError("No more elements")); 1244 dart.throw(new core.StateError("No more elements"));
1245 dart.assert(this[_state] == HasNextIterator$()._HAS_NEXT_AND_NEXT_IN_CUR RENT); 1245 dart.assert(this[_state] == HasNextIterator$()._HAS_NEXT_AND_NEXT_IN_CUR RENT);
1246 let result = dart.as(this[_iterator].current, E); 1246 let result = dart.as(this[_iterator].current, E);
1247 this[_move](); 1247 dart.dcall(this[_move]);
1248 return result; 1248 return result;
1249 } 1249 }
1250 [_move]() { 1250 [_move]() {
1251 if (dart.notNull(this[_iterator].moveNext())) { 1251 if (dart.notNull(dart.dcall(this[_iterator].moveNext))) {
1252 this[_state] = HasNextIterator$()._HAS_NEXT_AND_NEXT_IN_CURRENT; 1252 this[_state] = HasNextIterator$()._HAS_NEXT_AND_NEXT_IN_CURRENT;
1253 } else { 1253 } else {
1254 this[_state] = HasNextIterator$()._NO_NEXT; 1254 this[_state] = HasNextIterator$()._NO_NEXT;
1255 } 1255 }
1256 } 1256 }
1257 } 1257 }
1258 dart.setSignature(HasNextIterator, { 1258 dart.setSignature(HasNextIterator, {
1259 constructors: () => ({HasNextIterator: [HasNextIterator$(E), [core.Iterato r]]}), 1259 constructors: () => ({HasNextIterator: [HasNextIterator$(E), [core.Iterato r]]}),
1260 methods: () => ({ 1260 methods: () => ({
1261 next: [E, []], 1261 next: [E, []],
(...skipping 12 matching lines...) Expand all
1274 let equals = opts && 'equals' in opts ? opts.equals : null; 1274 let equals = opts && 'equals' in opts ? opts.equals : null;
1275 let hashCode = opts && 'hashCode' in opts ? opts.hashCode : null; 1275 let hashCode = opts && 'hashCode' in opts ? opts.hashCode : null;
1276 let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null; 1276 let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null;
1277 if (isValidKey == null) { 1277 if (isValidKey == null) {
1278 if (hashCode == null) { 1278 if (hashCode == null) {
1279 if (equals == null) { 1279 if (equals == null) {
1280 return new (_LinkedHashMap$(K, V))(); 1280 return new (_LinkedHashMap$(K, V))();
1281 } 1281 }
1282 hashCode = _defaultHashCode; 1282 hashCode = _defaultHashCode;
1283 } else { 1283 } else {
1284 if (dart.notNull(core.identical(core.identityHashCode, hashCode)) && dart.notNull(core.identical(core.identical, equals))) { 1284 if (dart.notNull(dart.dcall(core.identical, core.identityHashCode, h ashCode)) && dart.notNull(dart.dcall(core.identical, core.identical, equals))) {
1285 return new (_LinkedIdentityHashMap$(K, V))(); 1285 return new (_LinkedIdentityHashMap$(K, V))();
1286 } 1286 }
1287 if (equals == null) { 1287 if (equals == null) {
1288 equals = _defaultEquals; 1288 equals = _defaultEquals;
1289 } 1289 }
1290 } 1290 }
1291 } else { 1291 } else {
1292 if (hashCode == null) { 1292 if (hashCode == null) {
1293 hashCode = _defaultHashCode; 1293 hashCode = _defaultHashCode;
1294 } 1294 }
1295 if (equals == null) { 1295 if (equals == null) {
1296 equals = _defaultEquals; 1296 equals = _defaultEquals;
1297 } 1297 }
1298 } 1298 }
1299 return new (_LinkedCustomHashMap$(K, V))(equals, hashCode, isValidKey); 1299 return new (_LinkedCustomHashMap$(K, V))(equals, hashCode, isValidKey);
1300 } 1300 }
1301 static identity() { 1301 static identity() {
1302 return new (_LinkedIdentityHashMap$(K, V))(); 1302 return new (_LinkedIdentityHashMap$(K, V))();
1303 } 1303 }
1304 static from(other) { 1304 static from(other) {
1305 let result = LinkedHashMap$(K, V).new(); 1305 let result = LinkedHashMap$(K, V).new();
1306 other.forEach(dart.fn((k, v) => { 1306 dart.dcall(other.forEach, dart.fn((k, v) => {
1307 result.set(dart.as(k, K), dart.as(v, V)); 1307 result.set(dart.as(k, K), dart.as(v, V));
1308 })); 1308 }));
1309 return result; 1309 return result;
1310 } 1310 }
1311 static fromIterable(iterable, opts) { 1311 static fromIterable(iterable, opts) {
1312 let key = opts && 'key' in opts ? opts.key : null; 1312 let key = opts && 'key' in opts ? opts.key : null;
1313 let value = opts && 'value' in opts ? opts.value : null; 1313 let value = opts && 'value' in opts ? opts.value : null;
1314 let map = LinkedHashMap$(K, V).new(); 1314 let map = LinkedHashMap$(K, V).new();
1315 Maps._fillMapWithMappedIterable(map, iterable, key, value); 1315 dart.dcall(Maps._fillMapWithMappedIterable, map, iterable, key, value);
1316 return map; 1316 return map;
1317 } 1317 }
1318 static fromIterables(keys, values) { 1318 static fromIterables(keys, values) {
1319 let map = LinkedHashMap$(K, V).new(); 1319 let map = LinkedHashMap$(K, V).new();
1320 Maps._fillMapWithIterables(map, keys, values); 1320 dart.dcall(Maps._fillMapWithIterables, map, keys, values);
1321 return map; 1321 return map;
1322 } 1322 }
1323 static _literal(keyValuePairs) { 1323 static _literal(keyValuePairs) {
1324 return dart.as(_js_helper.fillLiteralMap(keyValuePairs, new (_LinkedHash Map$(K, V))()), LinkedHashMap$(K, V)); 1324 return dart.as(dart.dcall(_js_helper.fillLiteralMap, keyValuePairs, new (_LinkedHashMap$(K, V))()), LinkedHashMap$(K, V));
1325 } 1325 }
1326 static _empty() { 1326 static _empty() {
1327 return new (_LinkedHashMap$(K, V))(); 1327 return new (_LinkedHashMap$(K, V))();
1328 } 1328 }
1329 } 1329 }
1330 LinkedHashMap[dart.implements] = () => [HashMap$(K, V)]; 1330 LinkedHashMap[dart.implements] = () => [HashMap$(K, V)];
1331 dart.setSignature(LinkedHashMap, { 1331 dart.setSignature(LinkedHashMap, {
1332 constructors: () => ({ 1332 constructors: () => ({
1333 new: [LinkedHashMap$(K, V), [], {equals: dart.functionType(core.bool, [K , K]), hashCode: dart.functionType(core.int, [K]), isValidKey: dart.functionType (core.bool, [core.Object])}], 1333 new: [LinkedHashMap$(K, V), [], {equals: dart.functionType(core.bool, [K , K]), hashCode: dart.functionType(core.int, [K]), isValidKey: dart.functionType (core.bool, [core.Object])}],
1334 identity: [LinkedHashMap$(K, V), []], 1334 identity: [LinkedHashMap$(K, V), []],
(...skipping 13 matching lines...) Expand all
1348 let equals = opts && 'equals' in opts ? opts.equals : null; 1348 let equals = opts && 'equals' in opts ? opts.equals : null;
1349 let hashCode = opts && 'hashCode' in opts ? opts.hashCode : null; 1349 let hashCode = opts && 'hashCode' in opts ? opts.hashCode : null;
1350 let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null; 1350 let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null;
1351 if (isValidKey == null) { 1351 if (isValidKey == null) {
1352 if (hashCode == null) { 1352 if (hashCode == null) {
1353 if (equals == null) { 1353 if (equals == null) {
1354 return new (_LinkedHashSet$(E))(); 1354 return new (_LinkedHashSet$(E))();
1355 } 1355 }
1356 hashCode = _defaultHashCode; 1356 hashCode = _defaultHashCode;
1357 } else { 1357 } else {
1358 if (dart.notNull(core.identical(core.identityHashCode, hashCode)) && dart.notNull(core.identical(core.identical, equals))) { 1358 if (dart.notNull(dart.dcall(core.identical, core.identityHashCode, h ashCode)) && dart.notNull(dart.dcall(core.identical, core.identical, equals))) {
1359 return new (_LinkedIdentityHashSet$(E))(); 1359 return new (_LinkedIdentityHashSet$(E))();
1360 } 1360 }
1361 if (equals == null) { 1361 if (equals == null) {
1362 equals = _defaultEquals; 1362 equals = _defaultEquals;
1363 } 1363 }
1364 } 1364 }
1365 } else { 1365 } else {
1366 if (hashCode == null) { 1366 if (hashCode == null) {
1367 hashCode = _defaultHashCode; 1367 hashCode = _defaultHashCode;
1368 } 1368 }
1369 if (equals == null) { 1369 if (equals == null) {
1370 equals = _defaultEquals; 1370 equals = _defaultEquals;
1371 } 1371 }
1372 } 1372 }
1373 return new (_LinkedCustomHashSet$(E))(equals, hashCode, isValidKey); 1373 return new (_LinkedCustomHashSet$(E))(equals, hashCode, isValidKey);
1374 } 1374 }
1375 static identity() { 1375 static identity() {
1376 return new (_LinkedIdentityHashSet$(E))(); 1376 return new (_LinkedIdentityHashSet$(E))();
1377 } 1377 }
1378 static from(elements) { 1378 static from(elements) {
1379 let result = LinkedHashSet$(E).new(); 1379 let result = LinkedHashSet$(E).new();
1380 for (let element of elements) { 1380 for (let element of elements) {
1381 result.add(element); 1381 dart.dcall(result.add, element);
1382 } 1382 }
1383 return result; 1383 return result;
1384 } 1384 }
1385 [Symbol.iterator]() { 1385 [Symbol.iterator]() {
1386 return new dart.JsIterator(this.iterator); 1386 return new dart.JsIterator(this.iterator);
1387 } 1387 }
1388 } 1388 }
1389 LinkedHashSet[dart.implements] = () => [HashSet$(E)]; 1389 LinkedHashSet[dart.implements] = () => [HashSet$(E)];
1390 dart.setSignature(LinkedHashSet, { 1390 dart.setSignature(LinkedHashSet, {
1391 constructors: () => ({ 1391 constructors: () => ({
(...skipping 17 matching lines...) Expand all
1409 LinkedList() { 1409 LinkedList() {
1410 this[_modificationCount] = 0; 1410 this[_modificationCount] = 0;
1411 this[_length] = 0; 1411 this[_length] = 0;
1412 this[_next] = null; 1412 this[_next] = null;
1413 this[_previous] = null; 1413 this[_previous] = null;
1414 super.IterableBase(); 1414 super.IterableBase();
1415 this[_next] = this[_previous] = this; 1415 this[_next] = this[_previous] = this;
1416 } 1416 }
1417 addFirst(entry) { 1417 addFirst(entry) {
1418 dart.as(entry, E); 1418 dart.as(entry, E);
1419 this[_insertAfter](this, entry); 1419 dart.dcall(this[_insertAfter], this, entry);
1420 } 1420 }
1421 add(entry) { 1421 add(entry) {
1422 dart.as(entry, E); 1422 dart.as(entry, E);
1423 this[_insertAfter](this[_previous], entry); 1423 dart.dcall(this[_insertAfter], this[_previous], entry);
1424 } 1424 }
1425 addAll(entries) { 1425 addAll(entries) {
1426 dart.as(entries, core.Iterable$(E)); 1426 dart.as(entries, core.Iterable$(E));
1427 entries[dartx.forEach](dart.fn((entry => this[_insertAfter](this[_previo us], dart.as(entry, E))).bind(this), dart.void, [dart.dynamic])); 1427 dart.dcall(entries[dartx.forEach], dart.fn((entry => dart.dcall(this[_in sertAfter], this[_previous], entry)).bind(this), dart.void, [dart.dynamic]));
1428 } 1428 }
1429 remove(entry) { 1429 remove(entry) {
1430 dart.as(entry, E); 1430 dart.as(entry, E);
1431 if (!dart.equals(entry[_list], this)) 1431 if (!dart.equals(entry[_list], this))
1432 return false; 1432 return false;
1433 this[_unlink](entry); 1433 dart.dcall(this[_unlink], entry);
1434 return true; 1434 return true;
1435 } 1435 }
1436 get iterator() { 1436 get iterator() {
1437 return new (_LinkedListIterator$(E))(this); 1437 return new (_LinkedListIterator$(E))(this);
1438 } 1438 }
1439 get length() { 1439 get length() {
1440 return this[_length]; 1440 return this[_length];
1441 } 1441 }
1442 clear() { 1442 clear() {
1443 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; 1443 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1;
1444 let next = this[_next]; 1444 let next = this[_next];
1445 while (!dart.notNull(core.identical(next, this))) { 1445 while (!dart.notNull(dart.dcall(core.identical, next, this))) {
1446 let entry = dart.as(next, E); 1446 let entry = dart.as(next, E);
1447 next = entry[_next]; 1447 next = entry[_next];
1448 entry[_next] = entry[_previous] = entry[_list] = null; 1448 entry[_next] = entry[_previous] = entry[_list] = null;
1449 } 1449 }
1450 this[_next] = this[_previous] = this; 1450 this[_next] = this[_previous] = this;
1451 this[_length] = 0; 1451 this[_length] = 0;
1452 } 1452 }
1453 get first() { 1453 get first() {
1454 if (dart.notNull(core.identical(this[_next], this))) { 1454 if (dart.notNull(dart.dcall(core.identical, this[_next], this))) {
1455 dart.throw(new core.StateError('No such element')); 1455 dart.throw(new core.StateError('No such element'));
1456 } 1456 }
1457 return dart.as(this[_next], E); 1457 return dart.as(this[_next], E);
1458 } 1458 }
1459 get last() { 1459 get last() {
1460 if (dart.notNull(core.identical(this[_previous], this))) { 1460 if (dart.notNull(dart.dcall(core.identical, this[_previous], this))) {
1461 dart.throw(new core.StateError('No such element')); 1461 dart.throw(new core.StateError('No such element'));
1462 } 1462 }
1463 return dart.as(this[_previous], E); 1463 return dart.as(this[_previous], E);
1464 } 1464 }
1465 get single() { 1465 get single() {
1466 if (dart.notNull(core.identical(this[_previous], this))) { 1466 if (dart.notNull(dart.dcall(core.identical, this[_previous], this))) {
1467 dart.throw(new core.StateError('No such element')); 1467 dart.throw(new core.StateError('No such element'));
1468 } 1468 }
1469 if (!dart.notNull(core.identical(this[_previous], this[_next]))) { 1469 if (!dart.notNull(dart.dcall(core.identical, this[_previous], this[_next ]))) {
1470 dart.throw(new core.StateError('Too many elements')); 1470 dart.throw(new core.StateError('Too many elements'));
1471 } 1471 }
1472 return dart.as(this[_next], E); 1472 return dart.as(this[_next], E);
1473 } 1473 }
1474 forEach(action) { 1474 forEach(action) {
1475 dart.as(action, dart.functionType(dart.void, [E])); 1475 dart.as(action, dart.functionType(dart.void, [E]));
1476 let modificationCount = this[_modificationCount]; 1476 let modificationCount = this[_modificationCount];
1477 let current = this[_next]; 1477 let current = this[_next];
1478 while (!dart.notNull(core.identical(current, this))) { 1478 while (!dart.notNull(dart.dcall(core.identical, current, this))) {
1479 action(dart.as(current, E)); 1479 action(dart.as(current, E));
1480 if (modificationCount != this[_modificationCount]) { 1480 if (modificationCount != this[_modificationCount]) {
1481 dart.throw(new core.ConcurrentModificationError(this)); 1481 dart.throw(new core.ConcurrentModificationError(this));
1482 } 1482 }
1483 current = current[_next]; 1483 current = current[_next];
1484 } 1484 }
1485 } 1485 }
1486 get isEmpty() { 1486 get isEmpty() {
1487 return this[_length] == 0; 1487 return this[_length] == 0;
1488 } 1488 }
1489 [_insertAfter](entry, newEntry) { 1489 [_insertAfter](entry, newEntry) {
1490 dart.as(newEntry, E); 1490 dart.as(newEntry, E);
1491 if (newEntry.list != null) { 1491 if (newEntry.list != null) {
1492 dart.throw(new core.StateError('LinkedListEntry is already in a Linked List')); 1492 dart.throw(new core.StateError('LinkedListEntry is already in a Linked List'));
1493 } 1493 }
1494 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; 1494 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1;
1495 newEntry[_list] = this; 1495 newEntry[_list] = this;
1496 let predecessor = entry; 1496 let predecessor = entry;
1497 let successor = entry[_next]; 1497 let successor = entry[_next];
1498 successor[_previous] = newEntry; 1498 dart.dput(successor, _previous, newEntry);
1499 newEntry[_previous] = predecessor; 1499 newEntry[_previous] = dart.as(predecessor, _LinkedListLink);
1500 newEntry[_next] = successor; 1500 newEntry[_next] = dart.as(successor, _LinkedListLink);
1501 predecessor[_next] = newEntry; 1501 dart.dput(predecessor, _next, newEntry);
1502 this[_length] = dart.notNull(this[_length]) + 1; 1502 this[_length] = dart.notNull(this[_length]) + 1;
1503 } 1503 }
1504 [_unlink](entry) { 1504 [_unlink](entry) {
1505 dart.as(entry, LinkedListEntry$(E)); 1505 dart.as(entry, LinkedListEntry$(E));
1506 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; 1506 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1;
1507 entry[_next][_previous] = entry[_previous]; 1507 entry[_next][_previous] = entry[_previous];
1508 entry[_previous][_next] = entry[_next]; 1508 entry[_previous][_next] = entry[_next];
1509 this[_length] = dart.notNull(this[_length]) - 1; 1509 this[_length] = dart.notNull(this[_length]) - 1;
1510 entry[_list] = entry[_next] = entry[_previous] = null; 1510 entry[_list] = entry[_next] = entry[_previous] = null;
1511 } 1511 }
(...skipping 30 matching lines...) Expand all
1542 _LinkedListIterator(list) { 1542 _LinkedListIterator(list) {
1543 this[_list] = list; 1543 this[_list] = list;
1544 this[_modificationCount] = list[_modificationCount]; 1544 this[_modificationCount] = list[_modificationCount];
1545 this[_next] = list[_next]; 1545 this[_next] = list[_next];
1546 this[_current] = null; 1546 this[_current] = null;
1547 } 1547 }
1548 get current() { 1548 get current() {
1549 return this[_current]; 1549 return this[_current];
1550 } 1550 }
1551 moveNext() { 1551 moveNext() {
1552 if (dart.notNull(core.identical(this[_next], this[_list]))) { 1552 if (dart.notNull(dart.dcall(core.identical, this[_next], this[_list]))) {
1553 this[_current] = null; 1553 this[_current] = null;
1554 return false; 1554 return false;
1555 } 1555 }
1556 if (this[_modificationCount] != this[_list][_modificationCount]) { 1556 if (this[_modificationCount] != this[_list][_modificationCount]) {
1557 dart.throw(new core.ConcurrentModificationError(this)); 1557 dart.throw(new core.ConcurrentModificationError(this));
1558 } 1558 }
1559 this[_current] = dart.as(this[_next], E); 1559 this[_current] = dart.as(this[_next], E);
1560 this[_next] = this[_next][_next]; 1560 this[_next] = this[_next][_next];
1561 return true; 1561 return true;
1562 } 1562 }
(...skipping 16 matching lines...) Expand all
1579 class LinkedListEntry extends core.Object { 1579 class LinkedListEntry extends core.Object {
1580 LinkedListEntry() { 1580 LinkedListEntry() {
1581 this[_list] = null; 1581 this[_list] = null;
1582 this[_next] = null; 1582 this[_next] = null;
1583 this[_previous] = null; 1583 this[_previous] = null;
1584 } 1584 }
1585 get list() { 1585 get list() {
1586 return this[_list]; 1586 return this[_list];
1587 } 1587 }
1588 unlink() { 1588 unlink() {
1589 this[_list][_unlink](this); 1589 dart.dcall(this[_list][_unlink], this);
1590 } 1590 }
1591 get next() { 1591 get next() {
1592 if (dart.notNull(core.identical(this[_next], this[_list]))) 1592 if (dart.notNull(dart.dcall(core.identical, this[_next], this[_list])))
1593 return null; 1593 return null;
1594 let result = dart.as(this[_next], E); 1594 let result = dart.as(this[_next], E);
1595 return result; 1595 return result;
1596 } 1596 }
1597 get previous() { 1597 get previous() {
1598 if (dart.notNull(core.identical(this[_previous], this[_list]))) 1598 if (dart.notNull(dart.dcall(core.identical, this[_previous], this[_list] )))
1599 return null; 1599 return null;
1600 return dart.as(this[_previous], E); 1600 return dart.as(this[_previous], E);
1601 } 1601 }
1602 insertAfter(entry) { 1602 insertAfter(entry) {
1603 dart.as(entry, E); 1603 dart.as(entry, E);
1604 this[_list][_insertAfter](this, entry); 1604 dart.dcall(this[_list][_insertAfter], this, entry);
1605 } 1605 }
1606 insertBefore(entry) { 1606 insertBefore(entry) {
1607 dart.as(entry, E); 1607 dart.as(entry, E);
1608 this[_list][_insertAfter](this[_previous], entry); 1608 dart.dcall(this[_list][_insertAfter], this[_previous], entry);
1609 } 1609 }
1610 } 1610 }
1611 LinkedListEntry[dart.implements] = () => [_LinkedListLink]; 1611 LinkedListEntry[dart.implements] = () => [_LinkedListLink];
1612 dart.setSignature(LinkedListEntry, { 1612 dart.setSignature(LinkedListEntry, {
1613 methods: () => ({ 1613 methods: () => ({
1614 unlink: [dart.void, []], 1614 unlink: [dart.void, []],
1615 insertAfter: [dart.void, [E]], 1615 insertAfter: [dart.void, [E]],
1616 insertBefore: [dart.void, [E]] 1616 insertBefore: [dart.void, [E]]
1617 }) 1617 })
1618 }); 1618 });
(...skipping 22 matching lines...) Expand all
1641 } 1641 }
1642 } 1642 }
1643 get isEmpty() { 1643 get isEmpty() {
1644 return this[dartx.length] == 0; 1644 return this[dartx.length] == 0;
1645 } 1645 }
1646 get isNotEmpty() { 1646 get isNotEmpty() {
1647 return !dart.notNull(this.isEmpty); 1647 return !dart.notNull(this.isEmpty);
1648 } 1648 }
1649 get first() { 1649 get first() {
1650 if (this[dartx.length] == 0) 1650 if (this[dartx.length] == 0)
1651 dart.throw(_internal.IterableElementError.noElement()); 1651 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
1652 return this.get(0); 1652 return this.get(0);
1653 } 1653 }
1654 get last() { 1654 get last() {
1655 if (this[dartx.length] == 0) 1655 if (this[dartx.length] == 0)
1656 dart.throw(_internal.IterableElementError.noElement()); 1656 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
1657 return this.get(dart.notNull(this[dartx.length]) - 1); 1657 return this.get(dart.notNull(this[dartx.length]) - 1);
1658 } 1658 }
1659 get single() { 1659 get single() {
1660 if (this[dartx.length] == 0) 1660 if (this[dartx.length] == 0)
1661 dart.throw(_internal.IterableElementError.noElement()); 1661 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
1662 if (dart.notNull(this[dartx.length]) > 1) 1662 if (dart.notNull(this[dartx.length]) > 1)
1663 dart.throw(_internal.IterableElementError.tooMany()); 1663 dart.throw(dart.dcall(_internal.IterableElementError.tooMany));
1664 return this.get(0); 1664 return this.get(0);
1665 } 1665 }
1666 contains(element) { 1666 contains(element) {
1667 let length = this.length; 1667 let length = this.length;
1668 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.no tNull(i) + 1) { 1668 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.no tNull(i) + 1) {
1669 if (dart.equals(this.get(i), element)) 1669 if (dart.equals(this.get(i), element))
1670 return true; 1670 return true;
1671 if (length != this.length) { 1671 if (length != this.length) {
1672 dart.throw(new core.ConcurrentModificationError(this)); 1672 dart.throw(new core.ConcurrentModificationError(this));
1673 } 1673 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1706 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 1706 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
1707 let element = this.get(i); 1707 let element = this.get(i);
1708 if (dart.notNull(test(element))) 1708 if (dart.notNull(test(element)))
1709 return element; 1709 return element;
1710 if (length != this.length) { 1710 if (length != this.length) {
1711 dart.throw(new core.ConcurrentModificationError(this)); 1711 dart.throw(new core.ConcurrentModificationError(this));
1712 } 1712 }
1713 } 1713 }
1714 if (orElse != null) 1714 if (orElse != null)
1715 return orElse(); 1715 return orElse();
1716 dart.throw(_internal.IterableElementError.noElement()); 1716 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
1717 } 1717 }
1718 lastWhere(test, opts) { 1718 lastWhere(test, opts) {
1719 dart.as(test, dart.functionType(core.bool, [E])); 1719 dart.as(test, dart.functionType(core.bool, [E]));
1720 let orElse = opts && 'orElse' in opts ? opts.orElse : null; 1720 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
1721 dart.as(orElse, dart.functionType(E, [])); 1721 dart.as(orElse, dart.functionType(E, []));
1722 let length = this.length; 1722 let length = this.length;
1723 for (let i = dart.notNull(length) - 1; dart.notNull(i) >= 0; i = dart.no tNull(i) - 1) { 1723 for (let i = dart.notNull(length) - 1; dart.notNull(i) >= 0; i = dart.no tNull(i) - 1) {
1724 let element = this.get(i); 1724 let element = this.get(i);
1725 if (dart.notNull(test(element))) 1725 if (dart.notNull(test(element)))
1726 return element; 1726 return element;
1727 if (length != this.length) { 1727 if (length != this.length) {
1728 dart.throw(new core.ConcurrentModificationError(this)); 1728 dart.throw(new core.ConcurrentModificationError(this));
1729 } 1729 }
1730 } 1730 }
1731 if (orElse != null) 1731 if (orElse != null)
1732 return orElse(); 1732 return orElse();
1733 dart.throw(_internal.IterableElementError.noElement()); 1733 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
1734 } 1734 }
1735 singleWhere(test) { 1735 singleWhere(test) {
1736 dart.as(test, dart.functionType(core.bool, [E])); 1736 dart.as(test, dart.functionType(core.bool, [E]));
1737 let length = this.length; 1737 let length = this.length;
1738 let match = null; 1738 let match = null;
1739 let matchFound = false; 1739 let matchFound = false;
1740 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 1740 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
1741 let element = this.get(i); 1741 let element = this.get(i);
1742 if (dart.notNull(test(element))) { 1742 if (dart.notNull(test(element))) {
1743 if (dart.notNull(matchFound)) { 1743 if (dart.notNull(matchFound)) {
1744 dart.throw(_internal.IterableElementError.tooMany()); 1744 dart.throw(dart.dcall(_internal.IterableElementError.tooMany));
1745 } 1745 }
1746 matchFound = true; 1746 matchFound = true;
1747 match = element; 1747 match = element;
1748 } 1748 }
1749 if (length != this.length) { 1749 if (length != this.length) {
1750 dart.throw(new core.ConcurrentModificationError(this)); 1750 dart.throw(new core.ConcurrentModificationError(this));
1751 } 1751 }
1752 } 1752 }
1753 if (dart.notNull(matchFound)) 1753 if (dart.notNull(matchFound))
1754 return match; 1754 return match;
1755 dart.throw(_internal.IterableElementError.noElement()); 1755 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
1756 } 1756 }
1757 join(separator) { 1757 join(separator) {
1758 if (separator === void 0) 1758 if (separator === void 0)
1759 separator = ""; 1759 separator = "";
1760 if (this[dartx.length] == 0) 1760 if (this[dartx.length] == 0)
1761 return ""; 1761 return "";
1762 let buffer = new core.StringBuffer(); 1762 let buffer = new core.StringBuffer();
1763 buffer.writeAll(this, separator); 1763 dart.dcall(buffer.writeAll, this, separator);
1764 return dart.toString(buffer); 1764 return dart.dcall(buffer.toString);
1765 } 1765 }
1766 where(test) { 1766 where(test) {
1767 dart.as(test, dart.functionType(core.bool, [E])); 1767 dart.as(test, dart.functionType(core.bool, [E]));
1768 return new (_internal.WhereIterable$(E))(this, test); 1768 return new (_internal.WhereIterable$(E))(this, test);
1769 } 1769 }
1770 map(f) { 1770 map(f) {
1771 dart.as(f, dart.functionType(dart.dynamic, [E])); 1771 dart.as(f, dart.functionType(dart.dynamic, [E]));
1772 return new _internal.MappedListIterable(this, f); 1772 return new _internal.MappedListIterable(this, f);
1773 } 1773 }
1774 expand(f) { 1774 expand(f) {
1775 dart.as(f, dart.functionType(core.Iterable, [E])); 1775 dart.as(f, dart.functionType(core.Iterable, [E]));
1776 return new (_internal.ExpandIterable$(E, dart.dynamic))(this, f); 1776 return new (_internal.ExpandIterable$(E, dart.dynamic))(this, f);
1777 } 1777 }
1778 reduce(combine) { 1778 reduce(combine) {
1779 dart.as(combine, dart.functionType(E, [E, E])); 1779 dart.as(combine, dart.functionType(E, [E, E]));
1780 let length = this.length; 1780 let length = this.length;
1781 if (length == 0) 1781 if (length == 0)
1782 dart.throw(_internal.IterableElementError.noElement()); 1782 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
1783 let value = this.get(0); 1783 let value = this.get(0);
1784 for (let i = 1; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 1784 for (let i = 1; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
1785 value = combine(value, this.get(i)); 1785 value = combine(value, this.get(i));
1786 if (length != this.length) { 1786 if (length != this.length) {
1787 dart.throw(new core.ConcurrentModificationError(this)); 1787 dart.throw(new core.ConcurrentModificationError(this));
1788 } 1788 }
1789 } 1789 }
1790 return value; 1790 return value;
1791 } 1791 }
1792 fold(initialValue, combine) { 1792 fold(initialValue, combine) {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1825 result = core.List$(E).new(this[dartx.length]); 1825 result = core.List$(E).new(this[dartx.length]);
1826 } 1826 }
1827 for (let i = 0; dart.notNull(i) < dart.notNull(this[dartx.length]); i = dart.notNull(i) + 1) { 1827 for (let i = 0; dart.notNull(i) < dart.notNull(this[dartx.length]); i = dart.notNull(i) + 1) {
1828 result[dartx.set](i, this.get(i)); 1828 result[dartx.set](i, this.get(i));
1829 } 1829 }
1830 return result; 1830 return result;
1831 } 1831 }
1832 toSet() { 1832 toSet() {
1833 let result = core.Set$(E).new(); 1833 let result = core.Set$(E).new();
1834 for (let i = 0; dart.notNull(i) < dart.notNull(this[dartx.length]); i = dart.notNull(i) + 1) { 1834 for (let i = 0; dart.notNull(i) < dart.notNull(this[dartx.length]); i = dart.notNull(i) + 1) {
1835 result.add(this.get(i)); 1835 dart.dcall(result.add, this.get(i));
1836 } 1836 }
1837 return result; 1837 return result;
1838 } 1838 }
1839 add(element) { 1839 add(element) {
1840 dart.as(element, E); 1840 dart.as(element, E);
1841 this.set((() => { 1841 this.set((() => {
1842 let x = this.length; 1842 let x = this.length;
1843 this.length = dart.notNull(x) + 1; 1843 this.length = dart.notNull(x) + 1;
1844 return x; 1844 return x;
1845 }).bind(this)(), element); 1845 }).bind(this)(), element);
1846 } 1846 }
1847 addAll(iterable) { 1847 addAll(iterable) {
1848 dart.as(iterable, core.Iterable$(E)); 1848 dart.as(iterable, core.Iterable$(E));
1849 for (let element of iterable) { 1849 for (let element of iterable) {
1850 this.set((() => { 1850 this.set((() => {
1851 let x = this.length; 1851 let x = this.length;
1852 this.length = dart.notNull(x) + 1; 1852 this.length = dart.notNull(x) + 1;
1853 return x; 1853 return x;
1854 }).bind(this)(), element); 1854 }).bind(this)(), element);
1855 } 1855 }
1856 } 1856 }
1857 remove(element) { 1857 remove(element) {
1858 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.no tNull(i) + 1) { 1858 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.no tNull(i) + 1) {
1859 if (dart.equals(this.get(i), element)) { 1859 if (dart.equals(this.get(i), element)) {
1860 this.setRange(i, dart.notNull(this.length) - 1, this, dart.notNull(i ) + 1); 1860 dart.dcall(this.setRange, i, dart.notNull(this.length) - 1, this, da rt.notNull(i) + 1);
1861 this.length = dart.notNull(this.length) - 1; 1861 this.length = dart.notNull(this.length) - 1;
1862 return true; 1862 return true;
1863 } 1863 }
1864 } 1864 }
1865 return false; 1865 return false;
1866 } 1866 }
1867 removeWhere(test) { 1867 removeWhere(test) {
1868 dart.as(test, dart.functionType(core.bool, [E])); 1868 dart.as(test, dart.functionType(core.bool, [E]));
1869 ListMixin$()._filter(this, test, false); 1869 dart.dcall(ListMixin$()._filter, this, test, false);
1870 } 1870 }
1871 retainWhere(test) { 1871 retainWhere(test) {
1872 dart.as(test, dart.functionType(core.bool, [E])); 1872 dart.as(test, dart.functionType(core.bool, [E]));
1873 ListMixin$()._filter(this, test, true); 1873 dart.dcall(ListMixin$()._filter, this, test, true);
1874 } 1874 }
1875 static _filter(source, test, retainMatching) { 1875 static _filter(source, test, retainMatching) {
1876 dart.as(test, dart.functionType(core.bool, [dart.dynamic])); 1876 dart.as(test, dart.functionType(core.bool, [dart.dynamic]));
1877 let retained = []; 1877 let retained = [];
1878 let length = source[dartx.length]; 1878 let length = source[dartx.length];
1879 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 1879 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
1880 let element = source[dartx.get](i); 1880 let element = source[dartx.get](i);
1881 if (dart.dcall(test, element) == retainMatching) { 1881 if (dart.dcall(test, element) == retainMatching) {
1882 retained[dartx.add](element); 1882 dart.dcall(retained[dartx.add], element);
1883 } 1883 }
1884 if (length != source[dartx.length]) { 1884 if (length != source[dartx.length]) {
1885 dart.throw(new core.ConcurrentModificationError(source)); 1885 dart.throw(new core.ConcurrentModificationError(source));
1886 } 1886 }
1887 } 1887 }
1888 if (retained[dartx.length] != source[dartx.length]) { 1888 if (retained[dartx.length] != source[dartx.length]) {
1889 source[dartx.setRange](0, retained[dartx.length], retained); 1889 dart.dcall(source[dartx.setRange], 0, retained[dartx.length], retained );
1890 source[dartx.length] = retained[dartx.length]; 1890 source[dartx.length] = retained[dartx.length];
1891 } 1891 }
1892 } 1892 }
1893 clear() { 1893 clear() {
1894 this.length = 0; 1894 this.length = 0;
1895 } 1895 }
1896 removeLast() { 1896 removeLast() {
1897 if (this[dartx.length] == 0) { 1897 if (this[dartx.length] == 0) {
1898 dart.throw(_internal.IterableElementError.noElement()); 1898 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
1899 } 1899 }
1900 let result = this.get(dart.notNull(this[dartx.length]) - 1); 1900 let result = this.get(dart.notNull(this[dartx.length]) - 1);
1901 this[dartx.length] = dart.notNull(this[dartx.length]) - 1; 1901 this[dartx.length] = dart.notNull(this[dartx.length]) - 1;
1902 return result; 1902 return result;
1903 } 1903 }
1904 sort(compare) { 1904 sort(compare) {
1905 if (compare === void 0) 1905 if (compare === void 0)
1906 compare = null; 1906 compare = null;
1907 dart.as(compare, dart.functionType(core.int, [E, E])); 1907 dart.as(compare, dart.functionType(core.int, [E, E]));
1908 _internal.Sort.sort(this, compare == null ? core.Comparable.compare : co mpare); 1908 dart.dcall(_internal.Sort.sort, this, compare == null ? core.Comparable. compare : compare);
1909 } 1909 }
1910 shuffle(random) { 1910 shuffle(random) {
1911 if (random === void 0) 1911 if (random === void 0)
1912 random = null; 1912 random = null;
1913 if (random == null) 1913 if (random == null)
1914 random = math.Random.new(); 1914 random = math.Random.new();
1915 let length = this.length; 1915 let length = this.length;
1916 while (dart.notNull(length) > 1) { 1916 while (dart.notNull(length) > 1) {
1917 let pos = random.nextInt(length); 1917 let pos = dart.dcall(random.nextInt, length);
1918 length = dart.notNull(length) - 1; 1918 length = dart.notNull(length) - 1;
1919 let tmp = this.get(length); 1919 let tmp = this.get(length);
1920 this.set(length, this.get(pos)); 1920 this.set(length, this.get(pos));
1921 this.set(pos, tmp); 1921 this.set(pos, dart.as(tmp, E));
1922 } 1922 }
1923 } 1923 }
1924 asMap() { 1924 asMap() {
1925 return new (_internal.ListMapView$(E))(this); 1925 return new (_internal.ListMapView$(E))(this);
1926 } 1926 }
1927 sublist(start, end) { 1927 sublist(start, end) {
1928 if (end === void 0) 1928 if (end === void 0)
1929 end = null; 1929 end = null;
1930 let listLength = this.length; 1930 let listLength = this.length;
1931 if (end == null) 1931 if (end == null)
1932 end = listLength; 1932 end = listLength;
1933 core.RangeError.checkValidRange(start, end, listLength); 1933 dart.dcall(core.RangeError.checkValidRange, start, end, listLength);
1934 let length = dart.notNull(end) - dart.notNull(start); 1934 let length = dart.notNull(end) - dart.notNull(start);
1935 let result = core.List$(E).new(); 1935 let result = core.List$(E).new();
1936 result[dartx.length] = length; 1936 result[dartx.length] = length;
1937 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 1937 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
1938 result[dartx.set](i, this.get(dart.notNull(start) + dart.notNull(i))); 1938 result[dartx.set](i, this.get(dart.notNull(start) + dart.notNull(i)));
1939 } 1939 }
1940 return result; 1940 return result;
1941 } 1941 }
1942 getRange(start, end) { 1942 getRange(start, end) {
1943 core.RangeError.checkValidRange(start, end, this.length); 1943 dart.dcall(core.RangeError.checkValidRange, start, end, this.length);
1944 return new (_internal.SubListIterable$(E))(this, start, end); 1944 return new (_internal.SubListIterable$(E))(this, start, end);
1945 } 1945 }
1946 removeRange(start, end) { 1946 removeRange(start, end) {
1947 core.RangeError.checkValidRange(start, end, this.length); 1947 dart.dcall(core.RangeError.checkValidRange, start, end, this.length);
1948 let length = dart.notNull(end) - dart.notNull(start); 1948 let length = dart.notNull(end) - dart.notNull(start);
1949 this.setRange(start, dart.notNull(this.length) - dart.notNull(length), t his, end); 1949 dart.dcall(this.setRange, start, dart.notNull(this.length) - dart.notNul l(length), this, end);
1950 this.length = dart.notNull(this.length) - dart.notNull(length); 1950 this.length = dart.notNull(this.length) - dart.notNull(length);
1951 } 1951 }
1952 fillRange(start, end, fill) { 1952 fillRange(start, end, fill) {
1953 if (fill === void 0) 1953 if (fill === void 0)
1954 fill = null; 1954 fill = null;
1955 dart.as(fill, E); 1955 dart.as(fill, E);
1956 core.RangeError.checkValidRange(start, end, this.length); 1956 dart.dcall(core.RangeError.checkValidRange, start, end, this.length);
1957 for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNul l(i) + 1) { 1957 for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNul l(i) + 1) {
1958 this.set(i, fill); 1958 this.set(i, fill);
1959 } 1959 }
1960 } 1960 }
1961 setRange(start, end, iterable, skipCount) { 1961 setRange(start, end, iterable, skipCount) {
1962 dart.as(iterable, core.Iterable$(E)); 1962 dart.as(iterable, core.Iterable$(E));
1963 if (skipCount === void 0) 1963 if (skipCount === void 0)
1964 skipCount = 0; 1964 skipCount = 0;
1965 core.RangeError.checkValidRange(start, end, this.length); 1965 dart.dcall(core.RangeError.checkValidRange, start, end, this.length);
1966 let length = dart.notNull(end) - dart.notNull(start); 1966 let length = dart.notNull(end) - dart.notNull(start);
1967 if (length == 0) 1967 if (length == 0)
1968 return; 1968 return;
1969 core.RangeError.checkNotNegative(skipCount, "skipCount"); 1969 dart.dcall(core.RangeError.checkNotNegative, skipCount, "skipCount");
1970 let otherList = null; 1970 let otherList = null;
1971 let otherStart = null; 1971 let otherStart = null;
1972 if (dart.is(iterable, core.List)) { 1972 if (dart.is(iterable, core.List)) {
1973 otherList = dart.as(iterable, core.List); 1973 otherList = dart.as(iterable, core.List);
1974 otherStart = skipCount; 1974 otherStart = skipCount;
1975 } else { 1975 } else {
1976 otherList = iterable[dartx.skip](skipCount)[dartx.toList]({growable: f alse}); 1976 otherList = dart.dcall(dart.dcall(iterable[dartx.skip], skipCount)[dar tx.toList], {growable: false});
1977 otherStart = 0; 1977 otherStart = 0;
1978 } 1978 }
1979 if (dart.notNull(otherStart) + dart.notNull(length) > dart.notNull(other List[dartx.length])) { 1979 if (dart.notNull(otherStart) + dart.notNull(length) > dart.notNull(other List[dartx.length])) {
1980 dart.throw(_internal.IterableElementError.tooFew()); 1980 dart.throw(dart.dcall(_internal.IterableElementError.tooFew));
1981 } 1981 }
1982 if (dart.notNull(otherStart) < dart.notNull(start)) { 1982 if (dart.notNull(otherStart) < dart.notNull(start)) {
1983 for (let i = dart.notNull(length) - 1; dart.notNull(i) >= 0; i = dart. notNull(i) - 1) { 1983 for (let i = dart.notNull(length) - 1; dart.notNull(i) >= 0; i = dart. notNull(i) - 1) {
1984 this.set(dart.notNull(start) + dart.notNull(i), dart.as(otherList[da rtx.get](dart.notNull(otherStart) + dart.notNull(i)), E)); 1984 this.set(dart.notNull(start) + dart.notNull(i), dart.as(otherList[da rtx.get](dart.notNull(otherStart) + dart.notNull(i)), E));
1985 } 1985 }
1986 } else { 1986 } else {
1987 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNu ll(i) + 1) { 1987 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNu ll(i) + 1) {
1988 this.set(dart.notNull(start) + dart.notNull(i), dart.as(otherList[da rtx.get](dart.notNull(otherStart) + dart.notNull(i)), E)); 1988 this.set(dart.notNull(start) + dart.notNull(i), dart.as(otherList[da rtx.get](dart.notNull(otherStart) + dart.notNull(i)), E));
1989 } 1989 }
1990 } 1990 }
1991 } 1991 }
1992 replaceRange(start, end, newContents) { 1992 replaceRange(start, end, newContents) {
1993 dart.as(newContents, core.Iterable$(E)); 1993 dart.as(newContents, core.Iterable$(E));
1994 core.RangeError.checkValidRange(start, end, this.length); 1994 dart.dcall(core.RangeError.checkValidRange, start, end, this.length);
1995 if (!dart.is(newContents, _internal.EfficientLength)) { 1995 if (!dart.is(newContents, _internal.EfficientLength)) {
1996 newContents = newContents[dartx.toList](); 1996 newContents = dart.dcall(newContents[dartx.toList]);
1997 } 1997 }
1998 let removeLength = dart.notNull(end) - dart.notNull(start); 1998 let removeLength = dart.notNull(end) - dart.notNull(start);
1999 let insertLength = newContents[dartx.length]; 1999 let insertLength = newContents[dartx.length];
2000 if (dart.notNull(removeLength) >= dart.notNull(insertLength)) { 2000 if (dart.notNull(removeLength) >= dart.notNull(insertLength)) {
2001 let delta = dart.notNull(removeLength) - dart.notNull(insertLength); 2001 let delta = dart.notNull(removeLength) - dart.notNull(insertLength);
2002 let insertEnd = dart.notNull(start) + dart.notNull(insertLength); 2002 let insertEnd = dart.notNull(start) + dart.notNull(insertLength);
2003 let newLength = dart.notNull(this.length) - dart.notNull(delta); 2003 let newLength = dart.notNull(this.length) - dart.notNull(delta);
2004 this.setRange(start, insertEnd, newContents); 2004 dart.dcall(this.setRange, start, insertEnd, newContents);
2005 if (delta != 0) { 2005 if (delta != 0) {
2006 this.setRange(insertEnd, newLength, this, end); 2006 dart.dcall(this.setRange, insertEnd, newLength, this, end);
2007 this.length = newLength; 2007 this.length = newLength;
2008 } 2008 }
2009 } else { 2009 } else {
2010 let delta = dart.notNull(insertLength) - dart.notNull(removeLength); 2010 let delta = dart.notNull(insertLength) - dart.notNull(removeLength);
2011 let newLength = dart.notNull(this.length) + dart.notNull(delta); 2011 let newLength = dart.notNull(this.length) + dart.notNull(delta);
2012 let insertEnd = dart.notNull(start) + dart.notNull(insertLength); 2012 let insertEnd = dart.notNull(start) + dart.notNull(insertLength);
2013 this.length = newLength; 2013 this.length = newLength;
2014 this.setRange(insertEnd, newLength, this, end); 2014 dart.dcall(this.setRange, insertEnd, newLength, this, end);
2015 this.setRange(start, insertEnd, newContents); 2015 dart.dcall(this.setRange, start, insertEnd, newContents);
2016 } 2016 }
2017 } 2017 }
2018 indexOf(element, startIndex) { 2018 indexOf(element, startIndex) {
2019 if (startIndex === void 0) 2019 if (startIndex === void 0)
2020 startIndex = 0; 2020 startIndex = 0;
2021 if (dart.notNull(startIndex) >= dart.notNull(this.length)) { 2021 if (dart.notNull(startIndex) >= dart.notNull(this.length)) {
2022 return -1; 2022 return -1;
2023 } 2023 }
2024 if (dart.notNull(startIndex) < 0) { 2024 if (dart.notNull(startIndex) < 0) {
2025 startIndex = 0; 2025 startIndex = 0;
(...skipping 20 matching lines...) Expand all
2046 } 2046 }
2047 for (let i = startIndex; dart.notNull(i) >= 0; i = dart.notNull(i) - 1) { 2047 for (let i = startIndex; dart.notNull(i) >= 0; i = dart.notNull(i) - 1) {
2048 if (dart.equals(this.get(i), element)) { 2048 if (dart.equals(this.get(i), element)) {
2049 return i; 2049 return i;
2050 } 2050 }
2051 } 2051 }
2052 return -1; 2052 return -1;
2053 } 2053 }
2054 insert(index, element) { 2054 insert(index, element) {
2055 dart.as(element, E); 2055 dart.as(element, E);
2056 core.RangeError.checkValueInInterval(index, 0, this[dartx.length], "inde x"); 2056 dart.dcall(core.RangeError.checkValueInInterval, index, 0, this[dartx.le ngth], "index");
2057 if (index == this.length) { 2057 if (index == this.length) {
2058 this.add(element); 2058 dart.dcall(this.add, element);
2059 return; 2059 return;
2060 } 2060 }
2061 if (!(typeof index == 'number')) 2061 if (!(typeof index == 'number'))
2062 dart.throw(new core.ArgumentError(index)); 2062 dart.throw(new core.ArgumentError(index));
2063 this.length = dart.notNull(this.length) + 1; 2063 this.length = dart.notNull(this.length) + 1;
2064 this.setRange(dart.notNull(index) + 1, this.length, this, index); 2064 dart.dcall(this.setRange, dart.notNull(index) + 1, this.length, this, in dex);
2065 this.set(index, element); 2065 this.set(index, element);
2066 } 2066 }
2067 removeAt(index) { 2067 removeAt(index) {
2068 let result = this.get(index); 2068 let result = this.get(index);
2069 this.setRange(index, dart.notNull(this.length) - 1, this, dart.notNull(i ndex) + 1); 2069 dart.dcall(this.setRange, index, dart.notNull(this.length) - 1, this, da rt.notNull(index) + 1);
2070 this[dartx.length] = dart.notNull(this[dartx.length]) - 1; 2070 this[dartx.length] = dart.notNull(this[dartx.length]) - 1;
2071 return result; 2071 return result;
2072 } 2072 }
2073 insertAll(index, iterable) { 2073 insertAll(index, iterable) {
2074 dart.as(iterable, core.Iterable$(E)); 2074 dart.as(iterable, core.Iterable$(E));
2075 core.RangeError.checkValueInInterval(index, 0, this[dartx.length], "inde x"); 2075 dart.dcall(core.RangeError.checkValueInInterval, index, 0, this[dartx.le ngth], "index");
2076 if (dart.is(iterable, _internal.EfficientLength)) { 2076 if (dart.is(iterable, _internal.EfficientLength)) {
2077 iterable = iterable[dartx.toList](); 2077 iterable = dart.dcall(iterable[dartx.toList]);
2078 } 2078 }
2079 let insertionLength = iterable[dartx.length]; 2079 let insertionLength = iterable[dartx.length];
2080 this.length = dart.notNull(this.length) + dart.notNull(insertionLength); 2080 this.length = dart.notNull(this.length) + dart.notNull(insertionLength);
2081 this.setRange(dart.notNull(index) + dart.notNull(insertionLength), this. length, this, index); 2081 dart.dcall(this.setRange, dart.notNull(index) + dart.notNull(insertionLe ngth), this.length, this, index);
2082 this.setAll(index, iterable); 2082 dart.dcall(this.setAll, index, iterable);
2083 } 2083 }
2084 setAll(index, iterable) { 2084 setAll(index, iterable) {
2085 dart.as(iterable, core.Iterable$(E)); 2085 dart.as(iterable, core.Iterable$(E));
2086 if (dart.is(iterable, core.List)) { 2086 if (dart.is(iterable, core.List)) {
2087 this.setRange(index, dart.notNull(index) + dart.notNull(iterable[dartx .length]), iterable); 2087 dart.dcall(this.setRange, index, dart.notNull(index) + dart.notNull(it erable[dartx.length]), iterable);
2088 } else { 2088 } else {
2089 for (let element of iterable) { 2089 for (let element of iterable) {
2090 this.set((() => { 2090 this.set((() => {
2091 let x = index; 2091 let x = index;
2092 index = dart.notNull(x) + 1; 2092 index = dart.notNull(x) + 1;
2093 return x; 2093 return x;
2094 })(), element); 2094 })(), element);
2095 } 2095 }
2096 } 2096 }
2097 } 2097 }
2098 get reversed() { 2098 get reversed() {
2099 return new (_internal.ReversedListIterable$(E))(this); 2099 return new (_internal.ReversedListIterable$(E))(this);
2100 } 2100 }
2101 toString() { 2101 toString() {
2102 return IterableBase.iterableToFullString(this, '[', ']'); 2102 return dart.dcall(IterableBase.iterableToFullString, this, '[', ']');
2103 } 2103 }
2104 } 2104 }
2105 ListMixin[dart.implements] = () => [core.List$(E)]; 2105 ListMixin[dart.implements] = () => [core.List$(E)];
2106 dart.setSignature(ListMixin, { 2106 dart.setSignature(ListMixin, {
2107 methods: () => ({ 2107 methods: () => ({
2108 elementAt: [E, [core.int]], 2108 elementAt: [E, [core.int]],
2109 forEach: [dart.void, [dart.functionType(dart.void, [E])]], 2109 forEach: [dart.void, [dart.functionType(dart.void, [E])]],
2110 contains: [core.bool, [core.Object]], 2110 contains: [core.bool, [core.Object]],
2111 every: [core.bool, [dart.functionType(core.bool, [E])]], 2111 every: [core.bool, [dart.functionType(core.bool, [E])]],
2112 any: [core.bool, [dart.functionType(core.bool, [E])]], 2112 any: [core.bool, [dart.functionType(core.bool, [E])]],
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
2201 'last', 2201 'last',
2202 'single', 2202 'single',
2203 'reversed' 2203 'reversed'
2204 ]); 2204 ]);
2205 return ListMixin; 2205 return ListMixin;
2206 }); 2206 });
2207 let ListMixin = ListMixin$(); 2207 let ListMixin = ListMixin$();
2208 let ListBase$ = dart.generic(function(E) { 2208 let ListBase$ = dart.generic(function(E) {
2209 class ListBase extends dart.mixin(core.Object, ListMixin$(E)) { 2209 class ListBase extends dart.mixin(core.Object, ListMixin$(E)) {
2210 static listToString(list) { 2210 static listToString(list) {
2211 return IterableBase.iterableToFullString(list, '[', ']'); 2211 return dart.dcall(IterableBase.iterableToFullString, list, '[', ']');
2212 } 2212 }
2213 } 2213 }
2214 dart.setSignature(ListBase, { 2214 dart.setSignature(ListBase, {
2215 statics: () => ({listToString: [core.String, [core.List]]}), 2215 statics: () => ({listToString: [core.String, [core.List]]}),
2216 names: ['listToString'] 2216 names: ['listToString']
2217 }); 2217 });
2218 return ListBase; 2218 return ListBase;
2219 }); 2219 });
2220 let ListBase = ListBase$(); 2220 let ListBase = ListBase$();
2221 let MapMixin$ = dart.generic(function(K, V) { 2221 let MapMixin$ = dart.generic(function(K, V) {
(...skipping 13 matching lines...) Expand all
2235 containsValue(value) { 2235 containsValue(value) {
2236 for (let key of this.keys) { 2236 for (let key of this.keys) {
2237 if (dart.equals(this.get(key), value)) 2237 if (dart.equals(this.get(key), value))
2238 return true; 2238 return true;
2239 } 2239 }
2240 return false; 2240 return false;
2241 } 2241 }
2242 putIfAbsent(key, ifAbsent) { 2242 putIfAbsent(key, ifAbsent) {
2243 dart.as(key, K); 2243 dart.as(key, K);
2244 dart.as(ifAbsent, dart.functionType(V, [])); 2244 dart.as(ifAbsent, dart.functionType(V, []));
2245 if (dart.notNull(this.keys[dartx.contains](key))) { 2245 if (dart.notNull(dart.dcall(this.keys[dartx.contains], key))) {
2246 return this.get(key); 2246 return this.get(key);
2247 } 2247 }
2248 return this.set(key, ifAbsent()); 2248 return this.set(key, ifAbsent());
2249 } 2249 }
2250 containsKey(key) { 2250 containsKey(key) {
2251 return this.keys[dartx.contains](key); 2251 return dart.dcall(this.keys[dartx.contains], key);
2252 } 2252 }
2253 get length() { 2253 get length() {
2254 return this.keys[dartx.length]; 2254 return this.keys[dartx.length];
2255 } 2255 }
2256 get isEmpty() { 2256 get isEmpty() {
2257 return this.keys[dartx.isEmpty]; 2257 return this.keys[dartx.isEmpty];
2258 } 2258 }
2259 get isNotEmpty() { 2259 get isNotEmpty() {
2260 return this.keys[dartx.isNotEmpty]; 2260 return this.keys[dartx.isNotEmpty];
2261 } 2261 }
2262 get values() { 2262 get values() {
2263 return new (_MapBaseValueIterable$(V))(this); 2263 return new (_MapBaseValueIterable$(V))(this);
2264 } 2264 }
2265 toString() { 2265 toString() {
2266 return Maps.mapToString(this); 2266 return dart.dcall(Maps.mapToString, this);
2267 } 2267 }
2268 } 2268 }
2269 MapMixin[dart.implements] = () => [core.Map$(K, V)]; 2269 MapMixin[dart.implements] = () => [core.Map$(K, V)];
2270 dart.setSignature(MapMixin, { 2270 dart.setSignature(MapMixin, {
2271 methods: () => ({ 2271 methods: () => ({
2272 forEach: [dart.void, [dart.functionType(dart.void, [K, V])]], 2272 forEach: [dart.void, [dart.functionType(dart.void, [K, V])]],
2273 addAll: [dart.void, [core.Map$(K, V)]], 2273 addAll: [dart.void, [core.Map$(K, V)]],
2274 containsValue: [core.bool, [core.Object]], 2274 containsValue: [core.bool, [core.Object]],
2275 putIfAbsent: [V, [K, dart.functionType(V, [])]], 2275 putIfAbsent: [V, [K, dart.functionType(V, [])]],
2276 containsKey: [core.bool, [core.Object]] 2276 containsKey: [core.bool, [core.Object]]
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
2377 let _MapBaseValueIterable = _MapBaseValueIterable$(); 2377 let _MapBaseValueIterable = _MapBaseValueIterable$();
2378 let _keys = Symbol('_keys'); 2378 let _keys = Symbol('_keys');
2379 let _MapBaseValueIterator$ = dart.generic(function(V) { 2379 let _MapBaseValueIterator$ = dart.generic(function(V) {
2380 class _MapBaseValueIterator extends core.Object { 2380 class _MapBaseValueIterator extends core.Object {
2381 _MapBaseValueIterator(map) { 2381 _MapBaseValueIterator(map) {
2382 this[_map] = map; 2382 this[_map] = map;
2383 this[_keys] = map.keys[dartx.iterator]; 2383 this[_keys] = map.keys[dartx.iterator];
2384 this[_current] = null; 2384 this[_current] = null;
2385 } 2385 }
2386 moveNext() { 2386 moveNext() {
2387 if (dart.notNull(this[_keys].moveNext())) { 2387 if (dart.notNull(dart.dcall(this[_keys].moveNext))) {
2388 this[_current] = dart.as(this[_map].get(this[_keys].current), V); 2388 this[_current] = dart.as(this[_map].get(this[_keys].current), V);
2389 return true; 2389 return true;
2390 } 2390 }
2391 this[_current] = null; 2391 this[_current] = null;
2392 return false; 2392 return false;
2393 } 2393 }
2394 get current() { 2394 get current() {
2395 return this[_current]; 2395 return this[_current];
2396 } 2396 }
2397 } 2397 }
(...skipping 14 matching lines...) Expand all
2412 return this[_map].get(key); 2412 return this[_map].get(key);
2413 } 2413 }
2414 set(key, value) { 2414 set(key, value) {
2415 dart.as(key, K); 2415 dart.as(key, K);
2416 dart.as(value, V); 2416 dart.as(value, V);
2417 this[_map].set(key, value); 2417 this[_map].set(key, value);
2418 return value; 2418 return value;
2419 } 2419 }
2420 addAll(other) { 2420 addAll(other) {
2421 dart.as(other, core.Map$(K, V)); 2421 dart.as(other, core.Map$(K, V));
2422 this[_map].addAll(other); 2422 dart.dcall(this[_map].addAll, other);
2423 } 2423 }
2424 clear() { 2424 clear() {
2425 this[_map].clear(); 2425 dart.dcall(this[_map].clear);
2426 } 2426 }
2427 putIfAbsent(key, ifAbsent) { 2427 putIfAbsent(key, ifAbsent) {
2428 dart.as(key, K); 2428 dart.as(key, K);
2429 dart.as(ifAbsent, dart.functionType(V, [])); 2429 dart.as(ifAbsent, dart.functionType(V, []));
2430 return this[_map].putIfAbsent(key, ifAbsent); 2430 return dart.dcall(this[_map].putIfAbsent, key, ifAbsent);
2431 } 2431 }
2432 containsKey(key) { 2432 containsKey(key) {
2433 return this[_map].containsKey(key); 2433 return dart.dcall(this[_map].containsKey, key);
2434 } 2434 }
2435 containsValue(value) { 2435 containsValue(value) {
2436 return this[_map].containsValue(value); 2436 return dart.dcall(this[_map].containsValue, value);
2437 } 2437 }
2438 forEach(action) { 2438 forEach(action) {
2439 dart.as(action, dart.functionType(dart.void, [K, V])); 2439 dart.as(action, dart.functionType(dart.void, [K, V]));
2440 this[_map].forEach(action); 2440 dart.dcall(this[_map].forEach, action);
2441 } 2441 }
2442 get isEmpty() { 2442 get isEmpty() {
2443 return this[_map].isEmpty; 2443 return this[_map].isEmpty;
2444 } 2444 }
2445 get isNotEmpty() { 2445 get isNotEmpty() {
2446 return this[_map].isNotEmpty; 2446 return this[_map].isNotEmpty;
2447 } 2447 }
2448 get length() { 2448 get length() {
2449 return this[_map].length; 2449 return this[_map].length;
2450 } 2450 }
2451 get keys() { 2451 get keys() {
2452 return this[_map].keys; 2452 return this[_map].keys;
2453 } 2453 }
2454 remove(key) { 2454 remove(key) {
2455 return this[_map].remove(key); 2455 return dart.dcall(this[_map].remove, key);
2456 } 2456 }
2457 toString() { 2457 toString() {
2458 return dart.toString(this[_map]); 2458 return dart.dcall(this[_map].toString);
2459 } 2459 }
2460 get values() { 2460 get values() {
2461 return this[_map].values; 2461 return this[_map].values;
2462 } 2462 }
2463 } 2463 }
2464 MapView[dart.implements] = () => [core.Map$(K, V)]; 2464 MapView[dart.implements] = () => [core.Map$(K, V)];
2465 dart.setSignature(MapView, { 2465 dart.setSignature(MapView, {
2466 constructors: () => ({MapView: [MapView$(K, V), [core.Map$(K, V)]]}), 2466 constructors: () => ({MapView: [MapView$(K, V), [core.Map$(K, V)]]}),
2467 methods: () => ({ 2467 methods: () => ({
2468 get: [V, [core.Object]], 2468 get: [V, [core.Object]],
(...skipping 30 matching lines...) Expand all
2499 } 2499 }
2500 static containsKey(map, key) { 2500 static containsKey(map, key) {
2501 for (let k of map.keys) { 2501 for (let k of map.keys) {
2502 if (dart.equals(key, k)) { 2502 if (dart.equals(key, k)) {
2503 return true; 2503 return true;
2504 } 2504 }
2505 } 2505 }
2506 return false; 2506 return false;
2507 } 2507 }
2508 static putIfAbsent(map, key, ifAbsent) { 2508 static putIfAbsent(map, key, ifAbsent) {
2509 if (dart.notNull(map.containsKey(key))) { 2509 if (dart.notNull(dart.dcall(map.containsKey, key))) {
2510 return map.get(key); 2510 return map.get(key);
2511 } 2511 }
2512 let v = ifAbsent(); 2512 let v = ifAbsent();
2513 map.set(key, v); 2513 map.set(key, v);
2514 return v; 2514 return v;
2515 } 2515 }
2516 static clear(map) { 2516 static clear(map) {
2517 for (let k of map.keys[dartx.toList]()) { 2517 for (let k of dart.dcall(map.keys[dartx.toList])) {
2518 map.remove(k); 2518 dart.dcall(map.remove, k);
2519 } 2519 }
2520 } 2520 }
2521 static forEach(map, f) { 2521 static forEach(map, f) {
2522 for (let k of map.keys) { 2522 for (let k of map.keys) {
2523 dart.dcall(f, k, map.get(k)); 2523 dart.dcall(f, k, map.get(k));
2524 } 2524 }
2525 } 2525 }
2526 static getValues(map) { 2526 static getValues(map) {
2527 return map.keys[dartx.map](dart.fn(key => map.get(key))); 2527 return dart.dcall(map.keys[dartx.map], dart.fn(key => map.get(key)));
2528 } 2528 }
2529 static length(map) { 2529 static length(map) {
2530 return map.keys[dartx.length]; 2530 return map.keys[dartx.length];
2531 } 2531 }
2532 static isEmpty(map) { 2532 static isEmpty(map) {
2533 return map.keys[dartx.isEmpty]; 2533 return map.keys[dartx.isEmpty];
2534 } 2534 }
2535 static isNotEmpty(map) { 2535 static isNotEmpty(map) {
2536 return map.keys[dartx.isNotEmpty]; 2536 return map.keys[dartx.isNotEmpty];
2537 } 2537 }
2538 static mapToString(m) { 2538 static mapToString(m) {
2539 if (dart.notNull(IterableBase._isToStringVisiting(m))) { 2539 if (dart.notNull(dart.dcall(IterableBase._isToStringVisiting, m))) {
2540 return '{...}'; 2540 return '{...}';
2541 } 2541 }
2542 let result = new core.StringBuffer(); 2542 let result = new core.StringBuffer();
2543 try { 2543 try {
2544 IterableBase._toStringVisiting[dartx.add](m); 2544 dart.dcall(IterableBase._toStringVisiting[dartx.add], m);
2545 result.write('{'); 2545 dart.dsend(result, 'write', '{');
2546 let first = true; 2546 let first = true;
2547 m.forEach(dart.fn((k, v) => { 2547 dart.dcall(m.forEach, dart.fn((k, v) => {
2548 if (!dart.notNull(first)) { 2548 if (!dart.notNull(first)) {
2549 result.write(', '); 2549 dart.dsend(result, 'write', ', ');
2550 } 2550 }
2551 first = false; 2551 first = false;
2552 result.write(k); 2552 dart.dsend(result, 'write', k);
2553 result.write(': '); 2553 dart.dsend(result, 'write', ': ');
2554 result.write(v); 2554 dart.dsend(result, 'write', v);
2555 })); 2555 }));
2556 result.write('}'); 2556 dart.dsend(result, 'write', '}');
2557 } finally { 2557 } finally {
2558 dart.assert(core.identical(IterableBase._toStringVisiting[dartx.last], m )); 2558 dart.assert(dart.dcall(core.identical, IterableBase._toStringVisiting[da rtx.last], m));
2559 IterableBase._toStringVisiting[dartx.removeLast](); 2559 dart.dcall(IterableBase._toStringVisiting[dartx.removeLast]);
2560 } 2560 }
2561 return dart.toString(result); 2561 return dart.as(dart.dsend(result, 'toString'), core.String);
2562 } 2562 }
2563 static _id(x) { 2563 static _id(x) {
2564 return x; 2564 return x;
2565 } 2565 }
2566 static _fillMapWithMappedIterable(map, iterable, key, value) { 2566 static _fillMapWithMappedIterable(map, iterable, key, value) {
2567 if (key == null) 2567 if (key == null)
2568 key = Maps._id; 2568 key = Maps._id;
2569 if (value == null) 2569 if (value == null)
2570 value = Maps._id; 2570 value = Maps._id;
2571 for (let element of iterable) { 2571 for (let element of iterable) {
2572 map.set(dart.dcall(key, element), dart.dcall(value, element)); 2572 map.set(dart.dcall(key, element), dart.dcall(value, element));
2573 } 2573 }
2574 } 2574 }
2575 static _fillMapWithIterables(map, keys, values) { 2575 static _fillMapWithIterables(map, keys, values) {
2576 let keyIterator = keys[dartx.iterator]; 2576 let keyIterator = keys[dartx.iterator];
2577 let valueIterator = values[dartx.iterator]; 2577 let valueIterator = values[dartx.iterator];
2578 let hasNextKey = keyIterator.moveNext(); 2578 let hasNextKey = dart.dcall(keyIterator.moveNext);
2579 let hasNextValue = valueIterator.moveNext(); 2579 let hasNextValue = dart.dcall(valueIterator.moveNext);
2580 while (dart.notNull(hasNextKey) && dart.notNull(hasNextValue)) { 2580 while (dart.notNull(hasNextKey) && dart.notNull(hasNextValue)) {
2581 map.set(keyIterator.current, valueIterator.current); 2581 map.set(keyIterator.current, valueIterator.current);
2582 hasNextKey = keyIterator.moveNext(); 2582 hasNextKey = dart.dcall(keyIterator.moveNext);
2583 hasNextValue = valueIterator.moveNext(); 2583 hasNextValue = dart.dcall(valueIterator.moveNext);
2584 } 2584 }
2585 if (dart.notNull(hasNextKey) || dart.notNull(hasNextValue)) { 2585 if (dart.notNull(hasNextKey) || dart.notNull(hasNextValue)) {
2586 dart.throw(new core.ArgumentError("Iterables do not have same length.")) ; 2586 dart.throw(new core.ArgumentError("Iterables do not have same length.")) ;
2587 } 2587 }
2588 } 2588 }
2589 } 2589 }
2590 dart.setSignature(Maps, { 2590 dart.setSignature(Maps, {
2591 statics: () => ({ 2591 statics: () => ({
2592 containsValue: [core.bool, [core.Map, dart.dynamic]], 2592 containsValue: [core.bool, [core.Map, dart.dynamic]],
2593 containsKey: [core.bool, [core.Map, dart.dynamic]], 2593 containsKey: [core.bool, [core.Map, dart.dynamic]],
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
2640 [_link](previous, next) { 2640 [_link](previous, next) {
2641 dart.as(previous, DoubleLinkedQueueEntry$(E)); 2641 dart.as(previous, DoubleLinkedQueueEntry$(E));
2642 dart.as(next, DoubleLinkedQueueEntry$(E)); 2642 dart.as(next, DoubleLinkedQueueEntry$(E));
2643 this[_next] = next; 2643 this[_next] = next;
2644 this[_previous] = previous; 2644 this[_previous] = previous;
2645 previous[_next] = this; 2645 previous[_next] = this;
2646 next[_previous] = this; 2646 next[_previous] = this;
2647 } 2647 }
2648 append(e) { 2648 append(e) {
2649 dart.as(e, E); 2649 dart.as(e, E);
2650 new (DoubleLinkedQueueEntry$(E))(e)[_link](this, this[_next]); 2650 dart.dcall(new (DoubleLinkedQueueEntry$(E))(e)[_link], this, this[_next] );
2651 } 2651 }
2652 prepend(e) { 2652 prepend(e) {
2653 dart.as(e, E); 2653 dart.as(e, E);
2654 new (DoubleLinkedQueueEntry$(E))(e)[_link](this[_previous], this); 2654 dart.dcall(new (DoubleLinkedQueueEntry$(E))(e)[_link], this[_previous], this);
2655 } 2655 }
2656 remove() { 2656 remove() {
2657 this[_previous][_next] = this[_next]; 2657 this[_previous][_next] = this[_next];
2658 this[_next][_previous] = this[_previous]; 2658 this[_next][_previous] = this[_previous];
2659 this[_next] = null; 2659 this[_next] = null;
2660 this[_previous] = null; 2660 this[_previous] = null;
2661 return this[_element]; 2661 return this[_element];
2662 } 2662 }
2663 [_asNonSentinelEntry]() { 2663 [_asNonSentinelEntry]() {
2664 return this; 2664 return this;
2665 } 2665 }
2666 previousEntry() { 2666 previousEntry() {
2667 return this[_previous][_asNonSentinelEntry](); 2667 return dart.dcall(this[_previous][_asNonSentinelEntry]);
2668 } 2668 }
2669 nextEntry() { 2669 nextEntry() {
2670 return this[_next][_asNonSentinelEntry](); 2670 return dart.dcall(this[_next][_asNonSentinelEntry]);
2671 } 2671 }
2672 get element() { 2672 get element() {
2673 return this[_element]; 2673 return this[_element];
2674 } 2674 }
2675 set element(e) { 2675 set element(e) {
2676 dart.as(e, E); 2676 dart.as(e, E);
2677 this[_element] = e; 2677 this[_element] = e;
2678 } 2678 }
2679 } 2679 }
2680 dart.setSignature(DoubleLinkedQueueEntry, { 2680 dart.setSignature(DoubleLinkedQueueEntry, {
2681 constructors: () => ({DoubleLinkedQueueEntry: [DoubleLinkedQueueEntry$(E), [E]]}), 2681 constructors: () => ({DoubleLinkedQueueEntry: [DoubleLinkedQueueEntry$(E), [E]]}),
2682 methods: () => ({ 2682 methods: () => ({
2683 [_link]: [dart.void, [DoubleLinkedQueueEntry$(E), DoubleLinkedQueueEntry $(E)]], 2683 [_link]: [dart.void, [DoubleLinkedQueueEntry$(E), DoubleLinkedQueueEntry $(E)]],
2684 append: [dart.void, [E]], 2684 append: [dart.void, [E]],
2685 prepend: [dart.void, [E]], 2685 prepend: [dart.void, [E]],
2686 remove: [E, []], 2686 remove: [E, []],
2687 [_asNonSentinelEntry]: [DoubleLinkedQueueEntry$(E), []], 2687 [_asNonSentinelEntry]: [DoubleLinkedQueueEntry$(E), []],
2688 previousEntry: [DoubleLinkedQueueEntry$(E), []], 2688 previousEntry: [DoubleLinkedQueueEntry$(E), []],
2689 nextEntry: [DoubleLinkedQueueEntry$(E), []] 2689 nextEntry: [DoubleLinkedQueueEntry$(E), []]
2690 }) 2690 })
2691 }); 2691 });
2692 return DoubleLinkedQueueEntry; 2692 return DoubleLinkedQueueEntry;
2693 }); 2693 });
2694 let DoubleLinkedQueueEntry = DoubleLinkedQueueEntry$(); 2694 let DoubleLinkedQueueEntry = DoubleLinkedQueueEntry$();
2695 let _DoubleLinkedQueueEntrySentinel$ = dart.generic(function(E) { 2695 let _DoubleLinkedQueueEntrySentinel$ = dart.generic(function(E) {
2696 class _DoubleLinkedQueueEntrySentinel extends DoubleLinkedQueueEntry$(E) { 2696 class _DoubleLinkedQueueEntrySentinel extends DoubleLinkedQueueEntry$(E) {
2697 _DoubleLinkedQueueEntrySentinel() { 2697 _DoubleLinkedQueueEntrySentinel() {
2698 super.DoubleLinkedQueueEntry(null); 2698 super.DoubleLinkedQueueEntry(null);
2699 this[_link](this, this); 2699 dart.dcall(this[_link], this, this);
2700 } 2700 }
2701 remove() { 2701 remove() {
2702 dart.throw(_internal.IterableElementError.noElement()); 2702 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
2703 } 2703 }
2704 [_asNonSentinelEntry]() { 2704 [_asNonSentinelEntry]() {
2705 return null; 2705 return null;
2706 } 2706 }
2707 set element(e) { 2707 set element(e) {
2708 dart.as(e, E); 2708 dart.as(e, E);
2709 dart.assert(false); 2709 dart.assert(false);
2710 } 2710 }
2711 get element() { 2711 get element() {
2712 dart.throw(_internal.IterableElementError.noElement()); 2712 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
2713 } 2713 }
2714 } 2714 }
2715 dart.setSignature(_DoubleLinkedQueueEntrySentinel, { 2715 dart.setSignature(_DoubleLinkedQueueEntrySentinel, {
2716 constructors: () => ({_DoubleLinkedQueueEntrySentinel: [_DoubleLinkedQueue EntrySentinel$(E), []]}), 2716 constructors: () => ({_DoubleLinkedQueueEntrySentinel: [_DoubleLinkedQueue EntrySentinel$(E), []]}),
2717 methods: () => ({ 2717 methods: () => ({
2718 remove: [E, []], 2718 remove: [E, []],
2719 [_asNonSentinelEntry]: [DoubleLinkedQueueEntry$(E), []] 2719 [_asNonSentinelEntry]: [DoubleLinkedQueueEntry$(E), []]
2720 }) 2720 })
2721 }); 2721 });
2722 return _DoubleLinkedQueueEntrySentinel; 2722 return _DoubleLinkedQueueEntrySentinel;
2723 }); 2723 });
2724 let _DoubleLinkedQueueEntrySentinel = _DoubleLinkedQueueEntrySentinel$(); 2724 let _DoubleLinkedQueueEntrySentinel = _DoubleLinkedQueueEntrySentinel$();
2725 let _sentinel = Symbol('_sentinel'); 2725 let _sentinel = Symbol('_sentinel');
2726 let _elementCount = Symbol('_elementCount'); 2726 let _elementCount = Symbol('_elementCount');
2727 let _filter = Symbol('_filter'); 2727 let _filter = Symbol('_filter');
2728 let DoubleLinkedQueue$ = dart.generic(function(E) { 2728 let DoubleLinkedQueue$ = dart.generic(function(E) {
2729 class DoubleLinkedQueue extends IterableBase$(E) { 2729 class DoubleLinkedQueue extends IterableBase$(E) {
2730 DoubleLinkedQueue() { 2730 DoubleLinkedQueue() {
2731 this[_sentinel] = null; 2731 this[_sentinel] = null;
2732 this[_elementCount] = 0; 2732 this[_elementCount] = 0;
2733 super.IterableBase(); 2733 super.IterableBase();
2734 this[_sentinel] = new (_DoubleLinkedQueueEntrySentinel$(E))(); 2734 this[_sentinel] = new (_DoubleLinkedQueueEntrySentinel$(E))();
2735 } 2735 }
2736 static from(elements) { 2736 static from(elements) {
2737 let list = new (DoubleLinkedQueue$(E))(); 2737 let list = new (DoubleLinkedQueue$(E))();
2738 for (let e of dart.as(elements, core.Iterable$(E))) { 2738 for (let e of dart.as(elements, core.Iterable$(E))) {
2739 list.addLast(e); 2739 dart.dcall(list.addLast, e);
2740 } 2740 }
2741 return dart.as(list, DoubleLinkedQueue$(E)); 2741 return dart.as(list, DoubleLinkedQueue$(E));
2742 } 2742 }
2743 get length() { 2743 get length() {
2744 return this[_elementCount]; 2744 return this[_elementCount];
2745 } 2745 }
2746 addLast(value) { 2746 addLast(value) {
2747 dart.as(value, E); 2747 dart.as(value, E);
2748 this[_sentinel].prepend(value); 2748 dart.dcall(this[_sentinel].prepend, value);
2749 this[_elementCount] = dart.notNull(this[_elementCount]) + 1; 2749 this[_elementCount] = dart.notNull(this[_elementCount]) + 1;
2750 } 2750 }
2751 addFirst(value) { 2751 addFirst(value) {
2752 dart.as(value, E); 2752 dart.as(value, E);
2753 this[_sentinel].append(value); 2753 dart.dcall(this[_sentinel].append, value);
2754 this[_elementCount] = dart.notNull(this[_elementCount]) + 1; 2754 this[_elementCount] = dart.notNull(this[_elementCount]) + 1;
2755 } 2755 }
2756 add(value) { 2756 add(value) {
2757 dart.as(value, E); 2757 dart.as(value, E);
2758 this[_sentinel].prepend(value); 2758 dart.dcall(this[_sentinel].prepend, value);
2759 this[_elementCount] = dart.notNull(this[_elementCount]) + 1; 2759 this[_elementCount] = dart.notNull(this[_elementCount]) + 1;
2760 } 2760 }
2761 addAll(iterable) { 2761 addAll(iterable) {
2762 dart.as(iterable, core.Iterable$(E)); 2762 dart.as(iterable, core.Iterable$(E));
2763 for (let value of iterable) { 2763 for (let value of iterable) {
2764 this[_sentinel].prepend(value); 2764 dart.dcall(this[_sentinel].prepend, value);
2765 this[_elementCount] = dart.notNull(this[_elementCount]) + 1; 2765 this[_elementCount] = dart.notNull(this[_elementCount]) + 1;
2766 } 2766 }
2767 } 2767 }
2768 removeLast() { 2768 removeLast() {
2769 let result = this[_sentinel][_previous].remove(); 2769 let result = dart.dcall(this[_sentinel][_previous].remove);
2770 this[_elementCount] = dart.notNull(this[_elementCount]) - 1; 2770 this[_elementCount] = dart.notNull(this[_elementCount]) - 1;
2771 return result; 2771 return result;
2772 } 2772 }
2773 removeFirst() { 2773 removeFirst() {
2774 let result = this[_sentinel][_next].remove(); 2774 let result = dart.dcall(this[_sentinel][_next].remove);
2775 this[_elementCount] = dart.notNull(this[_elementCount]) - 1; 2775 this[_elementCount] = dart.notNull(this[_elementCount]) - 1;
2776 return result; 2776 return result;
2777 } 2777 }
2778 remove(o) { 2778 remove(o) {
2779 let entry = this[_sentinel][_next]; 2779 let entry = this[_sentinel][_next];
2780 while (!dart.notNull(core.identical(entry, this[_sentinel]))) { 2780 while (!dart.notNull(dart.dcall(core.identical, entry, this[_sentinel])) ) {
2781 if (dart.equals(entry.element, o)) { 2781 if (dart.equals(entry.element, o)) {
2782 entry.remove(); 2782 dart.dcall(entry.remove);
2783 this[_elementCount] = dart.notNull(this[_elementCount]) - 1; 2783 this[_elementCount] = dart.notNull(this[_elementCount]) - 1;
2784 return true; 2784 return true;
2785 } 2785 }
2786 entry = entry[_next]; 2786 entry = entry[_next];
2787 } 2787 }
2788 return false; 2788 return false;
2789 } 2789 }
2790 [_filter](test, removeMatching) { 2790 [_filter](test, removeMatching) {
2791 dart.as(test, dart.functionType(core.bool, [E])); 2791 dart.as(test, dart.functionType(core.bool, [E]));
2792 let entry = this[_sentinel][_next]; 2792 let entry = this[_sentinel][_next];
2793 while (!dart.notNull(core.identical(entry, this[_sentinel]))) { 2793 while (!dart.notNull(dart.dcall(core.identical, entry, this[_sentinel])) ) {
2794 let next = entry[_next]; 2794 let next = entry[_next];
2795 if (dart.notNull(core.identical(removeMatching, test(entry.element)))) { 2795 if (dart.notNull(dart.dcall(core.identical, removeMatching, test(entry .element)))) {
2796 entry.remove(); 2796 dart.dcall(entry.remove);
2797 this[_elementCount] = dart.notNull(this[_elementCount]) - 1; 2797 this[_elementCount] = dart.notNull(this[_elementCount]) - 1;
2798 } 2798 }
2799 entry = next; 2799 entry = next;
2800 } 2800 }
2801 } 2801 }
2802 removeWhere(test) { 2802 removeWhere(test) {
2803 dart.as(test, dart.functionType(core.bool, [E])); 2803 dart.as(test, dart.functionType(core.bool, [E]));
2804 this[_filter](test, true); 2804 dart.dcall(this[_filter], test, true);
2805 } 2805 }
2806 retainWhere(test) { 2806 retainWhere(test) {
2807 dart.as(test, dart.functionType(core.bool, [E])); 2807 dart.as(test, dart.functionType(core.bool, [E]));
2808 this[_filter](test, false); 2808 dart.dcall(this[_filter], test, false);
2809 } 2809 }
2810 get first() { 2810 get first() {
2811 return this[_sentinel][_next].element; 2811 return this[_sentinel][_next].element;
2812 } 2812 }
2813 get last() { 2813 get last() {
2814 return this[_sentinel][_previous].element; 2814 return this[_sentinel][_previous].element;
2815 } 2815 }
2816 get single() { 2816 get single() {
2817 if (dart.notNull(core.identical(this[_sentinel][_next], this[_sentinel][ _previous]))) { 2817 if (dart.notNull(dart.dcall(core.identical, this[_sentinel][_next], this [_sentinel][_previous]))) {
2818 return this[_sentinel][_next].element; 2818 return this[_sentinel][_next].element;
2819 } 2819 }
2820 dart.throw(_internal.IterableElementError.tooMany()); 2820 dart.throw(dart.dcall(_internal.IterableElementError.tooMany));
2821 } 2821 }
2822 lastEntry() { 2822 lastEntry() {
2823 return this[_sentinel].previousEntry(); 2823 return dart.dcall(this[_sentinel].previousEntry);
2824 } 2824 }
2825 firstEntry() { 2825 firstEntry() {
2826 return this[_sentinel].nextEntry(); 2826 return dart.dcall(this[_sentinel].nextEntry);
2827 } 2827 }
2828 get isEmpty() { 2828 get isEmpty() {
2829 return core.identical(this[_sentinel][_next], this[_sentinel]); 2829 return dart.dcall(core.identical, this[_sentinel][_next], this[_sentinel ]);
2830 } 2830 }
2831 clear() { 2831 clear() {
2832 this[_sentinel][_next] = this[_sentinel]; 2832 this[_sentinel][_next] = this[_sentinel];
2833 this[_sentinel][_previous] = this[_sentinel]; 2833 this[_sentinel][_previous] = this[_sentinel];
2834 this[_elementCount] = 0; 2834 this[_elementCount] = 0;
2835 } 2835 }
2836 forEachEntry(f) { 2836 forEachEntry(f) {
2837 dart.as(f, dart.functionType(dart.void, [DoubleLinkedQueueEntry$(E)])); 2837 dart.as(f, dart.functionType(dart.void, [DoubleLinkedQueueEntry$(E)]));
2838 let entry = this[_sentinel][_next]; 2838 let entry = this[_sentinel][_next];
2839 while (!dart.notNull(core.identical(entry, this[_sentinel]))) { 2839 while (!dart.notNull(dart.dcall(core.identical, entry, this[_sentinel])) ) {
2840 let nextEntry = entry[_next]; 2840 let nextEntry = entry[_next];
2841 f(entry); 2841 f(entry);
2842 entry = nextEntry; 2842 entry = nextEntry;
2843 } 2843 }
2844 } 2844 }
2845 get iterator() { 2845 get iterator() {
2846 return new (_DoubleLinkedQueueIterator$(E))(this[_sentinel]); 2846 return new (_DoubleLinkedQueueIterator$(E))(this[_sentinel]);
2847 } 2847 }
2848 toString() { 2848 toString() {
2849 return IterableBase.iterableToFullString(this, '{', '}'); 2849 return dart.dcall(IterableBase.iterableToFullString, this, '{', '}');
2850 } 2850 }
2851 } 2851 }
2852 DoubleLinkedQueue[dart.implements] = () => [Queue$(E)]; 2852 DoubleLinkedQueue[dart.implements] = () => [Queue$(E)];
2853 dart.setSignature(DoubleLinkedQueue, { 2853 dart.setSignature(DoubleLinkedQueue, {
2854 constructors: () => ({ 2854 constructors: () => ({
2855 DoubleLinkedQueue: [DoubleLinkedQueue$(E), []], 2855 DoubleLinkedQueue: [DoubleLinkedQueue$(E), []],
2856 from: [DoubleLinkedQueue$(E), [core.Iterable]] 2856 from: [DoubleLinkedQueue$(E), [core.Iterable]]
2857 }), 2857 }),
2858 methods: () => ({ 2858 methods: () => ({
2859 addLast: [dart.void, [E]], 2859 addLast: [dart.void, [E]],
(...skipping 25 matching lines...) Expand all
2885 let DoubleLinkedQueue = DoubleLinkedQueue$(); 2885 let DoubleLinkedQueue = DoubleLinkedQueue$();
2886 let _nextEntry = Symbol('_nextEntry'); 2886 let _nextEntry = Symbol('_nextEntry');
2887 let _DoubleLinkedQueueIterator$ = dart.generic(function(E) { 2887 let _DoubleLinkedQueueIterator$ = dart.generic(function(E) {
2888 class _DoubleLinkedQueueIterator extends core.Object { 2888 class _DoubleLinkedQueueIterator extends core.Object {
2889 _DoubleLinkedQueueIterator(sentinel) { 2889 _DoubleLinkedQueueIterator(sentinel) {
2890 this[_sentinel] = sentinel; 2890 this[_sentinel] = sentinel;
2891 this[_nextEntry] = sentinel[_next]; 2891 this[_nextEntry] = sentinel[_next];
2892 this[_current] = null; 2892 this[_current] = null;
2893 } 2893 }
2894 moveNext() { 2894 moveNext() {
2895 if (!dart.notNull(core.identical(this[_nextEntry], this[_sentinel]))) { 2895 if (!dart.notNull(dart.dcall(core.identical, this[_nextEntry], this[_sen tinel]))) {
2896 this[_current] = this[_nextEntry][_element]; 2896 this[_current] = this[_nextEntry][_element];
2897 this[_nextEntry] = this[_nextEntry][_next]; 2897 this[_nextEntry] = this[_nextEntry][_next];
2898 return true; 2898 return true;
2899 } 2899 }
2900 this[_current] = null; 2900 this[_current] = null;
2901 this[_nextEntry] = this[_sentinel] = null; 2901 this[_nextEntry] = this[_sentinel] = null;
2902 return false; 2902 return false;
2903 } 2903 }
2904 get current() { 2904 get current() {
2905 return this[_current]; 2905 return this[_current];
(...skipping 22 matching lines...) Expand all
2928 ListQueue(initialCapacity) { 2928 ListQueue(initialCapacity) {
2929 if (initialCapacity === void 0) 2929 if (initialCapacity === void 0)
2930 initialCapacity = null; 2930 initialCapacity = null;
2931 this[_head] = 0; 2931 this[_head] = 0;
2932 this[_tail] = 0; 2932 this[_tail] = 0;
2933 this[_table] = null; 2933 this[_table] = null;
2934 this[_modificationCount] = 0; 2934 this[_modificationCount] = 0;
2935 super.IterableBase(); 2935 super.IterableBase();
2936 if (initialCapacity == null || dart.notNull(initialCapacity) < dart.notN ull(ListQueue$()._INITIAL_CAPACITY)) { 2936 if (initialCapacity == null || dart.notNull(initialCapacity) < dart.notN ull(ListQueue$()._INITIAL_CAPACITY)) {
2937 initialCapacity = ListQueue$()._INITIAL_CAPACITY; 2937 initialCapacity = ListQueue$()._INITIAL_CAPACITY;
2938 } else if (!dart.notNull(ListQueue$()._isPowerOf2(initialCapacity))) { 2938 } else if (!dart.notNull(dart.dcall(ListQueue$()._isPowerOf2, initialCap acity))) {
2939 initialCapacity = ListQueue$()._nextPowerOf2(initialCapacity); 2939 initialCapacity = dart.dcall(ListQueue$()._nextPowerOf2, initialCapaci ty);
2940 } 2940 }
2941 dart.assert(ListQueue$()._isPowerOf2(initialCapacity)); 2941 dart.assert(dart.dcall(ListQueue$()._isPowerOf2, initialCapacity));
2942 this[_table] = core.List$(E).new(initialCapacity); 2942 this[_table] = core.List$(E).new(initialCapacity);
2943 } 2943 }
2944 static from(elements) { 2944 static from(elements) {
2945 if (dart.is(elements, core.List)) { 2945 if (dart.is(elements, core.List)) {
2946 let length = elements[dartx.length]; 2946 let length = elements[dartx.length];
2947 let queue = new (ListQueue$(E))(dart.notNull(length) + 1); 2947 let queue = new (ListQueue$(E))(dart.notNull(length) + 1);
2948 dart.assert(dart.notNull(queue[_table][dartx.length]) > dart.notNull(l ength)); 2948 dart.assert(dart.notNull(queue[_table][dartx.length]) > dart.notNull(l ength));
2949 let sourceList = elements; 2949 let sourceList = elements;
2950 queue[_table][dartx.setRange](0, length, dart.as(sourceList, core.Iter able$(E)), 0); 2950 dart.dcall(queue[_table][dartx.setRange], 0, length, sourceList, 0);
2951 queue[_tail] = length; 2951 queue[_tail] = length;
2952 return queue; 2952 return queue;
2953 } else { 2953 } else {
2954 let capacity = ListQueue$()._INITIAL_CAPACITY; 2954 let capacity = ListQueue$()._INITIAL_CAPACITY;
2955 if (dart.is(elements, _internal.EfficientLength)) { 2955 if (dart.is(elements, _internal.EfficientLength)) {
2956 capacity = elements[dartx.length]; 2956 capacity = elements[dartx.length];
2957 } 2957 }
2958 let result = new (ListQueue$(E))(capacity); 2958 let result = new (ListQueue$(E))(capacity);
2959 for (let element of dart.as(elements, core.Iterable$(E))) { 2959 for (let element of dart.as(elements, core.Iterable$(E))) {
2960 result.addLast(element); 2960 dart.dcall(result.addLast, element);
2961 } 2961 }
2962 return result; 2962 return result;
2963 } 2963 }
2964 } 2964 }
2965 get iterator() { 2965 get iterator() {
2966 return new (_ListQueueIterator$(E))(this); 2966 return new (_ListQueueIterator$(E))(this);
2967 } 2967 }
2968 forEach(action) { 2968 forEach(action) {
2969 dart.as(action, dart.functionType(dart.void, [E])); 2969 dart.as(action, dart.functionType(dart.void, [E]));
2970 let modificationCount = this[_modificationCount]; 2970 let modificationCount = this[_modificationCount];
2971 for (let i = this[_head]; i != this[_tail]; i = dart.notNull(i) + 1 & da rt.notNull(this[_table][dartx.length]) - 1) { 2971 for (let i = this[_head]; i != this[_tail]; i = dart.notNull(i) + 1 & da rt.notNull(this[_table][dartx.length]) - 1) {
2972 action(this[_table][dartx.get](i)); 2972 action(this[_table][dartx.get](i));
2973 this[_checkModification](modificationCount); 2973 dart.dcall(this[_checkModification], modificationCount);
2974 } 2974 }
2975 } 2975 }
2976 get isEmpty() { 2976 get isEmpty() {
2977 return this[_head] == this[_tail]; 2977 return this[_head] == this[_tail];
2978 } 2978 }
2979 get length() { 2979 get length() {
2980 return dart.notNull(this[_tail]) - dart.notNull(this[_head]) & dart.notN ull(this[_table][dartx.length]) - 1; 2980 return dart.notNull(this[_tail]) - dart.notNull(this[_head]) & dart.notN ull(this[_table][dartx.length]) - 1;
2981 } 2981 }
2982 get first() { 2982 get first() {
2983 if (this[_head] == this[_tail]) 2983 if (this[_head] == this[_tail])
2984 dart.throw(_internal.IterableElementError.noElement()); 2984 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
2985 return this[_table][dartx.get](this[_head]); 2985 return this[_table][dartx.get](this[_head]);
2986 } 2986 }
2987 get last() { 2987 get last() {
2988 if (this[_head] == this[_tail]) 2988 if (this[_head] == this[_tail])
2989 dart.throw(_internal.IterableElementError.noElement()); 2989 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
2990 return this[_table][dartx.get](dart.notNull(this[_tail]) - 1 & dart.notN ull(this[_table][dartx.length]) - 1); 2990 return this[_table][dartx.get](dart.notNull(this[_tail]) - 1 & dart.notN ull(this[_table][dartx.length]) - 1);
2991 } 2991 }
2992 get single() { 2992 get single() {
2993 if (this[_head] == this[_tail]) 2993 if (this[_head] == this[_tail])
2994 dart.throw(_internal.IterableElementError.noElement()); 2994 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
2995 if (dart.notNull(this.length) > 1) 2995 if (dart.notNull(this.length) > 1)
2996 dart.throw(_internal.IterableElementError.tooMany()); 2996 dart.throw(dart.dcall(_internal.IterableElementError.tooMany));
2997 return this[_table][dartx.get](this[_head]); 2997 return this[_table][dartx.get](this[_head]);
2998 } 2998 }
2999 elementAt(index) { 2999 elementAt(index) {
3000 core.RangeError.checkValidIndex(index, this); 3000 dart.dcall(core.RangeError.checkValidIndex, index, this);
3001 return this[_table][dartx.get](dart.notNull(this[_head]) + dart.notNull( index) & dart.notNull(this[_table][dartx.length]) - 1); 3001 return this[_table][dartx.get](dart.notNull(this[_head]) + dart.notNull( index) & dart.notNull(this[_table][dartx.length]) - 1);
3002 } 3002 }
3003 toList(opts) { 3003 toList(opts) {
3004 let growable = opts && 'growable' in opts ? opts.growable : true; 3004 let growable = opts && 'growable' in opts ? opts.growable : true;
3005 let list = null; 3005 let list = null;
3006 if (dart.notNull(growable)) { 3006 if (dart.notNull(growable)) {
3007 list = core.List$(E).new(); 3007 list = core.List$(E).new();
3008 list[dartx.length] = this.length; 3008 list[dartx.length] = this.length;
3009 } else { 3009 } else {
3010 list = core.List$(E).new(this.length); 3010 list = core.List$(E).new(this.length);
3011 } 3011 }
3012 this[_writeToList](list); 3012 dart.dcall(this[_writeToList], list);
3013 return list; 3013 return list;
3014 } 3014 }
3015 add(element) { 3015 add(element) {
3016 dart.as(element, E); 3016 dart.as(element, E);
3017 this[_add](element); 3017 dart.dcall(this[_add], element);
3018 } 3018 }
3019 addAll(elements) { 3019 addAll(elements) {
3020 dart.as(elements, core.Iterable$(E)); 3020 dart.as(elements, core.Iterable$(E));
3021 if (dart.is(elements, core.List)) { 3021 if (dart.is(elements, core.List)) {
3022 let list = dart.as(elements, core.List); 3022 let list = dart.as(elements, core.List);
3023 let addCount = list[dartx.length]; 3023 let addCount = list[dartx.length];
3024 let length = this.length; 3024 let length = this.length;
3025 if (dart.notNull(length) + dart.notNull(addCount) >= dart.notNull(this [_table][dartx.length])) { 3025 if (dart.notNull(length) + dart.notNull(addCount) >= dart.notNull(this [_table][dartx.length])) {
3026 this[_preGrow](dart.notNull(length) + dart.notNull(addCount)); 3026 dart.dcall(this[_preGrow], dart.notNull(length) + dart.notNull(addCo unt));
3027 this[_table][dartx.setRange](length, dart.notNull(length) + dart.not Null(addCount), dart.as(list, core.Iterable$(E)), 0); 3027 dart.dcall(this[_table][dartx.setRange], length, dart.notNull(length ) + dart.notNull(addCount), list, 0);
3028 this[_tail] = dart.notNull(this[_tail]) + dart.notNull(addCount); 3028 this[_tail] = dart.notNull(this[_tail]) + dart.notNull(addCount);
3029 } else { 3029 } else {
3030 let endSpace = dart.notNull(this[_table][dartx.length]) - dart.notNu ll(this[_tail]); 3030 let endSpace = dart.notNull(this[_table][dartx.length]) - dart.notNu ll(this[_tail]);
3031 if (dart.notNull(addCount) < dart.notNull(endSpace)) { 3031 if (dart.notNull(addCount) < dart.notNull(endSpace)) {
3032 this[_table][dartx.setRange](this[_tail], dart.notNull(this[_tail] ) + dart.notNull(addCount), dart.as(list, core.Iterable$(E)), 0); 3032 dart.dcall(this[_table][dartx.setRange], this[_tail], dart.notNull (this[_tail]) + dart.notNull(addCount), list, 0);
3033 this[_tail] = dart.notNull(this[_tail]) + dart.notNull(addCount); 3033 this[_tail] = dart.notNull(this[_tail]) + dart.notNull(addCount);
3034 } else { 3034 } else {
3035 let preSpace = dart.notNull(addCount) - dart.notNull(endSpace); 3035 let preSpace = dart.notNull(addCount) - dart.notNull(endSpace);
3036 this[_table][dartx.setRange](this[_tail], dart.notNull(this[_tail] ) + dart.notNull(endSpace), dart.as(list, core.Iterable$(E)), 0); 3036 dart.dcall(this[_table][dartx.setRange], this[_tail], dart.notNull (this[_tail]) + dart.notNull(endSpace), list, 0);
3037 this[_table][dartx.setRange](0, preSpace, dart.as(list, core.Itera ble$(E)), endSpace); 3037 dart.dcall(this[_table][dartx.setRange], 0, preSpace, list, endSpa ce);
3038 this[_tail] = preSpace; 3038 this[_tail] = preSpace;
3039 } 3039 }
3040 } 3040 }
3041 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; 3041 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1;
3042 } else { 3042 } else {
3043 for (let element of elements) 3043 for (let element of elements)
3044 this[_add](element); 3044 dart.dcall(this[_add], element);
3045 } 3045 }
3046 } 3046 }
3047 remove(object) { 3047 remove(object) {
3048 for (let i = this[_head]; i != this[_tail]; i = dart.notNull(i) + 1 & da rt.notNull(this[_table][dartx.length]) - 1) { 3048 for (let i = this[_head]; i != this[_tail]; i = dart.notNull(i) + 1 & da rt.notNull(this[_table][dartx.length]) - 1) {
3049 let element = this[_table][dartx.get](i); 3049 let element = this[_table][dartx.get](i);
3050 if (dart.equals(element, object)) { 3050 if (dart.equals(element, object)) {
3051 this[_remove](i); 3051 dart.dcall(this[_remove], i);
3052 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; 3052 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1;
3053 return true; 3053 return true;
3054 } 3054 }
3055 } 3055 }
3056 return false; 3056 return false;
3057 } 3057 }
3058 [_filterWhere](test, removeMatching) { 3058 [_filterWhere](test, removeMatching) {
3059 dart.as(test, dart.functionType(core.bool, [E])); 3059 dart.as(test, dart.functionType(core.bool, [E]));
3060 let index = this[_head]; 3060 let index = this[_head];
3061 let modificationCount = this[_modificationCount]; 3061 let modificationCount = this[_modificationCount];
3062 let i = this[_head]; 3062 let i = this[_head];
3063 while (i != this[_tail]) { 3063 while (i != this[_tail]) {
3064 let element = this[_table][dartx.get](i); 3064 let element = this[_table][dartx.get](i);
3065 let remove = core.identical(removeMatching, test(element)); 3065 let remove = dart.dcall(core.identical, removeMatching, test(element)) ;
3066 this[_checkModification](modificationCount); 3066 dart.dcall(this[_checkModification], modificationCount);
3067 if (dart.notNull(remove)) { 3067 if (dart.notNull(remove)) {
3068 i = this[_remove](i); 3068 i = dart.dcall(this[_remove], i);
3069 modificationCount = this[_modificationCount] = dart.notNull(this[_mo dificationCount]) + 1; 3069 modificationCount = this[_modificationCount] = dart.notNull(this[_mo dificationCount]) + 1;
3070 } else { 3070 } else {
3071 i = dart.notNull(i) + 1 & dart.notNull(this[_table][dartx.length]) - 1; 3071 i = dart.notNull(i) + 1 & dart.notNull(this[_table][dartx.length]) - 1;
3072 } 3072 }
3073 } 3073 }
3074 } 3074 }
3075 removeWhere(test) { 3075 removeWhere(test) {
3076 dart.as(test, dart.functionType(core.bool, [E])); 3076 dart.as(test, dart.functionType(core.bool, [E]));
3077 this[_filterWhere](test, true); 3077 dart.dcall(this[_filterWhere], test, true);
3078 } 3078 }
3079 retainWhere(test) { 3079 retainWhere(test) {
3080 dart.as(test, dart.functionType(core.bool, [E])); 3080 dart.as(test, dart.functionType(core.bool, [E]));
3081 this[_filterWhere](test, false); 3081 dart.dcall(this[_filterWhere], test, false);
3082 } 3082 }
3083 clear() { 3083 clear() {
3084 if (this[_head] != this[_tail]) { 3084 if (this[_head] != this[_tail]) {
3085 for (let i = this[_head]; i != this[_tail]; i = dart.notNull(i) + 1 & dart.notNull(this[_table][dartx.length]) - 1) { 3085 for (let i = this[_head]; i != this[_tail]; i = dart.notNull(i) + 1 & dart.notNull(this[_table][dartx.length]) - 1) {
3086 this[_table][dartx.set](i, null); 3086 this[_table][dartx.set](i, null);
3087 } 3087 }
3088 this[_head] = this[_tail] = 0; 3088 this[_head] = this[_tail] = 0;
3089 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; 3089 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1;
3090 } 3090 }
3091 } 3091 }
3092 toString() { 3092 toString() {
3093 return IterableBase.iterableToFullString(this, "{", "}"); 3093 return dart.dcall(IterableBase.iterableToFullString, this, "{", "}");
3094 } 3094 }
3095 addLast(element) { 3095 addLast(element) {
3096 dart.as(element, E); 3096 dart.as(element, E);
3097 this[_add](element); 3097 dart.dcall(this[_add], element);
3098 } 3098 }
3099 addFirst(element) { 3099 addFirst(element) {
3100 dart.as(element, E); 3100 dart.as(element, E);
3101 this[_head] = dart.notNull(this[_head]) - 1 & dart.notNull(this[_table][ dartx.length]) - 1; 3101 this[_head] = dart.notNull(this[_head]) - 1 & dart.notNull(this[_table][ dartx.length]) - 1;
3102 this[_table][dartx.set](this[_head], element); 3102 this[_table][dartx.set](this[_head], element);
3103 if (this[_head] == this[_tail]) 3103 if (this[_head] == this[_tail])
3104 this[_grow](); 3104 dart.dcall(this[_grow]);
3105 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; 3105 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1;
3106 } 3106 }
3107 removeFirst() { 3107 removeFirst() {
3108 if (this[_head] == this[_tail]) 3108 if (this[_head] == this[_tail])
3109 dart.throw(_internal.IterableElementError.noElement()); 3109 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
3110 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; 3110 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1;
3111 let result = this[_table][dartx.get](this[_head]); 3111 let result = this[_table][dartx.get](this[_head]);
3112 this[_table][dartx.set](this[_head], null); 3112 this[_table][dartx.set](this[_head], null);
3113 this[_head] = dart.notNull(this[_head]) + 1 & dart.notNull(this[_table][ dartx.length]) - 1; 3113 this[_head] = dart.notNull(this[_head]) + 1 & dart.notNull(this[_table][ dartx.length]) - 1;
3114 return result; 3114 return result;
3115 } 3115 }
3116 removeLast() { 3116 removeLast() {
3117 if (this[_head] == this[_tail]) 3117 if (this[_head] == this[_tail])
3118 dart.throw(_internal.IterableElementError.noElement()); 3118 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
3119 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; 3119 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1;
3120 this[_tail] = dart.notNull(this[_tail]) - 1 & dart.notNull(this[_table][ dartx.length]) - 1; 3120 this[_tail] = dart.notNull(this[_tail]) - 1 & dart.notNull(this[_table][ dartx.length]) - 1;
3121 let result = this[_table][dartx.get](this[_tail]); 3121 let result = this[_table][dartx.get](this[_tail]);
3122 this[_table][dartx.set](this[_tail], null); 3122 this[_table][dartx.set](this[_tail], null);
3123 return result; 3123 return result;
3124 } 3124 }
3125 static _isPowerOf2(number) { 3125 static _isPowerOf2(number) {
3126 return (dart.notNull(number) & dart.notNull(number) - 1) == 0; 3126 return (dart.notNull(number) & dart.notNull(number) - 1) == 0;
3127 } 3127 }
3128 static _nextPowerOf2(number) { 3128 static _nextPowerOf2(number) {
3129 dart.assert(dart.notNull(number) > 0); 3129 dart.assert(dart.notNull(number) > 0);
3130 number = (dart.notNull(number) << 1) - 1; 3130 number = (dart.notNull(number) << 1) - 1;
3131 for (;;) { 3131 for (;;) {
3132 let nextNumber = dart.notNull(number) & dart.notNull(number) - 1; 3132 let nextNumber = dart.notNull(number) & dart.notNull(number) - 1;
3133 if (nextNumber == 0) 3133 if (nextNumber == 0)
3134 return number; 3134 return number;
3135 number = nextNumber; 3135 number = nextNumber;
3136 } 3136 }
3137 } 3137 }
3138 [_checkModification](expectedModificationCount) { 3138 [_checkModification](expectedModificationCount) {
3139 if (expectedModificationCount != this[_modificationCount]) { 3139 if (expectedModificationCount != this[_modificationCount]) {
3140 dart.throw(new core.ConcurrentModificationError(this)); 3140 dart.throw(new core.ConcurrentModificationError(this));
3141 } 3141 }
3142 } 3142 }
3143 [_add](element) { 3143 [_add](element) {
3144 dart.as(element, E); 3144 dart.as(element, E);
3145 this[_table][dartx.set](this[_tail], element); 3145 this[_table][dartx.set](this[_tail], element);
3146 this[_tail] = dart.notNull(this[_tail]) + 1 & dart.notNull(this[_table][ dartx.length]) - 1; 3146 this[_tail] = dart.notNull(this[_tail]) + 1 & dart.notNull(this[_table][ dartx.length]) - 1;
3147 if (this[_head] == this[_tail]) 3147 if (this[_head] == this[_tail])
3148 this[_grow](); 3148 dart.dcall(this[_grow]);
3149 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; 3149 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1;
3150 } 3150 }
3151 [_remove](offset) { 3151 [_remove](offset) {
3152 let mask = dart.notNull(this[_table][dartx.length]) - 1; 3152 let mask = dart.notNull(this[_table][dartx.length]) - 1;
3153 let startDistance = dart.notNull(offset) - dart.notNull(this[_head]) & d art.notNull(mask); 3153 let startDistance = dart.notNull(offset) - dart.notNull(this[_head]) & d art.notNull(mask);
3154 let endDistance = dart.notNull(this[_tail]) - dart.notNull(offset) & dar t.notNull(mask); 3154 let endDistance = dart.notNull(this[_tail]) - dart.notNull(offset) & dar t.notNull(mask);
3155 if (dart.notNull(startDistance) < dart.notNull(endDistance)) { 3155 if (dart.notNull(startDistance) < dart.notNull(endDistance)) {
3156 let i = offset; 3156 let i = offset;
3157 while (i != this[_head]) { 3157 while (i != this[_head]) {
3158 let prevOffset = dart.notNull(i) - 1 & dart.notNull(mask); 3158 let prevOffset = dart.notNull(i) - 1 & dart.notNull(mask);
(...skipping 11 matching lines...) Expand all
3170 this[_table][dartx.set](i, this[_table][dartx.get](nextOffset)); 3170 this[_table][dartx.set](i, this[_table][dartx.get](nextOffset));
3171 i = nextOffset; 3171 i = nextOffset;
3172 } 3172 }
3173 this[_table][dartx.set](this[_tail], null); 3173 this[_table][dartx.set](this[_tail], null);
3174 return offset; 3174 return offset;
3175 } 3175 }
3176 } 3176 }
3177 [_grow]() { 3177 [_grow]() {
3178 let newTable = core.List$(E).new(dart.notNull(this[_table][dartx.length] ) * 2); 3178 let newTable = core.List$(E).new(dart.notNull(this[_table][dartx.length] ) * 2);
3179 let split = dart.notNull(this[_table][dartx.length]) - dart.notNull(this [_head]); 3179 let split = dart.notNull(this[_table][dartx.length]) - dart.notNull(this [_head]);
3180 newTable[dartx.setRange](0, split, this[_table], this[_head]); 3180 dart.dcall(newTable[dartx.setRange], 0, split, this[_table], this[_head] );
3181 newTable[dartx.setRange](split, dart.notNull(split) + dart.notNull(this[ _head]), this[_table], 0); 3181 dart.dcall(newTable[dartx.setRange], split, dart.notNull(split) + dart.n otNull(this[_head]), this[_table], 0);
3182 this[_head] = 0; 3182 this[_head] = 0;
3183 this[_tail] = this[_table][dartx.length]; 3183 this[_tail] = this[_table][dartx.length];
3184 this[_table] = newTable; 3184 this[_table] = newTable;
3185 } 3185 }
3186 [_writeToList](target) { 3186 [_writeToList](target) {
3187 dart.as(target, core.List$(E)); 3187 dart.as(target, core.List$(E));
3188 dart.assert(dart.notNull(target[dartx.length]) >= dart.notNull(this.leng th)); 3188 dart.assert(dart.notNull(target[dartx.length]) >= dart.notNull(this.leng th));
3189 if (dart.notNull(this[_head]) <= dart.notNull(this[_tail])) { 3189 if (dart.notNull(this[_head]) <= dart.notNull(this[_tail])) {
3190 let length = dart.notNull(this[_tail]) - dart.notNull(this[_head]); 3190 let length = dart.notNull(this[_tail]) - dart.notNull(this[_head]);
3191 target[dartx.setRange](0, length, this[_table], this[_head]); 3191 dart.dcall(target[dartx.setRange], 0, length, this[_table], this[_head ]);
3192 return length; 3192 return length;
3193 } else { 3193 } else {
3194 let firstPartSize = dart.notNull(this[_table][dartx.length]) - dart.no tNull(this[_head]); 3194 let firstPartSize = dart.notNull(this[_table][dartx.length]) - dart.no tNull(this[_head]);
3195 target[dartx.setRange](0, firstPartSize, this[_table], this[_head]); 3195 dart.dcall(target[dartx.setRange], 0, firstPartSize, this[_table], thi s[_head]);
3196 target[dartx.setRange](firstPartSize, dart.notNull(firstPartSize) + da rt.notNull(this[_tail]), this[_table], 0); 3196 dart.dcall(target[dartx.setRange], firstPartSize, dart.notNull(firstPa rtSize) + dart.notNull(this[_tail]), this[_table], 0);
3197 return dart.notNull(this[_tail]) + dart.notNull(firstPartSize); 3197 return dart.notNull(this[_tail]) + dart.notNull(firstPartSize);
3198 } 3198 }
3199 } 3199 }
3200 [_preGrow](newElementCount) { 3200 [_preGrow](newElementCount) {
3201 dart.assert(dart.notNull(newElementCount) >= dart.notNull(this.length)); 3201 dart.assert(dart.notNull(newElementCount) >= dart.notNull(this.length));
3202 newElementCount = dart.notNull(newElementCount) + (dart.notNull(newEleme ntCount) >> 1); 3202 newElementCount = dart.notNull(newElementCount) + (dart.notNull(newEleme ntCount) >> 1);
3203 let newCapacity = ListQueue$()._nextPowerOf2(newElementCount); 3203 let newCapacity = dart.dcall(ListQueue$()._nextPowerOf2, newElementCount );
3204 let newTable = core.List$(E).new(newCapacity); 3204 let newTable = core.List$(E).new(newCapacity);
3205 this[_tail] = this[_writeToList](newTable); 3205 this[_tail] = dart.dcall(this[_writeToList], newTable);
3206 this[_table] = newTable; 3206 this[_table] = newTable;
3207 this[_head] = 0; 3207 this[_head] = 0;
3208 } 3208 }
3209 } 3209 }
3210 ListQueue[dart.implements] = () => [Queue$(E)]; 3210 ListQueue[dart.implements] = () => [Queue$(E)];
3211 dart.setSignature(ListQueue, { 3211 dart.setSignature(ListQueue, {
3212 constructors: () => ({ 3212 constructors: () => ({
3213 ListQueue: [ListQueue$(E), [], [core.int]], 3213 ListQueue: [ListQueue$(E), [], [core.int]],
3214 from: [ListQueue$(E), [core.Iterable]] 3214 from: [ListQueue$(E), [core.Iterable]]
3215 }), 3215 }),
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
3265 this[_queue] = queue; 3265 this[_queue] = queue;
3266 this[_end] = queue[_tail]; 3266 this[_end] = queue[_tail];
3267 this[_modificationCount] = queue[_modificationCount]; 3267 this[_modificationCount] = queue[_modificationCount];
3268 this[_position] = queue[_head]; 3268 this[_position] = queue[_head];
3269 this[_current] = null; 3269 this[_current] = null;
3270 } 3270 }
3271 get current() { 3271 get current() {
3272 return this[_current]; 3272 return this[_current];
3273 } 3273 }
3274 moveNext() { 3274 moveNext() {
3275 this[_queue][_checkModification](this[_modificationCount]); 3275 dart.dcall(this[_queue][_checkModification], this[_modificationCount]);
3276 if (this[_position] == this[_end]) { 3276 if (this[_position] == this[_end]) {
3277 this[_current] = null; 3277 this[_current] = null;
3278 return false; 3278 return false;
3279 } 3279 }
3280 this[_current] = dart.as(this[_queue][_table][dartx.get](this[_position] ), E); 3280 this[_current] = dart.as(this[_queue][_table][dartx.get](this[_position] ), E);
3281 this[_position] = dart.notNull(this[_position]) + 1 & dart.notNull(this[ _queue][_table][dartx.length]) - 1; 3281 this[_position] = dart.notNull(this[_position]) + 1 & dart.notNull(this[ _queue][_table][dartx.length]) - 1;
3282 return true; 3282 return true;
3283 } 3283 }
3284 } 3284 }
3285 _ListQueueIterator[dart.implements] = () => [core.Iterator$(E)]; 3285 _ListQueueIterator[dart.implements] = () => [core.Iterator$(E)];
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
3345 } 3345 }
3346 [_splay](key) { 3346 [_splay](key) {
3347 dart.as(key, K); 3347 dart.as(key, K);
3348 if (this[_root] == null) 3348 if (this[_root] == null)
3349 return -1; 3349 return -1;
3350 let left = this[_dummy]; 3350 let left = this[_dummy];
3351 let right = this[_dummy]; 3351 let right = this[_dummy];
3352 let current = this[_root]; 3352 let current = this[_root];
3353 let comp = null; 3353 let comp = null;
3354 while (true) { 3354 while (true) {
3355 comp = this[_compare](current.key, key); 3355 comp = dart.dcall(this[_compare], current.key, key);
3356 if (dart.notNull(comp) > 0) { 3356 if (dart.notNull(comp) > 0) {
3357 if (current.left == null) 3357 if (current.left == null)
3358 break; 3358 break;
3359 comp = this[_compare](current.left.key, key); 3359 comp = dart.dcall(this[_compare], current.left.key, key);
3360 if (dart.notNull(comp) > 0) { 3360 if (dart.notNull(comp) > 0) {
3361 let tmp = current.left; 3361 let tmp = current.left;
3362 current.left = tmp.right; 3362 current.left = tmp.right;
3363 tmp.right = current; 3363 tmp.right = current;
3364 current = tmp; 3364 current = tmp;
3365 if (current.left == null) 3365 if (current.left == null)
3366 break; 3366 break;
3367 } 3367 }
3368 right.left = current; 3368 right.left = current;
3369 right = current; 3369 right = current;
3370 current = current.left; 3370 current = current.left;
3371 } else if (dart.notNull(comp) < 0) { 3371 } else if (dart.notNull(comp) < 0) {
3372 if (current.right == null) 3372 if (current.right == null)
3373 break; 3373 break;
3374 comp = this[_compare](current.right.key, key); 3374 comp = dart.dcall(this[_compare], current.right.key, key);
3375 if (dart.notNull(comp) < 0) { 3375 if (dart.notNull(comp) < 0) {
3376 let tmp = current.right; 3376 let tmp = current.right;
3377 current.right = tmp.left; 3377 current.right = tmp.left;
3378 tmp.left = current; 3378 tmp.left = current;
3379 current = tmp; 3379 current = tmp;
3380 if (current.right == null) 3380 if (current.right == null)
3381 break; 3381 break;
3382 } 3382 }
3383 left.right = current; 3383 left.right = current;
3384 left = current; 3384 left = current;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
3416 current.right = right.left; 3416 current.right = right.left;
3417 right.left = current; 3417 right.left = current;
3418 current = right; 3418 current = right;
3419 } 3419 }
3420 return dart.as(current, _SplayTreeNode$(K)); 3420 return dart.as(current, _SplayTreeNode$(K));
3421 } 3421 }
3422 [_remove](key) { 3422 [_remove](key) {
3423 dart.as(key, K); 3423 dart.as(key, K);
3424 if (this[_root] == null) 3424 if (this[_root] == null)
3425 return null; 3425 return null;
3426 let comp = this[_splay](key); 3426 let comp = dart.dcall(this[_splay], key);
3427 if (comp != 0) 3427 if (comp != 0)
3428 return null; 3428 return null;
3429 let result = this[_root]; 3429 let result = this[_root];
3430 this[_count] = dart.notNull(this[_count]) - 1; 3430 this[_count] = dart.notNull(this[_count]) - 1;
3431 if (this[_root].left == null) { 3431 if (this[_root].left == null) {
3432 this[_root] = this[_root].right; 3432 this[_root] = this[_root].right;
3433 } else { 3433 } else {
3434 let right = this[_root].right; 3434 let right = this[_root].right;
3435 this[_root] = this[_splayMax](this[_root].left); 3435 this[_root] = dart.dcall(this[_splayMax], this[_root].left);
3436 this[_root].right = right; 3436 this[_root].right = right;
3437 } 3437 }
3438 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; 3438 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1;
3439 return result; 3439 return result;
3440 } 3440 }
3441 [_addNewRoot](node, comp) { 3441 [_addNewRoot](node, comp) {
3442 dart.as(node, _SplayTreeNode$(K)); 3442 dart.as(node, _SplayTreeNode$(K));
3443 this[_count] = dart.notNull(this[_count]) + 1; 3443 this[_count] = dart.notNull(this[_count]) + 1;
3444 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; 3444 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1;
3445 if (this[_root] == null) { 3445 if (this[_root] == null) {
3446 this[_root] = node; 3446 this[_root] = node;
3447 return; 3447 return;
3448 } 3448 }
3449 if (dart.notNull(comp) < 0) { 3449 if (dart.notNull(comp) < 0) {
3450 node.left = this[_root]; 3450 node.left = this[_root];
3451 node.right = this[_root].right; 3451 node.right = this[_root].right;
3452 this[_root].right = null; 3452 this[_root].right = null;
3453 } else { 3453 } else {
3454 node.right = this[_root]; 3454 node.right = this[_root];
3455 node.left = this[_root].left; 3455 node.left = this[_root].left;
3456 this[_root].left = null; 3456 this[_root].left = null;
3457 } 3457 }
3458 this[_root] = node; 3458 this[_root] = node;
3459 } 3459 }
3460 get [_first]() { 3460 get [_first]() {
3461 if (this[_root] == null) 3461 if (this[_root] == null)
3462 return null; 3462 return null;
3463 this[_root] = this[_splayMin](this[_root]); 3463 this[_root] = dart.dcall(this[_splayMin], this[_root]);
3464 return this[_root]; 3464 return this[_root];
3465 } 3465 }
3466 get [_last]() { 3466 get [_last]() {
3467 if (this[_root] == null) 3467 if (this[_root] == null)
3468 return null; 3468 return null;
3469 this[_root] = this[_splayMax](this[_root]); 3469 this[_root] = dart.dcall(this[_splayMax], this[_root]);
3470 return this[_root]; 3470 return this[_root];
3471 } 3471 }
3472 [_clear]() { 3472 [_clear]() {
3473 this[_root] = null; 3473 this[_root] = null;
3474 this[_count] = 0; 3474 this[_count] = 0;
3475 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; 3475 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1;
3476 } 3476 }
3477 } 3477 }
3478 dart.setSignature(_SplayTree, { 3478 dart.setSignature(_SplayTree, {
3479 methods: () => ({ 3479 methods: () => ({
(...skipping 20 matching lines...) Expand all
3500 this[_comparator] = dart.as(compare == null ? core.Comparable.compare : compare, core.Comparator$(K)); 3500 this[_comparator] = dart.as(compare == null ? core.Comparable.compare : compare, core.Comparator$(K));
3501 this[_validKey] = isValidKey != null ? isValidKey : dart.fn(v => dart.is (v, K), core.bool, [dart.dynamic]); 3501 this[_validKey] = isValidKey != null ? isValidKey : dart.fn(v => dart.is (v, K), core.bool, [dart.dynamic]);
3502 super._SplayTree(); 3502 super._SplayTree();
3503 } 3503 }
3504 static from(other, compare, isValidKey) { 3504 static from(other, compare, isValidKey) {
3505 if (compare === void 0) 3505 if (compare === void 0)
3506 compare = null; 3506 compare = null;
3507 if (isValidKey === void 0) 3507 if (isValidKey === void 0)
3508 isValidKey = null; 3508 isValidKey = null;
3509 let result = new (SplayTreeMap$(K, V))(); 3509 let result = new (SplayTreeMap$(K, V))();
3510 other.forEach(dart.fn((k, v) => { 3510 dart.dcall(other.forEach, dart.fn((k, v) => {
3511 result.set(dart.as(k, K), dart.as(v, V)); 3511 result.set(dart.as(k, K), dart.as(v, V));
3512 })); 3512 }));
3513 return result; 3513 return result;
3514 } 3514 }
3515 static fromIterable(iterable, opts) { 3515 static fromIterable(iterable, opts) {
3516 let key = opts && 'key' in opts ? opts.key : null; 3516 let key = opts && 'key' in opts ? opts.key : null;
3517 let value = opts && 'value' in opts ? opts.value : null; 3517 let value = opts && 'value' in opts ? opts.value : null;
3518 let compare = opts && 'compare' in opts ? opts.compare : null; 3518 let compare = opts && 'compare' in opts ? opts.compare : null;
3519 let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null; 3519 let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null;
3520 let map = new (SplayTreeMap$(K, V))(compare, isValidKey); 3520 let map = new (SplayTreeMap$(K, V))(compare, isValidKey);
3521 Maps._fillMapWithMappedIterable(map, iterable, key, value); 3521 dart.dcall(Maps._fillMapWithMappedIterable, map, iterable, key, value);
3522 return map; 3522 return map;
3523 } 3523 }
3524 static fromIterables(keys, values, compare, isValidKey) { 3524 static fromIterables(keys, values, compare, isValidKey) {
3525 if (compare === void 0) 3525 if (compare === void 0)
3526 compare = null; 3526 compare = null;
3527 if (isValidKey === void 0) 3527 if (isValidKey === void 0)
3528 isValidKey = null; 3528 isValidKey = null;
3529 let map = new (SplayTreeMap$(K, V))(compare, isValidKey); 3529 let map = new (SplayTreeMap$(K, V))(compare, isValidKey);
3530 Maps._fillMapWithIterables(map, keys, values); 3530 dart.dcall(Maps._fillMapWithIterables, map, keys, values);
3531 return map; 3531 return map;
3532 } 3532 }
3533 [_compare](key1, key2) { 3533 [_compare](key1, key2) {
3534 dart.as(key1, K); 3534 dart.as(key1, K);
3535 dart.as(key2, K); 3535 dart.as(key2, K);
3536 return this[_comparator](key1, key2); 3536 return dart.dcall(this[_comparator], key1, key2);
3537 } 3537 }
3538 _internal() { 3538 _internal() {
3539 this[_comparator] = null; 3539 this[_comparator] = null;
3540 this[_validKey] = null; 3540 this[_validKey] = null;
3541 super._SplayTree(); 3541 super._SplayTree();
3542 } 3542 }
3543 get(key) { 3543 get(key) {
3544 if (key == null) 3544 if (key == null)
3545 dart.throw(new core.ArgumentError(key)); 3545 dart.throw(new core.ArgumentError(key));
3546 if (!dart.notNull(this[_validKey](key))) 3546 if (!dart.notNull(dart.dcall(this[_validKey], key)))
3547 return null; 3547 return null;
3548 if (this[_root] != null) { 3548 if (this[_root] != null) {
3549 let comp = this[_splay](dart.as(key, K)); 3549 let comp = dart.dcall(this[_splay], key);
3550 if (comp == 0) { 3550 if (comp == 0) {
3551 let mapRoot = dart.as(this[_root], _SplayTreeMapNode); 3551 let mapRoot = dart.as(this[_root], _SplayTreeMapNode);
3552 return dart.as(mapRoot.value, V); 3552 return dart.as(mapRoot.value, V);
3553 } 3553 }
3554 } 3554 }
3555 return null; 3555 return null;
3556 } 3556 }
3557 remove(key) { 3557 remove(key) {
3558 if (!dart.notNull(this[_validKey](key))) 3558 if (!dart.notNull(dart.dcall(this[_validKey], key)))
3559 return null; 3559 return null;
3560 let mapRoot = dart.as(this[_remove](dart.as(key, K)), _SplayTreeMapNode) ; 3560 let mapRoot = dart.as(dart.dcall(this[_remove], key), _SplayTreeMapNode) ;
3561 if (mapRoot != null) 3561 if (mapRoot != null)
3562 return dart.as(mapRoot.value, V); 3562 return dart.as(mapRoot.value, V);
3563 return null; 3563 return null;
3564 } 3564 }
3565 set(key, value) { 3565 set(key, value) {
3566 ((() => { 3566 ((() => {
3567 dart.as(key, K); 3567 dart.as(key, K);
3568 dart.as(value, V); 3568 dart.as(value, V);
3569 if (key == null) 3569 if (key == null)
3570 dart.throw(new core.ArgumentError(key)); 3570 dart.throw(new core.ArgumentError(key));
3571 let comp = this[_splay](key); 3571 let comp = dart.dcall(this[_splay], key);
3572 if (comp == 0) { 3572 if (comp == 0) {
3573 let mapRoot = dart.as(this[_root], _SplayTreeMapNode); 3573 let mapRoot = dart.as(this[_root], _SplayTreeMapNode);
3574 mapRoot.value = value; 3574 mapRoot.value = value;
3575 return; 3575 return;
3576 } 3576 }
3577 this[_addNewRoot](new (_SplayTreeMapNode$(K, dart.dynamic))(key, value ), comp); 3577 dart.dcall(this[_addNewRoot], new _SplayTreeMapNode(key, value), comp) ;
3578 }).bind(this))(); 3578 }).bind(this))();
3579 return value; 3579 return value;
3580 } 3580 }
3581 putIfAbsent(key, ifAbsent) { 3581 putIfAbsent(key, ifAbsent) {
3582 dart.as(key, K); 3582 dart.as(key, K);
3583 dart.as(ifAbsent, dart.functionType(V, [])); 3583 dart.as(ifAbsent, dart.functionType(V, []));
3584 if (key == null) 3584 if (key == null)
3585 dart.throw(new core.ArgumentError(key)); 3585 dart.throw(new core.ArgumentError(key));
3586 let comp = this[_splay](key); 3586 let comp = dart.dcall(this[_splay], key);
3587 if (comp == 0) { 3587 if (comp == 0) {
3588 let mapRoot = dart.as(this[_root], _SplayTreeMapNode); 3588 let mapRoot = dart.as(this[_root], _SplayTreeMapNode);
3589 return dart.as(mapRoot.value, V); 3589 return dart.as(mapRoot.value, V);
3590 } 3590 }
3591 let modificationCount = this[_modificationCount]; 3591 let modificationCount = this[_modificationCount];
3592 let splayCount = this[_splayCount]; 3592 let splayCount = this[_splayCount];
3593 let value = ifAbsent(); 3593 let value = ifAbsent();
3594 if (modificationCount != this[_modificationCount]) { 3594 if (modificationCount != this[_modificationCount]) {
3595 dart.throw(new core.ConcurrentModificationError(this)); 3595 dart.throw(new core.ConcurrentModificationError(this));
3596 } 3596 }
3597 if (splayCount != this[_splayCount]) { 3597 if (splayCount != this[_splayCount]) {
3598 comp = this[_splay](key); 3598 comp = dart.dcall(this[_splay], key);
3599 dart.assert(comp != 0); 3599 dart.assert(comp != 0);
3600 } 3600 }
3601 this[_addNewRoot](new (_SplayTreeMapNode$(K, dart.dynamic))(key, value), comp); 3601 dart.dcall(this[_addNewRoot], new _SplayTreeMapNode(key, value), comp);
3602 return value; 3602 return value;
3603 } 3603 }
3604 addAll(other) { 3604 addAll(other) {
3605 dart.as(other, core.Map$(K, V)); 3605 dart.as(other, core.Map$(K, V));
3606 other.forEach(dart.fn(((key, value) => { 3606 dart.dcall(other.forEach, dart.fn(((key, value) => {
3607 dart.as(key, K); 3607 dart.as(key, K);
3608 dart.as(value, V); 3608 dart.as(value, V);
3609 this.set(key, value); 3609 this.set(key, value);
3610 }).bind(this), dart.dynamic, [K, V])); 3610 }).bind(this), dart.dynamic, [K, V]));
3611 } 3611 }
3612 get isEmpty() { 3612 get isEmpty() {
3613 return this[_root] == null; 3613 return this[_root] == null;
3614 } 3614 }
3615 get isNotEmpty() { 3615 get isNotEmpty() {
3616 return !dart.notNull(this.isEmpty); 3616 return !dart.notNull(this.isEmpty);
3617 } 3617 }
3618 forEach(f) { 3618 forEach(f) {
3619 dart.as(f, dart.functionType(dart.void, [K, V])); 3619 dart.as(f, dart.functionType(dart.void, [K, V]));
3620 let nodes = new (_SplayTreeNodeIterator$(K))(this); 3620 let nodes = new (_SplayTreeNodeIterator$(K))(this);
3621 while (dart.notNull(nodes.moveNext())) { 3621 while (dart.notNull(dart.dcall(nodes.moveNext))) {
3622 let node = dart.as(nodes.current, _SplayTreeMapNode$(K, V)); 3622 let node = dart.as(nodes.current, _SplayTreeMapNode$(K, V));
3623 f(node.key, node.value); 3623 f(node.key, node.value);
3624 } 3624 }
3625 } 3625 }
3626 get length() { 3626 get length() {
3627 return this[_count]; 3627 return this[_count];
3628 } 3628 }
3629 clear() { 3629 clear() {
3630 this[_clear](); 3630 dart.dcall(this[_clear]);
3631 } 3631 }
3632 containsKey(key) { 3632 containsKey(key) {
3633 return dart.notNull(this[_validKey](key)) && this[_splay](dart.as(key, K )) == 0; 3633 return dart.notNull(dart.dcall(this[_validKey], key)) && dart.dcall(this [_splay], key) == 0;
3634 } 3634 }
3635 containsValue(value) { 3635 containsValue(value) {
3636 let found = false; 3636 let found = false;
3637 let initialSplayCount = this[_splayCount]; 3637 let initialSplayCount = this[_splayCount];
3638 let visit = (function(node) { 3638 let visit = (function(node) {
3639 while (node != null) { 3639 while (node != null) {
3640 if (dart.equals(node.value, value)) 3640 if (dart.equals(node.value, value))
3641 return true; 3641 return true;
3642 if (initialSplayCount != this[_splayCount]) { 3642 if (initialSplayCount != this[_splayCount]) {
3643 dart.throw(new core.ConcurrentModificationError(this)); 3643 dart.throw(new core.ConcurrentModificationError(this));
3644 } 3644 }
3645 if (node.right != null && dart.notNull(visit(dart.as(node.right, _Sp layTreeMapNode)))) 3645 if (node.right != null && dart.notNull(dart.dcall(visit, node.right) ))
3646 return true; 3646 return true;
3647 node = dart.as(node.left, _SplayTreeMapNode); 3647 node = dart.as(node.left, _SplayTreeMapNode);
3648 } 3648 }
3649 return false; 3649 return false;
3650 }).bind(this); 3650 }).bind(this);
3651 dart.fn(visit, core.bool, [_SplayTreeMapNode]); 3651 dart.fn(visit, core.bool, [_SplayTreeMapNode]);
3652 return visit(dart.as(this[_root], _SplayTreeMapNode)); 3652 return dart.dcall(visit, this[_root]);
3653 } 3653 }
3654 get keys() { 3654 get keys() {
3655 return new (_SplayTreeKeyIterable$(K))(this); 3655 return new (_SplayTreeKeyIterable$(K))(this);
3656 } 3656 }
3657 get values() { 3657 get values() {
3658 return new (_SplayTreeValueIterable$(K, V))(this); 3658 return new (_SplayTreeValueIterable$(K, V))(this);
3659 } 3659 }
3660 toString() { 3660 toString() {
3661 return Maps.mapToString(this); 3661 return dart.dcall(Maps.mapToString, this);
3662 } 3662 }
3663 firstKey() { 3663 firstKey() {
3664 if (this[_root] == null) 3664 if (this[_root] == null)
3665 return null; 3665 return null;
3666 return dart.as(this[_first].key, K); 3666 return dart.as(this[_first].key, K);
3667 } 3667 }
3668 lastKey() { 3668 lastKey() {
3669 if (this[_root] == null) 3669 if (this[_root] == null)
3670 return null; 3670 return null;
3671 return dart.as(this[_last].key, K); 3671 return dart.as(this[_last].key, K);
3672 } 3672 }
3673 lastKeyBefore(key) { 3673 lastKeyBefore(key) {
3674 dart.as(key, K); 3674 dart.as(key, K);
3675 if (key == null) 3675 if (key == null)
3676 dart.throw(new core.ArgumentError(key)); 3676 dart.throw(new core.ArgumentError(key));
3677 if (this[_root] == null) 3677 if (this[_root] == null)
3678 return null; 3678 return null;
3679 let comp = this[_splay](key); 3679 let comp = dart.dcall(this[_splay], key);
3680 if (dart.notNull(comp) < 0) 3680 if (dart.notNull(comp) < 0)
3681 return this[_root].key; 3681 return this[_root].key;
3682 let node = this[_root].left; 3682 let node = this[_root].left;
3683 if (node == null) 3683 if (node == null)
3684 return null; 3684 return null;
3685 while (node.right != null) { 3685 while (node.right != null) {
3686 node = node.right; 3686 node = node.right;
3687 } 3687 }
3688 return node.key; 3688 return node.key;
3689 } 3689 }
3690 firstKeyAfter(key) { 3690 firstKeyAfter(key) {
3691 dart.as(key, K); 3691 dart.as(key, K);
3692 if (key == null) 3692 if (key == null)
3693 dart.throw(new core.ArgumentError(key)); 3693 dart.throw(new core.ArgumentError(key));
3694 if (this[_root] == null) 3694 if (this[_root] == null)
3695 return null; 3695 return null;
3696 let comp = this[_splay](key); 3696 let comp = dart.dcall(this[_splay], key);
3697 if (dart.notNull(comp) > 0) 3697 if (dart.notNull(comp) > 0)
3698 return this[_root].key; 3698 return this[_root].key;
3699 let node = this[_root].right; 3699 let node = this[_root].right;
3700 if (node == null) 3700 if (node == null)
3701 return null; 3701 return null;
3702 while (node.left != null) { 3702 while (node.left != null) {
3703 node = node.left; 3703 node = node.left;
3704 } 3704 }
3705 return node.key; 3705 return node.key;
3706 } 3706 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
3742 let _getValue = Symbol('_getValue'); 3742 let _getValue = Symbol('_getValue');
3743 let _rebuildWorkList = Symbol('_rebuildWorkList'); 3743 let _rebuildWorkList = Symbol('_rebuildWorkList');
3744 let _SplayTreeIterator$ = dart.generic(function(T) { 3744 let _SplayTreeIterator$ = dart.generic(function(T) {
3745 class _SplayTreeIterator extends core.Object { 3745 class _SplayTreeIterator extends core.Object {
3746 _SplayTreeIterator(tree) { 3746 _SplayTreeIterator(tree) {
3747 this[_workList] = dart.list([], _SplayTreeNode); 3747 this[_workList] = dart.list([], _SplayTreeNode);
3748 this[_tree] = tree; 3748 this[_tree] = tree;
3749 this[_modificationCount] = tree[_modificationCount]; 3749 this[_modificationCount] = tree[_modificationCount];
3750 this[_splayCount] = tree[_splayCount]; 3750 this[_splayCount] = tree[_splayCount];
3751 this[_currentNode] = null; 3751 this[_currentNode] = null;
3752 this[_findLeftMostDescendent](tree[_root]); 3752 dart.dcall(this[_findLeftMostDescendent], tree[_root]);
3753 } 3753 }
3754 startAt(tree, startKey) { 3754 startAt(tree, startKey) {
3755 this[_workList] = dart.list([], _SplayTreeNode); 3755 this[_workList] = dart.list([], _SplayTreeNode);
3756 this[_tree] = tree; 3756 this[_tree] = tree;
3757 this[_modificationCount] = tree[_modificationCount]; 3757 this[_modificationCount] = tree[_modificationCount];
3758 this[_splayCount] = null; 3758 this[_splayCount] = null;
3759 this[_currentNode] = null; 3759 this[_currentNode] = null;
3760 if (tree[_root] == null) 3760 if (tree[_root] == null)
3761 return; 3761 return;
3762 let compare = tree[_splay](startKey); 3762 let compare = dart.dcall(tree[_splay], startKey);
3763 this[_splayCount] = tree[_splayCount]; 3763 this[_splayCount] = tree[_splayCount];
3764 if (dart.notNull(compare) < 0) { 3764 if (dart.notNull(compare) < 0) {
3765 this[_findLeftMostDescendent](tree[_root].right); 3765 dart.dcall(this[_findLeftMostDescendent], tree[_root].right);
3766 } else { 3766 } else {
3767 this[_workList][dartx.add](tree[_root]); 3767 dart.dcall(this[_workList][dartx.add], tree[_root]);
3768 } 3768 }
3769 } 3769 }
3770 get current() { 3770 get current() {
3771 if (this[_currentNode] == null) 3771 if (this[_currentNode] == null)
3772 return null; 3772 return null;
3773 return this[_getValue](dart.as(this[_currentNode], _SplayTreeMapNode)); 3773 return dart.dcall(this[_getValue], this[_currentNode]);
3774 } 3774 }
3775 [_findLeftMostDescendent](node) { 3775 [_findLeftMostDescendent](node) {
3776 while (node != null) { 3776 while (node != null) {
3777 this[_workList][dartx.add](node); 3777 dart.dcall(this[_workList][dartx.add], node);
3778 node = node.left; 3778 node = node.left;
3779 } 3779 }
3780 } 3780 }
3781 [_rebuildWorkList](currentNode) { 3781 [_rebuildWorkList](currentNode) {
3782 dart.assert(!dart.notNull(this[_workList][dartx.isEmpty])); 3782 dart.assert(!dart.notNull(this[_workList][dartx.isEmpty]));
3783 this[_workList][dartx.clear](); 3783 dart.dcall(this[_workList][dartx.clear]);
3784 if (currentNode == null) { 3784 if (currentNode == null) {
3785 this[_findLeftMostDescendent](this[_tree][_root]); 3785 dart.dcall(this[_findLeftMostDescendent], this[_tree][_root]);
3786 } else { 3786 } else {
3787 this[_tree][_splay](currentNode.key); 3787 dart.dcall(this[_tree][_splay], currentNode.key);
3788 this[_findLeftMostDescendent](this[_tree][_root].right); 3788 dart.dcall(this[_findLeftMostDescendent], this[_tree][_root].right);
3789 dart.assert(!dart.notNull(this[_workList][dartx.isEmpty])); 3789 dart.assert(!dart.notNull(this[_workList][dartx.isEmpty]));
3790 } 3790 }
3791 } 3791 }
3792 moveNext() { 3792 moveNext() {
3793 if (this[_modificationCount] != this[_tree][_modificationCount]) { 3793 if (this[_modificationCount] != this[_tree][_modificationCount]) {
3794 dart.throw(new core.ConcurrentModificationError(this[_tree])); 3794 dart.throw(new core.ConcurrentModificationError(this[_tree]));
3795 } 3795 }
3796 if (dart.notNull(this[_workList][dartx.isEmpty])) { 3796 if (dart.notNull(this[_workList][dartx.isEmpty])) {
3797 this[_currentNode] = null; 3797 this[_currentNode] = null;
3798 return false; 3798 return false;
3799 } 3799 }
3800 if (this[_tree][_splayCount] != this[_splayCount] && this[_currentNode] != null) { 3800 if (this[_tree][_splayCount] != this[_splayCount] && this[_currentNode] != null) {
3801 this[_rebuildWorkList](this[_currentNode]); 3801 dart.dcall(this[_rebuildWorkList], this[_currentNode]);
3802 } 3802 }
3803 this[_currentNode] = this[_workList][dartx.removeLast](); 3803 this[_currentNode] = dart.dcall(this[_workList][dartx.removeLast]);
3804 this[_findLeftMostDescendent](this[_currentNode].right); 3804 dart.dcall(this[_findLeftMostDescendent], this[_currentNode].right);
3805 return true; 3805 return true;
3806 } 3806 }
3807 } 3807 }
3808 _SplayTreeIterator[dart.implements] = () => [core.Iterator$(T)]; 3808 _SplayTreeIterator[dart.implements] = () => [core.Iterator$(T)];
3809 dart.defineNamedConstructor(_SplayTreeIterator, 'startAt'); 3809 dart.defineNamedConstructor(_SplayTreeIterator, 'startAt');
3810 dart.setSignature(_SplayTreeIterator, { 3810 dart.setSignature(_SplayTreeIterator, {
3811 constructors: () => ({ 3811 constructors: () => ({
3812 _SplayTreeIterator: [_SplayTreeIterator$(T), [_SplayTree]], 3812 _SplayTreeIterator: [_SplayTreeIterator$(T), [_SplayTree]],
3813 startAt: [_SplayTreeIterator$(T), [_SplayTree, dart.dynamic]] 3813 startAt: [_SplayTreeIterator$(T), [_SplayTree, dart.dynamic]]
3814 }), 3814 }),
(...skipping 17 matching lines...) Expand all
3832 return this[_tree][_count]; 3832 return this[_tree][_count];
3833 } 3833 }
3834 get isEmpty() { 3834 get isEmpty() {
3835 return this[_tree][_count] == 0; 3835 return this[_tree][_count] == 0;
3836 } 3836 }
3837 get iterator() { 3837 get iterator() {
3838 return new (_SplayTreeKeyIterator$(K))(this[_tree]); 3838 return new (_SplayTreeKeyIterator$(K))(this[_tree]);
3839 } 3839 }
3840 toSet() { 3840 toSet() {
3841 let setOrMap = this[_tree]; 3841 let setOrMap = this[_tree];
3842 let set = new (SplayTreeSet$(K))(dart.as(setOrMap[_comparator], __CastTy pe0), dart.as(setOrMap[_validKey], __CastType3)); 3842 let set = new (SplayTreeSet$(K))(dart.as(dart.dload(setOrMap, _comparato r), __CastType0), dart.as(dart.dload(setOrMap, _validKey), __CastType3));
3843 set[_count] = this[_tree][_count]; 3843 set[_count] = this[_tree][_count];
3844 set[_root] = set[_copyNode](this[_tree][_root]); 3844 set[_root] = dart.dcall(set[_copyNode], this[_tree][_root]);
3845 return set; 3845 return set;
3846 } 3846 }
3847 } 3847 }
3848 _SplayTreeKeyIterable[dart.implements] = () => [_internal.EfficientLength]; 3848 _SplayTreeKeyIterable[dart.implements] = () => [_internal.EfficientLength];
3849 dart.setSignature(_SplayTreeKeyIterable, { 3849 dart.setSignature(_SplayTreeKeyIterable, {
3850 constructors: () => ({_SplayTreeKeyIterable: [_SplayTreeKeyIterable$(K), [ _SplayTree$(K)]]}), 3850 constructors: () => ({_SplayTreeKeyIterable: [_SplayTreeKeyIterable$(K), [ _SplayTree$(K)]]}),
3851 methods: () => ({toSet: [core.Set$(K), []]}) 3851 methods: () => ({toSet: [core.Set$(K), []]})
3852 }); 3852 });
3853 dart.defineExtensionMembers(_SplayTreeKeyIterable, ['toSet', 'length', 'isEm pty', 'iterator']); 3853 dart.defineExtensionMembers(_SplayTreeKeyIterable, ['toSet', 'length', 'isEm pty', 'iterator']);
3854 return _SplayTreeKeyIterable; 3854 return _SplayTreeKeyIterable;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
3945 this[_validKey] = isValidKey != null ? isValidKey : dart.fn(v => dart.is (v, E), core.bool, [dart.dynamic]); 3945 this[_validKey] = isValidKey != null ? isValidKey : dart.fn(v => dart.is (v, E), core.bool, [dart.dynamic]);
3946 super._SplayTree(); 3946 super._SplayTree();
3947 } 3947 }
3948 static from(elements, compare, isValidKey) { 3948 static from(elements, compare, isValidKey) {
3949 if (compare === void 0) 3949 if (compare === void 0)
3950 compare = null; 3950 compare = null;
3951 if (isValidKey === void 0) 3951 if (isValidKey === void 0)
3952 isValidKey = null; 3952 isValidKey = null;
3953 let result = new (SplayTreeSet$(E))(compare, isValidKey); 3953 let result = new (SplayTreeSet$(E))(compare, isValidKey);
3954 for (let element of dart.as(elements, core.Iterable$(E))) { 3954 for (let element of dart.as(elements, core.Iterable$(E))) {
3955 result.add(element); 3955 dart.dcall(result.add, element);
3956 } 3956 }
3957 return result; 3957 return result;
3958 } 3958 }
3959 [_compare](e1, e2) { 3959 [_compare](e1, e2) {
3960 dart.as(e1, E); 3960 dart.as(e1, E);
3961 dart.as(e2, E); 3961 dart.as(e2, E);
3962 return this[_comparator](e1, e2); 3962 return dart.dcall(this[_comparator], e1, e2);
3963 } 3963 }
3964 get iterator() { 3964 get iterator() {
3965 return new (_SplayTreeKeyIterator$(E))(this); 3965 return new (_SplayTreeKeyIterator$(E))(this);
3966 } 3966 }
3967 get length() { 3967 get length() {
3968 return this[_count]; 3968 return this[_count];
3969 } 3969 }
3970 get isEmpty() { 3970 get isEmpty() {
3971 return this[_root] == null; 3971 return this[_root] == null;
3972 } 3972 }
3973 get isNotEmpty() { 3973 get isNotEmpty() {
3974 return this[_root] != null; 3974 return this[_root] != null;
3975 } 3975 }
3976 get first() { 3976 get first() {
3977 if (this[_count] == 0) 3977 if (this[_count] == 0)
3978 dart.throw(_internal.IterableElementError.noElement()); 3978 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
3979 return dart.as(this[_first].key, E); 3979 return dart.as(this[_first].key, E);
3980 } 3980 }
3981 get last() { 3981 get last() {
3982 if (this[_count] == 0) 3982 if (this[_count] == 0)
3983 dart.throw(_internal.IterableElementError.noElement()); 3983 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
3984 return dart.as(this[_last].key, E); 3984 return dart.as(this[_last].key, E);
3985 } 3985 }
3986 get single() { 3986 get single() {
3987 if (this[_count] == 0) 3987 if (this[_count] == 0)
3988 dart.throw(_internal.IterableElementError.noElement()); 3988 dart.throw(dart.dcall(_internal.IterableElementError.noElement));
3989 if (dart.notNull(this[_count]) > 1) 3989 if (dart.notNull(this[_count]) > 1)
3990 dart.throw(_internal.IterableElementError.tooMany()); 3990 dart.throw(dart.dcall(_internal.IterableElementError.tooMany));
3991 return this[_root].key; 3991 return this[_root].key;
3992 } 3992 }
3993 contains(object) { 3993 contains(object) {
3994 return dart.notNull(this[_validKey](object)) && this[_splay](dart.as(obj ect, E)) == 0; 3994 return dart.notNull(dart.dcall(this[_validKey], object)) && dart.dcall(t his[_splay], object) == 0;
3995 } 3995 }
3996 add(element) { 3996 add(element) {
3997 dart.as(element, E); 3997 dart.as(element, E);
3998 let compare = this[_splay](element); 3998 let compare = dart.dcall(this[_splay], element);
3999 if (compare == 0) 3999 if (compare == 0)
4000 return false; 4000 return false;
4001 this[_addNewRoot](new (_SplayTreeNode$(E))(element), compare); 4001 dart.dcall(this[_addNewRoot], new _SplayTreeNode(element), compare);
4002 return true; 4002 return true;
4003 } 4003 }
4004 remove(object) { 4004 remove(object) {
4005 if (!dart.notNull(this[_validKey](object))) 4005 if (!dart.notNull(dart.dcall(this[_validKey], object)))
4006 return false; 4006 return false;
4007 return this[_remove](dart.as(object, E)) != null; 4007 return dart.dcall(this[_remove], object) != null;
4008 } 4008 }
4009 addAll(elements) { 4009 addAll(elements) {
4010 dart.as(elements, core.Iterable$(E)); 4010 dart.as(elements, core.Iterable$(E));
4011 for (let element of elements) { 4011 for (let element of elements) {
4012 let compare = this[_splay](element); 4012 let compare = dart.dcall(this[_splay], element);
4013 if (compare != 0) { 4013 if (compare != 0) {
4014 this[_addNewRoot](new (_SplayTreeNode$(E))(element), compare); 4014 dart.dcall(this[_addNewRoot], new _SplayTreeNode(element), compare);
4015 } 4015 }
4016 } 4016 }
4017 } 4017 }
4018 removeAll(elements) { 4018 removeAll(elements) {
4019 for (let element of elements) { 4019 for (let element of elements) {
4020 if (dart.notNull(this[_validKey](element))) 4020 if (dart.notNull(dart.dcall(this[_validKey], element)))
4021 this[_remove](dart.as(element, E)); 4021 dart.dcall(this[_remove], element);
4022 } 4022 }
4023 } 4023 }
4024 retainAll(elements) { 4024 retainAll(elements) {
4025 let retainSet = new (SplayTreeSet$(E))(this[_comparator], this[_validKey ]); 4025 let retainSet = new (SplayTreeSet$(E))(this[_comparator], this[_validKey ]);
4026 let modificationCount = this[_modificationCount]; 4026 let modificationCount = this[_modificationCount];
4027 for (let object of elements) { 4027 for (let object of elements) {
4028 if (modificationCount != this[_modificationCount]) { 4028 if (modificationCount != this[_modificationCount]) {
4029 dart.throw(new core.ConcurrentModificationError(this)); 4029 dart.throw(new core.ConcurrentModificationError(this));
4030 } 4030 }
4031 if (dart.notNull(this[_validKey](object)) && this[_splay](dart.as(obje ct, E)) == 0) 4031 if (dart.notNull(dart.dcall(this[_validKey], object)) && dart.dcall(th is[_splay], object) == 0)
4032 retainSet.add(this[_root].key); 4032 dart.dcall(retainSet.add, this[_root].key);
4033 } 4033 }
4034 if (retainSet[_count] != this[_count]) { 4034 if (retainSet[_count] != this[_count]) {
4035 this[_root] = retainSet[_root]; 4035 this[_root] = retainSet[_root];
4036 this[_count] = retainSet[_count]; 4036 this[_count] = retainSet[_count];
4037 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; 4037 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1;
4038 } 4038 }
4039 } 4039 }
4040 lookup(object) { 4040 lookup(object) {
4041 if (!dart.notNull(this[_validKey](object))) 4041 if (!dart.notNull(dart.dcall(this[_validKey], object)))
4042 return null; 4042 return null;
4043 let comp = this[_splay](dart.as(object, E)); 4043 let comp = dart.dcall(this[_splay], object);
4044 if (comp != 0) 4044 if (comp != 0)
4045 return null; 4045 return null;
4046 return this[_root].key; 4046 return this[_root].key;
4047 } 4047 }
4048 intersection(other) { 4048 intersection(other) {
4049 let result = new (SplayTreeSet$(E))(this[_comparator], this[_validKey]); 4049 let result = new (SplayTreeSet$(E))(this[_comparator], this[_validKey]);
4050 for (let element of this) { 4050 for (let element of this) {
4051 if (dart.notNull(other.contains(element))) 4051 if (dart.notNull(dart.dcall(other.contains, element)))
4052 result.add(element); 4052 dart.dcall(result.add, element);
4053 } 4053 }
4054 return result; 4054 return result;
4055 } 4055 }
4056 difference(other) { 4056 difference(other) {
4057 let result = new (SplayTreeSet$(E))(this[_comparator], this[_validKey]); 4057 let result = new (SplayTreeSet$(E))(this[_comparator], this[_validKey]);
4058 for (let element of this) { 4058 for (let element of this) {
4059 if (!dart.notNull(other.contains(element))) 4059 if (!dart.notNull(dart.dcall(other.contains, element)))
4060 result.add(element); 4060 dart.dcall(result.add, element);
4061 } 4061 }
4062 return result; 4062 return result;
4063 } 4063 }
4064 union(other) { 4064 union(other) {
4065 dart.as(other, core.Set$(E)); 4065 dart.as(other, core.Set$(E));
4066 let _ = this[_clone](); 4066 let _ = dart.dcall(this[_clone]);
4067 _.addAll(other); 4067 dart.dcall(_.addAll, other);
4068 return _; 4068 return _;
4069 } 4069 }
4070 [_clone]() { 4070 [_clone]() {
4071 let set = new (SplayTreeSet$(E))(this[_comparator], this[_validKey]); 4071 let set = new (SplayTreeSet$(E))(this[_comparator], this[_validKey]);
4072 set[_count] = this[_count]; 4072 dart.dput(set, _count, this[_count]);
4073 set[_root] = this[_copyNode](this[_root]); 4073 dart.dput(set, _root, dart.dcall(this[_copyNode], this[_root]));
4074 return set; 4074 return dart.as(set, SplayTreeSet$(E));
4075 } 4075 }
4076 [_copyNode](node) { 4076 [_copyNode](node) {
4077 dart.as(node, _SplayTreeNode$(E)); 4077 dart.as(node, _SplayTreeNode$(E));
4078 if (node == null) 4078 if (node == null)
4079 return null; 4079 return null;
4080 let _ = new (_SplayTreeNode$(E))(node.key); 4080 let _ = new (_SplayTreeNode$(E))(node.key);
4081 _.left = this[_copyNode](node.left); 4081 _.left = dart.dcall(this[_copyNode], node.left);
4082 _.right = this[_copyNode](node.right); 4082 _.right = dart.dcall(this[_copyNode], node.right);
4083 return _; 4083 return _;
4084 } 4084 }
4085 clear() { 4085 clear() {
4086 this[_clear](); 4086 dart.dcall(this[_clear]);
4087 } 4087 }
4088 toSet() { 4088 toSet() {
4089 return this[_clone](); 4089 return dart.dcall(this[_clone]);
4090 } 4090 }
4091 toString() { 4091 toString() {
4092 return IterableBase.iterableToFullString(this, '{', '}'); 4092 return dart.dcall(IterableBase.iterableToFullString, this, '{', '}');
4093 } 4093 }
4094 } 4094 }
4095 dart.setSignature(SplayTreeSet, { 4095 dart.setSignature(SplayTreeSet, {
4096 constructors: () => ({ 4096 constructors: () => ({
4097 SplayTreeSet: [SplayTreeSet$(E), [], [dart.functionType(core.int, [E, E] ), dart.functionType(core.bool, [core.Object])]], 4097 SplayTreeSet: [SplayTreeSet$(E), [], [dart.functionType(core.int, [E, E] ), dart.functionType(core.bool, [core.Object])]],
4098 from: [SplayTreeSet$(E), [core.Iterable], [dart.functionType(core.int, [ E, E]), dart.functionType(core.bool, [core.Object])]] 4098 from: [SplayTreeSet$(E), [core.Iterable], [dart.functionType(core.int, [ E, E]), dart.functionType(core.bool, [core.Object])]]
4099 }), 4099 }),
4100 methods: () => ({ 4100 methods: () => ({
4101 [_compare]: [core.int, [E, E]], 4101 [_compare]: [core.int, [E, E]],
4102 contains: [core.bool, [core.Object]], 4102 contains: [core.bool, [core.Object]],
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
4162 get isNotEmpty() { 4162 get isNotEmpty() {
4163 return !dart.notNull(this.isEmpty); 4163 return !dart.notNull(this.isEmpty);
4164 } 4164 }
4165 get keys() { 4165 get keys() {
4166 return new (HashMapKeyIterable$(K))(this); 4166 return new (HashMapKeyIterable$(K))(this);
4167 } 4167 }
4168 get values() { 4168 get values() {
4169 return _internal.MappedIterable$(K, V).new(this.keys, dart.fn((each => t his.get(each)).bind(this), V, [dart.dynamic])); 4169 return _internal.MappedIterable$(K, V).new(this.keys, dart.fn((each => t his.get(each)).bind(this), V, [dart.dynamic]));
4170 } 4170 }
4171 containsKey(key) { 4171 containsKey(key) {
4172 if (dart.notNull(_HashMap$()._isStringKey(key))) { 4172 if (dart.notNull(dart.dcall(_HashMap$()._isStringKey, key))) {
4173 let strings = this[_strings]; 4173 let strings = this[_strings];
4174 return strings == null ? false : _HashMap$()._hasTableEntry(strings, k ey); 4174 return strings == null ? false : dart.dcall(_HashMap$()._hasTableEntry , strings, key);
4175 } else if (dart.notNull(_HashMap$()._isNumericKey(key))) { 4175 } else if (dart.notNull(dart.dcall(_HashMap$()._isNumericKey, key))) {
4176 let nums = this[_nums]; 4176 let nums = this[_nums];
4177 return nums == null ? false : _HashMap$()._hasTableEntry(nums, key); 4177 return nums == null ? false : dart.dcall(_HashMap$()._hasTableEntry, n ums, key);
4178 } else { 4178 } else {
4179 return this[_containsKey](key); 4179 return dart.dcall(this[_containsKey], key);
4180 } 4180 }
4181 } 4181 }
4182 [_containsKey](key) { 4182 [_containsKey](key) {
4183 let rest = this[_rest]; 4183 let rest = this[_rest];
4184 if (rest == null) 4184 if (rest == null)
4185 return false; 4185 return false;
4186 let bucket = this[_getBucket](rest, key); 4186 let bucket = dart.dcall(this[_getBucket], rest, key);
4187 return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0; 4187 return dart.notNull(dart.dcall(this[_findBucketIndex], bucket, key)) >= 0;
4188 } 4188 }
4189 containsValue(value) { 4189 containsValue(value) {
4190 return this[_computeKeys]()[dartx.any](dart.fn((each => dart.equals(this .get(each), value)).bind(this), core.bool, [dart.dynamic])); 4190 return dart.dcall(dart.dcall(this[_computeKeys])[dartx.any], dart.fn((ea ch => dart.equals(this.get(each), value)).bind(this), core.bool, [dart.dynamic]) );
4191 } 4191 }
4192 addAll(other) { 4192 addAll(other) {
4193 dart.as(other, core.Map$(K, V)); 4193 dart.as(other, core.Map$(K, V));
4194 other.forEach(dart.fn(((key, value) => { 4194 dart.dcall(other.forEach, dart.fn(((key, value) => {
4195 dart.as(key, K); 4195 dart.as(key, K);
4196 dart.as(value, V); 4196 dart.as(value, V);
4197 this.set(key, value); 4197 this.set(key, value);
4198 }).bind(this), dart.dynamic, [K, V])); 4198 }).bind(this), dart.dynamic, [K, V]));
4199 } 4199 }
4200 get(key) { 4200 get(key) {
4201 if (dart.notNull(_HashMap$()._isStringKey(key))) { 4201 if (dart.notNull(dart.dcall(_HashMap$()._isStringKey, key))) {
4202 let strings = this[_strings]; 4202 let strings = this[_strings];
4203 return strings == null ? null : dart.as(_HashMap$()._getTableEntry(str ings, key), V); 4203 return strings == null ? null : dart.as(dart.dcall(_HashMap$()._getTab leEntry, strings, key), V);
4204 } else if (dart.notNull(_HashMap$()._isNumericKey(key))) { 4204 } else if (dart.notNull(dart.dcall(_HashMap$()._isNumericKey, key))) {
4205 let nums = this[_nums]; 4205 let nums = this[_nums];
4206 return nums == null ? null : dart.as(_HashMap$()._getTableEntry(nums, key), V); 4206 return nums == null ? null : dart.as(dart.dcall(_HashMap$()._getTableE ntry, nums, key), V);
4207 } else { 4207 } else {
4208 return this[_get](key); 4208 return dart.dcall(this[_get], key);
4209 } 4209 }
4210 } 4210 }
4211 [_get](key) { 4211 [_get](key) {
4212 let rest = this[_rest]; 4212 let rest = this[_rest];
4213 if (rest == null) 4213 if (rest == null)
4214 return null; 4214 return null;
4215 let bucket = this[_getBucket](rest, key); 4215 let bucket = dart.dcall(this[_getBucket], rest, key);
4216 let index = this[_findBucketIndex](bucket, key); 4216 let index = dart.dcall(this[_findBucketIndex], bucket, key);
4217 return dart.notNull(index) < 0 ? null : dart.as(bucket[dart.notNull(inde x) + 1], V); 4217 return dart.notNull(index) < 0 ? null : dart.as(bucket[dart.notNull(inde x) + 1], V);
4218 } 4218 }
4219 set(key, value) { 4219 set(key, value) {
4220 dart.as(key, K); 4220 dart.as(key, K);
4221 dart.as(value, V); 4221 dart.as(value, V);
4222 if (dart.notNull(_HashMap$()._isStringKey(key))) { 4222 if (dart.notNull(dart.dcall(_HashMap$()._isStringKey, key))) {
4223 let strings = this[_strings]; 4223 let strings = this[_strings];
4224 if (strings == null) 4224 if (strings == null)
4225 this[_strings] = strings = _HashMap$()._newHashTable(); 4225 this[_strings] = strings = dart.dcall(_HashMap$()._newHashTable);
4226 this[_addHashTableEntry](strings, key, value); 4226 dart.dcall(this[_addHashTableEntry], strings, key, value);
4227 } else if (dart.notNull(_HashMap$()._isNumericKey(key))) { 4227 } else if (dart.notNull(dart.dcall(_HashMap$()._isNumericKey, key))) {
4228 let nums = this[_nums]; 4228 let nums = this[_nums];
4229 if (nums == null) 4229 if (nums == null)
4230 this[_nums] = nums = _HashMap$()._newHashTable(); 4230 this[_nums] = nums = dart.dcall(_HashMap$()._newHashTable);
4231 this[_addHashTableEntry](nums, key, value); 4231 dart.dcall(this[_addHashTableEntry], nums, key, value);
4232 } else { 4232 } else {
4233 this[_set](key, value); 4233 dart.dcall(this[_set], key, value);
4234 } 4234 }
4235 return value; 4235 return value;
4236 } 4236 }
4237 [_set](key, value) { 4237 [_set](key, value) {
4238 dart.as(key, K); 4238 dart.as(key, K);
4239 dart.as(value, V); 4239 dart.as(value, V);
4240 let rest = this[_rest]; 4240 let rest = this[_rest];
4241 if (rest == null) 4241 if (rest == null)
4242 this[_rest] = rest = _HashMap$()._newHashTable(); 4242 this[_rest] = rest = dart.dcall(_HashMap$()._newHashTable);
4243 let hash = this[_computeHashCode](key); 4243 let hash = dart.dcall(this[_computeHashCode], key);
4244 let bucket = rest[hash]; 4244 let bucket = rest[hash];
4245 if (bucket == null) { 4245 if (bucket == null) {
4246 _HashMap$()._setTableEntry(rest, hash, [key, value]); 4246 dart.dcall(_HashMap$()._setTableEntry, rest, hash, [key, value]);
4247 this[_length] = dart.notNull(this[_length]) + 1; 4247 this[_length] = dart.notNull(this[_length]) + 1;
4248 this[_keys] = null; 4248 this[_keys] = null;
4249 } else { 4249 } else {
4250 let index = this[_findBucketIndex](bucket, key); 4250 let index = dart.dcall(this[_findBucketIndex], bucket, key);
4251 if (dart.notNull(index) >= 0) { 4251 if (dart.notNull(index) >= 0) {
4252 bucket[dart.notNull(index) + 1] = value; 4252 bucket[dart.notNull(index) + 1] = value;
4253 } else { 4253 } else {
4254 bucket.push(key, value); 4254 bucket.push(key, value);
4255 this[_length] = dart.notNull(this[_length]) + 1; 4255 this[_length] = dart.notNull(this[_length]) + 1;
4256 this[_keys] = null; 4256 this[_keys] = null;
4257 } 4257 }
4258 } 4258 }
4259 } 4259 }
4260 putIfAbsent(key, ifAbsent) { 4260 putIfAbsent(key, ifAbsent) {
4261 dart.as(key, K); 4261 dart.as(key, K);
4262 dart.as(ifAbsent, dart.functionType(V, [])); 4262 dart.as(ifAbsent, dart.functionType(V, []));
4263 if (dart.notNull(this.containsKey(key))) 4263 if (dart.notNull(dart.dcall(this.containsKey, key)))
4264 return this.get(key); 4264 return this.get(key);
4265 let value = ifAbsent(); 4265 let value = ifAbsent();
4266 this.set(key, value); 4266 this.set(key, value);
4267 return value; 4267 return value;
4268 } 4268 }
4269 remove(key) { 4269 remove(key) {
4270 if (dart.notNull(_HashMap$()._isStringKey(key))) { 4270 if (dart.notNull(dart.dcall(_HashMap$()._isStringKey, key))) {
4271 return this[_removeHashTableEntry](this[_strings], key); 4271 return dart.dcall(this[_removeHashTableEntry], this[_strings], key);
4272 } else if (dart.notNull(_HashMap$()._isNumericKey(key))) { 4272 } else if (dart.notNull(dart.dcall(_HashMap$()._isNumericKey, key))) {
4273 return this[_removeHashTableEntry](this[_nums], key); 4273 return dart.dcall(this[_removeHashTableEntry], this[_nums], key);
4274 } else { 4274 } else {
4275 return this[_remove](key); 4275 return dart.dcall(this[_remove], key);
4276 } 4276 }
4277 } 4277 }
4278 [_remove](key) { 4278 [_remove](key) {
4279 let rest = this[_rest]; 4279 let rest = this[_rest];
4280 if (rest == null) 4280 if (rest == null)
4281 return null; 4281 return null;
4282 let bucket = this[_getBucket](rest, key); 4282 let bucket = dart.dcall(this[_getBucket], rest, key);
4283 let index = this[_findBucketIndex](bucket, key); 4283 let index = dart.dcall(this[_findBucketIndex], bucket, key);
4284 if (dart.notNull(index) < 0) 4284 if (dart.notNull(index) < 0)
4285 return null; 4285 return null;
4286 this[_length] = dart.notNull(this[_length]) - 1; 4286 this[_length] = dart.notNull(this[_length]) - 1;
4287 this[_keys] = null; 4287 this[_keys] = null;
4288 return dart.as(bucket.splice(index, 2)[1], V); 4288 return dart.as(bucket.splice(index, 2)[1], V);
4289 } 4289 }
4290 clear() { 4290 clear() {
4291 if (dart.notNull(this[_length]) > 0) { 4291 if (dart.notNull(this[_length]) > 0) {
4292 this[_strings] = this[_nums] = this[_rest] = this[_keys] = null; 4292 this[_strings] = this[_nums] = this[_rest] = this[_keys] = null;
4293 this[_length] = 0; 4293 this[_length] = 0;
4294 } 4294 }
4295 } 4295 }
4296 forEach(action) { 4296 forEach(action) {
4297 dart.as(action, dart.functionType(dart.void, [K, V])); 4297 dart.as(action, dart.functionType(dart.void, [K, V]));
4298 let keys = this[_computeKeys](); 4298 let keys = dart.dcall(this[_computeKeys]);
4299 for (let i = 0, length = keys[dartx.length]; dart.notNull(i) < dart.notN ull(length); i = dart.notNull(i) + 1) { 4299 for (let i = 0, length = keys[dartx.length]; dart.notNull(i) < dart.notN ull(length); i = dart.notNull(i) + 1) {
4300 let key = keys[i]; 4300 let key = keys[i];
4301 action(dart.as(key, K), this.get(key)); 4301 action(dart.as(key, K), this.get(key));
4302 if (keys !== this[_keys]) { 4302 if (dart.notNull(dart.as(keys !== this[_keys], core.bool))) {
4303 dart.throw(new core.ConcurrentModificationError(this)); 4303 dart.throw(new core.ConcurrentModificationError(this));
4304 } 4304 }
4305 } 4305 }
4306 } 4306 }
4307 [_computeKeys]() { 4307 [_computeKeys]() {
4308 if (this[_keys] != null) 4308 if (this[_keys] != null)
4309 return this[_keys]; 4309 return this[_keys];
4310 let result = core.List.new(this[_length]); 4310 let result = core.List.new(this[_length]);
4311 let index = 0; 4311 let index = 0;
4312 let strings = this[_strings]; 4312 let strings = this[_strings];
4313 if (strings != null) { 4313 if (strings != null) {
4314 let names = Object.getOwnPropertyNames(strings); 4314 let names = Object.getOwnPropertyNames(strings);
4315 let entries = names.length; 4315 let entries = dart.as(names.length, core.int);
4316 for (let i = 0; dart.notNull(i) < dart.notNull(entries); i = dart.notN ull(i) + 1) { 4316 for (let i = 0; dart.notNull(i) < dart.notNull(entries); i = dart.notN ull(i) + 1) {
4317 let key = names[i]; 4317 let key = dart.as(names[i], core.String);
4318 result[index] = key; 4318 result[index] = key;
4319 index = dart.notNull(index) + 1; 4319 index = dart.notNull(index) + 1;
4320 } 4320 }
4321 } 4321 }
4322 let nums = this[_nums]; 4322 let nums = this[_nums];
4323 if (nums != null) { 4323 if (nums != null) {
4324 let names = Object.getOwnPropertyNames(nums); 4324 let names = Object.getOwnPropertyNames(nums);
4325 let entries = names.length; 4325 let entries = dart.as(names.length, core.int);
4326 for (let i = 0; dart.notNull(i) < dart.notNull(entries); i = dart.notN ull(i) + 1) { 4326 for (let i = 0; dart.notNull(i) < dart.notNull(entries); i = dart.notN ull(i) + 1) {
4327 let key = +names[i]; 4327 let key = dart.as(+names[i], core.num);
4328 result[index] = key; 4328 result[index] = key;
4329 index = dart.notNull(index) + 1; 4329 index = dart.notNull(index) + 1;
4330 } 4330 }
4331 } 4331 }
4332 let rest = this[_rest]; 4332 let rest = this[_rest];
4333 if (rest != null) { 4333 if (rest != null) {
4334 let names = Object.getOwnPropertyNames(rest); 4334 let names = Object.getOwnPropertyNames(rest);
4335 let entries = names.length; 4335 let entries = dart.as(names.length, core.int);
4336 for (let i = 0; dart.notNull(i) < dart.notNull(entries); i = dart.notN ull(i) + 1) { 4336 for (let i = 0; dart.notNull(i) < dart.notNull(entries); i = dart.notN ull(i) + 1) {
4337 let key = names[i]; 4337 let key = names[i];
4338 let bucket = rest[key]; 4338 let bucket = rest[key];
4339 let length = bucket.length; 4339 let length = dart.as(bucket.length, core.int);
4340 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.not Null(i) + 2) { 4340 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.not Null(i) + 2) {
4341 let key = bucket[i]; 4341 let key = bucket[i];
4342 result[index] = key; 4342 result[index] = key;
4343 index = dart.notNull(index) + 1; 4343 index = dart.notNull(index) + 1;
4344 } 4344 }
4345 } 4345 }
4346 } 4346 }
4347 dart.assert(index == this[_length]); 4347 dart.assert(index == this[_length]);
4348 return this[_keys] = result; 4348 return this[_keys] = result;
4349 } 4349 }
4350 [_addHashTableEntry](table, key, value) { 4350 [_addHashTableEntry](table, key, value) {
4351 dart.as(key, K); 4351 dart.as(key, K);
4352 dart.as(value, V); 4352 dart.as(value, V);
4353 if (!dart.notNull(_HashMap$()._hasTableEntry(table, key))) { 4353 if (!dart.notNull(dart.dcall(_HashMap$()._hasTableEntry, table, key))) {
4354 this[_length] = dart.notNull(this[_length]) + 1; 4354 this[_length] = dart.notNull(this[_length]) + 1;
4355 this[_keys] = null; 4355 this[_keys] = null;
4356 } 4356 }
4357 _HashMap$()._setTableEntry(table, key, value); 4357 dart.dcall(_HashMap$()._setTableEntry, table, key, value);
4358 } 4358 }
4359 [_removeHashTableEntry](table, key) { 4359 [_removeHashTableEntry](table, key) {
4360 if (table != null && dart.notNull(_HashMap$()._hasTableEntry(table, key) )) { 4360 if (table != null && dart.notNull(dart.dcall(_HashMap$()._hasTableEntry, table, key))) {
4361 let value = dart.as(_HashMap$()._getTableEntry(table, key), V); 4361 let value = dart.as(dart.dcall(_HashMap$()._getTableEntry, table, key) , V);
4362 _HashMap$()._deleteTableEntry(table, key); 4362 dart.dcall(_HashMap$()._deleteTableEntry, table, key);
4363 this[_length] = dart.notNull(this[_length]) - 1; 4363 this[_length] = dart.notNull(this[_length]) - 1;
4364 this[_keys] = null; 4364 this[_keys] = null;
4365 return value; 4365 return value;
4366 } else { 4366 } else {
4367 return null; 4367 return null;
4368 } 4368 }
4369 } 4369 }
4370 static _isStringKey(key) { 4370 static _isStringKey(key) {
4371 return typeof key == 'string' && !dart.equals(key, '__proto__'); 4371 return typeof key == 'string' && !dart.equals(key, '__proto__');
4372 } 4372 }
4373 static _isNumericKey(key) { 4373 static _isNumericKey(key) {
4374 return dart.is(key, core.num) && (key & 0x3ffffff) === key; 4374 return dart.is(key, core.num) && dart.notNull(dart.as((key & 0x3ffffff) === key, core.bool));
4375 } 4375 }
4376 [_computeHashCode](key) { 4376 [_computeHashCode](key) {
4377 return dart.hashCode(key) & 0x3ffffff; 4377 return dart.as(dart.dload(key, 'hashCode') & 0x3ffffff, core.int);
4378 } 4378 }
4379 static _hasTableEntry(table, key) { 4379 static _hasTableEntry(table, key) {
4380 let entry = table[key]; 4380 let entry = table[key];
4381 return entry != null; 4381 return entry != null;
4382 } 4382 }
4383 static _getTableEntry(table, key) { 4383 static _getTableEntry(table, key) {
4384 let entry = table[key]; 4384 let entry = table[key];
4385 return entry === table ? null : entry; 4385 return dart.notNull(dart.as(entry === table, core.bool)) ? null : entry;
4386 } 4386 }
4387 static _setTableEntry(table, key, value) { 4387 static _setTableEntry(table, key, value) {
4388 if (value == null) { 4388 if (value == null) {
4389 table[key] = table; 4389 table[key] = table;
4390 } else { 4390 } else {
4391 table[key] = value; 4391 table[key] = value;
4392 } 4392 }
4393 } 4393 }
4394 static _deleteTableEntry(table, key) { 4394 static _deleteTableEntry(table, key) {
4395 delete table[key]; 4395 delete table[key];
4396 } 4396 }
4397 [_getBucket](table, key) { 4397 [_getBucket](table, key) {
4398 let hash = this[_computeHashCode](key); 4398 let hash = dart.dcall(this[_computeHashCode], key);
4399 return dart.as(table[hash], core.List); 4399 return dart.as(table[hash], core.List);
4400 } 4400 }
4401 [_findBucketIndex](bucket, key) { 4401 [_findBucketIndex](bucket, key) {
4402 if (bucket == null) 4402 if (bucket == null)
4403 return -1; 4403 return -1;
4404 let length = bucket.length; 4404 let length = dart.as(bucket.length, core.int);
4405 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 2) { 4405 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 2) {
4406 if (dart.equals(bucket[i], key)) 4406 if (dart.equals(bucket[i], key))
4407 return i; 4407 return i;
4408 } 4408 }
4409 return -1; 4409 return -1;
4410 } 4410 }
4411 static _newHashTable() { 4411 static _newHashTable() {
4412 let table = Object.create(null); 4412 let table = Object.create(null);
4413 let temporaryKey = '<non-identifier-key>'; 4413 let temporaryKey = '<non-identifier-key>';
4414 _HashMap$()._setTableEntry(table, temporaryKey, table); 4414 dart.dcall(_HashMap$()._setTableEntry, table, temporaryKey, table);
4415 _HashMap$()._deleteTableEntry(table, temporaryKey); 4415 dart.dcall(_HashMap$()._deleteTableEntry, table, temporaryKey);
4416 return table; 4416 return table;
4417 } 4417 }
4418 } 4418 }
4419 _HashMap[dart.implements] = () => [HashMap$(K, V)]; 4419 _HashMap[dart.implements] = () => [HashMap$(K, V)];
4420 dart.setSignature(_HashMap, { 4420 dart.setSignature(_HashMap, {
4421 constructors: () => ({_HashMap: [_HashMap$(K, V), []]}), 4421 constructors: () => ({_HashMap: [_HashMap$(K, V), []]}),
4422 methods: () => ({ 4422 methods: () => ({
4423 containsKey: [core.bool, [core.Object]], 4423 containsKey: [core.bool, [core.Object]],
4424 [_containsKey]: [core.bool, [core.Object]], 4424 [_containsKey]: [core.bool, [core.Object]],
4425 containsValue: [core.bool, [core.Object]], 4425 containsValue: [core.bool, [core.Object]],
(...skipping 27 matching lines...) Expand all
4453 }); 4453 });
4454 return _HashMap; 4454 return _HashMap;
4455 }); 4455 });
4456 let _HashMap = _HashMap$(); 4456 let _HashMap = _HashMap$();
4457 let _IdentityHashMap$ = dart.generic(function(K, V) { 4457 let _IdentityHashMap$ = dart.generic(function(K, V) {
4458 class _IdentityHashMap extends _HashMap$(K, V) { 4458 class _IdentityHashMap extends _HashMap$(K, V) {
4459 _IdentityHashMap() { 4459 _IdentityHashMap() {
4460 super._HashMap(); 4460 super._HashMap();
4461 } 4461 }
4462 [_computeHashCode](key) { 4462 [_computeHashCode](key) {
4463 return core.identityHashCode(key) & 0x3ffffff; 4463 return dart.as(dart.dcall(core.identityHashCode, key) & 0x3ffffff, core. int);
4464 } 4464 }
4465 [_findBucketIndex](bucket, key) { 4465 [_findBucketIndex](bucket, key) {
4466 if (bucket == null) 4466 if (bucket == null)
4467 return -1; 4467 return -1;
4468 let length = bucket.length; 4468 let length = dart.as(bucket.length, core.int);
4469 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 2) { 4469 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 2) {
4470 if (dart.notNull(core.identical(bucket[i], key))) 4470 if (dart.notNull(dart.dcall(core.identical, bucket[i], key)))
4471 return i; 4471 return i;
4472 } 4472 }
4473 return -1; 4473 return -1;
4474 } 4474 }
4475 } 4475 }
4476 return _IdentityHashMap; 4476 return _IdentityHashMap;
4477 }); 4477 });
4478 let _IdentityHashMap = _IdentityHashMap$(); 4478 let _IdentityHashMap = _IdentityHashMap$();
4479 let _equals = Symbol('_equals'); 4479 let _equals = Symbol('_equals');
4480 let _hashCode = Symbol('_hashCode'); 4480 let _hashCode = Symbol('_hashCode');
4481 let _CustomHashMap$ = dart.generic(function(K, V) { 4481 let _CustomHashMap$ = dart.generic(function(K, V) {
4482 class _CustomHashMap extends _HashMap$(K, V) { 4482 class _CustomHashMap extends _HashMap$(K, V) {
4483 _CustomHashMap(equals, hashCode, validKey) { 4483 _CustomHashMap(equals, hashCode, validKey) {
4484 this[_equals] = equals; 4484 this[_equals] = equals;
4485 this[_hashCode] = hashCode; 4485 this[_hashCode] = hashCode;
4486 this[_validKey] = validKey != null ? validKey : dart.fn(v => dart.is(v, K), core.bool, [dart.dynamic]); 4486 this[_validKey] = validKey != null ? validKey : dart.fn(v => dart.is(v, K), core.bool, [dart.dynamic]);
4487 super._HashMap(); 4487 super._HashMap();
4488 } 4488 }
4489 get(key) { 4489 get(key) {
4490 if (!dart.notNull(this[_validKey](key))) 4490 if (!dart.notNull(dart.dcall(this[_validKey], key)))
4491 return null; 4491 return null;
4492 return super[_get](key); 4492 return dart.dcall(super[_get], key);
4493 } 4493 }
4494 set(key, value) { 4494 set(key, value) {
4495 dart.as(key, K); 4495 dart.as(key, K);
4496 dart.as(value, V); 4496 dart.as(value, V);
4497 super[_set](key, value); 4497 dart.dcall(super[_set], key, value);
4498 return value; 4498 return value;
4499 } 4499 }
4500 containsKey(key) { 4500 containsKey(key) {
4501 if (!dart.notNull(this[_validKey](key))) 4501 if (!dart.notNull(dart.dcall(this[_validKey], key)))
4502 return false; 4502 return false;
4503 return super[_containsKey](key); 4503 return dart.dcall(super[_containsKey], key);
4504 } 4504 }
4505 remove(key) { 4505 remove(key) {
4506 if (!dart.notNull(this[_validKey](key))) 4506 if (!dart.notNull(dart.dcall(this[_validKey], key)))
4507 return null; 4507 return null;
4508 return super[_remove](key); 4508 return dart.dcall(super[_remove], key);
4509 } 4509 }
4510 [_computeHashCode](key) { 4510 [_computeHashCode](key) {
4511 return this[_hashCode](dart.as(key, K)) & 0x3ffffff; 4511 return dart.as(dart.dcall(this[_hashCode], key) & 0x3ffffff, core.int);
4512 } 4512 }
4513 [_findBucketIndex](bucket, key) { 4513 [_findBucketIndex](bucket, key) {
4514 if (bucket == null) 4514 if (bucket == null)
4515 return -1; 4515 return -1;
4516 let length = bucket.length; 4516 let length = dart.as(bucket.length, core.int);
4517 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 2) { 4517 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 2) {
4518 if (dart.notNull(this[_equals](dart.as(bucket[i], K), dart.as(key, K)) )) 4518 if (dart.notNull(dart.dcall(this[_equals], bucket[i], key)))
4519 return i; 4519 return i;
4520 } 4520 }
4521 return -1; 4521 return -1;
4522 } 4522 }
4523 toString() { 4523 toString() {
4524 return Maps.mapToString(this); 4524 return dart.dcall(Maps.mapToString, this);
4525 } 4525 }
4526 } 4526 }
4527 dart.setSignature(_CustomHashMap, { 4527 dart.setSignature(_CustomHashMap, {
4528 constructors: () => ({_CustomHashMap: [_CustomHashMap$(K, V), [_Equality$( K), _Hasher$(K), dart.functionType(core.bool, [core.Object])]]}), 4528 constructors: () => ({_CustomHashMap: [_CustomHashMap$(K, V), [_Equality$( K), _Hasher$(K), dart.functionType(core.bool, [core.Object])]]}),
4529 methods: () => ({ 4529 methods: () => ({
4530 get: [V, [core.Object]], 4530 get: [V, [core.Object]],
4531 set: [dart.void, [K, V]], 4531 set: [dart.void, [K, V]],
4532 remove: [V, [core.Object]] 4532 remove: [V, [core.Object]]
4533 }) 4533 })
4534 }); 4534 });
(...skipping 14 matching lines...) Expand all
4549 } 4549 }
4550 get iterator() { 4550 get iterator() {
4551 return new (HashMapKeyIterator$(E))(this[_map], dart.as(dart.dsend(this[ _map], _computeKeys), core.List)); 4551 return new (HashMapKeyIterator$(E))(this[_map], dart.as(dart.dsend(this[ _map], _computeKeys), core.List));
4552 } 4552 }
4553 contains(element) { 4553 contains(element) {
4554 return dart.as(dart.dsend(this[_map], 'containsKey', element), core.bool ); 4554 return dart.as(dart.dsend(this[_map], 'containsKey', element), core.bool );
4555 } 4555 }
4556 forEach(f) { 4556 forEach(f) {
4557 dart.as(f, dart.functionType(dart.void, [E])); 4557 dart.as(f, dart.functionType(dart.void, [E]));
4558 let keys = dart.as(dart.dsend(this[_map], _computeKeys), core.List); 4558 let keys = dart.as(dart.dsend(this[_map], _computeKeys), core.List);
4559 for (let i = 0, length = keys.length; dart.notNull(i) < dart.notNull(len gth); i = dart.notNull(i) + 1) { 4559 for (let i = 0, length = dart.as(keys.length, core.int); dart.notNull(i) < dart.notNull(length); i = dart.notNull(i) + 1) {
4560 f(dart.as(keys[i], E)); 4560 f(dart.as(keys[i], E));
4561 if (keys !== dart.dload(this[_map], _keys)) { 4561 if (dart.notNull(dart.as(keys !== dart.dload(this[_map], _keys), core. bool))) {
4562 dart.throw(new core.ConcurrentModificationError(this[_map])); 4562 dart.throw(new core.ConcurrentModificationError(this[_map]));
4563 } 4563 }
4564 } 4564 }
4565 } 4565 }
4566 } 4566 }
4567 HashMapKeyIterable[dart.implements] = () => [_internal.EfficientLength]; 4567 HashMapKeyIterable[dart.implements] = () => [_internal.EfficientLength];
4568 dart.setSignature(HashMapKeyIterable, { 4568 dart.setSignature(HashMapKeyIterable, {
4569 constructors: () => ({HashMapKeyIterable: [HashMapKeyIterable$(E), [dart.d ynamic]]}), 4569 constructors: () => ({HashMapKeyIterable: [HashMapKeyIterable$(E), [dart.d ynamic]]}),
4570 methods: () => ({forEach: [dart.void, [dart.functionType(dart.void, [E])]] }) 4570 methods: () => ({forEach: [dart.void, [dart.functionType(dart.void, [E])]] })
4571 }); 4571 });
(...skipping 15 matching lines...) Expand all
4587 this[_keys] = keys; 4587 this[_keys] = keys;
4588 this[_offset] = 0; 4588 this[_offset] = 0;
4589 this[_current] = null; 4589 this[_current] = null;
4590 } 4590 }
4591 get current() { 4591 get current() {
4592 return this[_current]; 4592 return this[_current];
4593 } 4593 }
4594 moveNext() { 4594 moveNext() {
4595 let keys = this[_keys]; 4595 let keys = this[_keys];
4596 let offset = this[_offset]; 4596 let offset = this[_offset];
4597 if (keys !== dart.dload(this[_map], _keys)) { 4597 if (dart.notNull(dart.as(keys !== dart.dload(this[_map], _keys), core.bo ol))) {
4598 dart.throw(new core.ConcurrentModificationError(this[_map])); 4598 dart.throw(new core.ConcurrentModificationError(this[_map]));
4599 } else if (dart.notNull(offset) >= keys.length) { 4599 } else if (dart.notNull(offset) >= dart.notNull(dart.as(keys.length, cor e.num))) {
4600 this[_current] = null; 4600 this[_current] = null;
4601 return false; 4601 return false;
4602 } else { 4602 } else {
4603 this[_current] = dart.as(keys[offset], E); 4603 this[_current] = dart.as(keys[offset], E);
4604 this[_offset] = dart.notNull(offset) + 1; 4604 this[_offset] = dart.as(dart.notNull(offset) + 1, core.int);
4605 return true; 4605 return true;
4606 } 4606 }
4607 } 4607 }
4608 } 4608 }
4609 HashMapKeyIterator[dart.implements] = () => [core.Iterator$(E)]; 4609 HashMapKeyIterator[dart.implements] = () => [core.Iterator$(E)];
4610 dart.setSignature(HashMapKeyIterator, { 4610 dart.setSignature(HashMapKeyIterator, {
4611 constructors: () => ({HashMapKeyIterator: [HashMapKeyIterator$(E), [dart.d ynamic, core.List]]}), 4611 constructors: () => ({HashMapKeyIterator: [HashMapKeyIterator$(E), [dart.d ynamic, core.List]]}),
4612 methods: () => ({moveNext: [core.bool, []]}) 4612 methods: () => ({moveNext: [core.bool, []]})
4613 }); 4613 });
4614 return HashMapKeyIterator; 4614 return HashMapKeyIterator;
(...skipping 25 matching lines...) Expand all
4640 get isNotEmpty() { 4640 get isNotEmpty() {
4641 return !dart.notNull(this.isEmpty); 4641 return !dart.notNull(this.isEmpty);
4642 } 4642 }
4643 get keys() { 4643 get keys() {
4644 return new (LinkedHashMapKeyIterable$(K))(this); 4644 return new (LinkedHashMapKeyIterable$(K))(this);
4645 } 4645 }
4646 get values() { 4646 get values() {
4647 return _internal.MappedIterable$(K, V).new(this.keys, dart.fn((each => t his.get(each)).bind(this), V, [dart.dynamic])); 4647 return _internal.MappedIterable$(K, V).new(this.keys, dart.fn((each => t his.get(each)).bind(this), V, [dart.dynamic]));
4648 } 4648 }
4649 containsKey(key) { 4649 containsKey(key) {
4650 if (dart.notNull(_LinkedHashMap$()._isStringKey(key))) { 4650 if (dart.notNull(dart.dcall(_LinkedHashMap$()._isStringKey, key))) {
4651 let strings = this[_strings]; 4651 let strings = this[_strings];
4652 if (strings == null) 4652 if (strings == null)
4653 return false; 4653 return false;
4654 let cell = dart.as(_LinkedHashMap$()._getTableEntry(strings, key), Lin kedHashMapCell); 4654 let cell = dart.as(dart.dcall(_LinkedHashMap$()._getTableEntry, string s, key), LinkedHashMapCell);
4655 return cell != null; 4655 return cell != null;
4656 } else if (dart.notNull(_LinkedHashMap$()._isNumericKey(key))) { 4656 } else if (dart.notNull(dart.dcall(_LinkedHashMap$()._isNumericKey, key) )) {
4657 let nums = this[_nums]; 4657 let nums = this[_nums];
4658 if (nums == null) 4658 if (nums == null)
4659 return false; 4659 return false;
4660 let cell = dart.as(_LinkedHashMap$()._getTableEntry(nums, key), Linked HashMapCell); 4660 let cell = dart.as(dart.dcall(_LinkedHashMap$()._getTableEntry, nums, key), LinkedHashMapCell);
4661 return cell != null; 4661 return cell != null;
4662 } else { 4662 } else {
4663 return this[_containsKey](key); 4663 return dart.dcall(this[_containsKey], key);
4664 } 4664 }
4665 } 4665 }
4666 [_containsKey](key) { 4666 [_containsKey](key) {
4667 let rest = this[_rest]; 4667 let rest = this[_rest];
4668 if (rest == null) 4668 if (rest == null)
4669 return false; 4669 return false;
4670 let bucket = this[_getBucket](rest, key); 4670 let bucket = dart.dcall(this[_getBucket], rest, key);
4671 return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0; 4671 return dart.notNull(dart.dcall(this[_findBucketIndex], bucket, key)) >= 0;
4672 } 4672 }
4673 containsValue(value) { 4673 containsValue(value) {
4674 return this.keys[dartx.any](dart.fn((each => dart.equals(this.get(each), value)).bind(this), core.bool, [dart.dynamic])); 4674 return dart.dcall(this.keys[dartx.any], dart.fn((each => dart.equals(thi s.get(each), value)).bind(this), core.bool, [dart.dynamic]));
4675 } 4675 }
4676 addAll(other) { 4676 addAll(other) {
4677 dart.as(other, core.Map$(K, V)); 4677 dart.as(other, core.Map$(K, V));
4678 other.forEach(dart.fn(((key, value) => { 4678 dart.dcall(other.forEach, dart.fn(((key, value) => {
4679 dart.as(key, K); 4679 dart.as(key, K);
4680 dart.as(value, V); 4680 dart.as(value, V);
4681 this.set(key, value); 4681 this.set(key, value);
4682 }).bind(this), dart.dynamic, [K, V])); 4682 }).bind(this), dart.dynamic, [K, V]));
4683 } 4683 }
4684 get(key) { 4684 get(key) {
4685 if (dart.notNull(_LinkedHashMap$()._isStringKey(key))) { 4685 if (dart.notNull(dart.dcall(_LinkedHashMap$()._isStringKey, key))) {
4686 let strings = this[_strings]; 4686 let strings = this[_strings];
4687 if (strings == null) 4687 if (strings == null)
4688 return null; 4688 return null;
4689 let cell = dart.as(_LinkedHashMap$()._getTableEntry(strings, key), Lin kedHashMapCell); 4689 let cell = dart.as(dart.dcall(_LinkedHashMap$()._getTableEntry, string s, key), LinkedHashMapCell);
4690 return cell == null ? null : dart.as(cell[_value], V); 4690 return cell == null ? null : dart.as(cell[_value], V);
4691 } else if (dart.notNull(_LinkedHashMap$()._isNumericKey(key))) { 4691 } else if (dart.notNull(dart.dcall(_LinkedHashMap$()._isNumericKey, key) )) {
4692 let nums = this[_nums]; 4692 let nums = this[_nums];
4693 if (nums == null) 4693 if (nums == null)
4694 return null; 4694 return null;
4695 let cell = dart.as(_LinkedHashMap$()._getTableEntry(nums, key), Linked HashMapCell); 4695 let cell = dart.as(dart.dcall(_LinkedHashMap$()._getTableEntry, nums, key), LinkedHashMapCell);
4696 return cell == null ? null : dart.as(cell[_value], V); 4696 return cell == null ? null : dart.as(cell[_value], V);
4697 } else { 4697 } else {
4698 return this[_get](key); 4698 return dart.dcall(this[_get], key);
4699 } 4699 }
4700 } 4700 }
4701 [_get](key) { 4701 [_get](key) {
4702 let rest = this[_rest]; 4702 let rest = this[_rest];
4703 if (rest == null) 4703 if (rest == null)
4704 return null; 4704 return null;
4705 let bucket = this[_getBucket](rest, key); 4705 let bucket = dart.dcall(this[_getBucket], rest, key);
4706 let index = this[_findBucketIndex](bucket, key); 4706 let index = dart.dcall(this[_findBucketIndex], bucket, key);
4707 if (dart.notNull(index) < 0) 4707 if (dart.notNull(index) < 0)
4708 return null; 4708 return null;
4709 let cell = dart.as(bucket[index], LinkedHashMapCell); 4709 let cell = dart.as(bucket[index], LinkedHashMapCell);
4710 return dart.as(cell[_value], V); 4710 return dart.as(cell[_value], V);
4711 } 4711 }
4712 set(key, value) { 4712 set(key, value) {
4713 dart.as(key, K); 4713 dart.as(key, K);
4714 dart.as(value, V); 4714 dart.as(value, V);
4715 if (dart.notNull(_LinkedHashMap$()._isStringKey(key))) { 4715 if (dart.notNull(dart.dcall(_LinkedHashMap$()._isStringKey, key))) {
4716 let strings = this[_strings]; 4716 let strings = this[_strings];
4717 if (strings == null) 4717 if (strings == null)
4718 this[_strings] = strings = _LinkedHashMap$()._newHashTable(); 4718 this[_strings] = strings = dart.dcall(_LinkedHashMap$()._newHashTabl e);
4719 this[_addHashTableEntry](strings, key, value); 4719 dart.dcall(this[_addHashTableEntry], strings, key, value);
4720 } else if (dart.notNull(_LinkedHashMap$()._isNumericKey(key))) { 4720 } else if (dart.notNull(dart.dcall(_LinkedHashMap$()._isNumericKey, key) )) {
4721 let nums = this[_nums]; 4721 let nums = this[_nums];
4722 if (nums == null) 4722 if (nums == null)
4723 this[_nums] = nums = _LinkedHashMap$()._newHashTable(); 4723 this[_nums] = nums = dart.dcall(_LinkedHashMap$()._newHashTable);
4724 this[_addHashTableEntry](nums, key, value); 4724 dart.dcall(this[_addHashTableEntry], nums, key, value);
4725 } else { 4725 } else {
4726 this[_set](key, value); 4726 dart.dcall(this[_set], key, value);
4727 } 4727 }
4728 return value; 4728 return value;
4729 } 4729 }
4730 [_set](key, value) { 4730 [_set](key, value) {
4731 dart.as(key, K); 4731 dart.as(key, K);
4732 dart.as(value, V); 4732 dart.as(value, V);
4733 let rest = this[_rest]; 4733 let rest = this[_rest];
4734 if (rest == null) 4734 if (rest == null)
4735 this[_rest] = rest = _LinkedHashMap$()._newHashTable(); 4735 this[_rest] = rest = dart.dcall(_LinkedHashMap$()._newHashTable);
4736 let hash = this[_computeHashCode](key); 4736 let hash = dart.dcall(this[_computeHashCode], key);
4737 let bucket = rest[hash]; 4737 let bucket = rest[hash];
4738 if (bucket == null) { 4738 if (bucket == null) {
4739 let cell = this[_newLinkedCell](key, value); 4739 let cell = dart.dcall(this[_newLinkedCell], key, value);
4740 _LinkedHashMap$()._setTableEntry(rest, hash, [cell]); 4740 dart.dcall(_LinkedHashMap$()._setTableEntry, rest, hash, [cell]);
4741 } else { 4741 } else {
4742 let index = this[_findBucketIndex](bucket, key); 4742 let index = dart.dcall(this[_findBucketIndex], bucket, key);
4743 if (dart.notNull(index) >= 0) { 4743 if (dart.notNull(index) >= 0) {
4744 let cell = dart.as(bucket[index], LinkedHashMapCell); 4744 let cell = dart.as(bucket[index], LinkedHashMapCell);
4745 cell[_value] = value; 4745 cell[_value] = value;
4746 } else { 4746 } else {
4747 let cell = this[_newLinkedCell](key, value); 4747 let cell = dart.dcall(this[_newLinkedCell], key, value);
4748 bucket.push(cell); 4748 bucket.push(cell);
4749 } 4749 }
4750 } 4750 }
4751 } 4751 }
4752 putIfAbsent(key, ifAbsent) { 4752 putIfAbsent(key, ifAbsent) {
4753 dart.as(key, K); 4753 dart.as(key, K);
4754 dart.as(ifAbsent, dart.functionType(V, [])); 4754 dart.as(ifAbsent, dart.functionType(V, []));
4755 if (dart.notNull(this.containsKey(key))) 4755 if (dart.notNull(dart.dcall(this.containsKey, key)))
4756 return this.get(key); 4756 return this.get(key);
4757 let value = ifAbsent(); 4757 let value = ifAbsent();
4758 this.set(key, value); 4758 this.set(key, value);
4759 return value; 4759 return value;
4760 } 4760 }
4761 remove(key) { 4761 remove(key) {
4762 if (dart.notNull(_LinkedHashMap$()._isStringKey(key))) { 4762 if (dart.notNull(dart.dcall(_LinkedHashMap$()._isStringKey, key))) {
4763 return this[_removeHashTableEntry](this[_strings], key); 4763 return dart.dcall(this[_removeHashTableEntry], this[_strings], key);
4764 } else if (dart.notNull(_LinkedHashMap$()._isNumericKey(key))) { 4764 } else if (dart.notNull(dart.dcall(_LinkedHashMap$()._isNumericKey, key) )) {
4765 return this[_removeHashTableEntry](this[_nums], key); 4765 return dart.dcall(this[_removeHashTableEntry], this[_nums], key);
4766 } else { 4766 } else {
4767 return this[_remove](key); 4767 return dart.dcall(this[_remove], key);
4768 } 4768 }
4769 } 4769 }
4770 [_remove](key) { 4770 [_remove](key) {
4771 let rest = this[_rest]; 4771 let rest = this[_rest];
4772 if (rest == null) 4772 if (rest == null)
4773 return null; 4773 return null;
4774 let bucket = this[_getBucket](rest, key); 4774 let bucket = dart.dcall(this[_getBucket], rest, key);
4775 let index = this[_findBucketIndex](bucket, key); 4775 let index = dart.dcall(this[_findBucketIndex], bucket, key);
4776 if (dart.notNull(index) < 0) 4776 if (dart.notNull(index) < 0)
4777 return null; 4777 return null;
4778 let cell = dart.as(bucket.splice(index, 1)[0], LinkedHashMapCell); 4778 let cell = dart.as(bucket.splice(index, 1)[0], LinkedHashMapCell);
4779 this[_unlinkCell](cell); 4779 dart.dcall(this[_unlinkCell], cell);
4780 return dart.as(cell[_value], V); 4780 return dart.as(cell[_value], V);
4781 } 4781 }
4782 clear() { 4782 clear() {
4783 if (dart.notNull(this[_length]) > 0) { 4783 if (dart.notNull(this[_length]) > 0) {
4784 this[_strings] = this[_nums] = this[_rest] = this[_first] = this[_last ] = null; 4784 this[_strings] = this[_nums] = this[_rest] = this[_first] = this[_last ] = null;
4785 this[_length] = 0; 4785 this[_length] = 0;
4786 this[_modified](); 4786 dart.dcall(this[_modified]);
4787 } 4787 }
4788 } 4788 }
4789 forEach(action) { 4789 forEach(action) {
4790 dart.as(action, dart.functionType(dart.void, [K, V])); 4790 dart.as(action, dart.functionType(dart.void, [K, V]));
4791 let cell = this[_first]; 4791 let cell = this[_first];
4792 let modifications = this[_modifications]; 4792 let modifications = this[_modifications];
4793 while (cell != null) { 4793 while (cell != null) {
4794 action(dart.as(cell[_key], K), dart.as(cell[_value], V)); 4794 action(dart.as(cell[_key], K), dart.as(cell[_value], V));
4795 if (modifications != this[_modifications]) { 4795 if (modifications != this[_modifications]) {
4796 dart.throw(new core.ConcurrentModificationError(this)); 4796 dart.throw(new core.ConcurrentModificationError(this));
4797 } 4797 }
4798 cell = cell[_next]; 4798 cell = cell[_next];
4799 } 4799 }
4800 } 4800 }
4801 [_addHashTableEntry](table, key, value) { 4801 [_addHashTableEntry](table, key, value) {
4802 dart.as(key, K); 4802 dart.as(key, K);
4803 dart.as(value, V); 4803 dart.as(value, V);
4804 let cell = dart.as(_LinkedHashMap$()._getTableEntry(table, key), LinkedH ashMapCell); 4804 let cell = dart.as(dart.dcall(_LinkedHashMap$()._getTableEntry, table, k ey), LinkedHashMapCell);
4805 if (cell == null) { 4805 if (cell == null) {
4806 _LinkedHashMap$()._setTableEntry(table, key, this[_newLinkedCell](key, value)); 4806 dart.dcall(_LinkedHashMap$()._setTableEntry, table, key, dart.dcall(th is[_newLinkedCell], key, value));
4807 } else { 4807 } else {
4808 cell[_value] = value; 4808 cell[_value] = value;
4809 } 4809 }
4810 } 4810 }
4811 [_removeHashTableEntry](table, key) { 4811 [_removeHashTableEntry](table, key) {
4812 if (table == null) 4812 if (table == null)
4813 return null; 4813 return null;
4814 let cell = dart.as(_LinkedHashMap$()._getTableEntry(table, key), LinkedH ashMapCell); 4814 let cell = dart.as(dart.dcall(_LinkedHashMap$()._getTableEntry, table, k ey), LinkedHashMapCell);
4815 if (cell == null) 4815 if (cell == null)
4816 return null; 4816 return null;
4817 this[_unlinkCell](cell); 4817 dart.dcall(this[_unlinkCell], cell);
4818 _LinkedHashMap$()._deleteTableEntry(table, key); 4818 dart.dcall(_LinkedHashMap$()._deleteTableEntry, table, key);
4819 return dart.as(cell[_value], V); 4819 return dart.as(cell[_value], V);
4820 } 4820 }
4821 [_modified]() { 4821 [_modified]() {
4822 this[_modifications] = dart.notNull(this[_modifications]) + 1 & 67108863 ; 4822 this[_modifications] = dart.notNull(this[_modifications]) + 1 & 67108863 ;
4823 } 4823 }
4824 [_newLinkedCell](key, value) { 4824 [_newLinkedCell](key, value) {
4825 dart.as(key, K); 4825 dart.as(key, K);
4826 dart.as(value, V); 4826 dart.as(value, V);
4827 let cell = new LinkedHashMapCell(key, value); 4827 let cell = new LinkedHashMapCell(key, value);
4828 if (this[_first] == null) { 4828 if (this[_first] == null) {
4829 this[_first] = this[_last] = cell; 4829 this[_first] = this[_last] = cell;
4830 } else { 4830 } else {
4831 let last = this[_last]; 4831 let last = this[_last];
4832 cell[_previous] = last; 4832 cell[_previous] = last;
4833 this[_last] = last[_next] = cell; 4833 this[_last] = last[_next] = cell;
4834 } 4834 }
4835 this[_length] = dart.notNull(this[_length]) + 1; 4835 this[_length] = dart.notNull(this[_length]) + 1;
4836 this[_modified](); 4836 dart.dcall(this[_modified]);
4837 return cell; 4837 return cell;
4838 } 4838 }
4839 [_unlinkCell](cell) { 4839 [_unlinkCell](cell) {
4840 let previous = cell[_previous]; 4840 let previous = cell[_previous];
4841 let next = cell[_next]; 4841 let next = cell[_next];
4842 if (previous == null) { 4842 if (previous == null) {
4843 dart.assert(dart.equals(cell, this[_first])); 4843 dart.assert(dart.equals(cell, this[_first]));
4844 this[_first] = next; 4844 this[_first] = next;
4845 } else { 4845 } else {
4846 previous[_next] = next; 4846 previous[_next] = next;
4847 } 4847 }
4848 if (next == null) { 4848 if (next == null) {
4849 dart.assert(dart.equals(cell, this[_last])); 4849 dart.assert(dart.equals(cell, this[_last]));
4850 this[_last] = previous; 4850 this[_last] = previous;
4851 } else { 4851 } else {
4852 next[_previous] = previous; 4852 next[_previous] = previous;
4853 } 4853 }
4854 this[_length] = dart.notNull(this[_length]) - 1; 4854 this[_length] = dart.notNull(this[_length]) - 1;
4855 this[_modified](); 4855 dart.dcall(this[_modified]);
4856 } 4856 }
4857 static _isStringKey(key) { 4857 static _isStringKey(key) {
4858 return typeof key == 'string' && !dart.equals(key, '__proto__'); 4858 return typeof key == 'string' && !dart.equals(key, '__proto__');
4859 } 4859 }
4860 static _isNumericKey(key) { 4860 static _isNumericKey(key) {
4861 return dart.is(key, core.num) && (key & 0x3ffffff) === key; 4861 return dart.is(key, core.num) && dart.notNull(dart.as((key & 0x3ffffff) === key, core.bool));
4862 } 4862 }
4863 [_computeHashCode](key) { 4863 [_computeHashCode](key) {
4864 return dart.hashCode(key) & 0x3ffffff; 4864 return dart.as(dart.dload(key, 'hashCode') & 0x3ffffff, core.int);
4865 } 4865 }
4866 static _getTableEntry(table, key) { 4866 static _getTableEntry(table, key) {
4867 return table[key]; 4867 return table[key];
4868 } 4868 }
4869 static _setTableEntry(table, key, value) { 4869 static _setTableEntry(table, key, value) {
4870 dart.assert(value != null); 4870 dart.assert(value != null);
4871 table[key] = value; 4871 table[key] = value;
4872 } 4872 }
4873 static _deleteTableEntry(table, key) { 4873 static _deleteTableEntry(table, key) {
4874 delete table[key]; 4874 delete table[key];
4875 } 4875 }
4876 [_getBucket](table, key) { 4876 [_getBucket](table, key) {
4877 let hash = this[_computeHashCode](key); 4877 let hash = dart.dcall(this[_computeHashCode], key);
4878 return dart.as(table[hash], core.List); 4878 return dart.as(table[hash], core.List);
4879 } 4879 }
4880 [_findBucketIndex](bucket, key) { 4880 [_findBucketIndex](bucket, key) {
4881 if (bucket == null) 4881 if (bucket == null)
4882 return -1; 4882 return -1;
4883 let length = bucket.length; 4883 let length = dart.as(bucket.length, core.int);
4884 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 4884 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
4885 let cell = dart.as(bucket[i], LinkedHashMapCell); 4885 let cell = dart.as(bucket[i], LinkedHashMapCell);
4886 if (dart.equals(cell[_key], key)) 4886 if (dart.equals(cell[_key], key))
4887 return i; 4887 return i;
4888 } 4888 }
4889 return -1; 4889 return -1;
4890 } 4890 }
4891 static _newHashTable() { 4891 static _newHashTable() {
4892 let table = Object.create(null); 4892 let table = Object.create(null);
4893 let temporaryKey = '<non-identifier-key>'; 4893 let temporaryKey = '<non-identifier-key>';
4894 _LinkedHashMap$()._setTableEntry(table, temporaryKey, table); 4894 dart.dcall(_LinkedHashMap$()._setTableEntry, table, temporaryKey, table) ;
4895 _LinkedHashMap$()._deleteTableEntry(table, temporaryKey); 4895 dart.dcall(_LinkedHashMap$()._deleteTableEntry, table, temporaryKey);
4896 return table; 4896 return table;
4897 } 4897 }
4898 toString() { 4898 toString() {
4899 return Maps.mapToString(this); 4899 return dart.dcall(Maps.mapToString, this);
4900 } 4900 }
4901 } 4901 }
4902 _LinkedHashMap[dart.implements] = () => [LinkedHashMap$(K, V), _js_helper.In ternalMap]; 4902 _LinkedHashMap[dart.implements] = () => [LinkedHashMap$(K, V), _js_helper.In ternalMap];
4903 dart.setSignature(_LinkedHashMap, { 4903 dart.setSignature(_LinkedHashMap, {
4904 constructors: () => ({_LinkedHashMap: [_LinkedHashMap$(K, V), []]}), 4904 constructors: () => ({_LinkedHashMap: [_LinkedHashMap$(K, V), []]}),
4905 methods: () => ({ 4905 methods: () => ({
4906 containsKey: [core.bool, [core.Object]], 4906 containsKey: [core.bool, [core.Object]],
4907 [_containsKey]: [core.bool, [core.Object]], 4907 [_containsKey]: [core.bool, [core.Object]],
4908 containsValue: [core.bool, [core.Object]], 4908 containsValue: [core.bool, [core.Object]],
4909 addAll: [dart.void, [core.Map$(K, V)]], 4909 addAll: [dart.void, [core.Map$(K, V)]],
(...skipping 27 matching lines...) Expand all
4937 }); 4937 });
4938 return _LinkedHashMap; 4938 return _LinkedHashMap;
4939 }); 4939 });
4940 let _LinkedHashMap = _LinkedHashMap$(); 4940 let _LinkedHashMap = _LinkedHashMap$();
4941 let _LinkedIdentityHashMap$ = dart.generic(function(K, V) { 4941 let _LinkedIdentityHashMap$ = dart.generic(function(K, V) {
4942 class _LinkedIdentityHashMap extends _LinkedHashMap$(K, V) { 4942 class _LinkedIdentityHashMap extends _LinkedHashMap$(K, V) {
4943 _LinkedIdentityHashMap() { 4943 _LinkedIdentityHashMap() {
4944 super._LinkedHashMap(); 4944 super._LinkedHashMap();
4945 } 4945 }
4946 [_computeHashCode](key) { 4946 [_computeHashCode](key) {
4947 return core.identityHashCode(key) & 0x3ffffff; 4947 return dart.as(dart.dcall(core.identityHashCode, key) & 0x3ffffff, core. int);
4948 } 4948 }
4949 [_findBucketIndex](bucket, key) { 4949 [_findBucketIndex](bucket, key) {
4950 if (bucket == null) 4950 if (bucket == null)
4951 return -1; 4951 return -1;
4952 let length = bucket.length; 4952 let length = dart.as(bucket.length, core.int);
4953 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 4953 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
4954 let cell = dart.as(bucket[i], LinkedHashMapCell); 4954 let cell = dart.as(bucket[i], LinkedHashMapCell);
4955 if (dart.notNull(core.identical(cell[_key], key))) 4955 if (dart.notNull(dart.dcall(core.identical, cell[_key], key)))
4956 return i; 4956 return i;
4957 } 4957 }
4958 return -1; 4958 return -1;
4959 } 4959 }
4960 } 4960 }
4961 return _LinkedIdentityHashMap; 4961 return _LinkedIdentityHashMap;
4962 }); 4962 });
4963 let _LinkedIdentityHashMap = _LinkedIdentityHashMap$(); 4963 let _LinkedIdentityHashMap = _LinkedIdentityHashMap$();
4964 let _LinkedCustomHashMap$ = dart.generic(function(K, V) { 4964 let _LinkedCustomHashMap$ = dart.generic(function(K, V) {
4965 class _LinkedCustomHashMap extends _LinkedHashMap$(K, V) { 4965 class _LinkedCustomHashMap extends _LinkedHashMap$(K, V) {
4966 _LinkedCustomHashMap(equals, hashCode, validKey) { 4966 _LinkedCustomHashMap(equals, hashCode, validKey) {
4967 this[_equals] = equals; 4967 this[_equals] = equals;
4968 this[_hashCode] = hashCode; 4968 this[_hashCode] = hashCode;
4969 this[_validKey] = validKey != null ? validKey : dart.fn(v => dart.is(v, K), core.bool, [dart.dynamic]); 4969 this[_validKey] = validKey != null ? validKey : dart.fn(v => dart.is(v, K), core.bool, [dart.dynamic]);
4970 super._LinkedHashMap(); 4970 super._LinkedHashMap();
4971 } 4971 }
4972 get(key) { 4972 get(key) {
4973 if (!dart.notNull(this[_validKey](key))) 4973 if (!dart.notNull(dart.dcall(this[_validKey], key)))
4974 return null; 4974 return null;
4975 return super[_get](key); 4975 return dart.dcall(super[_get], key);
4976 } 4976 }
4977 set(key, value) { 4977 set(key, value) {
4978 dart.as(key, K); 4978 dart.as(key, K);
4979 dart.as(value, V); 4979 dart.as(value, V);
4980 super[_set](key, value); 4980 dart.dcall(super[_set], key, value);
4981 return value; 4981 return value;
4982 } 4982 }
4983 containsKey(key) { 4983 containsKey(key) {
4984 if (!dart.notNull(this[_validKey](key))) 4984 if (!dart.notNull(dart.dcall(this[_validKey], key)))
4985 return false; 4985 return false;
4986 return super[_containsKey](key); 4986 return dart.dcall(super[_containsKey], key);
4987 } 4987 }
4988 remove(key) { 4988 remove(key) {
4989 if (!dart.notNull(this[_validKey](key))) 4989 if (!dart.notNull(dart.dcall(this[_validKey], key)))
4990 return null; 4990 return null;
4991 return super[_remove](key); 4991 return dart.dcall(super[_remove], key);
4992 } 4992 }
4993 [_computeHashCode](key) { 4993 [_computeHashCode](key) {
4994 return this[_hashCode](dart.as(key, K)) & 0x3ffffff; 4994 return dart.as(dart.dcall(this[_hashCode], key) & 0x3ffffff, core.int);
4995 } 4995 }
4996 [_findBucketIndex](bucket, key) { 4996 [_findBucketIndex](bucket, key) {
4997 if (bucket == null) 4997 if (bucket == null)
4998 return -1; 4998 return -1;
4999 let length = bucket.length; 4999 let length = dart.as(bucket.length, core.int);
5000 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 5000 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
5001 let cell = dart.as(bucket[i], LinkedHashMapCell); 5001 let cell = dart.as(bucket[i], LinkedHashMapCell);
5002 if (dart.notNull(this[_equals](dart.as(cell[_key], K), dart.as(key, K) ))) 5002 if (dart.notNull(dart.dcall(this[_equals], cell[_key], key)))
5003 return i; 5003 return i;
5004 } 5004 }
5005 return -1; 5005 return -1;
5006 } 5006 }
5007 } 5007 }
5008 dart.setSignature(_LinkedCustomHashMap, { 5008 dart.setSignature(_LinkedCustomHashMap, {
5009 constructors: () => ({_LinkedCustomHashMap: [_LinkedCustomHashMap$(K, V), [_Equality$(K), _Hasher$(K), dart.functionType(core.bool, [core.Object])]]}), 5009 constructors: () => ({_LinkedCustomHashMap: [_LinkedCustomHashMap$(K, V), [_Equality$(K), _Hasher$(K), dart.functionType(core.bool, [core.Object])]]}),
5010 methods: () => ({ 5010 methods: () => ({
5011 get: [V, [core.Object]], 5011 get: [V, [core.Object]],
5012 set: [dart.void, [K, V]], 5012 set: [dart.void, [K, V]],
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
5117 this[_length] = 0; 5117 this[_length] = 0;
5118 this[_strings] = null; 5118 this[_strings] = null;
5119 this[_nums] = null; 5119 this[_nums] = null;
5120 this[_rest] = null; 5120 this[_rest] = null;
5121 this[_elements] = null; 5121 this[_elements] = null;
5122 } 5122 }
5123 [_newSet]() { 5123 [_newSet]() {
5124 return new (_HashSet$(E))(); 5124 return new (_HashSet$(E))();
5125 } 5125 }
5126 get iterator() { 5126 get iterator() {
5127 return new (HashSetIterator$(E))(this, this[_computeElements]()); 5127 return new (HashSetIterator$(E))(this, dart.dcall(this[_computeElements] ));
5128 } 5128 }
5129 get length() { 5129 get length() {
5130 return this[_length]; 5130 return this[_length];
5131 } 5131 }
5132 get isEmpty() { 5132 get isEmpty() {
5133 return this[_length] == 0; 5133 return this[_length] == 0;
5134 } 5134 }
5135 get isNotEmpty() { 5135 get isNotEmpty() {
5136 return !dart.notNull(this.isEmpty); 5136 return !dart.notNull(this.isEmpty);
5137 } 5137 }
5138 contains(object) { 5138 contains(object) {
5139 if (dart.notNull(_HashSet$()._isStringElement(object))) { 5139 if (dart.notNull(dart.dcall(_HashSet$()._isStringElement, object))) {
5140 let strings = this[_strings]; 5140 let strings = this[_strings];
5141 return strings == null ? false : _HashSet$()._hasTableEntry(strings, o bject); 5141 return strings == null ? false : dart.dcall(_HashSet$()._hasTableEntry , strings, object);
5142 } else if (dart.notNull(_HashSet$()._isNumericElement(object))) { 5142 } else if (dart.notNull(dart.dcall(_HashSet$()._isNumericElement, object ))) {
5143 let nums = this[_nums]; 5143 let nums = this[_nums];
5144 return nums == null ? false : _HashSet$()._hasTableEntry(nums, object) ; 5144 return nums == null ? false : dart.dcall(_HashSet$()._hasTableEntry, n ums, object);
5145 } else { 5145 } else {
5146 return this[_contains](object); 5146 return dart.dcall(this[_contains], object);
5147 } 5147 }
5148 } 5148 }
5149 [_contains](object) { 5149 [_contains](object) {
5150 let rest = this[_rest]; 5150 let rest = this[_rest];
5151 if (rest == null) 5151 if (rest == null)
5152 return false; 5152 return false;
5153 let bucket = this[_getBucket](rest, object); 5153 let bucket = dart.dcall(this[_getBucket], rest, object);
5154 return dart.notNull(this[_findBucketIndex](bucket, object)) >= 0; 5154 return dart.notNull(dart.dcall(this[_findBucketIndex], bucket, object)) >= 0;
5155 } 5155 }
5156 lookup(object) { 5156 lookup(object) {
5157 if (dart.notNull(_HashSet$()._isStringElement(object)) || dart.notNull(_ HashSet$()._isNumericElement(object))) { 5157 if (dart.notNull(dart.dcall(_HashSet$()._isStringElement, object)) || da rt.notNull(dart.dcall(_HashSet$()._isNumericElement, object))) {
5158 return dart.as(dart.notNull(this.contains(object)) ? object : null, E) ; 5158 return dart.as(dart.notNull(dart.dcall(this.contains, object)) ? objec t : null, E);
5159 } 5159 }
5160 return this[_lookup](object); 5160 return dart.dcall(this[_lookup], object);
5161 } 5161 }
5162 [_lookup](object) { 5162 [_lookup](object) {
5163 let rest = this[_rest]; 5163 let rest = this[_rest];
5164 if (rest == null) 5164 if (rest == null)
5165 return null; 5165 return null;
5166 let bucket = this[_getBucket](rest, object); 5166 let bucket = dart.dcall(this[_getBucket], rest, object);
5167 let index = this[_findBucketIndex](bucket, object); 5167 let index = dart.dcall(this[_findBucketIndex], bucket, object);
5168 if (dart.notNull(index) < 0) 5168 if (dart.notNull(dart.as(dart.dsend(index, '<', 0), core.bool)))
5169 return null; 5169 return null;
5170 return dart.as(bucket[dartx.get](index), E); 5170 return dart.as(dart.dindex(bucket, index), E);
5171 } 5171 }
5172 add(element) { 5172 add(element) {
5173 dart.as(element, E); 5173 dart.as(element, E);
5174 if (dart.notNull(_HashSet$()._isStringElement(element))) { 5174 if (dart.notNull(dart.dcall(_HashSet$()._isStringElement, element))) {
5175 let strings = this[_strings]; 5175 let strings = this[_strings];
5176 if (strings == null) 5176 if (strings == null)
5177 this[_strings] = strings = _HashSet$()._newHashTable(); 5177 this[_strings] = strings = dart.dcall(_HashSet$()._newHashTable);
5178 return this[_addHashTableEntry](strings, element); 5178 return dart.dcall(this[_addHashTableEntry], strings, element);
5179 } else if (dart.notNull(_HashSet$()._isNumericElement(element))) { 5179 } else if (dart.notNull(dart.dcall(_HashSet$()._isNumericElement, elemen t))) {
5180 let nums = this[_nums]; 5180 let nums = this[_nums];
5181 if (nums == null) 5181 if (nums == null)
5182 this[_nums] = nums = _HashSet$()._newHashTable(); 5182 this[_nums] = nums = dart.dcall(_HashSet$()._newHashTable);
5183 return this[_addHashTableEntry](nums, element); 5183 return dart.dcall(this[_addHashTableEntry], nums, element);
5184 } else { 5184 } else {
5185 return this[_add](element); 5185 return dart.dcall(this[_add], element);
5186 } 5186 }
5187 } 5187 }
5188 [_add](element) { 5188 [_add](element) {
5189 dart.as(element, E); 5189 dart.as(element, E);
5190 let rest = this[_rest]; 5190 let rest = this[_rest];
5191 if (rest == null) 5191 if (rest == null)
5192 this[_rest] = rest = _HashSet$()._newHashTable(); 5192 this[_rest] = rest = dart.dcall(_HashSet$()._newHashTable);
5193 let hash = this[_computeHashCode](element); 5193 let hash = dart.dcall(this[_computeHashCode], element);
5194 let bucket = rest[hash]; 5194 let bucket = rest[hash];
5195 if (bucket == null) { 5195 if (bucket == null) {
5196 _HashSet$()._setTableEntry(rest, hash, [element]); 5196 dart.dcall(_HashSet$()._setTableEntry, rest, hash, [element]);
5197 } else { 5197 } else {
5198 let index = this[_findBucketIndex](bucket, element); 5198 let index = dart.dcall(this[_findBucketIndex], bucket, element);
5199 if (dart.notNull(index) >= 0) 5199 if (dart.notNull(index) >= 0)
5200 return false; 5200 return false;
5201 bucket.push(element); 5201 bucket.push(element);
5202 } 5202 }
5203 this[_length] = dart.notNull(this[_length]) + 1; 5203 this[_length] = dart.notNull(this[_length]) + 1;
5204 this[_elements] = null; 5204 this[_elements] = null;
5205 return true; 5205 return true;
5206 } 5206 }
5207 addAll(objects) { 5207 addAll(objects) {
5208 dart.as(objects, core.Iterable$(E)); 5208 dart.as(objects, core.Iterable$(E));
5209 for (let each of objects) { 5209 for (let each of objects) {
5210 this.add(each); 5210 dart.dcall(this.add, each);
5211 } 5211 }
5212 } 5212 }
5213 remove(object) { 5213 remove(object) {
5214 if (dart.notNull(_HashSet$()._isStringElement(object))) { 5214 if (dart.notNull(dart.dcall(_HashSet$()._isStringElement, object))) {
5215 return this[_removeHashTableEntry](this[_strings], object); 5215 return dart.dcall(this[_removeHashTableEntry], this[_strings], object) ;
5216 } else if (dart.notNull(_HashSet$()._isNumericElement(object))) { 5216 } else if (dart.notNull(dart.dcall(_HashSet$()._isNumericElement, object ))) {
5217 return this[_removeHashTableEntry](this[_nums], object); 5217 return dart.dcall(this[_removeHashTableEntry], this[_nums], object);
5218 } else { 5218 } else {
5219 return this[_remove](object); 5219 return dart.dcall(this[_remove], object);
5220 } 5220 }
5221 } 5221 }
5222 [_remove](object) { 5222 [_remove](object) {
5223 let rest = this[_rest]; 5223 let rest = this[_rest];
5224 if (rest == null) 5224 if (rest == null)
5225 return false; 5225 return false;
5226 let bucket = this[_getBucket](rest, object); 5226 let bucket = dart.dcall(this[_getBucket], rest, object);
5227 let index = this[_findBucketIndex](bucket, object); 5227 let index = dart.dcall(this[_findBucketIndex], bucket, object);
5228 if (dart.notNull(index) < 0) 5228 if (dart.notNull(index) < 0)
5229 return false; 5229 return false;
5230 this[_length] = dart.notNull(this[_length]) - 1; 5230 this[_length] = dart.notNull(this[_length]) - 1;
5231 this[_elements] = null; 5231 this[_elements] = null;
5232 bucket.splice(index, 1); 5232 bucket.splice(index, 1);
5233 return true; 5233 return true;
5234 } 5234 }
5235 clear() { 5235 clear() {
5236 if (dart.notNull(this[_length]) > 0) { 5236 if (dart.notNull(this[_length]) > 0) {
5237 this[_strings] = this[_nums] = this[_rest] = this[_elements] = null; 5237 this[_strings] = this[_nums] = this[_rest] = this[_elements] = null;
5238 this[_length] = 0; 5238 this[_length] = 0;
5239 } 5239 }
5240 } 5240 }
5241 [_computeElements]() { 5241 [_computeElements]() {
5242 if (this[_elements] != null) 5242 if (this[_elements] != null)
5243 return this[_elements]; 5243 return this[_elements];
5244 let result = core.List.new(this[_length]); 5244 let result = core.List.new(this[_length]);
5245 let index = 0; 5245 let index = 0;
5246 let strings = this[_strings]; 5246 let strings = this[_strings];
5247 if (strings != null) { 5247 if (strings != null) {
5248 let names = Object.getOwnPropertyNames(strings); 5248 let names = Object.getOwnPropertyNames(strings);
5249 let entries = names.length; 5249 let entries = dart.as(names.length, core.int);
5250 for (let i = 0; dart.notNull(i) < dart.notNull(entries); i = dart.notN ull(i) + 1) { 5250 for (let i = 0; dart.notNull(i) < dart.notNull(entries); i = dart.notN ull(i) + 1) {
5251 let element = names[i]; 5251 let element = dart.as(names[i], core.String);
5252 result[index] = element; 5252 result[index] = element;
5253 index = dart.notNull(index) + 1; 5253 index = dart.notNull(index) + 1;
5254 } 5254 }
5255 } 5255 }
5256 let nums = this[_nums]; 5256 let nums = this[_nums];
5257 if (nums != null) { 5257 if (nums != null) {
5258 let names = Object.getOwnPropertyNames(nums); 5258 let names = Object.getOwnPropertyNames(nums);
5259 let entries = names.length; 5259 let entries = dart.as(names.length, core.int);
5260 for (let i = 0; dart.notNull(i) < dart.notNull(entries); i = dart.notN ull(i) + 1) { 5260 for (let i = 0; dart.notNull(i) < dart.notNull(entries); i = dart.notN ull(i) + 1) {
5261 let element = +names[i]; 5261 let element = dart.as(+names[i], core.num);
5262 result[index] = element; 5262 result[index] = element;
5263 index = dart.notNull(index) + 1; 5263 index = dart.notNull(index) + 1;
5264 } 5264 }
5265 } 5265 }
5266 let rest = this[_rest]; 5266 let rest = this[_rest];
5267 if (rest != null) { 5267 if (rest != null) {
5268 let names = Object.getOwnPropertyNames(rest); 5268 let names = Object.getOwnPropertyNames(rest);
5269 let entries = names.length; 5269 let entries = dart.as(names.length, core.int);
5270 for (let i = 0; dart.notNull(i) < dart.notNull(entries); i = dart.notN ull(i) + 1) { 5270 for (let i = 0; dart.notNull(i) < dart.notNull(entries); i = dart.notN ull(i) + 1) {
5271 let entry = names[i]; 5271 let entry = names[i];
5272 let bucket = rest[entry]; 5272 let bucket = rest[entry];
5273 let length = bucket.length; 5273 let length = dart.as(bucket.length, core.int);
5274 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.not Null(i) + 1) { 5274 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.not Null(i) + 1) {
5275 result[index] = bucket[i]; 5275 result[index] = bucket[i];
5276 index = dart.notNull(index) + 1; 5276 index = dart.notNull(index) + 1;
5277 } 5277 }
5278 } 5278 }
5279 } 5279 }
5280 dart.assert(index == this[_length]); 5280 dart.assert(index == this[_length]);
5281 return this[_elements] = result; 5281 return this[_elements] = result;
5282 } 5282 }
5283 [_addHashTableEntry](table, element) { 5283 [_addHashTableEntry](table, element) {
5284 dart.as(element, E); 5284 dart.as(element, E);
5285 if (dart.notNull(_HashSet$()._hasTableEntry(table, element))) 5285 if (dart.notNull(dart.dcall(_HashSet$()._hasTableEntry, table, element)) )
5286 return false; 5286 return false;
5287 _HashSet$()._setTableEntry(table, element, 0); 5287 dart.dcall(_HashSet$()._setTableEntry, table, element, 0);
5288 this[_length] = dart.notNull(this[_length]) + 1; 5288 this[_length] = dart.notNull(this[_length]) + 1;
5289 this[_elements] = null; 5289 this[_elements] = null;
5290 return true; 5290 return true;
5291 } 5291 }
5292 [_removeHashTableEntry](table, element) { 5292 [_removeHashTableEntry](table, element) {
5293 if (table != null && dart.notNull(_HashSet$()._hasTableEntry(table, elem ent))) { 5293 if (table != null && dart.notNull(dart.dcall(_HashSet$()._hasTableEntry, table, element))) {
5294 _HashSet$()._deleteTableEntry(table, element); 5294 dart.dcall(_HashSet$()._deleteTableEntry, table, element);
5295 this[_length] = dart.notNull(this[_length]) - 1; 5295 this[_length] = dart.notNull(this[_length]) - 1;
5296 this[_elements] = null; 5296 this[_elements] = null;
5297 return true; 5297 return true;
5298 } else { 5298 } else {
5299 return false; 5299 return false;
5300 } 5300 }
5301 } 5301 }
5302 static _isStringElement(element) { 5302 static _isStringElement(element) {
5303 return typeof element == 'string' && !dart.equals(element, '__proto__'); 5303 return typeof element == 'string' && !dart.equals(element, '__proto__');
5304 } 5304 }
5305 static _isNumericElement(element) { 5305 static _isNumericElement(element) {
5306 return dart.is(element, core.num) && (element & 0x3ffffff) === element; 5306 return dart.is(element, core.num) && dart.notNull(dart.as((element & 0x3 ffffff) === element, core.bool));
5307 } 5307 }
5308 [_computeHashCode](element) { 5308 [_computeHashCode](element) {
5309 return dart.hashCode(element) & 0x3ffffff; 5309 return dart.as(dart.dload(element, 'hashCode') & 0x3ffffff, core.int);
5310 } 5310 }
5311 static _hasTableEntry(table, key) { 5311 static _hasTableEntry(table, key) {
5312 let entry = table[key]; 5312 let entry = table[key];
5313 return entry != null; 5313 return entry != null;
5314 } 5314 }
5315 static _setTableEntry(table, key, value) { 5315 static _setTableEntry(table, key, value) {
5316 dart.assert(value != null); 5316 dart.assert(value != null);
5317 table[key] = value; 5317 table[key] = value;
5318 } 5318 }
5319 static _deleteTableEntry(table, key) { 5319 static _deleteTableEntry(table, key) {
5320 delete table[key]; 5320 delete table[key];
5321 } 5321 }
5322 [_getBucket](table, element) { 5322 [_getBucket](table, element) {
5323 let hash = this[_computeHashCode](element); 5323 let hash = dart.dcall(this[_computeHashCode], element);
5324 return dart.as(table[hash], core.List); 5324 return dart.as(table[hash], core.List);
5325 } 5325 }
5326 [_findBucketIndex](bucket, element) { 5326 [_findBucketIndex](bucket, element) {
5327 if (bucket == null) 5327 if (bucket == null)
5328 return -1; 5328 return -1;
5329 let length = bucket.length; 5329 let length = dart.as(bucket.length, core.int);
5330 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 5330 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
5331 if (dart.equals(bucket[i], element)) 5331 if (dart.equals(bucket[i], element))
5332 return i; 5332 return i;
5333 } 5333 }
5334 return -1; 5334 return -1;
5335 } 5335 }
5336 static _newHashTable() { 5336 static _newHashTable() {
5337 let table = Object.create(null); 5337 let table = Object.create(null);
5338 let temporaryKey = '<non-identifier-key>'; 5338 let temporaryKey = '<non-identifier-key>';
5339 _HashSet$()._setTableEntry(table, temporaryKey, table); 5339 dart.dcall(_HashSet$()._setTableEntry, table, temporaryKey, table);
5340 _HashSet$()._deleteTableEntry(table, temporaryKey); 5340 dart.dcall(_HashSet$()._deleteTableEntry, table, temporaryKey);
5341 return table; 5341 return table;
5342 } 5342 }
5343 } 5343 }
5344 _HashSet[dart.implements] = () => [HashSet$(E)]; 5344 _HashSet[dart.implements] = () => [HashSet$(E)];
5345 dart.setSignature(_HashSet, { 5345 dart.setSignature(_HashSet, {
5346 constructors: () => ({_HashSet: [_HashSet$(E), []]}), 5346 constructors: () => ({_HashSet: [_HashSet$(E), []]}),
5347 methods: () => ({ 5347 methods: () => ({
5348 [_newSet]: [core.Set$(E), []], 5348 [_newSet]: [core.Set$(E), []],
5349 contains: [core.bool, [core.Object]], 5349 contains: [core.bool, [core.Object]],
5350 [_contains]: [core.bool, [core.Object]], 5350 [_contains]: [core.bool, [core.Object]],
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
5384 let _HashSet = _HashSet$(); 5384 let _HashSet = _HashSet$();
5385 let _IdentityHashSet$ = dart.generic(function(E) { 5385 let _IdentityHashSet$ = dart.generic(function(E) {
5386 class _IdentityHashSet extends _HashSet$(E) { 5386 class _IdentityHashSet extends _HashSet$(E) {
5387 _IdentityHashSet() { 5387 _IdentityHashSet() {
5388 super._HashSet(); 5388 super._HashSet();
5389 } 5389 }
5390 [_newSet]() { 5390 [_newSet]() {
5391 return new (_IdentityHashSet$(E))(); 5391 return new (_IdentityHashSet$(E))();
5392 } 5392 }
5393 [_computeHashCode](key) { 5393 [_computeHashCode](key) {
5394 return core.identityHashCode(key) & 0x3ffffff; 5394 return dart.as(dart.dcall(core.identityHashCode, key) & 0x3ffffff, core. int);
5395 } 5395 }
5396 [_findBucketIndex](bucket, element) { 5396 [_findBucketIndex](bucket, element) {
5397 if (bucket == null) 5397 if (bucket == null)
5398 return -1; 5398 return -1;
5399 let length = bucket.length; 5399 let length = dart.as(bucket.length, core.int);
5400 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 5400 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
5401 if (dart.notNull(core.identical(bucket[i], element))) 5401 if (dart.notNull(dart.dcall(core.identical, bucket[i], element)))
5402 return i; 5402 return i;
5403 } 5403 }
5404 return -1; 5404 return -1;
5405 } 5405 }
5406 } 5406 }
5407 dart.setSignature(_IdentityHashSet, { 5407 dart.setSignature(_IdentityHashSet, {
5408 methods: () => ({[_newSet]: [core.Set$(E), []]}) 5408 methods: () => ({[_newSet]: [core.Set$(E), []]})
5409 }); 5409 });
5410 return _IdentityHashSet; 5410 return _IdentityHashSet;
5411 }); 5411 });
5412 let _IdentityHashSet = _IdentityHashSet$(); 5412 let _IdentityHashSet = _IdentityHashSet$();
5413 let _equality = Symbol('_equality'); 5413 let _equality = Symbol('_equality');
5414 let _hasher = Symbol('_hasher'); 5414 let _hasher = Symbol('_hasher');
5415 let _CustomHashSet$ = dart.generic(function(E) { 5415 let _CustomHashSet$ = dart.generic(function(E) {
5416 class _CustomHashSet extends _HashSet$(E) { 5416 class _CustomHashSet extends _HashSet$(E) {
5417 _CustomHashSet(equality, hasher, validKey) { 5417 _CustomHashSet(equality, hasher, validKey) {
5418 this[_equality] = equality; 5418 this[_equality] = equality;
5419 this[_hasher] = hasher; 5419 this[_hasher] = hasher;
5420 this[_validKey] = validKey != null ? validKey : dart.fn(x => dart.is(x, E), core.bool, [dart.dynamic]); 5420 this[_validKey] = validKey != null ? validKey : dart.fn(x => dart.is(x, E), core.bool, [dart.dynamic]);
5421 super._HashSet(); 5421 super._HashSet();
5422 } 5422 }
5423 [_newSet]() { 5423 [_newSet]() {
5424 return new (_CustomHashSet$(E))(this[_equality], this[_hasher], this[_va lidKey]); 5424 return new (_CustomHashSet$(E))(this[_equality], this[_hasher], this[_va lidKey]);
5425 } 5425 }
5426 [_findBucketIndex](bucket, element) { 5426 [_findBucketIndex](bucket, element) {
5427 if (bucket == null) 5427 if (bucket == null)
5428 return -1; 5428 return -1;
5429 let length = bucket.length; 5429 let length = dart.as(bucket.length, core.int);
5430 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 5430 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
5431 if (dart.notNull(this[_equality](dart.as(bucket[i], E), dart.as(elemen t, E)))) 5431 if (dart.notNull(dart.dcall(this[_equality], bucket[i], element)))
5432 return i; 5432 return i;
5433 } 5433 }
5434 return -1; 5434 return -1;
5435 } 5435 }
5436 [_computeHashCode](element) { 5436 [_computeHashCode](element) {
5437 return this[_hasher](dart.as(element, E)) & 0x3ffffff; 5437 return dart.as(dart.dcall(this[_hasher], element) & 0x3ffffff, core.int) ;
5438 } 5438 }
5439 add(object) { 5439 add(object) {
5440 dart.as(object, E); 5440 dart.as(object, E);
5441 return super[_add](object); 5441 return dart.dcall(super[_add], object);
5442 } 5442 }
5443 contains(object) { 5443 contains(object) {
5444 if (!dart.notNull(this[_validKey](object))) 5444 if (!dart.notNull(dart.dcall(this[_validKey], object)))
5445 return false; 5445 return false;
5446 return super[_contains](object); 5446 return dart.dcall(super[_contains], object);
5447 } 5447 }
5448 lookup(object) { 5448 lookup(object) {
5449 if (!dart.notNull(this[_validKey](object))) 5449 if (!dart.notNull(dart.dcall(this[_validKey], object)))
5450 return null; 5450 return null;
5451 return super[_lookup](object); 5451 return dart.dcall(super[_lookup], object);
5452 } 5452 }
5453 remove(object) { 5453 remove(object) {
5454 if (!dart.notNull(this[_validKey](object))) 5454 if (!dart.notNull(dart.dcall(this[_validKey], object)))
5455 return false; 5455 return false;
5456 return super[_remove](object); 5456 return dart.dcall(super[_remove], object);
5457 } 5457 }
5458 } 5458 }
5459 dart.setSignature(_CustomHashSet, { 5459 dart.setSignature(_CustomHashSet, {
5460 constructors: () => ({_CustomHashSet: [_CustomHashSet$(E), [_Equality$(E), _Hasher$(E), dart.functionType(core.bool, [core.Object])]]}), 5460 constructors: () => ({_CustomHashSet: [_CustomHashSet$(E), [_Equality$(E), _Hasher$(E), dart.functionType(core.bool, [core.Object])]]}),
5461 methods: () => ({ 5461 methods: () => ({
5462 [_newSet]: [core.Set$(E), []], 5462 [_newSet]: [core.Set$(E), []],
5463 add: [core.bool, [E]], 5463 add: [core.bool, [E]],
5464 lookup: [E, [core.Object]] 5464 lookup: [E, [core.Object]]
5465 }) 5465 })
5466 }); 5466 });
5467 dart.defineExtensionMembers(_CustomHashSet, ['contains']); 5467 dart.defineExtensionMembers(_CustomHashSet, ['contains']);
5468 return _CustomHashSet; 5468 return _CustomHashSet;
5469 }); 5469 });
5470 let _CustomHashSet = _CustomHashSet$(); 5470 let _CustomHashSet = _CustomHashSet$();
5471 let HashSetIterator$ = dart.generic(function(E) { 5471 let HashSetIterator$ = dart.generic(function(E) {
5472 class HashSetIterator extends core.Object { 5472 class HashSetIterator extends core.Object {
5473 HashSetIterator(set, elements) { 5473 HashSetIterator(set, elements) {
5474 this[_set] = set; 5474 this[_set] = set;
5475 this[_elements] = elements; 5475 this[_elements] = elements;
5476 this[_offset] = 0; 5476 this[_offset] = 0;
5477 this[_current] = null; 5477 this[_current] = null;
5478 } 5478 }
5479 get current() { 5479 get current() {
5480 return this[_current]; 5480 return this[_current];
5481 } 5481 }
5482 moveNext() { 5482 moveNext() {
5483 let elements = this[_elements]; 5483 let elements = this[_elements];
5484 let offset = this[_offset]; 5484 let offset = this[_offset];
5485 if (elements !== dart.dload(this[_set], _elements)) { 5485 if (dart.notNull(dart.as(elements !== dart.dload(this[_set], _elements), core.bool))) {
5486 dart.throw(new core.ConcurrentModificationError(this[_set])); 5486 dart.throw(new core.ConcurrentModificationError(this[_set]));
5487 } else if (dart.notNull(offset) >= elements.length) { 5487 } else if (dart.notNull(offset) >= dart.notNull(dart.as(elements.length, core.num))) {
5488 this[_current] = null; 5488 this[_current] = null;
5489 return false; 5489 return false;
5490 } else { 5490 } else {
5491 this[_current] = dart.as(elements[offset], E); 5491 this[_current] = dart.as(elements[offset], E);
5492 this[_offset] = dart.notNull(offset) + 1; 5492 this[_offset] = dart.as(dart.notNull(offset) + 1, core.int);
5493 return true; 5493 return true;
5494 } 5494 }
5495 } 5495 }
5496 } 5496 }
5497 HashSetIterator[dart.implements] = () => [core.Iterator$(E)]; 5497 HashSetIterator[dart.implements] = () => [core.Iterator$(E)];
5498 dart.setSignature(HashSetIterator, { 5498 dart.setSignature(HashSetIterator, {
5499 constructors: () => ({HashSetIterator: [HashSetIterator$(E), [dart.dynamic , core.List]]}), 5499 constructors: () => ({HashSetIterator: [HashSetIterator$(E), [dart.dynamic , core.List]]}),
5500 methods: () => ({moveNext: [core.bool, []]}) 5500 methods: () => ({moveNext: [core.bool, []]})
5501 }); 5501 });
5502 return HashSetIterator; 5502 return HashSetIterator;
(...skipping 23 matching lines...) Expand all
5526 get length() { 5526 get length() {
5527 return this[_length]; 5527 return this[_length];
5528 } 5528 }
5529 get isEmpty() { 5529 get isEmpty() {
5530 return this[_length] == 0; 5530 return this[_length] == 0;
5531 } 5531 }
5532 get isNotEmpty() { 5532 get isNotEmpty() {
5533 return !dart.notNull(this.isEmpty); 5533 return !dart.notNull(this.isEmpty);
5534 } 5534 }
5535 contains(object) { 5535 contains(object) {
5536 if (dart.notNull(_LinkedHashSet$()._isStringElement(object))) { 5536 if (dart.notNull(dart.dcall(_LinkedHashSet$()._isStringElement, object)) ) {
5537 let strings = this[_strings]; 5537 let strings = this[_strings];
5538 if (strings == null) 5538 if (strings == null)
5539 return false; 5539 return false;
5540 let cell = dart.as(_LinkedHashSet$()._getTableEntry(strings, object), LinkedHashSetCell); 5540 let cell = dart.as(dart.dcall(_LinkedHashSet$()._getTableEntry, string s, object), LinkedHashSetCell);
5541 return cell != null; 5541 return cell != null;
5542 } else if (dart.notNull(_LinkedHashSet$()._isNumericElement(object))) { 5542 } else if (dart.notNull(dart.dcall(_LinkedHashSet$()._isNumericElement, object))) {
5543 let nums = this[_nums]; 5543 let nums = this[_nums];
5544 if (nums == null) 5544 if (nums == null)
5545 return false; 5545 return false;
5546 let cell = dart.as(_LinkedHashSet$()._getTableEntry(nums, object), Lin kedHashSetCell); 5546 let cell = dart.as(dart.dcall(_LinkedHashSet$()._getTableEntry, nums, object), LinkedHashSetCell);
5547 return cell != null; 5547 return cell != null;
5548 } else { 5548 } else {
5549 return this[_contains](object); 5549 return dart.dcall(this[_contains], object);
5550 } 5550 }
5551 } 5551 }
5552 [_contains](object) { 5552 [_contains](object) {
5553 let rest = this[_rest]; 5553 let rest = this[_rest];
5554 if (rest == null) 5554 if (rest == null)
5555 return false; 5555 return false;
5556 let bucket = this[_getBucket](rest, object); 5556 let bucket = dart.dcall(this[_getBucket], rest, object);
5557 return dart.notNull(this[_findBucketIndex](bucket, object)) >= 0; 5557 return dart.notNull(dart.dcall(this[_findBucketIndex], bucket, object)) >= 0;
5558 } 5558 }
5559 lookup(object) { 5559 lookup(object) {
5560 if (dart.notNull(_LinkedHashSet$()._isStringElement(object)) || dart.not Null(_LinkedHashSet$()._isNumericElement(object))) { 5560 if (dart.notNull(dart.dcall(_LinkedHashSet$()._isStringElement, object)) || dart.notNull(dart.dcall(_LinkedHashSet$()._isNumericElement, object))) {
5561 return dart.as(dart.notNull(this.contains(object)) ? object : null, E) ; 5561 return dart.as(dart.notNull(dart.dcall(this.contains, object)) ? objec t : null, E);
5562 } else { 5562 } else {
5563 return this[_lookup](object); 5563 return dart.dcall(this[_lookup], object);
5564 } 5564 }
5565 } 5565 }
5566 [_lookup](object) { 5566 [_lookup](object) {
5567 let rest = this[_rest]; 5567 let rest = this[_rest];
5568 if (rest == null) 5568 if (rest == null)
5569 return null; 5569 return null;
5570 let bucket = this[_getBucket](rest, object); 5570 let bucket = dart.dcall(this[_getBucket], rest, object);
5571 let index = this[_findBucketIndex](bucket, object); 5571 let index = dart.dcall(this[_findBucketIndex], bucket, object);
5572 if (dart.notNull(index) < 0) 5572 if (dart.notNull(dart.as(dart.dsend(index, '<', 0), core.bool)))
5573 return null; 5573 return null;
5574 return dart.as(dart.dload(bucket[dartx.get](index), _element), E); 5574 return dart.as(dart.dload(dart.dindex(bucket, index), _element), E);
5575 } 5575 }
5576 forEach(action) { 5576 forEach(action) {
5577 dart.as(action, dart.functionType(dart.void, [E])); 5577 dart.as(action, dart.functionType(dart.void, [E]));
5578 let cell = this[_first]; 5578 let cell = this[_first];
5579 let modifications = this[_modifications]; 5579 let modifications = this[_modifications];
5580 while (cell != null) { 5580 while (cell != null) {
5581 action(dart.as(cell[_element], E)); 5581 action(dart.as(cell[_element], E));
5582 if (modifications != this[_modifications]) { 5582 if (modifications != this[_modifications]) {
5583 dart.throw(new core.ConcurrentModificationError(this)); 5583 dart.throw(new core.ConcurrentModificationError(this));
5584 } 5584 }
5585 cell = cell[_next]; 5585 cell = cell[_next];
5586 } 5586 }
5587 } 5587 }
5588 get first() { 5588 get first() {
5589 if (this[_first] == null) 5589 if (this[_first] == null)
5590 dart.throw(new core.StateError("No elements")); 5590 dart.throw(new core.StateError("No elements"));
5591 return dart.as(this[_first][_element], E); 5591 return dart.as(this[_first][_element], E);
5592 } 5592 }
5593 get last() { 5593 get last() {
5594 if (this[_last] == null) 5594 if (this[_last] == null)
5595 dart.throw(new core.StateError("No elements")); 5595 dart.throw(new core.StateError("No elements"));
5596 return dart.as(this[_last][_element], E); 5596 return dart.as(this[_last][_element], E);
5597 } 5597 }
5598 add(element) { 5598 add(element) {
5599 dart.as(element, E); 5599 dart.as(element, E);
5600 if (dart.notNull(_LinkedHashSet$()._isStringElement(element))) { 5600 if (dart.notNull(dart.dcall(_LinkedHashSet$()._isStringElement, element) )) {
5601 let strings = this[_strings]; 5601 let strings = this[_strings];
5602 if (strings == null) 5602 if (strings == null)
5603 this[_strings] = strings = _LinkedHashSet$()._newHashTable(); 5603 this[_strings] = strings = dart.dcall(_LinkedHashSet$()._newHashTabl e);
5604 return this[_addHashTableEntry](strings, element); 5604 return dart.dcall(this[_addHashTableEntry], strings, element);
5605 } else if (dart.notNull(_LinkedHashSet$()._isNumericElement(element))) { 5605 } else if (dart.notNull(dart.dcall(_LinkedHashSet$()._isNumericElement, element))) {
5606 let nums = this[_nums]; 5606 let nums = this[_nums];
5607 if (nums == null) 5607 if (nums == null)
5608 this[_nums] = nums = _LinkedHashSet$()._newHashTable(); 5608 this[_nums] = nums = dart.dcall(_LinkedHashSet$()._newHashTable);
5609 return this[_addHashTableEntry](nums, element); 5609 return dart.dcall(this[_addHashTableEntry], nums, element);
5610 } else { 5610 } else {
5611 return this[_add](element); 5611 return dart.dcall(this[_add], element);
5612 } 5612 }
5613 } 5613 }
5614 [_add](element) { 5614 [_add](element) {
5615 dart.as(element, E); 5615 dart.as(element, E);
5616 let rest = this[_rest]; 5616 let rest = this[_rest];
5617 if (rest == null) 5617 if (rest == null)
5618 this[_rest] = rest = _LinkedHashSet$()._newHashTable(); 5618 this[_rest] = rest = dart.dcall(_LinkedHashSet$()._newHashTable);
5619 let hash = this[_computeHashCode](element); 5619 let hash = dart.dcall(this[_computeHashCode], element);
5620 let bucket = rest[hash]; 5620 let bucket = rest[hash];
5621 if (bucket == null) { 5621 if (bucket == null) {
5622 let cell = this[_newLinkedCell](element); 5622 let cell = dart.dcall(this[_newLinkedCell], element);
5623 _LinkedHashSet$()._setTableEntry(rest, hash, [cell]); 5623 dart.dcall(_LinkedHashSet$()._setTableEntry, rest, hash, [cell]);
5624 } else { 5624 } else {
5625 let index = this[_findBucketIndex](bucket, element); 5625 let index = dart.dcall(this[_findBucketIndex], bucket, element);
5626 if (dart.notNull(index) >= 0) 5626 if (dart.notNull(index) >= 0)
5627 return false; 5627 return false;
5628 let cell = this[_newLinkedCell](element); 5628 let cell = dart.dcall(this[_newLinkedCell], element);
5629 bucket.push(cell); 5629 bucket.push(cell);
5630 } 5630 }
5631 return true; 5631 return true;
5632 } 5632 }
5633 remove(object) { 5633 remove(object) {
5634 if (dart.notNull(_LinkedHashSet$()._isStringElement(object))) { 5634 if (dart.notNull(dart.dcall(_LinkedHashSet$()._isStringElement, object)) ) {
5635 return this[_removeHashTableEntry](this[_strings], object); 5635 return dart.dcall(this[_removeHashTableEntry], this[_strings], object) ;
5636 } else if (dart.notNull(_LinkedHashSet$()._isNumericElement(object))) { 5636 } else if (dart.notNull(dart.dcall(_LinkedHashSet$()._isNumericElement, object))) {
5637 return this[_removeHashTableEntry](this[_nums], object); 5637 return dart.dcall(this[_removeHashTableEntry], this[_nums], object);
5638 } else { 5638 } else {
5639 return this[_remove](object); 5639 return dart.dcall(this[_remove], object);
5640 } 5640 }
5641 } 5641 }
5642 [_remove](object) { 5642 [_remove](object) {
5643 let rest = this[_rest]; 5643 let rest = this[_rest];
5644 if (rest == null) 5644 if (rest == null)
5645 return false; 5645 return false;
5646 let bucket = this[_getBucket](rest, object); 5646 let bucket = dart.dcall(this[_getBucket], rest, object);
5647 let index = this[_findBucketIndex](bucket, object); 5647 let index = dart.dcall(this[_findBucketIndex], bucket, object);
5648 if (dart.notNull(index) < 0) 5648 if (dart.notNull(index) < 0)
5649 return false; 5649 return false;
5650 let cell = dart.as(bucket.splice(index, 1)[0], LinkedHashSetCell); 5650 let cell = dart.as(bucket.splice(index, 1)[0], LinkedHashSetCell);
5651 this[_unlinkCell](cell); 5651 dart.dcall(this[_unlinkCell], cell);
5652 return true; 5652 return true;
5653 } 5653 }
5654 removeWhere(test) { 5654 removeWhere(test) {
5655 dart.as(test, dart.functionType(core.bool, [E])); 5655 dart.as(test, dart.functionType(core.bool, [E]));
5656 this[_filterWhere](test, true); 5656 dart.dcall(this[_filterWhere], test, true);
5657 } 5657 }
5658 retainWhere(test) { 5658 retainWhere(test) {
5659 dart.as(test, dart.functionType(core.bool, [E])); 5659 dart.as(test, dart.functionType(core.bool, [E]));
5660 this[_filterWhere](test, false); 5660 dart.dcall(this[_filterWhere], test, false);
5661 } 5661 }
5662 [_filterWhere](test, removeMatching) { 5662 [_filterWhere](test, removeMatching) {
5663 dart.as(test, dart.functionType(core.bool, [E])); 5663 dart.as(test, dart.functionType(core.bool, [E]));
5664 let cell = this[_first]; 5664 let cell = this[_first];
5665 while (cell != null) { 5665 while (cell != null) {
5666 let element = dart.as(cell[_element], E); 5666 let element = dart.as(cell[_element], E);
5667 let next = cell[_next]; 5667 let next = cell[_next];
5668 let modifications = this[_modifications]; 5668 let modifications = this[_modifications];
5669 let shouldRemove = removeMatching == test(element); 5669 let shouldRemove = removeMatching == test(element);
5670 if (modifications != this[_modifications]) { 5670 if (modifications != this[_modifications]) {
5671 dart.throw(new core.ConcurrentModificationError(this)); 5671 dart.throw(new core.ConcurrentModificationError(this));
5672 } 5672 }
5673 if (dart.notNull(shouldRemove)) 5673 if (dart.notNull(shouldRemove))
5674 this.remove(element); 5674 dart.dcall(this.remove, element);
5675 cell = next; 5675 cell = next;
5676 } 5676 }
5677 } 5677 }
5678 clear() { 5678 clear() {
5679 if (dart.notNull(this[_length]) > 0) { 5679 if (dart.notNull(this[_length]) > 0) {
5680 this[_strings] = this[_nums] = this[_rest] = this[_first] = this[_last ] = null; 5680 this[_strings] = this[_nums] = this[_rest] = this[_first] = this[_last ] = null;
5681 this[_length] = 0; 5681 this[_length] = 0;
5682 this[_modified](); 5682 dart.dcall(this[_modified]);
5683 } 5683 }
5684 } 5684 }
5685 [_addHashTableEntry](table, element) { 5685 [_addHashTableEntry](table, element) {
5686 dart.as(element, E); 5686 dart.as(element, E);
5687 let cell = dart.as(_LinkedHashSet$()._getTableEntry(table, element), Lin kedHashSetCell); 5687 let cell = dart.as(dart.dcall(_LinkedHashSet$()._getTableEntry, table, e lement), LinkedHashSetCell);
5688 if (cell != null) 5688 if (cell != null)
5689 return false; 5689 return false;
5690 _LinkedHashSet$()._setTableEntry(table, element, this[_newLinkedCell](el ement)); 5690 dart.dcall(_LinkedHashSet$()._setTableEntry, table, element, dart.dcall( this[_newLinkedCell], element));
5691 return true; 5691 return true;
5692 } 5692 }
5693 [_removeHashTableEntry](table, element) { 5693 [_removeHashTableEntry](table, element) {
5694 if (table == null) 5694 if (table == null)
5695 return false; 5695 return false;
5696 let cell = dart.as(_LinkedHashSet$()._getTableEntry(table, element), Lin kedHashSetCell); 5696 let cell = dart.as(dart.dcall(_LinkedHashSet$()._getTableEntry, table, e lement), LinkedHashSetCell);
5697 if (cell == null) 5697 if (cell == null)
5698 return false; 5698 return false;
5699 this[_unlinkCell](cell); 5699 dart.dcall(this[_unlinkCell], cell);
5700 _LinkedHashSet$()._deleteTableEntry(table, element); 5700 dart.dcall(_LinkedHashSet$()._deleteTableEntry, table, element);
5701 return true; 5701 return true;
5702 } 5702 }
5703 [_modified]() { 5703 [_modified]() {
5704 this[_modifications] = dart.notNull(this[_modifications]) + 1 & 67108863 ; 5704 this[_modifications] = dart.notNull(this[_modifications]) + 1 & 67108863 ;
5705 } 5705 }
5706 [_newLinkedCell](element) { 5706 [_newLinkedCell](element) {
5707 dart.as(element, E); 5707 dart.as(element, E);
5708 let cell = new LinkedHashSetCell(element); 5708 let cell = new LinkedHashSetCell(element);
5709 if (this[_first] == null) { 5709 if (this[_first] == null) {
5710 this[_first] = this[_last] = cell; 5710 this[_first] = this[_last] = cell;
5711 } else { 5711 } else {
5712 let last = this[_last]; 5712 let last = this[_last];
5713 cell[_previous] = last; 5713 cell[_previous] = last;
5714 this[_last] = last[_next] = cell; 5714 this[_last] = last[_next] = cell;
5715 } 5715 }
5716 this[_length] = dart.notNull(this[_length]) + 1; 5716 this[_length] = dart.notNull(this[_length]) + 1;
5717 this[_modified](); 5717 dart.dcall(this[_modified]);
5718 return cell; 5718 return cell;
5719 } 5719 }
5720 [_unlinkCell](cell) { 5720 [_unlinkCell](cell) {
5721 let previous = cell[_previous]; 5721 let previous = cell[_previous];
5722 let next = cell[_next]; 5722 let next = cell[_next];
5723 if (previous == null) { 5723 if (previous == null) {
5724 dart.assert(dart.equals(cell, this[_first])); 5724 dart.assert(dart.equals(cell, this[_first]));
5725 this[_first] = next; 5725 this[_first] = next;
5726 } else { 5726 } else {
5727 previous[_next] = next; 5727 previous[_next] = next;
5728 } 5728 }
5729 if (next == null) { 5729 if (next == null) {
5730 dart.assert(dart.equals(cell, this[_last])); 5730 dart.assert(dart.equals(cell, this[_last]));
5731 this[_last] = previous; 5731 this[_last] = previous;
5732 } else { 5732 } else {
5733 next[_previous] = previous; 5733 next[_previous] = previous;
5734 } 5734 }
5735 this[_length] = dart.notNull(this[_length]) - 1; 5735 this[_length] = dart.notNull(this[_length]) - 1;
5736 this[_modified](); 5736 dart.dcall(this[_modified]);
5737 } 5737 }
5738 static _isStringElement(element) { 5738 static _isStringElement(element) {
5739 return typeof element == 'string' && !dart.equals(element, '__proto__'); 5739 return typeof element == 'string' && !dart.equals(element, '__proto__');
5740 } 5740 }
5741 static _isNumericElement(element) { 5741 static _isNumericElement(element) {
5742 return dart.is(element, core.num) && (element & 0x3ffffff) === element; 5742 return dart.is(element, core.num) && dart.notNull(dart.as((element & 0x3 ffffff) === element, core.bool));
5743 } 5743 }
5744 [_computeHashCode](element) { 5744 [_computeHashCode](element) {
5745 return dart.hashCode(element) & 0x3ffffff; 5745 return dart.as(dart.dload(element, 'hashCode') & 0x3ffffff, core.int);
5746 } 5746 }
5747 static _getTableEntry(table, key) { 5747 static _getTableEntry(table, key) {
5748 return table[key]; 5748 return table[key];
5749 } 5749 }
5750 static _setTableEntry(table, key, value) { 5750 static _setTableEntry(table, key, value) {
5751 dart.assert(value != null); 5751 dart.assert(value != null);
5752 table[key] = value; 5752 table[key] = value;
5753 } 5753 }
5754 static _deleteTableEntry(table, key) { 5754 static _deleteTableEntry(table, key) {
5755 delete table[key]; 5755 delete table[key];
5756 } 5756 }
5757 [_getBucket](table, element) { 5757 [_getBucket](table, element) {
5758 let hash = this[_computeHashCode](element); 5758 let hash = dart.dcall(this[_computeHashCode], element);
5759 return dart.as(table[hash], core.List); 5759 return dart.as(table[hash], core.List);
5760 } 5760 }
5761 [_findBucketIndex](bucket, element) { 5761 [_findBucketIndex](bucket, element) {
5762 if (bucket == null) 5762 if (bucket == null)
5763 return -1; 5763 return -1;
5764 let length = bucket.length; 5764 let length = dart.as(bucket.length, core.int);
5765 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 5765 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
5766 let cell = dart.as(bucket[i], LinkedHashSetCell); 5766 let cell = dart.as(bucket[i], LinkedHashSetCell);
5767 if (dart.equals(cell[_element], element)) 5767 if (dart.equals(cell[_element], element))
5768 return i; 5768 return i;
5769 } 5769 }
5770 return -1; 5770 return -1;
5771 } 5771 }
5772 static _newHashTable() { 5772 static _newHashTable() {
5773 let table = Object.create(null); 5773 let table = Object.create(null);
5774 let temporaryKey = '<non-identifier-key>'; 5774 let temporaryKey = '<non-identifier-key>';
5775 _LinkedHashSet$()._setTableEntry(table, temporaryKey, table); 5775 dart.dcall(_LinkedHashSet$()._setTableEntry, table, temporaryKey, table) ;
5776 _LinkedHashSet$()._deleteTableEntry(table, temporaryKey); 5776 dart.dcall(_LinkedHashSet$()._deleteTableEntry, table, temporaryKey);
5777 return table; 5777 return table;
5778 } 5778 }
5779 } 5779 }
5780 _LinkedHashSet[dart.implements] = () => [LinkedHashSet$(E)]; 5780 _LinkedHashSet[dart.implements] = () => [LinkedHashSet$(E)];
5781 dart.setSignature(_LinkedHashSet, { 5781 dart.setSignature(_LinkedHashSet, {
5782 constructors: () => ({_LinkedHashSet: [_LinkedHashSet$(E), []]}), 5782 constructors: () => ({_LinkedHashSet: [_LinkedHashSet$(E), []]}),
5783 methods: () => ({ 5783 methods: () => ({
5784 [_newSet]: [core.Set$(E), []], 5784 [_newSet]: [core.Set$(E), []],
5785 [_unsupported]: [dart.void, [core.String]], 5785 [_unsupported]: [dart.void, [core.String]],
5786 contains: [core.bool, [core.Object]], 5786 contains: [core.bool, [core.Object]],
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
5829 let _LinkedHashSet = _LinkedHashSet$(); 5829 let _LinkedHashSet = _LinkedHashSet$();
5830 let _LinkedIdentityHashSet$ = dart.generic(function(E) { 5830 let _LinkedIdentityHashSet$ = dart.generic(function(E) {
5831 class _LinkedIdentityHashSet extends _LinkedHashSet$(E) { 5831 class _LinkedIdentityHashSet extends _LinkedHashSet$(E) {
5832 _LinkedIdentityHashSet() { 5832 _LinkedIdentityHashSet() {
5833 super._LinkedHashSet(); 5833 super._LinkedHashSet();
5834 } 5834 }
5835 [_newSet]() { 5835 [_newSet]() {
5836 return new (_LinkedIdentityHashSet$(E))(); 5836 return new (_LinkedIdentityHashSet$(E))();
5837 } 5837 }
5838 [_computeHashCode](key) { 5838 [_computeHashCode](key) {
5839 return core.identityHashCode(key) & 0x3ffffff; 5839 return dart.as(dart.dcall(core.identityHashCode, key) & 0x3ffffff, core. int);
5840 } 5840 }
5841 [_findBucketIndex](bucket, element) { 5841 [_findBucketIndex](bucket, element) {
5842 if (bucket == null) 5842 if (bucket == null)
5843 return -1; 5843 return -1;
5844 let length = bucket.length; 5844 let length = dart.as(bucket.length, core.int);
5845 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 5845 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
5846 let cell = dart.as(bucket[i], LinkedHashSetCell); 5846 let cell = dart.as(bucket[i], LinkedHashSetCell);
5847 if (dart.notNull(core.identical(cell[_element], element))) 5847 if (dart.notNull(dart.dcall(core.identical, cell[_element], element)))
5848 return i; 5848 return i;
5849 } 5849 }
5850 return -1; 5850 return -1;
5851 } 5851 }
5852 } 5852 }
5853 dart.setSignature(_LinkedIdentityHashSet, { 5853 dart.setSignature(_LinkedIdentityHashSet, {
5854 methods: () => ({[_newSet]: [core.Set$(E), []]}) 5854 methods: () => ({[_newSet]: [core.Set$(E), []]})
5855 }); 5855 });
5856 return _LinkedIdentityHashSet; 5856 return _LinkedIdentityHashSet;
5857 }); 5857 });
5858 let _LinkedIdentityHashSet = _LinkedIdentityHashSet$(); 5858 let _LinkedIdentityHashSet = _LinkedIdentityHashSet$();
5859 let _LinkedCustomHashSet$ = dart.generic(function(E) { 5859 let _LinkedCustomHashSet$ = dart.generic(function(E) {
5860 class _LinkedCustomHashSet extends _LinkedHashSet$(E) { 5860 class _LinkedCustomHashSet extends _LinkedHashSet$(E) {
5861 _LinkedCustomHashSet(equality, hasher, validKey) { 5861 _LinkedCustomHashSet(equality, hasher, validKey) {
5862 this[_equality] = equality; 5862 this[_equality] = equality;
5863 this[_hasher] = hasher; 5863 this[_hasher] = hasher;
5864 this[_validKey] = validKey != null ? validKey : dart.fn(x => dart.is(x, E), core.bool, [dart.dynamic]); 5864 this[_validKey] = validKey != null ? validKey : dart.fn(x => dart.is(x, E), core.bool, [dart.dynamic]);
5865 super._LinkedHashSet(); 5865 super._LinkedHashSet();
5866 } 5866 }
5867 [_newSet]() { 5867 [_newSet]() {
5868 return new (_LinkedCustomHashSet$(E))(this[_equality], this[_hasher], th is[_validKey]); 5868 return new (_LinkedCustomHashSet$(E))(this[_equality], this[_hasher], th is[_validKey]);
5869 } 5869 }
5870 [_findBucketIndex](bucket, element) { 5870 [_findBucketIndex](bucket, element) {
5871 if (bucket == null) 5871 if (bucket == null)
5872 return -1; 5872 return -1;
5873 let length = bucket.length; 5873 let length = dart.as(bucket.length, core.int);
5874 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 5874 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
5875 let cell = dart.as(bucket[i], LinkedHashSetCell); 5875 let cell = dart.as(bucket[i], LinkedHashSetCell);
5876 if (dart.notNull(this[_equality](dart.as(cell[_element], E), dart.as(e lement, E)))) 5876 if (dart.notNull(dart.dcall(this[_equality], cell[_element], element)) )
5877 return i; 5877 return i;
5878 } 5878 }
5879 return -1; 5879 return -1;
5880 } 5880 }
5881 [_computeHashCode](element) { 5881 [_computeHashCode](element) {
5882 return this[_hasher](dart.as(element, E)) & 0x3ffffff; 5882 return dart.as(dart.dcall(this[_hasher], element) & 0x3ffffff, core.int) ;
5883 } 5883 }
5884 add(element) { 5884 add(element) {
5885 dart.as(element, E); 5885 dart.as(element, E);
5886 return super[_add](element); 5886 return dart.dcall(super[_add], element);
5887 } 5887 }
5888 contains(object) { 5888 contains(object) {
5889 if (!dart.notNull(this[_validKey](object))) 5889 if (!dart.notNull(dart.dcall(this[_validKey], object)))
5890 return false; 5890 return false;
5891 return super[_contains](object); 5891 return dart.dcall(super[_contains], object);
5892 } 5892 }
5893 lookup(object) { 5893 lookup(object) {
5894 if (!dart.notNull(this[_validKey](object))) 5894 if (!dart.notNull(dart.dcall(this[_validKey], object)))
5895 return null; 5895 return null;
5896 return super[_lookup](object); 5896 return dart.dcall(super[_lookup], object);
5897 } 5897 }
5898 remove(object) { 5898 remove(object) {
5899 if (!dart.notNull(this[_validKey](object))) 5899 if (!dart.notNull(dart.dcall(this[_validKey], object)))
5900 return false; 5900 return false;
5901 return super[_remove](object); 5901 return dart.dcall(super[_remove], object);
5902 } 5902 }
5903 containsAll(elements) { 5903 containsAll(elements) {
5904 for (let element of elements) { 5904 for (let element of elements) {
5905 if (!dart.notNull(this[_validKey](element)) || !dart.notNull(this.cont ains(element))) 5905 if (!dart.notNull(dart.dcall(this[_validKey], element)) || !dart.notNu ll(dart.dcall(this.contains, element)))
5906 return false; 5906 return false;
5907 } 5907 }
5908 return true; 5908 return true;
5909 } 5909 }
5910 removeAll(elements) { 5910 removeAll(elements) {
5911 for (let element of elements) { 5911 for (let element of elements) {
5912 if (dart.notNull(this[_validKey](element))) { 5912 if (dart.notNull(dart.dcall(this[_validKey], element))) {
5913 super[_remove](element); 5913 dart.dcall(super[_remove], element);
5914 } 5914 }
5915 } 5915 }
5916 } 5916 }
5917 } 5917 }
5918 dart.setSignature(_LinkedCustomHashSet, { 5918 dart.setSignature(_LinkedCustomHashSet, {
5919 constructors: () => ({_LinkedCustomHashSet: [_LinkedCustomHashSet$(E), [_E quality$(E), _Hasher$(E), dart.functionType(core.bool, [core.Object])]]}), 5919 constructors: () => ({_LinkedCustomHashSet: [_LinkedCustomHashSet$(E), [_E quality$(E), _Hasher$(E), dart.functionType(core.bool, [core.Object])]]}),
5920 methods: () => ({ 5920 methods: () => ({
5921 [_newSet]: [core.Set$(E), []], 5921 [_newSet]: [core.Set$(E), []],
5922 add: [core.bool, [E]], 5922 add: [core.bool, [E]],
5923 lookup: [E, [core.Object]] 5923 lookup: [E, [core.Object]]
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
6029 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$; 6029 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$;
6030 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable; 6030 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable;
6031 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$; 6031 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$;
6032 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator; 6032 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator;
6033 exports.HashSetIterator$ = HashSetIterator$; 6033 exports.HashSetIterator$ = HashSetIterator$;
6034 exports.HashSetIterator = HashSetIterator; 6034 exports.HashSetIterator = HashSetIterator;
6035 exports.LinkedHashSetCell = LinkedHashSetCell; 6035 exports.LinkedHashSetCell = LinkedHashSetCell;
6036 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$; 6036 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$;
6037 exports.LinkedHashSetIterator = LinkedHashSetIterator; 6037 exports.LinkedHashSetIterator = LinkedHashSetIterator;
6038 }); 6038 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698