| Index: lib/runtime/dart/collection.js
|
| diff --git a/lib/runtime/dart/collection.js b/lib/runtime/dart/collection.js
|
| index 35ff705a774cb8750810faf69b1d07535751757a..d315fe2f42cab5b69de2a17a978e365e4f30f674 100644
|
| --- a/lib/runtime/dart/collection.js
|
| +++ b/lib/runtime/dart/collection.js
|
| @@ -60,7 +60,7 @@ dart_library.library('dart/collection', null, /* Imports */[
|
| }
|
| hashCode = _defaultHashCode;
|
| } else {
|
| - if (dart.notNull(core.identical(core.identityHashCode, hashCode)) && dart.notNull(core.identical(core.identical, equals))) {
|
| + if (core.identical(core.identityHashCode, hashCode) && core.identical(core.identical, equals)) {
|
| return new (_IdentityHashMap$(K, V))();
|
| }
|
| if (equals == null) {
|
| @@ -266,7 +266,7 @@ dart_library.library('dart/collection', null, /* Imports */[
|
| buffer.write(`${iterator.current}`);
|
| }
|
| }
|
| - return dart.toString(buffer);
|
| + return buffer.toString();
|
| }
|
| any(test) {
|
| dart.as(test, dart.functionType(core.bool, [E]));
|
| @@ -483,7 +483,7 @@ dart_library.library('dart/collection', null, /* Imports */[
|
| }
|
| hashCode = _defaultHashCode;
|
| } else {
|
| - if (dart.notNull(core.identical(core.identityHashCode, hashCode)) && dart.notNull(core.identical(core.identical, equals))) {
|
| + if (core.identical(core.identityHashCode, hashCode) && core.identical(core.identical, equals)) {
|
| return new (_IdentityHashSet$(E))();
|
| }
|
| if (equals == null) {
|
| @@ -591,7 +591,7 @@ dart_library.library('dart/collection', null, /* Imports */[
|
| buffer.write(`${iterator.current}`);
|
| }
|
| }
|
| - return dart.toString(buffer);
|
| + return buffer.toString();
|
| }
|
| any(f) {
|
| dart.as(f, dart.functionType(core.bool, [E]));
|
| @@ -845,7 +845,7 @@ dart_library.library('dart/collection', null, /* Imports */[
|
| buffer.write(`${iterator.current}`);
|
| }
|
| }
|
| - return dart.toString(buffer);
|
| + return buffer.toString();
|
| }
|
| any(f) {
|
| dart.as(f, dart.functionType(core.bool, [E]));
|
| @@ -1009,11 +1009,11 @@ dart_library.library('dart/collection', null, /* Imports */[
|
| IterableBase$()._toStringVisiting[dartx.removeLast]();
|
| }
|
| buffer.write(rightDelimiter);
|
| - return dart.toString(buffer);
|
| + return buffer.toString();
|
| }
|
| static _isToStringVisiting(o) {
|
| for (let i = 0; i < dart.notNull(IterableBase$()._toStringVisiting[dartx.length]); i++) {
|
| - if (dart.notNull(core.identical(o, IterableBase$()._toStringVisiting[dartx.get](i)))) return true;
|
| + if (core.identical(o, IterableBase$()._toStringVisiting[dartx.get](i))) return true;
|
| }
|
| return false;
|
| }
|
| @@ -1220,7 +1220,7 @@ dart_library.library('dart/collection', null, /* Imports */[
|
| }
|
| hashCode = _defaultHashCode;
|
| } else {
|
| - if (dart.notNull(core.identical(core.identityHashCode, hashCode)) && dart.notNull(core.identical(core.identical, equals))) {
|
| + if (core.identical(core.identityHashCode, hashCode) && core.identical(core.identical, equals)) {
|
| return new (_LinkedIdentityHashMap$(K, V))();
|
| }
|
| if (equals == null) {
|
| @@ -1294,7 +1294,7 @@ dart_library.library('dart/collection', null, /* Imports */[
|
| }
|
| hashCode = _defaultHashCode;
|
| } else {
|
| - if (dart.notNull(core.identical(core.identityHashCode, hashCode)) && dart.notNull(core.identical(core.identical, equals))) {
|
| + if (core.identical(core.identityHashCode, hashCode) && core.identical(core.identical, equals)) {
|
| return new (_LinkedIdentityHashSet$(E))();
|
| }
|
| if (equals == null) {
|
| @@ -1380,7 +1380,7 @@ dart_library.library('dart/collection', null, /* Imports */[
|
| clear() {
|
| this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1;
|
| let next = this[_next];
|
| - while (!dart.notNull(core.identical(next, this))) {
|
| + while (!core.identical(next, this)) {
|
| let entry = dart.as(next, E);
|
| next = entry[_next];
|
| entry[_next] = entry[_previous] = entry[_list] = null;
|
| @@ -1389,22 +1389,22 @@ dart_library.library('dart/collection', null, /* Imports */[
|
| this[_length] = 0;
|
| }
|
| get first() {
|
| - if (dart.notNull(core.identical(this[_next], this))) {
|
| + if (core.identical(this[_next], this)) {
|
| dart.throw(new core.StateError('No such element'));
|
| }
|
| return dart.as(this[_next], E);
|
| }
|
| get last() {
|
| - if (dart.notNull(core.identical(this[_previous], this))) {
|
| + if (core.identical(this[_previous], this)) {
|
| dart.throw(new core.StateError('No such element'));
|
| }
|
| return dart.as(this[_previous], E);
|
| }
|
| get single() {
|
| - if (dart.notNull(core.identical(this[_previous], this))) {
|
| + if (core.identical(this[_previous], this)) {
|
| dart.throw(new core.StateError('No such element'));
|
| }
|
| - if (!dart.notNull(core.identical(this[_previous], this[_next]))) {
|
| + if (!core.identical(this[_previous], this[_next])) {
|
| dart.throw(new core.StateError('Too many elements'));
|
| }
|
| return dart.as(this[_next], E);
|
| @@ -1413,7 +1413,7 @@ dart_library.library('dart/collection', null, /* Imports */[
|
| dart.as(action, dart.functionType(dart.void, [E]));
|
| let modificationCount = this[_modificationCount];
|
| let current = this[_next];
|
| - while (!dart.notNull(core.identical(current, this))) {
|
| + while (!core.identical(current, this)) {
|
| action(dart.as(current, E));
|
| if (modificationCount != this[_modificationCount]) {
|
| dart.throw(new core.ConcurrentModificationError(this));
|
| @@ -1487,7 +1487,7 @@ dart_library.library('dart/collection', null, /* Imports */[
|
| return this[_current];
|
| }
|
| moveNext() {
|
| - if (dart.notNull(core.identical(this[_next], this[_list]))) {
|
| + if (core.identical(this[_next], this[_list])) {
|
| this[_current] = null;
|
| return false;
|
| }
|
| @@ -1527,12 +1527,12 @@ dart_library.library('dart/collection', null, /* Imports */[
|
| this[_list][_unlink](this);
|
| }
|
| get next() {
|
| - if (dart.notNull(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 (dart.notNull(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) {
|
| @@ -2501,7 +2501,7 @@ dart_library.library('dart/collection', null, /* Imports */[
|
| dart.assert(core.identical(IterableBase._toStringVisiting[dartx.last], m));
|
| IterableBase._toStringVisiting[dartx.removeLast]();
|
| }
|
| - return dart.toString(result);
|
| + return result.toString();
|
| }
|
| static _id(x) {
|
| return x;
|
| @@ -2718,7 +2718,7 @@ dart_library.library('dart/collection', null, /* Imports */[
|
| }
|
| remove(o) {
|
| let entry = this[_sentinel][_next];
|
| - while (!dart.notNull(core.identical(entry, this[_sentinel]))) {
|
| + while (!core.identical(entry, this[_sentinel])) {
|
| if (dart.equals(entry.element, o)) {
|
| entry.remove();
|
| this[_elementCount] = dart.notNull(this[_elementCount]) - 1;
|
| @@ -2731,9 +2731,9 @@ dart_library.library('dart/collection', null, /* Imports */[
|
| [_filter](test, removeMatching) {
|
| dart.as(test, dart.functionType(core.bool, [E]));
|
| let entry = this[_sentinel][_next];
|
| - while (!dart.notNull(core.identical(entry, this[_sentinel]))) {
|
| + while (!core.identical(entry, this[_sentinel])) {
|
| let next = entry[_next];
|
| - if (dart.notNull(core.identical(removeMatching, test(entry.element)))) {
|
| + if (core.identical(removeMatching, test(entry.element))) {
|
| entry.remove();
|
| this[_elementCount] = dart.notNull(this[_elementCount]) - 1;
|
| }
|
| @@ -2755,7 +2755,7 @@ dart_library.library('dart/collection', null, /* Imports */[
|
| return this[_sentinel][_previous].element;
|
| }
|
| get single() {
|
| - if (dart.notNull(core.identical(this[_sentinel][_next], this[_sentinel][_previous]))) {
|
| + if (core.identical(this[_sentinel][_next], this[_sentinel][_previous])) {
|
| return this[_sentinel][_next].element;
|
| }
|
| dart.throw(_internal.IterableElementError.tooMany());
|
| @@ -2777,7 +2777,7 @@ dart_library.library('dart/collection', null, /* Imports */[
|
| forEachEntry(f) {
|
| dart.as(f, dart.functionType(dart.void, [DoubleLinkedQueueEntry$(E)]));
|
| let entry = this[_sentinel][_next];
|
| - while (!dart.notNull(core.identical(entry, this[_sentinel]))) {
|
| + while (!core.identical(entry, this[_sentinel])) {
|
| let nextEntry = entry[_next];
|
| f(entry);
|
| entry = nextEntry;
|
| @@ -2833,7 +2833,7 @@ dart_library.library('dart/collection', null, /* Imports */[
|
| this[_current] = null;
|
| }
|
| moveNext() {
|
| - if (!dart.notNull(core.identical(this[_nextEntry], this[_sentinel]))) {
|
| + if (!core.identical(this[_nextEntry], this[_sentinel])) {
|
| this[_current] = this[_nextEntry][_element];
|
| this[_nextEntry] = this[_nextEntry][_next];
|
| return true;
|
| @@ -3000,7 +3000,7 @@ dart_library.library('dart/collection', null, /* Imports */[
|
| let element = this[_table][dartx.get](i);
|
| let remove = core.identical(removeMatching, test(element));
|
| this[_checkModification](modificationCount);
|
| - if (dart.notNull(remove)) {
|
| + if (remove) {
|
| i = this[_remove](i);
|
| modificationCount = this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1;
|
| } else {
|
| @@ -4360,7 +4360,7 @@ dart_library.library('dart/collection', null, /* Imports */[
|
| if (bucket == null) return -1;
|
| let length = bucket.length;
|
| for (let i = 0; i < length; i = i + 2) {
|
| - if (dart.notNull(core.identical(bucket[i], key))) return i;
|
| + if (core.identical(bucket[i], key)) return i;
|
| }
|
| return -1;
|
| }
|
| @@ -4838,7 +4838,7 @@ dart_library.library('dart/collection', null, /* Imports */[
|
| let length = bucket.length;
|
| for (let i = 0; i < length; i++) {
|
| let cell = dart.as(bucket[i], LinkedHashMapCell);
|
| - if (dart.notNull(core.identical(cell[_key], key))) return i;
|
| + if (core.identical(cell[_key], key)) return i;
|
| }
|
| return -1;
|
| }
|
| @@ -5265,7 +5265,7 @@ dart_library.library('dart/collection', null, /* Imports */[
|
| if (bucket == null) return -1;
|
| let length = bucket.length;
|
| for (let i = 0; i < length; i++) {
|
| - if (dart.notNull(core.identical(bucket[i], element))) return i;
|
| + if (core.identical(bucket[i], element)) return i;
|
| }
|
| return -1;
|
| }
|
| @@ -5685,7 +5685,7 @@ dart_library.library('dart/collection', null, /* Imports */[
|
| let length = bucket.length;
|
| for (let i = 0; i < length; i++) {
|
| let cell = dart.as(bucket[i], LinkedHashSetCell);
|
| - if (dart.notNull(core.identical(cell[_element], element))) return i;
|
| + if (core.identical(cell[_element], element)) return i;
|
| }
|
| return -1;
|
| }
|
|
|