vadimtsushko avatar vadimtsushko committed 6d0faa6

Refreshed unittest

Comments (0)

Files changed (12)

tests/bson/out.js

+function Isolate() {}
+init();
+
+var $ = Isolate.$isolateProperties;
+Isolate.$defineClass("ExceptionImplementation", "Object", ["_msg"], {
+ toString$0: function() {
+  if (this._msg === (void 0)) {
+    var t0 = 'Exception';
+  } else {
+    t0 = 'Exception: ' + $.stringToString(this._msg);
+  }
+  return t0;
+ }
+});
+
+Isolate.$defineClass("FutureImpl", "Object", ["_exceptionHandlers", "_listeners", "_exceptionHandled", "_exception", "_value", "_isComplete"], {
+ _setException$1: function(exception) {
+  if (exception === (void 0)) {
+    throw $.captureStackTrace($.IllegalArgumentException$1((void 0)));
+  }
+  if (this._isComplete === true) {
+    throw $.captureStackTrace($.FutureAlreadyCompleteException$0());
+  }
+  this._exception = exception;
+  this._complete$0();
+ },
+ _setValue$1: function(value) {
+  if (this._isComplete === true) {
+    throw $.captureStackTrace($.FutureAlreadyCompleteException$0());
+  }
+  this._value = value;
+  this._complete$0();
+ },
+ _complete$0: function() {
+  this._isComplete = true;
+  if (!(this._exception === (void 0))) {
+    for (var t0 = $.iterator(this._exceptionHandlers); t0.hasNext$0() === true; ) {
+      if ($.eqB(t0.next$0().$call$1(this._exception), true)) {
+        this._exceptionHandled = true;
+        break;
+      }
+    }
+  }
+  if (this.get$hasValue() === true) {
+    for (var t1 = $.iterator(this._listeners); t1.hasNext$0() === true; ) {
+      t1.next$0().$call$1(this.get$value());
+    }
+  } else {
+    if (this._exceptionHandled !== true && $.gtB($.get$length(this._listeners), 0)) {
+      throw $.captureStackTrace(this._exception);
+    }
+  }
+ },
+ handleException$1: function(onException) {
+  if (this._exceptionHandled === true) {
+    return;
+  }
+  if (this._isComplete === true) {
+    if (!$.eqNullB(this._exception)) {
+      this._exceptionHandled = onException.$call$1(this._exception);
+    }
+  } else {
+    $.add$1(this._exceptionHandlers, onException);
+  }
+ },
+ then$1: function(onComplete) {
+  if (this.get$hasValue() === true) {
+    onComplete.$call$1(this.get$value());
+  } else {
+    if (this.get$isComplete() !== true) {
+      $.add$1(this._listeners, onComplete);
+    } else {
+      if (this._exceptionHandled !== true) {
+        throw $.captureStackTrace(this._exception);
+      }
+    }
+  }
+ },
+ get$hasValue: function() {
+  return this.get$isComplete() === true && this._exception === (void 0);
+ },
+ get$isComplete: function() {
+  return this._isComplete;
+ },
+ get$value: function() {
+  if (this.get$isComplete() !== true) {
+    throw $.captureStackTrace($.FutureNotCompleteException$0());
+  }
+  if (!(this._exception === (void 0))) {
+    throw $.captureStackTrace(this._exception);
+  }
+  return this._value;
+ }
+});
+
+Isolate.$defineClass("CompleterImpl", "Object", ["_futureImpl"], {
+ completeException$1: function(exception) {
+  this._futureImpl._setException$1(exception);
+ },
+ complete$1: function(value) {
+  this._futureImpl._setValue$1(value);
+ },
+ get$future: function() {
+  return this._futureImpl;
+ }
+});
+
+Isolate.$defineClass("HashMapImplementation", "Object", ["_numberOfDeleted", "_numberOfEntries", "_loadLimit", "_values", "_keys?"], {
+ toString$0: function() {
+  return $.mapToString(this);
+ },
+ containsKey$1: function(key) {
+  return !$.eqB(this._probeForLookup$1(key), -1);
+ },
+ getValues$0: function() {
+  var t0 = ({});
+  var list = $.List($.get$length(this));
+  $.setRuntimeTypeInfo(list, ({E: 'V'}));
+  t0.list_1 = list;
+  t0.i_2 = 0;
+  this.forEach$1(new $.Closure14(t0));
+  return t0.list_1;
+ },
+ getKeys$0: function() {
+  var t0 = ({});
+  var list = $.List($.get$length(this));
+  $.setRuntimeTypeInfo(list, ({E: 'K'}));
+  t0.list_1 = list;
+  t0.i_2 = 0;
+  this.forEach$1(new $.Closure19(t0));
+  return t0.list_1;
+ },
+ forEach$1: function(f) {
+  var length$ = $.get$length(this._keys);
+  for (var i = 0; $.ltB(i, length$); i = i + 1) {
+    var key = $.index(this._keys, i);
+    if (!(key === (void 0)) && !(key === $.CTC2)) {
+      f.$call$2(key, $.index(this._values, i));
+    }
+  }
+ },
+ get$length: function() {
+  return this._numberOfEntries;
+ },
+ isEmpty$0: function() {
+  return $.eq(this._numberOfEntries, 0);
+ },
+ remove$1: function(key) {
+  var index = this._probeForLookup$1(key);
+  if ($.geB(index, 0)) {
+    this._numberOfEntries = $.sub(this._numberOfEntries, 1);
+    var value = $.index(this._values, index);
+    $.indexSet(this._values, index, (void 0));
+    $.indexSet(this._keys, index, $.CTC2);
+    this._numberOfDeleted = $.add(this._numberOfDeleted, 1);
+    return value;
+  }
+  return;
+ },
+ operator$index$1: function(key) {
+  var index = this._probeForLookup$1(key);
+  if ($.ltB(index, 0)) {
+    return;
+  }
+  return $.index(this._values, index);
+ },
+ operator$indexSet$2: function(key, value) {
+  this._ensureCapacity$0();
+  var index = this._probeForAdding$1(key);
+  if ($.index(this._keys, index) === (void 0) || $.index(this._keys, index) === $.CTC2) {
+    this._numberOfEntries = $.add(this._numberOfEntries, 1);
+  }
+  $.indexSet(this._keys, index, key);
+  $.indexSet(this._values, index, value);
+ },
+ clear$0: function() {
+  this._numberOfEntries = 0;
+  this._numberOfDeleted = 0;
+  var length$ = $.get$length(this._keys);
+  for (var i = 0; $.ltB(i, length$); i = i + 1) {
+    $.indexSet(this._keys, i, (void 0));
+    $.indexSet(this._values, i, (void 0));
+  }
+ },
+ _grow$1: function(newCapacity) {
+  $.assert($._isPowerOfTwo(newCapacity));
+  var capacity = $.get$length(this._keys);
+  this._loadLimit = $._computeLoadLimit(newCapacity);
+  var oldKeys = this._keys;
+  if (typeof oldKeys !== 'string' && (typeof oldKeys !== 'object'||oldKeys.constructor !== Array)) return this._grow$1$bailout(newCapacity, 1, capacity, oldKeys);
+  var oldValues = this._values;
+  if (typeof oldValues !== 'string' && (typeof oldValues !== 'object'||oldValues.constructor !== Array)) return this._grow$1$bailout(newCapacity, 2, capacity, oldKeys, oldValues);
+  this._keys = $.List(newCapacity);
+  var t0 = $.List(newCapacity);
+  $.setRuntimeTypeInfo(t0, ({E: 'V'}));
+  this._values = t0;
+  for (var i = 0; $.ltB(i, capacity); i = i + 1) {
+    var t1 = oldKeys.length;
+    if (i < 0 || i >= t1) throw $.ioore(i);
+    var t2 = oldKeys[i];
+    if (t2 === (void 0) || t2 === $.CTC2) {
+      continue;
+    }
+    var t3 = oldValues.length;
+    if (i < 0 || i >= t3) throw $.ioore(i);
+    var t4 = oldValues[i];
+    var newIndex = this._probeForAdding$1(t2);
+    $.indexSet(this._keys, newIndex, t2);
+    $.indexSet(this._values, newIndex, t4);
+  }
+  this._numberOfDeleted = 0;
+ },
+ _grow$1$bailout: function(newCapacity, state, env0, env1, env2) {
+  switch (state) {
+    case 1:
+      capacity = env0;
+      oldKeys = env1;
+      break;
+    case 2:
+      capacity = env0;
+      oldKeys = env1;
+      oldValues = env2;
+      break;
+  }
+  switch (state) {
+    case 0:
+      $.assert($._isPowerOfTwo(newCapacity));
+      var capacity = $.get$length(this._keys);
+      this._loadLimit = $._computeLoadLimit(newCapacity);
+      var oldKeys = this._keys;
+    case 1:
+      state = 0;
+      var oldValues = this._values;
+    case 2:
+      state = 0;
+      this._keys = $.List(newCapacity);
+      var t0 = $.List(newCapacity);
+      $.setRuntimeTypeInfo(t0, ({E: 'V'}));
+      this._values = t0;
+      var i = 0;
+      L0: while (true) {
+        if (!$.ltB(i, capacity)) break L0;
+        c$0:{
+          var key = $.index(oldKeys, i);
+          if (key === (void 0) || key === $.CTC2) {
+            break c$0;
+          }
+          var value = $.index(oldValues, i);
+          var newIndex = this._probeForAdding$1(key);
+          $.indexSet(this._keys, newIndex, key);
+          $.indexSet(this._values, newIndex, value);
+        }
+        i = i + 1;
+      }
+      this._numberOfDeleted = 0;
+  }
+ },
+ _ensureCapacity$0: function() {
+  var newNumberOfEntries = $.add(this._numberOfEntries, 1);
+  if ($.geB(newNumberOfEntries, this._loadLimit)) {
+    this._grow$1($.mul($.get$length(this._keys), 2));
+    return;
+  }
+  var numberOfFree = $.sub($.sub($.get$length(this._keys), newNumberOfEntries), this._numberOfDeleted);
+  if ($.gtB(this._numberOfDeleted, numberOfFree)) {
+    this._grow$1($.get$length(this._keys));
+  }
+ },
+ _probeForLookup$1: function(key) {
+  for (var hash = $._firstProbe($.hashCode(key), $.get$length(this._keys)), numberOfProbes = 1; true; hash = hash0, numberOfProbes = numberOfProbes0) {
+    var numberOfProbes0 = numberOfProbes;
+    var hash0 = hash;
+    var existingKey = $.index(this._keys, hash);
+    if (existingKey === (void 0)) {
+      return -1;
+    }
+    if ($.eqB(existingKey, key)) {
+      return hash;
+    }
+    var numberOfProbes1 = numberOfProbes + 1;
+    var hash1 = $._nextProbe(hash, numberOfProbes, $.get$length(this._keys));
+    numberOfProbes0 = numberOfProbes1;
+    hash0 = hash1;
+  }
+ },
+ _probeForAdding$1: function(key) {
+  var hash = $._firstProbe($.hashCode(key), $.get$length(this._keys));
+  if (hash !== (hash | 0)) return this._probeForAdding$1$bailout(key, 1, hash);
+  for (var numberOfProbes = 1, hash0 = hash, insertionIndex = -1; true; numberOfProbes = numberOfProbes0, hash0 = hash1, insertionIndex = insertionIndex0) {
+    var numberOfProbes0 = numberOfProbes;
+    var hash1 = hash0;
+    var insertionIndex0 = insertionIndex;
+    var existingKey = $.index(this._keys, hash0);
+    if (existingKey === (void 0)) {
+      if ($.ltB(insertionIndex, 0)) {
+        return hash0;
+      }
+      return insertionIndex;
+    } else {
+      if ($.eqB(existingKey, key)) {
+        return hash0;
+      } else {
+        insertionIndex0 = insertionIndex;
+        if ($.ltB(insertionIndex, 0) && $.CTC2 === existingKey) {
+          insertionIndex0 = hash0;
+        }
+        var numberOfProbes1 = numberOfProbes + 1;
+      }
+    }
+    var hash2 = $._nextProbe(hash0, numberOfProbes, $.get$length(this._keys));
+    numberOfProbes0 = numberOfProbes1;
+    hash1 = hash2;
+  }
+ },
+ _probeForAdding$1$bailout: function(key, state, env0) {
+  switch (state) {
+    case 1:
+      hash = env0;
+      break;
+  }
+  switch (state) {
+    case 0:
+      var hash = $._firstProbe($.hashCode(key), $.get$length(this._keys));
+    case 1:
+      state = 0;
+      var numberOfProbes = 1;
+      var hash0 = hash;
+      var insertionIndex = -1;
+      L0: while (true) {
+        if (!true) break L0;
+        var numberOfProbes0 = numberOfProbes;
+        var hash1 = hash0;
+        var insertionIndex0 = insertionIndex;
+        var existingKey = $.index(this._keys, hash0);
+        if (existingKey === (void 0)) {
+          if ($.ltB(insertionIndex, 0)) {
+            return hash0;
+          }
+          return insertionIndex;
+        } else {
+          if ($.eqB(existingKey, key)) {
+            return hash0;
+          } else {
+            insertionIndex0 = insertionIndex;
+            if ($.ltB(insertionIndex, 0) && $.CTC2 === existingKey) {
+              insertionIndex0 = hash0;
+            }
+            var numberOfProbes1 = numberOfProbes + 1;
+          }
+        }
+        var hash2 = $._nextProbe(hash0, numberOfProbes, $.get$length(this._keys));
+        numberOfProbes0 = numberOfProbes1;
+        hash1 = hash2;
+        numberOfProbes = numberOfProbes0;
+        hash0 = hash1;
+        insertionIndex = insertionIndex0;
+      }
+  }
+ },
+ HashMapImplementation$0: function() {
+  this._numberOfEntries = 0;
+  this._numberOfDeleted = 0;
+  this._loadLimit = $._computeLoadLimit(8);
+  this._keys = $.List(8);
+  var t0 = $.List(8);
+  $.setRuntimeTypeInfo(t0, ({E: 'V'}));
+  this._values = t0;
+ },
+ is$Map: true
+});
+
+Isolate.$defineClass("HashSetImplementation", "Object", ["_backingMap?"], {
+ toString$0: function() {
+  return $.collectionToString(this);
+ },
+ iterator$0: function() {
+  var t0 = $.HashSetIterator$1(this);
+  $.setRuntimeTypeInfo(t0, ({E: 'E'}));
+  return t0;
+ },
+ get$length: function() {
+  return $.get$length(this._backingMap);
+ },
+ isEmpty$0: function() {
+  return $.isEmpty(this._backingMap);
+ },
+ filter$1: function(f) {
+  var t0 = ({});
+  t0.f_1 = f;
+  var result = $.HashSetImplementation$0();
+  $.setRuntimeTypeInfo(result, ({E: 'E'}));
+  t0.result_2 = result;
+  $.forEach(this._backingMap, new $.Closure26(t0));
+  return t0.result_2;
+ },
+ map$1: function(f) {
+  var t0 = ({});
+  t0.f_1 = f;
+  t0.result_2 = $.HashSetImplementation$0();
+  $.forEach(this._backingMap, new $.Closure25(t0));
+  return t0.result_2;
+ },
+ forEach$1: function(f) {
+  var t0 = ({});
+  t0.f_1 = f;
+  $.forEach(this._backingMap, new $.Closure24(t0));
+ },
+ removeAll$1: function(collection) {
+  $.forEach(collection, new $.Closure23(this));
+ },
+ remove$1: function(value) {
+  if (this._backingMap.containsKey$1(value) !== true) {
+    return false;
+  }
+  this._backingMap.remove$1(value);
+  return true;
+ },
+ contains$1: function(value) {
+  return this._backingMap.containsKey$1(value);
+ },
+ add$1: function(value) {
+  $.indexSet(this._backingMap, value, value);
+ },
+ clear$0: function() {
+  $.clear(this._backingMap);
+ },
+ HashSetImplementation$0: function() {
+  this._backingMap = $.HashMapImplementation$0();
+ },
+ is$Set: true,
+ is$Collection: true
+});
+
+Isolate.$defineClass("HashSetIterator", "Object", ["_nextValidIndex", "_entries"], {
+ _advance$0: function() {
+  var length$ = $.get$length(this._entries);
+  var entry = (void 0);
+  do {
+    var t0 = $.add(this._nextValidIndex, 1);
+    this._nextValidIndex = t0;
+    if ($.geB(t0, length$)) {
+      break;
+    }
+    entry = $.index(this._entries, this._nextValidIndex);
+  } while (entry === (void 0) || entry === $.CTC2);
+ },
+ next$0: function() {
+  if (this.hasNext$0() !== true) {
+    throw $.captureStackTrace($.CTC4);
+  }
+  var res = $.index(this._entries, this._nextValidIndex);
+  this._advance$0();
+  return res;
+ },
+ hasNext$0: function() {
+  if ($.geB(this._nextValidIndex, $.get$length(this._entries))) {
+    return false;
+  }
+  if ($.index(this._entries, this._nextValidIndex) === $.CTC2) {
+    this._advance$0();
+  }
+  return $.lt(this._nextValidIndex, $.get$length(this._entries));
+ },
+ HashSetIterator$1: function(set_) {
+  this._advance$0();
+ }
+});
+
+Isolate.$defineClass("_DeletedKeySentinel", "Object", [], {
+});
+
+Isolate.$defineClass("KeyValuePair", "Object", ["value=", "key?"], {
+});
+
+Isolate.$defineClass("LinkedHashMapImplementation", "Object", ["_map", "_list"], {
+ toString$0: function() {
+  return $.mapToString(this);
+ },
+ clear$0: function() {
+  $.clear(this._map);
+  $.clear(this._list);
+ },
+ isEmpty$0: function() {
+  return $.eq($.get$length(this), 0);
+ },
+ get$length: function() {
+  return $.get$length(this._map);
+ },
+ containsKey$1: function(key) {
+  return this._map.containsKey$1(key);
+ },
+ forEach$1: function(f) {
+  var t0 = ({});
+  t0.f_1 = f;
+  $.forEach(this._list, new $.Closure18(t0));
+ },
+ getValues$0: function() {
+  var t0 = ({});
+  var list = $.List($.get$length(this));
+  $.setRuntimeTypeInfo(list, ({E: 'V'}));
+  t0.list_1 = list;
+  t0.index_2 = 0;
+  $.forEach(this._list, new $.Closure17(t0));
+  $.assert($.eq(t0.index_2, $.get$length(this)));
+  return t0.list_1;
+ },
+ getKeys$0: function() {
+  var t0 = ({});
+  var list = $.List($.get$length(this));
+  $.setRuntimeTypeInfo(list, ({E: 'K'}));
+  t0.list_1 = list;
+  t0.index_2 = 0;
+  $.forEach(this._list, new $.Closure20(t0));
+  $.assert($.eq(t0.index_2, $.get$length(this)));
+  return t0.list_1;
+ },
+ remove$1: function(key) {
+  var entry = this._map.remove$1(key);
+  if (entry === (void 0)) {
+    return;
+  }
+  entry.remove$0();
+  return entry.get$element().get$value();
+ },
+ operator$index$1: function(key) {
+  var entry = $.index(this._map, key);
+  if (entry === (void 0)) {
+    return;
+  }
+  return entry.get$element().get$value();
+ },
+ operator$indexSet$2: function(key, value) {
+  if (this._map.containsKey$1(key) === true) {
+    $.index(this._map, key).get$element().set$value(value);
+  } else {
+    $.addLast(this._list, $.KeyValuePair$2(key, value));
+    $.indexSet(this._map, key, this._list.lastEntry$0());
+  }
+ },
+ LinkedHashMapImplementation$0: function() {
+  this._map = $.HashMapImplementation$0();
+  var t0 = $.DoubleLinkedQueue$0();
+  $.setRuntimeTypeInfo(t0, ({E: 'KeyValuePair<K, V>'}));
+  this._list = t0;
+ },
+ is$Map: true
+});
+
+Isolate.$defineClass("DoubleLinkedQueueEntry", "Object", ["_element?", "_next=", "_previous="], {
+ get$element: function() {
+  return this._element;
+ },
+ previousEntry$0: function() {
+  return this._previous._asNonSentinelEntry$0();
+ },
+ _asNonSentinelEntry$0: function() {
+  return this;
+ },
+ remove$0: function() {
+  var t0 = this._next;
+  this._previous.set$_next(t0);
+  var t1 = this._previous;
+  this._next.set$_previous(t1);
+  this._next = (void 0);
+  this._previous = (void 0);
+  return this._element;
+ },
+ prepend$1: function(e) {
+  var t0 = $.DoubleLinkedQueueEntry$1(e);
+  $.setRuntimeTypeInfo(t0, ({E: 'E'}));
+  t0._link$2(this._previous, this);
+ },
+ _link$2: function(p, n) {
+  this._next = n;
+  this._previous = p;
+  p.set$_next(this);
+  n.set$_previous(this);
+ },
+ DoubleLinkedQueueEntry$1: function(e) {
+  this._element = e;
+ }
+});
+
+Isolate.$defineClass("_DoubleLinkedQueueEntrySentinel", "DoubleLinkedQueueEntry", ["_element", "_next", "_previous"], {
+ get$element: function() {
+  throw $.captureStackTrace($.CTC3);
+ },
+ _asNonSentinelEntry$0: function() {
+  return;
+ },
+ remove$0: function() {
+  throw $.captureStackTrace($.CTC3);
+ },
+ _DoubleLinkedQueueEntrySentinel$0: function() {
+  this._link$2(this, this);
+ }
+});
+
+Isolate.$defineClass("DoubleLinkedQueue", "Object", ["_sentinel"], {
+ toString$0: function() {
+  return $.collectionToString(this);
+ },
+ iterator$0: function() {
+  var t0 = $._DoubleLinkedQueueIterator$1(this._sentinel);
+  $.setRuntimeTypeInfo(t0, ({E: 'E'}));
+  return t0;
+ },
+ filter$1: function(f) {
+  var other = $.DoubleLinkedQueue$0();
+  $.setRuntimeTypeInfo(other, ({E: 'E'}));
+  for (var entry = this._sentinel.get$_next(); !(entry === this._sentinel); entry = entry0) {
+    var entry0 = entry;
+    var nextEntry = entry.get$_next();
+    if (f.$call$1(entry.get$_element()) === true) {
+      other.addLast$1(entry.get$_element());
+    }
+    entry0 = nextEntry;
+  }
+  return other;
+ },
+ map$1: function(f) {
+  var other = $.DoubleLinkedQueue$0();
+  for (var entry = this._sentinel.get$_next(); !(entry === this._sentinel); entry = entry0) {
+    var entry0 = entry;
+    var nextEntry = entry.get$_next();
+    other.addLast$1(f.$call$1(entry.get$_element()));
+    entry0 = nextEntry;
+  }
+  return other;
+ },
+ forEach$1: function(f) {
+  for (var entry = this._sentinel.get$_next(); !(entry === this._sentinel); entry = entry0) {
+    var entry0 = entry;
+    var nextEntry = entry.get$_next();
+    f.$call$1(entry.get$_element());
+    entry0 = nextEntry;
+  }
+ },
+ clear$0: function() {
+  var t0 = this._sentinel;
+  this._sentinel.set$_next(t0);
+  var t1 = this._sentinel;
+  this._sentinel.set$_previous(t1);
+ },
+ isEmpty$0: function() {
+  return this._sentinel.get$_next() === this._sentinel;
+ },
+ get$length: function() {
+  var t0 = ({});
+  t0.counter_1 = 0;
+  this.forEach$1(new $.Closure16(t0));
+  return t0.counter_1;
+ },
+ lastEntry$0: function() {
+  return this._sentinel.previousEntry$0();
+ },
+ removeFirst$0: function() {
+  return this._sentinel.get$_next().remove$0();
+ },
+ removeLast$0: function() {
+  return this._sentinel.get$_previous().remove$0();
+ },
+ add$1: function(value) {
+  this.addLast$1(value);
+ },
+ addLast$1: function(value) {
+  this._sentinel.prepend$1(value);
+ },
+ DoubleLinkedQueue$0: function() {
+  var t0 = $._DoubleLinkedQueueEntrySentinel$0();
+  $.setRuntimeTypeInfo(t0, ({E: 'E'}));
+  this._sentinel = t0;
+ },
+ is$Collection: true
+});
+
+Isolate.$defineClass("_DoubleLinkedQueueIterator", "Object", ["_currentEntry", "_sentinel"], {
+ next$0: function() {
+  if (this.hasNext$0() !== true) {
+    throw $.captureStackTrace($.CTC4);
+  }
+  this._currentEntry = this._currentEntry.get$_next();
+  return this._currentEntry.get$element();
+ },
+ hasNext$0: function() {
+  return !(this._currentEntry.get$_next() === this._sentinel);
+ },
+ _DoubleLinkedQueueIterator$1: function(_sentinel) {
+  this._currentEntry = this._sentinel;
+ }
+});
+
+Isolate.$defineClass("StringBufferImpl", "Object", ["_length", "_buffer"], {
+ toString$0: function() {
+  if ($.get$length(this._buffer) === 0) {
+    return '';
+  }
+  if ($.get$length(this._buffer) === 1) {
+    return $.index(this._buffer, 0);
+  }
+  var result = $.concatAll(this._buffer);
+  $.clear(this._buffer);
+  $.add$1(this._buffer, result);
+  return result;
+ },
+ clear$0: function() {
+  var t0 = $.List((void 0));
+  $.setRuntimeTypeInfo(t0, ({E: 'String'}));
+  this._buffer = t0;
+  this._length = 0;
+  return this;
+ },
+ add$1: function(obj) {
+  var str = $.toString(obj);
+  if (str === (void 0) || $.isEmpty(str) === true) {
+    return this;
+  }
+  $.add$1(this._buffer, str);
+  this._length = $.add(this._length, $.get$length(str));
+  return this;
+ },
+ isEmpty$0: function() {
+  return this._length === 0;
+ },
+ get$length: function() {
+  return this._length;
+ },
+ StringBufferImpl$1: function(content$) {
+  this.clear$0();
+  this.add$1(content$);
+ }
+});
+
+Isolate.$defineClass("JSSyntaxRegExp", "Object", ["ignoreCase?", "multiLine?", "pattern?"], {
+ allMatches$1: function(str) {
+  $.checkString(str);
+  return $._AllMatchesIterable$2(this, str);
+ },
+ hasMatch$1: function(str) {
+  return $.regExpTest(this, $.checkString(str));
+ },
+ firstMatch$1: function(str) {
+  var m = $.regExpExec(this, $.checkString(str));
+  if (m === (void 0)) {
+    return;
+  }
+  var matchStart = $.regExpMatchStart(m);
+  var matchEnd = $.add(matchStart, $.get$length($.index(m, 0)));
+  return $.MatchImplementation$5(this.pattern, str, matchStart, matchEnd, m);
+ },
+ JSSyntaxRegExp$_globalVersionOf$1: function(other) {
+  $.regExpAttachGlobalNative(this);
+ },
+ is$JSSyntaxRegExp: true
+});
+
+Isolate.$defineClass("MatchImplementation", "Object", ["_groups", "_end", "_start", "str", "pattern?"], {
+ operator$index$1: function(index) {
+  return this.group$1(index);
+ },
+ group$1: function(index) {
+  return $.index(this._groups, index);
+ }
+});
+
+Isolate.$defineClass("_AllMatchesIterable", "Object", ["_str", "_re"], {
+ iterator$0: function() {
+  return $._AllMatchesIterator$2(this._re, this._str);
+ }
+});
+
+Isolate.$defineClass("_AllMatchesIterator", "Object", ["_done", "_next=", "_str", "_re"], {
+ hasNext$0: function() {
+  if (this._done === true) {
+    return false;
+  } else {
+    if (!$.eqNullB(this._next)) {
+      return true;
+    }
+  }
+  this._next = this._re.firstMatch$1(this._str);
+  if ($.eqNullB(this._next)) {
+    this._done = true;
+    return false;
+  } else {
+    return true;
+  }
+ },
+ next$0: function() {
+  if (this.hasNext$0() !== true) {
+    throw $.captureStackTrace($.CTC4);
+  }
+  var next = this._next;
+  this._next = (void 0);
+  return next;
+ }
+});
+
+Isolate.$defineClass("ListIterator", "Object", ["list", "i"], {
+ next$0: function() {
+  if (this.hasNext$0() !== true) {
+    throw $.captureStackTrace($.NoMoreElementsException$0());
+  }
+  var value = (this.list[this.i]);
+  this.i = $.add(this.i, 1);
+  return value;
+ },
+ hasNext$0: function() {
+  return $.lt(this.i, (this.list.length));
+ }
+});
+
+Isolate.$defineClass("StackTrace", "Object", ["stack"], {
+ toString$0: function() {
+  if (!$.eqNullB(this.stack)) {
+    var t0 = this.stack;
+  } else {
+    t0 = '';
+  }
+  return t0;
+ }
+});
+
+Isolate.$defineClass("Closure32", "Object", [], {
+ toString$0: function() {
+  return 'Closure';
+ }
+});
+
+Isolate.$defineClass("MetaInfo", "Object", ["set?", "tags", "tag?"], {
+});
+
+Isolate.$defineClass("StringMatch", "Object", ["pattern?", "str", "_lib2_start"], {
+ group$1: function(group_) {
+  if (!$.eqB(group_, 0)) {
+    throw $.captureStackTrace($.IndexOutOfRangeException$1(group_));
+  }
+  return this.pattern;
+ },
+ operator$index$1: function(g) {
+  return this.group$1(g);
+ }
+});
+
+Isolate.$defineClass("Object", "", [], {
+ toString$0: function() {
+  return $.objectToString(this);
+ }
+});
+
+Isolate.$defineClass("IndexOutOfRangeException", "Object", ["_index"], {
+ toString$0: function() {
+  return 'IndexOutOfRangeException: ' + $.stringToString(this._index);
+ }
+});
+
+Isolate.$defineClass("NoSuchMethodException", "Object", ["_existingArgumentNames", "_arguments", "_functionName", "_receiver"], {
+ toString$0: function() {
+  var sb = $.StringBufferImpl$1('');
+  for (var i = 0; $.ltB(i, $.get$length(this._arguments)); i = i + 1) {
+    if (i > 0) {
+      sb.add$1(', ');
+    }
+    sb.add$1($.index(this._arguments, i));
+  }
+  if (this._existingArgumentNames === (void 0)) {
+    return 'NoSuchMethodException : method not found: \'' + $.stringToString(this._functionName) + '\'\nReceiver: ' + $.stringToString(this._receiver) + '\nArguments: [' + $.stringToString(sb) + ']';
+  } else {
+    var actualParameters = sb.toString$0();
+    var sb0 = $.StringBufferImpl$1('');
+    for (var i0 = 0; $.ltB(i0, $.get$length(this._existingArgumentNames)); i0 = i0 + 1) {
+      if (i0 > 0) {
+        sb0.add$1(', ');
+      }
+      sb0.add$1($.index(this._existingArgumentNames, i0));
+    }
+    var formalParameters = sb0.toString$0();
+    return 'NoSuchMethodException: incorrect number of arguments passed to method named \'' + $.stringToString(this._functionName) + '\'\nReceiver: ' + $.stringToString(this._receiver) + '\nTried calling: ' + $.stringToString(this._functionName) + '(' + $.stringToString(actualParameters) + ')\nFound: ' + $.stringToString(this._functionName) + '(' + $.stringToString(formalParameters) + ')';
+  }
+ }
+});
+
+Isolate.$defineClass("ObjectNotClosureException", "Object", [], {
+ toString$0: function() {
+  return 'Object is not closure';
+ }
+});
+
+Isolate.$defineClass("IllegalArgumentException", "Object", ["_arg"], {
+ toString$0: function() {
+  return 'Illegal argument(s): ' + $.stringToString(this._arg);
+ }
+});
+
+Isolate.$defineClass("StackOverflowException", "Object", [], {
+ toString$0: function() {
+  return 'Stack Overflow';
+ }
+});
+
+Isolate.$defineClass("NullPointerException", "Object", ["arguments", "functionName"], {
+ get$exceptionName: function() {
+  return 'NullPointerException';
+ },
+ toString$0: function() {
+  if ($.eqNullB(this.functionName)) {
+    return this.get$exceptionName();
+  } else {
+    return '' + $.stringToString(this.get$exceptionName()) + ' : method: \'' + $.stringToString(this.functionName) + '\'\nReceiver: null\nArguments: ' + $.stringToString(this.arguments);
+  }
+ }
+});
+
+Isolate.$defineClass("NoMoreElementsException", "Object", [], {
+ toString$0: function() {
+  return 'NoMoreElementsException';
+ }
+});
+
+Isolate.$defineClass("EmptyQueueException", "Object", [], {
+ toString$0: function() {
+  return 'EmptyQueueException';
+ }
+});
+
+Isolate.$defineClass("UnsupportedOperationException", "Object", ["_message"], {
+ toString$0: function() {
+  return 'UnsupportedOperationException: ' + $.stringToString(this._message);
+ }
+});
+
+Isolate.$defineClass("IllegalJSRegExpException", "Object", ["_errmsg", "_pattern"], {
+ toString$0: function() {
+  return 'IllegalJSRegExpException: \'' + $.stringToString(this._pattern) + '\' \'' + $.stringToString(this._errmsg) + '\'';
+ }
+});
+
+Isolate.$defineClass("ExpectException", "Object", ["message?"], {
+ toString$0: function() {
+  return this.message;
+ },
+ is$ExpectException: true
+});
+
+Isolate.$defineClass("FutureNotCompleteException", "Object", [], {
+ toString$0: function() {
+  return 'Exception: future has not been completed';
+ }
+});
+
+Isolate.$defineClass("FutureAlreadyCompleteException", "Object", [], {
+ toString$0: function() {
+  return 'Exception: future already completed';
+ }
+});
+
+Isolate.$defineClass("Configuration", "Object", [], {
+ _indent$1: function(str) {
+  return $.join($.map($.split(str, '\n'), new $.Closure22()), '\n');
+ },
+ onDone$5: function(passed, failed, errors, results, uncaughtError) {
+  for (var t0 = $.iterator($._tests); t0.hasNext$0() === true; ) {
+    var t1 = t0.next$0();
+    $.print('' + $.stringToString($.toUpperCase(t1.get$result())) + ': ' + $.stringToString(t1.get$description()));
+    if (!$.eqB(t1.get$message(), '')) {
+      $.print(this._indent$1(t1.get$message()));
+    }
+    if (!$.eqNullB(t1.get$stackTrace()) && !$.eqB(t1.get$stackTrace(), '')) {
+      $.print(this._indent$1(t1.get$stackTrace()));
+    }
+  }
+  $.print('');
+  if ($.eqB(passed, 0) && $.eqB(failed, 0) && $.eqB(errors, 0)) {
+    $.print('No tests found.');
+    var success = false;
+  } else {
+    if ($.eqB(failed, 0) && $.eqB(errors, 0) && $.eqNullB(uncaughtError)) {
+      $.print('All ' + $.stringToString(passed) + ' tests passed.');
+      success = true;
+    } else {
+      if (!$.eqNullB(uncaughtError)) {
+        $.print('Top-level uncaught error: ' + $.stringToString(uncaughtError));
+      }
+      $.print('' + $.stringToString(passed) + ' PASSED, ' + $.stringToString(failed) + ' FAILED, ' + $.stringToString(errors) + ' ERRORS');
+      success = false;
+    }
+  }
+  if (!success) {
+    throw $.captureStackTrace($.ExceptionImplementation$1('Some tests failed.'));
+  }
+ },
+ onStart$0: function() {
+ },
+ onInit$0: function() {
+ }
+});
+
+Isolate.$defineClass("Expectation", "Object", ["_lib_value"], {
+ equalsCollection$1: function(expected) {
+  $.listEquals(expected, this._lib_value, (void 0));
+ },
+ equals$1: function(expected) {
+  var t0 = this._lib_value;
+  if (typeof t0 === 'string' && typeof expected === 'string') {
+    $.stringEquals(expected, this._lib_value, (void 0));
+  } else {
+    var t1 = this._lib_value;
+    if (typeof t1 === 'object' && !!t1.is$Map && (typeof expected === 'object' && !!expected.is$Map)) {
+      $.mapEquals(expected, this._lib_value, (void 0));
+    } else {
+      var t2 = this._lib_value;
+      if (typeof t2 === 'object' && !!t2.is$Set && (typeof expected === 'object' && !!expected.is$Set)) {
+        $.setEquals(expected, this._lib_value, (void 0));
+      } else {
+        $.equals(expected, this._lib_value, (void 0));
+      }
+    }
+  }
+ }
+});
+
+Isolate.$defineClass("TestCase", "Object", ["runningTime", "startTime", "currentGroup", "stackTrace?", "result?", "message?", "callbacks?", "test", "description?", "id?"], {
+ error$2: function(message, stackTrace) {
+  this.result = 'error';
+  this.message = message;
+  this.stackTrace = stackTrace;
+ },
+ fail$2: function(message, stackTrace) {
+  this.result = 'fail';
+  this.message = message;
+  this.stackTrace = stackTrace;
+ },
+ pass$0: function() {
+  this.result = 'pass';
+ },
+ get$isComplete: function() {
+  return !$.eqNullB(this.result);
+ },
+ test$0: function() { return this.test.$call$0(); }
+});
+
+Isolate.$defineClass("_Manager", "Object", ["managers?", "mainManager?", "isolates?", "supportsWorkers", "isWorker?", "fromCommandLine?", "topEventLoop?", "rootContext=", "currentContext=", "nextManagerId", "currentManagerId?", "nextIsolateId="], {
+ maybeCloseWorker$0: function() {
+  if ($.isEmpty(this.isolates) === true) {
+    this.mainManager.postMessage$1($._serializeMessage($.makeLiteralMap(['command', 'close'])));
+  }
+ },
+ _nativeInitWorkerMessageHandler$0: function() {
+      $globalThis.onmessage = function (e) {
+      _IsolateNatives._processWorkerMessage(this.mainManager, e);
+    }
+  ;
+ },
+ _nativeDetectEnvironment$0: function() {
+      this.isWorker = $isWorker;
+    this.supportsWorkers = $supportsWorkers;
+    this.fromCommandLine = typeof(window) == 'undefined';
+  ;
+ },
+ get$needSerialization: function() {
+  return this.get$useWorkers();
+ },
+ get$useWorkers: function() {
+  return this.supportsWorkers;
+ },
+ _Manager$0: function() {
+  this._nativeDetectEnvironment$0();
+  this.topEventLoop = $._EventLoop$0();
+  this.isolates = $.HashMapImplementation$0();
+  this.managers = $.HashMapImplementation$0();
+  if (this.isWorker === true) {
+    this.mainManager = $._MainManagerStub$0();
+    this._nativeInitWorkerMessageHandler$0();
+  }
+ }
+});
+
+Isolate.$defineClass("_IsolateContext", "Object", ["isolateStatics", "ports?", "id?"], {
+ unregister$1: function(portId) {
+  this.ports.remove$1(portId);
+  if ($.isEmpty(this.ports) === true) {
+    $._globalState().get$isolates().remove$1(this.id);
+  }
+ },
+ register$2: function(portId, port) {
+  if (this.ports.containsKey$1(portId) === true) {
+    throw $.captureStackTrace($.ExceptionImplementation$1('Registry: ports must be registered only once.'));
+  }
+  $.indexSet(this.ports, portId, port);
+  $.indexSet($._globalState().get$isolates(), this.id, this);
+ },
+ lookup$1: function(portId) {
+  return $.index(this.ports, portId);
+ },
+ _setGlobals$0: function() {
+  $setGlobals(this);;
+ },
+ eval$1: function(code) {
+  var old = $._globalState().get$currentContext();
+  $._globalState().set$currentContext(this);
+  this._setGlobals$0();
+  var result = (void 0);
+  try {
+    var result = code.$call$0();
+  } finally {
+    var t0 = old;
+    $._globalState().set$currentContext(t0);
+    if (!$.eqNullB(old)) {
+      old._setGlobals$0();
+    }
+  }
+  return result;
+ },
+ initGlobals$0: function() {
+  $initGlobals(this);;
+ },
+ _IsolateContext$0: function() {
+  var t0 = $._globalState();
+  var t1 = t0.get$nextIsolateId();
+  t0.set$nextIsolateId($.add(t1, 1));
+  this.id = t1;
+  this.ports = $.HashMapImplementation$0();
+  this.initGlobals$0();
+ }
+});
+
+Isolate.$defineClass("_EventLoop", "Object", ["events"], {
+ run$0: function() {
+  if ($._globalState().get$isWorker() !== true) {
+    this._runHelper$0();
+  } else {
+    try {
+      this._runHelper$0();
+    }catch (t0) {
+      var t1 = $.unwrapException(t0);
+      var e = t1;
+      var trace = $.getTraceFromException(t0);
+      $._globalState().get$mainManager().postMessage$1($._serializeMessage($.makeLiteralMap(['command', 'error', 'msg', '' + $.stringToString(e) + '\n' + $.stringToString(trace)])));
+    }
+  }
+ },
+ _runHelper$0: function() {
+  if (!$.eqNullB($._window())) {
+    new $.Closure28(this).$call$0();
+  } else {
+    for (; this.runIteration$0() === true; ) {
+    }
+  }
+ },
+ runIteration$0: function() {
+  var event$ = this.dequeue$0();
+  if ($.eqNullB(event$)) {
+    if ($._globalState().get$isWorker() === true) {
+      $._globalState().maybeCloseWorker$0();
+    } else {
+      if (!$.eqNullB($._globalState().get$rootContext()) && $._globalState().get$isolates().containsKey$1($._globalState().get$rootContext().get$id()) === true && $._globalState().get$fromCommandLine() === true && $.isEmpty($._globalState().get$rootContext().get$ports()) === true) {
+        throw $.captureStackTrace($.ExceptionImplementation$1('Program exited with open ReceivePorts.'));
+      }
+    }
+    return false;
+  }
+  event$.process$0();
+  return true;
+ },
+ dequeue$0: function() {
+  if ($.isEmpty(this.events) === true) {
+    return;
+  }
+  return this.events.removeFirst$0();
+ },
+ enqueue$3: function(isolate, fn, msg) {
+  $.addLast(this.events, $._IsolateEvent$3(isolate, fn, msg));
+ }
+});
+
+Isolate.$defineClass("_IsolateEvent", "Object", ["message?", "fn", "isolate"], {
+ process$0: function() {
+  this.isolate.eval$1(this.fn);
+ }
+});
+
+Isolate.$defineClass("_MainManagerStub", "Object", [], {
+ postMessage$1: function(msg) {
+  $globalThis.postMessage(msg);;
+ },
+ get$id: function() {
+  return 0;
+ }
+});
+
+Isolate.$defineClass("_BaseSendPort", "Object", ["_isolateId?"], {
+});
+
+Isolate.$defineClass("_NativeJsSendPort", "_BaseSendPort", ["_receivePort?", "_isolateId"], {
+ hashCode$0: function() {
+  return this._receivePort.get$_id();
+ },
+ operator$eq$1: function(other) {
+  return typeof other === 'object' && !!other.is$_NativeJsSendPort && $.eqB(this._receivePort, other._receivePort);
+ },
+ send$2: function(message, replyTo) {
+  var t0 = ({});
+  t0.replyTo_5 = replyTo;
+  t0.message_4 = message;
+  $._waitForPendingPorts([t0.message_4, t0.replyTo_5], new $.Closure6(this, t0));
+ },
+ is$_NativeJsSendPort: true
+});
+
+Isolate.$defineClass("_WorkerSendPort", "_BaseSendPort", ["_receivePortId?", "_workerId?", "_isolateId"], {
+ hashCode$0: function() {
+  return $.xor($.xor($.shl(this._workerId, 16), $.shl(this._isolateId, 8)), this._receivePortId);
+ },
+ operator$eq$1: function(other) {
+  return typeof other === 'object' && !!other.is$_WorkerSendPort && $.eqB(this._workerId, other._workerId) && $.eqB(this._isolateId, other.get$_isolateId()) && $.eqB(this._receivePortId, other.get$_receivePortId());
+ },
+ send$2: function(message, replyTo) {
+  var t0 = ({});
+  t0.replyTo_2 = replyTo;
+  t0.message_1 = message;
+  $._waitForPendingPorts([t0.message_1, t0.replyTo_2], new $.Closure15(this, t0));
+ },
+ is$_WorkerSendPort: true
+});
+
+Isolate.$defineClass("_ReceivePortImpl", "Object", ["_callback?", "_id?"], {
+ toSendPort$0: function() {
+  return $._NativeJsSendPort$2(this, $._globalState().get$currentContext().get$id());
+ },
+ close$0: function() {
+  this._callback = (void 0);
+  $._globalState().get$currentContext().unregister$1(this._id);
+ },
+ receive$1: function(onMessage) {
+  this._callback = onMessage;
+ },
+ _callback$2: function(arg0, arg1) { return this._callback.$call$2(arg0, arg1); },
+ _ReceivePortImpl$0: function() {
+  $._globalState().get$currentContext().register$2(this._id, this);
+ }
+});
+
+Isolate.$defineClass("_PendingSendPortFinder", "_MessageTraverser", ["ports?", "_taggedObjects"], {
+ visitBufferingSendPort$1: function(port) {
+  if ($.eqNullB(port.get$_port())) {
+    $.add$1(this.ports, port.get$_futurePort());
+  }
+ },
+ visitMap$1: function(map) {
+  if (!(this._getInfo$1(map) === (void 0))) {
+    return;
+  }
+  this._attachInfo$2(map, true);
+  $.forEach(map.getValues$0(), new $.Closure10(this));
+ },
+ visitList$1: function(list) {
+  if (!(this._getInfo$1(list) === (void 0))) {
+    return;
+  }
+  this._attachInfo$2(list, true);
+  $.forEach(list, new $.Closure11(this));
+ },
+ visitWorkerSendPort$1: function(port) {
+ },
+ visitNativeJsSendPort$1: function(port) {
+ },
+ visitPrimitive$1: function(x) {
+ }
+});
+
+Isolate.$defineClass("_MessageTraverser", "Object", [], {
+ _visitNativeOrWorkerPort$1: function(p) {
+  if (typeof p === 'object' && !!p.is$_NativeJsSendPort) {
+    return this.visitNativeJsSendPort$1(p);
+  }
+  if (typeof p === 'object' && !!p.is$_WorkerSendPort) {
+    return this.visitWorkerSendPort$1(p);
+  }
+  throw $.captureStackTrace('Illegal underlying port ' + $.stringToString(p));
+ },
+ _getAttachedInfo$1: function(o) {
+  return o['__MessageTraverser__attached_info__'];;
+ },
+ _setAttachedInfo$2: function(o, info) {
+  o['__MessageTraverser__attached_info__'] = info;;
+ },
+ _clearAttachedInfo$1: function(o) {
+  o['__MessageTraverser__attached_info__'] = (void 0);;
+ },
+ _dispatch$1: function(x) {
+  if ($.isPrimitive(x) === true) {
+    return this.visitPrimitive$1(x);
+  }
+  if (typeof x === 'object' && (x.constructor === Array || !!x.is$List2)) {
+    return this.visitList$1(x);
+  }
+  if (typeof x === 'object' && !!x.is$Map) {
+    return this.visitMap$1(x);
+  }
+  if (typeof x === 'object' && !!x.is$_NativeJsSendPort) {
+    return this.visitNativeJsSendPort$1(x);
+  }
+  if (typeof x === 'object' && !!x.is$_WorkerSendPort) {
+    return this.visitWorkerSendPort$1(x);
+  }
+  if (typeof x === 'object' && !!x.is$_BufferingSendPort) {
+    return this.visitBufferingSendPort$1(x);
+  }
+  throw $.captureStackTrace('Message serialization: Illegal value ' + $.stringToString(x) + ' passed');
+ },
+ _getInfo$1: function(o) {
+  return this._getAttachedInfo$1(o);
+ },
+ _attachInfo$2: function(o, info) {
+  $.add$1(this._taggedObjects, o);
+  this._setAttachedInfo$2(o, info);
+ },
+ _cleanup$0: function() {
+  var len = $.get$length(this._taggedObjects);
+  for (var i = 0; $.ltB(i, len); i = i + 1) {
+    this._clearAttachedInfo$1($.index(this._taggedObjects, i));
+  }
+  this._taggedObjects = (void 0);
+ },
+ traverse$1: function(x) {
+  if ($.isPrimitive(x) === true) {
+    return this.visitPrimitive$1(x);
+  }
+  this._taggedObjects = $.List((void 0));
+  var result = (void 0);
+  try {
+    var result = this._dispatch$1(x);
+  } finally {
+    this._cleanup$0();
+  }
+  return result;
+ }
+});
+
+Isolate.$defineClass("_Copier", "_MessageTraverser", ["_taggedObjects"], {
+ visitBufferingSendPort$1: function(port) {
+  if (!$.eqNullB(port.get$_port())) {
+    return this._visitNativeOrWorkerPort$1(port.get$_port());
+  } else {
+    throw $.captureStackTrace('internal error: must call _waitForPendingPorts to ensure all ports are resolved at this point.');
+  }
+ },
+ visitWorkerSendPort$1: function(port) {
+  return $._WorkerSendPort$3(port.get$_workerId(), port.get$_isolateId(), port.get$_receivePortId());
+ },
+ visitNativeJsSendPort$1: function(port) {
+  return $._NativeJsSendPort$2(port.get$_receivePort(), port.get$_isolateId());
+ },
+ visitMap$1: function(map) {
+  var t0 = ({});
+  t0.copy_1 = this._getInfo$1(map);
+  if (!(t0.copy_1 === (void 0))) {
+    return t0.copy_1;
+  }
+  t0.copy_1 = $.HashMapImplementation$0();
+  this._attachInfo$2(map, t0.copy_1);
+  $.forEach(map, new $.Closure13(this, t0));
+  return t0.copy_1;
+ },
+ visitList$1: function(list) {
+  if (typeof list !== 'string' && (typeof list !== 'object'||list.constructor !== Array)) return this.visitList$1$bailout(list,  0);
+  var copy = this._getInfo$1(list);
+  if (!(copy === (void 0))) {
+    return copy;
+  }
+  var len = list.length;
+  var copy0 = $.List(len);
+  this._attachInfo$2(list, copy0);
+  for (var i = 0; i < len; i = i + 1) {
+    var t0 = list.length;
+    if (i < 0 || i >= t0) throw $.ioore(i);
+    var t1 = this._dispatch$1(list[i]);
+    var t2 = copy0.length;
+    if (i < 0 || i >= t2) throw $.ioore(i);
+    copy0[i] = t1;
+  }
+  return copy0;
+ },
+ visitList$1$bailout: function(list, state, env0) {
+  switch (state) {
+    case 1:
+      t0 = env0;
+      break;
+  }
+  switch (state) {
+    case 0:
+    case 1:
+      state = 0;
+      var copy = this._getInfo$1(list);
+      if (!(copy === (void 0))) {
+        return copy;
+      }
+      var len = $.get$length(list);
+      var copy0 = $.List(len);
+      this._attachInfo$2(list, copy0);
+      var i = 0;
+      L0: while (true) {
+        if (!$.ltB(i, len)) break L0;
+        var t1 = this._dispatch$1($.index(list, i));
+        var t2 = copy0.length;
+        if (i < 0 || i >= t2) throw $.ioore(i);
+        copy0[i] = t1;
+        i = i + 1;
+      }
+      return copy0;
+  }
+ },
+ visitPrimitive$1: function(x) {
+  return x;
+ }
+});
+
+Isolate.$defineClass("_Serializer", "_MessageTraverser", ["_nextFreeRefId", "_taggedObjects"], {
+ _serializeList$1: function(list) {
+  if (typeof list !== 'string' && (typeof list !== 'object'||list.constructor !== Array)) return this._serializeList$1$bailout(list,  0);
+  var len = list.length;
+  var result = $.List(len);
+  for (var i = 0; i < len; i = i + 1) {
+    var t0 = list.length;
+    if (i < 0 || i >= t0) throw $.ioore(i);
+    var t1 = this._dispatch$1(list[i]);
+    var t2 = result.length;
+    if (i < 0 || i >= t2) throw $.ioore(i);
+    result[i] = t1;
+  }
+  return result;
+ },
+ _serializeList$1$bailout: function(list, state, env0) {
+  switch (state) {
+    case 1:
+      t0 = env0;
+      break;
+  }
+  switch (state) {
+    case 0:
+    case 1:
+      state = 0;
+      var len = $.get$length(list);
+      var result = $.List(len);
+      var i = 0;
+      L0: while (true) {
+        if (!$.ltB(i, len)) break L0;
+        var t1 = this._dispatch$1($.index(list, i));
+        var t2 = result.length;
+        if (i < 0 || i >= t2) throw $.ioore(i);
+        result[i] = t1;
+        i = i + 1;
+      }
+      return result;
+  }
+ },
+ visitBufferingSendPort$1: function(port) {
+  if (!$.eqNullB(port.get$_port())) {
+    return this._visitNativeOrWorkerPort$1(port.get$_port());
+  } else {
+    throw $.captureStackTrace('internal error: must call _waitForPendingPorts to ensure all ports are resolved at this point.');
+  }
+ },
+ visitWorkerSendPort$1: function(port) {
+  return ['sendport', port.get$_workerId(), port.get$_isolateId(), port.get$_receivePortId()];
+ },
+ visitNativeJsSendPort$1: function(port) {
+  return ['sendport', $._globalState().get$currentManagerId(), port.get$_isolateId(), port.get$_receivePort().get$_id()];
+ },
+ visitMap$1: function(map) {
+  var copyId = this._getInfo$1(map);
+  if (!(copyId === (void 0))) {
+    return ['ref', copyId];
+  }
+  var id = this._nextFreeRefId;
+  this._nextFreeRefId = $.add(id, 1);
+  this._attachInfo$2(map, id);
+  return ['map', id, this._serializeList$1(map.getKeys$0()), this._serializeList$1(map.getValues$0())];
+ },
+ visitList$1: function(list) {
+  var copyId = this._getInfo$1(list);
+  if (!(copyId === (void 0))) {
+    return ['ref', copyId];
+  }
+  var id = this._nextFreeRefId;
+  this._nextFreeRefId = $.add(id, 1);
+  this._attachInfo$2(list, id);
+  return ['list', id, this._serializeList$1(list)];
+ },
+ visitPrimitive$1: function(x) {
+  return x;
+ }
+});
+
+Isolate.$defineClass("_Deserializer", "Object", ["_deserialized"], {
+ _deserializeSendPort$1: function(x) {
+  var managerId = $.index(x, 1);
+  var isolateId = $.index(x, 2);
+  var receivePortId = $.index(x, 3);
+  if ($.eqB(managerId, $._globalState().get$currentManagerId())) {
+    var isolate = $.index($._globalState().get$isolates(), isolateId);
+    if ($.eqNullB(isolate)) {
+      return;
+    }
+    return $._NativeJsSendPort$2(isolate.lookup$1(receivePortId), isolateId);
+  } else {
+    return $._WorkerSendPort$3(managerId, isolateId, receivePortId);
+  }
+ },
+ _deserializeMap$1: function(x) {
+  var result = $.HashMapImplementation$0();
+  var id = $.index(x, 1);
+  $.indexSet(this._deserialized, id, result);
+  var keys = $.index(x, 2);
+  if (typeof keys !== 'string' && (typeof keys !== 'object'||keys.constructor !== Array)) return this._deserializeMap$1$bailout(x, 1, result, keys);
+  var values = $.index(x, 3);
+  if (typeof values !== 'string' && (typeof values !== 'object'||values.constructor !== Array)) return this._deserializeMap$1$bailout(x, 2, result, keys, values);
+  var len = keys.length;
+  $.assert(len === values.length);
+  for (var i = 0; i < len; i = i + 1) {
+    var t0 = keys.length;
+    if (i < 0 || i >= t0) throw $.ioore(i);
+    var key = this._deserializeHelper$1(keys[i]);
+    var t1 = values.length;
+    if (i < 0 || i >= t1) throw $.ioore(i);
+    result.operator$indexSet$2(key, this._deserializeHelper$1(values[i]));
+  }
+  return result;
+ },
+ _deserializeMap$1$bailout: function(x, state, env0, env1, env2) {
+  switch (state) {
+    case 1:
+      result = env0;
+      keys = env1;
+      break;
+    case 2:
+      result = env0;
+      keys = env1;
+      values = env2;
+      break;
+  }
+  switch (state) {
+    case 0:
+      var result = $.HashMapImplementation$0();
+      var id = $.index(x, 1);
+      $.indexSet(this._deserialized, id, result);
+      var keys = $.index(x, 2);
+    case 1:
+      state = 0;
+      var values = $.index(x, 3);
+    case 2:
+      state = 0;
+      var len = $.get$length(keys);
+      $.assert($.eq(len, $.get$length(values)));
+      var i = 0;
+      L0: while (true) {
+        if (!$.ltB(i, len)) break L0;
+        result.operator$indexSet$2(this._deserializeHelper$1($.index(keys, i)), this._deserializeHelper$1($.index(values, i)));
+        i = i + 1;
+      }
+      return result;
+  }
+ },
+ _deserializeList$1: function(x) {
+  var id = $.index(x, 1);
+  var dartList = $.index(x, 2);
+  if (typeof dartList !== 'object'||dartList.constructor !== Array||!!dartList.immutable$list) return this._deserializeList$1$bailout(x, 1, id, dartList);
+  $.indexSet(this._deserialized, id, dartList);
+  var len = dartList.length;
+  for (var i = 0; i < len; i = i + 1) {
+    var t0 = dartList.length;
+    if (i < 0 || i >= t0) throw $.ioore(i);
+    var t1 = this._deserializeHelper$1(dartList[i]);
+    var t2 = dartList.length;
+    if (i < 0 || i >= t2) throw $.ioore(i);
+    dartList[i] = t1;
+  }
+  return dartList;
+ },
+ _deserializeList$1$bailout: function(x, state, env0, env1) {
+  switch (state) {
+    case 1:
+      id = env0;
+      dartList = env1;
+      break;
+  }
+  switch (state) {
+    case 0:
+      var id = $.index(x, 1);
+      var dartList = $.index(x, 2);
+    case 1:
+      state = 0;
+      $.indexSet(this._deserialized, id, dartList);
+      var len = $.get$length(dartList);
+      var i = 0;
+      L0: while (true) {
+        if (!$.ltB(i, len)) break L0;
+        $.indexSet(dartList, i, this._deserializeHelper$1($.index(dartList, i)));
+        i = i + 1;
+      }
+      return dartList;
+  }
+ },
+ _deserializeRef$1: function(x) {
+  var id = $.index(x, 1);
+  var result = $.index(this._deserialized, id);
+  $.assert(!(result === (void 0)));
+  return result;
+ },
+ _deserializeHelper$1: function(x) {
+  if ($.isPrimitive2(x) === true) {
+    return x;
+  }
+  $.assert(typeof x === 'object' && (x.constructor === Array || !!x.is$List2));
+  $0:{
+    var t0 = $.index(x, 0);
+    if ('ref' === t0) {
+      return this._deserializeRef$1(x);
+    } else {
+      if ('list' === t0) {
+        return this._deserializeList$1(x);
+      } else {
+        if ('map' === t0) {
+          return this._deserializeMap$1(x);
+        } else {
+          if ('sendport' === t0) {
+            return this._deserializeSendPort$1(x);
+          } else {
+            throw $.captureStackTrace('Unexpected serialized object');
+          }
+        }
+      }
+    }
+  }
+ },
+ deserialize$1: function(x) {
+  if ($.isPrimitive2(x) === true) {
+    return x;
+  }
+  this._deserialized = $.HashMapImplementation$0();
+  return this._deserializeHelper$1(x);
+ }
+});
+
+Isolate.$defineClass("BsonObject", "Object", [], {
+ get$value: function() {
+  return;
+ }
+});
+
+Isolate.$defineClass("Binary", "BsonObject", ["subType", "offset?", "byteList?", "byteArray"], {
+ toString$0: function() {
+  return 'Binary(' + $.stringToString(this.toHexString$0()) + ')';
+ },
+ get$value: function() {
+  return this;
+ },
+ writeInt$4: function(value, numOfBytes, forceBigEndian, signed) {
+  this.encodeInt$5(this.offset, value, numOfBytes, forceBigEndian, signed);
+  this.offset = $.add(this.offset, numOfBytes);
+ },
+ writeInt$1: function(value) {
+  return this.writeInt$4(value,4,false,false)
+},
+ writeInt$2: function(value,numOfBytes) {
+  return this.writeInt$4(value,numOfBytes,false,false)
+},
+ writeInt$3$forceBigEndian: function(value,numOfBytes,forceBigEndian) {
+  return this.writeInt$4(value,numOfBytes,forceBigEndian,false)
+},
+ encodeInt$5: function(position, value, numOfBytes, forceBigEndian, signed) {
+  var bits = $.shl(numOfBytes, 3);
+  var max = $.MaxBits(bits);
+  if ($.geB(value, max) || $.ltB(value, $.neg($.div(max, 2)))) {
+    throw $.captureStackTrace($.ExceptionImplementation$1('encodeInt::overflow'));
+  }
+  $0:{
+    if (32 === bits) {
+      this.byteArray.setInt32$2(position, value);
+      break $0;
+    } else {
+      if (16 === bits) {
+        this.byteArray.setInt16$2(position, value);
+        break $0;
+      } else {
+        if (8 === bits) {
+          this.byteArray.setInt8$2(position, value);
+          break $0;
+        } else {
+          if (24 === bits) {
+            this.setIntExtended$2(value, numOfBytes);
+            break $0;
+          } else {
+            throw $.captureStackTrace($.ExceptionImplementation$1('Unsupported num of bits: ' + $.stringToString(bits)));
+          }
+        }
+      }
+    }
+  }
+  if (forceBigEndian === true) {
+    this.reverse$1(numOfBytes);
+  }
+ },
+ reverse$1: function(numOfBytes) {
+  if (typeof numOfBytes !== 'number') return this.reverse$1$bailout(numOfBytes,  0);
+  var t0 = numOfBytes - 1;
+  var t1 = new $.Closure27(this);
+  for (var t2 = $.mod(t0, 2), i = 0; i <= t2; i = i + 1) {
+    t1.$call$2(i, t0 - i);
+  }
+ },
+ reverse$1$bailout: function(numOfBytes, state, env0) {
+  switch (state) {
+    case 1:
+      t0 = env0;
+      break;
+  }
+  switch (state) {
+    case 0:
+    case 1:
+      state = 0;
+      var t1 = new $.Closure27(this);
+      var i = 0;
+      L0: while (true) {
+        if (!$.leB(i, $.mod($.sub(numOfBytes, 1), 2))) break L0;
+        t1.$call$2(i, $.sub($.sub(numOfBytes, 1), i));
+        i = i + 1;
+      }
+  }
+ },
+ setIntExtended$2: function(value, numOfBytes) {
+  var byteListTmp = $.Uint8List(8);
+  var byteArrayTmp = byteListTmp.asByteArray$0();
+  if ($.eqB(numOfBytes, 3)) {
+    byteArrayTmp.setInt32$2(0, value);
+  } else {
+    if ($.gtB(numOfBytes, 4) && $.ltB(numOfBytes, 8)) {
+      byteArrayTmp.setInt64$2(0, value);
+    } else {
+      throw $.captureStackTrace($.ExceptionImplementation$1('Unsupported num of bits: ' + $.stringToString($.mul(numOfBytes, 8))));
+    }
+  }
+  $.setRange$3(this.byteList, this.offset, numOfBytes, byteListTmp);
+ },
+ toHexString$0: function() {
+  var stringBuffer = $.StringBufferImpl$1('');
+  for (var t0 = $.iterator(this.byteList); t0.hasNext$0() === true; ) {
+    var t1 = t0.next$0();
+    if ($.ltB(t1, 16)) {
+      stringBuffer.add$1('0');
+    }
+    stringBuffer.add$1($.toRadixString(t1, 16));
+  }
+  return $.toLowerCase(stringBuffer.toString$0());
+ },
+ Binary$1: function(length$) {
+  this.byteArray = this.byteList.asByteArray$0();
+ }
+});
+
+Isolate.$defineClass("Closure", "Closure32", [], {
+ $call$0: function() {
+  $.test('testUint8ListNegativeWrite', $.testUint8ListNegativeWrite);
+  $.test('testBinary', $.testBinary);
+  $.test('testBinaryWithNegativeOne', $.testBinaryWithNegativeOne);
+ }
+});
+
+Isolate.$defineClass("Closure2", "Closure32", ["box_0"], {
+ $call$2: function(k, v) {
+  if (this.box_0.first_3 !== true) {
+    $.add$1(this.box_0.result_1, ', ');
+  }
+  this.box_0.first_3 = false;
+  $._emitObject(k, this.box_0.result_1, this.box_0.visiting_2);
+  $.add$1(this.box_0.result_1, ': ');
+  $._emitObject(v, this.box_0.result_1, this.box_0.visiting_2);
+ }
+});
+
+Isolate.$defineClass("Closure3", "Closure32", [], {
+ $call$1: function(t) {
+  return $.eq(t, $._soloTest);
+ }
+});
+
+Isolate.$defineClass("Closure4", "Closure32", [], {
+ $call$0: function() {
+  $.assert($.eq($._currentTest, 0));
+  $._testRunner.$call$0();
+ }
+});
+
+Isolate.$defineClass("Closure5", "Closure32", ["port_2", "box_0"], {
+ $call$2: function(msg, reply) {
+  this.box_0.callback_1.$call$0();
+  this.port_2.close$0();
+ }
+});
+
+Isolate.$defineClass("Closure6", "Closure32", ["this_6", "box_3"], {
+ $call$0: function() {
+  var t0 = ({});
+  $.checkReplyTo(this.box_3.replyTo_5);
+  var isolate = $.index($._globalState().get$isolates(), this.this_6.get$_isolateId());
+  if ($.eqNullB(isolate)) {
+    return;
+  }
+  if ($.eqNullB(this.this_6.get$_receivePort().get$_callback())) {
+    return;
+  }
+  var shouldSerialize = !$.eqNullB($._globalState().get$currentContext()) && !$.eqB($._globalState().get$currentContext().get$id(), this.this_6.get$_isolateId());
+  t0.msg_1 = this.box_3.message_4;
+  t0.reply_2 = this.box_3.replyTo_5;
+  if (shouldSerialize) {
+    t0.msg_1 = $._serializeMessage(t0.msg_1);
+    t0.reply_2 = $._serializeMessage(t0.reply_2);
+  }
+  $._globalState().get$topEventLoop().enqueue$3(isolate, new $.Closure12(this.this_6, t0, shouldSerialize), $.add('receive ', this.box_3.message_4));
+ }
+});
+
+Isolate.$defineClass("Closure12", "Closure32", ["this_8", "box_0", "shouldSerialize_7"], {
+ $call$0: function() {
+  if (!$.eqNullB(this.this_8.get$_receivePort().get$_callback())) {
+    if (this.shouldSerialize_7 === true) {
+      var msg = $._deserializeMessage(this.box_0.msg_1);
+      this.box_0.msg_1 = msg;
+      var reply = $._deserializeMessage(this.box_0.reply_2);
+      this.box_0.reply_2 = reply;
+    }
+    this.this_8.get$_receivePort()._callback$2(this.box_0.msg_1, this.box_0.reply_2);
+  }
+ }
+});
+
+Isolate.$defineClass("Closure7", "Closure32", ["box_0"], {
+ $call$1: function(_) {
+  return this.box_0.callback_1.$call$0();
+ }
+});
+
+Isolate.$defineClass("Closure8", "Closure32", ["box_0", "box_2"], {
+ $call$1: function(value) {
+  $.indexSet(this.box_2.values_6, this.box_0.pos_1, value);
+  var remaining = $.sub(this.box_2.remaining_5, 1);
+  this.box_2.remaining_5 = remaining;
+  if ($.eqB(remaining, 0) && this.box_2.result_4.get$isComplete() !== true) {
+    this.box_2.completer_3.complete$1(this.box_2.values_6);
+  }
+ }
+});
+
+Isolate.$defineClass("Closure9", "Closure32", ["box_2"], {
+ $call$1: function(exception) {
+  if (this.box_2.result_4.get$isComplete() !== true) {
+    this.box_2.completer_3.completeException$1(exception);
+  }
+  return true;
+ }
+});
+
+Isolate.$defineClass("Closure10", "Closure32", ["this_0"], {
+ $call$1: function(e) {
+  return this.this_0._dispatch$1(e);
+ }
+});
+
+Isolate.$defineClass("Closure11", "Closure32", ["this_0"], {
+ $call$1: function(e) {
+  return this.this_0._dispatch$1(e);
+ }
+});
+
+Isolate.$defineClass("Closure13", "Closure32", ["this_2", "box_0"], {
+ $call$2: function(key, val) {
+  $.indexSet(this.box_0.copy_1, this.this_2._dispatch$1(key), this.this_2._dispatch$1(val));
+ }
+});
+
+Isolate.$defineClass("Closure14", "Closure32", ["box_0"], {
+ $call$2: function(key, value) {
+  var t0 = this.box_0.list_1;
+  var t1 = this.box_0.i_2;
+  var i = $.add(t1, 1);
+  this.box_0.i_2 = i;
+  $.indexSet(t0, t1, value);
+ }
+});
+
+Isolate.$defineClass("Closure15", "Closure32", ["this_3", "box_0"], {
+ $call$0: function() {
+  $.checkReplyTo(this.box_0.replyTo_2);
+  var workerMessage = $._serializeMessage($.makeLiteralMap(['command', 'message', 'port', this.this_3, 'msg', this.box_0.message_1, 'replyTo', this.box_0.replyTo_2]));
+  if ($._globalState().get$isWorker() === true) {
+    $._globalState().get$mainManager().postMessage$1(workerMessage);
+  } else {
+    $.index($._globalState().get$managers(), this.this_3.get$_workerId()).postMessage$1(workerMessage);
+  }
+ }
+});
+
+Isolate.$defineClass("Closure16", "Closure32", ["box_0"], {
+ $call$1: function(element) {
+  var counter = $.add(this.box_0.counter_1, 1);
+  this.box_0.counter_1 = counter;
+ }
+});
+
+Isolate.$defineClass("Closure17", "Closure32", ["box_0"], {
+ $call$1: function(entry) {
+  var t0 = this.box_0.list_1;
+  var t1 = this.box_0.index_2;
+  var index = $.add(t1, 1);
+  this.box_0.index_2 = index;
+  $.indexSet(t0, t1, entry.get$value());
+ }
+});
+
+Isolate.$defineClass("Closure18", "Closure32", ["box_0"], {
+ $call$1: function(entry) {
+  this.box_0.f_1.$call$2(entry.get$key(), entry.get$value());
+ }
+});
+
+Isolate.$defineClass("Closure19", "Closure32", ["box_0"], {
+ $call$2: function(key, value) {
+  var t0 = this.box_0.list_1;
+  var t1 = this.box_0.i_2;
+  var i = $.add(t1, 1);
+  this.box_0.i_2 = i;
+  $.indexSet(t0, t1, key);
+ }
+});
+
+Isolate.$defineClass("Closure20", "Closure32", ["box_0"], {
+ $call$1: function(entry) {
+  var t0 = this.box_0.list_1;
+  var t1 = this.box_0.index_2;
+  var index = $.add(t1, 1);
+  this.box_0.index_2 = index;
+  $.indexSet(t0, t1, entry.get$key());
+ }
+});
+
+Isolate.$defineClass("Closure21", "Closure32", ["testCase_0"], {
+ $call$0: function() {
+  $._callbacksCalled = 0;
+  $._state = 2;
+  this.testCase_0.test$0();
+  if (!$.eqB($._state, 3)) {
+    if ($.eqB(this.testCase_0.get$callbacks(), $._callbacksCalled)) {
+      this.testCase_0.pass$0();
+    }
+  }
+ }
+});
+
+Isolate.$defineClass("Closure22", "Closure32", [], {
+ $call$1: function(line) {
+  return '  ' + $.stringToString(line);
+ }
+});
+
+Isolate.$defineClass("Closure23", "Closure32", ["this_0"], {
+ $call$1: function(value) {
+  this.this_0.remove$1(value);
+ }
+});
+
+Isolate.$defineClass("Closure24", "Closure32", ["box_0"], {
+ $call$2: function(key, value) {
+  this.box_0.f_1.$call$1(key);
+ }
+});
+
+Isolate.$defineClass("Closure25", "Closure32", ["box_0"], {
+ $call$2: function(key, value) {
+  $.add$1(this.box_0.result_2, this.box_0.f_1.$call$1(key));
+ }
+});
+
+Isolate.$defineClass("Closure26", "Closure32", ["box_0"], {
+ $call$2: function(key, value) {
+  if (this.box_0.f_1.$call$1(key) === true) {
+    $.add$1(this.box_0.result_2, key);
+  }
+ }
+});
+
+Isolate.$defineClass("Closure27", "Closure32", ["this_0"], {
+ $call$2: function(x, y) {
+  var t = $.index(this.this_0.get$byteList(), $.add(x, this.this_0.get$offset()));
+  $.indexSet(this.this_0.get$byteList(), $.add(x, this.this_0.get$offset()), $.index(this.this_0.get$byteList(), $.add(y, this.this_0.get$offset())));
+  $.indexSet(this.this_0.get$byteList(), $.add(y, this.this_0.get$offset()), t);
+ }
+});
+
+Isolate.$defineClass("Closure28", "Closure32", ["this_0"], {
+ $call$0: function() {
+  if (this.this_0.runIteration$0() !== true) {
+    return;
+  }
+  $._window().setTimeout$2(this, 0);
+ }
+});
+
+Isolate.$defineClass("Closure29", "Closure32", ["box_0"], {
+ $call$0: function() {
+  return this.box_0.closure_1.$call$0();
+ }
+});
+
+Isolate.$defineClass("Closure30", "Closure32", ["box_0"], {
+ $call$0: function() {
+  return this.box_0.closure_1.$call$1(this.box_0.arg1_2);
+ }
+});
+
+Isolate.$defineClass("Closure31", "Closure32", ["box_0"], {
+ $call$0: function() {
+  return this.box_0.closure_1.$call$2(this.box_0.arg1_2, this.box_0.arg2_3);
+ }
+});
+
+$.mul$slow = function(a, b) {
+  if ($.checkNumbers(a, b) === true) {
+    return a * b;
+  }
+  return a.operator$mul$1(b);
+};
+
+$.FutureImpl$0 = function() {
+  var t0 = [];
+  return new $.FutureImpl([], t0, false, (void 0), (void 0), false);
+};
+
+$.startRootIsolate = function(entry) {
+  var t0 = $._Manager$0();
+  $._globalState2(t0);
+  if ($._globalState().get$isWorker() === true) {
+    return;
+  }
+  var rootContext = $._IsolateContext$0();
+  $._globalState().set$rootContext(rootContext);
+  $._fillStatics(rootContext);
+  $._globalState().set$currentContext(rootContext);
+  rootContext.eval$1(entry);
+  $._globalState().get$topEventLoop().run$0();
+};
+
+$.iae = function(argument) {
+  throw $.captureStackTrace($.IllegalArgumentException$1(argument));
+};
+
+$._IsolateContext$0 = function() {
+  var t0 = new $._IsolateContext((void 0), (void 0), (void 0));
+  t0._IsolateContext$0();
+  return t0;
+};
+
+$._window = function() {
+  return typeof window != 'undefined' ? window : (void 0);;
+};
+
+$.equals = function(expected, actual, reason) {
+  if ($.eqB(expected, actual)) {
+    return;
+  }
+  var msg = $._getMessage(reason);
+  $._fail('Expect.equals(expected: <' + $.stringToString(expected) + '>, actual: <' + $.stringToString(actual) + '>' + $.stringToString(msg) + ') fails.');
+};
+
+$.floor = function(receiver) {
+  if (!(typeof receiver === 'number')) {
+    return receiver.floor$0();
+  }
+  return Math.floor(receiver);
+};
+
+$.truncate = function(receiver) {
+  if (!(typeof receiver === 'number')) {
+    return receiver.truncate$0();
+  }
+  if (receiver < 0) {
+    var t0 = $.ceil(receiver);
+  } else {
+    t0 = $.floor(receiver);
+  }
+  return t0;
+};
+
+$.isNaN = function(receiver) {
+  if (typeof receiver === 'number') {
+    return isNaN(receiver);
+  } else {
+    return receiver.isNegative$0();
+  }
+};
+
+$.eqB = function(a, b) {
+  if (typeof a === "object") {
+    if (!!a.operator$eq$1) {
+      return a.operator$eq$1(b) === true;
+    } else {
+      return a === b;
+    }
+  }
+  return a === b;
+};
+
+$.HashSetImplementation$from = function(other) {
+  var set = $.HashSetImplementation$0();
+  $.setRuntimeTypeInfo(set, ({E: 'E'}));
+  for (var t0 = $.iterator(other); t0.hasNext$0() === true; ) {
+    set.add$1(t0.next$0());
+  }
+  return set;
+};
+
+$._containsRef = function(c, ref) {
+  for (var t0 = $.iterator(c); t0.hasNext$0() === true; ) {
+    if (t0.next$0() === ref) {
+      return true;
+    }
+  }
+  return false;
+};
+
+$.allMatchesInStringUnchecked = function(needle, haystack) {
+  var result = $.List((void 0));
+  $.setRuntimeTypeInfo(result, ({E: 'Match'}));
+  var length$ = $.get$length(haystack);
+  var patternLength = $.get$length(needle);
+  if (patternLength !== (patternLength | 0)) return $.allMatchesInStringUnchecked$bailout(needle, haystack, 1, length$, result, patternLength);
+  for (var startIndex = 0; true; startIndex = startIndex0) {
+    var startIndex0 = startIndex;
+    var position = $.indexOf$2(haystack, needle, startIndex);
+    if ($.eqB(position, -1)) {
+      break;
+    }
+    result.push($.StringMatch$3(position, haystack, needle));
+    var endIndex = $.add(position, patternLength);
+    if ($.eqB(endIndex, length$)) {
+      break;
+    } else {
+      if ($.eqB(position, endIndex)) {
+        startIndex0 = $.add(startIndex, 1);
+      } else {
+        startIndex0 = endIndex;
+      }
+    }
+  }
+  return result;
+};
+
+$.le$slow = function(a, b) {
+  if ($.checkNumbers(a, b) === true) {
+    return a <= b;
+  }
+  return a.operator$le$1(b);
+};
+
+$.testBinary = function() {
+  var b = $.Binary$1(8);
+  b.writeInt$2(0, 4);
+  b.writeInt$2(1, 4);
+  $.equals(b.toHexString$0(), '0000000001000000', (void 0));
+  $.Binary$1(8).writeInt$2(0, 4);
+  var b0 = $.Binary$1(8);
+  b0.writeInt$2(0, 4);
+  b0.writeInt$2(16909060, 4);
+  $.equals(b0.toHexString$0(), '0000000004030201', (void 0));
+  var b1 = $.Binary$1(8);
+  b1.writeInt$2(0, 4);
+  b1.writeInt$3$forceBigEndian(16909060, 4, true);
+  $.equals(b1.toHexString$0(), '0000000001020304', (void 0));
+  var b2 = $.Binary$1(8);
+  b2.writeInt$2(0, 4);
+  b2.writeInt$3$forceBigEndian(1, 4, true);
+  $.equals(b2.toHexString$0(), '0000000000000001', (void 0));
+  var b3 = $.Binary$1(8);
+  b3.writeInt$3$forceBigEndian(1, 3, true);
+  $.equals('0000010000000000', b3.toHexString$0(), (void 0));
+  var b4 = $.Binary$1(8);
+  b4.writeInt$2(0, 3);
+  b4.writeInt$3$forceBigEndian(1, 3, true);
+  $.equals('0000000000010000', b4.toHexString$0(), (void 0));
+  var b5 = $.Binary$1(4);
+  b5.writeInt$1(-1);
+  $.expect(b5.toHexString$0()).equals$1('ffffffff');
+  var b6 = $.Binary$1(4);
+  b6.writeInt$1(-100);
+  $.expect(b6.toHexString$0()).equals$1('9cffffff');
+};
+
+$.setEquals = function(expected, actual, reason) {
+  var missingSet = $.HashSetImplementation$from(expected);
+  missingSet.removeAll$1(actual);
+  var extraSet = $.HashSetImplementation$from(actual);
+  extraSet.removeAll$1(expected);
+  if ($.isEmpty(extraSet) === true && $.isEmpty(missingSet) === true) {
+    return;
+  }
+  var sb = $.StringBufferImpl$1('Expect.setEquals(' + $.stringToString($._getMessage(reason)) + ') fails');
+  if ($.isEmpty(missingSet) !== true) {
+    sb.add$1('\nExpected collection does not contain: ');
+  }
+  for (var t0 = $.iterator(missingSet); t0.hasNext$0() === true; ) {
+    sb.add$1('' + $.stringToString(t0.next$0()) + ' ');
+  }
+  if ($.isEmpty(extraSet) !== true) {
+    sb.add$1('\nExpected collection should not contain: ');
+  }
+  for (var t1 = $.iterator(extraSet); t1.hasNext$0() === true; ) {
+    sb.add$1('' + $.stringToString(t1.next$0()) + ' ');
+  }
+  $._fail(sb.toString$0());
+};
+
+$.isJsArray = function(value) {
+  return !(value === (void 0)) && (value.constructor === Array);
+};
+
+$.indexSet$slow = function(a, index, value) {
+  if ($.isJsArray(a) === true) {
+    if (!((typeof index === 'number') && (index === (index | 0)))) {
+      throw $.captureStackTrace($.IllegalArgumentException$1(index));
+    }
+    if (index < 0 || $.geB(index, $.get$length(a))) {
+      throw $.captureStackTrace($.IndexOutOfRangeException$1(index));
+    }
+    $.checkMutable(a, 'indexed set');
+    a[index] = value;
+    return;
+  }
+  a.operator$indexSet$2(index, value);
+};
+
+$._nextProbe = function(currentProbe, numberOfProbes, length$) {
+  return $.and($.add(currentProbe, numberOfProbes), $.sub(length$, 1));
+};
+
+$._AllMatchesIterable$2 = function(_re, _str) {
+  return new $._AllMatchesIterable(_str, _re);
+};
+
+$.allMatches = function(receiver, str) {
+  if (!(typeof receiver === 'string')) {
+    return receiver.allMatches$1(str);
+  }
+  $.checkString(str);
+  return $.allMatchesInStringUnchecked(receiver, str);
+};
+
+$.copy = function(src, srcStart, dst, dstStart, count) {
+  if (typeof src !== 'string' && (typeof src !== 'object'||src.constructor !== Array)) return $.copy$bailout(src, srcStart, dst, dstStart, count,  0);
+  if (typeof dst !== 'object'||dst.constructor !== Array||!!dst.immutable$list) return $.copy$bailout(src, srcStart, dst, dstStart, count,  0);
+  if (typeof count !== 'number') return $.copy$bailout(src, srcStart, dst, dstStart, count,  0);
+  var srcStart0 = srcStart;
+  if (srcStart === (void 0)) {
+    srcStart0 = 0;
+  }
+  var dstStart0 = dstStart;
+  if (dstStart === (void 0)) {
+    dstStart0 = 0;
+  }
+  if ($.ltB(srcStart0, dstStart0)) {
+    for (var i = $.sub($.add(srcStart0, count), 1), i0 = i, j = $.sub($.add(dstStart0, count), 1); $.geB(i0, srcStart0); i1 = $.sub(i0, 1), i0 = i1, j = $.sub(j, 1)) {
+      if (i0 !== (i0 | 0)) throw $.iae(i0);
+      var t0 = src.length;
+      if (i0 < 0 || i0 >= t0) throw $.ioore(i0);
+      var t1 = src[i0];
+      if (j !== (j | 0)) throw $.iae(j);
+      var t2 = dst.length;
+      if (j < 0 || j >= t2) throw $.ioore(j);
+      dst[j] = t1;
+    }
+  } else {
+    for (var i2 = srcStart0, j0 = dstStart0; $.ltB(i2, $.add(srcStart0, count)); i3 = $.add(i2, 1), i2 = i3, j0 = $.add(j0, 1)) {
+      if (i2 !== (i2 | 0)) throw $.iae(i2);
+      var t3 = src.length;
+      if (i2 < 0 || i2 >= t3) throw $.ioore(i2);
+      var t4 = src[i2];
+      if (j0 !== (j0 | 0)) throw $.iae(j0);
+      var t5 = dst.length;
+      if (j0 < 0 || j0 >= t5) throw $.ioore(j0);
+      dst[j0] = t4;
+    }
+  }
+  var i3, i1;
+};
+
+$.listEquals = function(expected, actual, reason) {
+  if (typeof expected !== 'string' && (typeof expected !== 'object'||expected.constructor !== Array)) return $.listEquals$bailout(expected, actual, reason,  0);
+  if (typeof actual !== 'string' && (typeof actual !== 'object'||actual.constructor !== Array)) return $.listEquals$bailout(expected, actual, reason,  0);
+  var msg = $._getMessage(reason);
+  var n = $.min(expected.length, actual.length);
+  for (var i = 0; $.ltB(i, n); i = i + 1) {
+    var t0 = expected.length;
+    if (i < 0 || i >= t0) throw $.ioore(i);
+    var t1 = expected[i];
+    var t2 = actual.length;
+    if (i < 0 || i >= t2) throw $.ioore(i);
+    if (!$.eqB(t1, actual[i])) {
+      var t3 = 'Expect.listEquals(at index ' + $.stringToString(i) + ', expected: <';
+      var t4 = expected.length;
+      if (i < 0 || i >= t4) throw $.ioore(i);
+      var t5 = t3 + $.stringToString(expected[i]) + '>, actual: <';
+      var t6 = actual.length;
+      if (i < 0 || i >= t6) throw $.ioore(i);
+      $._fail(t5 + $.stringToString(actual[i]) + '>' + $.stringToString(msg) + ') fails');
+    }
+  }
+  if (!(expected.length === actual.length)) {
+    $._fail('Expect.listEquals(list length, expected: <' + $.stringToString(expected.length) + '>, actual: <' + $.stringToString(actual.length) + '>' + $.stringToString(msg) + ') fails');
+  }
+};
+
+$.dynamicSetMetadata = function(inputTable) {
+  var t0 = $.buildDynamicMetadata(inputTable);
+  $._dynamicMetadata(t0);
+};
+
+$.substringUnchecked = function(receiver, startIndex, endIndex) {
+  return receiver.substring(startIndex, endIndex);
+};
+
+$.get$length = function(receiver) {
+  if (typeof receiver === 'string' || $.isJsArray(receiver) === true) {
+    return receiver.length;
+  } else {
+    return receiver.get$length();
+  }
+};
+
+$._runTests = function() {