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

Unified Diff: test/codegen/expect/collection/collection.js

Issue 949383003: use js_ast instead of strings to generate JS (Closed) Base URL: git@github.com:dart-lang/dart-dev-compiler.git@master
Patch Set: add redirecting ctor test Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/codegen/expect/cascade/cascade.js ('k') | test/codegen/expect/constructors/constructors.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/expect/collection/collection.js
diff --git a/test/codegen/expect/collection/collection.js b/test/codegen/expect/collection/collection.js
index 7acf5017c2c0fe428384d85181f03d0141adeaa4..1c19d720bcaf7bcfd80898a99ce17d1080bbd932 100644
--- a/test/codegen/expect/collection/collection.js
+++ b/test/codegen/expect/collection/collection.js
@@ -1,5 +1,5 @@
var collection;
-(function (collection) {
+(function(collection) {
'use strict';
let _HashMap$ = dart.generic(function(K, V) {
class _HashMap extends dart.Object {
@@ -10,9 +10,15 @@ var collection;
this._rest = null;
this._keys = null;
}
- get length() { return this._length; }
- get isEmpty() { return this._length === 0; }
- get isNotEmpty() { return !dart.notNull(this.isEmpty); }
+ get length() {
+ return this._length;
+ }
+ get isEmpty() {
+ return this._length === 0;
+ }
+ get isNotEmpty() {
+ return !dart.notNull(this.isEmpty);
+ }
get keys() {
return new HashMapKeyIterable(this);
}
@@ -22,17 +28,18 @@ var collection;
containsKey(key) {
if (_isStringKey(key)) {
let strings = this._strings;
- return (strings === null) ? false : _hasTableEntry(strings, key);
+ return strings === null ? false : _hasTableEntry(strings, key);
} else if (_isNumericKey(key)) {
let nums = this._nums;
- return (nums === null) ? false : _hasTableEntry(nums, key);
+ return nums === null ? false : _hasTableEntry(nums, key);
} else {
return this._containsKey(key);
}
}
_containsKey(key) {
let rest = this._rest;
- if (rest === null) return false;
+ if (rest === null)
+ return false;
let bucket = this._getBucket(rest, key);
return this._findBucketIndex(bucket, key) >= 0;
}
@@ -47,29 +54,32 @@ var collection;
get(key) {
if (_isStringKey(key)) {
let strings = this._strings;
- return dart.as((strings === null) ? null : _getTableEntry(strings, key), V);
+ return dart.as(strings === null ? null : _getTableEntry(strings, key), V);
} else if (_isNumericKey(key)) {
let nums = this._nums;
- return dart.as((nums === null) ? null : _getTableEntry(nums, key), V);
+ return dart.as(nums === null ? null : _getTableEntry(nums, key), V);
} else {
return this._get(key);
}
}
_get(key) {
let rest = this._rest;
- if (rest === null) return dart.as(null, V);
+ if (rest === null)
+ return dart.as(null, V);
let bucket = this._getBucket(rest, key);
let index = this._findBucketIndex(bucket, key);
- return dart.as((index < 0) ? null : dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#[#]', bucket, index + 1), V);
+ return dart.as(index < 0 ? null : dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#[#]', bucket, index + 1), V);
}
set(key, value) {
if (_isStringKey(key)) {
let strings = this._strings;
- if (strings === null) this._strings = strings = _newHashTable();
+ if (strings === null)
+ this._strings = strings = _newHashTable();
this._addHashTableEntry(strings, key, value);
} else if (_isNumericKey(key)) {
let nums = this._nums;
- if (nums === null) this._nums = nums = _newHashTable();
+ if (nums === null)
+ this._nums = nums = _newHashTable();
this._addHashTableEntry(nums, key, value);
} else {
this._set(key, value);
@@ -77,7 +87,8 @@ var collection;
}
_set(key, value) {
let rest = this._rest;
- if (rest === null) this._rest = rest = _newHashTable();
+ if (rest === null)
+ this._rest = rest = _newHashTable();
let hash = this._computeHashCode(key);
let bucket = dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#[#]', rest, hash);
if (bucket === null) {
@@ -96,7 +107,8 @@ var collection;
}
}
putIfAbsent(key, ifAbsent) {
- if (this.containsKey(key)) return this.get(key);
+ if (this.containsKey(key))
+ return this.get(key);
let value = ifAbsent();
this.set(key, value);
return value;
@@ -112,10 +124,12 @@ var collection;
}
_remove(key) {
let rest = this._rest;
- if (rest === null) return dart.as(null, V);
+ if (rest === null)
+ return dart.as(null, V);
let bucket = this._getBucket(rest, key);
let index = this._findBucketIndex(bucket, key);
- if (index < 0) return dart.as(null, V);
+ if (index < 0)
+ return dart.as(null, V);
this._length--;
this._keys = null;
return dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#.splice(#, 2)[1]', bucket, index), V);
@@ -137,7 +151,8 @@ var collection;
}
}
_computeKeys() {
- if (this._keys !== null) return this._keys;
+ if (this._keys !== null)
+ return this._keys;
let result = new core.List(this._length);
let index = 0;
let strings = this._strings;
@@ -197,13 +212,13 @@ var collection;
}
}
static _isStringKey(key) {
- return dart.notNull(typeof key == "string") && dart.notNull(!dart.equals(key, '__proto__'));
+ return dart.notNull(typeof key == string) && dart.notNull(!dart.equals(key, '__proto__'));
}
static _isNumericKey(key) {
- return core.bool.&&(dart.is(key, core.num), dart.dinvokef(/* Unimplemented unknown name */JS, 'bool', '(# & 0x3ffffff) === #', key, key));
+ return core.bool['&&'](dart.is(key, core.num), dart.dinvokef(/* Unimplemented unknown name */JS, 'bool', '(# & 0x3ffffff) === #', key, key));
}
_computeHashCode(key) {
- return dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'int', '# & 0x3ffffff', dart.dload(key, "hashCode")), core.int);
+ return dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'int', '# & 0x3ffffff', dart.dload(key, 'hashCode')), core.int);
}
static _hasTableEntry(table, key) {
let entry = dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#[#]', table, key);
@@ -228,10 +243,12 @@ var collection;
return dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#[#]', table, hash), core.List);
}
_findBucketIndex(bucket, key) {
- if (bucket === null) return -1;
+ if (bucket === null)
+ return -1;
let length = dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'int', '#.length', bucket), core.int);
for (let i = 0; i < length; i = 2) {
- if (dart.equals(dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#[#]', bucket, i), key)) return i;
+ if (dart.equals(dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#[#]', bucket, i), key))
+ return i;
}
return -1;
}
@@ -246,17 +263,18 @@ var collection;
return _HashMap;
});
let _HashMap = _HashMap$(dynamic, dynamic);
-
let _IdentityHashMap$ = dart.generic(function(K, V) {
class _IdentityHashMap extends _HashMap$(K, V) {
_computeHashCode(key) {
return dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'int', '# & 0x3ffffff', core.identityHashCode(key)), core.int);
}
_findBucketIndex(bucket, key) {
- if (bucket === null) return -1;
+ if (bucket === null)
+ return -1;
let length = dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'int', '#.length', bucket), core.int);
for (let i = 0; i < length; i = 2) {
- if (core.identical(dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#[#]', bucket, i), key)) return i;
+ if (core.identical(dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#[#]', bucket, i), key))
+ return i;
}
return -1;
}
@@ -264,66 +282,75 @@ var collection;
return _IdentityHashMap;
});
let _IdentityHashMap = _IdentityHashMap$(dynamic, dynamic);
-
let _CustomHashMap$ = dart.generic(function(K, V) {
class _CustomHashMap extends _HashMap$(K, V) {
_CustomHashMap(_equals, _hashCode, validKey) {
this._equals = _equals;
this._hashCode = _hashCode;
- this._validKey = (validKey !== null) ? validKey : ((v) => dart.is(v, K));
+ this._validKey = validKey !== null ? validKey : (v) => dart.is(v, K);
super._HashMap();
}
get(key) {
- if (!dart.notNull(this._validKey(key))) return dart.as(null, V);
+ if (!dart.notNull(this._validKey(key)))
+ return dart.as(null, V);
return super._get(key);
}
set(key, value) {
super._set(key, value);
}
containsKey(key) {
- if (!dart.notNull(this._validKey(key))) return false;
+ if (!dart.notNull(this._validKey(key)))
+ return false;
return super._containsKey(key);
}
remove(key) {
- if (!dart.notNull(this._validKey(key))) return dart.as(null, V);
+ if (!dart.notNull(this._validKey(key)))
+ return dart.as(null, V);
return super._remove(key);
}
_computeHashCode(key) {
return dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'int', '# & 0x3ffffff', this._hashCode(dart.as(key, K))), core.int);
}
_findBucketIndex(bucket, key) {
- if (bucket === null) return -1;
+ if (bucket === null)
+ return -1;
let length = dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'int', '#.length', bucket), core.int);
for (let i = 0; i < length; i = 2) {
- if (this._equals(dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#[#]', bucket, i), K), dart.as(key, K))) return i;
+ if (this._equals(dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#[#]', bucket, i), K), dart.as(key, K)))
+ return i;
}
return -1;
}
- toString() { return Maps.mapToString(this); }
+ toString() {
+ return Maps.mapToString(this);
+ }
}
return _CustomHashMap;
});
let _CustomHashMap = _CustomHashMap$(dynamic, dynamic);
-
let HashMapKeyIterable$ = dart.generic(function(E) {
class HashMapKeyIterable extends IterableBase$(E) {
HashMapKeyIterable(_map) {
this._map = _map;
super.IterableBase();
}
- get length() { return dart.as(dart.dload(this._map, "_length"), core.int); }
- get isEmpty() { return dart.equals(dart.dload(this._map, "_length"), 0); }
+ get length() {
+ return dart.as(dart.dload(this._map, '_length'), core.int);
+ }
+ get isEmpty() {
+ return dart.equals(dart.dload(this._map, '_length'), 0);
+ }
get iterator() {
- return new HashMapKeyIterator(this._map, dart.dinvoke(this._map, "_computeKeys"));
+ return new HashMapKeyIterator(this._map, dart.dinvoke(this._map, '_computeKeys'));
}
contains(element) {
- return dart.as(dart.dinvoke(this._map, "containsKey", element), core.bool);
+ return dart.as(dart.dinvoke(this._map, 'containsKey', element), core.bool);
}
forEach(f) {
- let keys = dart.as(dart.dinvoke(this._map, "_computeKeys"), core.List);
+ let keys = dart.as(dart.dinvoke(this._map, '_computeKeys'), core.List);
for (let i = 0, length = dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'int', '#.length', keys), core.int); i < length; i++) {
f(dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#[#]', keys, i), E));
- if (dart.dinvokef(/* Unimplemented unknown name */JS, 'bool', '# !== #', keys, dart.dload(this._map, "_keys"))) {
+ if (dart.dinvokef(/* Unimplemented unknown name */JS, 'bool', '# !== #', keys, dart.dload(this._map, '_keys'))) {
throw new core.ConcurrentModificationError(this._map);
}
}
@@ -332,7 +359,6 @@ var collection;
return HashMapKeyIterable;
});
let HashMapKeyIterable = HashMapKeyIterable$(dynamic);
-
let HashMapKeyIterator$ = dart.generic(function(E) {
class HashMapKeyIterator extends dart.Object {
HashMapKeyIterator(_map, _keys) {
@@ -341,11 +367,13 @@ var collection;
this._offset = 0;
this._current = dart.as(null, E);
}
- get current() { return this._current; }
+ get current() {
+ return this._current;
+ }
moveNext() {
let keys = this._keys;
let offset = this._offset;
- if (dart.dinvokef(/* Unimplemented unknown name */JS, 'bool', '# !== #', keys, dart.dload(this._map, "_keys"))) {
+ if (dart.dinvokef(/* Unimplemented unknown name */JS, 'bool', '# !== #', keys, dart.dload(this._map, '_keys'))) {
throw new core.ConcurrentModificationError(this._map);
} else if (offset['>='](dart.dinvokef(/* Unimplemented unknown name */JS, 'int', '#.length', keys))) {
this._current = dart.as(null, E);
@@ -360,7 +388,6 @@ var collection;
return HashMapKeyIterator;
});
let HashMapKeyIterator = HashMapKeyIterator$(dynamic);
-
let _LinkedHashMap$ = dart.generic(function(K, V) {
class _LinkedHashMap extends dart.Object {
_LinkedHashMap() {
@@ -372,9 +399,15 @@ var collection;
this._last = null;
this._modifications = 0;
}
- get length() { return this._length; }
- get isEmpty() { return this._length === 0; }
- get isNotEmpty() { return !dart.notNull(this.isEmpty); }
+ get length() {
+ return this._length;
+ }
+ get isEmpty() {
+ return this._length === 0;
+ }
+ get isNotEmpty() {
+ return !dart.notNull(this.isEmpty);
+ }
get keys() {
return new LinkedHashMapKeyIterable(this);
}
@@ -384,12 +417,14 @@ var collection;
containsKey(key) {
if (_isStringKey(key)) {
let strings = this._strings;
- if (strings === null) return false;
+ if (strings === null)
+ return false;
let cell = dart.as(_getTableEntry(strings, key), LinkedHashMapCell);
return cell !== null;
} else if (_isNumericKey(key)) {
let nums = this._nums;
- if (nums === null) return false;
+ if (nums === null)
+ return false;
let cell = dart.as(_getTableEntry(nums, key), LinkedHashMapCell);
return cell !== null;
} else {
@@ -398,7 +433,8 @@ var collection;
}
_containsKey(key) {
let rest = this._rest;
- if (rest === null) return false;
+ if (rest === null)
+ return false;
let bucket = this._getBucket(rest, key);
return this._findBucketIndex(bucket, key) >= 0;
}
@@ -413,35 +449,41 @@ var collection;
get(key) {
if (_isStringKey(key)) {
let strings = this._strings;
- if (strings === null) return dart.as(null, V);
+ if (strings === null)
+ return dart.as(null, V);
let cell = dart.as(_getTableEntry(strings, key), LinkedHashMapCell);
- return dart.as((cell === null) ? null : cell._value, V);
+ return dart.as(cell === null ? null : cell._value, V);
} else if (_isNumericKey(key)) {
let nums = this._nums;
- if (nums === null) return dart.as(null, V);
+ if (nums === null)
+ return dart.as(null, V);
let cell = dart.as(_getTableEntry(nums, key), LinkedHashMapCell);
- return dart.as((cell === null) ? null : cell._value, V);
+ return dart.as(cell === null ? null : cell._value, V);
} else {
return this._get(key);
}
}
_get(key) {
let rest = this._rest;
- if (rest === null) return dart.as(null, V);
+ if (rest === null)
+ return dart.as(null, V);
let bucket = this._getBucket(rest, key);
let index = this._findBucketIndex(bucket, key);
- if (index < 0) return dart.as(null, V);
+ if (index < 0)
+ return dart.as(null, V);
let cell = dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#[#]', bucket, index), LinkedHashMapCell);
return dart.as(cell._value, V);
}
set(key, value) {
if (_isStringKey(key)) {
let strings = this._strings;
- if (strings === null) this._strings = strings = _newHashTable();
+ if (strings === null)
+ this._strings = strings = _newHashTable();
this._addHashTableEntry(strings, key, value);
} else if (_isNumericKey(key)) {
let nums = this._nums;
- if (nums === null) this._nums = nums = _newHashTable();
+ if (nums === null)
+ this._nums = nums = _newHashTable();
this._addHashTableEntry(nums, key, value);
} else {
this._set(key, value);
@@ -449,7 +491,8 @@ var collection;
}
_set(key, value) {
let rest = this._rest;
- if (rest === null) this._rest = rest = _newHashTable();
+ if (rest === null)
+ this._rest = rest = _newHashTable();
let hash = this._computeHashCode(key);
let bucket = dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#[#]', rest, hash);
if (bucket === null) {
@@ -467,7 +510,8 @@ var collection;
}
}
putIfAbsent(key, ifAbsent) {
- if (this.containsKey(key)) return this.get(key);
+ if (this.containsKey(key))
+ return this.get(key);
let value = ifAbsent();
this.set(key, value);
return value;
@@ -483,10 +527,12 @@ var collection;
}
_remove(key) {
let rest = this._rest;
- if (rest === null) return dart.as(null, V);
+ if (rest === null)
+ return dart.as(null, V);
let bucket = this._getBucket(rest, key);
let index = this._findBucketIndex(bucket, key);
- if (index < 0) return dart.as(null, V);
+ if (index < 0)
+ return dart.as(null, V);
let cell = dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#.splice(#, 1)[0]', bucket, index), LinkedHashMapCell);
this._unlinkCell(cell);
return dart.as(cell._value, V);
@@ -518,15 +564,17 @@ var collection;
}
}
_removeHashTableEntry(table, key) {
- if (table === null) return dart.as(null, V);
+ if (table === null)
+ return dart.as(null, V);
let cell = dart.as(_getTableEntry(table, key), LinkedHashMapCell);
- if (cell === null) return dart.as(null, V);
+ if (cell === null)
+ return dart.as(null, V);
this._unlinkCell(cell);
_deleteTableEntry(table, key);
return dart.as(cell._value, V);
}
_modified() {
- this._modifications = (this._modifications + 1) & 67108863;
+ this._modifications = this._modifications + 1 & 67108863;
}
_newLinkedCell(key, value) {
let cell = new LinkedHashMapCell(key, value);
@@ -560,13 +608,13 @@ var collection;
this._modified();
}
static _isStringKey(key) {
- return dart.notNull(typeof key == "string") && dart.notNull(!dart.equals(key, '__proto__'));
+ return dart.notNull(typeof key == string) && dart.notNull(!dart.equals(key, '__proto__'));
}
static _isNumericKey(key) {
- return core.bool.&&(dart.is(key, core.num), dart.dinvokef(/* Unimplemented unknown name */JS, 'bool', '(# & 0x3ffffff) === #', key, key));
+ return core.bool['&&'](dart.is(key, core.num), dart.dinvokef(/* Unimplemented unknown name */JS, 'bool', '(# & 0x3ffffff) === #', key, key));
}
_computeHashCode(key) {
- return dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'int', '# & 0x3ffffff', dart.dload(key, "hashCode")), core.int);
+ return dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'int', '# & 0x3ffffff', dart.dload(key, 'hashCode')), core.int);
}
static _getTableEntry(table, key) {
return dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#[#]', table, key);
@@ -583,11 +631,13 @@ var collection;
return dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#[#]', table, hash), core.List);
}
_findBucketIndex(bucket, key) {
- if (bucket === null) return -1;
+ if (bucket === null)
+ return -1;
let length = dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'int', '#.length', bucket), core.int);
for (let i = 0; i < length; i++) {
let cell = dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#[#]', bucket, i), LinkedHashMapCell);
- if (dart.equals(cell._key, key)) return i;
+ if (dart.equals(cell._key, key))
+ return i;
}
return -1;
}
@@ -598,23 +648,26 @@ var collection;
_deleteTableEntry(table, temporaryKey);
return table;
}
- toString() { return Maps.mapToString(this); }
+ toString() {
+ return Maps.mapToString(this);
+ }
}
return _LinkedHashMap;
});
let _LinkedHashMap = _LinkedHashMap$(dynamic, dynamic);
-
let _LinkedIdentityHashMap$ = dart.generic(function(K, V) {
class _LinkedIdentityHashMap extends _LinkedHashMap$(K, V) {
_computeHashCode(key) {
return dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'int', '# & 0x3ffffff', core.identityHashCode(key)), core.int);
}
_findBucketIndex(bucket, key) {
- if (bucket === null) return -1;
+ if (bucket === null)
+ return -1;
let length = dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'int', '#.length', bucket), core.int);
for (let i = 0; i < length; i++) {
let cell = dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#[#]', bucket, i), LinkedHashMapCell);
- if (core.identical(cell._key, key)) return i;
+ if (core.identical(cell._key, key))
+ return i;
}
return -1;
}
@@ -622,39 +675,43 @@ var collection;
return _LinkedIdentityHashMap;
});
let _LinkedIdentityHashMap = _LinkedIdentityHashMap$(dynamic, dynamic);
-
let _LinkedCustomHashMap$ = dart.generic(function(K, V) {
class _LinkedCustomHashMap extends _LinkedHashMap$(K, V) {
_LinkedCustomHashMap(_equals, _hashCode, validKey) {
this._equals = _equals;
this._hashCode = _hashCode;
- this._validKey = (validKey !== null) ? validKey : ((v) => dart.is(v, K));
+ this._validKey = validKey !== null ? validKey : (v) => dart.is(v, K);
super._LinkedHashMap();
}
get(key) {
- if (!dart.notNull(this._validKey(key))) return dart.as(null, V);
+ if (!dart.notNull(this._validKey(key)))
+ return dart.as(null, V);
return super._get(key);
}
set(key, value) {
super._set(key, value);
}
containsKey(key) {
- if (!dart.notNull(this._validKey(key))) return false;
+ if (!dart.notNull(this._validKey(key)))
+ return false;
return super._containsKey(key);
}
remove(key) {
- if (!dart.notNull(this._validKey(key))) return dart.as(null, V);
+ if (!dart.notNull(this._validKey(key)))
+ return dart.as(null, V);
return super._remove(key);
}
_computeHashCode(key) {
return dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'int', '# & 0x3ffffff', this._hashCode(dart.as(key, K))), core.int);
}
_findBucketIndex(bucket, key) {
- if (bucket === null) return -1;
+ if (bucket === null)
+ return -1;
let length = dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'int', '#.length', bucket), core.int);
for (let i = 0; i < length; i++) {
let cell = dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#[#]', bucket, i), LinkedHashMapCell);
- if (this._equals(dart.as(cell._key, K), dart.as(key, K))) return i;
+ if (this._equals(dart.as(cell._key, K), dart.as(key, K)))
+ return i;
}
return -1;
}
@@ -662,7 +719,6 @@ var collection;
return _LinkedCustomHashMap;
});
let _LinkedCustomHashMap = _LinkedCustomHashMap$(dynamic, dynamic);
-
class LinkedHashMapCell extends dart.Object {
LinkedHashMapCell(_key, _value) {
this._key = _key;
@@ -671,27 +727,30 @@ var collection;
this._previous = null;
}
}
-
let LinkedHashMapKeyIterable$ = dart.generic(function(E) {
class LinkedHashMapKeyIterable extends IterableBase$(E) {
LinkedHashMapKeyIterable(_map) {
this._map = _map;
super.IterableBase();
}
- get length() { return dart.as(dart.dload(this._map, "_length"), core.int); }
- get isEmpty() { return dart.equals(dart.dload(this._map, "_length"), 0); }
+ get length() {
+ return dart.as(dart.dload(this._map, '_length'), core.int);
+ }
+ get isEmpty() {
+ return dart.equals(dart.dload(this._map, '_length'), 0);
+ }
get iterator() {
- return new LinkedHashMapKeyIterator(this._map, dart.dload(this._map, "_modifications"));
+ return new LinkedHashMapKeyIterator(this._map, dart.dload(this._map, '_modifications'));
}
contains(element) {
- return dart.as(dart.dinvoke(this._map, "containsKey", element), core.bool);
+ return dart.as(dart.dinvoke(this._map, 'containsKey', element), core.bool);
}
forEach(f) {
- let cell = dart.as(dart.dload(this._map, "_first"), LinkedHashMapCell);
- let modifications = dart.as(dart.dload(this._map, "_modifications"), core.int);
+ let cell = dart.as(dart.dload(this._map, '_first'), LinkedHashMapCell);
+ let modifications = dart.as(dart.dload(this._map, '_modifications'), core.int);
while (cell !== null) {
f(dart.as(cell._key, E));
- if (modifications !== dart.dload(this._map, "_modifications")) {
+ if (modifications !== dart.dload(this._map, '_modifications')) {
throw new core.ConcurrentModificationError(this._map);
}
cell = cell._next;
@@ -701,7 +760,6 @@ var collection;
return LinkedHashMapKeyIterable;
});
let LinkedHashMapKeyIterable = LinkedHashMapKeyIterable$(dynamic);
-
let LinkedHashMapKeyIterator$ = dart.generic(function(E) {
class LinkedHashMapKeyIterator extends dart.Object {
LinkedHashMapKeyIterator(_map, _modifications) {
@@ -709,11 +767,13 @@ var collection;
this._modifications = _modifications;
this._cell = null;
this._current = dart.as(null, E);
- this._cell = dart.as(dart.dload(this._map, "_first"), LinkedHashMapCell);
+ this._cell = dart.as(dart.dload(this._map, '_first'), LinkedHashMapCell);
+ }
+ get current() {
+ return this._current;
}
- get current() { return this._current; }
moveNext() {
- if (this._modifications !== dart.dload(this._map, "_modifications")) {
+ if (this._modifications !== dart.dload(this._map, '_modifications')) {
throw new core.ConcurrentModificationError(this._map);
} else if (this._cell === null) {
this._current = dart.as(null, E);
@@ -728,7 +788,6 @@ var collection;
return LinkedHashMapKeyIterator;
});
let LinkedHashMapKeyIterator = LinkedHashMapKeyIterator$(dynamic);
-
let _HashSet$ = dart.generic(function(E) {
class _HashSet extends _HashSetBase$(E) {
_HashSet() {
@@ -739,27 +798,36 @@ var collection;
this._elements = null;
super._HashSetBase();
}
- _newSet() { return new _HashSet(); }
+ _newSet() {
+ return new _HashSet();
+ }
get iterator() {
return new HashSetIterator(this, this._computeElements());
}
- get length() { return this._length; }
- get isEmpty() { return this._length === 0; }
- get isNotEmpty() { return !dart.notNull(this.isEmpty); }
+ get length() {
+ return this._length;
+ }
+ get isEmpty() {
+ return this._length === 0;
+ }
+ get isNotEmpty() {
+ return !dart.notNull(this.isEmpty);
+ }
contains(object) {
if (_isStringElement(object)) {
let strings = this._strings;
- return (strings === null) ? false : _hasTableEntry(strings, object);
+ return strings === null ? false : _hasTableEntry(strings, object);
} else if (_isNumericElement(object)) {
let nums = this._nums;
- return (nums === null) ? false : _hasTableEntry(nums, object);
+ return nums === null ? false : _hasTableEntry(nums, object);
} else {
return this._contains(object);
}
}
_contains(object) {
let rest = this._rest;
- if (rest === null) return false;
+ if (rest === null)
+ return false;
let bucket = this._getBucket(rest, object);
return this._findBucketIndex(bucket, object) >= 0;
}
@@ -771,20 +839,24 @@ var collection;
}
_lookup(object) {
let rest = this._rest;
- if (rest === null) return dart.as(null, E);
+ if (rest === null)
+ return dart.as(null, E);
let bucket = this._getBucket(rest, object);
let index = this._findBucketIndex(bucket, object);
- if (index < 0) return dart.as(null, E);
+ if (index < 0)
+ return dart.as(null, E);
return dart.as(bucket.get(index), E);
}
add(element) {
if (_isStringElement(element)) {
let strings = this._strings;
- if (strings === null) this._strings = strings = _newHashTable();
+ if (strings === null)
+ this._strings = strings = _newHashTable();
return this._addHashTableEntry(strings, element);
} else if (_isNumericElement(element)) {
let nums = this._nums;
- if (nums === null) this._nums = nums = _newHashTable();
+ if (nums === null)
+ this._nums = nums = _newHashTable();
return this._addHashTableEntry(nums, element);
} else {
return this._add(element);
@@ -792,14 +864,16 @@ var collection;
}
_add(element) {
let rest = this._rest;
- if (rest === null) this._rest = rest = _newHashTable();
+ if (rest === null)
+ this._rest = rest = _newHashTable();
let hash = this._computeHashCode(element);
let bucket = dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#[#]', rest, hash);
if (bucket === null) {
_setTableEntry(rest, hash, dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '[#]', element));
} else {
let index = this._findBucketIndex(bucket, element);
- if (index >= 0) return false;
+ if (index >= 0)
+ return false;
dart.dinvokef(/* Unimplemented unknown name */JS, 'void', '#.push(#)', bucket, element);
}
this._length++;
@@ -822,10 +896,12 @@ var collection;
}
_remove(object) {
let rest = this._rest;
- if (rest === null) return false;
+ if (rest === null)
+ return false;
let bucket = this._getBucket(rest, object);
let index = this._findBucketIndex(bucket, object);
- if (index < 0) return false;
+ if (index < 0)
+ return false;
this._length--;
this._elements = null;
dart.dinvokef(/* Unimplemented unknown name */JS, 'void', '#.splice(#, 1)', bucket, index);
@@ -838,7 +914,8 @@ var collection;
}
}
_computeElements() {
- if (this._elements !== null) return this._elements;
+ if (this._elements !== null)
+ return this._elements;
let result = new core.List(this._length);
let index = 0;
let strings = this._strings;
@@ -879,7 +956,8 @@ var collection;
return this._elements = result;
}
_addHashTableEntry(table, element) {
- if (_hasTableEntry(table, element)) return false;
+ if (_hasTableEntry(table, element))
+ return false;
_setTableEntry(table, element, 0);
this._length++;
this._elements = null;
@@ -896,13 +974,13 @@ var collection;
}
}
static _isStringElement(element) {
- return dart.notNull(typeof element == "string") && dart.notNull(!dart.equals(element, '__proto__'));
+ return dart.notNull(typeof element == string) && dart.notNull(!dart.equals(element, '__proto__'));
}
static _isNumericElement(element) {
- return core.bool.&&(dart.is(element, core.num), dart.dinvokef(/* Unimplemented unknown name */JS, 'bool', '(# & 0x3ffffff) === #', element, element));
+ return core.bool['&&'](dart.is(element, core.num), dart.dinvokef(/* Unimplemented unknown name */JS, 'bool', '(# & 0x3ffffff) === #', element, element));
}
_computeHashCode(element) {
- return dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'int', '# & 0x3ffffff', dart.dload(element, "hashCode")), core.int);
+ return dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'int', '# & 0x3ffffff', dart.dload(element, 'hashCode')), core.int);
}
static _hasTableEntry(table, key) {
let entry = dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#[#]', table, key);
@@ -920,10 +998,12 @@ var collection;
return dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#[#]', table, hash), core.List);
}
_findBucketIndex(bucket, element) {
- if (bucket === null) return -1;
+ if (bucket === null)
+ return -1;
let length = dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'int', '#.length', bucket), core.int);
for (let i = 0; i < length; i++) {
- if (dart.equals(dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#[#]', bucket, i), element)) return i;
+ if (dart.equals(dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#[#]', bucket, i), element))
+ return i;
}
return -1;
}
@@ -938,18 +1018,21 @@ var collection;
return _HashSet;
});
let _HashSet = _HashSet$(dynamic);
-
let _IdentityHashSet$ = dart.generic(function(E) {
class _IdentityHashSet extends _HashSet$(E) {
- _newSet() { return new _IdentityHashSet(); }
+ _newSet() {
+ return new _IdentityHashSet();
+ }
_computeHashCode(key) {
return dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'int', '# & 0x3ffffff', core.identityHashCode(key)), core.int);
}
_findBucketIndex(bucket, element) {
- if (bucket === null) return -1;
+ if (bucket === null)
+ return -1;
let length = dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'int', '#.length', bucket), core.int);
for (let i = 0; i < length; i++) {
- if (core.identical(dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#[#]', bucket, i), element)) return i;
+ if (core.identical(dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#[#]', bucket, i), element))
+ return i;
}
return -1;
}
@@ -957,45 +1040,52 @@ var collection;
return _IdentityHashSet;
});
let _IdentityHashSet = _IdentityHashSet$(dynamic);
-
let _CustomHashSet$ = dart.generic(function(E) {
class _CustomHashSet extends _HashSet$(E) {
_CustomHashSet(_equality, _hasher, validKey) {
this._equality = _equality;
this._hasher = _hasher;
- this._validKey = (validKey !== null) ? validKey : ((x) => dart.is(x, E));
+ this._validKey = validKey !== null ? validKey : (x) => dart.is(x, E);
super._HashSet();
}
- _newSet() { return new _CustomHashSet(this._equality, this._hasher, this._validKey); }
+ _newSet() {
+ return new _CustomHashSet(this._equality, this._hasher, this._validKey);
+ }
_findBucketIndex(bucket, element) {
- if (bucket === null) return -1;
+ if (bucket === null)
+ return -1;
let length = dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'int', '#.length', bucket), core.int);
for (let i = 0; i < length; i++) {
- if (this._equality(dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#[#]', bucket, i), E), dart.as(element, E))) return i;
+ if (this._equality(dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#[#]', bucket, i), E), dart.as(element, E)))
+ return i;
}
return -1;
}
_computeHashCode(element) {
return dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'int', '# & 0x3ffffff', this._hasher(dart.as(element, E))), core.int);
}
- add(object) { return super._add(object); }
+ add(object) {
+ return super._add(object);
+ }
contains(object) {
- if (!dart.notNull(this._validKey(object))) return false;
+ if (!dart.notNull(this._validKey(object)))
+ return false;
return super._contains(object);
}
lookup(object) {
- if (!dart.notNull(this._validKey(object))) return dart.as(null, E);
+ if (!dart.notNull(this._validKey(object)))
+ return dart.as(null, E);
return super._lookup(object);
}
remove(object) {
- if (!dart.notNull(this._validKey(object))) return false;
+ if (!dart.notNull(this._validKey(object)))
+ return false;
return super._remove(object);
}
}
return _CustomHashSet;
});
let _CustomHashSet = _CustomHashSet$(dynamic);
-
let HashSetIterator$ = dart.generic(function(E) {
class HashSetIterator extends dart.Object {
HashSetIterator(_set, _elements) {
@@ -1004,11 +1094,13 @@ var collection;
this._offset = 0;
this._current = dart.as(null, E);
}
- get current() { return this._current; }
+ get current() {
+ return this._current;
+ }
moveNext() {
let elements = this._elements;
let offset = this._offset;
- if (dart.dinvokef(/* Unimplemented unknown name */JS, 'bool', '# !== #', elements, dart.dload(this._set, "_elements"))) {
+ if (dart.dinvokef(/* Unimplemented unknown name */JS, 'bool', '# !== #', elements, dart.dload(this._set, '_elements'))) {
throw new core.ConcurrentModificationError(this._set);
} else if (offset['>='](dart.dinvokef(/* Unimplemented unknown name */JS, 'int', '#.length', elements))) {
this._current = dart.as(null, E);
@@ -1023,7 +1115,6 @@ var collection;
return HashSetIterator;
});
let HashSetIterator = HashSetIterator$(dynamic);
-
let _LinkedHashSet$ = dart.generic(function(E) {
class _LinkedHashSet extends _HashSetBase$(E) {
_LinkedHashSet() {
@@ -1036,25 +1127,35 @@ var collection;
this._modifications = 0;
super._HashSetBase();
}
- _newSet() { return new _LinkedHashSet(); }
+ _newSet() {
+ return new _LinkedHashSet();
+ }
_unsupported(operation) {
throw `LinkedHashSet: unsupported ${operation}`;
}
get iterator() {
return dart.as(new LinkedHashSetIterator(this, this._modifications), core.Iterator$(E));
}
- get length() { return this._length; }
- get isEmpty() { return this._length === 0; }
- get isNotEmpty() { return !dart.notNull(this.isEmpty); }
+ get length() {
+ return this._length;
+ }
+ get isEmpty() {
+ return this._length === 0;
+ }
+ get isNotEmpty() {
+ return !dart.notNull(this.isEmpty);
+ }
contains(object) {
if (_isStringElement(object)) {
let strings = this._strings;
- if (strings === null) return false;
+ if (strings === null)
+ return false;
let cell = dart.as(_getTableEntry(strings, object), LinkedHashSetCell);
return cell !== null;
} else if (_isNumericElement(object)) {
let nums = this._nums;
- if (nums === null) return false;
+ if (nums === null)
+ return false;
let cell = dart.as(_getTableEntry(nums, object), LinkedHashSetCell);
return cell !== null;
} else {
@@ -1063,7 +1164,8 @@ var collection;
}
_contains(object) {
let rest = this._rest;
- if (rest === null) return false;
+ if (rest === null)
+ return false;
let bucket = this._getBucket(rest, object);
return this._findBucketIndex(bucket, object) >= 0;
}
@@ -1076,11 +1178,13 @@ var collection;
}
_lookup(object) {
let rest = this._rest;
- if (rest === null) return dart.as(null, E);
+ if (rest === null)
+ return dart.as(null, E);
let bucket = this._getBucket(rest, object);
let index = this._findBucketIndex(bucket, object);
- if (index < 0) return dart.as(null, E);
- return dart.as(dart.dload(bucket.get(index), "_element"), E);
+ if (index < 0)
+ return dart.as(null, E);
+ return dart.as(dart.dload(bucket.get(index), '_element'), E);
}
forEach(action) {
let cell = this._first;
@@ -1094,21 +1198,25 @@ var collection;
}
}
get first() {
- if (this._first === null) throw new core.StateError("No elements");
+ if (this._first === null)
+ throw new core.StateError("No elements");
return dart.as(this._first._element, E);
}
get last() {
- if (this._last === null) throw new core.StateError("No elements");
+ if (this._last === null)
+ throw new core.StateError("No elements");
return dart.as(this._last._element, E);
}
add(element) {
if (_isStringElement(element)) {
let strings = this._strings;
- if (strings === null) this._strings = strings = _newHashTable();
+ if (strings === null)
+ this._strings = strings = _newHashTable();
return this._addHashTableEntry(strings, element);
} else if (_isNumericElement(element)) {
let nums = this._nums;
- if (nums === null) this._nums = nums = _newHashTable();
+ if (nums === null)
+ this._nums = nums = _newHashTable();
return this._addHashTableEntry(nums, element);
} else {
return this._add(element);
@@ -1116,7 +1224,8 @@ var collection;
}
_add(element) {
let rest = this._rest;
- if (rest === null) this._rest = rest = _newHashTable();
+ if (rest === null)
+ this._rest = rest = _newHashTable();
let hash = this._computeHashCode(element);
let bucket = dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#[#]', rest, hash);
if (bucket === null) {
@@ -1124,7 +1233,8 @@ var collection;
_setTableEntry(rest, hash, dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '[#]', cell));
} else {
let index = this._findBucketIndex(bucket, element);
- if (index >= 0) return false;
+ if (index >= 0)
+ return false;
let cell = this._newLinkedCell(element);
dart.dinvokef(/* Unimplemented unknown name */JS, 'void', '#.push(#)', bucket, cell);
}
@@ -1141,10 +1251,12 @@ var collection;
}
_remove(object) {
let rest = this._rest;
- if (rest === null) return false;
+ if (rest === null)
+ return false;
let bucket = this._getBucket(rest, object);
let index = this._findBucketIndex(bucket, object);
- if (index < 0) return false;
+ if (index < 0)
+ return false;
let cell = dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#.splice(#, 1)[0]', bucket, index), LinkedHashSetCell);
this._unlinkCell(cell);
return true;
@@ -1161,11 +1273,12 @@ var collection;
let element = dart.as(cell._element, E);
let next = cell._next;
let modifications = this._modifications;
- let shouldRemove = (removeMatching === test(element));
+ let shouldRemove = removeMatching === test(element);
if (modifications !== this._modifications) {
throw new core.ConcurrentModificationError(this);
}
- if (shouldRemove) this.remove(element);
+ if (shouldRemove)
+ this.remove(element);
cell = next;
}
}
@@ -1178,20 +1291,23 @@ var collection;
}
_addHashTableEntry(table, element) {
let cell = dart.as(_getTableEntry(table, element), LinkedHashSetCell);
- if (cell !== null) return false;
+ if (cell !== null)
+ return false;
_setTableEntry(table, element, this._newLinkedCell(element));
return true;
}
_removeHashTableEntry(table, element) {
- if (table === null) return false;
+ if (table === null)
+ return false;
let cell = dart.as(_getTableEntry(table, element), LinkedHashSetCell);
- if (cell === null) return false;
+ if (cell === null)
+ return false;
this._unlinkCell(cell);
_deleteTableEntry(table, element);
return true;
}
_modified() {
- this._modifications = (this._modifications + 1) & 67108863;
+ this._modifications = this._modifications + 1 & 67108863;
}
_newLinkedCell(element) {
let cell = new LinkedHashSetCell(element);
@@ -1225,13 +1341,13 @@ var collection;
this._modified();
}
static _isStringElement(element) {
- return dart.notNull(typeof element == "string") && dart.notNull(!dart.equals(element, '__proto__'));
+ return dart.notNull(typeof element == string) && dart.notNull(!dart.equals(element, '__proto__'));
}
static _isNumericElement(element) {
- return core.bool.&&(dart.is(element, core.num), dart.dinvokef(/* Unimplemented unknown name */JS, 'bool', '(# & 0x3ffffff) === #', element, element));
+ return core.bool['&&'](dart.is(element, core.num), dart.dinvokef(/* Unimplemented unknown name */JS, 'bool', '(# & 0x3ffffff) === #', element, element));
}
_computeHashCode(element) {
- return dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'int', '# & 0x3ffffff', dart.dload(element, "hashCode")), core.int);
+ return dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'int', '# & 0x3ffffff', dart.dload(element, 'hashCode')), core.int);
}
static _getTableEntry(table, key) {
return dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#[#]', table, key);
@@ -1248,11 +1364,13 @@ var collection;
return dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#[#]', table, hash), core.List);
}
_findBucketIndex(bucket, element) {
- if (bucket === null) return -1;
+ if (bucket === null)
+ return -1;
let length = dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'int', '#.length', bucket), core.int);
for (let i = 0; i < length; i++) {
let cell = dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#[#]', bucket, i), LinkedHashSetCell);
- if (dart.equals(cell._element, element)) return i;
+ if (dart.equals(cell._element, element))
+ return i;
}
return -1;
}
@@ -1267,19 +1385,22 @@ var collection;
return _LinkedHashSet;
});
let _LinkedHashSet = _LinkedHashSet$(dynamic);
-
let _LinkedIdentityHashSet$ = dart.generic(function(E) {
class _LinkedIdentityHashSet extends _LinkedHashSet$(E) {
- _newSet() { return new _LinkedIdentityHashSet(); }
+ _newSet() {
+ return new _LinkedIdentityHashSet();
+ }
_computeHashCode(key) {
return dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'int', '# & 0x3ffffff', core.identityHashCode(key)), core.int);
}
_findBucketIndex(bucket, element) {
- if (bucket === null) return -1;
+ if (bucket === null)
+ return -1;
let length = dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'int', '#.length', bucket), core.int);
for (let i = 0; i < length; i++) {
let cell = dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#[#]', bucket, i), LinkedHashSetCell);
- if (core.identical(cell._element, element)) return i;
+ if (core.identical(cell._element, element))
+ return i;
}
return -1;
}
@@ -1287,44 +1408,53 @@ var collection;
return _LinkedIdentityHashSet;
});
let _LinkedIdentityHashSet = _LinkedIdentityHashSet$(dynamic);
-
let _LinkedCustomHashSet$ = dart.generic(function(E) {
class _LinkedCustomHashSet extends _LinkedHashSet$(E) {
_LinkedCustomHashSet(_equality, _hasher, validKey) {
this._equality = _equality;
this._hasher = _hasher;
- this._validKey = (validKey !== null) ? validKey : ((x) => dart.is(x, E));
+ this._validKey = validKey !== null ? validKey : (x) => dart.is(x, E);
super._LinkedHashSet();
}
- _newSet() { return new _LinkedCustomHashSet(this._equality, this._hasher, this._validKey); }
+ _newSet() {
+ return new _LinkedCustomHashSet(this._equality, this._hasher, this._validKey);
+ }
_findBucketIndex(bucket, element) {
- if (bucket === null) return -1;
+ if (bucket === null)
+ return -1;
let length = dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'int', '#.length', bucket), core.int);
for (let i = 0; i < length; i++) {
let cell = dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'var', '#[#]', bucket, i), LinkedHashSetCell);
- if (this._equality(dart.as(cell._element, E), dart.as(element, E))) return i;
+ if (this._equality(dart.as(cell._element, E), dart.as(element, E)))
+ return i;
}
return -1;
}
_computeHashCode(element) {
return dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, 'int', '# & 0x3ffffff', this._hasher(dart.as(element, E))), core.int);
}
- add(element) { return super._add(element); }
+ add(element) {
+ return super._add(element);
+ }
contains(object) {
- if (!dart.notNull(this._validKey(object))) return false;
+ if (!dart.notNull(this._validKey(object)))
+ return false;
return super._contains(object);
}
lookup(object) {
- if (!dart.notNull(this._validKey(object))) return dart.as(null, E);
+ if (!dart.notNull(this._validKey(object)))
+ return dart.as(null, E);
return super._lookup(object);
}
remove(object) {
- if (!dart.notNull(this._validKey(object))) return false;
+ if (!dart.notNull(this._validKey(object)))
+ return false;
return super._remove(object);
}
containsAll(elements) {
for (let element of elements) {
- if (dart.notNull(!dart.notNull(this._validKey(element))) || dart.notNull(!dart.notNull(this.contains(element)))) return false;
+ if (dart.notNull(!dart.notNull(this._validKey(element))) || dart.notNull(!dart.notNull(this.contains(element))))
+ return false;
}
return true;
}
@@ -1339,7 +1469,6 @@ var collection;
return _LinkedCustomHashSet;
});
let _LinkedCustomHashSet = _LinkedCustomHashSet$(dynamic);
-
class LinkedHashSetCell extends dart.Object {
LinkedHashSetCell(_element) {
this._element = _element;
@@ -1347,7 +1476,6 @@ var collection;
this._previous = null;
}
}
-
let LinkedHashSetIterator$ = dart.generic(function(E) {
class LinkedHashSetIterator extends dart.Object {
LinkedHashSetIterator(_set, _modifications) {
@@ -1355,11 +1483,13 @@ var collection;
this._modifications = _modifications;
this._cell = null;
this._current = dart.as(null, E);
- this._cell = dart.as(dart.dload(this._set, "_first"), LinkedHashSetCell);
+ this._cell = dart.as(dart.dload(this._set, '_first'), LinkedHashSetCell);
+ }
+ get current() {
+ return this._current;
}
- get current() { return this._current; }
moveNext() {
- if (this._modifications !== dart.dload(this._set, "_modifications")) {
+ if (this._modifications !== dart.dload(this._set, '_modifications')) {
throw new core.ConcurrentModificationError(this._set);
} else if (this._cell === null) {
this._current = dart.as(null, E);
@@ -1374,32 +1504,36 @@ var collection;
return LinkedHashSetIterator;
});
let LinkedHashSetIterator = LinkedHashSetIterator$(dynamic);
-
let UnmodifiableListView$ = dart.generic(function(E) {
class UnmodifiableListView extends _internal.UnmodifiableListBase$(E) {
UnmodifiableListView(source) {
this._source = source;
super.UnmodifiableListBase();
}
- get length() { return this._source.length; }
- get(index) { return this._source.elementAt(index); }
+ get length() {
+ return this._source.length;
+ }
+ get(index) {
+ return this._source.elementAt(index);
+ }
}
return UnmodifiableListView;
});
let UnmodifiableListView = UnmodifiableListView$(dynamic);
-
// Function _defaultEquals: (dynamic, dynamic) → bool
- function _defaultEquals(a, b) { return dart.equals(a, b); }
-
+ function _defaultEquals(a, b) {
+ return dart.equals(a, b);
+ }
// Function _defaultHashCode: (dynamic) → int
- function _defaultHashCode(a) { return dart.as(dart.dload(a, "hashCode"), core.int); }
-
+ function _defaultHashCode(a) {
+ return dart.as(dart.dload(a, 'hashCode'), core.int);
+ }
let HashMap$ = dart.generic(function(K, V) {
class HashMap extends dart.Object {
HashMap(opt$) {
- let equals = opt$.equals === undefined ? null : opt$.equals;
- let hashCode = opt$.hashCode === undefined ? null : opt$.hashCode;
- let isValidKey = opt$.isValidKey === undefined ? null : opt$.isValidKey;
+ let equals = opt$.equals === void 0 ? null : opt$.equals;
+ let hashCode = opt$.hashCode === void 0 ? null : opt$.hashCode;
+ let isValidKey = opt$.isValidKey === void 0 ? null : opt$.isValidKey;
if (isValidKey === null) {
if (hashCode === null) {
if (equals === null) {
@@ -1435,8 +1569,8 @@ var collection;
return result;
}
HashMap$fromIterable(iterable, opt$) {
- let key = opt$.key === undefined ? null : opt$.key;
- let value = opt$.value === undefined ? null : opt$.value;
+ let key = opt$.key === void 0 ? null : opt$.key;
+ let value = opt$.value === void 0 ? null : opt$.value;
let map = new HashMap();
Maps._fillMapWithMappedIterable(map, iterable, key, value);
return map;
@@ -1447,45 +1581,47 @@ var collection;
return map;
}
}
- dart.defineNamedConstructor(HashMap, "identity");
- dart.defineNamedConstructor(HashMap, "from");
- dart.defineNamedConstructor(HashMap, "fromIterable");
- dart.defineNamedConstructor(HashMap, "fromIterables");
+ dart.defineNamedConstructor(HashMap, 'identity');
+ dart.defineNamedConstructor(HashMap, 'from');
+ dart.defineNamedConstructor(HashMap, 'fromIterable');
+ dart.defineNamedConstructor(HashMap, 'fromIterables');
return HashMap;
});
let HashMap = HashMap$(dynamic, dynamic);
-
let _HashSetBase$ = dart.generic(function(E) {
class _HashSetBase extends SetBase$(E) {
difference(other) {
let result = this._newSet();
for (let element of this) {
- if (!dart.notNull(other.contains(element))) result.add(dart.as(element, E));
+ if (!dart.notNull(other.contains(element)))
+ result.add(dart.as(element, E));
}
return result;
}
intersection(other) {
let result = this._newSet();
for (let element of this) {
- if (other.contains(element)) result.add(dart.as(element, E));
+ if (other.contains(element))
+ result.add(dart.as(element, E));
}
return result;
}
- toSet() { return ((_) => {
- _.addAll(this);
- return _;
- }).bind(this)(this._newSet()); }
+ toSet() {
+ return ((_) => {
+ _.addAll(this);
+ return _;
+ }).bind(this)(this._newSet());
+ }
}
return _HashSetBase;
});
let _HashSetBase = _HashSetBase$(dynamic);
-
let HashSet$ = dart.generic(function(E) {
class HashSet extends dart.Object {
HashSet(opt$) {
- let equals = opt$.equals === undefined ? null : opt$.equals;
- let hashCode = opt$.hashCode === undefined ? null : opt$.hashCode;
- let isValidKey = opt$.isValidKey === undefined ? null : opt$.isValidKey;
+ let equals = opt$.equals === void 0 ? null : opt$.equals;
+ let hashCode = opt$.hashCode === void 0 ? null : opt$.hashCode;
+ let isValidKey = opt$.isValidKey === void 0 ? null : opt$.isValidKey;
if (isValidKey === null) {
if (hashCode === null) {
if (equals === null) {
@@ -1515,29 +1651,37 @@ var collection;
}
HashSet$from(elements) {
let result = new HashSet();
- for (let e of elements) result.add(e);
+ for (let e of elements)
+ result.add(e);
return result;
}
}
- dart.defineNamedConstructor(HashSet, "identity");
- dart.defineNamedConstructor(HashSet, "from");
+ dart.defineNamedConstructor(HashSet, 'identity');
+ dart.defineNamedConstructor(HashSet, 'from');
return HashSet;
});
let HashSet = HashSet$(dynamic);
-
let IterableMixin$ = dart.generic(function(E) {
class IterableMixin extends dart.Object {
- map(f) { return new _internal.MappedIterable(this, f); }
- where(f) { return new _internal.WhereIterable(this, f); }
- expand(f) { return new _internal.ExpandIterable(this, f); }
+ map(f) {
+ return new _internal.MappedIterable(this, f);
+ }
+ where(f) {
+ return new _internal.WhereIterable(this, f);
+ }
+ expand(f) {
+ return new _internal.ExpandIterable(this, f);
+ }
contains(element) {
for (let e of this) {
- if (dart.equals(e, element)) return true;
+ if (dart.equals(e, element))
+ return true;
}
return false;
}
forEach(f) {
- for (let element of this) f(element);
+ for (let element of this)
+ f(element);
}
reduce(combine) {
let iterator = this.iterator;
@@ -1552,25 +1696,28 @@ var collection;
}
fold(initialValue, combine) {
let value = initialValue;
- for (let element of this) value = combine(value, element);
+ for (let element of this)
+ value = combine(value, element);
return value;
}
every(f) {
for (let element of this) {
- if (!dart.notNull(f(element))) return false;
+ if (!dart.notNull(f(element)))
+ return false;
}
return true;
}
join(separator) {
- if (separator === undefined) separator = "";
+ if (separator === void 0)
+ separator = "";
let iterator = this.iterator;
- if (!dart.notNull(iterator.moveNext())) return "";
+ if (!dart.notNull(iterator.moveNext()))
+ return "";
let buffer = new core.StringBuffer();
if (dart.notNull(separator === null) || dart.notNull(dart.equals(separator, ""))) {
do {
buffer.write(`${iterator.current}`);
- }
- while (iterator.moveNext());
+ } while (iterator.moveNext());
} else {
buffer.write(`${iterator.current}`);
while (iterator.moveNext()) {
@@ -1582,15 +1729,18 @@ var collection;
}
any(f) {
for (let element of this) {
- if (f(element)) return true;
+ if (f(element))
+ return true;
}
return false;
}
toList(opt$) {
- let growable = opt$.growable === undefined ? true : opt$.growable;
- return new core.List.from(this, {growable: growable})
+ let growable = opt$.growable === void 0 ? true : opt$.growable;
+ return new core.List.from(this, {growable: growable});
+ }
+ toSet() {
+ return new core.Set.from(this);
}
- toSet() { return new core.Set.from(this); }
get length() {
dart.assert(!dart.is(this, _internal.EfficientLength));
let count = 0;
@@ -1600,8 +1750,12 @@ var collection;
}
return count;
}
- get isEmpty() { return !dart.notNull(this.iterator.moveNext()); }
- get isNotEmpty() { return !dart.notNull(this.isEmpty); }
+ get isEmpty() {
+ return !dart.notNull(this.iterator.moveNext());
+ }
+ get isNotEmpty() {
+ return !dart.notNull(this.isEmpty);
+ }
take(n) {
return new _internal.TakeIterable(this, n);
}
@@ -1629,27 +1783,30 @@ var collection;
let result = null;
do {
result = dart.as(it.current, E);
- }
- while (it.moveNext());
+ } while (it.moveNext());
return result;
}
get single() {
let it = this.iterator;
- if (!dart.notNull(it.moveNext())) throw _internal.IterableElementError.noElement();
+ if (!dart.notNull(it.moveNext()))
+ throw _internal.IterableElementError.noElement();
let result = dart.as(it.current, E);
- if (it.moveNext()) throw _internal.IterableElementError.tooMany();
+ if (it.moveNext())
+ throw _internal.IterableElementError.tooMany();
return result;
}
firstWhere(test, opt$) {
- let orElse = opt$.orElse === undefined ? null : opt$.orElse;
+ let orElse = opt$.orElse === void 0 ? null : opt$.orElse;
for (let element of this) {
- if (test(element)) return element;
+ if (test(element))
+ return element;
}
- if (orElse !== null) return orElse();
+ if (orElse !== null)
+ return orElse();
throw _internal.IterableElementError.noElement();
}
lastWhere(test, opt$) {
- let orElse = opt$.orElse === undefined ? null : opt$.orElse;
+ let orElse = opt$.orElse === void 0 ? null : opt$.orElse;
let result = dart.as(null, E);
let foundMatching = false;
for (let element of this) {
@@ -1658,8 +1815,10 @@ var collection;
foundMatching = true;
}
}
- if (foundMatching) return result;
- if (orElse !== null) return orElse();
+ if (foundMatching)
+ return result;
+ if (orElse !== null)
+ return orElse();
throw _internal.IterableElementError.noElement();
}
singleWhere(test) {
@@ -1674,40 +1833,52 @@ var collection;
foundMatching = true;
}
}
- if (foundMatching) return result;
+ if (foundMatching)
+ return result;
throw _internal.IterableElementError.noElement();
}
elementAt(index) {
- if (!(typeof index == "number")) throw new core.ArgumentError.notNull("index");
+ if (!(typeof index == number))
+ throw new core.ArgumentError.notNull("index");
core.RangeError.checkNotNegative(index, "index");
let elementIndex = 0;
for (let element of this) {
- if (index === elementIndex) return element;
+ if (index === elementIndex)
+ return element;
elementIndex++;
}
throw new core.RangeError.index(index, this, "index", null, elementIndex);
}
- toString() { return IterableBase.iterableToShortString(this, '(', ')'); }
+ toString() {
+ return IterableBase.iterableToShortString(this, '(', ')');
+ }
}
return IterableMixin;
});
let IterableMixin = IterableMixin$(dynamic);
-
let IterableBase$ = dart.generic(function(E) {
class IterableBase extends dart.Object {
IterableBase() {
}
- map(f) { return new _internal.MappedIterable(this, f); }
- where(f) { return new _internal.WhereIterable(this, f); }
- expand(f) { return new _internal.ExpandIterable(this, f); }
+ map(f) {
+ return new _internal.MappedIterable(this, f);
+ }
+ where(f) {
+ return new _internal.WhereIterable(this, f);
+ }
+ expand(f) {
+ return new _internal.ExpandIterable(this, f);
+ }
contains(element) {
for (let e of this) {
- if (dart.equals(e, element)) return true;
+ if (dart.equals(e, element))
+ return true;
}
return false;
}
forEach(f) {
- for (let element of this) f(element);
+ for (let element of this)
+ f(element);
}
reduce(combine) {
let iterator = this.iterator;
@@ -1722,25 +1893,28 @@ var collection;
}
fold(initialValue, combine) {
let value = initialValue;
- for (let element of this) value = combine(value, element);
+ for (let element of this)
+ value = combine(value, element);
return value;
}
every(f) {
for (let element of this) {
- if (!dart.notNull(f(element))) return false;
+ if (!dart.notNull(f(element)))
+ return false;
}
return true;
}
join(separator) {
- if (separator === undefined) separator = "";
+ if (separator === void 0)
+ separator = "";
let iterator = this.iterator;
- if (!dart.notNull(iterator.moveNext())) return "";
+ if (!dart.notNull(iterator.moveNext()))
+ return "";
let buffer = new core.StringBuffer();
if (dart.notNull(separator === null) || dart.notNull(dart.equals(separator, ""))) {
do {
buffer.write(`${iterator.current}`);
- }
- while (iterator.moveNext());
+ } while (iterator.moveNext());
} else {
buffer.write(`${iterator.current}`);
while (iterator.moveNext()) {
@@ -1752,15 +1926,18 @@ var collection;
}
any(f) {
for (let element of this) {
- if (f(element)) return true;
+ if (f(element))
+ return true;
}
return false;
}
toList(opt$) {
- let growable = opt$.growable === undefined ? true : opt$.growable;
- return new core.List.from(this, {growable: growable})
+ let growable = opt$.growable === void 0 ? true : opt$.growable;
+ return new core.List.from(this, {growable: growable});
+ }
+ toSet() {
+ return new core.Set.from(this);
}
- toSet() { return new core.Set.from(this); }
get length() {
dart.assert(!dart.is(this, _internal.EfficientLength));
let count = 0;
@@ -1770,8 +1947,12 @@ var collection;
}
return count;
}
- get isEmpty() { return !dart.notNull(this.iterator.moveNext()); }
- get isNotEmpty() { return !dart.notNull(this.isEmpty); }
+ get isEmpty() {
+ return !dart.notNull(this.iterator.moveNext());
+ }
+ get isNotEmpty() {
+ return !dart.notNull(this.isEmpty);
+ }
take(n) {
return new _internal.TakeIterable(this, n);
}
@@ -1799,27 +1980,30 @@ var collection;
let result = null;
do {
result = dart.as(it.current, E);
- }
- while (it.moveNext());
+ } while (it.moveNext());
return result;
}
get single() {
let it = this.iterator;
- if (!dart.notNull(it.moveNext())) throw _internal.IterableElementError.noElement();
+ if (!dart.notNull(it.moveNext()))
+ throw _internal.IterableElementError.noElement();
let result = dart.as(it.current, E);
- if (it.moveNext()) throw _internal.IterableElementError.tooMany();
+ if (it.moveNext())
+ throw _internal.IterableElementError.tooMany();
return result;
}
firstWhere(test, opt$) {
- let orElse = opt$.orElse === undefined ? null : opt$.orElse;
+ let orElse = opt$.orElse === void 0 ? null : opt$.orElse;
for (let element of this) {
- if (test(element)) return element;
+ if (test(element))
+ return element;
}
- if (orElse !== null) return orElse();
+ if (orElse !== null)
+ return orElse();
throw _internal.IterableElementError.noElement();
}
lastWhere(test, opt$) {
- let orElse = opt$.orElse === undefined ? null : opt$.orElse;
+ let orElse = opt$.orElse === void 0 ? null : opt$.orElse;
let result = dart.as(null, E);
let foundMatching = false;
for (let element of this) {
@@ -1828,8 +2012,10 @@ var collection;
foundMatching = true;
}
}
- if (foundMatching) return result;
- if (orElse !== null) return orElse();
+ if (foundMatching)
+ return result;
+ if (orElse !== null)
+ return orElse();
throw _internal.IterableElementError.noElement();
}
singleWhere(test) {
@@ -1844,23 +2030,30 @@ var collection;
foundMatching = true;
}
}
- if (foundMatching) return result;
+ if (foundMatching)
+ return result;
throw _internal.IterableElementError.noElement();
}
elementAt(index) {
- if (!(typeof index == "number")) throw new core.ArgumentError.notNull("index");
+ if (!(typeof index == number))
+ throw new core.ArgumentError.notNull("index");
core.RangeError.checkNotNegative(index, "index");
let elementIndex = 0;
for (let element of this) {
- if (index === elementIndex) return element;
+ if (index === elementIndex)
+ return element;
elementIndex++;
}
throw new core.RangeError.index(index, this, "index", null, elementIndex);
}
- toString() { return iterableToShortString(this, '(', ')'); }
+ toString() {
+ return iterableToShortString(this, '(', ')');
+ }
static iterableToShortString(iterable, leftDelimiter, rightDelimiter) {
- if (leftDelimiter === undefined) leftDelimiter = '(';
- if (rightDelimiter === undefined) rightDelimiter = ')';
+ if (leftDelimiter === void 0)
+ leftDelimiter = '(';
+ if (rightDelimiter === void 0)
+ rightDelimiter = ')';
if (_isToStringVisiting(iterable)) {
if (dart.notNull(dart.equals(leftDelimiter, "(")) && dart.notNull(dart.equals(rightDelimiter, ")"))) {
return "(...)";
@@ -1871,20 +2064,21 @@ var collection;
_toStringVisiting.add(iterable);
try {
_iterablePartsToStrings(iterable, parts);
- }
- finally {
+ } finally {
dart.assert(core.identical(_toStringVisiting.last, iterable));
_toStringVisiting.removeLast();
}
- return (((_) => {
+ return ((_) => {
_.writeAll(parts, ", ");
_.write(rightDelimiter);
return _;
- }).bind(this)(new core.StringBuffer(leftDelimiter))).toString();
+ }).bind(this)(new core.StringBuffer(leftDelimiter)).toString();
}
static iterableToFullString(iterable, leftDelimiter, rightDelimiter) {
- if (leftDelimiter === undefined) leftDelimiter = '(';
- if (rightDelimiter === undefined) rightDelimiter = ')';
+ if (leftDelimiter === void 0)
+ leftDelimiter = '(';
+ if (rightDelimiter === void 0)
+ rightDelimiter = ')';
if (_isToStringVisiting(iterable)) {
return `${leftDelimiter}...${rightDelimiter}`;
}
@@ -1892,8 +2086,7 @@ var collection;
_toStringVisiting.add(iterable);
try {
buffer.writeAll(iterable, ", ");
- }
- finally {
+ } finally {
dart.assert(core.identical(_toStringVisiting.last, iterable));
_toStringVisiting.removeLast();
}
@@ -1902,7 +2095,8 @@ var collection;
}
static _isToStringVisiting(o) {
for (let i = 0; i < _toStringVisiting.length; i++) {
- if (core.identical(o, _toStringVisiting.get(i))) return true;
+ if (core.identical(o, _toStringVisiting.get(i)))
+ return true;
}
return false;
}
@@ -1917,7 +2111,8 @@ var collection;
let count = 0;
let it = iterable.iterator;
while (dart.notNull(length < LENGTH_LIMIT) || dart.notNull(count < HEAD_COUNT)) {
- if (!dart.notNull(it.moveNext())) return;
+ if (!dart.notNull(it.moveNext()))
+ return;
let next = `${it.current}`;
parts.add(next);
length = next.length + OVERHEAD;
@@ -1928,7 +2123,8 @@ var collection;
let penultimate = null;
let ultimate = null;
if (!dart.notNull(it.moveNext())) {
- if (count <= HEAD_COUNT + TAIL_COUNT) return;
+ if (count <= HEAD_COUNT + TAIL_COUNT)
+ return;
ultimateString = dart.as(parts.removeLast(), core.String);
penultimateString = dart.as(parts.removeLast(), core.String);
} else {
@@ -1952,7 +2148,7 @@ var collection;
count++;
if (count > MAX_COUNT) {
while (dart.notNull(length > LENGTH_LIMIT - ELLIPSIS_SIZE - OVERHEAD) && dart.notNull(count > HEAD_COUNT)) {
- length = dart.as(dart.dbinary(dart.dload(parts.removeLast(), "length"), "+", OVERHEAD), core.int);
+ length = dart.as(dart.dbinary(dart.dload(parts.removeLast(), 'length'), '+', OVERHEAD), core.int);
count--;
}
parts.add("...");
@@ -1970,7 +2166,7 @@ var collection;
length = ELLIPSIS_SIZE + OVERHEAD;
}
while (dart.notNull(length > LENGTH_LIMIT) && dart.notNull(parts.length > HEAD_COUNT)) {
- length = dart.as(dart.dbinary(dart.dload(parts.removeLast(), "length"), "+", OVERHEAD), core.int);
+ length = dart.as(dart.dbinary(dart.dload(parts.removeLast(), 'length'), '+', OVERHEAD), core.int);
if (elision === null) {
elision = "...";
length = ELLIPSIS_SIZE + OVERHEAD;
@@ -1984,12 +2180,13 @@ var collection;
}
}
dart.defineLazyProperties(IterableBase, {
- get _toStringVisiting() { return new List.from([]) },
+ get _toStringVisiting() {
+ return new List.from([]);
+ }
});
return IterableBase;
});
let IterableBase = IterableBase$(dynamic);
-
let HasNextIterator$ = dart.generic(function(E) {
class HasNextIterator extends dart.Object {
HasNextIterator(_iterator) {
@@ -1997,11 +2194,13 @@ var collection;
this._state = _NOT_MOVED_YET;
}
get hasNext() {
- if (this._state === _NOT_MOVED_YET) this._move();
+ if (this._state === _NOT_MOVED_YET)
+ this._move();
return this._state === _HAS_NEXT_AND_NEXT_IN_CURRENT;
}
next() {
- if (!dart.notNull(this.hasNext)) throw new core.StateError("No more elements");
+ if (!dart.notNull(this.hasNext))
+ throw new core.StateError("No more elements");
dart.assert(this._state === _HAS_NEXT_AND_NEXT_IN_CURRENT);
let result = dart.as(this._iterator.current, E);
this._move();
@@ -2021,13 +2220,12 @@ var collection;
return HasNextIterator;
});
let HasNextIterator = HasNextIterator$(dynamic);
-
let LinkedHashMap$ = dart.generic(function(K, V) {
class LinkedHashMap extends dart.Object {
LinkedHashMap(opt$) {
- let equals = opt$.equals === undefined ? null : opt$.equals;
- let hashCode = opt$.hashCode === undefined ? null : opt$.hashCode;
- let isValidKey = opt$.isValidKey === undefined ? null : opt$.isValidKey;
+ let equals = opt$.equals === void 0 ? null : opt$.equals;
+ let hashCode = opt$.hashCode === void 0 ? null : opt$.hashCode;
+ let isValidKey = opt$.isValidKey === void 0 ? null : opt$.isValidKey;
if (isValidKey === null) {
if (hashCode === null) {
if (equals === null) {
@@ -2063,8 +2261,8 @@ var collection;
return result;
}
LinkedHashMap$fromIterable(iterable, opt$) {
- let key = opt$.key === undefined ? null : opt$.key;
- let value = opt$.value === undefined ? null : opt$.value;
+ let key = opt$.key === void 0 ? null : opt$.key;
+ let value = opt$.value === void 0 ? null : opt$.value;
let map = new LinkedHashMap();
Maps._fillMapWithMappedIterable(map, iterable, key, value);
return map;
@@ -2075,20 +2273,19 @@ var collection;
return map;
}
}
- dart.defineNamedConstructor(LinkedHashMap, "identity");
- dart.defineNamedConstructor(LinkedHashMap, "from");
- dart.defineNamedConstructor(LinkedHashMap, "fromIterable");
- dart.defineNamedConstructor(LinkedHashMap, "fromIterables");
+ dart.defineNamedConstructor(LinkedHashMap, 'identity');
+ dart.defineNamedConstructor(LinkedHashMap, 'from');
+ dart.defineNamedConstructor(LinkedHashMap, 'fromIterable');
+ dart.defineNamedConstructor(LinkedHashMap, 'fromIterables');
return LinkedHashMap;
});
let LinkedHashMap = LinkedHashMap$(dynamic, dynamic);
-
let LinkedHashSet$ = dart.generic(function(E) {
class LinkedHashSet extends dart.Object {
LinkedHashSet(opt$) {
- let equals = opt$.equals === undefined ? null : opt$.equals;
- let hashCode = opt$.hashCode === undefined ? null : opt$.hashCode;
- let isValidKey = opt$.isValidKey === undefined ? null : opt$.isValidKey;
+ let equals = opt$.equals === void 0 ? null : opt$.equals;
+ let hashCode = opt$.hashCode === void 0 ? null : opt$.hashCode;
+ let isValidKey = opt$.isValidKey === void 0 ? null : opt$.isValidKey;
if (isValidKey === null) {
if (hashCode === null) {
if (equals === null) {
@@ -2124,12 +2321,11 @@ var collection;
return result;
}
}
- dart.defineNamedConstructor(LinkedHashSet, "identity");
- dart.defineNamedConstructor(LinkedHashSet, "from");
+ dart.defineNamedConstructor(LinkedHashSet, 'identity');
+ dart.defineNamedConstructor(LinkedHashSet, 'from');
return LinkedHashSet;
});
let LinkedHashSet = LinkedHashSet$(dynamic);
-
let LinkedList$ = dart.generic(function(E) {
class LinkedList extends IterableBase$(E) {
LinkedList() {
@@ -2150,12 +2346,17 @@ var collection;
entries.forEach(((entry) => this._insertAfter(this._previous, dart.as(entry, E))).bind(this));
}
remove(entry) {
- if (!dart.equals(entry._list, this)) return false;
+ if (!dart.equals(entry._list, this))
+ return false;
this._unlink(entry);
return true;
}
- get iterator() { return new _LinkedListIterator(this); }
- get length() { return this._length; }
+ get iterator() {
+ return new _LinkedListIterator(this);
+ }
+ get length() {
+ return this._length;
+ }
clear() {
this._modificationCount++;
let next = this._next;
@@ -2199,7 +2400,9 @@ var collection;
current = current._next;
}
}
- get isEmpty() { return this._length === 0; }
+ get isEmpty() {
+ return this._length === 0;
+ }
_insertAfter(entry, newEntry) {
if (newEntry.list !== null) {
throw new core.StateError('LinkedListEntry is already in a LinkedList');
@@ -2225,7 +2428,6 @@ var collection;
return LinkedList;
});
let LinkedList = LinkedList$(dynamic);
-
let _LinkedListIterator$ = dart.generic(function(E) {
class _LinkedListIterator extends dart.Object {
_LinkedListIterator(list) {
@@ -2234,7 +2436,9 @@ var collection;
this._next = list._next;
this._current = null;
}
- get current() { return this._current; }
+ get current() {
+ return this._current;
+ }
moveNext() {
if (core.identical(this._next, this._list)) {
this._current = null;
@@ -2251,14 +2455,12 @@ var collection;
return _LinkedListIterator;
});
let _LinkedListIterator = _LinkedListIterator$(dynamic);
-
class _LinkedListLink extends dart.Object {
_LinkedListLink() {
this._next = null;
this._previous = null;
}
}
-
let LinkedListEntry$ = dart.generic(function(E) {
class LinkedListEntry extends dart.Object {
LinkedListEntry() {
@@ -2266,17 +2468,21 @@ var collection;
this._next = null;
this._previous = null;
}
- get list() { return this._list; }
+ get list() {
+ return this._list;
+ }
unlink() {
this._list._unlink(this);
}
get next() {
- if (core.identical(this._next, this._list)) return null;
+ if (core.identical(this._next, this._list))
+ return null;
let result = dart.as(this._next, E);
return result;
}
get previous() {
- if (core.identical(this._previous, this._list)) return null;
+ if (core.identical(this._previous, this._list))
+ return null;
return dart.as(this._previous, E);
}
insertAfter(entry) {
@@ -2289,19 +2495,23 @@ var collection;
return LinkedListEntry;
});
let LinkedListEntry = LinkedListEntry$(dynamic);
-
let ListBase$ = dart.generic(function(E) {
class ListBase extends dart.mixin(core.Object, ListMixin$(E)) {
- static listToString(list) { return IterableBase.iterableToFullString(list, '[', ']'); }
+ static listToString(list) {
+ return IterableBase.iterableToFullString(list, '[', ']');
+ }
}
return ListBase;
});
let ListBase = ListBase$(dynamic);
-
let ListMixin$ = dart.generic(function(E) {
class ListMixin extends dart.Object {
- get iterator() { return new _internal.ListIterator(this); }
- elementAt(index) { return this.get(index); }
+ get iterator() {
+ return new _internal.ListIterator(this);
+ }
+ elementAt(index) {
+ return this.get(index);
+ }
forEach(action) {
let length = this.length;
for (let i = 0; i < length; i++) {
@@ -2311,25 +2521,34 @@ var collection;
}
}
}
- get isEmpty() { return this.length === 0; }
- get isNotEmpty() { return !dart.notNull(this.isEmpty); }
+ get isEmpty() {
+ return this.length === 0;
+ }
+ get isNotEmpty() {
+ return !dart.notNull(this.isEmpty);
+ }
get first() {
- if (this.length === 0) throw _internal.IterableElementError.noElement();
+ if (this.length === 0)
+ throw _internal.IterableElementError.noElement();
return this.get(0);
}
get last() {
- if (this.length === 0) throw _internal.IterableElementError.noElement();
+ if (this.length === 0)
+ throw _internal.IterableElementError.noElement();
return this.get(this.length - 1);
}
get single() {
- if (this.length === 0) throw _internal.IterableElementError.noElement();
- if (this.length > 1) throw _internal.IterableElementError.tooMany();
+ if (this.length === 0)
+ throw _internal.IterableElementError.noElement();
+ if (this.length > 1)
+ throw _internal.IterableElementError.tooMany();
return this.get(0);
}
contains(element) {
let length = this.length;
for (let i = 0; i < this.length; i++) {
- if (dart.equals(this.get(i), element)) return true;
+ if (dart.equals(this.get(i), element))
+ return true;
if (length !== this.length) {
throw new core.ConcurrentModificationError(this);
}
@@ -2339,7 +2558,8 @@ var collection;
every(test) {
let length = this.length;
for (let i = 0; i < length; i++) {
- if (!dart.notNull(test(this.get(i)))) return false;
+ if (!dart.notNull(test(this.get(i))))
+ return false;
if (length !== this.length) {
throw new core.ConcurrentModificationError(this);
}
@@ -2349,7 +2569,8 @@ var collection;
any(test) {
let length = this.length;
for (let i = 0; i < length; i++) {
- if (test(this.get(i))) return true;
+ if (test(this.get(i)))
+ return true;
if (length !== this.length) {
throw new core.ConcurrentModificationError(this);
}
@@ -2357,29 +2578,33 @@ var collection;
return false;
}
firstWhere(test, opt$) {
- let orElse = opt$.orElse === undefined ? null : opt$.orElse;
+ let orElse = opt$.orElse === void 0 ? null : opt$.orElse;
let length = this.length;
for (let i = 0; i < length; i++) {
let element = this.get(i);
- if (test(element)) return element;
+ if (test(element))
+ return element;
if (length !== this.length) {
throw new core.ConcurrentModificationError(this);
}
}
- if (orElse !== null) return orElse();
+ if (orElse !== null)
+ return orElse();
throw _internal.IterableElementError.noElement();
}
lastWhere(test, opt$) {
- let orElse = opt$.orElse === undefined ? null : opt$.orElse;
+ let orElse = opt$.orElse === void 0 ? null : opt$.orElse;
let length = this.length;
for (let i = length - 1; i >= 0; i--) {
let element = this.get(i);
- if (test(element)) return element;
+ if (test(element))
+ return element;
if (length !== this.length) {
throw new core.ConcurrentModificationError(this);
}
}
- if (orElse !== null) return orElse();
+ if (orElse !== null)
+ return orElse();
throw _internal.IterableElementError.noElement();
}
singleWhere(test) {
@@ -2399,22 +2624,32 @@ var collection;
throw new core.ConcurrentModificationError(this);
}
}
- if (matchFound) return match;
+ if (matchFound)
+ return match;
throw _internal.IterableElementError.noElement();
}
join(separator) {
- if (separator === undefined) separator = "";
- if (this.length === 0) return "";
+ if (separator === void 0)
+ separator = "";
+ if (this.length === 0)
+ return "";
let buffer = new core.StringBuffer();
buffer.writeAll(this, separator);
return buffer.toString();
}
- where(test) { return new _internal.WhereIterable(this, test); }
- map(f) { return new _internal.MappedListIterable(this, f); }
- expand(f) { return new _internal.ExpandIterable(this, f); }
+ where(test) {
+ return new _internal.WhereIterable(this, test);
+ }
+ map(f) {
+ return new _internal.MappedListIterable(this, f);
+ }
+ expand(f) {
+ return new _internal.ExpandIterable(this, f);
+ }
reduce(combine) {
let length = this.length;
- if (length === 0) throw _internal.IterableElementError.noElement();
+ if (length === 0)
+ throw _internal.IterableElementError.noElement();
let value = this.get(0);
for (let i = 1; i < length; i++) {
value = combine(value, this.get(i));
@@ -2435,16 +2670,20 @@ var collection;
}
return value;
}
- skip(count) { return new _internal.SubListIterable(this, count, null); }
+ skip(count) {
+ return new _internal.SubListIterable(this, count, null);
+ }
skipWhile(test) {
return new _internal.SkipWhileIterable(this, test);
}
- take(count) { return new _internal.SubListIterable(this, 0, count); }
+ take(count) {
+ return new _internal.SubListIterable(this, 0, count);
+ }
takeWhile(test) {
return new _internal.TakeWhileIterable(this, test);
}
toList(opt$) {
- let growable = opt$.growable === undefined ? true : opt$.growable;
+ let growable = opt$.growable === void 0 ? true : opt$.growable;
let result = null;
if (growable) {
result = ((_) => {
@@ -2485,10 +2724,10 @@ var collection;
return false;
}
removeWhere(test) {
- _filter(this, dart.as(test, /* Unimplemented type (dynamic) → bool */), false);
+ _filter(this, dart.as(test, dart.throw_("Unimplemented type (dynamic) → bool")), false);
}
retainWhere(test) {
- _filter(this, dart.as(test, /* Unimplemented type (dynamic) → bool */), true);
+ _filter(this, dart.as(test, dart.throw_("Unimplemented type (dynamic) → bool")), true);
}
static _filter(source, test, retainMatching) {
let retained = new List.from([]);
@@ -2519,16 +2758,19 @@ var collection;
return result;
}
sort(compare) {
- if (compare === undefined) compare = null;
+ if (compare === void 0)
+ compare = null;
if (compare === null) {
let defaultCompare = core.Comparable.compare;
compare = defaultCompare;
}
- _internal.Sort.sort(this, dart.as(compare, /* Unimplemented type (dynamic, dynamic) → int */));
+ _internal.Sort.sort(this, dart.as(compare, dart.throw_("Unimplemented type (dynamic, dynamic) → int")));
}
shuffle(random) {
- if (random === undefined) random = null;
- if (random === null) random = new math.Random();
+ if (random === void 0)
+ random = null;
+ if (random === null)
+ random = new math.Random();
let length = this.length;
while (length > 1) {
let pos = random.nextInt(length);
@@ -2542,9 +2784,11 @@ var collection;
return new _internal.ListMapView(this);
}
sublist(start, end) {
- if (end === undefined) end = null;
+ if (end === void 0)
+ end = null;
let listLength = this.length;
- if (end === null) end = listLength;
+ if (end === null)
+ end = listLength;
core.RangeError.checkValidRange(start, end, listLength);
let length = end - start;
let result = new core.List();
@@ -2565,17 +2809,20 @@ var collection;
this.length = length;
}
fillRange(start, end, fill) {
- if (fill === undefined) fill = null;
+ if (fill === void 0)
+ fill = null;
core.RangeError.checkValidRange(start, end, this.length);
for (let i = start; i < end; i++) {
this.set(i, fill);
}
}
setRange(start, end, iterable, skipCount) {
- if (skipCount === undefined) skipCount = 0;
+ if (skipCount === void 0)
+ skipCount = 0;
core.RangeError.checkValidRange(start, end, this.length);
let length = end - start;
- if (length === 0) return;
+ if (length === 0)
+ return;
core.RangeError.checkNotNegative(skipCount, "skipCount");
let otherList = null;
let otherStart = null;
@@ -2625,7 +2872,8 @@ var collection;
}
}
indexOf(element, startIndex) {
- if (startIndex === undefined) startIndex = 0;
+ if (startIndex === void 0)
+ startIndex = 0;
if (startIndex >= this.length) {
return -1;
}
@@ -2640,7 +2888,8 @@ var collection;
return -1;
}
lastIndexOf(element, startIndex) {
- if (startIndex === undefined) startIndex = null;
+ if (startIndex === void 0)
+ startIndex = null;
if (startIndex === null) {
startIndex = this.length - 1;
} else {
@@ -2664,7 +2913,8 @@ var collection;
this.add(element);
return;
}
- if (!(typeof index == "number")) throw new core.ArgumentError(index);
+ if (!(typeof index == number))
+ throw new core.ArgumentError(index);
this.length++;
this.setRange(index + 1, this.length, this, index);
this.set(index, element);
@@ -2694,16 +2944,19 @@ var collection;
}
}
}
- get reversed() { return new _internal.ReversedListIterable(this); }
- toString() { return IterableBase.iterableToFullString(this, '[', ']'); }
+ get reversed() {
+ return new _internal.ReversedListIterable(this);
+ }
+ toString() {
+ return IterableBase.iterableToFullString(this, '[', ']');
+ }
}
return ListMixin;
});
let ListMixin = ListMixin$(dynamic);
-
let MapBase$ = dart.generic(function(K, V) {
- class MapBase extends dart.mixin(MapMixin$(K, V)) {}
-
+ class MapBase extends dart.mixin(MapMixin$(K, V)) {
+ }
return MapBase;
});
let MapBase = MapBase$(dynamic, dynamic);
@@ -2721,7 +2974,8 @@ var collection;
}
containsValue(value) {
for (let key of this.keys) {
- if (dart.equals(this.get(key), value)) return true;
+ if (dart.equals(this.get(key), value))
+ return true;
}
return false;
}
@@ -2731,20 +2985,31 @@ var collection;
}
return this.set(key, ifAbsent());
}
- containsKey(key) { return this.keys.contains(key); }
- get length() { return this.keys.length; }
- get isEmpty() { return this.keys.isEmpty; }
- get isNotEmpty() { return this.keys.isNotEmpty; }
- get values() { return new _MapBaseValueIterable(this); }
- toString() { return Maps.mapToString(this); }
+ containsKey(key) {
+ return this.keys.contains(key);
+ }
+ get length() {
+ return this.keys.length;
+ }
+ get isEmpty() {
+ return this.keys.isEmpty;
+ }
+ get isNotEmpty() {
+ return this.keys.isNotEmpty;
+ }
+ get values() {
+ return new _MapBaseValueIterable(this);
+ }
+ toString() {
+ return Maps.mapToString(this);
+ }
}
return MapMixin;
});
let MapMixin = MapMixin$(dynamic, dynamic);
-
let UnmodifiableMapBase$ = dart.generic(function(K, V) {
- class UnmodifiableMapBase extends dart.mixin(_UnmodifiableMapMixin$(K, V)) {}
-
+ class UnmodifiableMapBase extends dart.mixin(_UnmodifiableMapMixin$(K, V)) {
+ }
return UnmodifiableMapBase;
});
let UnmodifiableMapBase = UnmodifiableMapBase$(dynamic, dynamic);
@@ -2754,18 +3019,31 @@ var collection;
this._map = _map;
super.IterableBase();
}
- get length() { return this._map.length; }
- get isEmpty() { return this._map.isEmpty; }
- get isNotEmpty() { return this._map.isNotEmpty; }
- get first() { return dart.as(this._map.get(this._map.keys.first), V); }
- get single() { return dart.as(this._map.get(this._map.keys.single), V); }
- get last() { return dart.as(this._map.get(this._map.keys.last), V); }
- get iterator() { return new _MapBaseValueIterator(this._map); }
+ get length() {
+ return this._map.length;
+ }
+ get isEmpty() {
+ return this._map.isEmpty;
+ }
+ get isNotEmpty() {
+ return this._map.isNotEmpty;
+ }
+ get first() {
+ return dart.as(this._map.get(this._map.keys.first), V);
+ }
+ get single() {
+ return dart.as(this._map.get(this._map.keys.single), V);
+ }
+ get last() {
+ return dart.as(this._map.get(this._map.keys.last), V);
+ }
+ get iterator() {
+ return new _MapBaseValueIterator(this._map);
+ }
}
return _MapBaseValueIterable;
});
let _MapBaseValueIterable = _MapBaseValueIterable$(dynamic);
-
let _MapBaseValueIterator$ = dart.generic(function(V) {
class _MapBaseValueIterator extends dart.Object {
_MapBaseValueIterator(map) {
@@ -2781,12 +3059,13 @@ var collection;
this._current = dart.as(null, V);
return false;
}
- get current() { return this._current; }
+ get current() {
+ return this._current;
+ }
}
return _MapBaseValueIterator;
});
let _MapBaseValueIterator = _MapBaseValueIterator$(dynamic);
-
let _UnmodifiableMapMixin$ = dart.generic(function(K, V) {
class _UnmodifiableMapMixin extends dart.Object {
set(key, value) {
@@ -2808,13 +3087,14 @@ var collection;
return _UnmodifiableMapMixin;
});
let _UnmodifiableMapMixin = _UnmodifiableMapMixin$(dynamic, dynamic);
-
let MapView$ = dart.generic(function(K, V) {
class MapView extends dart.Object {
MapView(map) {
this._map = map;
}
- get(key) { return this._map.get(key); }
+ get(key) {
+ return this._map.get(key);
+ }
set(key, value) {
this._map.set(key, value);
}
@@ -2824,27 +3104,46 @@ var collection;
clear() {
this._map.clear();
}
- putIfAbsent(key, ifAbsent) { return this._map.putIfAbsent(key, ifAbsent); }
- containsKey(key) { return this._map.containsKey(key); }
- containsValue(value) { return this._map.containsValue(value); }
+ putIfAbsent(key, ifAbsent) {
+ return this._map.putIfAbsent(key, ifAbsent);
+ }
+ containsKey(key) {
+ return this._map.containsKey(key);
+ }
+ containsValue(value) {
+ return this._map.containsValue(value);
+ }
forEach(action) {
this._map.forEach(action);
}
- get isEmpty() { return this._map.isEmpty; }
- get isNotEmpty() { return this._map.isNotEmpty; }
- get length() { return this._map.length; }
- get keys() { return this._map.keys; }
- remove(key) { return this._map.remove(key); }
- toString() { return this._map.toString(); }
- get values() { return this._map.values; }
+ get isEmpty() {
+ return this._map.isEmpty;
+ }
+ get isNotEmpty() {
+ return this._map.isNotEmpty;
+ }
+ get length() {
+ return this._map.length;
+ }
+ get keys() {
+ return this._map.keys;
+ }
+ remove(key) {
+ return this._map.remove(key);
+ }
+ toString() {
+ return this._map.toString();
+ }
+ get values() {
+ return this._map.values;
+ }
}
return MapView;
});
let MapView = MapView$(dynamic, dynamic);
-
let UnmodifiableMapView$ = dart.generic(function(K, V) {
- class UnmodifiableMapView extends dart.mixin(_UnmodifiableMapMixin$(K, V)) {}
-
+ class UnmodifiableMapView extends dart.mixin(_UnmodifiableMapMixin$(K, V)) {
+ }
return UnmodifiableMapView;
});
let UnmodifiableMapView = UnmodifiableMapView$(dynamic, dynamic);
@@ -2886,9 +3185,15 @@ var collection;
static getValues(map) {
return map.keys.map((key) => map.get(key));
}
- static length(map) { return map.keys.length; }
- static isEmpty(map) { return map.keys.isEmpty; }
- static isNotEmpty(map) { return map.keys.isNotEmpty; }
+ static length(map) {
+ return map.keys.length;
+ }
+ static isEmpty(map) {
+ return map.keys.isEmpty;
+ }
+ static isNotEmpty(map) {
+ return map.keys.isNotEmpty;
+ }
static mapToString(m) {
if (IterableBase._isToStringVisiting(m)) {
return '{...}';
@@ -2908,17 +3213,20 @@ var collection;
result.write(v);
}).bind(this));
result.write('}');
- }
- finally {
+ } finally {
dart.assert(core.identical(IterableBase._toStringVisiting.last, m));
IterableBase._toStringVisiting.removeLast();
}
return result.toString();
}
- static _id(x) { return x; }
+ static _id(x) {
+ return x;
+ }
static _fillMapWithMappedIterable(map, iterable, key, value) {
- if (key === null) key = _id;
- if (value === null) value = _id;
+ if (key === null)
+ key = _id;
+ if (value === null)
+ value = _id;
for (let element of iterable) {
map.set(key(element), value(element));
}
@@ -2938,7 +3246,6 @@ var collection;
}
}
}
-
let Queue$ = dart.generic(function(E) {
class Queue extends dart.Object {
Queue() {
@@ -2948,11 +3255,10 @@ var collection;
return new ListQueue.from(elements);
}
}
- dart.defineNamedConstructor(Queue, "from");
+ dart.defineNamedConstructor(Queue, 'from');
return Queue;
});
let Queue = Queue$(dynamic);
-
let DoubleLinkedQueueEntry$ = dart.generic(function(E) {
class DoubleLinkedQueueEntry extends dart.Object {
DoubleLinkedQueueEntry(e) {
@@ -2998,7 +3304,6 @@ var collection;
return DoubleLinkedQueueEntry;
});
let DoubleLinkedQueueEntry = DoubleLinkedQueueEntry$(dynamic);
-
let _DoubleLinkedQueueEntrySentinel$ = dart.generic(function(E) {
class _DoubleLinkedQueueEntrySentinel extends DoubleLinkedQueueEntry$(E) {
_DoubleLinkedQueueEntrySentinel() {
@@ -3021,7 +3326,6 @@ var collection;
return _DoubleLinkedQueueEntrySentinel;
});
let _DoubleLinkedQueueEntrySentinel = _DoubleLinkedQueueEntrySentinel$(dynamic);
-
let DoubleLinkedQueue$ = dart.generic(function(E) {
class DoubleLinkedQueue extends IterableBase$(E) {
DoubleLinkedQueue() {
@@ -3037,7 +3341,9 @@ var collection;
}
return dart.as(list, DoubleLinkedQueue$(E));
}
- get length() { return this._elementCount; }
+ get length() {
+ return this._elementCount;
+ }
addLast(value) {
this._sentinel.prepend(value);
this._elementCount++;
@@ -3114,7 +3420,7 @@ var collection;
return this._sentinel.nextEntry();
}
get isEmpty() {
- return (core.identical(this._sentinel._next, this._sentinel));
+ return core.identical(this._sentinel._next, this._sentinel);
}
clear() {
this._sentinel._next = this._sentinel;
@@ -3132,13 +3438,14 @@ var collection;
get iterator() {
return new _DoubleLinkedQueueIterator(this._sentinel);
}
- toString() { return IterableBase.iterableToFullString(this, '{', '}'); }
+ toString() {
+ return IterableBase.iterableToFullString(this, '{', '}');
+ }
}
- dart.defineNamedConstructor(DoubleLinkedQueue, "from");
+ dart.defineNamedConstructor(DoubleLinkedQueue, 'from');
return DoubleLinkedQueue;
});
let DoubleLinkedQueue = DoubleLinkedQueue$(dynamic);
-
let _DoubleLinkedQueueIterator$ = dart.generic(function(E) {
class _DoubleLinkedQueueIterator extends dart.Object {
_DoubleLinkedQueueIterator(sentinel) {
@@ -3156,16 +3463,18 @@ var collection;
this._nextEntry = this._sentinel = null;
return false;
}
- get current() { return this._current; }
+ get current() {
+ return this._current;
+ }
}
return _DoubleLinkedQueueIterator;
});
let _DoubleLinkedQueueIterator = _DoubleLinkedQueueIterator$(dynamic);
-
let ListQueue$ = dart.generic(function(E) {
class ListQueue extends IterableBase$(E) {
ListQueue(initialCapacity) {
- if (initialCapacity === undefined) initialCapacity = null;
+ if (initialCapacity === void 0)
+ initialCapacity = null;
this._head = 0;
this._tail = 0;
this._table = null;
@@ -3200,35 +3509,45 @@ var collection;
return result;
}
}
- get iterator() { return new _ListQueueIterator(this); }
+ get iterator() {
+ return new _ListQueueIterator(this);
+ }
forEach(action) {
let modificationCount = this._modificationCount;
- for (let i = this._head; i !== this._tail; i = (i + 1) & (this._table.length - 1)) {
+ for (let i = this._head; i !== this._tail; i = i + 1 & this._table.length - 1) {
action(this._table.get(i));
this._checkModification(modificationCount);
}
}
- get isEmpty() { return this._head === this._tail; }
- get length() { return (this._tail - this._head) & (this._table.length - 1); }
+ get isEmpty() {
+ return this._head === this._tail;
+ }
+ get length() {
+ return this._tail - this._head & this._table.length - 1;
+ }
get first() {
- if (this._head === this._tail) throw _internal.IterableElementError.noElement();
+ if (this._head === this._tail)
+ throw _internal.IterableElementError.noElement();
return this._table.get(this._head);
}
get last() {
- if (this._head === this._tail) throw _internal.IterableElementError.noElement();
- return this._table.get((this._tail - 1) & (this._table.length - 1));
+ if (this._head === this._tail)
+ throw _internal.IterableElementError.noElement();
+ return this._table.get(this._tail - 1 & this._table.length - 1);
}
get single() {
- if (this._head === this._tail) throw _internal.IterableElementError.noElement();
- if (this.length > 1) throw _internal.IterableElementError.tooMany();
+ if (this._head === this._tail)
+ throw _internal.IterableElementError.noElement();
+ if (this.length > 1)
+ throw _internal.IterableElementError.tooMany();
return this._table.get(this._head);
}
elementAt(index) {
core.RangeError.checkValidIndex(index, this);
- return this._table.get((this._head + index) & (this._table.length - 1));
+ return this._table.get(this._head + index & this._table.length - 1);
}
toList(opt$) {
- let growable = opt$.growable === undefined ? true : opt$.growable;
+ let growable = opt$.growable === void 0 ? true : opt$.growable;
let list = null;
if (growable) {
list = ((_) => {
@@ -3267,11 +3586,12 @@ var collection;
}
this._modificationCount++;
} else {
- for (let element of elements) this._add(element);
+ for (let element of elements)
+ this._add(element);
}
}
remove(object) {
- for (let i = this._head; i !== this._tail; i = (i + 1) & (this._table.length - 1)) {
+ for (let i = this._head; i !== this._tail; i = i + 1 & this._table.length - 1) {
let element = this._table.get(i);
if (dart.equals(element, object)) {
this._remove(i);
@@ -3293,7 +3613,7 @@ var collection;
i = this._remove(i);
modificationCount = ++this._modificationCount;
} else {
- i = (i + 1) & (this._table.length - 1);
+ i = i + 1 & this._table.length - 1;
}
}
}
@@ -3305,46 +3625,54 @@ var collection;
}
clear() {
if (this._head !== this._tail) {
- for (let i = this._head; i !== this._tail; i = (i + 1) & (this._table.length - 1)) {
+ for (let i = this._head; i !== this._tail; i = i + 1 & this._table.length - 1) {
this._table.set(i, dart.as(null, E));
}
this._head = this._tail = 0;
this._modificationCount++;
}
}
- toString() { return IterableBase.iterableToFullString(this, "{", "}"); }
+ toString() {
+ return IterableBase.iterableToFullString(this, "{", "}");
+ }
addLast(element) {
this._add(element);
}
addFirst(element) {
- this._head = (this._head - 1) & (this._table.length - 1);
+ this._head = this._head - 1 & this._table.length - 1;
this._table.set(this._head, element);
- if (this._head === this._tail) this._grow();
+ if (this._head === this._tail)
+ this._grow();
this._modificationCount++;
}
removeFirst() {
- if (this._head === this._tail) throw _internal.IterableElementError.noElement();
+ if (this._head === this._tail)
+ throw _internal.IterableElementError.noElement();
this._modificationCount++;
let result = this._table.get(this._head);
this._table.set(this._head, dart.as(null, E));
- this._head = (this._head + 1) & (this._table.length - 1);
+ this._head = this._head + 1 & this._table.length - 1;
return result;
}
removeLast() {
- if (this._head === this._tail) throw _internal.IterableElementError.noElement();
+ if (this._head === this._tail)
+ throw _internal.IterableElementError.noElement();
this._modificationCount++;
- this._tail = (this._tail - 1) & (this._table.length - 1);
+ this._tail = this._tail - 1 & this._table.length - 1;
let result = this._table.get(this._tail);
this._table.set(this._tail, dart.as(null, E));
return result;
}
- static _isPowerOf2(number) { return (number & (number - 1)) === 0; }
+ static _isPowerOf2(number) {
+ return (number & number - 1) === 0;
+ }
static _nextPowerOf2(number) {
dart.assert(number > 0);
number = (number << 1) - 1;
for (;;) {
- let nextNumber = number & (number - 1);
- if (nextNumber === 0) return number;
+ let nextNumber = number & number - 1;
+ if (nextNumber === 0)
+ return number;
number = nextNumber;
}
}
@@ -3355,29 +3683,30 @@ var collection;
}
_add(element) {
this._table.set(this._tail, element);
- this._tail = (this._tail + 1) & (this._table.length - 1);
- if (this._head === this._tail) this._grow();
+ this._tail = this._tail + 1 & this._table.length - 1;
+ if (this._head === this._tail)
+ this._grow();
this._modificationCount++;
}
_remove(offset) {
let mask = this._table.length - 1;
- let startDistance = (offset - this._head) & mask;
- let endDistance = (this._tail - offset) & mask;
+ let startDistance = offset - this._head & mask;
+ let endDistance = this._tail - offset & mask;
if (startDistance < endDistance) {
let i = offset;
while (i !== this._head) {
- let prevOffset = (i - 1) & mask;
+ let prevOffset = i - 1 & mask;
this._table.set(i, this._table.get(prevOffset));
i = prevOffset;
}
this._table.set(this._head, dart.as(null, E));
- this._head = (this._head + 1) & mask;
- return (offset + 1) & mask;
+ this._head = this._head + 1 & mask;
+ return offset + 1 & mask;
} else {
- this._tail = (this._tail - 1) & mask;
+ this._tail = this._tail - 1 & mask;
let i = offset;
while (i !== this._tail) {
- let nextOffset = (i + 1) & mask;
+ let nextOffset = i + 1 & mask;
this._table.set(i, this._table.get(nextOffset));
i = nextOffset;
}
@@ -3417,12 +3746,11 @@ var collection;
this._head = 0;
}
}
- dart.defineNamedConstructor(ListQueue, "from");
+ dart.defineNamedConstructor(ListQueue, 'from');
ListQueue._INITIAL_CAPACITY = 8;
return ListQueue;
});
let ListQueue = ListQueue$(dynamic);
-
let _ListQueueIterator$ = dart.generic(function(E) {
class _ListQueueIterator extends dart.Object {
_ListQueueIterator(queue) {
@@ -3432,7 +3760,9 @@ var collection;
this._position = queue._head;
this._current = dart.as(null, E);
}
- get current() { return this._current; }
+ get current() {
+ return this._current;
+ }
moveNext() {
this._queue._checkModification(this._modificationCount);
if (this._position === this._end) {
@@ -3440,26 +3770,31 @@ var collection;
return false;
}
this._current = dart.as(this._queue._table.get(this._position), E);
- this._position = (this._position + 1) & (this._queue._table.length - 1);
+ this._position = this._position + 1 & this._queue._table.length - 1;
return true;
}
}
return _ListQueueIterator;
});
let _ListQueueIterator = _ListQueueIterator$(dynamic);
-
let SetMixin$ = dart.generic(function(E) {
class SetMixin extends dart.Object {
- get isEmpty() { return this.length === 0; }
- get isNotEmpty() { return this.length !== 0; }
+ get isEmpty() {
+ return this.length === 0;
+ }
+ get isNotEmpty() {
+ return this.length !== 0;
+ }
clear() {
this.removeAll(this.toList());
}
addAll(elements) {
- for (let element of elements) this.add(element);
+ for (let element of elements)
+ this.add(element);
}
removeAll(elements) {
- for (let element of elements) this.remove(element);
+ for (let element of elements)
+ this.remove(element);
}
retainAll(elements) {
let toRemove = this.toSet();
@@ -3471,20 +3806,23 @@ var collection;
removeWhere(test) {
let toRemove = new List.from([]);
for (let element of this) {
- if (test(element)) toRemove.add(element);
+ if (test(element))
+ toRemove.add(element);
}
this.removeAll(dart.as(toRemove, core.Iterable$(core.Object)));
}
retainWhere(test) {
let toRemove = new List.from([]);
for (let element of this) {
- if (!dart.notNull(test(element))) toRemove.add(element);
+ if (!dart.notNull(test(element)))
+ toRemove.add(element);
}
this.removeAll(dart.as(toRemove, core.Iterable$(core.Object)));
}
containsAll(other) {
for (let o of other) {
- if (!dart.notNull(this.contains(o))) return false;
+ if (!dart.notNull(this.contains(o)))
+ return false;
}
return true;
}
@@ -3497,40 +3835,54 @@ var collection;
intersection(other) {
let result = this.toSet();
for (let element of this) {
- if (!dart.notNull(other.contains(element))) result.remove(element);
+ if (!dart.notNull(other.contains(element)))
+ result.remove(element);
}
return result;
}
difference(other) {
let result = this.toSet();
for (let element of this) {
- if (other.contains(element)) result.remove(element);
+ if (other.contains(element))
+ result.remove(element);
}
return result;
}
toList(opt$) {
- let growable = opt$.growable === undefined ? true : opt$.growable;
- let result = growable ? (((_) => {
+ let growable = opt$.growable === void 0 ? true : opt$.growable;
+ let result = growable ? ((_) => {
_.length = this.length;
return _;
- }).bind(this)(new core.List())) : new core.List(this.length);
+ }).bind(this)(new core.List()) : new core.List(this.length);
let i = 0;
- for (let element of this) result.set(i++, element);
+ for (let element of this)
+ result.set(i++, element);
return result;
}
- map(f) { return new _internal.EfficientLengthMappedIterable(this, f); }
+ map(f) {
+ return new _internal.EfficientLengthMappedIterable(this, f);
+ }
get single() {
- if (this.length > 1) throw _internal.IterableElementError.tooMany();
+ if (this.length > 1)
+ throw _internal.IterableElementError.tooMany();
let it = this.iterator;
- if (!dart.notNull(it.moveNext())) throw _internal.IterableElementError.noElement();
+ if (!dart.notNull(it.moveNext()))
+ throw _internal.IterableElementError.noElement();
let result = dart.as(it.current, E);
return result;
}
- toString() { return IterableBase.iterableToFullString(this, '{', '}'); }
- where(f) { return new _internal.WhereIterable(this, f); }
- expand(f) { return new _internal.ExpandIterable(this, f); }
+ toString() {
+ return IterableBase.iterableToFullString(this, '{', '}');
+ }
+ where(f) {
+ return new _internal.WhereIterable(this, f);
+ }
+ expand(f) {
+ return new _internal.ExpandIterable(this, f);
+ }
forEach(f) {
- for (let element of this) f(element);
+ for (let element of this)
+ f(element);
}
reduce(combine) {
let iterator = this.iterator;
@@ -3545,25 +3897,28 @@ var collection;
}
fold(initialValue, combine) {
let value = initialValue;
- for (let element of this) value = combine(value, element);
+ for (let element of this)
+ value = combine(value, element);
return value;
}
every(f) {
for (let element of this) {
- if (!dart.notNull(f(element))) return false;
+ if (!dart.notNull(f(element)))
+ return false;
}
return true;
}
join(separator) {
- if (separator === undefined) separator = "";
+ if (separator === void 0)
+ separator = "";
let iterator = this.iterator;
- if (!dart.notNull(iterator.moveNext())) return "";
+ if (!dart.notNull(iterator.moveNext()))
+ return "";
let buffer = new core.StringBuffer();
if (dart.notNull(separator === null) || dart.notNull(dart.equals(separator, ""))) {
do {
buffer.write(`${iterator.current}`);
- }
- while (iterator.moveNext());
+ } while (iterator.moveNext());
} else {
buffer.write(`${iterator.current}`);
while (iterator.moveNext()) {
@@ -3575,7 +3930,8 @@ var collection;
}
any(test) {
for (let element of this) {
- if (test(element)) return true;
+ if (test(element))
+ return true;
}
return false;
}
@@ -3606,20 +3962,21 @@ var collection;
let result = null;
do {
result = dart.as(it.current, E);
- }
- while (it.moveNext());
+ } while (it.moveNext());
return result;
}
firstWhere(test, opt$) {
- let orElse = opt$.orElse === undefined ? null : opt$.orElse;
+ let orElse = opt$.orElse === void 0 ? null : opt$.orElse;
for (let element of this) {
- if (test(element)) return element;
+ if (test(element))
+ return element;
}
- if (orElse !== null) return orElse();
+ if (orElse !== null)
+ return orElse();
throw _internal.IterableElementError.noElement();
}
lastWhere(test, opt$) {
- let orElse = opt$.orElse === undefined ? null : opt$.orElse;
+ let orElse = opt$.orElse === void 0 ? null : opt$.orElse;
let result = dart.as(null, E);
let foundMatching = false;
for (let element of this) {
@@ -3628,8 +3985,10 @@ var collection;
foundMatching = true;
}
}
- if (foundMatching) return result;
- if (orElse !== null) return orElse();
+ if (foundMatching)
+ return result;
+ if (orElse !== null)
+ return orElse();
throw _internal.IterableElementError.noElement();
}
singleWhere(test) {
@@ -3644,15 +4003,18 @@ var collection;
foundMatching = true;
}
}
- if (foundMatching) return result;
+ if (foundMatching)
+ return result;
throw _internal.IterableElementError.noElement();
}
elementAt(index) {
- if (!(typeof index == "number")) throw new core.ArgumentError.notNull("index");
+ if (!(typeof index == number))
+ throw new core.ArgumentError.notNull("index");
core.RangeError.checkNotNegative(index, "index");
let elementIndex = 0;
for (let element of this) {
- if (index === elementIndex) return element;
+ if (index === elementIndex)
+ return element;
elementIndex++;
}
throw new core.RangeError.index(index, this, "index", null, elementIndex);
@@ -3661,15 +4023,15 @@ var collection;
return SetMixin;
});
let SetMixin = SetMixin$(dynamic);
-
let SetBase$ = dart.generic(function(E) {
class SetBase extends SetMixin$(E) {
- static setToString(set) { return IterableBase.iterableToFullString(set, '{', '}'); }
+ static setToString(set) {
+ return IterableBase.iterableToFullString(set, '{', '}');
+ }
}
return SetBase;
});
let SetBase = SetBase$(dynamic);
-
let _SplayTreeNode$ = dart.generic(function(K) {
class _SplayTreeNode extends dart.Object {
_SplayTreeNode(key) {
@@ -3681,7 +4043,6 @@ var collection;
return _SplayTreeNode;
});
let _SplayTreeNode = _SplayTreeNode$(dynamic);
-
let _SplayTreeMapNode$ = dart.generic(function(K, V) {
class _SplayTreeMapNode extends _SplayTreeNode$(K) {
_SplayTreeMapNode(key, value) {
@@ -3692,7 +4053,6 @@ var collection;
return _SplayTreeMapNode;
});
let _SplayTreeMapNode = _SplayTreeMapNode$(dynamic, dynamic);
-
let _SplayTree$ = dart.generic(function(K) {
class _SplayTree extends dart.Object {
_SplayTree() {
@@ -3703,7 +4063,8 @@ var collection;
this._splayCount = 0;
}
_splay(key) {
- if (this._root === null) return -1;
+ if (this._root === null)
+ return -1;
let left = this._dummy;
let right = this._dummy;
let current = this._root;
@@ -3711,27 +4072,31 @@ var collection;
while (true) {
comp = this._compare(current.key, key);
if (comp > 0) {
- if (current.left === null) break;
+ if (current.left === null)
+ break;
comp = this._compare(current.left.key, key);
if (comp > 0) {
let tmp = current.left;
current.left = tmp.right;
tmp.right = current;
current = tmp;
- if (current.left === null) break;
+ if (current.left === null)
+ break;
}
right.left = current;
right = current;
current = current.left;
} else if (comp < 0) {
- if (current.right === null) break;
+ if (current.right === null)
+ break;
comp = this._compare(current.right.key, key);
if (comp < 0) {
let tmp = current.right;
current.right = tmp.left;
tmp.left = current;
current = tmp;
- if (current.right === null) break;
+ if (current.right === null)
+ break;
}
left.right = current;
left = current;
@@ -3771,9 +4136,11 @@ var collection;
return dart.as(current, _SplayTreeNode$(K));
}
_remove(key) {
- if (this._root === null) return null;
+ if (this._root === null)
+ return null;
let comp = this._splay(key);
- if (comp !== 0) return null;
+ if (comp !== 0)
+ return null;
let result = this._root;
this._count--;
if (this._root.left === null) {
@@ -3805,12 +4172,14 @@ var collection;
this._root = node;
}
get _first() {
- if (this._root === null) return null;
+ if (this._root === null)
+ return null;
this._root = this._splayMin(this._root);
return this._root;
}
get _last() {
- if (this._root === null) return null;
+ if (this._root === null)
+ return null;
this._root = this._splayMax(this._root);
return this._root;
}
@@ -3823,27 +4192,31 @@ var collection;
return _SplayTree;
});
let _SplayTree = _SplayTree$(dynamic);
-
let _TypeTest$ = dart.generic(function(T) {
class _TypeTest extends dart.Object {
- test(v) { return dart.is(v, T); }
+ test(v) {
+ return dart.is(v, T);
+ }
}
return _TypeTest;
});
let _TypeTest = _TypeTest$(dynamic);
-
let SplayTreeMap$ = dart.generic(function(K, V) {
class SplayTreeMap extends _SplayTree$(K) {
SplayTreeMap(compare, isValidKey) {
- if (compare === undefined) compare = null;
- if (isValidKey === undefined) isValidKey = null;
- this._comparator = (compare === null) ? core.Comparable.compare : compare;
- this._validKey = (isValidKey !== null) ? isValidKey : ((v) => dart.is(v, K));
+ if (compare === void 0)
+ compare = null;
+ if (isValidKey === void 0)
+ isValidKey = null;
+ this._comparator = compare === null ? core.Comparable.compare : compare;
+ this._validKey = isValidKey !== null ? isValidKey : (v) => dart.is(v, K);
super._SplayTree();
}
SplayTreeMap$from(other, compare, isValidKey) {
- if (compare === undefined) compare = null;
- if (isValidKey === undefined) isValidKey = null;
+ if (compare === void 0)
+ compare = null;
+ if (isValidKey === void 0)
+ isValidKey = null;
let result = new SplayTreeMap();
other.forEach((k, v) => {
result.set(k, dart.as(v, V));
@@ -3851,30 +4224,36 @@ var collection;
return result;
}
SplayTreeMap$fromIterable(iterable, opt$) {
- let key = opt$.key === undefined ? null : opt$.key;
- let value = opt$.value === undefined ? null : opt$.value;
- let compare = opt$.compare === undefined ? null : opt$.compare;
- let isValidKey = opt$.isValidKey === undefined ? null : opt$.isValidKey;
+ let key = opt$.key === void 0 ? null : opt$.key;
+ let value = opt$.value === void 0 ? null : opt$.value;
+ let compare = opt$.compare === void 0 ? null : opt$.compare;
+ let isValidKey = opt$.isValidKey === void 0 ? null : opt$.isValidKey;
let map = new SplayTreeMap(compare, isValidKey);
Maps._fillMapWithMappedIterable(map, iterable, key, value);
return map;
}
SplayTreeMap$fromIterables(keys, values, compare, isValidKey) {
- if (compare === undefined) compare = null;
- if (isValidKey === undefined) isValidKey = null;
+ if (compare === void 0)
+ compare = null;
+ if (isValidKey === void 0)
+ isValidKey = null;
let map = new SplayTreeMap(compare, isValidKey);
Maps._fillMapWithIterables(map, keys, values);
return map;
}
- _compare(key1, key2) { return this._comparator(key1, key2); }
+ _compare(key1, key2) {
+ return this._comparator(key1, key2);
+ }
SplayTreeMap$_internal() {
this._comparator = null;
this._validKey = null;
super._SplayTree();
}
get(key) {
- if (key === null) throw new core.ArgumentError(key);
- if (!dart.notNull(this._validKey(key))) return dart.as(null, V);
+ if (key === null)
+ throw new core.ArgumentError(key);
+ if (!dart.notNull(this._validKey(key)))
+ return dart.as(null, V);
if (this._root !== null) {
let comp = this._splay(dart.as(key, K));
if (comp === 0) {
@@ -3885,13 +4264,16 @@ var collection;
return dart.as(null, V);
}
remove(key) {
- if (!dart.notNull(this._validKey(key))) return dart.as(null, V);
+ if (!dart.notNull(this._validKey(key)))
+ return dart.as(null, V);
let mapRoot = dart.as(this._remove(dart.as(key, K)), _SplayTreeMapNode);
- if (mapRoot !== null) return dart.as(mapRoot.value, V);
+ if (mapRoot !== null)
+ return dart.as(mapRoot.value, V);
return dart.as(null, V);
}
set(key, value) {
- if (key === null) throw new core.ArgumentError(key);
+ if (key === null)
+ throw new core.ArgumentError(key);
let comp = this._splay(key);
if (comp === 0) {
let mapRoot = dart.as(this._root, _SplayTreeMapNode);
@@ -3901,7 +4283,8 @@ var collection;
this._addNewRoot(dart.as(new _SplayTreeMapNode(key, value), _SplayTreeNode$(K)), comp);
}
putIfAbsent(key, ifAbsent) {
- if (key === null) throw new core.ArgumentError(key);
+ if (key === null)
+ throw new core.ArgumentError(key);
let comp = this._splay(key);
if (comp === 0) {
let mapRoot = dart.as(this._root, _SplayTreeMapNode);
@@ -3926,9 +4309,11 @@ var collection;
}).bind(this));
}
get isEmpty() {
- return (this._root === null);
+ return this._root === null;
+ }
+ get isNotEmpty() {
+ return !dart.notNull(this.isEmpty);
}
- get isNotEmpty() { return !dart.notNull(this.isEmpty); }
forEach(f) {
let nodes = new _SplayTreeNodeIterator(this);
while (nodes.moveNext()) {
@@ -3951,63 +4336,78 @@ var collection;
// Function visit: (_SplayTreeMapNode<dynamic, dynamic>) → bool
function visit(node) {
while (node !== null) {
- if (dart.equals(node.value, value)) return true;
+ if (dart.equals(node.value, value))
+ return true;
if (initialSplayCount !== this._splayCount) {
throw new core.ConcurrentModificationError(this);
}
- if (dart.notNull(node.right !== null) && dart.notNull(visit(dart.as(node.right, _SplayTreeMapNode)))) return true;
+ if (dart.notNull(node.right !== null) && dart.notNull(visit(dart.as(node.right, _SplayTreeMapNode))))
+ return true;
node = dart.as(node.left, _SplayTreeMapNode);
}
return false;
}
return visit(dart.as(this._root, _SplayTreeMapNode));
}
- get keys() { return new _SplayTreeKeyIterable(this); }
- get values() { return new _SplayTreeValueIterable(this); }
+ get keys() {
+ return new _SplayTreeKeyIterable(this);
+ }
+ get values() {
+ return new _SplayTreeValueIterable(this);
+ }
toString() {
return Maps.mapToString(this);
}
firstKey() {
- if (this._root === null) return dart.as(null, K);
+ if (this._root === null)
+ return dart.as(null, K);
return dart.as(this._first.key, K);
}
lastKey() {
- if (this._root === null) return dart.as(null, K);
+ if (this._root === null)
+ return dart.as(null, K);
return dart.as(this._last.key, K);
}
lastKeyBefore(key) {
- if (key === null) throw new core.ArgumentError(key);
- if (this._root === null) return dart.as(null, K);
+ if (key === null)
+ throw new core.ArgumentError(key);
+ if (this._root === null)
+ return dart.as(null, K);
let comp = this._splay(key);
- if (comp < 0) return this._root.key;
+ if (comp < 0)
+ return this._root.key;
let node = this._root.left;
- if (node === null) return dart.as(null, K);
+ if (node === null)
+ return dart.as(null, K);
while (node.right !== null) {
node = node.right;
}
return node.key;
}
firstKeyAfter(key) {
- if (key === null) throw new core.ArgumentError(key);
- if (this._root === null) return dart.as(null, K);
+ if (key === null)
+ throw new core.ArgumentError(key);
+ if (this._root === null)
+ return dart.as(null, K);
let comp = this._splay(key);
- if (comp > 0) return this._root.key;
+ if (comp > 0)
+ return this._root.key;
let node = this._root.right;
- if (node === null) return dart.as(null, K);
+ if (node === null)
+ return dart.as(null, K);
while (node.left !== null) {
node = node.left;
}
return node.key;
}
}
- dart.defineNamedConstructor(SplayTreeMap, "from");
- dart.defineNamedConstructor(SplayTreeMap, "fromIterable");
- dart.defineNamedConstructor(SplayTreeMap, "fromIterables");
- dart.defineNamedConstructor(SplayTreeMap, "_internal");
+ dart.defineNamedConstructor(SplayTreeMap, 'from');
+ dart.defineNamedConstructor(SplayTreeMap, 'fromIterable');
+ dart.defineNamedConstructor(SplayTreeMap, 'fromIterables');
+ dart.defineNamedConstructor(SplayTreeMap, '_internal');
return SplayTreeMap;
});
let SplayTreeMap = SplayTreeMap$(dynamic, dynamic);
-
let _SplayTreeIterator$ = dart.generic(function(T) {
class _SplayTreeIterator extends dart.Object {
_SplayTreeIterator(tree) {
@@ -4024,7 +4424,8 @@ var collection;
this._modificationCount = tree._modificationCount;
this._splayCount = dart.as(null, core.int);
this._currentNode = null;
- if (tree._root === null) return;
+ if (tree._root === null)
+ return;
let compare = tree._splay(startKey);
this._splayCount = tree._splayCount;
if (compare < 0) {
@@ -4034,7 +4435,8 @@ var collection;
}
}
get current() {
- if (this._currentNode === null) return dart.as(null, T);
+ if (this._currentNode === null)
+ return dart.as(null, T);
return this._getValue(this._currentNode);
}
_findLeftMostDescendent(node) {
@@ -4070,20 +4472,25 @@ var collection;
return true;
}
}
- dart.defineNamedConstructor(_SplayTreeIterator, "startAt");
+ dart.defineNamedConstructor(_SplayTreeIterator, 'startAt');
return _SplayTreeIterator;
});
let _SplayTreeIterator = _SplayTreeIterator$(dynamic);
-
let _SplayTreeKeyIterable$ = dart.generic(function(K) {
class _SplayTreeKeyIterable extends IterableBase$(K) {
_SplayTreeKeyIterable(_tree) {
this._tree = _tree;
super.IterableBase();
}
- get length() { return this._tree._count; }
- get isEmpty() { return this._tree._count === 0; }
- get iterator() { return new _SplayTreeKeyIterator(this._tree); }
+ get length() {
+ return this._tree._count;
+ }
+ get isEmpty() {
+ return this._tree._count === 0;
+ }
+ get iterator() {
+ return new _SplayTreeKeyIterator(this._tree);
+ }
toSet() {
let setOrMap = this._tree;
let set = new SplayTreeSet(setOrMap._comparator, setOrMap._validKey);
@@ -4095,43 +4502,49 @@ var collection;
return _SplayTreeKeyIterable;
});
let _SplayTreeKeyIterable = _SplayTreeKeyIterable$(dynamic);
-
let _SplayTreeValueIterable$ = dart.generic(function(K, V) {
class _SplayTreeValueIterable extends IterableBase$(V) {
_SplayTreeValueIterable(_map) {
this._map = _map;
super.IterableBase();
}
- get length() { return this._map._count; }
- get isEmpty() { return this._map._count === 0; }
- get iterator() { return new _SplayTreeValueIterator(this._map); }
+ get length() {
+ return this._map._count;
+ }
+ get isEmpty() {
+ return this._map._count === 0;
+ }
+ get iterator() {
+ return new _SplayTreeValueIterator(this._map);
+ }
}
return _SplayTreeValueIterable;
});
let _SplayTreeValueIterable = _SplayTreeValueIterable$(dynamic, dynamic);
-
let _SplayTreeKeyIterator$ = dart.generic(function(K) {
class _SplayTreeKeyIterator extends _SplayTreeIterator$(K) {
_SplayTreeKeyIterator(map) {
super._SplayTreeIterator(map);
}
- _getValue(node) { return dart.as(node.key, K); }
+ _getValue(node) {
+ return dart.as(node.key, K);
+ }
}
return _SplayTreeKeyIterator;
});
let _SplayTreeKeyIterator = _SplayTreeKeyIterator$(dynamic);
-
let _SplayTreeValueIterator$ = dart.generic(function(K, V) {
class _SplayTreeValueIterator extends _SplayTreeIterator$(V) {
_SplayTreeValueIterator(map) {
super._SplayTreeIterator(map);
}
- _getValue(node) { return dart.as(node.value, V); }
+ _getValue(node) {
+ return dart.as(node.value, V);
+ }
}
return _SplayTreeValueIterator;
});
let _SplayTreeValueIterator = _SplayTreeValueIterator$(dynamic, dynamic);
-
let _SplayTreeNodeIterator$ = dart.generic(function(K) {
class _SplayTreeNodeIterator extends _SplayTreeIterator$(_SplayTreeNode$(K)) {
_SplayTreeNodeIterator(tree) {
@@ -4140,47 +4553,66 @@ var collection;
_SplayTreeNodeIterator$startAt(tree, startKey) {
super._SplayTreeIterator$startAt(tree, startKey);
}
- _getValue(node) { return dart.as(node, _SplayTreeNode$(K)); }
+ _getValue(node) {
+ return dart.as(node, _SplayTreeNode$(K));
+ }
}
- dart.defineNamedConstructor(_SplayTreeNodeIterator, "startAt");
+ dart.defineNamedConstructor(_SplayTreeNodeIterator, 'startAt');
return _SplayTreeNodeIterator;
});
let _SplayTreeNodeIterator = _SplayTreeNodeIterator$(dynamic);
-
let SplayTreeSet$ = dart.generic(function(E) {
class SplayTreeSet extends dart.mixin(_SplayTree$(E), IterableMixin$(E), SetMixin$(E)) {
SplayTreeSet(compare, isValidKey) {
- if (compare === undefined) compare = null;
- if (isValidKey === undefined) isValidKey = null;
- this._comparator = (compare === null) ? core.Comparable.compare : compare;
- this._validKey = (isValidKey !== null) ? isValidKey : ((v) => dart.is(v, E));
+ if (compare === void 0)
+ compare = null;
+ if (isValidKey === void 0)
+ isValidKey = null;
+ this._comparator = compare === null ? core.Comparable.compare : compare;
+ this._validKey = isValidKey !== null ? isValidKey : (v) => dart.is(v, E);
super._SplayTree();
}
SplayTreeSet$from(elements, compare, isValidKey) {
- if (compare === undefined) compare = null;
- if (isValidKey === undefined) isValidKey = null;
+ if (compare === void 0)
+ compare = null;
+ if (isValidKey === void 0)
+ isValidKey = null;
let result = new SplayTreeSet(compare, isValidKey);
for (let element of elements) {
result.add(element);
}
return result;
}
- _compare(e1, e2) { return this._comparator(e1, e2); }
- get iterator() { return new _SplayTreeKeyIterator(this); }
- get length() { return this._count; }
- get isEmpty() { return this._root === null; }
- get isNotEmpty() { return this._root !== null; }
+ _compare(e1, e2) {
+ return this._comparator(e1, e2);
+ }
+ get iterator() {
+ return new _SplayTreeKeyIterator(this);
+ }
+ get length() {
+ return this._count;
+ }
+ get isEmpty() {
+ return this._root === null;
+ }
+ get isNotEmpty() {
+ return this._root !== null;
+ }
get first() {
- if (this._count === 0) throw _internal.IterableElementError.noElement();
+ if (this._count === 0)
+ throw _internal.IterableElementError.noElement();
return dart.as(this._first.key, E);
}
get last() {
- if (this._count === 0) throw _internal.IterableElementError.noElement();
+ if (this._count === 0)
+ throw _internal.IterableElementError.noElement();
return dart.as(this._last.key, E);
}
get single() {
- if (this._count === 0) throw _internal.IterableElementError.noElement();
- if (this._count > 1) throw _internal.IterableElementError.tooMany();
+ if (this._count === 0)
+ throw _internal.IterableElementError.noElement();
+ if (this._count > 1)
+ throw _internal.IterableElementError.tooMany();
return this._root.key;
}
contains(object) {
@@ -4188,12 +4620,14 @@ var collection;
}
add(element) {
let compare = this._splay(element);
- if (compare === 0) return false;
+ if (compare === 0)
+ return false;
this._addNewRoot(dart.as(new _SplayTreeNode(element), _SplayTreeNode$(E)), compare);
return true;
}
remove(object) {
- if (!dart.notNull(this._validKey(object))) return false;
+ if (!dart.notNull(this._validKey(object)))
+ return false;
return this._remove(dart.as(object, E)) !== null;
}
addAll(elements) {
@@ -4206,7 +4640,8 @@ var collection;
}
removeAll(elements) {
for (let element of elements) {
- if (this._validKey(element)) this._remove(dart.as(element, E));
+ if (this._validKey(element))
+ this._remove(dart.as(element, E));
}
}
retainAll(elements) {
@@ -4216,7 +4651,8 @@ var collection;
if (modificationCount !== this._modificationCount) {
throw new core.ConcurrentModificationError(this);
}
- if (dart.notNull(this._validKey(object)) && dart.notNull(this._splay(dart.as(object, E)) === 0)) retainSet.add(this._root.key);
+ if (dart.notNull(this._validKey(object)) && dart.notNull(this._splay(dart.as(object, E)) === 0))
+ retainSet.add(this._root.key);
}
if (retainSet._count !== this._count) {
this._root = retainSet._root;
@@ -4225,22 +4661,26 @@ var collection;
}
}
lookup(object) {
- if (!dart.notNull(this._validKey(object))) return dart.as(null, E);
+ if (!dart.notNull(this._validKey(object)))
+ return dart.as(null, E);
let comp = this._splay(dart.as(object, E));
- if (comp !== 0) return dart.as(null, E);
+ if (comp !== 0)
+ return dart.as(null, E);
return this._root.key;
}
intersection(other) {
let result = new SplayTreeSet(this._comparator, this._validKey);
for (let element of this) {
- if (other.contains(element)) result.add(element);
+ if (other.contains(element))
+ result.add(element);
}
return result;
}
difference(other) {
let result = new SplayTreeSet(this._comparator, this._validKey);
for (let element of this) {
- if (!dart.notNull(other.contains(element))) result.add(element);
+ if (!dart.notNull(other.contains(element)))
+ result.add(element);
}
return result;
}
@@ -4257,7 +4697,8 @@ var collection;
return set;
}
_copyNode(node) {
- if (node === null) return null;
+ if (node === null)
+ return null;
return ((_) => {
_.left = this._copyNode(node.left);
_.right = this._copyNode(node.right);
@@ -4267,14 +4708,17 @@ var collection;
clear() {
this._clear();
}
- toSet() { return this._clone(); }
- toString() { return IterableBase.iterableToFullString(this, '{', '}'); }
+ toSet() {
+ return this._clone();
+ }
+ toString() {
+ return IterableBase.iterableToFullString(this, '{', '}');
+ }
}
- dart.defineNamedConstructor(SplayTreeSet, "from");
+ dart.defineNamedConstructor(SplayTreeSet, 'from');
return SplayTreeSet;
});
let SplayTreeSet = SplayTreeSet$(dynamic);
-
// Exports:
collection.HashMapKeyIterable = HashMapKeyIterable;
collection.HashMapKeyIterable$ = HashMapKeyIterable$;
@@ -4314,16 +4758,16 @@ var collection;
collection.ListBase$ = ListBase$;
collection.ListMixin = ListMixin;
collection.ListMixin$ = ListMixin$;
- collection.MapBase$ = MapBase$;
collection.MapBase = MapBase;
+ collection.MapBase$ = MapBase$;
collection.MapMixin = MapMixin;
collection.MapMixin$ = MapMixin$;
- collection.UnmodifiableMapBase$ = UnmodifiableMapBase$;
collection.UnmodifiableMapBase = UnmodifiableMapBase;
+ collection.UnmodifiableMapBase$ = UnmodifiableMapBase$;
collection.MapView = MapView;
collection.MapView$ = MapView$;
- collection.UnmodifiableMapView$ = UnmodifiableMapView$;
collection.UnmodifiableMapView = UnmodifiableMapView;
+ collection.UnmodifiableMapView$ = UnmodifiableMapView$;
collection.Maps = Maps;
collection.Queue = Queue;
collection.Queue$ = Queue$;
« no previous file with comments | « test/codegen/expect/cascade/cascade.js ('k') | test/codegen/expect/constructors/constructors.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698