Chromium Code Reviews| Index: frog/frogsh |
| diff --git a/frog/frogsh b/frog/frogsh |
| index dc6d0e4a7adbdc1f26dc52b592c8095f8e13733a..20cae6933af10851ba056491eeb535676de15d32 100755 |
| --- a/frog/frogsh |
| +++ b/frog/frogsh |
| @@ -109,7 +109,7 @@ function $toDartException(e) { |
| return res; |
| } |
| function $notnull_bool(test) { |
| - return typeof(test) == 'boolean' ? test : test.is$bool(); |
| + return (test === true || test === false) ? test : test.is$bool(); |
| } |
| function $assert(test, text, url, line, column) { |
| if (typeof test == 'function') test = test(); |
| @@ -265,8 +265,8 @@ function NoSuchMethodException(_receiver, _functionName, _arguments) { |
| NoSuchMethodException.prototype.toString = function() { |
| var sb = new StringBufferImpl(""); |
| for (var i = 0; |
| - $notnull_bool(i < this._arguments.length); i++) { |
| - if ($notnull_bool(i > 0)) { |
| + i < this._arguments.length; i++) { |
|
jimhug
2011/11/12 00:26:36
I love the improvements to this file.
|
| + if (i > 0) { |
| sb.add(", "); |
| } |
| sb.add(this._arguments.$index(i)); |
| @@ -901,6 +901,7 @@ ListFactory.prototype.is$List$String = function(){return this;}; |
| ListFactory.prototype.is$List$Type = function(){return this;}; |
| ListFactory.prototype.is$List$Value = function(){return this;}; |
| ListFactory.prototype.is$List$int = function(){return this;}; |
| +ListFactory.prototype.is$Collection$Type = function(){return this;}; |
| ListFactory.prototype.is$Iterable = function(){return this;}; |
| ListFactory.ListFactory$from$factory = function(other) { |
| var list = []; |
| @@ -964,7 +965,7 @@ ListIterator.prototype.hasNext = function() { |
| return this._array.length > this._pos; |
| } |
| ListIterator.prototype.next = function() { |
| - if ($notnull_bool(!$notnull_bool(this.hasNext()))) { |
| + if (!this.hasNext()) { |
| $throw(const$0/*const NoMoreElementsException()*/); |
| } |
| return this._array.$index(this._pos++); |
| @@ -990,7 +991,7 @@ $inherits(ImmutableList, ListFactory$E); |
| ImmutableList.ImmutableList$from$factory = function(other) { |
| var list = new ImmutableList(other.length); |
| for (var i = 0; |
| - $notnull_bool(i < other.length); i++) { |
| + i < other.length; i++) { |
| list._setindex(i, other.$index(i)); |
| } |
| return list; |
| @@ -1040,7 +1041,7 @@ function ImmutableMap(keyValuePairs) { |
| this._internal = $map([]); |
| // Initializers done |
| for (var i = 0; |
| - $notnull_bool(i < keyValuePairs.length); i += 2) { |
| + i < keyValuePairs.length; i += 2) { |
| this._internal.$setindex(keyValuePairs.$index(i), keyValuePairs.$index(i + 1)); |
| } |
| } |
| @@ -1111,24 +1112,24 @@ NumImplementation.prototype.toDouble = function() { |
| } |
| NumImplementation.prototype.compareTo = function(other) { |
| var thisValue = this.toDouble(); |
| - if ($notnull_bool(thisValue < other)) { |
| + if (thisValue < other) { |
| return -1; |
| } |
| - else if ($notnull_bool(thisValue > other)) { |
| + else if (thisValue > other) { |
| return 1; |
| } |
| - else if ($notnull_bool(thisValue == other)) { |
| - if ($notnull_bool(thisValue == 0)) { |
| + else if (thisValue == other) { |
| + if (thisValue == 0) { |
| var thisIsNegative = this.isNegative(); |
| var otherIsNegative = other.isNegative(); |
| - if ($notnull_bool($eq(thisIsNegative, otherIsNegative))) return 0; |
| + if ($eq(thisIsNegative, otherIsNegative)) return 0; |
| if ($notnull_bool(thisIsNegative)) return -1; |
| return 1; |
| } |
| return 0; |
| } |
| - else if ($notnull_bool(this.isNaN())) { |
| - if ($notnull_bool(other.isNaN())) { |
| + else if (this.isNaN()) { |
| + if (other.isNaN()) { |
| return 0; |
| } |
| return 1; |
| @@ -1143,12 +1144,12 @@ function ExceptionImplementation(_msg) { |
| // Initializers done |
| } |
| ExceptionImplementation.prototype.toString = function() { |
| - return $notnull_bool((this._msg == null)) ? "Exception" : ("Exception: " + this._msg + ""); |
| + return (this._msg == null) ? "Exception" : ("Exception: " + this._msg + ""); |
| } |
| // ********** Code for HashMapImplementation ************** |
| function HashMapImplementation() { |
| // Initializers done |
| - if ($notnull_bool(HashMapImplementation._deletedKey == null)) { |
| + if (HashMapImplementation._deletedKey == null) { |
| HashMapImplementation._deletedKey = new Object(); |
| } |
| this._numberOfEntries = 0; |
| @@ -1182,16 +1183,16 @@ HashMapImplementation.prototype._probeForAdding = function(key) { |
| var numberOfProbes = 1; |
| var initialHash = hash; |
| var insertionIndex = -1; |
| - while ($notnull_bool(true)) { |
| + while (true) { |
| var existingKey = this._keys.$index(hash); |
| - if ($notnull_bool(existingKey == null)) { |
| - if ($notnull_bool(insertionIndex < 0)) return hash; |
| + if (existingKey == null) { |
| + if (insertionIndex < 0) return hash; |
| return insertionIndex; |
| } |
| - else if ($notnull_bool($eq(existingKey, key))) { |
| + else if ($eq(existingKey, key)) { |
| return hash; |
| } |
| - else if ($notnull_bool((insertionIndex < 0) && (HashMapImplementation._deletedKey === existingKey))) { |
| + else if ((insertionIndex < 0) && (HashMapImplementation._deletedKey === existingKey)) { |
| insertionIndex = hash; |
| } |
| hash = HashMapImplementation._nextProbe(hash, numberOfProbes++, this._keys.length); |
| @@ -1201,23 +1202,23 @@ HashMapImplementation.prototype._probeForLookup = function(key) { |
| var hash = HashMapImplementation._firstProbe($assert_num(key.hashCode()), this._keys.length); |
| var numberOfProbes = 1; |
| var initialHash = hash; |
| - while ($notnull_bool(true)) { |
| + while (true) { |
| var existingKey = this._keys.$index(hash); |
| - if ($notnull_bool(existingKey == null)) return -1; |
| - if ($notnull_bool($eq(existingKey, key))) return hash; |
| + if (existingKey == null) return -1; |
| + if ($eq(existingKey, key)) return hash; |
| hash = HashMapImplementation._nextProbe(hash, numberOfProbes++, this._keys.length); |
| } |
| } |
| HashMapImplementation.prototype._ensureCapacity = function() { |
| var newNumberOfEntries = this._numberOfEntries + 1; |
| - if ($notnull_bool(newNumberOfEntries >= this._loadLimit)) { |
| + if (newNumberOfEntries >= this._loadLimit) { |
| this._grow(this._keys.length * 2); |
| return; |
| } |
| var capacity = this._keys.length; |
| var numberOfFreeOrDeleted = capacity - newNumberOfEntries; |
| var numberOfFree = numberOfFreeOrDeleted - this._numberOfDeleted; |
| - if ($notnull_bool(this._numberOfDeleted > numberOfFree)) { |
| + if (this._numberOfDeleted > numberOfFree) { |
| this._grow(this._keys.length); |
| } |
| } |
| @@ -1233,9 +1234,9 @@ HashMapImplementation.prototype._grow = function(newCapacity) { |
| this._keys = new ListFactory(newCapacity); |
| this._values = new ListFactory$V(newCapacity); |
| for (var i = 0; |
| - $notnull_bool(i < capacity); i++) { |
| + i < capacity; i++) { |
| var key = oldKeys.$index(i); |
| - if ($notnull_bool(key == null || key === HashMapImplementation._deletedKey)) { |
| + if (key == null || key === HashMapImplementation._deletedKey) { |
| continue; |
| } |
| var value = oldValues.$index(i); |
| @@ -1248,7 +1249,7 @@ HashMapImplementation.prototype._grow = function(newCapacity) { |
| HashMapImplementation.prototype.$setindex = function(key, value) { |
| this._ensureCapacity(); |
| var index = this._probeForAdding(key); |
| - if ($notnull_bool((this._keys.$index(index) == null) || (this._keys.$index(index) === HashMapImplementation._deletedKey))) { |
| + if ((this._keys.$index(index) == null) || (this._keys.$index(index) === HashMapImplementation._deletedKey)) { |
| this._numberOfEntries++; |
| } |
| this._keys.$setindex(index, key); |
| @@ -1256,12 +1257,12 @@ HashMapImplementation.prototype.$setindex = function(key, value) { |
| } |
| HashMapImplementation.prototype.$index = function(key) { |
| var index = this._probeForLookup(key); |
| - if ($notnull_bool(index < 0)) return null; |
| + if (index < 0) return null; |
| return this._values.$index(index); |
| } |
| HashMapImplementation.prototype.remove = function(key) { |
| var index = this._probeForLookup(key); |
| - if ($notnull_bool(index >= 0)) { |
| + if (index >= 0) { |
| this._numberOfEntries--; |
| var value = this._values.$index(index); |
| this._values.$setindex(index); |
| @@ -1283,8 +1284,8 @@ Object.defineProperty(HashMapImplementation.prototype, "length", { |
| HashMapImplementation.prototype.forEach = function(f) { |
| var length = this._keys.length; |
| for (var i = 0; |
| - $notnull_bool(i < length); i++) { |
| - if ($notnull_bool((this._keys.$index(i) != null) && (this._keys.$index(i) !== HashMapImplementation._deletedKey))) { |
| + i < length; i++) { |
| + if ((this._keys.$index(i) != null) && (this._keys.$index(i) !== HashMapImplementation._deletedKey)) { |
| f(this._keys.$index(i), this._values.$index(i)); |
| } |
| } |
| @@ -1313,7 +1314,7 @@ HashMapImplementation.prototype.containsKey = function(key) { |
| // ********** Code for HashMapImplementation$E$E ************** |
| function HashMapImplementation$E$E() { |
| // Initializers done |
| - if ($notnull_bool(HashMapImplementation._deletedKey == null)) { |
| + if (HashMapImplementation._deletedKey == null) { |
| HashMapImplementation._deletedKey = new Object(); |
| } |
| this._numberOfEntries = 0; |
| @@ -1339,16 +1340,16 @@ HashMapImplementation$E$E.prototype._probeForAdding = function(key) { |
| var numberOfProbes = 1; |
| var initialHash = hash; |
| var insertionIndex = -1; |
| - while ($notnull_bool(true)) { |
| + while (true) { |
| var existingKey = this._keys.$index(hash); |
| - if ($notnull_bool(existingKey == null)) { |
| - if ($notnull_bool(insertionIndex < 0)) return hash; |
| + if (existingKey == null) { |
| + if (insertionIndex < 0) return hash; |
| return insertionIndex; |
| } |
| - else if ($notnull_bool($eq(existingKey, key))) { |
| + else if ($eq(existingKey, key)) { |
| return hash; |
| } |
| - else if ($notnull_bool((insertionIndex < 0) && (HashMapImplementation._deletedKey === existingKey))) { |
| + else if ((insertionIndex < 0) && (HashMapImplementation._deletedKey === existingKey)) { |
| insertionIndex = hash; |
| } |
| hash = HashMapImplementation._nextProbe(hash, numberOfProbes++, this._keys.length); |
| @@ -1358,23 +1359,23 @@ HashMapImplementation$E$E.prototype._probeForLookup = function(key) { |
| var hash = HashMapImplementation._firstProbe($assert_num(key.hashCode()), this._keys.length); |
| var numberOfProbes = 1; |
| var initialHash = hash; |
| - while ($notnull_bool(true)) { |
| + while (true) { |
| var existingKey = this._keys.$index(hash); |
| - if ($notnull_bool(existingKey == null)) return -1; |
| - if ($notnull_bool($eq(existingKey, key))) return hash; |
| + if (existingKey == null) return -1; |
| + if ($eq(existingKey, key)) return hash; |
| hash = HashMapImplementation._nextProbe(hash, numberOfProbes++, this._keys.length); |
| } |
| } |
| HashMapImplementation$E$E.prototype._ensureCapacity = function() { |
| var newNumberOfEntries = this._numberOfEntries + 1; |
| - if ($notnull_bool(newNumberOfEntries >= this._loadLimit)) { |
| + if (newNumberOfEntries >= this._loadLimit) { |
| this._grow(this._keys.length * 2); |
| return; |
| } |
| var capacity = this._keys.length; |
| var numberOfFreeOrDeleted = capacity - newNumberOfEntries; |
| var numberOfFree = numberOfFreeOrDeleted - this._numberOfDeleted; |
| - if ($notnull_bool(this._numberOfDeleted > numberOfFree)) { |
| + if (this._numberOfDeleted > numberOfFree) { |
| this._grow(this._keys.length); |
| } |
| } |
| @@ -1390,9 +1391,9 @@ HashMapImplementation$E$E.prototype._grow = function(newCapacity) { |
| this._keys = new ListFactory(newCapacity); |
| this._values = new ListFactory$E(newCapacity); |
| for (var i = 0; |
| - $notnull_bool(i < capacity); i++) { |
| + i < capacity; i++) { |
| var key = oldKeys.$index(i); |
| - if ($notnull_bool(key == null || key === HashMapImplementation._deletedKey)) { |
| + if (key == null || key === HashMapImplementation._deletedKey) { |
| continue; |
| } |
| var value = oldValues.$index(i); |
| @@ -1405,7 +1406,7 @@ HashMapImplementation$E$E.prototype._grow = function(newCapacity) { |
| HashMapImplementation$E$E.prototype.$setindex = function(key, value) { |
| this._ensureCapacity(); |
| var index = this._probeForAdding(key); |
| - if ($notnull_bool((this._keys.$index(index) == null) || (this._keys.$index(index) === HashMapImplementation._deletedKey))) { |
| + if ((this._keys.$index(index) == null) || (this._keys.$index(index) === HashMapImplementation._deletedKey)) { |
| this._numberOfEntries++; |
| } |
| this._keys.$setindex(index, key); |
| @@ -1413,7 +1414,7 @@ HashMapImplementation$E$E.prototype.$setindex = function(key, value) { |
| } |
| HashMapImplementation$E$E.prototype.remove = function(key) { |
| var index = this._probeForLookup(key); |
| - if ($notnull_bool(index >= 0)) { |
| + if (index >= 0) { |
| this._numberOfEntries--; |
| var value = this._values.$index(index); |
| this._values.$setindex(index); |
| @@ -1429,8 +1430,8 @@ HashMapImplementation$E$E.prototype.isEmpty = function() { |
| HashMapImplementation$E$E.prototype.forEach = function(f) { |
| var length = this._keys.length; |
| for (var i = 0; |
| - $notnull_bool(i < length); i++) { |
| - if ($notnull_bool((this._keys.$index(i) != null) && (this._keys.$index(i) !== HashMapImplementation._deletedKey))) { |
| + i < length; i++) { |
| + if ((this._keys.$index(i) != null) && (this._keys.$index(i) !== HashMapImplementation._deletedKey)) { |
| f(this._keys.$index(i), this._values.$index(i)); |
| } |
| } |
| @@ -1450,7 +1451,7 @@ HashMapImplementation$E$E.prototype.containsKey = function(key) { |
| // ********** Code for HashMapImplementation$Element$HInstruction ************** |
| function HashMapImplementation$Element$HInstruction() { |
| // Initializers done |
| - if ($notnull_bool(HashMapImplementation._deletedKey == null)) { |
| + if (HashMapImplementation._deletedKey == null) { |
| HashMapImplementation._deletedKey = new Object(); |
| } |
| this._numberOfEntries = 0; |
| @@ -1476,7 +1477,7 @@ HashMapImplementation$Element$HInstruction._computeLoadLimit = function(capacity |
| // ********** Code for HashMapImplementation$K$DoubleLinkedQueueEntry$KeyValuePair$K$V ************** |
| function HashMapImplementation$K$DoubleLinkedQueueEntry$KeyValuePair$K$V() { |
| // Initializers done |
| - if ($notnull_bool(HashMapImplementation._deletedKey == null)) { |
| + if (HashMapImplementation._deletedKey == null) { |
| HashMapImplementation._deletedKey = new Object(); |
| } |
| this._numberOfEntries = 0; |
| @@ -1494,7 +1495,7 @@ HashMapImplementation$K$DoubleLinkedQueueEntry$KeyValuePair$K$V._computeLoadLimi |
| // ********** Code for HashMapImplementation$Node$DoubleLinkedQueueEntry$KeyValuePair$Node$Element ************** |
| function HashMapImplementation$Node$DoubleLinkedQueueEntry$KeyValuePair$Node$Element() { |
| // Initializers done |
| - if ($notnull_bool(HashMapImplementation._deletedKey == null)) { |
| + if (HashMapImplementation._deletedKey == null) { |
| HashMapImplementation._deletedKey = new Object(); |
| } |
| this._numberOfEntries = 0; |
| @@ -1512,7 +1513,7 @@ HashMapImplementation$Node$DoubleLinkedQueueEntry$KeyValuePair$Node$Element._com |
| // ********** Code for HashMapImplementation$String$DoubleLinkedQueueEntry$KeyValuePair$String$Keyword ************** |
| function HashMapImplementation$String$DoubleLinkedQueueEntry$KeyValuePair$String$Keyword() { |
| // Initializers done |
| - if ($notnull_bool(HashMapImplementation._deletedKey == null)) { |
| + if (HashMapImplementation._deletedKey == null) { |
| HashMapImplementation._deletedKey = new Object(); |
| } |
| this._numberOfEntries = 0; |
| @@ -1530,7 +1531,7 @@ HashMapImplementation$String$DoubleLinkedQueueEntry$KeyValuePair$String$Keyword. |
| // ********** Code for HashMapImplementation$String$EvaluatedValue ************** |
| function HashMapImplementation$String$EvaluatedValue() { |
| // Initializers done |
| - if ($notnull_bool(HashMapImplementation._deletedKey == null)) { |
| + if (HashMapImplementation._deletedKey == null) { |
| HashMapImplementation._deletedKey = new Object(); |
| } |
| this._numberOfEntries = 0; |
| @@ -1548,7 +1549,7 @@ HashMapImplementation$String$EvaluatedValue._computeLoadLimit = function(capacit |
| // ********** Code for HashMapImplementation$String$String ************** |
| function HashMapImplementation$String$String() { |
| // Initializers done |
| - if ($notnull_bool(HashMapImplementation._deletedKey == null)) { |
| + if (HashMapImplementation._deletedKey == null) { |
| HashMapImplementation._deletedKey = new Object(); |
| } |
| this._numberOfEntries = 0; |
| @@ -1566,7 +1567,7 @@ HashMapImplementation$String$String._computeLoadLimit = function(capacity) { |
| // ********** Code for HashMapImplementation$Type$Type ************** |
| function HashMapImplementation$Type$Type() { |
| // Initializers done |
| - if ($notnull_bool(HashMapImplementation._deletedKey == null)) { |
| + if (HashMapImplementation._deletedKey == null) { |
| HashMapImplementation._deletedKey = new Object(); |
| } |
| this._numberOfEntries = 0; |
| @@ -1587,6 +1588,7 @@ function HashSetImplementation() { |
| this._backingMap = new HashMapImplementation$E$E(); |
| } |
| HashSetImplementation.prototype.is$HashSetImplementation = function(){return this;}; |
| +HashSetImplementation.prototype.is$Collection$Type = function(){return this;}; |
| HashSetImplementation.prototype.is$Iterable = function(){return this;}; |
| HashSetImplementation.HashSetImplementation$from$factory = function(other) { |
| var set = new HashSetImplementation(); |
| @@ -1603,7 +1605,7 @@ HashSetImplementation.prototype.contains = function(value) { |
| return this._backingMap.containsKey(value); |
| } |
| HashSetImplementation.prototype.remove = function(value) { |
| - if ($notnull_bool(!$notnull_bool(this._backingMap.containsKey(value)))) return false; |
| + if (!this._backingMap.containsKey(value)) return false; |
| this._backingMap.remove(value); |
| return true; |
| } |
| @@ -1623,14 +1625,14 @@ HashSetImplementation.prototype.forEach = function(f) { |
| HashSetImplementation.prototype.filter = function(f) { |
| var result = new HashSetImplementation$E(); |
| this._backingMap.forEach(function _(key, value) { |
| - if ($notnull_bool(f(key))) result.add(key); |
| + if (f(key)) result.add(key); |
| } |
| ); |
| return result; |
| } |
| HashSetImplementation.prototype.some = function(f) { |
| var keys = this._backingMap.getKeys(); |
| - return keys.some(f); |
| + return $assert_bool(keys.some(f)); |
| } |
| HashSetImplementation.prototype.isEmpty = function() { |
| return this._backingMap.isEmpty(); |
| @@ -1650,6 +1652,7 @@ function HashSetImplementation$E() { |
| this._backingMap = new HashMapImplementation$E$E(); |
| } |
| $inherits(HashSetImplementation$E, HashSetImplementation); |
| +HashSetImplementation$E.prototype.is$Collection$Type = function(){return this;}; |
| HashSetImplementation$E.prototype.is$Iterable = function(){return this;}; |
| // ********** Code for HashSetImplementation$String ************** |
| function HashSetImplementation$String() { |
| @@ -1657,6 +1660,7 @@ function HashSetImplementation$String() { |
| this._backingMap = new HashMapImplementation$String$String(); |
| } |
| $inherits(HashSetImplementation$String, HashSetImplementation); |
| +HashSetImplementation$String.prototype.is$Collection$Type = false; |
| HashSetImplementation$String.prototype.is$Iterable = function(){return this;}; |
| // ********** Code for HashSetImplementation$Type ************** |
| function HashSetImplementation$Type() { |
| @@ -1664,6 +1668,7 @@ function HashSetImplementation$Type() { |
| this._backingMap = new HashMapImplementation$Type$Type(); |
| } |
| $inherits(HashSetImplementation$Type, HashSetImplementation); |
| +HashSetImplementation$Type.prototype.is$Collection$Type = function(){return this;}; |
| HashSetImplementation$Type.prototype.is$Iterable = function(){return this;}; |
| // ********** Code for HashSetIterator ************** |
| function HashSetIterator(set_) { |
| @@ -1674,14 +1679,14 @@ function HashSetIterator(set_) { |
| } |
| HashSetIterator.prototype.is$Iterator$T = function(){return this;}; |
| HashSetIterator.prototype.hasNext = function() { |
| - if ($notnull_bool(this._nextValidIndex >= this._entries.length)) return false; |
| - if ($notnull_bool(this._entries.$index(this._nextValidIndex) === HashMapImplementation._deletedKey)) { |
| + if (this._nextValidIndex >= this._entries.length) return false; |
| + if (this._entries.$index(this._nextValidIndex) === HashMapImplementation._deletedKey) { |
| this._advance(); |
| } |
| return this._nextValidIndex < this._entries.length; |
| } |
| HashSetIterator.prototype.next = function() { |
| - if ($notnull_bool(!$notnull_bool(this.hasNext()))) { |
| + if (!this.hasNext()) { |
| $throw(const$0/*const NoMoreElementsException()*/); |
| } |
| var res = this._entries.$index(this._nextValidIndex); |
| @@ -1693,10 +1698,10 @@ HashSetIterator.prototype._advance = function() { |
| var entry; |
| var deletedKey = HashMapImplementation._deletedKey; |
| do { |
| - if ($notnull_bool(++this._nextValidIndex >= length)) break; |
| + if (++this._nextValidIndex >= length) break; |
| entry = this._entries.$index(this._nextValidIndex); |
| } |
| - while ($notnull_bool((entry == null) || (entry === deletedKey))) |
| + while ((entry == null) || (entry === deletedKey)) |
| } |
| // ********** Code for HashSetIterator$E ************** |
| function HashSetIterator$E(set_) { |
| @@ -1712,10 +1717,10 @@ HashSetIterator$E.prototype._advance = function() { |
| var entry; |
| var deletedKey = HashMapImplementation._deletedKey; |
| do { |
| - if ($notnull_bool(++this._nextValidIndex >= length)) break; |
| + if (++this._nextValidIndex >= length) break; |
| entry = this._entries.$index(this._nextValidIndex); |
| } |
| - while ($notnull_bool((entry == null) || (entry === deletedKey))) |
| + while ((entry == null) || (entry === deletedKey)) |
| } |
| // ********** Code for KeyValuePair ************** |
| function KeyValuePair(key, value) { |
| @@ -1747,7 +1752,7 @@ function LinkedHashMapImplementation() { |
| LinkedHashMapImplementation.prototype.is$Map$Node$Element = function(){return this;}; |
| LinkedHashMapImplementation.prototype.is$Map$String$Member = function(){return this;}; |
| LinkedHashMapImplementation.prototype.$setindex = function(key, value) { |
| - if ($notnull_bool(this._map.containsKey(key))) { |
| + if (this._map.containsKey(key)) { |
| this._map.$index(key).get$element().value = value; |
| } |
| else { |
| @@ -1758,7 +1763,7 @@ LinkedHashMapImplementation.prototype.$setindex = function(key, value) { |
| LinkedHashMapImplementation.prototype.$index = function(key) { |
| var $0; |
| var entry = (($0 = this._map.$index(key)) && $0.is$DoubleLinkedQueueEntry$KeyValuePair$K$V()); |
| - if ($notnull_bool(entry == null)) return null; |
| + if (entry == null) return null; |
| return entry.get$element().get$value(); |
| } |
| LinkedHashMapImplementation.prototype.getKeys = function() { |
| @@ -1982,6 +1987,7 @@ function DoubleLinkedQueue() { |
| this._sentinel = new _DoubleLinkedQueueEntrySentinel$E(); |
| } |
| DoubleLinkedQueue.prototype.is$DoubleLinkedQueue = function(){return this;}; |
| +DoubleLinkedQueue.prototype.is$Collection$Type = function(){return this;}; |
| DoubleLinkedQueue.prototype.is$Iterable = function(){return this;}; |
| DoubleLinkedQueue.DoubleLinkedQueue$from$factory = function(other) { |
| var list = new DoubleLinkedQueue(); |
| @@ -2028,15 +2034,15 @@ DoubleLinkedQueue.prototype.isEmpty = function() { |
| } |
| DoubleLinkedQueue.prototype.forEach = function(f) { |
| var entry = this._sentinel._next; |
| - while ($notnull_bool(entry !== this._sentinel)) { |
| + while (entry !== this._sentinel) { |
| f(entry._element); |
| entry = entry._next; |
| } |
| } |
| DoubleLinkedQueue.prototype.some = function(f) { |
| var entry = this._sentinel._next; |
| - while ($notnull_bool(entry !== this._sentinel)) { |
| - if ($notnull_bool(f(entry._element))) return true; |
| + while (entry !== this._sentinel) { |
| + if (f(entry._element)) return true; |
| entry = entry._next; |
| } |
| return false; |
| @@ -2044,8 +2050,8 @@ DoubleLinkedQueue.prototype.some = function(f) { |
| DoubleLinkedQueue.prototype.filter = function(f) { |
| var other = new DoubleLinkedQueue$E(); |
| var entry = this._sentinel._next; |
| - while ($notnull_bool(entry !== this._sentinel)) { |
| - if ($notnull_bool(f(entry._element))) other.addLast(entry._element); |
| + while (entry !== this._sentinel) { |
| + if (f(entry._element)) other.addLast(entry._element); |
| entry = entry._next; |
| } |
| return other; |
| @@ -2059,6 +2065,7 @@ function DoubleLinkedQueue$E() { |
| this._sentinel = new _DoubleLinkedQueueEntrySentinel$E(); |
| } |
| $inherits(DoubleLinkedQueue$E, DoubleLinkedQueue); |
| +DoubleLinkedQueue$E.prototype.is$Collection$Type = function(){return this;}; |
| DoubleLinkedQueue$E.prototype.is$Iterable = function(){return this;}; |
| // ********** Code for DoubleLinkedQueue$KeyValuePair$K$V ************** |
| function DoubleLinkedQueue$KeyValuePair$K$V() { |
| @@ -2066,6 +2073,7 @@ function DoubleLinkedQueue$KeyValuePair$K$V() { |
| this._sentinel = new _DoubleLinkedQueueEntrySentinel$KeyValuePair$K$V(); |
| } |
| $inherits(DoubleLinkedQueue$KeyValuePair$K$V, DoubleLinkedQueue); |
| +DoubleLinkedQueue$KeyValuePair$K$V.prototype.is$Collection$Type = false; |
| DoubleLinkedQueue$KeyValuePair$K$V.prototype.is$Iterable = function(){return this;}; |
| DoubleLinkedQueue$KeyValuePair$K$V.prototype.addLast = function(value) { |
| this._sentinel.prepend(value); |
| @@ -2075,7 +2083,7 @@ DoubleLinkedQueue$KeyValuePair$K$V.prototype.lastEntry = function() { |
| } |
| DoubleLinkedQueue$KeyValuePair$K$V.prototype.forEach = function(f) { |
| var entry = this._sentinel._next; |
| - while ($notnull_bool(entry !== this._sentinel)) { |
| + while (entry !== this._sentinel) { |
| f(entry._element); |
| entry = entry._next; |
| } |
| @@ -2086,6 +2094,7 @@ function DoubleLinkedQueue$KeyValuePair$Node$Element() { |
| this._sentinel = new _DoubleLinkedQueueEntrySentinel$KeyValuePair$Node$Element(); |
| } |
| $inherits(DoubleLinkedQueue$KeyValuePair$Node$Element, DoubleLinkedQueue); |
| +DoubleLinkedQueue$KeyValuePair$Node$Element.prototype.is$Collection$Type = false; |
| DoubleLinkedQueue$KeyValuePair$Node$Element.prototype.is$Iterable = function(){return this;}; |
| // ********** Code for DoubleLinkedQueue$KeyValuePair$String$Keyword ************** |
| function DoubleLinkedQueue$KeyValuePair$String$Keyword() { |
| @@ -2093,10 +2102,12 @@ function DoubleLinkedQueue$KeyValuePair$String$Keyword() { |
| this._sentinel = new _DoubleLinkedQueueEntrySentinel$KeyValuePair$String$Keyword(); |
| } |
| $inherits(DoubleLinkedQueue$KeyValuePair$String$Keyword, DoubleLinkedQueue); |
| +DoubleLinkedQueue$KeyValuePair$String$Keyword.prototype.is$Collection$Type = false; |
| DoubleLinkedQueue$KeyValuePair$String$Keyword.prototype.is$Iterable = function(){return this;}; |
| // ********** Code for DoubleLinkedQueue$SourceString ************** |
| function DoubleLinkedQueue$SourceString() {} |
| $inherits(DoubleLinkedQueue$SourceString, DoubleLinkedQueue); |
| +DoubleLinkedQueue$SourceString.prototype.is$Collection$Type = false; |
| DoubleLinkedQueue$SourceString.prototype.is$Iterable = function(){return this;}; |
| DoubleLinkedQueue$SourceString.DoubleLinkedQueue$from$factory = function(other) { |
| var list = new DoubleLinkedQueue(); |
| @@ -2117,7 +2128,7 @@ _DoubleLinkedQueueIterator.prototype.hasNext = function() { |
| return this._currentEntry._next !== this._sentinel; |
| } |
| _DoubleLinkedQueueIterator.prototype.next = function() { |
| - if ($notnull_bool(!$notnull_bool(this.hasNext()))) { |
| + if (!this.hasNext()) { |
| $throw(const$0/*const NoMoreElementsException()*/); |
| } |
| this._currentEntry = this._currentEntry._next; |
| @@ -2138,27 +2149,27 @@ function StopWatchImplementation() { |
| // Initializers done |
| } |
| StopWatchImplementation.prototype.start = function() { |
| - if ($notnull_bool(this._start == null)) { |
| + if (this._start == null) { |
| this._start = Clock.now(); |
| } |
| else { |
| - if ($notnull_bool(this._stop == null)) { |
| + if (this._stop == null) { |
| return; |
| } |
| this._start = Clock.now() - (this._stop - this._start); |
| } |
| } |
| StopWatchImplementation.prototype.stop = function() { |
| - if ($notnull_bool(this._start == null)) { |
| + if (this._start == null) { |
| return; |
| } |
| this._stop = Clock.now(); |
| } |
| StopWatchImplementation.prototype.elapsed = function() { |
| - if ($notnull_bool(this._start == null)) { |
| + if (this._start == null) { |
| return 0; |
| } |
| - return $notnull_bool((this._stop == null)) ? (Clock.now() - this._start) : (this._stop - this._start); |
| + return (this._stop == null) ? (Clock.now() - this._start) : (this._stop - this._start); |
| } |
| StopWatchImplementation.prototype.elapsedInMs = function() { |
| return $truncdiv((this.elapsed() * 1000), this.frequency()); |
| @@ -2183,7 +2194,7 @@ StringBufferImpl.prototype.isEmpty = function() { |
| } |
| StringBufferImpl.prototype.add = function(obj) { |
| var str = obj.toString(); |
| - if ($notnull_bool(str == null || str.isEmpty())) return this; |
| + if (str == null || str.isEmpty()) return this; |
| this._buffer.add(str); |
| this._length += str.length; |
| return this; |
| @@ -2201,8 +2212,8 @@ StringBufferImpl.prototype.clear = function() { |
| return this; |
| } |
| StringBufferImpl.prototype.toString = function() { |
| - if ($notnull_bool(this._buffer.length == 0)) return ""; |
| - if ($notnull_bool(this._buffer.length == 1)) return $assert_String(this._buffer.$index(0)); |
| + if (this._buffer.length == 0) return ""; |
| + if (this._buffer.length == 1) return $assert_String(this._buffer.$index(0)); |
| var result = StringBase.concatAll(this._buffer); |
| this._buffer.clear(); |
| this._buffer.add(result); |
| @@ -2222,10 +2233,10 @@ StringBase.createFromCharCodes = function(charCodes) { |
| return String.fromCharCode.apply(null, charCodes); |
| } |
| StringBase.join = function(strings, separator) { |
| - if ($notnull_bool(strings.length == 0)) return ''; |
| + if (strings.length == 0) return ''; |
| var s = $assert_String(strings.$index(0)); |
| for (var i = 1; |
| - $notnull_bool(i < strings.length); i++) { |
| + i < strings.length; i++) { |
| s = s + separator + strings.$index(i); |
| } |
| return s; |
| @@ -2285,14 +2296,14 @@ Collections.forEach = function(iterable, f) { |
| Collections.some = function(iterable, f) { |
| for (var $i = iterable.iterator(); $i.hasNext(); ) { |
| var e = $i.next(); |
| - if ($notnull_bool(f(e))) return true; |
| + if (f(e)) return true; |
| } |
| return false; |
| } |
| Collections.filter = function(source, destination, f) { |
| for (var $i = source.iterator(); $i.hasNext(); ) { |
| var e = $i.next(); |
| - if ($notnull_bool(f(e))) destination.add(e); |
| + if (f(e)) destination.add(e); |
| } |
| return destination; |
| } |
| @@ -2313,8 +2324,8 @@ DateImplementation.now$ctor = function() { |
| DateImplementation.now$ctor.prototype = DateImplementation.prototype; |
| DateImplementation.prototype.get$value = function() { return this.value; }; |
| DateImplementation.prototype.$eq = function(other) { |
| - if ($notnull_bool(!$notnull_bool(((other instanceof DateImplementation))))) return false; |
| - return $notnull_bool((this.value == other.get$value()) && ($eq(this.timeZone, other.timeZone))); |
| + if (!((other instanceof DateImplementation))) return false; |
| + return (this.value == other.get$value()) && ($eq(this.timeZone, other.timeZone)); |
| } |
| DateImplementation.prototype.compareTo = function(other) { |
| return this.value.compareTo(other.value); |
| @@ -2345,12 +2356,12 @@ DateImplementation.prototype.get$milliseconds = function() { |
| } |
| DateImplementation.prototype.toString = function() { |
| function threeDigits(n) { |
| - if ($notnull_bool(n >= 100)) return ("" + n + ""); |
| - if ($notnull_bool(n > 10)) return ("0" + n + ""); |
| + if (n >= 100) return ("" + n + ""); |
| + if (n > 10) return ("0" + n + ""); |
| return ("00" + n + ""); |
| } |
| function twoDigits(n) { |
| - if ($notnull_bool(n >= 10)) return ("" + n + ""); |
| + if (n >= 10) return ("" + n + ""); |
| return ("0" + n + ""); |
| } |
| var m = twoDigits(this.get$month()); |
| @@ -2386,7 +2397,7 @@ TimeZoneImplementation.local$ctor = function() { |
| } |
| TimeZoneImplementation.local$ctor.prototype = TimeZoneImplementation.prototype; |
| TimeZoneImplementation.prototype.$eq = function(other) { |
| - if ($notnull_bool(!$notnull_bool(((other instanceof TimeZoneImplementation))))) return false; |
| + if (!((other instanceof TimeZoneImplementation))) return false; |
| return $eq(this.isUtc, other.isUtc); |
| } |
| TimeZoneImplementation.prototype.toString = function() { |
| @@ -2432,7 +2443,7 @@ function joinPaths(path1, path2) { |
| var $list = path2.split('/'); |
| for (var $i = 0;$i < $list.length; $i++) { |
| var piece = $list.$index($i); |
| - if ($notnull_bool($eq(piece, '..') && pieces.length > 0) && $ne(pieces.last(), '.') && $ne(pieces.last(), '..')) { |
| + if ($notnull_bool($notnull_bool($notnull_bool($eq(piece, '..') && pieces.length > 0) && $ne(pieces.last(), '.')) && $ne(pieces.last(), '..'))) { |
| pieces.removeLast(); |
| } |
| else if ($notnull_bool($ne(piece, ''))) { |
| @@ -2446,7 +2457,7 @@ function joinPaths(path1, path2) { |
| } |
| function dirname(path) { |
| var lastSlash = path.lastIndexOf('/', path.length); |
| - if ($notnull_bool(lastSlash == -1)) { |
| + if (lastSlash == -1) { |
| return '.'; |
| } |
| else { |
| @@ -2455,7 +2466,7 @@ function dirname(path) { |
| } |
| function basename(path) { |
| var lastSlash = path.lastIndexOf('/', path.length); |
| - if ($notnull_bool(lastSlash == -1)) { |
| + if (lastSlash == -1) { |
| return path; |
| } |
| else { |
| @@ -2488,9 +2499,9 @@ function readSync(fileName) { |
| // ********** Library util_implementation ************** |
| // ********** Code for LinkFactory ************** |
| function LinkFactory() {} |
| -LinkFactory.Link$factory = function(head, tail) { |
| +LinkFactory.createLink = function(head, tail) { |
| var $0; |
| - return new LinkEntry(head, (($0 = $notnull_bool((tail == null)) ? const$16/*const EmptyLink()*/ : tail) && $0.is$Link$T())); |
| + return new LinkEntry(head, (($0 = (tail == null) ? const$16/*const EmptyLink()*/ : tail) && $0.is$Link$T())); |
| } |
| // ********** Code for AbstractLink ************** |
| function AbstractLink() {} |
| @@ -2508,7 +2519,7 @@ AbstractLink.prototype.get$tail = function() { |
| $throw("bug"); |
| } |
| AbstractLink.prototype.prepend = function(element) { |
| - return LinkFactory.Link$factory(element, this); |
| + return LinkFactory.createLink(element, this); |
| } |
| AbstractLink.prototype.iterator = function() { |
| var $0; |
| @@ -2517,12 +2528,12 @@ AbstractLink.prototype.iterator = function() { |
| AbstractLink.prototype.printOn = function(buffer, separatedBy) { |
| var $0; |
| if ($notnull_bool(this.isEmpty())) return; |
| - buffer.add($notnull_bool(this.get$head() == null) ? 'null' : this.get$head()); |
| - if ($notnull_bool(separatedBy == null)) separatedBy = ''; |
| + buffer.add(this.get$head() == null ? 'null' : this.get$head()); |
| + if (separatedBy == null) separatedBy = ''; |
| for (var link = (($0 = this.get$tail()) && $0.is$Link()); |
| - $notnull_bool(!$notnull_bool(link.isEmpty())); link = (($0 = link.get$tail()) && $0.is$Link())) { |
| + !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link())) { |
| buffer.add(separatedBy); |
| - buffer.add($notnull_bool(link.get$head() == null) ? 'null' : link.get$head()); |
| + buffer.add(link.get$head() == null ? 'null' : link.get$head()); |
| } |
| } |
| AbstractLink.prototype.toString = function() { |
| @@ -2600,7 +2611,7 @@ LinkEntry.prototype.toList = function() { |
| var $0; |
| var list = new ListFactory$T(); |
| for (var link = this; |
| - $notnull_bool(!$notnull_bool(link.isEmpty())); link = (($0 = link.get$tail()) && $0.is$Link$T())) { |
| + !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link$T())) { |
| list.addLast(link.get$head()); |
| } |
| return list; |
| @@ -2621,7 +2632,7 @@ function LinkBuilderImplementation() { |
| LinkBuilderImplementation.prototype.get$head = function() { return this.head; }; |
| LinkBuilderImplementation.prototype.set$head = function(value) { return this.head = value; }; |
| LinkBuilderImplementation.prototype.toLink = function() { |
| - if ($notnull_bool(this.head == null)) return const$16/*const EmptyLink()*/; |
| + if (this.head == null) return const$16/*const EmptyLink()*/; |
| this.lastLink.realTail = const$16/*const EmptyLink()*/; |
| var link = this.head; |
| this.lastLink = null; |
| @@ -2630,7 +2641,7 @@ LinkBuilderImplementation.prototype.toLink = function() { |
| } |
| LinkBuilderImplementation.prototype.addLast = function(t) { |
| var entry = new LinkEntry$T(t, null); |
| - if ($notnull_bool(this.head == null)) { |
| + if (this.head == null) { |
| this.head = entry; |
| } |
| else { |
| @@ -2673,7 +2684,7 @@ ArrayBasedScanner.prototype.advance = function() { |
| } |
| ArrayBasedScanner.prototype.select = function(choice, yes, no) { |
| var next = this.advance(); |
| - if ($notnull_bool(next === choice)) { |
| + if (next === choice) { |
| this.appendStringToken(1024/*null.UNKNOWN_TOKEN*/, yes); |
| return this.advance(); |
| } |
| @@ -2711,7 +2722,7 @@ ArrayBasedScanner.prototype.appendBeginGroup = function(kind, value) { |
| var token = new BeginGroupToken(kind, value, this.tokenStart); |
| this.tail.next = token; |
| this.tail = this.tail.next; |
| - while ($notnull_bool(kind !== 60/*null.LT_TOKEN*/ && !$notnull_bool(this.groupingStack.isEmpty())) && this.groupingStack.get$head().kind === 60/*null.LT_TOKEN*/) { |
| + while (kind !== 60/*null.LT_TOKEN*/ && !$notnull_bool(this.groupingStack.isEmpty()) && this.groupingStack.get$head().kind === 60/*null.LT_TOKEN*/) { |
| this.groupingStack = (($0 = this.groupingStack.get$tail()) && $0.is$Link$Token()); |
| } |
| this.groupingStack = (($0 = this.groupingStack.prepend(token)) && $0.is$Link$Token()); |
| @@ -2721,14 +2732,14 @@ ArrayBasedScanner.prototype.appendEndGroup = function(kind, value, openKind) { |
| var oldTail = this.tail; |
| this.appendStringToken(kind, value); |
| if ($notnull_bool(this.groupingStack.isEmpty())) { |
| - if ($notnull_bool(openKind === 60/*null.LT_TOKEN*/)) return; |
| + if (openKind === 60/*null.LT_TOKEN*/) return; |
| $throw(new MalformedInputException(('Unmatched ' + value + ''))); |
| } |
| - while ($notnull_bool(openKind !== 60/*null.LT_TOKEN*/ && !$notnull_bool(this.groupingStack.isEmpty())) && this.groupingStack.get$head().kind === 60/*null.LT_TOKEN*/) { |
| + while (openKind !== 60/*null.LT_TOKEN*/ && !$notnull_bool(this.groupingStack.isEmpty()) && this.groupingStack.get$head().kind === 60/*null.LT_TOKEN*/) { |
| this.groupingStack = (($0 = this.groupingStack.get$tail()) && $0.is$Link$Token()); |
| } |
| - if ($notnull_bool(this.groupingStack.get$head().kind !== openKind)) { |
| - if ($notnull_bool(openKind === 60/*null.LT_TOKEN*/)) return; |
| + if (this.groupingStack.get$head().kind !== openKind) { |
| + if (openKind === 60/*null.LT_TOKEN*/) return; |
| $throw(new MalformedInputException(('Unmatched ' + value + ''))); |
| } |
| this.groupingStack.get$head().endGroup = oldTail.next; |
| @@ -2783,7 +2794,7 @@ ArrayBasedScanner$SourceString.prototype.advance = function() { |
| } |
| ArrayBasedScanner$SourceString.prototype.select = function(choice, yes, no) { |
| var next = this.advance(); |
| - if ($notnull_bool(next === choice)) { |
| + if (next === choice) { |
| this.appendStringToken(1024/*null.UNKNOWN_TOKEN*/, yes); |
| return this.advance(); |
| } |
| @@ -2821,7 +2832,7 @@ ArrayBasedScanner$SourceString.prototype.appendBeginGroup = function(kind, value |
| var token = new BeginGroupToken(kind, value, this.tokenStart); |
| this.tail.next = token; |
| this.tail = this.tail.next; |
| - while ($notnull_bool(kind !== 60/*null.LT_TOKEN*/ && !$notnull_bool(this.groupingStack.isEmpty())) && this.groupingStack.get$head().kind === 60/*null.LT_TOKEN*/) { |
| + while (kind !== 60/*null.LT_TOKEN*/ && !$notnull_bool(this.groupingStack.isEmpty()) && this.groupingStack.get$head().kind === 60/*null.LT_TOKEN*/) { |
| this.groupingStack = (($0 = this.groupingStack.get$tail()) && $0.is$Link$Token()); |
| } |
| this.groupingStack = (($0 = this.groupingStack.prepend(token)) && $0.is$Link$Token()); |
| @@ -2831,14 +2842,14 @@ ArrayBasedScanner$SourceString.prototype.appendEndGroup = function(kind, value, |
| var oldTail = this.tail; |
| this.appendStringToken(kind, value); |
| if ($notnull_bool(this.groupingStack.isEmpty())) { |
| - if ($notnull_bool(openKind === 60/*null.LT_TOKEN*/)) return; |
| + if (openKind === 60/*null.LT_TOKEN*/) return; |
| $throw(new MalformedInputException(('Unmatched ' + value + ''))); |
| } |
| - while ($notnull_bool(openKind !== 60/*null.LT_TOKEN*/ && !$notnull_bool(this.groupingStack.isEmpty())) && this.groupingStack.get$head().kind === 60/*null.LT_TOKEN*/) { |
| + while (openKind !== 60/*null.LT_TOKEN*/ && !$notnull_bool(this.groupingStack.isEmpty()) && this.groupingStack.get$head().kind === 60/*null.LT_TOKEN*/) { |
| this.groupingStack = (($0 = this.groupingStack.get$tail()) && $0.is$Link$Token()); |
| } |
| - if ($notnull_bool(this.groupingStack.get$head().kind !== openKind)) { |
| - if ($notnull_bool(openKind === 60/*null.LT_TOKEN*/)) return; |
| + if (this.groupingStack.get$head().kind !== openKind) { |
| + if (openKind === 60/*null.LT_TOKEN*/) return; |
| $throw(new MalformedInputException(('Unmatched ' + value + ''))); |
| } |
| this.groupingStack.get$head().endGroup = oldTail.next; |
| @@ -2878,7 +2889,7 @@ ArrayBasedScanner$SourceString.prototype.appendGtGtGt = function(kind, value) { |
| } |
| ArrayBasedScanner$SourceString.prototype.tokenize = function() { |
| var next = this.advance(); |
| - while ($notnull_bool(next != -1)) { |
| + while (next != -1) { |
| next = this.bigSwitch(next); |
| } |
| this.appendEofToken(); |
| @@ -3098,10 +3109,10 @@ ArrayBasedScanner$SourceString.prototype.bigSwitch = function(next) { |
| default: |
| - if ($notnull_bool(next == -1)) { |
| + if (next == -1) { |
| return -1; |
| } |
| - if ($notnull_bool(next < 0x1f)) { |
| + if (next < 0x1f) { |
| $throw(new MalformedInputException(this.get$charOffset())); |
| } |
| return this.tokenizeIdentifier(next); |
| @@ -3109,12 +3120,12 @@ ArrayBasedScanner$SourceString.prototype.bigSwitch = function(next) { |
| } |
| } |
| ArrayBasedScanner$SourceString.prototype.tokenizeTag = function(next) { |
| - if ($notnull_bool(this.byteOffset == 0)) { |
| - if ($notnull_bool(this.peek() == 33/*null.$BANG*/)) { |
| + if (this.byteOffset == 0) { |
| + if (this.peek() == 33/*null.$BANG*/) { |
| do { |
| next = this.advance(); |
| } |
| - while ($notnull_bool(next != 10/*null.$LF*/ && next != 13/*null.$CR*/)) |
| + while (next != 10/*null.$LF*/ && next != 13/*null.$CR*/) |
| return next; |
| } |
| } |
| @@ -3123,7 +3134,7 @@ ArrayBasedScanner$SourceString.prototype.tokenizeTag = function(next) { |
| } |
| ArrayBasedScanner$SourceString.prototype.tokenizeTilde = function(next) { |
| next = this.advance(); |
| - if ($notnull_bool(next == 47/*null.$SLASH*/)) { |
| + if (next == 47/*null.$SLASH*/) { |
| return this.select(61/*null.$EQ*/, "~/=", "~/"); |
| } |
| else { |
| @@ -3133,7 +3144,7 @@ ArrayBasedScanner$SourceString.prototype.tokenizeTilde = function(next) { |
| } |
| ArrayBasedScanner$SourceString.prototype.tokenizeOpenBracket = function(next) { |
| next = this.advance(); |
| - if ($notnull_bool(next == 93/*null.$RBRACKET*/)) { |
| + if (next == 93/*null.$RBRACKET*/) { |
| return this.select(61/*null.$EQ*/, "[]=", "[]"); |
| } |
| else { |
| @@ -3232,7 +3243,7 @@ ArrayBasedScanner$SourceString.prototype.tokenizePlus = function(next) { |
| } |
| ArrayBasedScanner$SourceString.prototype.tokenizeExclamation = function(next) { |
| next = this.advance(); |
| - if ($notnull_bool(next == 61/*null.$EQ*/)) { |
| + if (next == 61/*null.$EQ*/) { |
| return this.select(61/*null.$EQ*/, "!==", "!="); |
| } |
| this.appendStringToken(33/*null.BANG_TOKEN*/, "!"); |
| @@ -3240,7 +3251,7 @@ ArrayBasedScanner$SourceString.prototype.tokenizeExclamation = function(next) { |
| } |
| ArrayBasedScanner$SourceString.prototype.tokenizeEquals = function(next) { |
| next = this.advance(); |
| - if ($notnull_bool(next == 61/*null.$EQ*/)) { |
| + if (next == 61/*null.$EQ*/) { |
| return this.select(61/*null.$EQ*/, "===", "=="); |
| } |
| this.appendStringToken(61/*null.EQ_TOKEN*/, "="); |
| @@ -3267,7 +3278,7 @@ ArrayBasedScanner$SourceString.prototype.tokenizeGreaterThan = function(next) { |
| { |
| next = this.advance(); |
| - if ($notnull_bool(next === 61/*null.$EQ*/)) { |
| + if (next === 61/*null.$EQ*/) { |
| this.appendStringToken(62/*null.GT_TOKEN*/, ">>>="); |
| return this.advance(); |
| } |
| @@ -3313,7 +3324,7 @@ ArrayBasedScanner$SourceString.prototype.tokenizeLessThan = function(next) { |
| } |
| ArrayBasedScanner$SourceString.prototype.tokenizeNumber = function(next) { |
| var start = this.byteOffset; |
| - while ($notnull_bool(true)) { |
| + while (true) { |
| next = this.advance(); |
| switch (next) { |
| case 48/*null.$0*/: |
| @@ -3350,7 +3361,7 @@ ArrayBasedScanner$SourceString.prototype.tokenizeNumber = function(next) { |
| } |
| ArrayBasedScanner$SourceString.prototype.tokenizeHexOrNumber = function(next) { |
| var x = this.peek(); |
| - if ($notnull_bool(x == 120/*null.$x*/ || x == 88/*null.$X*/)) { |
| + if (x == 120/*null.$x*/ || x == 88/*null.$X*/) { |
| this.advance(); |
| return this.tokenizeHex(x); |
| } |
| @@ -3359,7 +3370,7 @@ ArrayBasedScanner$SourceString.prototype.tokenizeHexOrNumber = function(next) { |
| ArrayBasedScanner$SourceString.prototype.tokenizeHex = function(next) { |
| var start = this.byteOffset; |
| var hasDigits = false; |
| - while ($notnull_bool(true)) { |
| + while (true) { |
| next = this.advance(); |
| switch (next) { |
| case 48/*null.$0*/: |
| @@ -3390,7 +3401,7 @@ ArrayBasedScanner$SourceString.prototype.tokenizeHex = function(next) { |
| default: |
| - if ($notnull_bool(!$notnull_bool(hasDigits))) { |
| + if (!$notnull_bool(hasDigits)) { |
| $throw(new MalformedInputException(this.get$charOffset())); |
| } |
| this.appendByteStringToken(120/*null.HEXADECIMAL_TOKEN*/, this.asciiString(start)); |
| @@ -3432,7 +3443,7 @@ ArrayBasedScanner$SourceString.prototype.tokenizeDotOrNumber = function(next) { |
| ArrayBasedScanner$SourceString.prototype.tokenizeFractionPart = function(next, start) { |
| var done = false; |
| LOOP: |
| - while ($notnull_bool(!$notnull_bool(done))) { |
| + while (!$notnull_bool(done)) { |
| switch (next) { |
| case 48/*null.$0*/: |
| case 49/*null.$1*/: |
| @@ -3462,18 +3473,18 @@ ArrayBasedScanner$SourceString.prototype.tokenizeFractionPart = function(next, s |
| } |
| next = this.advance(); |
| } |
| - if ($notnull_bool(next == 100/*null.$d*/ || next == 68/*null.$D*/)) { |
| + if (next == 100/*null.$d*/ || next == 68/*null.$D*/) { |
| next = this.advance(); |
| } |
| this.appendByteStringToken(100/*null.DOUBLE_TOKEN*/, this.asciiString(start)); |
| return next; |
| } |
| ArrayBasedScanner$SourceString.prototype.tokenizeExponent = function(next) { |
| - if ($notnull_bool(next == 43/*null.$PLUS*/ || next == 45/*null.$MINUS*/)) { |
| + if (next == 43/*null.$PLUS*/ || next == 45/*null.$MINUS*/) { |
| next = this.advance(); |
| } |
| var hasDigits = false; |
| - while ($notnull_bool(true)) { |
| + while (true) { |
| switch (next) { |
| case 48/*null.$0*/: |
| case 49/*null.$1*/: |
| @@ -3491,7 +3502,7 @@ ArrayBasedScanner$SourceString.prototype.tokenizeExponent = function(next) { |
| default: |
| - if ($notnull_bool(!$notnull_bool(hasDigits))) { |
| + if (!$notnull_bool(hasDigits)) { |
| $throw(new MalformedInputException(this.get$charOffset())); |
| } |
| return next; |
| @@ -3524,7 +3535,7 @@ ArrayBasedScanner$SourceString.prototype.tokenizeSlashOrComment = function(next) |
| } |
| } |
| ArrayBasedScanner$SourceString.prototype.tokenizeSingleLineComment = function(next) { |
| - while ($notnull_bool(true)) { |
| + while (true) { |
| next = this.advance(); |
| switch (next) { |
| case -1: |
| @@ -3538,7 +3549,7 @@ ArrayBasedScanner$SourceString.prototype.tokenizeSingleLineComment = function(ne |
| } |
| ArrayBasedScanner$SourceString.prototype.tokenizeMultiLineComment = function(next) { |
| next = this.advance(); |
| - while ($notnull_bool(true)) { |
| + while (true) { |
| switch (next) { |
| case -1: |
| @@ -3547,10 +3558,10 @@ ArrayBasedScanner$SourceString.prototype.tokenizeMultiLineComment = function(nex |
| case 42/*null.$STAR*/: |
| next = this.advance(); |
| - if ($notnull_bool(next == 47/*null.$SLASH*/)) { |
| + if (next == 47/*null.$SLASH*/) { |
| return this.advance(); |
| } |
| - else if ($notnull_bool(next == -1)) { |
| + else if (next == -1) { |
| return next; |
| } |
| break; |
| @@ -3566,21 +3577,21 @@ ArrayBasedScanner$SourceString.prototype.tokenizeMultiLineComment = function(nex |
| ArrayBasedScanner$SourceString.prototype.tokenizeIdentifier = function(next) { |
| var start = this.byteOffset; |
| var state = null; |
| - if ($notnull_bool(97/*null.$a*/ <= next && next <= 122/*null.$z*/)) { |
| + if (97/*null.$a*/ <= next && next <= 122/*null.$z*/) { |
| state = KeywordState.get$KEYWORD_STATE().next(next); |
| next = this.advance(); |
| } |
| var isAscii = true; |
| - while ($notnull_bool(true)) { |
| - if ($notnull_bool(97/*null.$a*/ <= next && next <= 122/*null.$z*/)) { |
| - if ($notnull_bool(state != null)) { |
| + while (true) { |
| + if (97/*null.$a*/ <= next && next <= 122/*null.$z*/) { |
| + if (state != null) { |
| state = state.next(next); |
| } |
| } |
| - else if ($notnull_bool(($notnull_bool(48/*null.$0*/ <= next && next <= 57/*null.$9*/)) || ($notnull_bool(65/*null.$A*/ <= next && next <= 90/*null.$Z*/))) || next == 95/*null.$_*/ || next == 36/*null.$DOLLAR*/) { |
| + else if ((48/*null.$0*/ <= next && next <= 57/*null.$9*/) || (65/*null.$A*/ <= next && next <= 90/*null.$Z*/) || next == 95/*null.$_*/ || next == 36/*null.$DOLLAR*/) { |
| state = null; |
| } |
| - else if ($notnull_bool(next < 128)) { |
| + else if (next < 128) { |
| if ($notnull_bool(state != null && state.isLeaf())) { |
| this.appendKeywordToken(state.get$keyword()); |
| } |
| @@ -3597,7 +3608,7 @@ ArrayBasedScanner$SourceString.prototype.tokenizeIdentifier = function(next) { |
| do { |
| next = this.nextByte(); |
| } |
| - while ($notnull_bool(next > 127)) |
| + while (next > 127) |
| var string = this.utf8String(nonAsciiStart, -1).toString(); |
| isAscii = false; |
| this.addToCharOffset(string.length); |
| @@ -3609,7 +3620,7 @@ ArrayBasedScanner$SourceString.prototype.tokenizeIdentifier = function(next) { |
| ArrayBasedScanner$SourceString.prototype.tokenizeRawString = function(next) { |
| var start = this.byteOffset; |
| next = this.advance(); |
| - if ($notnull_bool(next == 34/*null.$DQ*/ || next == 39/*null.$SQ*/)) { |
| + if (next == 34/*null.$DQ*/ || next == 39/*null.$SQ*/) { |
| return this.tokenizeString(next, start, true); |
| } |
| else { |
| @@ -3619,9 +3630,9 @@ ArrayBasedScanner$SourceString.prototype.tokenizeRawString = function(next) { |
| ArrayBasedScanner$SourceString.prototype.tokenizeString = function(next, start, raw) { |
| var q = next; |
| next = this.advance(); |
| - if ($notnull_bool(q == next)) { |
| + if (q == next) { |
| next = this.advance(); |
| - if ($notnull_bool(q == next)) { |
| + if (q == next) { |
| return this.tokenizeMultiLineString(q, start, raw); |
| } |
| else { |
| @@ -3637,18 +3648,18 @@ ArrayBasedScanner$SourceString.prototype.tokenizeString = function(next, start, |
| } |
| } |
| ArrayBasedScanner$SourceString.prototype.tokenizeSingleLineString = function(next, q1, start) { |
| - while ($notnull_bool(next != -1)) { |
| - if ($notnull_bool(next == q1)) { |
| + while (next != -1) { |
| + if (next == q1) { |
| this.appendByteStringToken(39/*null.STRING_TOKEN*/, this.utf8String(start, 0)); |
| return this.advance(); |
| } |
| - else if ($notnull_bool(next == 92/*null.$BACKSLASH*/)) { |
| + else if (next == 92/*null.$BACKSLASH*/) { |
| next = this.advance(); |
| - if ($notnull_bool(next == -1)) { |
| + if (next == -1) { |
| $throw(new MalformedInputException(this.get$charOffset())); |
| } |
| } |
| - else if ($notnull_bool(next == 10/*null.$LF*/ || next == 13/*null.$CR*/)) { |
| + else if (next == 10/*null.$LF*/ || next == 13/*null.$CR*/) { |
| $throw(new MalformedInputException(this.get$charOffset())); |
| } |
| next = this.advance(); |
| @@ -3657,12 +3668,12 @@ ArrayBasedScanner$SourceString.prototype.tokenizeSingleLineString = function(nex |
| } |
| ArrayBasedScanner$SourceString.prototype.tokenizeSingleLineRawString = function(next, q1, start) { |
| next = this.advance(); |
| - while ($notnull_bool(next != -1)) { |
| - if ($notnull_bool(next == q1)) { |
| + while (next != -1) { |
| + if (next == q1) { |
| this.appendByteStringToken(39/*null.STRING_TOKEN*/, this.utf8String(start, 0)); |
| return this.advance(); |
| } |
| - else if ($notnull_bool(next == 10/*null.$LF*/ || next == 13/*null.$CR*/)) { |
| + else if (next == 10/*null.$LF*/ || next == 13/*null.$CR*/) { |
| $throw(new MalformedInputException(this.get$charOffset())); |
| } |
| next = this.advance(); |
| @@ -3671,12 +3682,12 @@ ArrayBasedScanner$SourceString.prototype.tokenizeSingleLineRawString = function( |
| } |
| ArrayBasedScanner$SourceString.prototype.tokenizeMultiLineString = function(q, start, raw) { |
| var next = this.advance(); |
| - while ($notnull_bool(next != -1)) { |
| - if ($notnull_bool(next == q)) { |
| + while (next != -1) { |
| + if (next == q) { |
| next = this.advance(); |
| - if ($notnull_bool(next == q)) { |
| + if (next == q) { |
| next = this.advance(); |
| - if ($notnull_bool(next == q)) { |
| + if (next == q) { |
| this.appendByteStringToken(39/*null.STRING_TOKEN*/, this.utf8String(start, 0)); |
| return this.advance(); |
| } |
| @@ -3692,7 +3703,7 @@ ArrayBasedScanner$SourceString.prototype.tokenizeMultiLineString = function(q, s |
| function AbstractScanner() {} |
| AbstractScanner.prototype.tokenize = function() { |
| var next = this.advance(); |
| - while ($notnull_bool(next != -1)) { |
| + while (next != -1) { |
| next = this.bigSwitch(next); |
| } |
| this.appendEofToken(); |
| @@ -3912,10 +3923,10 @@ AbstractScanner.prototype.bigSwitch = function(next) { |
| default: |
| - if ($notnull_bool(next == -1)) { |
| + if (next == -1) { |
| return -1; |
| } |
| - if ($notnull_bool(next < 0x1f)) { |
| + if (next < 0x1f) { |
| $throw(new MalformedInputException(this.get$charOffset())); |
| } |
| return this.tokenizeIdentifier(next); |
| @@ -3923,12 +3934,12 @@ AbstractScanner.prototype.bigSwitch = function(next) { |
| } |
| } |
| AbstractScanner.prototype.tokenizeTag = function(next) { |
| - if ($notnull_bool(this.get$byteOffset() == 0)) { |
| - if ($notnull_bool(this.peek() == 33/*null.$BANG*/)) { |
| + if (this.get$byteOffset() == 0) { |
| + if (this.peek() == 33/*null.$BANG*/) { |
| do { |
| next = this.advance(); |
| } |
| - while ($notnull_bool(next != 10/*null.$LF*/ && next != 13/*null.$CR*/)) |
| + while (next != 10/*null.$LF*/ && next != 13/*null.$CR*/) |
| return next; |
| } |
| } |
| @@ -3937,7 +3948,7 @@ AbstractScanner.prototype.tokenizeTag = function(next) { |
| } |
| AbstractScanner.prototype.tokenizeTilde = function(next) { |
| next = this.advance(); |
| - if ($notnull_bool(next == 47/*null.$SLASH*/)) { |
| + if (next == 47/*null.$SLASH*/) { |
| return this.select(61/*null.$EQ*/, "~/=", "~/"); |
| } |
| else { |
| @@ -3947,7 +3958,7 @@ AbstractScanner.prototype.tokenizeTilde = function(next) { |
| } |
| AbstractScanner.prototype.tokenizeOpenBracket = function(next) { |
| next = this.advance(); |
| - if ($notnull_bool(next == 93/*null.$RBRACKET*/)) { |
| + if (next == 93/*null.$RBRACKET*/) { |
| return this.select(61/*null.$EQ*/, "[]=", "[]"); |
| } |
| else { |
| @@ -4046,7 +4057,7 @@ AbstractScanner.prototype.tokenizePlus = function(next) { |
| } |
| AbstractScanner.prototype.tokenizeExclamation = function(next) { |
| next = this.advance(); |
| - if ($notnull_bool(next == 61/*null.$EQ*/)) { |
| + if (next == 61/*null.$EQ*/) { |
| return this.select(61/*null.$EQ*/, "!==", "!="); |
| } |
| this.appendStringToken(33/*null.BANG_TOKEN*/, "!"); |
| @@ -4054,7 +4065,7 @@ AbstractScanner.prototype.tokenizeExclamation = function(next) { |
| } |
| AbstractScanner.prototype.tokenizeEquals = function(next) { |
| next = this.advance(); |
| - if ($notnull_bool(next == 61/*null.$EQ*/)) { |
| + if (next == 61/*null.$EQ*/) { |
| return this.select(61/*null.$EQ*/, "===", "=="); |
| } |
| this.appendStringToken(61/*null.EQ_TOKEN*/, "="); |
| @@ -4081,7 +4092,7 @@ AbstractScanner.prototype.tokenizeGreaterThan = function(next) { |
| { |
| next = this.advance(); |
| - if ($notnull_bool(next === 61/*null.$EQ*/)) { |
| + if (next === 61/*null.$EQ*/) { |
| this.appendStringToken(62/*null.GT_TOKEN*/, ">>>="); |
| return this.advance(); |
| } |
| @@ -4127,7 +4138,7 @@ AbstractScanner.prototype.tokenizeLessThan = function(next) { |
| } |
| AbstractScanner.prototype.tokenizeNumber = function(next) { |
| var start = this.get$byteOffset(); |
| - while ($notnull_bool(true)) { |
| + while (true) { |
| next = this.advance(); |
| switch (next) { |
| case 48/*null.$0*/: |
| @@ -4164,7 +4175,7 @@ AbstractScanner.prototype.tokenizeNumber = function(next) { |
| } |
| AbstractScanner.prototype.tokenizeHexOrNumber = function(next) { |
| var x = this.peek(); |
| - if ($notnull_bool(x == 120/*null.$x*/ || x == 88/*null.$X*/)) { |
| + if (x == 120/*null.$x*/ || x == 88/*null.$X*/) { |
| this.advance(); |
| return this.tokenizeHex(x); |
| } |
| @@ -4173,7 +4184,7 @@ AbstractScanner.prototype.tokenizeHexOrNumber = function(next) { |
| AbstractScanner.prototype.tokenizeHex = function(next) { |
| var start = this.get$byteOffset(); |
| var hasDigits = false; |
| - while ($notnull_bool(true)) { |
| + while (true) { |
| next = this.advance(); |
| switch (next) { |
| case 48/*null.$0*/: |
| @@ -4204,7 +4215,7 @@ AbstractScanner.prototype.tokenizeHex = function(next) { |
| default: |
| - if ($notnull_bool(!$notnull_bool(hasDigits))) { |
| + if (!$notnull_bool(hasDigits)) { |
| $throw(new MalformedInputException(this.get$charOffset())); |
| } |
| this.appendByteStringToken(120/*null.HEXADECIMAL_TOKEN*/, this.asciiString(start)); |
| @@ -4246,7 +4257,7 @@ AbstractScanner.prototype.tokenizeDotOrNumber = function(next) { |
| AbstractScanner.prototype.tokenizeFractionPart = function(next, start) { |
| var done = false; |
| LOOP: |
| - while ($notnull_bool(!$notnull_bool(done))) { |
| + while (!$notnull_bool(done)) { |
| switch (next) { |
| case 48/*null.$0*/: |
| case 49/*null.$1*/: |
| @@ -4276,18 +4287,18 @@ AbstractScanner.prototype.tokenizeFractionPart = function(next, start) { |
| } |
| next = this.advance(); |
| } |
| - if ($notnull_bool(next == 100/*null.$d*/ || next == 68/*null.$D*/)) { |
| + if (next == 100/*null.$d*/ || next == 68/*null.$D*/) { |
| next = this.advance(); |
| } |
| this.appendByteStringToken(100/*null.DOUBLE_TOKEN*/, this.asciiString(start)); |
| return next; |
| } |
| AbstractScanner.prototype.tokenizeExponent = function(next) { |
| - if ($notnull_bool(next == 43/*null.$PLUS*/ || next == 45/*null.$MINUS*/)) { |
| + if (next == 43/*null.$PLUS*/ || next == 45/*null.$MINUS*/) { |
| next = this.advance(); |
| } |
| var hasDigits = false; |
| - while ($notnull_bool(true)) { |
| + while (true) { |
| switch (next) { |
| case 48/*null.$0*/: |
| case 49/*null.$1*/: |
| @@ -4305,7 +4316,7 @@ AbstractScanner.prototype.tokenizeExponent = function(next) { |
| default: |
| - if ($notnull_bool(!$notnull_bool(hasDigits))) { |
| + if (!$notnull_bool(hasDigits)) { |
| $throw(new MalformedInputException(this.get$charOffset())); |
| } |
| return next; |
| @@ -4338,7 +4349,7 @@ AbstractScanner.prototype.tokenizeSlashOrComment = function(next) { |
| } |
| } |
| AbstractScanner.prototype.tokenizeSingleLineComment = function(next) { |
| - while ($notnull_bool(true)) { |
| + while (true) { |
| next = this.advance(); |
| switch (next) { |
| case -1: |
| @@ -4352,7 +4363,7 @@ AbstractScanner.prototype.tokenizeSingleLineComment = function(next) { |
| } |
| AbstractScanner.prototype.tokenizeMultiLineComment = function(next) { |
| next = this.advance(); |
| - while ($notnull_bool(true)) { |
| + while (true) { |
| switch (next) { |
| case -1: |
| @@ -4361,10 +4372,10 @@ AbstractScanner.prototype.tokenizeMultiLineComment = function(next) { |
| case 42/*null.$STAR*/: |
| next = this.advance(); |
| - if ($notnull_bool(next == 47/*null.$SLASH*/)) { |
| + if (next == 47/*null.$SLASH*/) { |
| return this.advance(); |
| } |
| - else if ($notnull_bool(next == -1)) { |
| + else if (next == -1) { |
| return next; |
| } |
| break; |
| @@ -4380,21 +4391,21 @@ AbstractScanner.prototype.tokenizeMultiLineComment = function(next) { |
| AbstractScanner.prototype.tokenizeIdentifier = function(next) { |
| var start = this.get$byteOffset(); |
| var state = null; |
| - if ($notnull_bool(97/*null.$a*/ <= next && next <= 122/*null.$z*/)) { |
| + if (97/*null.$a*/ <= next && next <= 122/*null.$z*/) { |
| state = KeywordState.get$KEYWORD_STATE().next(next); |
| next = this.advance(); |
| } |
| var isAscii = true; |
| - while ($notnull_bool(true)) { |
| - if ($notnull_bool(97/*null.$a*/ <= next && next <= 122/*null.$z*/)) { |
| - if ($notnull_bool(state != null)) { |
| + while (true) { |
| + if (97/*null.$a*/ <= next && next <= 122/*null.$z*/) { |
| + if (state != null) { |
| state = state.next(next); |
| } |
| } |
| - else if ($notnull_bool(($notnull_bool(48/*null.$0*/ <= next && next <= 57/*null.$9*/)) || ($notnull_bool(65/*null.$A*/ <= next && next <= 90/*null.$Z*/))) || next == 95/*null.$_*/ || next == 36/*null.$DOLLAR*/) { |
| + else if ((48/*null.$0*/ <= next && next <= 57/*null.$9*/) || (65/*null.$A*/ <= next && next <= 90/*null.$Z*/) || next == 95/*null.$_*/ || next == 36/*null.$DOLLAR*/) { |
| state = null; |
| } |
| - else if ($notnull_bool(next < 128)) { |
| + else if (next < 128) { |
| if ($notnull_bool(state != null && state.isLeaf())) { |
| this.appendKeywordToken(state.get$keyword()); |
| } |
| @@ -4411,7 +4422,7 @@ AbstractScanner.prototype.tokenizeIdentifier = function(next) { |
| do { |
| next = this.nextByte(); |
| } |
| - while ($notnull_bool(next > 127)) |
| + while (next > 127) |
| var string = $assert_String(this.utf8String(nonAsciiStart, -1).toString()); |
| isAscii = false; |
| this.addToCharOffset(string.length); |
| @@ -4423,7 +4434,7 @@ AbstractScanner.prototype.tokenizeIdentifier = function(next) { |
| AbstractScanner.prototype.tokenizeRawString = function(next) { |
| var start = this.get$byteOffset(); |
| next = this.advance(); |
| - if ($notnull_bool(next == 34/*null.$DQ*/ || next == 39/*null.$SQ*/)) { |
| + if (next == 34/*null.$DQ*/ || next == 39/*null.$SQ*/) { |
| return this.tokenizeString(next, start, true); |
| } |
| else { |
| @@ -4433,9 +4444,9 @@ AbstractScanner.prototype.tokenizeRawString = function(next) { |
| AbstractScanner.prototype.tokenizeString = function(next, start, raw) { |
| var q = next; |
| next = this.advance(); |
| - if ($notnull_bool(q == next)) { |
| + if (q == next) { |
| next = this.advance(); |
| - if ($notnull_bool(q == next)) { |
| + if (q == next) { |
| return this.tokenizeMultiLineString(q, start, raw); |
| } |
| else { |
| @@ -4451,18 +4462,18 @@ AbstractScanner.prototype.tokenizeString = function(next, start, raw) { |
| } |
| } |
| AbstractScanner.prototype.tokenizeSingleLineString = function(next, q1, start) { |
| - while ($notnull_bool(next != -1)) { |
| - if ($notnull_bool(next == q1)) { |
| + while (next != -1) { |
| + if (next == q1) { |
| this.appendByteStringToken(39/*null.STRING_TOKEN*/, this.utf8String(start, 0)); |
| return this.advance(); |
| } |
| - else if ($notnull_bool(next == 92/*null.$BACKSLASH*/)) { |
| + else if (next == 92/*null.$BACKSLASH*/) { |
| next = this.advance(); |
| - if ($notnull_bool(next == -1)) { |
| + if (next == -1) { |
| $throw(new MalformedInputException(this.get$charOffset())); |
| } |
| } |
| - else if ($notnull_bool(next == 10/*null.$LF*/ || next == 13/*null.$CR*/)) { |
| + else if (next == 10/*null.$LF*/ || next == 13/*null.$CR*/) { |
| $throw(new MalformedInputException(this.get$charOffset())); |
| } |
| next = this.advance(); |
| @@ -4471,12 +4482,12 @@ AbstractScanner.prototype.tokenizeSingleLineString = function(next, q1, start) { |
| } |
| AbstractScanner.prototype.tokenizeSingleLineRawString = function(next, q1, start) { |
| next = this.advance(); |
| - while ($notnull_bool(next != -1)) { |
| - if ($notnull_bool(next == q1)) { |
| + while (next != -1) { |
| + if (next == q1) { |
| this.appendByteStringToken(39/*null.STRING_TOKEN*/, this.utf8String(start, 0)); |
| return this.advance(); |
| } |
| - else if ($notnull_bool(next == 10/*null.$LF*/ || next == 13/*null.$CR*/)) { |
| + else if (next == 10/*null.$LF*/ || next == 13/*null.$CR*/) { |
| $throw(new MalformedInputException(this.get$charOffset())); |
| } |
| next = this.advance(); |
| @@ -4485,12 +4496,12 @@ AbstractScanner.prototype.tokenizeSingleLineRawString = function(next, q1, start |
| } |
| AbstractScanner.prototype.tokenizeMultiLineString = function(q, start, raw) { |
| var next = this.advance(); |
| - while ($notnull_bool(next != -1)) { |
| - if ($notnull_bool(next == q)) { |
| + while (next != -1) { |
| + if (next == q) { |
| next = this.advance(); |
| - if ($notnull_bool(next == q)) { |
| + if (next == q) { |
| next = this.advance(); |
| - if ($notnull_bool(next == q)) { |
| + if (next == q) { |
| this.appendByteStringToken(39/*null.STRING_TOKEN*/, this.utf8String(start, 0)); |
| return this.advance(); |
| } |
| @@ -4505,7 +4516,7 @@ function AbstractScanner$S() {} |
| $inherits(AbstractScanner$S, AbstractScanner); |
| AbstractScanner$S.prototype.tokenize = function() { |
| var next = this.advance(); |
| - while ($notnull_bool(next != -1)) { |
| + while (next != -1) { |
| next = this.bigSwitch(next); |
| } |
| this.appendEofToken(); |
| @@ -4725,10 +4736,10 @@ AbstractScanner$S.prototype.bigSwitch = function(next) { |
| default: |
| - if ($notnull_bool(next == -1)) { |
| + if (next == -1) { |
| return -1; |
| } |
| - if ($notnull_bool(next < 0x1f)) { |
| + if (next < 0x1f) { |
| $throw(new MalformedInputException(this.get$charOffset())); |
| } |
| return this.tokenizeIdentifier(next); |
| @@ -4736,12 +4747,12 @@ AbstractScanner$S.prototype.bigSwitch = function(next) { |
| } |
| } |
| AbstractScanner$S.prototype.tokenizeTag = function(next) { |
| - if ($notnull_bool(this.get$byteOffset() == 0)) { |
| - if ($notnull_bool(this.peek() == 33/*null.$BANG*/)) { |
| + if (this.get$byteOffset() == 0) { |
| + if (this.peek() == 33/*null.$BANG*/) { |
| do { |
| next = this.advance(); |
| } |
| - while ($notnull_bool(next != 10/*null.$LF*/ && next != 13/*null.$CR*/)) |
| + while (next != 10/*null.$LF*/ && next != 13/*null.$CR*/) |
| return next; |
| } |
| } |
| @@ -4750,7 +4761,7 @@ AbstractScanner$S.prototype.tokenizeTag = function(next) { |
| } |
| AbstractScanner$S.prototype.tokenizeTilde = function(next) { |
| next = this.advance(); |
| - if ($notnull_bool(next == 47/*null.$SLASH*/)) { |
| + if (next == 47/*null.$SLASH*/) { |
| return this.select(61/*null.$EQ*/, "~/=", "~/"); |
| } |
| else { |
| @@ -4760,7 +4771,7 @@ AbstractScanner$S.prototype.tokenizeTilde = function(next) { |
| } |
| AbstractScanner$S.prototype.tokenizeOpenBracket = function(next) { |
| next = this.advance(); |
| - if ($notnull_bool(next == 93/*null.$RBRACKET*/)) { |
| + if (next == 93/*null.$RBRACKET*/) { |
| return this.select(61/*null.$EQ*/, "[]=", "[]"); |
| } |
| else { |
| @@ -4859,7 +4870,7 @@ AbstractScanner$S.prototype.tokenizePlus = function(next) { |
| } |
| AbstractScanner$S.prototype.tokenizeExclamation = function(next) { |
| next = this.advance(); |
| - if ($notnull_bool(next == 61/*null.$EQ*/)) { |
| + if (next == 61/*null.$EQ*/) { |
| return this.select(61/*null.$EQ*/, "!==", "!="); |
| } |
| this.appendStringToken(33/*null.BANG_TOKEN*/, "!"); |
| @@ -4867,7 +4878,7 @@ AbstractScanner$S.prototype.tokenizeExclamation = function(next) { |
| } |
| AbstractScanner$S.prototype.tokenizeEquals = function(next) { |
| next = this.advance(); |
| - if ($notnull_bool(next == 61/*null.$EQ*/)) { |
| + if (next == 61/*null.$EQ*/) { |
| return this.select(61/*null.$EQ*/, "===", "=="); |
| } |
| this.appendStringToken(61/*null.EQ_TOKEN*/, "="); |
| @@ -4894,7 +4905,7 @@ AbstractScanner$S.prototype.tokenizeGreaterThan = function(next) { |
| { |
| next = this.advance(); |
| - if ($notnull_bool(next === 61/*null.$EQ*/)) { |
| + if (next === 61/*null.$EQ*/) { |
| this.appendStringToken(62/*null.GT_TOKEN*/, ">>>="); |
| return this.advance(); |
| } |
| @@ -4940,7 +4951,7 @@ AbstractScanner$S.prototype.tokenizeLessThan = function(next) { |
| } |
| AbstractScanner$S.prototype.tokenizeNumber = function(next) { |
| var start = this.get$byteOffset(); |
| - while ($notnull_bool(true)) { |
| + while (true) { |
| next = this.advance(); |
| switch (next) { |
| case 48/*null.$0*/: |
| @@ -4977,7 +4988,7 @@ AbstractScanner$S.prototype.tokenizeNumber = function(next) { |
| } |
| AbstractScanner$S.prototype.tokenizeHexOrNumber = function(next) { |
| var x = this.peek(); |
| - if ($notnull_bool(x == 120/*null.$x*/ || x == 88/*null.$X*/)) { |
| + if (x == 120/*null.$x*/ || x == 88/*null.$X*/) { |
| this.advance(); |
| return this.tokenizeHex(x); |
| } |
| @@ -4986,7 +4997,7 @@ AbstractScanner$S.prototype.tokenizeHexOrNumber = function(next) { |
| AbstractScanner$S.prototype.tokenizeHex = function(next) { |
| var start = this.get$byteOffset(); |
| var hasDigits = false; |
| - while ($notnull_bool(true)) { |
| + while (true) { |
| next = this.advance(); |
| switch (next) { |
| case 48/*null.$0*/: |
| @@ -5017,7 +5028,7 @@ AbstractScanner$S.prototype.tokenizeHex = function(next) { |
| default: |
| - if ($notnull_bool(!$notnull_bool(hasDigits))) { |
| + if (!$notnull_bool(hasDigits)) { |
| $throw(new MalformedInputException(this.get$charOffset())); |
| } |
| this.appendByteStringToken(120/*null.HEXADECIMAL_TOKEN*/, this.asciiString(start)); |
| @@ -5059,7 +5070,7 @@ AbstractScanner$S.prototype.tokenizeDotOrNumber = function(next) { |
| AbstractScanner$S.prototype.tokenizeFractionPart = function(next, start) { |
| var done = false; |
| LOOP: |
| - while ($notnull_bool(!$notnull_bool(done))) { |
| + while (!$notnull_bool(done)) { |
| switch (next) { |
| case 48/*null.$0*/: |
| case 49/*null.$1*/: |
| @@ -5089,18 +5100,18 @@ AbstractScanner$S.prototype.tokenizeFractionPart = function(next, start) { |
| } |
| next = this.advance(); |
| } |
| - if ($notnull_bool(next == 100/*null.$d*/ || next == 68/*null.$D*/)) { |
| + if (next == 100/*null.$d*/ || next == 68/*null.$D*/) { |
| next = this.advance(); |
| } |
| this.appendByteStringToken(100/*null.DOUBLE_TOKEN*/, this.asciiString(start)); |
| return next; |
| } |
| AbstractScanner$S.prototype.tokenizeExponent = function(next) { |
| - if ($notnull_bool(next == 43/*null.$PLUS*/ || next == 45/*null.$MINUS*/)) { |
| + if (next == 43/*null.$PLUS*/ || next == 45/*null.$MINUS*/) { |
| next = this.advance(); |
| } |
| var hasDigits = false; |
| - while ($notnull_bool(true)) { |
| + while (true) { |
| switch (next) { |
| case 48/*null.$0*/: |
| case 49/*null.$1*/: |
| @@ -5118,7 +5129,7 @@ AbstractScanner$S.prototype.tokenizeExponent = function(next) { |
| default: |
| - if ($notnull_bool(!$notnull_bool(hasDigits))) { |
| + if (!$notnull_bool(hasDigits)) { |
| $throw(new MalformedInputException(this.get$charOffset())); |
| } |
| return next; |
| @@ -5151,7 +5162,7 @@ AbstractScanner$S.prototype.tokenizeSlashOrComment = function(next) { |
| } |
| } |
| AbstractScanner$S.prototype.tokenizeSingleLineComment = function(next) { |
| - while ($notnull_bool(true)) { |
| + while (true) { |
| next = this.advance(); |
| switch (next) { |
| case -1: |
| @@ -5165,7 +5176,7 @@ AbstractScanner$S.prototype.tokenizeSingleLineComment = function(next) { |
| } |
| AbstractScanner$S.prototype.tokenizeMultiLineComment = function(next) { |
| next = this.advance(); |
| - while ($notnull_bool(true)) { |
| + while (true) { |
| switch (next) { |
| case -1: |
| @@ -5174,10 +5185,10 @@ AbstractScanner$S.prototype.tokenizeMultiLineComment = function(next) { |
| case 42/*null.$STAR*/: |
| next = this.advance(); |
| - if ($notnull_bool(next == 47/*null.$SLASH*/)) { |
| + if (next == 47/*null.$SLASH*/) { |
| return this.advance(); |
| } |
| - else if ($notnull_bool(next == -1)) { |
| + else if (next == -1) { |
| return next; |
| } |
| break; |
| @@ -5193,21 +5204,21 @@ AbstractScanner$S.prototype.tokenizeMultiLineComment = function(next) { |
| AbstractScanner$S.prototype.tokenizeIdentifier = function(next) { |
| var start = this.get$byteOffset(); |
| var state = null; |
| - if ($notnull_bool(97/*null.$a*/ <= next && next <= 122/*null.$z*/)) { |
| + if (97/*null.$a*/ <= next && next <= 122/*null.$z*/) { |
| state = KeywordState.get$KEYWORD_STATE().next(next); |
| next = this.advance(); |
| } |
| var isAscii = true; |
| - while ($notnull_bool(true)) { |
| - if ($notnull_bool(97/*null.$a*/ <= next && next <= 122/*null.$z*/)) { |
| - if ($notnull_bool(state != null)) { |
| + while (true) { |
| + if (97/*null.$a*/ <= next && next <= 122/*null.$z*/) { |
| + if (state != null) { |
| state = state.next(next); |
| } |
| } |
| - else if ($notnull_bool(($notnull_bool(48/*null.$0*/ <= next && next <= 57/*null.$9*/)) || ($notnull_bool(65/*null.$A*/ <= next && next <= 90/*null.$Z*/))) || next == 95/*null.$_*/ || next == 36/*null.$DOLLAR*/) { |
| + else if ((48/*null.$0*/ <= next && next <= 57/*null.$9*/) || (65/*null.$A*/ <= next && next <= 90/*null.$Z*/) || next == 95/*null.$_*/ || next == 36/*null.$DOLLAR*/) { |
| state = null; |
| } |
| - else if ($notnull_bool(next < 128)) { |
| + else if (next < 128) { |
| if ($notnull_bool(state != null && state.isLeaf())) { |
| this.appendKeywordToken(state.get$keyword()); |
| } |
| @@ -5224,7 +5235,7 @@ AbstractScanner$S.prototype.tokenizeIdentifier = function(next) { |
| do { |
| next = this.nextByte(); |
| } |
| - while ($notnull_bool(next > 127)) |
| + while (next > 127) |
| var string = $assert_String(this.utf8String(nonAsciiStart, -1).toString()); |
| isAscii = false; |
| this.addToCharOffset(string.length); |
| @@ -5236,7 +5247,7 @@ AbstractScanner$S.prototype.tokenizeIdentifier = function(next) { |
| AbstractScanner$S.prototype.tokenizeRawString = function(next) { |
| var start = this.get$byteOffset(); |
| next = this.advance(); |
| - if ($notnull_bool(next == 34/*null.$DQ*/ || next == 39/*null.$SQ*/)) { |
| + if (next == 34/*null.$DQ*/ || next == 39/*null.$SQ*/) { |
| return this.tokenizeString(next, start, true); |
| } |
| else { |
| @@ -5246,9 +5257,9 @@ AbstractScanner$S.prototype.tokenizeRawString = function(next) { |
| AbstractScanner$S.prototype.tokenizeString = function(next, start, raw) { |
| var q = next; |
| next = this.advance(); |
| - if ($notnull_bool(q == next)) { |
| + if (q == next) { |
| next = this.advance(); |
| - if ($notnull_bool(q == next)) { |
| + if (q == next) { |
| return this.tokenizeMultiLineString(q, start, raw); |
| } |
| else { |
| @@ -5264,18 +5275,18 @@ AbstractScanner$S.prototype.tokenizeString = function(next, start, raw) { |
| } |
| } |
| AbstractScanner$S.prototype.tokenizeSingleLineString = function(next, q1, start) { |
| - while ($notnull_bool(next != -1)) { |
| - if ($notnull_bool(next == q1)) { |
| + while (next != -1) { |
| + if (next == q1) { |
| this.appendByteStringToken(39/*null.STRING_TOKEN*/, this.utf8String(start, 0)); |
| return this.advance(); |
| } |
| - else if ($notnull_bool(next == 92/*null.$BACKSLASH*/)) { |
| + else if (next == 92/*null.$BACKSLASH*/) { |
| next = this.advance(); |
| - if ($notnull_bool(next == -1)) { |
| + if (next == -1) { |
| $throw(new MalformedInputException(this.get$charOffset())); |
| } |
| } |
| - else if ($notnull_bool(next == 10/*null.$LF*/ || next == 13/*null.$CR*/)) { |
| + else if (next == 10/*null.$LF*/ || next == 13/*null.$CR*/) { |
| $throw(new MalformedInputException(this.get$charOffset())); |
| } |
| next = this.advance(); |
| @@ -5284,12 +5295,12 @@ AbstractScanner$S.prototype.tokenizeSingleLineString = function(next, q1, start) |
| } |
| AbstractScanner$S.prototype.tokenizeSingleLineRawString = function(next, q1, start) { |
| next = this.advance(); |
| - while ($notnull_bool(next != -1)) { |
| - if ($notnull_bool(next == q1)) { |
| + while (next != -1) { |
| + if (next == q1) { |
| this.appendByteStringToken(39/*null.STRING_TOKEN*/, this.utf8String(start, 0)); |
| return this.advance(); |
| } |
| - else if ($notnull_bool(next == 10/*null.$LF*/ || next == 13/*null.$CR*/)) { |
| + else if (next == 10/*null.$LF*/ || next == 13/*null.$CR*/) { |
| $throw(new MalformedInputException(this.get$charOffset())); |
| } |
| next = this.advance(); |
| @@ -5298,12 +5309,12 @@ AbstractScanner$S.prototype.tokenizeSingleLineRawString = function(next, q1, sta |
| } |
| AbstractScanner$S.prototype.tokenizeMultiLineString = function(q, start, raw) { |
| var next = this.advance(); |
| - while ($notnull_bool(next != -1)) { |
| - if ($notnull_bool(next == q)) { |
| + while (next != -1) { |
| + if (next == q) { |
| next = this.advance(); |
| - if ($notnull_bool(next == q)) { |
| + if (next == q) { |
| next = this.advance(); |
| - if ($notnull_bool(next == q)) { |
| + if (next == q) { |
| this.appendByteStringToken(39/*null.STRING_TOKEN*/, this.utf8String(start, 0)); |
| return this.advance(); |
| } |
| @@ -5336,7 +5347,7 @@ ScannerTask.prototype.scan = function(script) { |
| var $0; |
| var elements = $this.scanElements(script.get$text()); |
| for (var link = elements; |
| - $notnull_bool(!$notnull_bool(link.isEmpty())); link = (($0 = link.get$tail()) && $0.is$Link$Element())) { |
| + !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link$Element())) { |
| $this.compiler.universe.define((($0 = link.get$head()) && $0.is$Element())); |
| } |
| }) |
| @@ -5391,14 +5402,14 @@ PartialParser.prototype.next = function(token) { |
| return this.checkEof(token.next); |
| } |
| PartialParser.prototype.checkEof = function(token) { |
| - if ($notnull_bool(token.kind === 0/*null.EOF_TOKEN*/)) { |
| + if (token.kind === 0/*null.EOF_TOKEN*/) { |
| this.listener.unexpectedEof(); |
| $throw('Unexpected EOF'); |
| } |
| return token; |
| } |
| PartialParser.prototype.parseUnit = function(token) { |
| - while ($notnull_bool(token.kind !== 0/*null.EOF_TOKEN*/)) { |
| + while (token.kind !== 0/*null.EOF_TOKEN*/) { |
| var value = token.get$stringValue(); |
| switch (true) { |
| case value === 'interface': |
| @@ -5452,7 +5463,7 @@ PartialParser.prototype.parseNamedFunctionAlias = function(token) { |
| return this.expect(';', token); |
| } |
| PartialParser.prototype.parseReturnTypeOpt = function(token) { |
| - if ($notnull_bool(token.get$stringValue() === 'void')) { |
| + if (token.get$stringValue() === 'void') { |
| this.listener.handleVoidKeyword(token); |
| return this.next(token); |
| } |
| @@ -5529,11 +5540,11 @@ PartialParser.prototype.parseFactoryClauseOpt = function(token) { |
| return token; |
| } |
| PartialParser.prototype.skipBlock = function(token) { |
| - if ($notnull_bool(!$notnull_bool(this.optional('{', token)))) { |
| + if (!$notnull_bool(this.optional('{', token))) { |
| return this.listener.expectedBlock(token); |
| } |
| var beginGroupToken = (token && token.is$BeginGroupToken()); |
| - $assert($notnull_bool(beginGroupToken.endGroup == null || beginGroupToken.endGroup.kind === 125/*null.$RBRACE*/), "beginGroupToken.endGroup === null ||\n beginGroupToken.endGroup.kind === $RBRACE", "parser.dart", 171, 12); |
| + $assert(beginGroupToken.endGroup == null || beginGroupToken.endGroup.kind === 125/*null.$RBRACE*/, "beginGroupToken.endGroup === null ||\n beginGroupToken.endGroup.kind === $RBRACE", "parser.dart", 171, 12); |
| return beginGroupToken.endGroup; |
| } |
| PartialParser.prototype.skipArguments = function(token) { |
| @@ -5574,7 +5585,7 @@ PartialParser.prototype.parseNativeClassClauseOpt = function(token) { |
| return token; |
| } |
| PartialParser.prototype.parseString = function(token) { |
| - if ($notnull_bool(token.kind === 39/*null.STRING_TOKEN*/)) { |
| + if (token.kind === 39/*null.STRING_TOKEN*/) { |
| return this.next(token); |
| } |
| else { |
| @@ -5591,14 +5602,14 @@ PartialParser.prototype.parseIdentifier = function(token) { |
| return this.next(token); |
| } |
| PartialParser.prototype.expect = function(string, token) { |
| - if ($notnull_bool(string !== token.get$stringValue())) { |
| - if ($notnull_bool(string === '>')) { |
| - if ($notnull_bool(token.get$stringValue() === '>>')) { |
| + if (string !== token.get$stringValue()) { |
| + if (string === '>') { |
| + if (token.get$stringValue() === '>>') { |
| var gt = new StringToken(62/*null.GT_TOKEN*/, '>', token.charOffset + 1); |
| gt.next = token.next; |
| return gt; |
| } |
| - else if ($notnull_bool(token.get$stringValue() === '>>>')) { |
| + else if (token.get$stringValue() === '>>>') { |
| var gtgt = new StringToken(1024/*null.UNKNOWN_TOKEN*/, '>>', token.charOffset + 1); |
| gtgt.next = token.next; |
| return gtgt; |
| @@ -5678,7 +5689,7 @@ PartialParser.prototype.parseTopLevelMember = function(token) { |
| this.listener.beginTopLevelMember(token); |
| var previous = token; |
| LOOP: |
| - while ($notnull_bool(token != null)) { |
| + while (token != null) { |
| var kind = token.kind; |
| switch (true) { |
| case kind === 123/*null.LBRACE_TOKEN*/: |
| @@ -5698,7 +5709,7 @@ PartialParser.prototype.parseTopLevelMember = function(token) { |
| } |
| token = this.parseIdentifier(previous); |
| var isField; |
| - while ($notnull_bool(true)) { |
| + while (true) { |
| if ($notnull_bool(this.optional('(', token))) { |
| isField = false; |
| break; |
| @@ -5711,13 +5722,13 @@ PartialParser.prototype.parseTopLevelMember = function(token) { |
| token = this.listener.unexpected(token); |
| } |
| } |
| - if ($notnull_bool(!$notnull_bool(isField))) { |
| + if (!$notnull_bool(isField)) { |
| token = this.next(this.skipArguments((token && token.is$BeginGroupToken()))); |
| } |
| - while ($notnull_bool(token != null && token.kind !== 123/*null.LBRACE_TOKEN*/) && token.kind !== 59/*null.SEMICOLON_TOKEN*/) { |
| + while (token != null && token.kind !== 123/*null.LBRACE_TOKEN*/ && token.kind !== 59/*null.SEMICOLON_TOKEN*/) { |
| token = this.next(token); |
| } |
| - if ($notnull_bool(!$notnull_bool(this.optional(';', token)))) { |
| + if (!$notnull_bool(this.optional(';', token))) { |
| token = this.skipBlock(token); |
| } |
| if ($notnull_bool(isField)) { |
| @@ -5732,7 +5743,7 @@ PartialParser.prototype.parseLibraryTags = function(token) { |
| this.listener.beginLibraryTag(token); |
| token = this.parseIdentifier(this.next(token)); |
| token = this.expect('(', token); |
| - while ($notnull_bool(token != null && token.kind !== 40/*null.LPAREN_TOKEN*/) && token.kind !== 41/*null.RPAREN_TOKEN*/) { |
| + while (token != null && token.kind !== 40/*null.LPAREN_TOKEN*/ && token.kind !== 41/*null.RPAREN_TOKEN*/) { |
| token = this.next(token); |
| } |
| token = this.expect(')', token); |
| @@ -5786,7 +5797,7 @@ Parser.prototype.parseFunctionBody = function(token) { |
| var statementCount = 0; |
| this.listener.beginFunctionBody(begin); |
| token = this.checkEof(this.expect('{', token)); |
| - while ($notnull_bool(!$notnull_bool(this.optional('}', token)))) { |
| + while (!$notnull_bool(this.optional('}', token))) { |
| token = this.parseStatement(token); |
| ++statementCount; |
| } |
| @@ -5851,20 +5862,20 @@ Parser.prototype.parseReturnStatement = function(token) { |
| Parser.prototype.parseExpressionStatementOrDeclaration = function(token) { |
| $assert(token.kind === 97/*null.IDENTIFIER_TOKEN*/, "token.kind === IDENTIFIER_TOKEN", "parser.dart", 464, 12); |
| var peek1 = this.next(token); |
| - if ($notnull_bool(peek1.kind === 97/*null.IDENTIFIER_TOKEN*/)) { |
| + if (peek1.kind === 97/*null.IDENTIFIER_TOKEN*/) { |
| return this.parseLocalDeclaration(token, peek1); |
| } |
| - else if ($notnull_bool(peek1.kind === 60/*null.LT_TOKEN*/)) { |
| + else if (peek1.kind === 60/*null.LT_TOKEN*/) { |
| var beginGroupToken = (peek1 && peek1.is$BeginGroupToken()); |
| var gtToken = beginGroupToken.endGroup; |
| - if ($notnull_bool(gtToken != null && gtToken.next.kind === 97/*null.IDENTIFIER_TOKEN*/)) { |
| + if (gtToken != null && gtToken.next.kind === 97/*null.IDENTIFIER_TOKEN*/) { |
| var identifier = gtToken.next; |
| var afterId = identifier.next; |
| var afterIdKind = afterId.kind; |
| - if ($notnull_bool(afterIdKind === 61/*null.EQ_TOKEN*/ || afterIdKind === 59/*null.SEMICOLON_TOKEN*/)) { |
| + if (afterIdKind === 61/*null.EQ_TOKEN*/ || afterIdKind === 59/*null.SEMICOLON_TOKEN*/) { |
| return this.parseLocalDeclaration(token, identifier); |
| } |
| - else if ($notnull_bool(afterIdKind === 41/*null.RPAREN_TOKEN*/)) { |
| + else if (afterIdKind === 41/*null.RPAREN_TOKEN*/) { |
| var beginParen = (afterId && afterId.is$BeginGroupToken()); |
| var endParen = beginParen.endGroup; |
| var afterParens = endParen.next; |
| @@ -5878,7 +5889,7 @@ Parser.prototype.parseExpressionStatementOrDeclaration = function(token) { |
| } |
| Parser.prototype.parseLocalDeclaration = function(token, peek1) { |
| var peek2 = this.next(peek1); |
| - if ($notnull_bool(peek2.get$stringValue() === '(')) { |
| + if (peek2.get$stringValue() === '(') { |
| return this.parseFunction(token); |
| } |
| else { |
| @@ -5920,8 +5931,8 @@ Parser.prototype.parseBinaryExpression = function(token, precedence) { |
| token = this.parsePrimary(token); |
| var tokenLevel = this.getPrecedence(token); |
| for (var level = $assert_num(tokenLevel); |
| - $notnull_bool(level >= precedence); --level) { |
| - while ($notnull_bool(tokenLevel === level)) { |
| + level >= precedence; --level) { |
| + while (tokenLevel === level) { |
| var operator = token; |
| token = this.parseBinaryExpression(this.next(token), level + 1); |
| this.listener.handleBinaryExpression(operator); |
| @@ -5931,9 +5942,9 @@ Parser.prototype.parseBinaryExpression = function(token, precedence) { |
| return token; |
| } |
| Parser.prototype.getPrecedence = function(token) { |
| - if ($notnull_bool(token == null)) return 0; |
| + if (token == null) return 0; |
| var value = token.get$stringValue(); |
| - if ($notnull_bool(value == null)) return 0; |
| + if (value == null) return 0; |
| switch (true) { |
| case value === '(': |
| @@ -6170,7 +6181,7 @@ Parser.prototype.parseSend = function(token) { |
| return token; |
| } |
| Parser.prototype.parseArgumentsOpt = function(token) { |
| - if ($notnull_bool(!$notnull_bool(this.optional('(', token)))) { |
| + if (!$notnull_bool(this.optional('(', token))) { |
| this.listener.handleNoArguments(token); |
| return token; |
| } |
| @@ -6266,7 +6277,7 @@ Parser.prototype.parseBlock = function(token) { |
| this.listener.beginBlock(begin); |
| var statementCount = 0; |
| token = this.expect('{', token); |
| - while ($notnull_bool(!$notnull_bool(this.optional('}', token)))) { |
| + while (!$notnull_bool(this.optional('}', token))) { |
| token = this.parseStatement(token); |
| ++statementCount; |
| } |
| @@ -6559,7 +6570,7 @@ ElementListener.prototype.beginLibraryTag = function(token) { |
| } |
| ElementListener.prototype.endClass = function(interfacesCount, beginToken, extendsKeyword, implementsKeyword, endToken) { |
| var $0; |
| - for (; $notnull_bool(interfacesCount > 0); --interfacesCount) { |
| + for (; interfacesCount > 0; --interfacesCount) { |
| this.popNode(); |
| } |
| var supertype = (($0 = this.popNode()) && $0.is$TypeAnnotation()); |
| @@ -6592,7 +6603,7 @@ ElementListener.prototype.endTypeVariable = function(token) { |
| var name = (($0 = this.popNode()) && $0.is$Identifier()); |
| } |
| ElementListener.prototype.endTypeArguments = function(count, beginToken, endToken) { |
| - for (; $notnull_bool(count > 0); --count) { |
| + for (; count > 0; --count) { |
| this.popNode(); |
| } |
| } |
| @@ -6695,16 +6706,16 @@ NodeListener.prototype.handleLiteralString = function(token) { |
| this.pushNode(new LiteralString(token)); |
| } |
| NodeListener.prototype.handleBinaryExpression = function(token) { |
| - var arguments = new NodeList(null, LinkFactory.Link$factory(this.popNode()), null, null); |
| + var arguments = new NodeList(null, LinkFactory.createLink(this.popNode()), null, null); |
| this.pushNode(new Send(this.popNode(), new Operator(token), arguments)); |
| } |
| NodeListener.prototype.handleAssignmentExpression = function(token) { |
| var arguments = new NodeList.singleton$ctor(this.popNode()); |
| var node = this.popNode(); |
| - if ($notnull_bool(!(node instanceof Send))) this.canceler.cancel(('not assignable: ' + node + '')); |
| + if (!(node instanceof Send)) this.canceler.cancel(('not assignable: ' + node + '')); |
| var send = (node && node.is$Send()); |
| - if ($notnull_bool(!$notnull_bool(send.get$isPropertyAccess()))) this.canceler.cancel(('not assignable: ' + node + '')); |
| - if ($notnull_bool((send instanceof SendSet))) this.canceler.cancel('chained assignment'); |
| + if (!$notnull_bool(send.get$isPropertyAccess())) this.canceler.cancel(('not assignable: ' + node + '')); |
| + if ((send instanceof SendSet)) this.canceler.cancel('chained assignment'); |
| this.pushNode(new SendSet(send.receiver, send.selector, token, arguments)); |
| } |
| NodeListener.prototype.handleConditionalExpression = function(question, colon) { |
| @@ -6751,7 +6762,7 @@ NodeListener.prototype.endInitializer = function(assignmentOperator) { |
| } |
| NodeListener.prototype.endIfStatement = function(ifToken, elseToken) { |
| var $0; |
| - var elsePart = (($0 = $notnull_bool((elseToken == null)) ? null : this.popNode()) && $0.is$Statement()); |
| + var elsePart = (($0 = (elseToken == null) ? null : this.popNode()) && $0.is$Statement()); |
| var thenPart = (($0 = this.popNode()) && $0.is$Statement()); |
| var condition = (($0 = this.popNode()) && $0.is$NodeList()); |
| this.pushNode(new If(condition, thenPart, elsePart, ifToken, elseToken)); |
| @@ -6782,10 +6793,10 @@ NodeListener.prototype.endRethrowStatement = function(throwToken, endToken) { |
| NodeListener.prototype.makeNodeList = function(count, beginToken, endToken, delimiter) { |
| var $0; |
| var nodes = const$16/*const EmptyLink()*/; |
| - for (; $notnull_bool(count > 0); --count) { |
| + for (; count > 0; --count) { |
| nodes = (($0 = nodes.prepend(this.popNode())) && $0.is$Link$Node()); |
| } |
| - var sourceDelimiter = (($0 = $notnull_bool((delimiter == null)) ? null : new StringWrapper(delimiter)) && $0.is$SourceString()); |
| + var sourceDelimiter = (($0 = (delimiter == null) ? null : new StringWrapper(delimiter)) && $0.is$SourceString()); |
| return new NodeList(beginToken, nodes, endToken, sourceDelimiter); |
| } |
| NodeListener.prototype.log = function(message) { |
| @@ -6802,7 +6813,7 @@ $inherits(PartialFunctionElement, FunctionElement); |
| PartialFunctionElement.prototype.parseNode = function(canceler, logger) { |
| var $this = this; // closure support |
| var $0; |
| - if ($notnull_bool(this.node != null)) return this.node; |
| + if (this.node != null) return this.node; |
| this.node = (($0 = parse(canceler, logger, (function (p) { |
| return p.parseFunction($this.beginToken); |
| }) |
| @@ -6820,7 +6831,7 @@ $inherits(PartialClassElement, ClassElement); |
| PartialClassElement.prototype.parseNode = function(canceler, logger) { |
| var $this = this; // closure support |
| var $0; |
| - if ($notnull_bool(this.node != null)) return this.node; |
| + if (this.node != null) return this.node; |
| this.node = (($0 = parse(canceler, logger, (function (p) { |
| return p.parseClass($this.beginToken); |
| }) |
| @@ -6841,7 +6852,7 @@ StringScanner.prototype.peek = function() { |
| return this.charAt(this.byteOffset + 1); |
| } |
| StringScanner.prototype.charAt = function(index) { |
| - return $notnull_bool((this.string.length > $assert_num(index))) ? this.string.charCodeAt(index) : -1; |
| + return (this.string.length > $assert_num(index)) ? this.string.charCodeAt(index) : -1; |
| } |
| StringScanner.prototype.asciiString = function(start) { |
| return new SubstringWrapper(this.string, start, this.byteOffset); |
| @@ -6865,7 +6876,7 @@ SubstringWrapper.prototype.hashCode = function() { |
| return this.toString().hashCode(); |
| } |
| SubstringWrapper.prototype.$eq = function(other) { |
| - return $notnull_bool(!!(other && other.is$SourceString) && this.toString() == other.toString()); |
| + return !!(other && other.is$SourceString) && this.toString() == other.toString(); |
| } |
| SubstringWrapper.prototype.printOn = function(sb) { |
| sb.add(this); |
| @@ -6936,7 +6947,7 @@ StringWrapper.prototype.hashCode = function() { |
| return this.toString().hashCode(); |
| } |
| StringWrapper.prototype.$eq = function(other) { |
| - return $notnull_bool(!!(other && other.is$SourceString) && this.toString() == other.toString()); |
| + return !!(other && other.is$SourceString) && this.toString() == other.toString(); |
| } |
| StringWrapper.prototype.printOn = function(sb) { |
| sb.add(this.internalString); |
| @@ -6963,7 +6974,7 @@ function Keyword(syntax, isPseudo) { |
| Keyword.prototype.is$Keyword = function(){return this;}; |
| Keyword.prototype.is$SourceString = function(){return this;}; |
| Keyword.get$keywords = function() { |
| - if ($notnull_bool(Keyword._keywords == null)) { |
| + if (Keyword._keywords == null) { |
| Keyword._keywords = Keyword.computeKeywordMap(); |
| } |
| return Keyword._keywords; |
| @@ -6980,7 +6991,7 @@ Keyword.prototype.hashCode = function() { |
| return this.syntax.hashCode(); |
| } |
| Keyword.prototype.$eq = function(other) { |
| - return $notnull_bool(!!(other && other.is$SourceString) && this.toString() == other.toString()); |
| + return !!(other && other.is$SourceString) && this.toString() == other.toString(); |
| } |
| Keyword.prototype.printOn = function(sb) { |
| sb.add(this.syntax); |
| @@ -6995,10 +7006,10 @@ Keyword.prototype.get$stringValue = function() { |
| function KeywordState() {} |
| KeywordState.prototype.is$KeywordState = function(){return this;}; |
| KeywordState.get$KEYWORD_STATE = function() { |
| - if ($notnull_bool(KeywordState._KEYWORD_STATE == null)) { |
| + if (KeywordState._KEYWORD_STATE == null) { |
| var strings = new ListFactory$String(const$234/*Keyword.values*/.get$length()); |
| for (var i = 0; |
| - $notnull_bool(i < const$234/*Keyword.values*/.get$length()); i++) { |
| + i < const$234/*Keyword.values*/.get$length(); i++) { |
| strings.$setindex(i, const$234/*Keyword.values*/[i].syntax); |
| } |
| strings.sort((function (a, b) { |
| @@ -7015,11 +7026,11 @@ KeywordState.computeKeywordStateTable = function(start, strings, offset, length) |
| var chunk = 0; |
| var chunkStart = -1; |
| for (var i = offset; |
| - $notnull_bool(i < offset + length); i++) { |
| - if ($notnull_bool(strings.$index(i).length > start)) { |
| + i < offset + length; i++) { |
| + if (strings.$index(i).length > start) { |
| var c = strings.$index(i).charCodeAt(start); |
| - if ($notnull_bool(chunk != c)) { |
| - if ($notnull_bool(chunkStart != -1)) { |
| + if (chunk != c) { |
| + if (chunkStart != -1) { |
| result.$setindex(chunk - 97/*null.$a*/, KeywordState.computeKeywordStateTable(start + 1, strings, chunkStart, i - chunkStart)); |
| } |
| chunkStart = i; |
| @@ -7027,7 +7038,7 @@ KeywordState.computeKeywordStateTable = function(start, strings, offset, length) |
| } |
| } |
| } |
| - if ($notnull_bool(chunkStart != -1)) { |
| + if (chunkStart != -1) { |
| result.$setindex(chunk - 97/*null.$a*/, KeywordState.computeKeywordStateTable(start + 1, strings, chunkStart, offset + length - chunkStart)); |
| } |
| else { |
| @@ -7057,7 +7068,7 @@ ArrayKeywordState.prototype.toString = function() { |
| sb.add("["); |
| var foo = this.table; |
| for (var i = 0; |
| - $notnull_bool(i < foo.length); i++) { |
| + i < foo.length; i++) { |
| if ($notnull_bool($ne(foo.$index(i), null))) { |
| sb.add(("" + (i + 97/*null.$a*/) + ": " + foo.$index(i) + "; ")); |
| } |
| @@ -7177,9 +7188,9 @@ Send.prototype.getBeginToken = function() { |
| Send.prototype.getEndToken = function() { |
| var $0; |
| var token; |
| - if ($notnull_bool(this.argumentsNode != null)) token = this.argumentsNode.getEndToken(); |
| - if ($notnull_bool(token != null)) return token; |
| - if ($notnull_bool(this.selector != null)) { |
| + if (this.argumentsNode != null) token = this.argumentsNode.getEndToken(); |
| + if (token != null) return token; |
| + if (this.selector != null) { |
| return (($0 = this.selector.getEndToken()) && $0.is$Token()); |
| } |
| return (($0 = this.receiver.getBeginToken()) && $0.is$Token()); |
| @@ -7204,7 +7215,7 @@ function NodeList(beginToken, nodes, endToken, delimiter) { |
| // Initializers done |
| } |
| NodeList.singleton$ctor = function(node) { |
| - NodeList.call(this, null, LinkFactory.Link$factory(node)); |
| + NodeList.call(this, null, LinkFactory.createLink(node)); |
| // Initializers done |
| } |
| NodeList.singleton$ctor.prototype = NodeList.prototype; |
| @@ -7215,14 +7226,14 @@ NodeList.prototype.accept = function(visitor) { |
| } |
| NodeList.prototype.getBeginToken = function() { |
| var $0; |
| - if ($notnull_bool(this.beginToken != null)) return this.beginToken; |
| - if ($notnull_bool(this.nodes != null)) { |
| + if (this.beginToken != null) return this.beginToken; |
| + if (this.nodes != null) { |
| for (var link = this.nodes; |
| - $notnull_bool(!$notnull_bool(link.isEmpty())); link = (($0 = link.get$tail()) && $0.is$Link$Node())) { |
| - if ($notnull_bool(link.get$head().getBeginToken() != null)) { |
| + !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link$Node())) { |
| + if (link.get$head().getBeginToken() != null) { |
| return (($0 = link.get$head().getBeginToken()) && $0.is$Token()); |
| } |
| - if ($notnull_bool(link.get$head().getEndToken() != null)) { |
| + if (link.get$head().getEndToken() != null) { |
| return (($0 = link.get$head().getEndToken()) && $0.is$Token()); |
| } |
| } |
| @@ -7231,12 +7242,12 @@ NodeList.prototype.getBeginToken = function() { |
| } |
| NodeList.prototype.getEndToken = function() { |
| var $0; |
| - if ($notnull_bool(this.endToken != null)) return this.endToken; |
| - if ($notnull_bool(this.nodes != null)) { |
| + if (this.endToken != null) return this.endToken; |
| + if (this.nodes != null) { |
| var link = this.nodes; |
| - while ($notnull_bool(!$notnull_bool(link.get$tail().isEmpty()))) link = (($0 = link.get$tail()) && $0.is$Link$Node()); |
| - if ($notnull_bool(link.get$head().getEndToken() != null)) return (($0 = link.get$head().getEndToken()) && $0.is$Token()); |
| - if ($notnull_bool(link.get$head().getBeginToken() != null)) return (($0 = link.get$head().getBeginToken()) && $0.is$Token()); |
| + while (!$notnull_bool(link.get$tail().isEmpty())) link = (($0 = link.get$tail()) && $0.is$Link$Node()); |
| + if (link.get$head().getEndToken() != null) return (($0 = link.get$head().getEndToken()) && $0.is$Token()); |
| + if (link.get$head().getBeginToken() != null) return (($0 = link.get$head().getBeginToken()) && $0.is$Token()); |
| } |
| return this.beginToken; |
| } |
| @@ -7275,7 +7286,7 @@ If.prototype.getBeginToken = function() { |
| return this.ifToken; |
| } |
| If.prototype.getEndToken = function() { |
| - if ($notnull_bool(this.elsePart == null)) return this.thenPart.getEndToken(); |
| + if (this.elsePart == null) return this.thenPart.getEndToken(); |
| return this.elsePart.getEndToken(); |
| } |
| // ********** Code for For ************** |
| @@ -7572,7 +7583,7 @@ Unparser.prototype.add = function(string) { |
| string.printOn(this.sb); |
| } |
| Unparser.prototype.visit = function(node) { |
| - if ($notnull_bool(node != null)) { |
| + if (node != null) { |
| if ($notnull_bool(this.printDebugInfo)) this.sb.add(('[' + node.getObjectDescription() + ': ')); |
| node.accept(this); |
| if ($notnull_bool(this.printDebugInfo)) this.sb.add(']'); |
| @@ -7599,7 +7610,7 @@ Unparser.prototype.visitFor = function(node) { |
| this.visit(node.body); |
| } |
| Unparser.prototype.visitFunctionExpression = function(node) { |
| - if ($notnull_bool(node.returnType != null)) { |
| + if (node.returnType != null) { |
| this.visit(node.returnType); |
| this.sb.add(' '); |
| } |
| @@ -7639,11 +7650,11 @@ Unparser.prototype.visitLiteralString = function(node) { |
| } |
| Unparser.prototype.visitNodeList = function(node) { |
| var $0; |
| - if ($notnull_bool(node.beginToken != null)) this.add((($0 = node.beginToken.get$value()) && $0.is$SourceString())); |
| - if ($notnull_bool(node.nodes != null)) { |
| + if (node.beginToken != null) this.add((($0 = node.beginToken.get$value()) && $0.is$SourceString())); |
| + if (node.nodes != null) { |
| node.nodes.printOn(this.sb, node.delimiter); |
| } |
| - if ($notnull_bool(node.endToken != null)) this.add((($0 = node.endToken.get$value()) && $0.is$SourceString())); |
| + if (node.endToken != null) this.add((($0 = node.endToken.get$value()) && $0.is$SourceString())); |
| } |
| Unparser.prototype.visitOperator = function(node) { |
| this.visitIdentifier(node); |
| @@ -7658,16 +7669,16 @@ Unparser.prototype.visitReturn = function(node) { |
| this.add((($0 = node.endToken.get$value()) && $0.is$SourceString())); |
| } |
| Unparser.prototype.visitSend = function(node) { |
| - if ($notnull_bool(node.receiver != null)) { |
| + if (node.receiver != null) { |
| this.visit(node.receiver); |
| - if ($notnull_bool(!(node.selector instanceof Operator))) this.sb.add('.'); |
| + if (!(node.selector instanceof Operator)) this.sb.add('.'); |
| } |
| this.visit(node.selector); |
| this.visit(node.argumentsNode); |
| } |
| Unparser.prototype.visitSendSet = function(node) { |
| var $0; |
| - if ($notnull_bool(node.receiver != null)) { |
| + if (node.receiver != null) { |
| this.visit(node.receiver); |
| this.sb.add('.'); |
| } |
| @@ -7677,7 +7688,7 @@ Unparser.prototype.visitSendSet = function(node) { |
| } |
| Unparser.prototype.visitThrow = function(node) { |
| node.throwToken.get$value().printOn(this.sb); |
| - if ($notnull_bool(node.expression != null)) { |
| + if (node.expression != null) { |
| this.visit(node.expression); |
| } |
| node.endToken.get$value().printOn(this.sb); |
| @@ -7687,7 +7698,7 @@ Unparser.prototype.visitTypeAnnotation = function(node) { |
| } |
| Unparser.prototype.visitVariableDefinitions = function(node) { |
| var $0; |
| - if ($notnull_bool(node.type != null)) { |
| + if (node.type != null) { |
| this.visit(node.type); |
| } |
| else { |
| @@ -7695,12 +7706,12 @@ Unparser.prototype.visitVariableDefinitions = function(node) { |
| } |
| this.sb.add(' '); |
| this.visit(node.definitions); |
| - if ($notnull_bool(node.endToken != null)) this.add((($0 = node.endToken.get$value()) && $0.is$SourceString())); |
| + if (node.endToken != null) this.add((($0 = node.endToken.get$value()) && $0.is$SourceString())); |
| } |
| // ********** Code for top level ************** |
| function firstBeginToken(first, second) { |
| var $0; |
| - return (($0 = $notnull_bool((first != null)) ? first.getBeginToken() : second.getBeginToken()) && $0.is$Token()); |
| + return (($0 = (first != null) ? first.getBeginToken() : second.getBeginToken()) && $0.is$Token()); |
| } |
| // ********** Library elements ************** |
| // ********** Code for ElementKind ************** |
| @@ -7751,13 +7762,13 @@ function FunctionElement(name) { |
| $inherits(FunctionElement, Element); |
| FunctionElement.prototype.computeType = function(compiler, types) { |
| var $0; |
| - if ($notnull_bool(this.type != null)) return (($0 = this.type) && $0.is$FunctionType()); |
| + if (this.type != null) return (($0 = this.type) && $0.is$FunctionType()); |
| var node = (($0 = this.parseNode(compiler, compiler)) && $0.is$FunctionExpression()); |
| var returnType = getType(node.returnType, types); |
| - if ($notnull_bool(returnType == null)) compiler.cancel(('unknown type ' + returnType + '')); |
| + if (returnType == null) compiler.cancel(('unknown type ' + returnType + '')); |
| var parameterTypes = new LinkBuilderImplementation$Type(); |
| for (var link = node.parameters.nodes; |
| - $notnull_bool(!$notnull_bool(link.isEmpty())); link = link.get$tail()) { |
| + !$notnull_bool(link.isEmpty()); link = link.get$tail()) { |
| var parameter = (($0 = link.get$head()) && $0.is$VariableDefinitions()); |
| parameterTypes.addLast(getType(parameter.type, types)); |
| } |
| @@ -7776,7 +7787,7 @@ ClassElement.prototype.computeType = function(compiler, types) { |
| // ********** Code for top level ************** |
| function getType(annotation, types) { |
| var $0; |
| - if ($notnull_bool(annotation == null || annotation.typeName == null)) { |
| + if (annotation == null || annotation.typeName == null) { |
| return (($0 = types.dynamicType) && $0.is$Type()); |
| } |
| return (($0 = types.lookup(annotation.typeName.get$source())) && $0.is$Type()); |
| @@ -7799,7 +7810,7 @@ SsaBuilderTask.prototype.build = function(tree, elements) { |
| var function_ = (tree && tree.is$FunctionExpression()); |
| var graph = $this.compileMethod(function_.parameters, function_.body, elements); |
| $assert(graph.isValid(), "graph.isValid()", "builder.dart", 14, 14); |
| - if ($notnull_bool(false/*null.GENERATE_SSA_TRACE*/)) { |
| + if (false/*null.GENERATE_SSA_TRACE*/) { |
| var name = (($0 = function_.name) && $0.is$Identifier()); |
| HTracer.HTracer$singleton$factory().traceCompilation(name.get$source().toString()); |
| HTracer.HTracer$singleton$factory().traceGraph('builder', graph); |
| @@ -7829,7 +7840,7 @@ SsaBuilder.prototype.build = function(parameters, body) { |
| this.close(new HGoto()).addSuccessor(block); |
| this.open(block); |
| body.accept(this); |
| - if ($notnull_bool(!$notnull_bool(this.isAborted()))) this.close(new HGoto()).addSuccessor(this.graph.exit); |
| + if (!$notnull_bool(this.isAborted())) this.close(new HGoto()).addSuccessor(this.graph.exit); |
| this.graph.finalize(); |
| return this.graph; |
| } |
| @@ -7862,17 +7873,17 @@ SsaBuilder.prototype.pop = function() { |
| return (($0 = this.stack.removeLast()) && $0.is$HInstruction()); |
| } |
| SsaBuilder.prototype.visit = function(node) { |
| - if ($notnull_bool(node != null)) node.accept(this); |
| + if (node != null) node.accept(this); |
| } |
| SsaBuilder.prototype.visitParameters = function(parameters) { |
| var $0; |
| var parameterIndex = 0; |
| for (var link = parameters.nodes; |
| - $notnull_bool(!$notnull_bool(link.isEmpty())); link = (($0 = link.get$tail()) && $0.is$Link$Node())) { |
| + !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link$Node())) { |
| var container = (($0 = link.get$head()) && $0.is$VariableDefinitions()); |
| var identifierLink = container.definitions.nodes; |
| $assert($notnull_bool(!$notnull_bool(identifierLink.isEmpty()) && identifierLink.get$tail().isEmpty()), "!identifierLink.isEmpty() && identifierLink.tail.isEmpty()", "builder.dart", 115, 14); |
| - if ($notnull_bool(!(identifierLink.get$head() instanceof Identifier))) { |
| + if (!(identifierLink.get$head() instanceof Identifier)) { |
| this.compiler.unimplemented("SsaBuilder.visitParameters non-identifier"); |
| } |
| var parameterId = (($0 = identifierLink.get$head()) && $0.is$Identifier()); |
| @@ -7885,15 +7896,15 @@ SsaBuilder.prototype.visitParameters = function(parameters) { |
| SsaBuilder.prototype.visitBlock = function(node) { |
| var $0; |
| for (var link = node.statements.nodes; |
| - $notnull_bool(!$notnull_bool(link.isEmpty())); link = (($0 = link.get$tail()) && $0.is$Link$Node())) { |
| + !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link$Node())) { |
| this.visit((($0 = link.get$head()) && $0.is$Node())); |
| if ($notnull_bool(this.isAborted())) { |
| - if ($notnull_bool(!$notnull_bool(this.stack.isEmpty()))) this.compiler.cancel('non-empty instruction stack'); |
| + if (!this.stack.isEmpty()) this.compiler.cancel('non-empty instruction stack'); |
| return; |
| } |
| } |
| - $assert($notnull_bool(!(this.current.last instanceof HGoto) && !(this.current.last instanceof HReturn)), "current.last is !HGoto && current.last is !HReturn", "builder.dart", 138, 12); |
| - if ($notnull_bool(!$notnull_bool(this.stack.isEmpty()))) this.compiler.cancel('non-empty instruction stack'); |
| + $assert(!(this.current.last instanceof HGoto) && !(this.current.last instanceof HReturn), "current.last is !HGoto && current.last is !HReturn", "builder.dart", 138, 12); |
| + if (!this.stack.isEmpty()) this.compiler.cancel('non-empty instruction stack'); |
| } |
| SsaBuilder.prototype.visitClassNode = function(node) { |
| this.compiler.unimplemented("SsaBuilder.visitClassNode"); |
| @@ -7904,7 +7915,7 @@ SsaBuilder.prototype.visitExpressionStatement = function(node) { |
| } |
| SsaBuilder.prototype.visitFor = function(node) { |
| var $this = this; // closure support |
| - $assert($notnull_bool(node.initializer != null && node.condition != null) && node.update != null && node.body != null, "node.initializer !== null && node.condition !== null &&\n node.update !== null && node.body !== null", "builder.dart", 152, 12); |
| + $assert(node.initializer != null && node.condition != null && node.update != null && node.body != null, "node.initializer !== null && node.condition !== null &&\n node.update !== null && node.body !== null", "builder.dart", 152, 12); |
| this.visit(node.initializer); |
| $assert(!$notnull_bool(this.isAborted()), "!isAborted()", "builder.dart", 156, 12); |
| var initializerBlock = this.close(new HGoto()); |
| @@ -7945,11 +7956,11 @@ SsaBuilder.prototype.visitFor = function(node) { |
| $assert(currentPhi.inputs.$index(0) === currentPhi.inputs.$index(1), "currentPhi.inputs[0] === currentPhi.inputs[1]", "builder.dart", 208, 14); |
| $assert(currentPhi.inputs.$index(0) === instruction, "currentPhi.inputs[0] === instruction", "builder.dart", 209, 14); |
| var afterBodyInstruction = (($0 = $this.definitions.$index(element)) && $0.is$HInstruction()); |
| - if ($notnull_bool(afterBodyInstruction !== currentPhi)) { |
| + if (afterBodyInstruction !== currentPhi) { |
| var oldInput = (($0 = currentPhi.inputs.$index(0)) && $0.is$HInstruction()); |
| for (var i = 0; |
| - $notnull_bool(i < oldInput.get$usedBy().length); i++) { |
| - if ($notnull_bool(oldInput.get$usedBy().$index(i) === currentPhi)) { |
| + i < oldInput.get$usedBy().length; i++) { |
| + if (oldInput.get$usedBy().$index(i) === currentPhi) { |
| oldInput.get$usedBy().$setindex(i, oldInput.get$usedBy().$index(oldInput.get$usedBy().length - 1)); |
| oldInput.get$usedBy().length = oldInput.get$usedBy().length - 1; |
| break; |
| @@ -7961,10 +7972,10 @@ SsaBuilder.prototype.visitFor = function(node) { |
| else { |
| conditionBlock.rewrite(currentPhi, (($0 = currentPhi.inputs.$index(0)) && $0.is$HInstruction())); |
| conditionBlock.remove(currentPhi); |
| - if ($notnull_bool($this.definitions.$index(element) === currentPhi)) { |
| + if ($this.definitions.$index(element) === currentPhi) { |
| $this.definitions.$setindex(element, currentPhi.inputs.$index(0)); |
| } |
| - if ($notnull_bool(conditionDefinitions.$index(element) === currentPhi)) { |
| + if (conditionDefinitions.$index(element) === currentPhi) { |
| conditionDefinitions.$setindex(element, currentPhi.inputs.$index(0)); |
| } |
| } |
| @@ -7988,7 +7999,7 @@ SsaBuilder.prototype.visitIdentifier = function(node) { |
| this.stack.add(def); |
| } |
| SsaBuilder.prototype.joinDefinitions = function(joinBlock, incoming1, incoming2) { |
| - if ($notnull_bool(incoming1.get$length() > incoming2.get$length())) { |
| + if (incoming1.get$length() > incoming2.get$length()) { |
| return this.joinDefinitions(joinBlock, incoming2, incoming1); |
| } |
| var joinedDefinitions = new HashMapImplementation$Element$HInstruction(); |
| @@ -7996,8 +8007,8 @@ SsaBuilder.prototype.joinDefinitions = function(joinBlock, incoming1, incoming2) |
| incoming1.forEach((function (element, instruction) { |
| var $0; |
| var other = (($0 = incoming2.$index(element)) && $0.is$HInstruction()); |
| - if ($notnull_bool(other == null)) return; |
| - if ($notnull_bool(instruction === other)) { |
| + if (other == null) return; |
| + if (instruction === other) { |
| joinedDefinitions.$setindex(element, instruction); |
| } |
| else { |
| @@ -8029,16 +8040,16 @@ SsaBuilder.prototype.visitIf = function(node) { |
| this.visit(node.elsePart); |
| elseBlock = this.current; |
| } |
| - if ($notnull_bool(thenBlock == null && elseBlock == null) && hasElse) { |
| + if ($notnull_bool(thenBlock == null && elseBlock == null && hasElse)) { |
| this.current = null; |
| } |
| else { |
| var joinBlock = this.graph.addNewBlock(); |
| - if ($notnull_bool(thenBlock != null)) this.goto(thenBlock, joinBlock); |
| - if ($notnull_bool(elseBlock != null)) this.goto(elseBlock, joinBlock); |
| - else if ($notnull_bool(!$notnull_bool(hasElse))) conditionBlock.addSuccessor(joinBlock); |
| + if (thenBlock != null) this.goto(thenBlock, joinBlock); |
| + if (elseBlock != null) this.goto(elseBlock, joinBlock); |
| + else if (!$notnull_bool(hasElse)) conditionBlock.addSuccessor(joinBlock); |
| this.open(joinBlock); |
| - if ($notnull_bool(joinBlock.predecessors.length == 2)) { |
| + if (joinBlock.predecessors.length == 2) { |
| this.definitions = this.joinDefinitions(joinBlock, this.definitions, thenDefinitions); |
| } |
| } |
| @@ -8048,12 +8059,12 @@ SsaBuilder.prototype.unquote = function(literal) { |
| this.compiler.ensure(str[0] == '@'); |
| var quotes = 1; |
| var quote = str[1]; |
| - while ($notnull_bool(str[quotes + 1] === quote)) quotes++; |
| + while (str[quotes + 1] === quote) quotes++; |
| return new StringWrapper(str.substring(quotes + 1, str.length - quotes)); |
| } |
| SsaBuilder.prototype.visitSend = function(node) { |
| var $0; |
| - if ($notnull_bool((node.selector instanceof Operator))) { |
| + if ((node.selector instanceof Operator)) { |
| this.visit(node.receiver); |
| this.visit(node.argumentsNode); |
| var right = this.pop(); |
| @@ -8079,7 +8090,7 @@ SsaBuilder.prototype.visitSend = function(node) { |
| } |
| } |
| else if ($notnull_bool(node.get$isPropertyAccess())) { |
| - if ($notnull_bool(node.receiver != null)) { |
| + if (node.receiver != null) { |
| this.compiler.unimplemented("SsaBuilder.visitSend with receiver"); |
| } |
| var element = (($0 = this.elements.$index(node)) && $0.is$Element()); |
| @@ -8087,15 +8098,15 @@ SsaBuilder.prototype.visitSend = function(node) { |
| } |
| else { |
| var link = node.get$arguments(); |
| - if ($notnull_bool(this.elements.$index(node).kind === const$244/*ElementKind.FOREIGN*/)) { |
| + if (this.elements.$index(node).kind === const$244/*ElementKind.FOREIGN*/) { |
| link = (($0 = link.get$tail()) && $0.is$Link$Node()); |
| } |
| var arguments = []; |
| - for (; $notnull_bool(!$notnull_bool(link.isEmpty())); link = (($0 = link.get$tail()) && $0.is$Link$Node())) { |
| + for (; !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link$Node())) { |
| this.visit((($0 = link.get$head()) && $0.is$Node())); |
| arguments.add(this.pop()); |
| } |
| - if ($notnull_bool(this.elements.$index(node).kind === const$244/*ElementKind.FOREIGN*/)) { |
| + if (this.elements.$index(node).kind === const$244/*ElementKind.FOREIGN*/) { |
| var literal = (($0 = node.get$arguments().get$head()) && $0.is$LiteralString()); |
| this.compiler.ensure((literal instanceof LiteralString)); |
| this.push(new HInvokeForeign(this.unquote(literal), arguments)); |
| @@ -8124,7 +8135,7 @@ SsaBuilder.prototype.visitLiteralString = function(node) { |
| SsaBuilder.prototype.visitNodeList = function(node) { |
| var $0; |
| for (var link = node.nodes; |
| - $notnull_bool(!$notnull_bool(link.isEmpty())); link = (($0 = link.get$tail()) && $0.is$Link$Node())) { |
| + !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link$Node())) { |
| this.visit((($0 = link.get$head()) && $0.is$Node())); |
| } |
| } |
| @@ -8132,7 +8143,7 @@ SsaBuilder.prototype.visitOperator = function(node) { |
| this.compiler.unimplemented("SsaBuilder.visitOperator"); |
| } |
| SsaBuilder.prototype.visitReturn = function(node) { |
| - if ($notnull_bool(node.expression == null)) { |
| + if (node.expression == null) { |
| this.compiler.unimplemented("SsaBuilder: return without expression"); |
| } |
| this.visit(node.expression); |
| @@ -8140,7 +8151,7 @@ SsaBuilder.prototype.visitReturn = function(node) { |
| this.close(new HReturn(value)).addSuccessor(this.graph.exit); |
| } |
| SsaBuilder.prototype.visitThrow = function(node) { |
| - if ($notnull_bool(node.expression == null)) { |
| + if (node.expression == null) { |
| this.compiler.unimplemented("SsaBuilder: throw without expression"); |
| } |
| this.visit(node.expression); |
| @@ -8151,7 +8162,7 @@ SsaBuilder.prototype.visitTypeAnnotation = function(node) { |
| } |
| SsaBuilder.prototype.updateDefinition = function(node) { |
| var $0; |
| - if ($notnull_bool(node.receiver != null)) { |
| + if (node.receiver != null) { |
| this.compiler.unimplemented("SsaBuilder: property access"); |
| } |
| var link = node.get$arguments(); |
| @@ -8164,9 +8175,9 @@ SsaBuilder.prototype.updateDefinition = function(node) { |
| SsaBuilder.prototype.visitVariableDefinitions = function(node) { |
| var $0; |
| for (var link = node.definitions.nodes; |
| - $notnull_bool(!$notnull_bool(link.isEmpty())); link = (($0 = link.get$tail()) && $0.is$Link$Node())) { |
| + !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link$Node())) { |
| var definition = (($0 = link.get$head()) && $0.is$Node()); |
| - if ($notnull_bool((definition instanceof Identifier))) { |
| + if ((definition instanceof Identifier)) { |
| this.compiler.unimplemented("SsaBuilder.visitVariableDefinitions without initial value"); |
| } |
| else { |
| @@ -8190,7 +8201,7 @@ SsaCodeGeneratorTask.prototype.generate = function(tree, graph) { |
| var $0; |
| var function_ = (tree && tree.is$FunctionExpression()); |
| var name = (($0 = function_.name) && $0.is$Identifier()); |
| - if ($notnull_bool(false/*null.GENERATE_SSA_TRACE*/)) { |
| + if (false/*null.GENERATE_SSA_TRACE*/) { |
| HTracer.HTracer$singleton$factory().traceGraph("codegen", graph); |
| } |
| var code = $this.generateMethod(name.get$source(), SsaCodeGeneratorTask.countParameters(function_), graph); |
| @@ -8205,8 +8216,8 @@ SsaCodeGeneratorTask.prototype.generateMethod = function(methodName, parameterCo |
| codegen.visitGraph(graph); |
| var parameters = new StringBufferImpl(""); |
| for (var i = 0; |
| - $notnull_bool(i < parameterCount); i++) { |
| - if ($notnull_bool(i != 0)) parameters.add(', '); |
| + i < parameterCount; i++) { |
| + if (i != 0) parameters.add(', '); |
| parameters.add(SsaCodeGenerator.parameter(i)); |
| } |
| return ('function ' + methodName + '(' + parameters + ') {\n' + buffer + '}\n'); |
| @@ -8215,7 +8226,7 @@ SsaCodeGeneratorTask.countParameters = function(function_) { |
| var $0; |
| var result = 0; |
| for (var link = function_.parameters.nodes; |
| - $notnull_bool(!$notnull_bool(link.isEmpty())); link = (($0 = link.get$tail()) && $0.is$Link$Node())) { |
| + !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link$Node())) { |
| result++; |
| } |
| return result; |
| @@ -8242,8 +8253,8 @@ SsaCodeGenerator.prototype.invoke = function(selector, arguments) { |
| var $0; |
| this.buffer.add(('' + selector + '(')); |
| for (var i = 0; |
| - $notnull_bool(i < arguments.length); i++) { |
| - if ($notnull_bool(i != 0)) this.buffer.add(', '); |
| + i < arguments.length; i++) { |
| + if (i != 0) this.buffer.add(', '); |
| this.use((($0 = arguments.$index(i)) && $0.is$HInstruction())); |
| } |
| this.buffer.add(")"); |
| @@ -8251,7 +8262,7 @@ SsaCodeGenerator.prototype.invoke = function(selector, arguments) { |
| SsaCodeGenerator.prototype.define = function(instruction) { |
| var $0; |
| var usedBy = instruction.get$usedBy(); |
| - if ($notnull_bool(usedBy.length == 1 && (usedBy.$index(0) instanceof HPhi))) { |
| + if (usedBy.length == 1 && (usedBy.$index(0) instanceof HPhi)) { |
| this.buffer.add(('var ' + SsaCodeGenerator.temporary((($0 = usedBy.$index(0)) && $0.is$HInstruction())) + ' = ')); |
| this.visit(instruction); |
| } |
| @@ -8260,8 +8271,8 @@ SsaCodeGenerator.prototype.define = function(instruction) { |
| this.buffer.add(('var ' + instructionId + ' = ')); |
| this.visit(instruction); |
| for (var i = 0; |
| - $notnull_bool(i < usedBy.length); i++) { |
| - if ($notnull_bool((usedBy.$index(i) instanceof HPhi))) { |
| + i < usedBy.length; i++) { |
| + if ((usedBy.$index(i) instanceof HPhi)) { |
| this.buffer.add(';\n'); |
| this.addIndentation(); |
| this.buffer.add(('var ' + SsaCodeGenerator.temporary((($0 = usedBy.$index(i)) && $0.is$HInstruction())) + ' = ' + instructionId + '')); |
| @@ -8290,10 +8301,10 @@ SsaCodeGenerator.prototype.visitBasicBlock = function(node) { |
| } |
| this.currentBlock = node; |
| var instruction = node.first; |
| - while ($notnull_bool(instruction != null)) { |
| - if ($notnull_bool(!$notnull_bool(instruction.generateAtUseSite()))) { |
| + while (instruction != null) { |
| + if (!$notnull_bool(instruction.generateAtUseSite())) { |
| this.addIndentation(); |
| - if ($notnull_bool(instruction.get$usedBy().isEmpty() || (instruction instanceof HPhi))) { |
| + if (instruction.get$usedBy().isEmpty() || (instruction instanceof HPhi)) { |
| this.visit(instruction); |
| } |
| else { |
| @@ -8317,9 +8328,9 @@ SsaCodeGenerator.prototype.visitGoto = function(node) { |
| var $0; |
| $assert(this.currentBlock.successors.length == 1, "currentBlock.successors.length == 1", "codegen.dart", 155, 12); |
| var dominated = this.currentBlock.dominatedBlocks; |
| - if ($notnull_bool(dominated.isEmpty())) return; |
| - if ($notnull_bool(dominated.length > 2)) unreachable(); |
| - if ($notnull_bool(dominated.length == 2 && this.currentBlock !== this.currentGraph.entry)) { |
| + if (dominated.isEmpty()) return; |
| + if (dominated.length > 2) unreachable(); |
| + if (dominated.length == 2 && this.currentBlock !== this.currentGraph.entry) { |
| unreachable(); |
| } |
| $assert($eq(dominated.$index(0), this.currentBlock.successors.$index(0)), "dominated[0] == currentBlock.successors[0]", "codegen.dart", 167, 12); |
| @@ -8353,7 +8364,7 @@ SsaCodeGenerator.prototype.visitIf = function(node) { |
| nextDominatedIndex = 1; |
| } |
| $assert(dominated.length <= nextDominatedIndex + 1, "dominated.length <= nextDominatedIndex + 1", "codegen.dart", 198, 12); |
| - if ($notnull_bool(dominated.length == nextDominatedIndex + 1)) { |
| + if (dominated.length == nextDominatedIndex + 1) { |
| this.visitBasicBlock((($0 = dominated.$index(nextDominatedIndex)) && $0.is$HBasicBlock())); |
| } |
| } |
| @@ -8364,7 +8375,7 @@ SsaCodeGenerator.prototype.visitInvoke = function(node) { |
| SsaCodeGenerator.prototype.visitInvokeForeign = function(node) { |
| var $0; |
| for (var i = 0; |
| - $notnull_bool(i < node.inputs.length); i++) { |
| + i < node.inputs.length; i++) { |
| this.buffer.add(('var \$' + i + ' = ')); |
| this.use((($0 = node.inputs.$index(i)) && $0.is$HInstruction())); |
| this.buffer.add(';\n'); |
| @@ -8402,9 +8413,9 @@ SsaCodeGenerator.prototype.visitPhi = function(node) { |
| var usedBy = node.get$usedBy(); |
| var firstPhi = true; |
| for (var i = 0; |
| - $notnull_bool(i < usedBy.length); i++) { |
| - if ($notnull_bool((usedBy.$index(i) instanceof HPhi))) { |
| - if ($notnull_bool(!$notnull_bool(firstPhi))) { |
| + i < usedBy.length; i++) { |
| + if ((usedBy.$index(i) instanceof HPhi)) { |
| + if (!$notnull_bool(firstPhi)) { |
| this.buffer.add(";\n"); |
| this.addIndentation(); |
| } |
| @@ -8431,7 +8442,7 @@ SsaCodeGenerator.prototype.visitTruncatingDivide = function(node) { |
| } |
| SsaCodeGenerator.prototype.addIndentation = function() { |
| for (var i = 0; |
| - $notnull_bool(i < this.indent); i++) { |
| + i < this.indent; i++) { |
| this.buffer.add(' '); |
| } |
| } |
| @@ -8446,7 +8457,7 @@ HGraphVisitor.prototype.visitDominatorTree = function(graph) { |
| $this.visitBasicBlock(block); |
| var dominated = block.dominatedBlocks; |
| for (var i = 0; |
| - $notnull_bool(i < dominated.length); i++) { |
| + i < dominated.length; i++) { |
| visitBasicBlockAndSuccessors((($0 = dominated.$index(i)) && $0.is$HBasicBlock())); |
| } |
| } |
| @@ -8458,7 +8469,7 @@ HGraphVisitor.prototype.visitPostDominatorTree = function(graph) { |
| var $0; |
| var dominated = block.dominatedBlocks; |
| for (var i = dominated.length - 1; |
| - $notnull_bool(i >= 0); i--) { |
| + i >= 0; i--) { |
| visitBasicBlockAndSuccessors((($0 = dominated.$index(i)) && $0.is$HBasicBlock())); |
| } |
| $this.visitBasicBlock(block); |
| @@ -8474,7 +8485,7 @@ $inherits(HInstructionVisitor, HGraphVisitor); |
| HInstructionVisitor.prototype.visitBasicBlock = function(node) { |
| this.currentBlock = node; |
| var instruction = node.first; |
| - while ($notnull_bool(instruction != null)) { |
| + while (instruction != null) { |
| this.visitInstruction(instruction); |
| instruction = instruction.next; |
| } |
| @@ -8507,7 +8518,7 @@ HGraph.prototype.finalize = function() { |
| HGraph.prototype.assignDominators = function() { |
| var $0; |
| for (var i = 0, length = this.blocks.length; |
| - $notnull_bool(i < length); i++) { |
| + i < length; i++) { |
| var block = (($0 = this.blocks.$index(i)) && $0.is$HBasicBlock()); |
| var predecessors = block.predecessors; |
| if ($notnull_bool(block.isLoopHeader)) { |
| @@ -8516,7 +8527,7 @@ HGraph.prototype.assignDominators = function() { |
| } |
| else { |
| for (var j = predecessors.length - 1; |
| - $notnull_bool(j >= 0); j--) { |
| + j >= 0; j--) { |
| block.assignCommonDominator((($0 = predecessors.$index(j)) && $0.is$HBasicBlock())); |
| } |
| } |
| @@ -8528,7 +8539,7 @@ HGraph.prototype.assignInstructionIds = function() { |
| id = root.assignInstructionIds(id); |
| var dominatedBlocks = root.dominatedBlocks; |
| for (var i = 0, length = dominatedBlocks.length; |
| - $notnull_bool(i < length); i++) { |
| + i < length; i++) { |
| id = handleDominatorTree((($0 = dominatedBlocks.$index(i)) && $0.is$HBasicBlock()), id); |
| } |
| return id; |
| @@ -8549,7 +8560,7 @@ $inherits(HBaseVisitor, HGraphVisitor); |
| HBaseVisitor.prototype.visitBasicBlock = function(node) { |
| this.currentBlock = node; |
| var instruction = node.first; |
| - while ($notnull_bool(instruction != null)) { |
| + while (instruction != null) { |
| instruction.accept(this); |
| instruction = instruction.next; |
| } |
| @@ -8661,7 +8672,7 @@ HBasicBlock.prototype.close = function(end) { |
| } |
| HBasicBlock.prototype.assignInstructionIds = function(id) { |
| var instruction = this.first; |
| - while ($notnull_bool(instruction != null)) { |
| + while (instruction != null) { |
| instruction.id = id++; |
| instruction = instruction.next; |
| } |
| @@ -8676,7 +8687,7 @@ HBasicBlock.prototype.add = function(instruction) { |
| } |
| HBasicBlock.prototype.addSuccessor = function(block) { |
| $assert($notnull_bool(this.isClosed() && ($notnull_bool(block.isNew() || block.id < this.id))), "isClosed() && (block.isNew() || block.id < id)", "nodes.dart", 244, 12); |
| - if ($notnull_bool(this.successors.isEmpty())) { |
| + if (this.successors.isEmpty()) { |
| this.successors = [block]; |
| } |
| else { |
| @@ -8686,10 +8697,10 @@ HBasicBlock.prototype.addSuccessor = function(block) { |
| } |
| HBasicBlock.prototype.addAfter = function(cursor, instruction) { |
| $assert($notnull_bool(this.isOpen() || this.isClosed()), "isOpen() || isClosed()", "nodes.dart", 254, 12); |
| - if ($notnull_bool(cursor == null)) { |
| + if (cursor == null) { |
| this.first = this.last = instruction; |
| } |
| - else if ($notnull_bool(cursor === this.last)) { |
| + else if (cursor === this.last) { |
| this.last.next = instruction; |
| instruction.previous = this.last; |
| this.last = instruction; |
| @@ -8706,13 +8717,13 @@ HBasicBlock.prototype.remove = function(instruction) { |
| $assert($notnull_bool(this.isOpen() || this.isClosed()), "isOpen() || isClosed()", "nodes.dart", 271, 12); |
| $assert(instruction.isInBasicBlock(), "instruction.isInBasicBlock()", "nodes.dart", 272, 12); |
| $assert(instruction.get$usedBy().isEmpty(), "instruction.usedBy.isEmpty()", "nodes.dart", 273, 12); |
| - if ($notnull_bool(instruction.previous == null)) { |
| + if (instruction.previous == null) { |
| this.first = instruction.next; |
| } |
| else { |
| instruction.previous.next = instruction.next; |
| } |
| - if ($notnull_bool(instruction.next == null)) { |
| + if (instruction.next == null) { |
| this.last = instruction.previous; |
| } |
| else { |
| @@ -8732,22 +8743,22 @@ HBasicBlock.prototype.rewrite = function(from, to) { |
| HBasicBlock.rewriteInput = function(instruction, from, to) { |
| var inputs = instruction.inputs; |
| for (var i = 0; |
| - $notnull_bool(i < inputs.length); i++) { |
| - if ($notnull_bool(inputs.$index(i) === from)) inputs.$setindex(i, to); |
| + i < inputs.length; i++) { |
| + if (inputs.$index(i) === from) inputs.$setindex(i, to); |
| } |
| } |
| HBasicBlock.prototype.isExitBlock = function() { |
| - return $notnull_bool(this.first === this.last && (this.first instanceof HExit)); |
| + return this.first === this.last && (this.first instanceof HExit); |
| } |
| HBasicBlock.prototype.addDominatedBlock = function(block) { |
| $assert(this.isClosed(), "isClosed()", "nodes.dart", 313, 12); |
| - $assert($notnull_bool(this.id != null && block.id != null), "id !== null && block.id !== null", "nodes.dart", 314, 12); |
| + $assert(this.id != null && block.id != null, "id !== null && block.id !== null", "nodes.dart", 314, 12); |
| $assert(this.dominatedBlocks.indexOf(block) < 0, "dominatedBlocks.indexOf(block) < 0", "nodes.dart", 315, 12); |
| var index = this.dominatedBlocks.length; |
| - while ($notnull_bool(index > 0 && this.dominatedBlocks.$index(index - 1).id > block.id)) { |
| + while (index > 0 && this.dominatedBlocks.$index(index - 1).id > block.id) { |
| index--; |
| } |
| - if ($notnull_bool(index == this.dominatedBlocks.length)) { |
| + if (index == this.dominatedBlocks.length) { |
| this.dominatedBlocks.add(block); |
| } |
| else { |
| @@ -8758,10 +8769,10 @@ HBasicBlock.prototype.addDominatedBlock = function(block) { |
| } |
| HBasicBlock.prototype.removeDominatedBlock = function(block) { |
| $assert(this.isClosed(), "isClosed()", "nodes.dart", 333, 12); |
| - $assert($notnull_bool(this.id != null && block.id != null), "id !== null && block.id !== null", "nodes.dart", 334, 12); |
| + $assert(this.id != null && block.id != null, "id !== null && block.id !== null", "nodes.dart", 334, 12); |
| var index = this.dominatedBlocks.indexOf(block); |
| $assert(index >= 0, "index >= 0", "nodes.dart", 336, 12); |
| - if ($notnull_bool(index == this.dominatedBlocks.length - 1)) { |
| + if (index == this.dominatedBlocks.length - 1) { |
| this.dominatedBlocks.removeLast(); |
| } |
| else { |
| @@ -8772,22 +8783,22 @@ HBasicBlock.prototype.removeDominatedBlock = function(block) { |
| } |
| HBasicBlock.prototype.assignCommonDominator = function(predecessor) { |
| $assert(this.isClosed(), "isClosed()", "nodes.dart", 347, 12); |
| - if ($notnull_bool(this.dominator == null)) { |
| + if (this.dominator == null) { |
| predecessor.addDominatedBlock(this); |
| } |
| - else if ($notnull_bool(predecessor.dominator != null)) { |
| + else if (predecessor.dominator != null) { |
| var first = this.dominator; |
| var second = predecessor; |
| - while ($notnull_bool(first !== second)) { |
| - if ($notnull_bool(first.id > second.id)) { |
| + while (first !== second) { |
| + if (first.id > second.id) { |
| first = first.dominator; |
| } |
| else { |
| second = second.dominator; |
| } |
| - $assert($notnull_bool(first != null && second != null), "first !== null && second !== null", "nodes.dart", 364, 16); |
| + $assert(first != null && second != null, "first !== null && second !== null", "nodes.dart", 364, 16); |
| } |
| - if ($notnull_bool(this.dominator !== first)) { |
| + if (this.dominator !== first) { |
| this.dominator.removeDominatedBlock(this); |
| first.addDominatedBlock(this); |
| } |
| @@ -8835,7 +8846,7 @@ HInstruction.prototype.setUseGvn = function() { |
| this.setFlag(3/*HInstruction.FLAG_USE_GVN*/); |
| } |
| HInstruction.prototype.get$usedBy = function() { |
| - if ($notnull_bool(this._usedBy == null)) return const$15/*const []*/; |
| + if (this._usedBy == null) return const$15/*const []*/; |
| return this._usedBy; |
| } |
| HInstruction.prototype.isInBasicBlock = function() { |
| @@ -8845,7 +8856,7 @@ HInstruction.prototype.notifyAddedToBlock = function() { |
| $assert(!$notnull_bool(this.isInBasicBlock()), "!isInBasicBlock()", "nodes.dart", 472, 12); |
| this._usedBy = []; |
| for (var i = 0; |
| - $notnull_bool(i < this.inputs.length); i++) { |
| + i < this.inputs.length; i++) { |
| $assert(this.inputs.$index(i).isInBasicBlock(), "inputs[i].isInBasicBlock()", "nodes.dart", 476, 14); |
| this.inputs.$index(i).get$usedBy().add(this); |
| } |
| @@ -8855,11 +8866,11 @@ HInstruction.prototype.notifyRemovedFromBlock = function() { |
| $assert(this.isInBasicBlock(), "isInBasicBlock()", "nodes.dart", 483, 12); |
| $assert(this.get$usedBy().isEmpty(), "usedBy.isEmpty()", "nodes.dart", 484, 12); |
| for (var i = 0; |
| - $notnull_bool(i < this.inputs.length); i++) { |
| + i < this.inputs.length; i++) { |
| var inputUsedBy = this.inputs.$index(i).get$usedBy(); |
| for (var j = 0; |
| - $notnull_bool(j < inputUsedBy.length); j++) { |
| - if ($notnull_bool(inputUsedBy.$index(j) === this)) { |
| + j < inputUsedBy.length; j++) { |
| + if (inputUsedBy.$index(j) === this) { |
| inputUsedBy.$setindex(j, inputUsedBy.$index(inputUsedBy.length - 1)); |
| inputUsedBy.removeLast(); |
| break; |
| @@ -8921,7 +8932,7 @@ function HArithmetic(selector, inputs) { |
| } |
| $inherits(HArithmetic, HInvoke); |
| HArithmetic.prototype.prepareGvn = function() { |
| - if ($notnull_bool(!(this.inputs.$index(0) instanceof HLiteral))) return; |
| + if (!(this.inputs.$index(0) instanceof HLiteral)) return; |
| this.clearAllSideEffects(); |
| this.setUseGvn(); |
| } |
| @@ -8932,7 +8943,7 @@ function HAdd(inputs) { |
| } |
| $inherits(HAdd, HArithmetic); |
| HAdd.prototype.prepareGvn = function() { |
| - if ($notnull_bool(!$notnull_bool(this.inputs.$index(0).isLiteralNumber()))) return; |
| + if (!$notnull_bool(this.inputs.$index(0).isLiteralNumber())) return; |
| this.clearAllSideEffects(); |
| this.setUseGvn(); |
| } |
| @@ -8997,7 +9008,7 @@ function HEquals(inputs) { |
| } |
| $inherits(HEquals, HInvoke); |
| HEquals.prototype.prepareGvn = function() { |
| - if ($notnull_bool(!(this.inputs.$index(0) instanceof HLiteral))) return; |
| + if (!(this.inputs.$index(0) instanceof HLiteral)) return; |
| this.clearAllSideEffects(); |
| this.setUseGvn(); |
| } |
| @@ -9160,9 +9171,9 @@ SsaConstantFolder.prototype.visitGraph = function(graph) { |
| } |
| SsaConstantFolder.prototype.visitBasicBlock = function(block) { |
| var instruction = block.first; |
| - while ($notnull_bool(instruction != null)) { |
| + while (instruction != null) { |
| var replacement = instruction.accept(this); |
| - if ($notnull_bool(replacement !== instruction)) { |
| + if (replacement !== instruction) { |
| block.addAfter(instruction, (replacement && replacement.is$HInstruction())); |
| block.rewrite(instruction, (replacement && replacement.is$HInstruction())); |
| block.remove(instruction); |
| @@ -9176,7 +9187,7 @@ SsaConstantFolder.prototype.visitInstruction = function(node) { |
| SsaConstantFolder.prototype.visitEquals = function(node) { |
| var $0; |
| var inputs = node.inputs; |
| - if ($notnull_bool((inputs.$index(0) instanceof HLiteral) && (inputs.$index(1) instanceof HLiteral))) { |
| + if ((inputs.$index(0) instanceof HLiteral) && (inputs.$index(1) instanceof HLiteral)) { |
| var op1 = (($0 = inputs.$index(0)) && $0.is$HLiteral()); |
| var op2 = (($0 = inputs.$index(1)) && $0.is$HLiteral()); |
| return new HLiteral($eq(op1.value, op2.value)); |
| @@ -9217,14 +9228,14 @@ function SsaDeadCodeEliminator() { |
| } |
| $inherits(SsaDeadCodeEliminator, HGraphVisitor); |
| SsaDeadCodeEliminator.isDeadCode = function(instruction) { |
| - return $notnull_bool(!$notnull_bool(instruction.hasSideEffects()) && instruction.get$usedBy().isEmpty()); |
| + return !$notnull_bool(instruction.hasSideEffects()) && instruction.get$usedBy().isEmpty(); |
| } |
| SsaDeadCodeEliminator.prototype.visitGraph = function(graph) { |
| this.visitPostDominatorTree(graph); |
| } |
| SsaDeadCodeEliminator.prototype.visitBasicBlock = function(block) { |
| var instruction = block.last; |
| - while ($notnull_bool(instruction != null)) { |
| + while (instruction != null) { |
| var previous = instruction.previous; |
| if ($notnull_bool(SsaDeadCodeEliminator.isDeadCode(instruction))) block.remove(instruction); |
| instruction = (previous && previous.is$HInstruction()); |
| @@ -9243,11 +9254,11 @@ SsaInstructionMerger.prototype.visitInstruction = function(node) { |
| var inputs = node.inputs; |
| var previousUnused = node.previous; |
| for (var i = inputs.length - 1; |
| - $notnull_bool(i >= 0); i--) { |
| - if ($notnull_bool(previousUnused == null)) return; |
| - if ($notnull_bool((previousUnused instanceof HPhi))) return; |
| - if ($notnull_bool(inputs.$index(i).get$usedBy().length != 1)) return; |
| - if ($notnull_bool(inputs.$index(i) !== previousUnused)) return; |
| + i >= 0; i--) { |
| + if (previousUnused == null) return; |
| + if ((previousUnused instanceof HPhi)) return; |
| + if (inputs.$index(i).get$usedBy().length != 1) return; |
| + if (inputs.$index(i) !== previousUnused) return; |
| inputs.$index(i).setGenerateAtUseSite(); |
| previousUnused = previousUnused.previous; |
| } |
| @@ -9262,7 +9273,7 @@ HTracer._internal$ctor = function() { |
| HTracer._internal$ctor.prototype = HTracer.prototype; |
| $inherits(HTracer, HGraphVisitor); |
| HTracer.HTracer$singleton$factory = function() { |
| - if ($notnull_bool(HTracer._singleton == null)) HTracer._singleton = new HTracer._internal$ctor(); |
| + if (HTracer._singleton == null) HTracer._singleton = new HTracer._internal$ctor(); |
| return HTracer._singleton; |
| } |
| HTracer.prototype.traceCompilation = function(methodName) { |
| @@ -9284,7 +9295,7 @@ HTracer.prototype.traceGraph = function(name, graph) { |
| ); |
| } |
| HTracer.prototype.addPredecessors = function(block) { |
| - if ($notnull_bool(block.predecessors.isEmpty())) { |
| + if (block.predecessors.isEmpty()) { |
| this.printEmptyProperty("predecessors"); |
| } |
| else { |
| @@ -9299,7 +9310,7 @@ HTracer.prototype.addPredecessors = function(block) { |
| } |
| } |
| HTracer.prototype.addSuccessors = function(block) { |
| - if ($notnull_bool(block.successors.isEmpty())) { |
| + if (block.successors.isEmpty()) { |
| this.printEmptyProperty("successors"); |
| } |
| else { |
| @@ -9316,7 +9327,7 @@ HTracer.prototype.addSuccessors = function(block) { |
| HTracer.prototype.addInstructions = function(block) { |
| var stringifier = new HInstructionStringifier(block); |
| for (var instruction = block.first; |
| - $notnull_bool(instruction != null); instruction = instruction.next) { |
| + instruction != null; instruction = instruction.next) { |
| var bci = 0; |
| var uses = instruction.get$usedBy().length; |
| this.addIndent(); |
| @@ -9336,7 +9347,7 @@ HTracer.prototype.visitBasicBlock = function(block) { |
| $this.addSuccessors(block); |
| $this.printEmptyProperty("xhandlers"); |
| $this.printEmptyProperty("flags"); |
| - if ($notnull_bool(block.dominator != null)) { |
| + if (block.dominator != null) { |
| $this.printProperty("dominator", ("B" + block.dominator.id + "")); |
| } |
| $this.tag("states", (function () { |
| @@ -9370,7 +9381,7 @@ HTracer.prototype.printEmptyProperty = function(propertyName) { |
| this.print(propertyName); |
| } |
| HTracer.prototype.printProperty = function(propertyName, value) { |
| - if ($notnull_bool((typeof(value) == 'number'))) { |
| + if ((typeof(value) == 'number')) { |
| this.print(("" + propertyName + " " + value + "")); |
| } |
| else { |
| @@ -9382,7 +9393,7 @@ HTracer.prototype.add = function(string) { |
| } |
| HTracer.prototype.addIndent = function() { |
| for (var i = 0; |
| - $notnull_bool(i < this.indent); i++) { |
| + i < this.indent; i++) { |
| this.add(" "); |
| } |
| } |
| @@ -9431,8 +9442,8 @@ HInstructionStringifier.prototype.visitGenericInvoke = function(invokeType, invo |
| var $0; |
| var arguments = new StringBufferImpl(""); |
| for (var i = 0; |
| - $notnull_bool(i < invoke.inputs.length); i++) { |
| - if ($notnull_bool(i != 0)) arguments.add(", "); |
| + i < invoke.inputs.length; i++) { |
| + if (i != 0) arguments.add(", "); |
| arguments.add(this.temporaryId((($0 = invoke.inputs.$index(i)) && $0.is$HInstruction()))); |
| } |
| return ("" + invokeType + ": " + invoke.selector + "(" + arguments + ")"); |
| @@ -9493,41 +9504,41 @@ HValidator.prototype.markInvalid = function(reason) { |
| this.isValid = false; |
| } |
| HValidator.prototype.visitBasicBlock = function(block) { |
| - if ($notnull_bool(!$notnull_bool(this.isValid))) return; |
| - if ($notnull_bool(block.first == null || block.last == null)) { |
| + if (!$notnull_bool(this.isValid)) return; |
| + if (block.first == null || block.last == null) { |
| this.markInvalid("empty block"); |
| } |
| - if ($notnull_bool(!(block.last instanceof HControlFlow))) { |
| + if (!(block.last instanceof HControlFlow)) { |
| this.markInvalid("block ends with non-tail node."); |
| } |
| - if ($notnull_bool((block.last instanceof HIf) && block.successors.length != 2)) { |
| + if ((block.last instanceof HIf) && block.successors.length != 2) { |
| this.markInvalid("If node without two successors"); |
| } |
| - if ($notnull_bool((block.last instanceof HConditionalBranch) && block.successors.length != 2)) { |
| + if ((block.last instanceof HConditionalBranch) && block.successors.length != 2) { |
| this.markInvalid("Conditional node without two successors"); |
| } |
| - if ($notnull_bool((block.last instanceof HGoto) && block.successors.length != 1)) { |
| + if ((block.last instanceof HGoto) && block.successors.length != 1) { |
| this.markInvalid("Goto node without one successor"); |
| } |
| - if ($notnull_bool((block.last instanceof HReturn) && ($notnull_bool(block.successors.length != 1 || !$notnull_bool(block.successors.$index(0).isExitBlock()))))) { |
| + if ((block.last instanceof HReturn) && (block.successors.length != 1 || !$notnull_bool(block.successors.$index(0).isExitBlock()))) { |
| this.markInvalid("Return node with > 1 succesor or not going to exit-block"); |
| } |
| - if ($notnull_bool((block.last instanceof HExit) && !$notnull_bool(block.successors.isEmpty()))) { |
| + if ((block.last instanceof HExit) && !block.successors.isEmpty()) { |
| this.markInvalid("Exit block with successor"); |
| } |
| - if ($notnull_bool((block.last instanceof HThrow) && !$notnull_bool(block.successors.isEmpty()))) { |
| + if ((block.last instanceof HThrow) && !block.successors.isEmpty()) { |
| this.markInvalid("Throw block with successor"); |
| } |
| - if ($notnull_bool(block.successors.isEmpty() && !(block.last instanceof HThrow)) && !$notnull_bool(block.isExitBlock())) { |
| + if (block.successors.isEmpty() && !(block.last instanceof HThrow) && !$notnull_bool(block.isExitBlock())) { |
| this.markInvalid("Non-exit or throw block without successor"); |
| } |
| - if ($notnull_bool(block.id == null)) this.markInvalid("block without id"); |
| + if (block.id == null) this.markInvalid("block without id"); |
| var $list = block.successors; |
| for (var $i = 0;$i < $list.length; $i++) { |
| var successor = $list.$index($i); |
| - if ($notnull_bool(!$notnull_bool(this.isValid))) break; |
| - if ($notnull_bool(successor.id == null)) this.markInvalid("successor without id"); |
| - if ($notnull_bool(successor.id <= block.id && !$notnull_bool(successor.isLoopHeader))) { |
| + if (!$notnull_bool(this.isValid)) break; |
| + if (successor.id == null) this.markInvalid("successor without id"); |
| + if (successor.id <= block.id && !$notnull_bool(successor.isLoopHeader)) { |
| this.markInvalid("successor with lower id, but not a loop-header"); |
| } |
| } |
| @@ -9535,41 +9546,41 @@ HValidator.prototype.visitBasicBlock = function(block) { |
| var $list = block.dominatedBlocks; |
| for (var $i = 0;$i < $list.length; $i++) { |
| var dominated = $list.$index($i); |
| - if ($notnull_bool(!$notnull_bool(this.isValid))) break; |
| - if ($notnull_bool(dominated.dominator !== block)) { |
| + if (!$notnull_bool(this.isValid)) break; |
| + if (dominated.dominator !== block) { |
| this.markInvalid("dominated block not pointing back"); |
| } |
| - if ($notnull_bool(dominated.id == null || dominated.id <= lastId)) { |
| + if (dominated.id == null || dominated.id <= lastId) { |
| this.markInvalid("dominated.id === null or dominated has <= id"); |
| } |
| lastId = dominated.id; |
| } |
| - if ($notnull_bool(!$notnull_bool(this.isValid))) return; |
| + if (!$notnull_bool(this.isValid)) return; |
| HInstructionVisitor.prototype.visitBasicBlock.call(this, block); |
| } |
| HValidator.countInstruction = function(instructions, instruction) { |
| var result = 0; |
| for (var i = 0; |
| - $notnull_bool(i < instructions.length); i++) { |
| - if ($notnull_bool(instructions.$index(i) === instruction)) result++; |
| + i < instructions.length; i++) { |
| + if (instructions.$index(i) === instruction) result++; |
| } |
| return result; |
| } |
| HValidator.everyInstruction = function(instructions, f) { |
| var copy = ListFactory.ListFactory$from$factory(instructions); |
| for (var i = 0; |
| - $notnull_bool(i < copy.length); i++) { |
| + i < copy.length; i++) { |
| var current = copy.$index(i); |
| - if ($notnull_bool(current == null)) continue; |
| + if (current == null) continue; |
| var count = 1; |
| for (var j = i + 1; |
| - $notnull_bool(j < copy.length); j++) { |
| - if ($notnull_bool(copy.$index(j) === current)) { |
| + j < copy.length; j++) { |
| + if (copy.$index(j) === current) { |
| copy.$setindex(j); |
| count++; |
| } |
| } |
| - if ($notnull_bool(!$notnull_bool(f.call$2(current, count)))) return false; |
| + if (!$notnull_bool(f.call$2(current, count))) return false; |
| } |
| return true; |
| } |
| @@ -9588,13 +9599,13 @@ HValidator.prototype.visitInstruction = function(instruction) { |
| ); |
| } |
| function hasCorrectUses(instruction) { |
| - if ($notnull_bool(!$notnull_bool(instruction.isInBasicBlock()))) return true; |
| + if (!$notnull_bool(instruction.isInBasicBlock())) return true; |
| return HValidator.everyInstruction(instruction.get$usedBy(), (function (use, count) { |
| return HValidator.countInstruction(use.inputs, (instruction && instruction.is$HInstruction())) == count; |
| }) |
| ); |
| } |
| - this.isValid = $notnull_bool(this.isValid && hasCorrectInputs(instruction)) && hasCorrectUses(instruction); |
| + this.isValid = $notnull_bool($notnull_bool(this.isValid && hasCorrectInputs(instruction)) && hasCorrectUses(instruction)); |
| } |
| // ********** Code for top level ************** |
| // ********** Library leg ************** |
| @@ -9627,7 +9638,7 @@ WorldCompiler.prototype.run = function() { |
| WorldCompiler.prototype.spanFromNode = function(node) { |
| var begin = node.getBeginToken(); |
| var end = node.getEndToken(); |
| - if ($notnull_bool(begin == null || end == null)) { |
| + if (begin == null || end == null) { |
| this.cancel(('cannot find tokens to produce error message for ' + node + '.')); |
| } |
| var startOffset = begin.get$charOffset(); |
| @@ -9654,7 +9665,7 @@ function Compiler(script) { |
| this.tasks = [this.scanner, this.parser, this.resolver, this.checker, this.builder, this.optimizer, this.generator]; |
| } |
| Compiler.prototype.ensure = function(condition) { |
| - if ($notnull_bool(!$notnull_bool(condition))) this.cancel('failed assertion in leg'); |
| + if (!$notnull_bool(condition)) this.cancel('failed assertion in leg'); |
| } |
| Compiler.prototype.unimplemented = function(methodName) { |
| this.cancel(("" + methodName + " not implemented")); |
| @@ -9675,7 +9686,7 @@ Compiler.prototype.run = function() { |
| this.log('compilation failed'); |
| return false; |
| } |
| - if ($notnull_bool(false/*null.GENERATE_SSA_TRACE*/)) { |
| + if (false/*null.GENERATE_SSA_TRACE*/) { |
| print("------------------"); |
| print(HTracer.HTracer$singleton$factory()); |
| print("------------------"); |
| @@ -9694,13 +9705,13 @@ Compiler.prototype.runCompiler = function() { |
| var $0; |
| this.scanCoreLibrary(); |
| this.scanner.scan(this.script); |
| - while ($notnull_bool(!$notnull_bool(this.worklist.isEmpty()))) { |
| + while (!this.worklist.isEmpty()) { |
| this.compileMethod((($0 = this.worklist.removeLast()) && $0.is$SourceString())); |
| } |
| } |
| Compiler.prototype.compileMethod = function(name) { |
| var element = this.universe.find(name); |
| - if ($notnull_bool(element == null)) this.cancel(('Could not find ' + name + '')); |
| + if (element == null) this.cancel(('Could not find ' + name + '')); |
| var tree = this.parser.parse(element); |
| var elements = this.resolver.resolve(tree); |
| this.checker.check(tree, elements); |
| @@ -9721,7 +9732,7 @@ Compiler.prototype.getGeneratedCode = function() { |
| buffer.add("function $tdiv(a, b) {\n var tmp = this / other;\n if (tmp < 0) {\n return Math.ceil(tmp);\n } else {\n return Math.floor(tmp);\n }\n}\n"/*null.TDIV_SUPPORT*/); |
| var codeBlocks = (($0 = this.universe.generatedCode.getValues()) && $0.is$List$String()); |
| for (var i = codeBlocks.length - 1; |
| - $notnull_bool(i >= 0); i--) { |
| + i >= 0; i--) { |
| buffer.add(codeBlocks.$index(i)); |
| } |
| buffer.add('main();\n'); |
| @@ -9755,7 +9766,7 @@ function CompilerCancelledException(reason) { |
| } |
| CompilerCancelledException.prototype.toString = function() { |
| var banner = 'compiler cancelled'; |
| - return $notnull_bool((this.reason != null)) ? ('' + banner + ': ' + this.reason + '') : ('' + banner + ''); |
| + return (this.reason != null) ? ('' + banner + ': ' + this.reason + '') : ('' + banner + ''); |
| } |
| // ********** Code for ResolverTask ************** |
| function ResolverTask(compiler) { |
| @@ -9801,7 +9812,7 @@ ResolverVisitor.prototype.warning = function(node, message) { |
| this.compiler.reportWarning(node, message); |
| } |
| ResolverVisitor.prototype.visit = function(node) { |
| - if ($notnull_bool(node == null)) return null; |
| + if (node == null) return null; |
| return node.accept(this); |
| } |
| ResolverVisitor.prototype.visitIn = function(node, scope) { |
| @@ -9834,7 +9845,7 @@ ResolverVisitor.prototype.visitFunctionExpression = function(node) { |
| } |
| ResolverVisitor.prototype.visitIdentifier = function(node) { |
| var element = this.context.lookup(node.get$source()); |
| - if ($notnull_bool(element == null)) this.fail(node, ErrorMessages.cannotResolve(node)); |
| + if (element == null) this.fail(node, ErrorMessages.cannotResolve(node)); |
| return this.useElement(node, element); |
| } |
| ResolverVisitor.prototype.visitIf = function(node) { |
| @@ -9848,11 +9859,11 @@ ResolverVisitor.prototype.visitSend = function(node) { |
| this.visit(node.receiver); |
| var selector = (($0 = node.selector) && $0.is$Identifier()); |
| var name = selector.get$source(); |
| - if ($notnull_bool($eq(name, const$247/*const SourceString('+')*/) || $eq(name, const$248/*const SourceString('-')*/)) || $eq(name, const$249/*const SourceString('*')*/) || $eq(name, const$250/*const SourceString('/')*/) || $eq(name, const$251/*const SourceString('<')*/) || $eq(name, const$252/*const SourceString('~/')*/) || $eq(name, const$253/*const SourceString('==')*/)) { |
| + if ($notnull_bool($notnull_bool($notnull_bool($notnull_bool($notnull_bool($notnull_bool($eq(name, const$247/*const SourceString('+')*/) || $eq(name, const$248/*const SourceString('-')*/)) || $eq(name, const$249/*const SourceString('*')*/)) || $eq(name, const$250/*const SourceString('/')*/)) || $eq(name, const$251/*const SourceString('<')*/)) || $eq(name, const$252/*const SourceString('~/')*/)) || $eq(name, const$253/*const SourceString('==')*/))) { |
| } |
| else { |
| target = this.context.lookup(name); |
| - if ($notnull_bool(target == null)) this.fail(node, ErrorMessages.cannotResolve(name)); |
| + if (target == null) this.fail(node, ErrorMessages.cannotResolve(name)); |
| } |
| this.visit(node.argumentsNode); |
| return this.useElement(node, target); |
| @@ -9861,11 +9872,11 @@ ResolverVisitor.prototype.visitSendSet = function(node) { |
| var $0; |
| var receiver = (($0 = this.visit(node.receiver)) && $0.is$Element()); |
| var selector = (($0 = node.selector) && $0.is$Identifier()); |
| - if ($notnull_bool(receiver != null)) { |
| + if (receiver != null) { |
| this.compiler.unimplemented('Resolver: property access'); |
| } |
| var target = this.context.lookup(selector.get$source()); |
| - if ($notnull_bool(target == null)) this.fail(node, ErrorMessages.cannotResolve(node)); |
| + if (target == null) this.fail(node, ErrorMessages.cannotResolve(node)); |
| this.visit(node.argumentsNode); |
| return this.useElement(node, target); |
| } |
| @@ -9884,7 +9895,7 @@ ResolverVisitor.prototype.visitLiteralString = function(node) { |
| ResolverVisitor.prototype.visitNodeList = function(node) { |
| var $0; |
| for (var link = node.nodes; |
| - $notnull_bool(!$notnull_bool(link.isEmpty())); link = (($0 = link.get$tail()) && $0.is$Link$Node())) { |
| + !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link$Node())) { |
| this.visit((($0 = link.get$head()) && $0.is$Node())); |
| } |
| } |
| @@ -9901,7 +9912,7 @@ ResolverVisitor.prototype.visitTypeAnnotation = function(node) { |
| var name = node.typeName; |
| if ($notnull_bool($eq(name.get$source(), const$254/*const SourceString('var')*/))) return null; |
| var element = this.context.lookup(name.get$source()); |
| - if ($notnull_bool(element == null)) { |
| + if (element == null) { |
| this.warning(node, ErrorMessages.cannotResolveType(name)); |
| } |
| return this.useElement(node, element); |
| @@ -9918,7 +9929,7 @@ ResolverVisitor.prototype.defineElement = function(node, element) { |
| return (($0 = this.context.add(element)) && $0.is$Element()); |
| } |
| ResolverVisitor.prototype.useElement = function(node, element) { |
| - if ($notnull_bool(element == null)) return null; |
| + if (element == null) return null; |
| this.mapping.$setindex(node, element); |
| return element; |
| } |
| @@ -9931,7 +9942,7 @@ function VariableDefinitionsVisitor(definitions, resolver) { |
| VariableDefinitionsVisitor.prototype.visitSendSet = function(node) { |
| var $0; |
| $assert(node.get$arguments().get$tail().isEmpty(), "node.arguments.tail.isEmpty()", "resolver.dart", 200, 12); |
| - if ($notnull_bool(node.receiver != null)) { |
| + if (node.receiver != null) { |
| this.resolver.compiler.unimplemented("receiver on a variable definition"); |
| } |
| var selector = (($0 = node.selector) && $0.is$Identifier()); |
| @@ -9944,11 +9955,11 @@ VariableDefinitionsVisitor.prototype.visitIdentifier = function(node) { |
| VariableDefinitionsVisitor.prototype.visitNodeList = function(node) { |
| var $0; |
| for (var link = node.nodes; |
| - $notnull_bool(!$notnull_bool(link.isEmpty())); link = (($0 = link.get$tail()) && $0.is$Link$Node())) { |
| + !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link$Node())) { |
| var name = (($0 = this.visit((($0 = link.get$head()) && $0.is$Node()))) && $0.is$SourceString()); |
| var element = new VariableElement((($0 = link.get$head()) && $0.is$Node()), this.definitions.type, name, this.resolver.context.enclosingElement); |
| var existing = this.resolver.defineElement((($0 = link.get$head()) && $0.is$Node()), element); |
| - if ($notnull_bool($ne(existing, element))) { |
| + if ($ne(existing, element)) { |
| this.resolver.fail(node, ErrorMessages.duplicateDefinition(link.get$head())); |
| } |
| } |
| @@ -9979,12 +9990,12 @@ Scope.prototype.get$parent = function() { return this.parent; }; |
| Scope.prototype.lookup = function(name) { |
| var $0; |
| var element = (($0 = this.elements.$index(name)) && $0.is$Element()); |
| - if ($notnull_bool(element != null)) return element; |
| + if (element != null) return element; |
| return this.parent.lookup(name); |
| } |
| Scope.prototype.add = function(element) { |
| var $0; |
| - if ($notnull_bool(this.elements.containsKey(element.name))) return (($0 = this.elements.$index(element.name)) && $0.is$Element()); |
| + if (this.elements.containsKey(element.name)) return (($0 = this.elements.$index(element.name)) && $0.is$Element()); |
| this.elements.$setindex(element.name, element); |
| return element; |
| } |
| @@ -10105,7 +10116,7 @@ Types.prototype.lookup = function(s) { |
| return null; |
| } |
| Types.prototype.isSubtype = function(r, s) { |
| - return $notnull_bool(r === s || r === this.dynamicType) || s === this.dynamicType; |
| + return r === s || r === this.dynamicType || s === this.dynamicType; |
| } |
| Types.prototype.isAssignable = function(r, s) { |
| return $notnull_bool(this.isSubtype(r, s) || this.isSubtype(s, r)); |
| @@ -10125,29 +10136,29 @@ function TypeCheckerVisitor(compiler, elements, types) { |
| } |
| TypeCheckerVisitor.prototype.fail = function(node, reason) { |
| var message = 'cannot type-check'; |
| - if ($notnull_bool(reason != null)) { |
| + if (reason != null) { |
| message = ('' + message + ': ' + reason + ''); |
| } |
| $throw(new CancelTypeCheckException(node, message)); |
| } |
| TypeCheckerVisitor.prototype.nonVoidType = function(node) { |
| var type = this.type(node); |
| - if ($notnull_bool($eq(type, this.types.voidType))) { |
| + if ($eq(type, this.types.voidType)) { |
| this.compiler.reportWarning(node, CompilerError.voidExpression()); |
| } |
| return type; |
| } |
| TypeCheckerVisitor.prototype.typeWithDefault = function(node, defaultValue) { |
| - return $notnull_bool(node != null) ? this.type(node) : defaultValue; |
| + return node != null ? this.type(node) : defaultValue; |
| } |
| TypeCheckerVisitor.prototype.type = function(node) { |
| var $0; |
| - if ($notnull_bool(node == null)) this.fail(null, 'unexpected node: null'); |
| + if (node == null) this.fail(null, 'unexpected node: null'); |
| var result = (($0 = node.accept(this)) && $0.is$Type()); |
| return result; |
| } |
| TypeCheckerVisitor.prototype.checkAssignable = function(node, s, t) { |
| - if ($notnull_bool(!$notnull_bool(this.types.isAssignable(s, t)))) { |
| + if (!$notnull_bool(this.types.isAssignable(s, t))) { |
| var error = CompilerError.notAssignable(s, t); |
| this.compiler.reportWarning(node, error); |
| } |
| @@ -10187,7 +10198,7 @@ TypeCheckerVisitor.prototype.visitIf = function(node) { |
| TypeCheckerVisitor.prototype.visitSend = function(node) { |
| var $0; |
| var target = this.elements.$index(node); |
| - if ($notnull_bool(target != null)) { |
| + if (target != null) { |
| var targetType = target.computeType(this.compiler, this.types); |
| if ($notnull_bool(node.get$isPropertyAccess())) { |
| return (targetType && targetType.is$Type()); |
| @@ -10196,8 +10207,8 @@ TypeCheckerVisitor.prototype.visitSend = function(node) { |
| this.fail(node); |
| } |
| else { |
| - if ($notnull_bool(!(targetType instanceof FunctionType))) { |
| - if ($notnull_bool((target instanceof ForeignElement))) { |
| + if (!(targetType instanceof FunctionType)) { |
| + if ((target instanceof ForeignElement)) { |
| return this.types.dynamicType; |
| } |
| this.fail(node, 'can only handle function types'); |
| @@ -10205,17 +10216,17 @@ TypeCheckerVisitor.prototype.visitSend = function(node) { |
| var funType = (targetType && targetType.is$FunctionType()); |
| var formals = funType.parameterTypes; |
| var arguments = node.get$arguments(); |
| - while ($notnull_bool((!$notnull_bool(formals.isEmpty())) && (!$notnull_bool(arguments.isEmpty())))) { |
| + while ((!$notnull_bool(formals.isEmpty())) && (!$notnull_bool(arguments.isEmpty()))) { |
| var argument = (($0 = arguments.get$head()) && $0.is$Node()); |
| var argumentType = this.type(argument); |
| this.checkAssignable(argument, argumentType, (($0 = formals.get$head()) && $0.is$Type())); |
| formals = (($0 = formals.get$tail()) && $0.is$Link$Type()); |
| arguments = (($0 = arguments.get$tail()) && $0.is$Link$Node()); |
| } |
| - if ($notnull_bool(!$notnull_bool(formals.isEmpty()))) { |
| + if (!$notnull_bool(formals.isEmpty())) { |
| this.compiler.reportWarning(node, 'missing argument'); |
| } |
| - if ($notnull_bool(!$notnull_bool(arguments.isEmpty()))) { |
| + if (!$notnull_bool(arguments.isEmpty())) { |
| this.compiler.reportWarning(arguments.get$head(), 'additional arguments'); |
| } |
| return funType.returnType; |
| @@ -10224,7 +10235,7 @@ TypeCheckerVisitor.prototype.visitSend = function(node) { |
| else { |
| var selector = (($0 = node.selector) && $0.is$Identifier()); |
| var name = selector.get$source(); |
| - if ($notnull_bool($eq(name, const$247/*const SourceString('+')*/) || $eq(name, const$257/*const SourceString('=')*/)) || $eq(name, const$248/*const SourceString('-')*/) || $eq(name, const$249/*const SourceString('*')*/) || $eq(name, const$250/*const SourceString('/')*/) || $eq(name, const$251/*const SourceString('<')*/) || $eq(name, const$252/*const SourceString('~/')*/)) { |
| + if ($notnull_bool($notnull_bool($notnull_bool($notnull_bool($notnull_bool($notnull_bool($eq(name, const$247/*const SourceString('+')*/) || $eq(name, const$257/*const SourceString('=')*/)) || $eq(name, const$248/*const SourceString('-')*/)) || $eq(name, const$249/*const SourceString('*')*/)) || $eq(name, const$250/*const SourceString('/')*/)) || $eq(name, const$251/*const SourceString('<')*/)) || $eq(name, const$252/*const SourceString('~/')*/))) { |
| return this.types.dynamicType; |
| } |
| this.fail(node, ('unresolved send ' + name + '')); |
| @@ -10232,7 +10243,7 @@ TypeCheckerVisitor.prototype.visitSend = function(node) { |
| } |
| TypeCheckerVisitor.prototype.visitSendSet = function(node) { |
| var $0; |
| - this.compiler.ensure($notnull_bool(node.get$arguments() != null && !$notnull_bool(node.get$arguments().isEmpty()))); |
| + this.compiler.ensure(node.get$arguments() != null && !$notnull_bool(node.get$arguments().isEmpty())); |
| var targetType = (($0 = this.elements.$index(node).computeType(this.compiler, this.types)) && $0.is$Type()); |
| var value = (($0 = node.get$arguments().get$head()) && $0.is$Node()); |
| this.checkAssignable(value, this.type(value), targetType); |
| @@ -10253,7 +10264,7 @@ TypeCheckerVisitor.prototype.visitLiteralString = function(node) { |
| TypeCheckerVisitor.prototype.visitNodeList = function(node) { |
| var $0; |
| for (var link = node.nodes; |
| - $notnull_bool(!$notnull_bool(link.isEmpty())); link = (($0 = link.get$tail()) && $0.is$Link$Node())) { |
| + !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link$Node())) { |
| this.type((($0 = link.get$head()) && $0.is$Node())); |
| } |
| return null; |
| @@ -10264,44 +10275,44 @@ TypeCheckerVisitor.prototype.visitOperator = function(node) { |
| TypeCheckerVisitor.prototype.visitReturn = function(node) { |
| var expression = node.expression; |
| var isVoidFunction = (this.expectedReturnType === this.types.voidType); |
| - if ($notnull_bool(expression != null)) { |
| + if (expression != null) { |
| var expressionType = this.type(expression); |
| - if ($notnull_bool(isVoidFunction && !$notnull_bool(this.types.isAssignable(expressionType, this.types.voidType)))) { |
| + if (isVoidFunction && !$notnull_bool(this.types.isAssignable(expressionType, this.types.voidType))) { |
| this.compiler.reportWarning(expression, CompilerError.returnValueInVoid()); |
| } |
| else { |
| this.checkAssignable(expression, expressionType, this.expectedReturnType); |
| } |
| } |
| - else if ($notnull_bool(!$notnull_bool(this.types.isAssignable(this.expectedReturnType, this.types.voidType)))) { |
| + else if (!$notnull_bool(this.types.isAssignable(this.expectedReturnType, this.types.voidType))) { |
| var error = CompilerError.returnNothing(this.expectedReturnType); |
| this.compiler.reportWarning(node, error); |
| } |
| return null; |
| } |
| TypeCheckerVisitor.prototype.visitThrow = function(node) { |
| - if ($notnull_bool(node.expression != null)) this.type(node.expression); |
| + if (node.expression != null) this.type(node.expression); |
| return this.types.voidType; |
| } |
| TypeCheckerVisitor.prototype.visitTypeAnnotation = function(node) { |
| - if ($notnull_bool(node.typeName == null)) return this.types.dynamicType; |
| + if (node.typeName == null) return this.types.dynamicType; |
| var name = node.typeName.get$source(); |
| var type = this.types.lookup(name); |
| - if ($notnull_bool(type == null)) this.fail(node, ('unsupported type ' + name + '')); |
| + if (type == null) this.fail(node, ('unsupported type ' + name + '')); |
| return type; |
| } |
| TypeCheckerVisitor.prototype.visitVariableDefinitions = function(node) { |
| var $0; |
| var type = this.typeWithDefault(node.type, this.types.dynamicType); |
| - if ($notnull_bool($eq(type, this.types.voidType))) { |
| + if ($eq(type, this.types.voidType)) { |
| this.compiler.reportWarning(node.type, CompilerError.voidVariable()); |
| type = this.types.dynamicType; |
| } |
| for (var link = node.definitions.nodes; |
| - $notnull_bool(!$notnull_bool(link.isEmpty())); link = (($0 = link.get$tail()) && $0.is$Link$Node())) { |
| + !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link$Node())) { |
| var initialization = (($0 = link.get$head()) && $0.is$Node()); |
| - this.compiler.ensure($notnull_bool((initialization instanceof Identifier) || (initialization instanceof Send))); |
| - if ($notnull_bool((initialization instanceof Send))) { |
| + this.compiler.ensure((initialization instanceof Identifier) || (initialization instanceof Send)); |
| + if ((initialization instanceof Send)) { |
| var initializer = this.nonVoidType((($0 = link.get$head()) && $0.is$Node())); |
| this.checkAssignable(node, type, initializer); |
| } |
| @@ -10352,7 +10363,7 @@ CodeWriter.prototype.get$text = function() { |
| CodeWriter.prototype._indent = function() { |
| this._pendingIndent = false; |
| for (var i = 0; |
| - $notnull_bool(i < this._indentation); i++) { |
| + i < this._indentation; i++) { |
| this._buf.add(' '/*CodeWriter.INDENTATION*/); |
| } |
| } |
| @@ -10362,12 +10373,12 @@ CodeWriter.prototype.comment = function(text) { |
| } |
| } |
| CodeWriter.prototype.write = function(text) { |
| - if ($notnull_bool(text.length == 0)) return; |
| + if (text.length == 0) return; |
| if ($notnull_bool(this._pendingIndent)) this._indent(); |
| - if ($notnull_bool(text.indexOf('\n', 0) != -1)) { |
| + if (text.indexOf('\n', 0) != -1) { |
| var lines = text.split('\n'); |
| for (var i = 0; |
| - $notnull_bool(i < lines.length - 1); i++) { |
| + i < lines.length - 1; i++) { |
| this.writeln($assert_String(lines.$index(i))); |
| } |
| this.write($assert_String(lines.$index(lines.length - 1))); |
| @@ -10377,10 +10388,10 @@ CodeWriter.prototype.write = function(text) { |
| } |
| } |
| CodeWriter.prototype.writeln = function(text) { |
| - if ($notnull_bool(text != null)) { |
| + if (text != null) { |
| this.write(text); |
| } |
| - if ($notnull_bool(!$notnull_bool(text.endsWith('\n')))) this._buf.add('\n'/*CodeWriter.NEWLINE*/); |
| + if (!text.endsWith('\n')) this._buf.add('\n'/*CodeWriter.NEWLINE*/); |
| this._pendingIndent = true; |
| } |
| CodeWriter.prototype.enterBlock = function(text) { |
| @@ -10479,7 +10490,7 @@ CoreJs.prototype.generate = function(w) { |
| } |
| if ($notnull_bool(this.useNotNullBool)) { |
| this.useThrow = true; |
| - w.writeln("function $notnull_bool(test) {\n return typeof(test) == 'boolean' ? test : test.is$bool();\n}"); |
| + w.writeln("function $notnull_bool(test) {\n return (test === true || test === false) ? test : test.is$bool();\n}"); |
| } |
| if ($notnull_bool(this.useAssert)) { |
| this.useThrow = true; |
| @@ -10537,7 +10548,7 @@ WorldGenerator.prototype.run = function() { |
| WorldGenerator.prototype.globalForStaticField = function(field, fieldValue, dependencies) { |
| var $0; |
| var fullname = ("" + field.declaringType.get$jsname() + "." + field.get$jsname() + ""); |
| - if ($notnull_bool(!$notnull_bool(this.globals.containsKey(fullname)))) { |
| + if (!this.globals.containsKey(fullname)) { |
| this.globals.$setindex(fullname, GlobalValue.GlobalValue$fromStatic$factory(field, fieldValue, dependencies)); |
| } |
| return (($0 = this.globals.$index(fullname)) && $0.is$GlobalValue()); |
| @@ -10545,7 +10556,7 @@ WorldGenerator.prototype.globalForStaticField = function(field, fieldValue, depe |
| WorldGenerator.prototype.globalForConst = function(exp, dependencies) { |
| var $0; |
| var code = exp.canonicalCode; |
| - if ($notnull_bool(!$notnull_bool(this.globals.containsKey(code)))) { |
| + if (!this.globals.containsKey(code)) { |
| this.globals.$setindex(code, GlobalValue.GlobalValue$fromConst$factory(this.globals.get$length(), exp, dependencies)); |
| } |
| return (($0 = this.globals.$index(code)) && $0.is$GlobalValue()); |
| @@ -10559,7 +10570,7 @@ WorldGenerator.prototype.writeTypes = function(lib) { |
| this.writeTypes(import_.get$library()); |
| } |
| for (var i = 0; |
| - $notnull_bool(i < lib.sources.length); i++) { |
| + i < lib.sources.length; i++) { |
| lib.sources.$index(i).orderInLibrary = i; |
| } |
| this.writer.comment(('// ********** Library ' + lib.name + ' **************')); |
| @@ -10592,18 +10603,18 @@ WorldGenerator.prototype.writeTypes = function(lib) { |
| this.writer.comment(('// ********** Code for ' + type.get$jsname() + ' **************')); |
| this._writeDynamicStubs((type && type.is$lang_Type())); |
| } |
| - if ($notnull_bool(type.typeCheckCode != null)) { |
| + if (type.typeCheckCode != null) { |
| this.writer.writeln(type.typeCheckCode); |
| } |
| } |
| } |
| WorldGenerator.prototype.genMethod = function(meth, enclosingMethod) { |
| - if ($notnull_bool(!$notnull_bool(meth.isGenerated) && !$notnull_bool(meth.get$isAbstract())) && $ne(meth.get$definition(), null)) { |
| + if ($notnull_bool(!$notnull_bool(meth.isGenerated) && !$notnull_bool(meth.get$isAbstract()) && $ne(meth.get$definition(), null))) { |
| new MethodGenerator(meth, enclosingMethod).run(); |
| } |
| } |
| WorldGenerator.prototype._maybeIsTest = function(onType, checkType) { |
| - if ($notnull_bool(!$notnull_bool(checkType.isTested))) return; |
| + if (!$notnull_bool(checkType.isTested)) return; |
| var value = 'false'; |
| if ($notnull_bool(onType.isSubtypeOf(checkType))) { |
| value = 'function(){return this;}'; |
| @@ -10612,32 +10623,32 @@ WorldGenerator.prototype._maybeIsTest = function(onType, checkType) { |
| } |
| WorldGenerator.prototype.writeType = function(type) { |
| var $0; |
| - if ($notnull_bool(type.name != null && (type instanceof ConcreteType)) && $eq(type.get$library(), world.get$coreimpl()) && type.name.startsWith('ListFactory')) { |
| + if (type.name != null && (type instanceof ConcreteType) && $eq(type.get$library(), world.get$coreimpl()) && type.name.startsWith('ListFactory')) { |
| this.writer.writeln(('' + type.get$jsname() + ' = ' + type.get$genericType().get$jsname() + ';')); |
| return; |
| } |
| - var typeName = $notnull_bool(type.get$jsname() != null) ? type.get$jsname() : 'top level'; |
| + var typeName = type.get$jsname() != null ? type.get$jsname() : 'top level'; |
| this.writer.comment(('// ********** Code for ' + typeName + ' **************')); |
| if ($notnull_bool(type.get$isNativeType() && !$notnull_bool(type.get$isTop()))) { |
| var nativeName = type.get$definition().get$nativeType(); |
| if ($notnull_bool($eq(nativeName, ''))) { |
| this.writer.writeln(('function ' + type.get$jsname() + '() {}')); |
| } |
| - else if ($notnull_bool(type.get$jsname() != nativeName)) { |
| + else if (type.get$jsname() != nativeName) { |
| this.writer.writeln(('' + type.get$jsname() + ' = ' + nativeName + ';')); |
| } |
| } |
| if ($notnull_bool(type.get$isTop())) { |
| } |
| - else if ($notnull_bool(type.get$constructors().get$length() == 0)) { |
| - if ($notnull_bool(!$notnull_bool(type.get$isNativeType()))) { |
| + else if (type.get$constructors().get$length() == 0) { |
| + if (!$notnull_bool(type.get$isNativeType())) { |
| this.writer.writeln(('function ' + type.get$jsname() + '() {}')); |
| } |
| } |
| else { |
| var standardConstructor = (($0 = type.get$constructors().$index('')) && $0.is$Member()); |
| - if ($notnull_bool(standardConstructor == null || standardConstructor.generator == null)) { |
| - if ($notnull_bool(!$notnull_bool(type.get$isNativeType()))) { |
| + if (standardConstructor == null || standardConstructor.generator == null) { |
| + if (!$notnull_bool(type.get$isNativeType())) { |
| this.writer.writeln(('function ' + type.get$jsname() + '() {}')); |
| } |
| } |
| @@ -10652,37 +10663,37 @@ WorldGenerator.prototype.writeType = function(type) { |
| } |
| } |
| } |
| - if ($notnull_bool(!$notnull_bool(type.get$isTop()))) { |
| - if ($notnull_bool((type instanceof ConcreteType))) { |
| + if (!$notnull_bool(type.get$isTop())) { |
| + if ((type instanceof ConcreteType)) { |
| this._ensureInheritsHelper(); |
| this.writer.writeln(('\$inherits(' + type.get$jsname() + ', ' + type.get$genericType().get$jsname() + ');')); |
| } |
| - else if ($notnull_bool(!$notnull_bool(type.get$isNativeType()))) { |
| - if ($notnull_bool(type.get$parent() != null && !$notnull_bool(type.get$parent().get$isObject()))) { |
| + else if (!$notnull_bool(type.get$isNativeType())) { |
| + if (type.get$parent() != null && !$notnull_bool(type.get$parent().get$isObject())) { |
| this._ensureInheritsHelper(); |
| this.writer.writeln(('\$inherits(' + type.get$jsname() + ', ' + type.get$parent().get$jsname() + ');')); |
| } |
| } |
| } |
| - if ($notnull_bool(!(type instanceof ConcreteType))) { |
| + if (!(type instanceof ConcreteType)) { |
| this._maybeIsTest(type, type); |
| } |
| - if ($notnull_bool(type.get$genericType()._concreteTypes != null)) { |
| + if (type.get$genericType()._concreteTypes != null) { |
| var $list = this._orderValues(type.get$genericType()._concreteTypes); |
| for (var $i = 0;$i < $list.length; $i++) { |
| var ct = $list.$index($i); |
| this._maybeIsTest(type, (ct && ct.is$lang_Type())); |
| } |
| } |
| - if ($notnull_bool(type.get$interfaces() != null)) { |
| + if (type.get$interfaces() != null) { |
| var seen = new HashSetImplementation(); |
| var worklist = []; |
| worklist.addAll(type.get$interfaces()); |
| seen.addAll(type.get$interfaces()); |
| - while ($notnull_bool(!$notnull_bool(worklist.isEmpty()))) { |
| + while (!worklist.isEmpty()) { |
| var interface_ = worklist.removeLast(); |
| this._maybeIsTest(type, interface_.get$genericType()); |
| - if ($notnull_bool(interface_.get$genericType()._concreteTypes != null)) { |
| + if (interface_.get$genericType()._concreteTypes != null) { |
| var $list = this._orderValues(interface_.get$genericType()._concreteTypes); |
| for (var $i = 0;$i < $list.length; $i++) { |
| var ct = $list.$index($i); |
| @@ -10692,7 +10703,7 @@ WorldGenerator.prototype.writeType = function(type) { |
| var $list = interface_.get$interfaces(); |
| for (var $i = interface_.get$interfaces().iterator(); $i.hasNext(); ) { |
| var other = $i.next(); |
| - if ($notnull_bool(!$notnull_bool(seen.contains(other)))) { |
| + if (!seen.contains(other)) { |
| worklist.addLast(other); |
| seen.add(other); |
| } |
| @@ -10703,10 +10714,10 @@ WorldGenerator.prototype.writeType = function(type) { |
| var $list = this._orderValues(type.get$members()); |
| for (var $i = 0;$i < $list.length; $i++) { |
| var member = $list.$index($i); |
| - if ($notnull_bool((member instanceof FieldMember))) { |
| + if ((member instanceof FieldMember)) { |
| this._writeField((member && member.is$FieldMember())); |
| } |
| - if ($notnull_bool((member instanceof PropertyMember))) { |
| + if ((member instanceof PropertyMember)) { |
| this._writeProperty((member && member.is$PropertyMember())); |
| } |
| if ($notnull_bool(member.get$isMethod())) { |
| @@ -10721,7 +10732,7 @@ WorldGenerator.prototype._ensureInheritsHelper = function() { |
| this.writer.writeln("/** Implements extends for Dart classes on JavaScript prototypes. */\nfunction $inherits(child, parent) {\n if (child.prototype.__proto__) {\n child.prototype.__proto__ = parent.prototype;\n } else {\n function tmp() {};\n tmp.prototype = parent.prototype;\n child.prototype = new tmp();\n child.prototype.constructor = child;\n }\n}"); |
| } |
| WorldGenerator.prototype._writeDynamicStubs = function(type) { |
| - if ($notnull_bool(type.varStubs != null)) { |
| + if (type.varStubs != null) { |
| var $list = orderValuesByKeys(type.varStubs); |
| for (var $i = 0;$i < $list.length; $i++) { |
| var stub = $list.$index($i); |
| @@ -10732,7 +10743,7 @@ WorldGenerator.prototype._writeDynamicStubs = function(type) { |
| WorldGenerator.prototype._writeStaticField = function(field) { |
| if ($notnull_bool(field.isFinal)) return; |
| var fullname = ("" + field.declaringType.get$jsname() + "." + field.get$jsname() + ""); |
| - if ($notnull_bool(this.globals.containsKey(fullname))) { |
| + if (this.globals.containsKey(fullname)) { |
| var value = this.globals.$index(fullname); |
| if ($notnull_bool(field.declaringType.get$isTop() && !$notnull_bool(field.isNative))) { |
| this.writer.writeln(('var ' + field.get$jsname() + ' = ' + value.exp.code + ';')); |
| @@ -10748,28 +10759,28 @@ WorldGenerator.prototype._writeField = function(field) { |
| } |
| if ($notnull_bool(field._providePropertySyntax)) { |
| this.writer.writeln(('' + field.declaringType.get$jsname() + '.prototype.get\$' + field.get$jsname() + ' = ') + ('function() { return this.' + field.get$jsname() + '; };')); |
| - if ($notnull_bool(!$notnull_bool(field.isFinal))) { |
| + if (!$notnull_bool(field.isFinal)) { |
| this.writer.writeln(('' + field.declaringType.get$jsname() + '.prototype.set\$' + field.get$jsname() + ' = ') + ('function(value) { return this.' + field.get$jsname() + ' = value; };')); |
| } |
| } |
| } |
| WorldGenerator.prototype._writeProperty = function(property) { |
| - if ($notnull_bool(property.getter != null)) this._writeMethod(property.getter); |
| - if ($notnull_bool(property.setter != null)) this._writeMethod(property.setter); |
| + if (property.getter != null) this._writeMethod(property.getter); |
| + if (property.setter != null) this._writeMethod(property.setter); |
| if ($notnull_bool(property._provideFieldSyntax)) { |
| this.writer.enterBlock('Object.defineProperty(' + ('' + property.declaringType.get$jsname() + '.prototype, "' + property.get$jsname() + '", {')); |
| - if ($notnull_bool(property.getter != null)) { |
| + if (property.getter != null) { |
| this.writer.write(('get: ' + property.declaringType.get$jsname() + '.prototype.' + property.getter.get$jsname() + '')); |
| - this.writer.writeln($notnull_bool(property.setter == null) ? '' : ','); |
| + this.writer.writeln(property.setter == null ? '' : ','); |
| } |
| - if ($notnull_bool(property.setter != null)) { |
| + if (property.setter != null) { |
| this.writer.writeln(('set: ' + property.declaringType.get$jsname() + '.prototype.' + property.setter.get$jsname() + '')); |
| } |
| this.writer.exitBlock('});'); |
| } |
| } |
| WorldGenerator.prototype._writeMethod = function(method) { |
| - if ($notnull_bool(method.generator != null)) { |
| + if (method.generator != null) { |
| method.generator.writeDefinition(this.writer, null); |
| } |
| } |
| @@ -10777,7 +10788,7 @@ WorldGenerator.prototype.get$_writeMethod = function() { |
| return WorldGenerator.prototype._writeMethod.bind(this); |
| } |
| WorldGenerator.prototype._writeGlobals = function() { |
| - if ($notnull_bool(this.globals.get$length() > 0)) { |
| + if (this.globals.get$length() > 0) { |
| this.writer.comment('// ********** Globals **************'); |
| } |
| var list = this.globals.getValues(); |
| @@ -10787,7 +10798,7 @@ WorldGenerator.prototype._writeGlobals = function() { |
| ); |
| for (var $i = list.iterator(); $i.hasNext(); ) { |
| var global = $i.next(); |
| - if ($notnull_bool(global.field != null)) { |
| + if (global.field != null) { |
| this._writeStaticField(global.field); |
| } |
| else { |
| @@ -10802,12 +10813,12 @@ WorldGenerator.prototype._orderValues = function(map) { |
| return values; |
| } |
| WorldGenerator.prototype._compareMembers = function(x, y) { |
| - if ($notnull_bool(x.get$span() != null && y.get$span() != null)) { |
| + if (x.get$span() != null && y.get$span() != null) { |
| var spans = x.get$span().compareTo(y.get$span()); |
| - if ($notnull_bool(spans != 0)) return spans; |
| + if (spans != 0) return spans; |
| } |
| - if ($notnull_bool(x.get$span() == null)) return 1; |
| - if ($notnull_bool(y.get$span() == null)) return -1; |
| + if (x.get$span() == null) return 1; |
| + if (y.get$span() == null) return -1; |
| return x.get$name().compareTo(y.get$name()); |
| } |
| WorldGenerator.prototype.get$_compareMembers = function() { |
| @@ -10841,11 +10852,11 @@ BlockScope.prototype.is$BlockScope = function(){return this;}; |
| BlockScope.prototype.get$parent = function() { return this.parent; }; |
| BlockScope.prototype.set$parent = function(value) { return this.parent = value; }; |
| BlockScope.prototype.get$isMethodScope = function() { |
| - return $notnull_bool(this.parent == null || $ne(this.parent.enclosingMethod, this.enclosingMethod)); |
| + return this.parent == null || $ne(this.parent.enclosingMethod, this.enclosingMethod); |
| } |
| BlockScope.prototype.get$methodScope = function() { |
| var s = this; |
| - while ($notnull_bool(!$notnull_bool(s.get$isMethodScope()))) s = s.get$parent(); |
| + while (!$notnull_bool(s.get$isMethodScope())) s = s.get$parent(); |
| return (s && s.is$BlockScope()); |
| } |
| BlockScope.prototype.lookup = function(name) { |
| @@ -10855,7 +10866,7 @@ BlockScope.prototype.lookup = function(name) { |
| $notnull_bool($ne(s, null)); s = s.get$parent()) { |
| ret = s._vars.$index(name); |
| if ($notnull_bool($ne(ret, null))) { |
| - if ($notnull_bool($ne(s.enclosingMethod, this.enclosingMethod))) { |
| + if ($ne(s.enclosingMethod, this.enclosingMethod)) { |
| s.get$methodScope()._closedOver.add(ret.code); |
| if ($notnull_bool(this.enclosingMethod.captures != null && s.reentrant)) { |
| this.enclosingMethod.captures.add(ret.code); |
| @@ -10869,19 +10880,19 @@ BlockScope.prototype._isDefinedInParent = function(name) { |
| if ($notnull_bool(this.get$isMethodScope() && this._closedOver.contains(name))) return true; |
| for (var s = this.parent; |
| $notnull_bool($ne(s, null)); s = s.get$parent()) { |
| - if ($notnull_bool(s._vars.containsKey(name))) return true; |
| + if (s._vars.containsKey(name)) return true; |
| if ($notnull_bool(s.get$isMethodScope() && s._closedOver.contains(name))) return true; |
| } |
| var type = this.enclosingMethod.method.declaringType; |
| - if ($notnull_bool(type.get$library().lookup(name, null) != null)) return true; |
| + if (type.get$library().lookup(name, null) != null) return true; |
| return false; |
| } |
| BlockScope.prototype.create = function(name, type, span, isParameter) { |
| var jsName = world.toJsIdentifier(name); |
| - if ($notnull_bool(this._vars.containsKey(name))) { |
| + if (this._vars.containsKey(name)) { |
| world.error(('duplicate name "' + name + '"'), span); |
| } |
| - if ($notnull_bool(!$notnull_bool(isParameter))) { |
| + if (!$notnull_bool(isParameter)) { |
| var index = 0; |
| while ($notnull_bool(this._isDefinedInParent($assert_String(jsName)))) { |
| jsName = ('' + name + '' + index++ + ''); |
| @@ -10913,14 +10924,14 @@ function MethodGenerator(method, enclosingMethod) { |
| this.writer = new CodeWriter(); |
| this.needsThis = false; |
| // Initializers done |
| - if ($notnull_bool(this.enclosingMethod != null)) { |
| + if (this.enclosingMethod != null) { |
| this._scope = new BlockScope(this, this.enclosingMethod._scope, false); |
| this.captures = new HashSetImplementation(); |
| } |
| else { |
| this._scope = new BlockScope(this, null, false); |
| } |
| - if ($notnull_bool(this.enclosingMethod != null && this.method.name != '')) { |
| + if (this.enclosingMethod != null && this.method.name != '') { |
| var m = (($0 = this.method) && $0.is$MethodMember()); |
| this._scope.create(m.name, m.get$functionType(), m.definition.span, false); |
| } |
| @@ -10945,7 +10956,7 @@ MethodGenerator.prototype.getTemp = function(value) { |
| } |
| MethodGenerator.prototype.forceTemp = function(value) { |
| var name; |
| - if ($notnull_bool(this._freeTemps.length > 0)) { |
| + if (this._freeTemps.length > 0) { |
| name = $assert_String(this._freeTemps.removeLast()); |
| } |
| else { |
| @@ -10955,7 +10966,7 @@ MethodGenerator.prototype.forceTemp = function(value) { |
| return new Value(value.type, name, value.span, false); |
| } |
| MethodGenerator.prototype.assignTemp = function(tmp, v) { |
| - if ($notnull_bool($eq(tmp, v))) { |
| + if ($eq(tmp, v)) { |
| return v; |
| } |
| else { |
| @@ -10963,7 +10974,7 @@ MethodGenerator.prototype.assignTemp = function(tmp, v) { |
| } |
| } |
| MethodGenerator.prototype.freeTemp = function(value) { |
| - if ($notnull_bool(this._usedTemps.remove(value.code))) { |
| + if (this._usedTemps.remove(value.code)) { |
| this._freeTemps.add(value.code); |
| } |
| else { |
| @@ -10974,7 +10985,7 @@ MethodGenerator.prototype.run = function() { |
| if ($notnull_bool(this.method.isGenerated)) return; |
| this.method.isGenerated = true; |
| this.method.generator = this; |
| - if ($notnull_bool((this.method.get$definition().body instanceof NativeStatement))) { |
| + if ((this.method.get$definition().body instanceof NativeStatement)) { |
| if ($notnull_bool(this.method.get$definition().body.body == null)) { |
| this.method.generator = null; |
| } |
| @@ -10994,7 +11005,7 @@ MethodGenerator.prototype.writeDefinition = function(defWriter, lambda) { |
| var $0; |
| var paramCode = this._paramCode; |
| var names = null; |
| - if ($notnull_bool(this.captures != null && this.captures.get$length() > 0)) { |
| + if (this.captures != null && this.captures.get$length() > 0) { |
| names = ListFactory.ListFactory$from$factory(this.captures); |
| names.sort((function (x, y) { |
| return x.compareTo(y); |
| @@ -11009,11 +11020,11 @@ MethodGenerator.prototype.writeDefinition = function(defWriter, lambda) { |
| defWriter.enterBlock(('function ' + this.method.get$jsname() + '' + params + ' {')); |
| } |
| else if ($notnull_bool(this.get$isClosure())) { |
| - if ($notnull_bool(this.method.name == '')) { |
| + if (this.method.name == '') { |
| defWriter.enterBlock(('(function ' + params + ' {')); |
| } |
| else if ($notnull_bool($ne(names, null))) { |
| - if ($notnull_bool(lambda == null)) { |
| + if (lambda == null) { |
| defWriter.enterBlock(('var ' + this.method.get$jsname() + ' = (function' + params + ' {')); |
| } |
| else { |
| @@ -11025,7 +11036,7 @@ MethodGenerator.prototype.writeDefinition = function(defWriter, lambda) { |
| } |
| } |
| else if ($notnull_bool(this.method.get$isConstructor())) { |
| - if ($notnull_bool(this.method.get$constructorName() == '')) { |
| + if (this.method.get$constructorName() == '') { |
| defWriter.enterBlock(('function ' + this.method.declaringType.get$jsname() + '' + params + ' {')); |
| } |
| else { |
| @@ -11044,7 +11055,7 @@ MethodGenerator.prototype.writeDefinition = function(defWriter, lambda) { |
| if ($notnull_bool(this.needsThis)) { |
| defWriter.writeln('var \$this = this; // closure support'); |
| } |
| - if ($notnull_bool(this._usedTemps.get$length() > 0 || this._freeTemps.length > 0)) { |
| + if (this._usedTemps.get$length() > 0 || this._freeTemps.length > 0) { |
| $assert(this._usedTemps.get$length() == 0, "_usedTemps.length == 0", "gen.dart", 695, 14); |
| this._freeTemps.addAll(this._usedTemps); |
| this._freeTemps.sort((function (x, y) { |
| @@ -11067,7 +11078,7 @@ MethodGenerator.prototype.writeDefinition = function(defWriter, lambda) { |
| defWriter.writeln(('' + this.method.declaringType.get$jsname() + '.' + this.method.get$constructorName() + '\$ctor.prototype = ') + ('' + this.method.declaringType.get$jsname() + '.prototype;')); |
| } |
| this._provideOptionalParamInfo(defWriter); |
| - if ($notnull_bool((this.method instanceof MethodMember))) { |
| + if ((this.method instanceof MethodMember)) { |
| var m = (($0 = this.method) && $0.is$MethodMember()); |
| if ($notnull_bool(m._providePropertySyntax)) { |
| defWriter.enterBlock(('' + m.declaringType.get$jsname() + '.prototype') + ('.get\$' + m.get$jsname() + ' = function() {')); |
| @@ -11081,7 +11092,7 @@ MethodGenerator.prototype.writeDefinition = function(defWriter, lambda) { |
| } |
| MethodGenerator.prototype._provideOptionalParamInfo = function(defWriter) { |
| var $0; |
| - if ($notnull_bool((this.method instanceof MethodMember))) { |
| + if ((this.method instanceof MethodMember)) { |
| var meth = (($0 = this.method) && $0.is$MethodMember()); |
| if ($notnull_bool(meth._provideOptionalParamInfo)) { |
| var optNames = []; |
| @@ -11095,10 +11106,10 @@ MethodGenerator.prototype._provideOptionalParamInfo = function(defWriter) { |
| optValues.add(MethodGenerator._escapeString(param.get$value().code)); |
| } |
| } |
| - if ($notnull_bool(optNames.length > 0)) { |
| + if (optNames.length > 0) { |
| var start = ''; |
| if ($notnull_bool(meth.isStatic)) { |
| - if ($notnull_bool(!$notnull_bool(meth.declaringType.get$isTop()))) { |
| + if (!$notnull_bool(meth.declaringType.get$isTop())) { |
| start = meth.declaringType.get$jsname() + '.'; |
| } |
| } |
| @@ -11122,7 +11133,7 @@ MethodGenerator.prototype.writeBody = function() { |
| var $list = world.gen._orderValues(this.method.declaringType.getAllMembers()); |
| for (var $i = 0;$i < $list.length; $i++) { |
| var f = $list.$index($i); |
| - if ($notnull_bool((f instanceof FieldMember) && !$notnull_bool(f.get$isStatic()))) { |
| + if ((f instanceof FieldMember) && !$notnull_bool(f.get$isStatic())) { |
| var cv = f.computeValue(); |
| if ($notnull_bool($ne(cv, null))) { |
| initializers.add(('this.' + f.get$jsname() + ' = ' + cv.code + '')); |
| @@ -11140,7 +11151,7 @@ MethodGenerator.prototype.writeBody = function() { |
| if ($notnull_bool(field == null)) { |
| world.error('bad this parameter - no matching field', p.get$definition().get$span()); |
| } |
| - if ($notnull_bool(!$notnull_bool(field.get$isField()))) { |
| + if (!$notnull_bool(field.get$isField())) { |
| world.error(('"this.' + p.get$name() + '" does not refer to a field'), p.get$definition().get$span()); |
| } |
| var paramValue = new Value(field.get$returnType(), p.get$name(), p.get$definition().get$span(), false); |
| @@ -11163,19 +11174,19 @@ MethodGenerator.prototype.writeBody = function() { |
| this.writer.writeln($assert_String(i)); |
| } |
| var declaredInitializers = this.method.get$definition().initializers; |
| - if ($notnull_bool(declaredInitializers != null)) { |
| + if (declaredInitializers != null) { |
| var initializerCall = null; |
| for (var $i = 0;$i < declaredInitializers.length; $i++) { |
| var init = declaredInitializers.$index($i); |
| - if ($notnull_bool((init instanceof CallExpression))) { |
| + if ((init instanceof CallExpression)) { |
| if ($notnull_bool($ne(initializerCall, null))) { |
| world.error('only one initializer redirecting call is allowed', init.get$span()); |
| } |
| initializerCall = init; |
| } |
| - else if ($notnull_bool((init instanceof BinaryExpression) && TokenKind.kindFromAssign(init.op.kind) == 0)) { |
| + else if ((init instanceof BinaryExpression) && TokenKind.kindFromAssign(init.op.kind) == 0) { |
| var left = init.x; |
| - if ($notnull_bool(!$notnull_bool(($notnull_bool((left instanceof DotExpression) && (left.self instanceof ThisExpression)) || (left instanceof VarExpression))))) { |
| + if (!((left instanceof DotExpression) && (left.self instanceof ThisExpression) || (left instanceof VarExpression))) { |
| world.error('invalid left side of initializer', left.get$span()); |
| continue; |
| } |
| @@ -11189,8 +11200,8 @@ MethodGenerator.prototype.writeBody = function() { |
| } |
| if ($notnull_bool($ne(initializerCall, null))) { |
| var target = this._writeInitializerCall((initializerCall && initializerCall.is$CallExpression())); |
| - if ($notnull_bool(!$notnull_bool(target.isSuper))) { |
| - if ($notnull_bool(initializers.length > 0)) { |
| + if (!$notnull_bool(target.isSuper)) { |
| + if (initializers.length > 0) { |
| var $list = this.method.get$parameters(); |
| for (var $i = 0;$i < $list.length; $i++) { |
| var p = $list.$index($i); |
| @@ -11200,7 +11211,7 @@ MethodGenerator.prototype.writeBody = function() { |
| } |
| } |
| } |
| - if ($notnull_bool(declaredInitializers.length > 1)) { |
| + if (declaredInitializers.length > 1) { |
| var init = $notnull_bool($eq(declaredInitializers.$index(0), initializerCall)) ? declaredInitializers.$index(1) : declaredInitializers.$index(0); |
| world.error('no initialization allowed on redirecting constructors', init.get$span()); |
| } |
| @@ -11217,7 +11228,7 @@ MethodGenerator.prototype.writeBody = function() { |
| for (var $i = this.method.declaringType.get$members().getKeys().iterator(); $i.hasNext(); ) { |
| var name = $i.next(); |
| var member = this.method.declaringType.get$members().$index(name); |
| - if ($notnull_bool((member instanceof FieldMember) && member.isFinal) && !$notnull_bool(member.get$isStatic()) && !$notnull_bool(initializedFields.contains(name))) { |
| + if ($notnull_bool((member instanceof FieldMember) && member.isFinal) && !$notnull_bool(member.get$isStatic()) && !initializedFields.contains(name)) { |
| world.error(('Field "' + name + '" is final and was not initialized'), this.method.get$definition().get$span()); |
| } |
| } |
| @@ -11227,16 +11238,16 @@ MethodGenerator.prototype.writeBody = function() { |
| MethodGenerator.prototype._writeInitializerCall = function(node) { |
| var contructorName = ''; |
| var targetExp = node.target; |
| - if ($notnull_bool((targetExp instanceof DotExpression))) { |
| + if ((targetExp instanceof DotExpression)) { |
| var dot = (targetExp && targetExp.is$DotExpression()); |
| targetExp = dot.self; |
| contructorName = dot.name.name; |
| } |
| var target = null; |
| - if ($notnull_bool((targetExp instanceof SuperExpression))) { |
| + if ((targetExp instanceof SuperExpression)) { |
| target = this._makeSuperValue((targetExp && targetExp.is$lang_Node())); |
| } |
| - else if ($notnull_bool((targetExp instanceof ThisExpression))) { |
| + else if ((targetExp instanceof ThisExpression)) { |
| target = this._makeThisValue((targetExp && targetExp.is$lang_Node())); |
| } |
| else { |
| @@ -11265,7 +11276,7 @@ MethodGenerator.prototype._makeArgs = function(arguments) { |
| var seenLabel = false; |
| for (var $i = 0;$i < arguments.length; $i++) { |
| var arg = arguments.$index($i); |
| - if ($notnull_bool(arg.label != null)) { |
| + if (arg.label != null) { |
| seenLabel = true; |
| } |
| else if ($notnull_bool(seenLabel)) { |
| @@ -11279,7 +11290,7 @@ MethodGenerator._escapeString = function(text) { |
| return text.replaceAll('\\', '\\\\').replaceAll('"', '\\"').replaceAll('\n', '\\n').replaceAll('\r', '\\r'); |
| } |
| MethodGenerator.prototype.visitStatementsInBlock = function(body) { |
| - if ($notnull_bool((body instanceof BlockStatement))) { |
| + if ((body instanceof BlockStatement)) { |
| var block = (body && body.is$BlockStatement()); |
| var $list = block.body; |
| for (var $i = 0;$i < $list.length; $i++) { |
| @@ -11288,7 +11299,7 @@ MethodGenerator.prototype.visitStatementsInBlock = function(body) { |
| } |
| } |
| else { |
| - if ($notnull_bool(body != null)) body.visit(this); |
| + if (body != null) body.visit(this); |
| } |
| return false; |
| } |
| @@ -11306,10 +11317,10 @@ MethodGenerator.prototype._makeLambdaMethod = function(name, func) { |
| return (meth && meth.is$MethodMember()); |
| } |
| MethodGenerator.prototype.visitBool = function(node) { |
| - return this.visitValue(node).convertToNonNullBool(this, node); |
| + return this.visitValue(node).convertTo(this, world.nonNullBool, node, false); |
| } |
| MethodGenerator.prototype.visitValue = function(node) { |
| - if ($notnull_bool(node == null)) return null; |
| + if (node == null) return null; |
| var value = node.visit(this); |
| value.checkFirstClass(node.span); |
| return value; |
| @@ -11318,7 +11329,7 @@ MethodGenerator.prototype.visitTypedValue = function(node, expectedType) { |
| return this.visitValue(node).convertTo(this, expectedType, node, false); |
| } |
| MethodGenerator.prototype.visitVoid = function(node) { |
| - if ($notnull_bool((node instanceof PostfixExpression))) { |
| + if ((node instanceof PostfixExpression)) { |
| var value = this.visitPostfixExpression((node && node.is$PostfixExpression()), true); |
| value.checkFirstClass(node.span); |
| return value; |
| @@ -11339,9 +11350,9 @@ MethodGenerator.prototype.visitVariableDefinition = function(node) { |
| this.writer.write('var '); |
| var type = this.method.resolveType(node.type, false); |
| for (var i = 0; |
| - $notnull_bool(i < node.names.length); i++) { |
| + i < node.names.length; i++) { |
| var thisType = type; |
| - if ($notnull_bool(i > 0)) { |
| + if (i > 0) { |
| this.writer.write(', '); |
| } |
| var name = node.names.$index(i).get$name(); |
| @@ -11375,7 +11386,7 @@ MethodGenerator.prototype.visitFunctionDefinition = function(node) { |
| return false; |
| } |
| MethodGenerator.prototype.visitReturnStatement = function(node) { |
| - if ($notnull_bool(node.value == null)) { |
| + if (node.value == null) { |
| this.writer.writeln('return;'); |
| } |
| else { |
| @@ -11388,7 +11399,7 @@ MethodGenerator.prototype.visitReturnStatement = function(node) { |
| return true; |
| } |
| MethodGenerator.prototype.visitThrowStatement = function(node) { |
| - if ($notnull_bool(node.value != null)) { |
| + if (node.value != null) { |
| var value = this.visitValue(node.value); |
| value.invoke$4(this, 'toString', node, Arguments.get$EMPTY()); |
| this.writer.writeln(('\$throw(' + value.code + ');')); |
| @@ -11421,7 +11432,7 @@ MethodGenerator.prototype.visitAssertStatement = function(node) { |
| return false; |
| } |
| MethodGenerator.prototype.visitBreakStatement = function(node) { |
| - if ($notnull_bool(node.label == null)) { |
| + if (node.label == null) { |
| this.writer.writeln('break;'); |
| } |
| else { |
| @@ -11430,7 +11441,7 @@ MethodGenerator.prototype.visitBreakStatement = function(node) { |
| return true; |
| } |
| MethodGenerator.prototype.visitContinueStatement = function(node) { |
| - if ($notnull_bool(node.label == null)) { |
| + if (node.label == null) { |
| this.writer.writeln('continue;'); |
| } |
| else { |
| @@ -11442,7 +11453,7 @@ MethodGenerator.prototype.visitIfStatement = function(node) { |
| var test = this.visitBool(node.test); |
| this.writer.write(('if (' + test.code + ') ')); |
| var exit1 = node.trueBranch.visit(this); |
| - if ($notnull_bool(node.falseBranch != null)) { |
| + if (node.falseBranch != null) { |
| this.writer.write('else '); |
| if ($notnull_bool(node.falseBranch.visit(this) && exit1)) { |
| return true; |
| @@ -11470,9 +11481,9 @@ MethodGenerator.prototype.visitDoStatement = function(node) { |
| MethodGenerator.prototype.visitForStatement = function(node) { |
| this._pushBlock(false); |
| this.writer.write('for ('); |
| - if ($notnull_bool(node.init != null)) node.init.visit(this); |
| + if (node.init != null) node.init.visit(this); |
| else this.writer.write(';'); |
| - if ($notnull_bool(node.test != null)) { |
| + if (node.test != null) { |
| var test = this.visitBool(node.test); |
| this.writer.write((' ' + test.code + '; ')); |
| } |
| @@ -11546,35 +11557,35 @@ MethodGenerator.prototype.visitTryStatement = function(node) { |
| this._pushBlock(false); |
| this.visitStatementsInBlock(node.body); |
| this._popBlock(); |
| - if ($notnull_bool(node.catches.length == 1)) { |
| + if (node.catches.length == 1) { |
| var catch_ = node.catches.$index(0); |
| this._pushBlock(false); |
| var ex = this._scope.declare((($0 = catch_.get$exception()) && $0.is$DeclaredIdentifier())); |
| this._scope.rethrow = (ex && ex.is$Value()); |
| this.writer.nextBlock(('} catch (' + ex.code + ') {')); |
| - if ($notnull_bool(catch_.trace != null)) { |
| + if (catch_.trace != null) { |
| var trace = this._scope.declare(catch_.trace); |
| this.writer.writeln(('var ' + trace.code + ' = \$stackTraceOf(' + ex.code + ');')); |
| world.gen.corejs.useStackTraceOf = true; |
| } |
| this._genToDartException(ex.code, node); |
| - if ($notnull_bool(!$notnull_bool(ex.type.get$isVar()))) { |
| + if (!$notnull_bool(ex.type.get$isVar())) { |
| var test = ex.instanceOf(this, (($0 = ex.type) && $0.is$lang_Type()), catch_.get$exception().get$span(), false, true); |
| this.writer.writeln(('if (' + test.code + ') throw ' + ex.code + ';')); |
| } |
| this.visitStatementsInBlock((($0 = node.catches.$index(0).body) && $0.is$lang_Statement())); |
| this._popBlock(); |
| } |
| - else if ($notnull_bool(node.catches.length > 0)) { |
| + else if (node.catches.length > 0) { |
| this._pushBlock(false); |
| var ex = this._scope.create('\$ex', world.varType, null, false); |
| this._scope.rethrow = (ex && ex.is$Value()); |
| this.writer.nextBlock(('} catch (' + ex.code + ') {')); |
| var trace = null; |
| - if ($notnull_bool(node.catches.some((function (c) { |
| + if (node.catches.some((function (c) { |
| return c.trace != null; |
| }) |
| - ))) { |
| + )) { |
| trace = this._scope.create('\$trace', world.varType, null, false); |
| this.writer.writeln(('var ' + trace.code + ' = \$stackTraceOf(' + ex.code + ');')); |
| world.gen.corejs.useStackTraceOf = true; |
| @@ -11582,34 +11593,34 @@ MethodGenerator.prototype.visitTryStatement = function(node) { |
| this._genToDartException(ex.code, node); |
| var needsRethrow = true; |
| for (var i = 0; |
| - $notnull_bool(i < node.catches.length); i++) { |
| + i < node.catches.length; i++) { |
| var catch_ = node.catches.$index(i); |
| this._pushBlock(false); |
| var tmp = this._scope.declare((($0 = catch_.get$exception()) && $0.is$DeclaredIdentifier())); |
| - if ($notnull_bool(!$notnull_bool(tmp.type.get$isVar()))) { |
| + if (!$notnull_bool(tmp.type.get$isVar())) { |
| var test = ex.instanceOf(this, (($0 = tmp.type) && $0.is$lang_Type()), catch_.get$exception().get$span(), true, true); |
| - if ($notnull_bool(i == 0)) { |
| + if (i == 0) { |
| this.writer.enterBlock(('if (' + test.code + ') {')); |
| } |
| else { |
| this.writer.nextBlock(('} else if (' + test.code + ') {')); |
| } |
| } |
| - else if ($notnull_bool(i > 0)) { |
| + else if (i > 0) { |
| this.writer.nextBlock('} else {'); |
| } |
| this.writer.writeln(('var ' + tmp.code + ' = ' + ex.code + ';')); |
| - if ($notnull_bool(catch_.trace != null)) { |
| + if (catch_.trace != null) { |
| var tmptrace = this._scope.declare(catch_.trace); |
| this.writer.writeln(('var ' + tmptrace.code + ' = ' + trace.code + ';')); |
| } |
| this.visitStatementsInBlock((($0 = catch_.body) && $0.is$lang_Statement())); |
| this._popBlock(); |
| if ($notnull_bool(tmp.type.get$isVar())) { |
| - if ($notnull_bool(i + 1 < node.catches.length)) { |
| + if (i + 1 < node.catches.length) { |
| world.warning('Unreachable catch clause', (($0 = node.catches.$index(i + 1)) && $0.is$SourceSpan())); |
| } |
| - if ($notnull_bool(i > 0)) { |
| + if (i > 0) { |
| this.writer.exitBlock('}'); |
| } |
| needsRethrow = false; |
| @@ -11623,7 +11634,7 @@ MethodGenerator.prototype.visitTryStatement = function(node) { |
| } |
| this._popBlock(); |
| } |
| - if ($notnull_bool(node.finallyBlock != null)) { |
| + if (node.finallyBlock != null) { |
| this.writer.nextBlock('} finally {'); |
| this._pushBlock(false); |
| this.visitStatementsInBlock(node.finallyBlock); |
| @@ -11638,15 +11649,15 @@ MethodGenerator.prototype.visitSwitchStatement = function(node) { |
| var $list = node.cases; |
| for (var $i = 0;$i < $list.length; $i++) { |
| var case_ = $list.$index($i); |
| - if ($notnull_bool(case_.label != null)) { |
| + if (case_.label != null) { |
| world.error('unimplemented: labeled case statement', case_.get$span()); |
| } |
| this._pushBlock(false); |
| for (var i = 0; |
| - $notnull_bool(i < case_.cases.length); i++) { |
| + i < case_.cases.length; i++) { |
| var expr = case_.cases.$index(i); |
| if ($notnull_bool(expr == null)) { |
| - if ($notnull_bool(i < case_.cases.length - 1)) { |
| + if (i < case_.cases.length - 1) { |
| world.error('default clause must be the last case', case_.get$span()); |
| } |
| this.writer.writeln('default:'); |
| @@ -11671,7 +11682,7 @@ MethodGenerator.prototype.visitSwitchStatement = function(node) { |
| } |
| MethodGenerator.prototype._visitAllStatements = function(statementList, exits) { |
| for (var i = 0; |
| - $notnull_bool(i < statementList.length); i++) { |
| + i < statementList.length; i++) { |
| var stmt = statementList.$index(i); |
| exits = stmt.visit(this); |
| if ($notnull_bool($ne(stmt, statementList.$index(statementList.length - 1)) && exits)) { |
| @@ -11694,7 +11705,7 @@ MethodGenerator.prototype.visitLabeledStatement = function(node) { |
| return false; |
| } |
| MethodGenerator.prototype.visitExpressionStatement = function(node) { |
| - if ($notnull_bool((node.body instanceof VarExpression) || (node.body instanceof ThisExpression))) { |
| + if ((node.body instanceof VarExpression) || (node.body instanceof ThisExpression)) { |
| world.warning('variable used as statement', node.span); |
| } |
| var value = this.visitVoid(node.body); |
| @@ -11722,13 +11733,13 @@ MethodGenerator.prototype._makeSuperValue = function(node) { |
| } |
| MethodGenerator.prototype._getOutermostMethod = function() { |
| var result = this; |
| - while ($notnull_bool(result.enclosingMethod != null)) { |
| + while (result.enclosingMethod != null) { |
| result = result.enclosingMethod; |
| } |
| return result; |
| } |
| MethodGenerator.prototype._makeThisCode = function() { |
| - if ($notnull_bool(this.enclosingMethod != null)) { |
| + if (this.enclosingMethod != null) { |
| this._getOutermostMethod().needsThis = true; |
| return '\$this'; |
| } |
| @@ -11737,20 +11748,20 @@ MethodGenerator.prototype._makeThisCode = function() { |
| } |
| } |
| MethodGenerator.prototype._makeThisValue = function(node) { |
| - if ($notnull_bool(this.enclosingMethod != null)) { |
| + if (this.enclosingMethod != null) { |
| var outermostMethod = this._getOutermostMethod(); |
| outermostMethod._checkNonStatic(node); |
| outermostMethod.needsThis = true; |
| - return new Value(outermostMethod.method.declaringType, '\$this', $notnull_bool(node != null) ? node.span : null, false); |
| + return new Value(outermostMethod.method.declaringType, '\$this', node != null ? node.span : null, false); |
| } |
| else { |
| this._checkNonStatic(node); |
| - return new Value(this.method.declaringType, 'this', $notnull_bool(node != null) ? node.span : null, false); |
| + return new Value(this.method.declaringType, 'this', node != null ? node.span : null, false); |
| } |
| } |
| MethodGenerator.prototype.visitLambdaExpression = function(node) { |
| var name = ''; |
| - if ($notnull_bool(node.func.name != null)) { |
| + if (node.func.name != null) { |
| name = world.toJsIdentifier(node.func.name.name); |
| } |
| var meth = this._makeLambdaMethod($assert_String(name), node.func); |
| @@ -11763,13 +11774,13 @@ MethodGenerator.prototype.visitCallExpression = function(node) { |
| var target; |
| var position = node.target; |
| var name = '\$call'; |
| - if ($notnull_bool((node.target instanceof DotExpression))) { |
| + if ((node.target instanceof DotExpression)) { |
| var dot = (($0 = node.target) && $0.is$DotExpression()); |
| target = dot.self.visit(this); |
| name = dot.name.name; |
| position = dot.name; |
| } |
| - else if ($notnull_bool((node.target instanceof VarExpression))) { |
| + else if ((node.target instanceof VarExpression)) { |
| var varExpr = (($0 = node.target) && $0.is$VarExpression()); |
| name = varExpr.name.name; |
| target = this._scope.lookup($assert_String(name)); |
| @@ -11792,38 +11803,38 @@ MethodGenerator.prototype.visitIndexExpression = function(node) { |
| MethodGenerator.prototype.visitBinaryExpression = function(node) { |
| var $0; |
| var kind = node.op.kind; |
| - if ($notnull_bool(kind == 35/*TokenKind.AND*/ || kind == 34/*TokenKind.OR*/)) { |
| + if (kind == 35/*TokenKind.AND*/ || kind == 34/*TokenKind.OR*/) { |
| var x = this.visitValue(node.x); |
| var y = this.visitValue(node.y); |
| var code = ('' + x.code + ' ' + node.op + ' ' + y.code + ''); |
| if ($notnull_bool(x.get$isConst() && y.get$isConst())) { |
| - var value = $notnull_bool((kind == 35/*TokenKind.AND*/)) ? $notnull_bool(x.get$actualValue() && y.get$actualValue()) : $notnull_bool(x.get$actualValue() || y.get$actualValue()); |
| + var value = (kind == 35/*TokenKind.AND*/) ? $notnull_bool(x.get$actualValue() && y.get$actualValue()) : $notnull_bool(x.get$actualValue() || y.get$actualValue()); |
| return EvaluatedValue.EvaluatedValue$factory((($0 = x.type) && $0.is$lang_Type()), value, ('' + value + ''), node.span); |
| } |
| var ret = new Value(lang_Type.union((($0 = x.type) && $0.is$lang_Type()), (($0 = y.type) && $0.is$lang_Type())), code, node.span, true); |
| - return ret.convertToNonNullBool(this, node); |
| + return ret.convertTo(this, world.nonNullBool, node, false); |
| } |
| - else if ($notnull_bool(kind == 50/*TokenKind.EQ_STRICT*/ || kind == 51/*TokenKind.NE_STRICT*/)) { |
| + else if (kind == 50/*TokenKind.EQ_STRICT*/ || kind == 51/*TokenKind.NE_STRICT*/) { |
| var x = this.visitValue(node.x); |
| var y = this.visitValue(node.y); |
| if ($notnull_bool(x.get$isConst() && y.get$isConst())) { |
| - var value = $notnull_bool(kind == 50/*TokenKind.EQ_STRICT*/) ? $eq(x.get$actualValue(), y.get$actualValue()) : $ne(x.get$actualValue(), y.get$actualValue()); |
| - return EvaluatedValue.EvaluatedValue$factory(world.boolType, value, ("" + value + ""), node.span); |
| + var value = kind == 50/*TokenKind.EQ_STRICT*/ ? $eq(x.get$actualValue(), y.get$actualValue()) : $ne(x.get$actualValue(), y.get$actualValue()); |
| + return EvaluatedValue.EvaluatedValue$factory(world.nonNullBool, value, ("" + value + ""), node.span); |
| } |
| - if ($notnull_bool(x.code == 'null' || y.code == 'null')) { |
| + if (x.code == 'null' || y.code == 'null') { |
| var op = node.op.toString().substring(0, 2); |
| - return new Value(world.boolType, ('' + x.code + ' ' + op + ' ' + y.code + ''), node.span, true); |
| + return new Value(world.nonNullBool, ('' + x.code + ' ' + op + ' ' + y.code + ''), node.span, true); |
| } |
| else { |
| - return new Value(world.boolType, ('' + x.code + ' ' + node.op + ' ' + y.code + ''), node.span, true); |
| + return new Value(world.nonNullBool, ('' + x.code + ' ' + node.op + ' ' + y.code + ''), node.span, true); |
| } |
| } |
| var assignKind = TokenKind.kindFromAssign(node.op.kind); |
| - if ($notnull_bool(assignKind == -1)) { |
| + if (assignKind == -1) { |
| var x = this.visitValue(node.x); |
| var y = this.visitValue(node.y); |
| var name = TokenKind.binaryMethodName(node.op.kind); |
| - if ($notnull_bool(node.op.kind == 49/*TokenKind.NE*/)) { |
| + if (node.op.kind == 49/*TokenKind.NE*/) { |
| name = '\$ne'; |
| } |
| if ($notnull_bool(name == null)) { |
| @@ -11837,19 +11848,19 @@ MethodGenerator.prototype.visitBinaryExpression = function(node) { |
| } |
| } |
| MethodGenerator.prototype._visitAssign = function(kind, xn, yn, position, captureOriginal) { |
| - if ($notnull_bool(captureOriginal == null)) { |
| + if (captureOriginal == null) { |
| captureOriginal = (function (x) { |
| return x; |
| }) |
| ; |
| } |
| - if ($notnull_bool((xn instanceof VarExpression))) { |
| + if ((xn instanceof VarExpression)) { |
| return this._visitVarAssign(kind, (xn && xn.is$VarExpression()), yn, position, captureOriginal); |
| } |
| - else if ($notnull_bool((xn instanceof IndexExpression))) { |
| + else if ((xn instanceof IndexExpression)) { |
| return this._visitIndexAssign(kind, (xn && xn.is$IndexExpression()), yn, position, captureOriginal); |
| } |
| - else if ($notnull_bool((xn instanceof DotExpression))) { |
| + else if ((xn instanceof DotExpression)) { |
| return this._visitDotAssign(kind, (xn && xn.is$DotExpression()), yn, position, captureOriginal); |
| } |
| else { |
| @@ -11865,7 +11876,7 @@ MethodGenerator.prototype._visitVarAssign = function(kind, xn, yn, position, cap |
| var members = this.method.declaringType.resolveMember(name); |
| if ($notnull_bool($ne(members, null))) { |
| x = this._makeThisOrType(position.span); |
| - if ($notnull_bool(kind == 0)) { |
| + if (kind == 0) { |
| return x.set_(this, name, position, (y && y.is$Value()), false); |
| } |
| else if ($notnull_bool(!$notnull_bool(members.get$treatAsField()) || members.get$containsMethods())) { |
| @@ -11880,13 +11891,13 @@ MethodGenerator.prototype._visitVarAssign = function(kind, xn, yn, position, cap |
| } |
| else { |
| var member = this.get$library().lookup(name, xn.name.span); |
| - if ($notnull_bool(member == null)) { |
| + if (member == null) { |
| world.warning(('can not resolve ' + name + ''), xn.span); |
| return this._makeMissingValue(name); |
| } |
| members = new MemberSet(member); |
| if ($notnull_bool(!$notnull_bool(members.get$treatAsField()) || members.get$containsMethods())) { |
| - if ($notnull_bool(kind != 0)) { |
| + if (kind != 0) { |
| var right = members._get$3(this, position, x); |
| right = captureOriginal((right && right.is$Value())); |
| y = right.invoke$4(this, TokenKind.binaryMethodName(kind), position, new Arguments(null, [y])); |
| @@ -11899,7 +11910,7 @@ MethodGenerator.prototype._visitVarAssign = function(kind, xn, yn, position, cap |
| } |
| } |
| y = y.convertTo(this, (($0 = x.type) && $0.is$lang_Type()), yn, false); |
| - if ($notnull_bool(kind == 0)) { |
| + if (kind == 0) { |
| x = captureOriginal((x && x.is$Value())); |
| return new Value(y.type, ('' + x.code + ' = ' + y.code + ''), position.span, true); |
| } |
| @@ -11921,7 +11932,7 @@ MethodGenerator.prototype._visitIndexAssign = function(kind, xn, yn, position, c |
| var y = this.visitValue(yn); |
| var tmptarget = target; |
| var tmpindex = index; |
| - if ($notnull_bool(kind != 0)) { |
| + if (kind != 0) { |
| tmptarget = this.getTemp((target && target.is$Value())); |
| tmpindex = this.getTemp((index && index.is$Value())); |
| index = this.assignTemp((tmpindex && tmpindex.is$Value()), (index && index.is$Value())); |
| @@ -11938,7 +11949,7 @@ MethodGenerator.prototype._visitDotAssign = function(kind, xn, yn, position, cap |
| var target = xn.self.visit(this); |
| var y = this.visitValue(yn); |
| var tmptarget = target; |
| - if ($notnull_bool(kind != 0)) { |
| + if (kind != 0) { |
| tmptarget = this.getTemp((target && target.is$Value())); |
| var right = tmptarget.get_(this, xn.name.name, xn.name); |
| right = captureOriginal((right && right.is$Value())); |
| @@ -11959,7 +11970,7 @@ MethodGenerator.prototype.visitUnaryExpression = function(node) { |
| return new Value(value.type, ('' + node.op + '' + value.code + ''), node.span, true); |
| } |
| else { |
| - var kind = ($notnull_bool(16/*TokenKind.INCR*/ == node.op.kind) ? 42/*TokenKind.ADD*/ : 43/*TokenKind.SUB*/); |
| + var kind = (16/*TokenKind.INCR*/ == node.op.kind ? 42/*TokenKind.ADD*/ : 43/*TokenKind.SUB*/); |
| var operand = new LiteralExpression(1, new TypeReference(node.span, world.numType), '1', node.span); |
| return this._visitAssign($assert_num(kind), node.self, (operand && operand.is$lang_Expression()), node, to$call$1(null)); |
| } |
| @@ -11971,8 +11982,8 @@ MethodGenerator.prototype.visitUnaryExpression = function(node) { |
| return EvaluatedValue.EvaluatedValue$factory((($0 = value.type) && $0.is$lang_Type()), newVal, ('' + newVal + ''), node.span); |
| } |
| else { |
| - var newVal = value.convertToNonNullBool(this, node); |
| - return new Value(world.boolType, ('!' + newVal.code + ''), node.span, true); |
| + var newVal = value.convertTo(this, world.nonNullBool, node, false); |
| + return new Value(newVal.type, ('!' + newVal.code + ''), node.span, true); |
| } |
| case 42/*TokenKind.ADD*/: |
| @@ -11982,10 +11993,10 @@ MethodGenerator.prototype.visitUnaryExpression = function(node) { |
| case 43/*TokenKind.SUB*/: |
| case 18/*TokenKind.BIT_NOT*/: |
| - if ($notnull_bool(node.op.kind == 18/*TokenKind.BIT_NOT*/)) { |
| + if (node.op.kind == 18/*TokenKind.BIT_NOT*/) { |
| return value.invoke$4(this, '\$bit_not', node, Arguments.get$EMPTY()); |
| } |
| - else if ($notnull_bool(node.op.kind == 43/*TokenKind.SUB*/)) { |
| + else if (node.op.kind == 43/*TokenKind.SUB*/) { |
| return value.invoke$4(this, '\$negate', node, Arguments.get$EMPTY()); |
| } |
| else { |
| @@ -12005,7 +12016,7 @@ MethodGenerator.prototype.visitPostfixExpression = function(node, isVoid) { |
| if ($notnull_bool(value.type.get$isNum())) { |
| return new Value(value.type, ('' + value.code + '' + node.op + ''), node.span, true); |
| } |
| - var kind = $notnull_bool((16/*TokenKind.INCR*/ == node.op.kind)) ? 42/*TokenKind.ADD*/ : 43/*TokenKind.SUB*/; |
| + var kind = (16/*TokenKind.INCR*/ == node.op.kind) ? 42/*TokenKind.ADD*/ : 43/*TokenKind.SUB*/; |
| var operand = new LiteralExpression(1, new TypeReference(node.span, world.numType), '1', node.span); |
| var tmpleft = null, left = null; |
| var ret = this._visitAssign($assert_num(kind), node.body, (operand && operand.is$lang_Expression()), node, (function (l) { |
| @@ -12031,13 +12042,13 @@ MethodGenerator.prototype.visitNewExpression = function(node) { |
| var $0; |
| var typeRef = node.type; |
| var constructorName = ''; |
| - if ($notnull_bool(node.name != null)) { |
| + if (node.name != null) { |
| constructorName = node.name.name; |
| } |
| if ($notnull_bool($eq(constructorName, '') && !(typeRef instanceof GenericTypeReference)) && typeRef.names != null) { |
| var names = ListFactory.ListFactory$from$factory(typeRef.names); |
| constructorName = names.removeLast().get$name(); |
| - if ($notnull_bool(names.length == 0)) names = null; |
| + if (names.length == 0) names = null; |
| typeRef = new NameTypeReference(typeRef.isFinal, typeRef.get$name(), names, typeRef.get$span()); |
| } |
| var type = this.method.resolveType(typeRef, true); |
| @@ -12055,13 +12066,13 @@ MethodGenerator.prototype.visitNewExpression = function(node) { |
| return this._makeMissingValue($assert_String(name)); |
| } |
| if ($notnull_bool(node.isConst)) { |
| - if ($notnull_bool(!$notnull_bool(m.get$isConst()))) { |
| + if (!$notnull_bool(m.get$isConst())) { |
| world.error('can\'t use const on a non-const constructor', node.span); |
| } |
| var $list = node.arguments; |
| for (var $i = 0;$i < $list.length; $i++) { |
| var arg = $list.$index($i); |
| - if ($notnull_bool(!$notnull_bool(this.visitValue((($0 = arg.get$value()) && $0.is$lang_Expression())).get$isConst()))) { |
| + if (!$notnull_bool(this.visitValue((($0 = arg.get$value()) && $0.is$lang_Expression())).get$isConst())) { |
| world.error('const constructor expects const arguments', arg.get$span()); |
| } |
| } |
| @@ -12077,7 +12088,7 @@ MethodGenerator.prototype.visitListExpression = function(node) { |
| var arg = this.visitValue((item && item.is$lang_Expression())); |
| argValues.add(arg); |
| if ($notnull_bool(node.isConst)) { |
| - if ($notnull_bool(!$notnull_bool(arg.get$isConst()))) { |
| + if (!$notnull_bool(arg.get$isConst())) { |
| world.error('const list can only contain const values', item.get$span()); |
| argsCode.add(arg.code); |
| } |
| @@ -12106,14 +12117,14 @@ MethodGenerator.prototype.visitMapExpression = function(node) { |
| var argValues = []; |
| var argsCode = []; |
| for (var i = 0; |
| - $notnull_bool(i < node.items.length); i += 2) { |
| + i < node.items.length; i += 2) { |
| var key = this.visitTypedValue((($0 = node.items.$index(i)) && $0.is$lang_Expression()), world.stringType); |
| var valueItem = node.items.$index(i + 1); |
| var value = this.visitValue((valueItem && valueItem.is$lang_Expression())); |
| argValues.add(key); |
| argValues.add(value); |
| if ($notnull_bool(node.isConst)) { |
| - if ($notnull_bool(!$notnull_bool(key.get$isConst()) || !$notnull_bool(value.get$isConst()))) { |
| + if (!$notnull_bool(key.get$isConst()) || !$notnull_bool(value.get$isConst())) { |
| world.error('const map can only contain const values', valueItem.get$span()); |
| argsCode.add(key.code); |
| argsCode.add(value.code); |
| @@ -12190,8 +12201,8 @@ MethodGenerator.prototype.visitNullExpression = function(node) { |
| MethodGenerator.prototype.visitLiteralExpression = function(node) { |
| var $0; |
| var type = node.type.type; |
| - $assert($ne(type, null), "type != null", "gen.dart", 2073, 12); |
| - if ($notnull_bool(!!(($0 = node.value) && $0.is$List))) { |
| + $assert($ne(type, null), "type != null", "gen.dart", 2075, 12); |
| + if (!!(($0 = node.value) && $0.is$List)) { |
| var items = []; |
| var $list = node.value; |
| for (var $i = node.value.iterator(); $i.hasNext(); ) { |
| @@ -12199,7 +12210,7 @@ MethodGenerator.prototype.visitLiteralExpression = function(node) { |
| var val = this.visitValue((item && item.is$lang_Expression())); |
| val.invoke$4(this, 'toString', item, Arguments.get$EMPTY()); |
| var code = val.code; |
| - if ($notnull_bool((item instanceof BinaryExpression) || (item instanceof ConditionalExpression))) { |
| + if ((item instanceof BinaryExpression) || (item instanceof ConditionalExpression)) { |
| code = ('(' + code + ')'); |
| } |
| items.add(code); |
| @@ -12208,7 +12219,7 @@ MethodGenerator.prototype.visitLiteralExpression = function(node) { |
| } |
| var text = node.text; |
| if ($notnull_bool(type.get$isString())) { |
| - if ($notnull_bool(text.startsWith('@'))) { |
| + if (text.startsWith('@')) { |
| text = MethodGenerator._escapeString(parseStringLiteral($assert_String(text))); |
| text = ('"' + text + '"'); |
| } |
| @@ -12218,7 +12229,7 @@ MethodGenerator.prototype.visitLiteralExpression = function(node) { |
| text = text.replaceAll('"', '\\"'); |
| text = ('"' + text + '"'); |
| } |
| - if ($notnull_bool(text !== node.text)) { |
| + if (text !== node.text) { |
| node.value = text; |
| node.text = $assert_String(text); |
| } |
| @@ -12239,13 +12250,13 @@ Arguments.prototype.is$Arguments = function(){return this;}; |
| Arguments.Arguments$bare$factory = function(arity) { |
| var values = []; |
| for (var i = 0; |
| - $notnull_bool(i < arity); i++) { |
| + i < arity; i++) { |
| values.add(new Value(world.varType, ('\$' + i + ''), null, false)); |
| } |
| return new Arguments(null, values); |
| } |
| Arguments.get$EMPTY = function() { |
| - if ($notnull_bool(Arguments._empty == null)) { |
| + if (Arguments._empty == null) { |
| Arguments._empty = new Arguments(null, []); |
| } |
| return Arguments._empty; |
| @@ -12267,8 +12278,8 @@ Arguments.prototype.getName = function(i) { |
| } |
| Arguments.prototype.getIndexOfName = function(name) { |
| for (var i = this.get$bareCount(); |
| - $notnull_bool(i < this.get$length()); i++) { |
| - if ($notnull_bool(this.getName(i) == name)) { |
| + i < this.get$length(); i++) { |
| + if (this.getName(i) == name) { |
| return i; |
| } |
| } |
| @@ -12277,15 +12288,15 @@ Arguments.prototype.getIndexOfName = function(name) { |
| Arguments.prototype.getValue = function(name) { |
| var $0; |
| var i = this.getIndexOfName(name); |
| - return (($0 = $notnull_bool(i >= 0) ? this.values.$index(i) : null) && $0.is$Value()); |
| + return (($0 = i >= 0 ? this.values.$index(i) : null) && $0.is$Value()); |
| } |
| Arguments.prototype.get$bareCount = function() { |
| - if ($notnull_bool(this._bareCount == null)) { |
| + if (this._bareCount == null) { |
| this._bareCount = this.get$length(); |
| - if ($notnull_bool(this.nodes != null)) { |
| + if (this.nodes != null) { |
| for (var i = 0; |
| - $notnull_bool(i < this.nodes.length); i++) { |
| - if ($notnull_bool(this.nodes.$index(i).label != null)) { |
| + i < this.nodes.length; i++) { |
| + if (this.nodes.$index(i).label != null) { |
| this._bareCount = i; |
| break; |
| } |
| @@ -12297,7 +12308,7 @@ Arguments.prototype.get$bareCount = function() { |
| Arguments.prototype.getCode = function() { |
| var argsCode = []; |
| for (var i = 0; |
| - $notnull_bool(i < this.get$length()); i++) { |
| + i < this.get$length(); i++) { |
| argsCode.add(this.values.$index(i).code); |
| } |
| Arguments.removeTrailingNulls((argsCode && argsCode.is$List$Value())); |
| @@ -12311,7 +12322,7 @@ Arguments.removeTrailingNulls = function(argsCode) { |
| Arguments.prototype.getNames = function() { |
| var names = []; |
| for (var i = this.get$bareCount(); |
| - $notnull_bool(i < this.get$length()); i++) { |
| + i < this.get$length(); i++) { |
| names.add(this.getName(i)); |
| } |
| return (names && names.is$List$String()); |
| @@ -12319,11 +12330,11 @@ Arguments.prototype.getNames = function() { |
| Arguments.prototype.toCallStubArgs = function() { |
| var result = []; |
| for (var i = 0; |
| - $notnull_bool(i < this.get$bareCount()); i++) { |
| + i < this.get$bareCount(); i++) { |
| result.add(new Value(world.varType, ('\$' + i + ''), null, false)); |
| } |
| for (var i = this.get$bareCount(); |
| - $notnull_bool(i < this.get$length()); i++) { |
| + i < this.get$length(); i++) { |
| var name = this.getName(i); |
| if ($notnull_bool(name == null)) name = ('\$' + i + ''); |
| result.add(new Value(world.varType, name, null, false)); |
| @@ -12361,7 +12372,7 @@ Library.prototype.get$isCoreImpl = function() { |
| return $eq(this, world.get$coreimpl()); |
| } |
| Library.prototype.get$jsname = function() { |
| - if ($notnull_bool(this._jsname == null)) { |
| + if (this._jsname == null) { |
| this._jsname = this.name.replaceAll('.', '_').replaceAll(':', '_').replaceAll(' ', '_'); |
| } |
| return this._jsname; |
| @@ -12370,10 +12381,10 @@ Library.prototype.get$span = function() { |
| return new SourceSpan(this.baseSource, 0, 0); |
| } |
| Library.prototype.makeFullPath = function(filename) { |
| - if ($notnull_bool(filename.startsWith('dart:'))) return filename; |
| - if ($notnull_bool(filename.startsWith('/'))) return filename; |
| - if ($notnull_bool(filename.startsWith('file:///'))) return filename; |
| - if ($notnull_bool(filename.startsWith('http://'))) return filename; |
| + if (filename.startsWith('dart:')) return filename; |
| + if (filename.startsWith('/')) return filename; |
| + if (filename.startsWith('file:///')) return filename; |
| + if (filename.startsWith('http://')) return filename; |
| return joinPaths(this.sourceDir, filename); |
| } |
| Library.prototype.addImport = function(fullname, prefix) { |
| @@ -12386,7 +12397,7 @@ Library.prototype.addNative = function(fullname) { |
| } |
| Library.prototype._findMembers = function(name) { |
| var $0; |
| - if ($notnull_bool(name.startsWith('_'))) { |
| + if (name.startsWith('_')) { |
| return (($0 = this._privateMembers.$index(name)) && $0.is$MemberSet()); |
| } |
| else { |
| @@ -12406,7 +12417,7 @@ Library.prototype._addMember = function(member) { |
| var $list = world.libraries.getValues(); |
| for (var $i = world.libraries.getValues().iterator(); $i.hasNext(); ) { |
| var lib = $i.next(); |
| - if ($notnull_bool(lib._privateMembers.containsKey(member.name))) { |
| + if (lib._privateMembers.containsKey(member.name)) { |
| member.set$jsname(('_' + this.get$jsname() + '' + member.name + '')); |
| break; |
| } |
| @@ -12432,7 +12443,7 @@ Library.prototype.getOrAddFunctionType = function(name, func, inType) { |
| } |
| Library.prototype.addType = function(name, definition, isClass) { |
| var $0; |
| - if ($notnull_bool(this.types.containsKey(name))) { |
| + if (this.types.containsKey(name)) { |
| var existingType = this.types.$index(name); |
| if ($notnull_bool(this.get$isCore() && existingType.get$definition() == null)) { |
| existingType.setDefinition((definition && definition.is$Definition())); |
| @@ -12448,12 +12459,12 @@ Library.prototype.addType = function(name, definition, isClass) { |
| } |
| Library.prototype.findType = function(type) { |
| var result = this.findTypeByName(type.name.name); |
| - if ($notnull_bool(result == null)) return null; |
| - if ($notnull_bool(type.names != null)) { |
| - if ($notnull_bool(type.names.length > 1)) { |
| + if (result == null) return null; |
| + if (type.names != null) { |
| + if (type.names.length > 1) { |
| return null; |
| } |
| - if ($notnull_bool(!$notnull_bool(result.get$isTop()))) { |
| + if (!$notnull_bool(result.get$isTop())) { |
| return null; |
| } |
| return result.get$library().findTypeByName($assert_String(type.names.$index(0).get$name())); |
| @@ -12466,10 +12477,10 @@ Library.prototype.findTypeByName = function(name) { |
| for (var $i = 0;$i < $list.length; $i++) { |
| var imported = $list.$index($i); |
| var newRet = null; |
| - if ($notnull_bool(imported.prefix == null)) { |
| + if (imported.prefix == null) { |
| newRet = imported.get$library().types.$index(name); |
| } |
| - else if ($notnull_bool(imported.prefix == name)) { |
| + else if (imported.prefix == name) { |
| newRet = imported.get$library().topType; |
| } |
| if ($notnull_bool($ne(newRet, null))) { |
| @@ -12501,7 +12512,7 @@ Library.prototype.lookup = function(name, span) { |
| var $list = this.imports; |
| for (var $i = 0;$i < $list.length; $i++) { |
| var imported = $list.$index($i); |
| - if ($notnull_bool(imported.prefix == null)) { |
| + if (imported.prefix == null) { |
| newRet = imported.get$library().topType.getMember(name); |
| if ($notnull_bool($ne(newRet, null))) { |
| if ($notnull_bool($ne(ret, null) && $ne(ret, newRet))) { |
| @@ -12516,14 +12527,14 @@ Library.prototype.lookup = function(name, span) { |
| return (ret && ret.is$Member()); |
| } |
| Library.prototype.resolve = function() { |
| - if ($notnull_bool(this.name == null)) { |
| + if (this.name == null) { |
| this.name = this.baseSource.filename; |
| var index = this.name.lastIndexOf('/', this.name.length); |
| - if ($notnull_bool(index >= 0)) { |
| + if (index >= 0) { |
| this.name = this.name.substring(index + 1); |
| } |
| index = this.name.indexOf('.', 0); |
| - if ($notnull_bool(index > 0)) { |
| + if (index > 0) { |
| this.name = this.name.substring(0, index); |
| } |
| } |
| @@ -12560,10 +12571,10 @@ _LibraryVisitor.prototype.addSourceFromName = function(name, span) { |
| world.error('library can not source itself', span); |
| return; |
| } |
| - else if ($notnull_bool(this.sources.some((function (s) { |
| + else if (this.sources.some((function (s) { |
| return s.filename == filename; |
| }) |
| - ))) { |
| + )) { |
| world.error(('file "' + filename + '" has already been sourced'), span); |
| return; |
| } |
| @@ -12572,10 +12583,10 @@ _LibraryVisitor.prototype.addSourceFromName = function(name, span) { |
| } |
| _LibraryVisitor.prototype.addSource = function(source) { |
| var $this = this; // closure support |
| - if ($notnull_bool(this.library.sources.some((function (s) { |
| + if (this.library.sources.some((function (s) { |
| return s.filename == source.filename; |
| }) |
| - ))) { |
| + )) { |
| world.error(('duplicate source file "' + source.filename + '"')); |
| return; |
| } |
| @@ -12596,7 +12607,7 @@ _LibraryVisitor.prototype.addSource = function(source) { |
| } |
| } |
| _LibraryVisitor.prototype.visitDirectiveDefinition = function(node) { |
| - if ($notnull_bool(!$notnull_bool(this.isTop))) { |
| + if (!$notnull_bool(this.isTop)) { |
| world.error('directives not allowed in sourced file', node.span); |
| return; |
| } |
| @@ -12605,12 +12616,12 @@ _LibraryVisitor.prototype.visitDirectiveDefinition = function(node) { |
| case "library": |
| name = this.getSingleStringArg(node); |
| - if ($notnull_bool(this.library.name == null)) { |
| + if (this.library.name == null) { |
| this.library.name = $assert_String(name); |
| if ($notnull_bool($eq(name, 'node') || $eq(name, 'dom'))) { |
| this.library.topType.isNativeType = true; |
| } |
| - if ($notnull_bool(this.seenImport || this.seenSource) || this.seenResource) { |
| + if ($notnull_bool($notnull_bool(this.seenImport || this.seenSource) || this.seenResource)) { |
| world.error('#library must be first directive in file', node.span); |
| } |
| } |
| @@ -12624,7 +12635,7 @@ _LibraryVisitor.prototype.visitDirectiveDefinition = function(node) { |
| this.seenImport = true; |
| name = this.getFirstStringArg(node); |
| var prefix = this.tryGetNamedStringArg(node, 'prefix'); |
| - if ($notnull_bool(node.arguments.length > 2 || $notnull_bool(node.arguments.length == 2 && prefix == null))) { |
| + if (node.arguments.length > 2 || $notnull_bool(node.arguments.length == 2 && prefix == null)) { |
| world.error('expected at most one "name" argument and one optional "prefix"' + (' but found ' + node.arguments.length + ''), node.span); |
| } |
| else if ($notnull_bool($ne(prefix, null) && prefix.indexOf('.', 0) >= 0)) { |
| @@ -12635,10 +12646,10 @@ _LibraryVisitor.prototype.visitDirectiveDefinition = function(node) { |
| } |
| if ($notnull_bool($eq(prefix, ''))) prefix = null; |
| var filename = this.library.makeFullPath($assert_String(name)); |
| - if ($notnull_bool(this.library.imports.some((function (li) { |
| + if (this.library.imports.some((function (li) { |
| return $eq(li.get$library().baseSource, filename); |
| }) |
| - ))) { |
| + )) { |
| world.error(('duplicate import of "' + name + '"'), node.span); |
| return; |
| } |
| @@ -12674,30 +12685,30 @@ _LibraryVisitor.prototype.visitDirectiveDefinition = function(node) { |
| } |
| } |
| _LibraryVisitor.prototype.getSingleStringArg = function(node) { |
| - if ($notnull_bool(node.arguments.length != 1)) { |
| + if (node.arguments.length != 1) { |
| world.error(('expected exactly one argument but found ' + node.arguments.length + ''), node.span); |
| } |
| return this.getFirstStringArg(node); |
| } |
| _LibraryVisitor.prototype.getFirstStringArg = function(node) { |
| - if ($notnull_bool(node.arguments.length < 1)) { |
| + if (node.arguments.length < 1) { |
| world.error(('expected at least one argument but found ' + node.arguments.length + ''), node.span); |
| } |
| var arg = node.arguments.$index(0); |
| - if ($notnull_bool(arg.label != null)) { |
| + if (arg.label != null) { |
| world.error('label not allowed for directive', node.span); |
| } |
| return this._parseStringArgument((arg && arg.is$ArgumentNode())); |
| } |
| _LibraryVisitor.prototype.tryGetNamedStringArg = function(node, argName) { |
| var args = node.arguments.filter((function (a) { |
| - return $notnull_bool(a.label != null && a.label.name == argName); |
| + return a.label != null && a.label.name == argName; |
| }) |
| ); |
| - if ($notnull_bool(args.length == 0)) { |
| + if (args.length == 0) { |
| return null; |
| } |
| - if ($notnull_bool(args.length > 1)) { |
| + if (args.length > 1) { |
| world.error(('expected at most one "' + argName + '" argument but found ') + node.arguments.length, node.span); |
| } |
| for (var $i = args.iterator(); $i.hasNext(); ) { |
| @@ -12707,7 +12718,7 @@ _LibraryVisitor.prototype.tryGetNamedStringArg = function(node, argName) { |
| } |
| _LibraryVisitor.prototype._parseStringArgument = function(arg) { |
| var expr = arg.value; |
| - if ($notnull_bool(!(expr instanceof LiteralExpression) || !$notnull_bool(expr.type.type.get$isString()))) { |
| + if (!(expr instanceof LiteralExpression) || !$notnull_bool(expr.type.type.get$isString())) { |
| world.error('expected string', expr.get$span()); |
| } |
| return parseStringLiteral($assert_String(expr.get$value())); |
| @@ -12747,7 +12758,7 @@ Parameter.prototype.get$value = function() { return this.value; }; |
| Parameter.prototype.set$value = function(value) { return this.value = value; }; |
| Parameter.prototype.resolve = function(method, inType) { |
| this.name = this.definition.name.name; |
| - if ($notnull_bool(this.name.startsWith('this.'))) { |
| + if (this.name.startsWith('this.')) { |
| this.name = this.name.substring(5); |
| this.isInitializer = true; |
| } |
| @@ -12755,8 +12766,8 @@ Parameter.prototype.resolve = function(method, inType) { |
| if ($notnull_bool(method.get$isStatic() && this.type.get$hasTypeParams())) { |
| world.error('using type parameter in static context', this.definition.span); |
| } |
| - if ($notnull_bool(this.definition.value != null)) { |
| - if ($notnull_bool((this.definition.value instanceof NullExpression) && this.definition.value.span.start == this.definition.span.start)) { |
| + if (this.definition.value != null) { |
| + if ((this.definition.value instanceof NullExpression) && this.definition.value.span.start == this.definition.span.start) { |
| return; |
| } |
| if ($notnull_bool(method.get$isAbstract())) { |
| @@ -12772,8 +12783,8 @@ Parameter.prototype.resolve = function(method, inType) { |
| } |
| Parameter.prototype.genValue = function(method, context) { |
| var $0; |
| - if ($notnull_bool(this.definition.value == null || this.value != null)) return; |
| - if ($notnull_bool(context == null)) { |
| + if (this.definition.value == null || this.value != null) return; |
| + if (context == null) { |
| context = new MethodGenerator(method, null); |
| } |
| this.value = (($0 = this.definition.value.visit(context)) && $0.is$Value()); |
| @@ -12787,7 +12798,7 @@ Parameter.prototype.copyWithNewType = function(newType) { |
| return (ret && ret.is$Parameter()); |
| } |
| Parameter.prototype.get$isOptional = function() { |
| - return $notnull_bool(this.definition != null && this.definition.value != null); |
| + return this.definition != null && this.definition.value != null; |
| } |
| // ********** Code for Member ************** |
| function Member(name, declaringType) { |
| @@ -12800,7 +12811,7 @@ Member.prototype.is$Member = function(){return this;}; |
| Member.prototype.is$Named = function(){return this;}; |
| Member.prototype.get$name = function() { return this.name; }; |
| Member.prototype.get$jsname = function() { |
| - return $notnull_bool(this._jsname == null) ? this.name : this._jsname; |
| + return this._jsname == null ? this.name : this._jsname; |
| } |
| Member.prototype.set$jsname = function(name) { |
| return this._jsname = name; |
| @@ -12856,6 +12867,13 @@ Member.prototype.get$initDelegate = function() { |
| Member.prototype.set$initDelegate = function(ctor) { |
| world.internalError('cannot have initializers', this.get$span()); |
| } |
| +Member.prototype.get$inferredResult = function() { |
| + var t = this.get$returnType(); |
| + if ($notnull_bool(t.get$isBool() && ($notnull_bool(this.get$library().get$isCore() || this.get$library().get$isCoreImpl())))) { |
| + return world.nonNullBool; |
| + } |
| + return (t && t.is$lang_Type()); |
| +} |
| Member.prototype.get$definition = function() { |
| return null; |
| } |
| @@ -12881,9 +12899,9 @@ Member.prototype.override = function(other) { |
| return true; |
| } |
| Member.prototype.get$generatedFactoryName = function() { |
| - $assert(this.get$isFactory(), "this.isFactory", "member.dart", 178, 12); |
| + $assert(this.get$isFactory(), "this.isFactory", "member.dart", 192, 12); |
| var prefix = ('' + this.declaringType.get$jsname() + '.' + this.get$constructorName() + '\$'); |
| - if ($notnull_bool(this.name == '')) { |
| + if (this.name == '') { |
| return ('' + prefix + 'factory'); |
| } |
| else { |
| @@ -12980,7 +12998,7 @@ FieldMember.prototype.set$isStatic = function(value) { return this.isStatic = va |
| FieldMember.prototype.get$isNative = function() { return this.isNative; }; |
| FieldMember.prototype.set$isNative = function(value) { return this.isNative = value; }; |
| FieldMember.prototype.override = function(other) { |
| - if ($notnull_bool(!$notnull_bool(Member.prototype.override.call(this, other)))) return false; |
| + if (!$notnull_bool(Member.prototype.override.call(this, other))) return false; |
| if ($notnull_bool(other.get$isProperty())) { |
| return true; |
| } |
| @@ -13003,7 +13021,7 @@ FieldMember.prototype.providePropertySyntax = function() { |
| } |
| FieldMember.prototype.get$span = function() { |
| var $0; |
| - return (($0 = $notnull_bool(this.definition == null) ? null : this.definition.span) && $0.is$SourceSpan()); |
| + return (($0 = this.definition == null ? null : this.definition.span) && $0.is$SourceSpan()); |
| } |
| FieldMember.prototype.get$returnType = function() { |
| return this.type; |
| @@ -13020,7 +13038,7 @@ FieldMember.prototype.get$isField = function() { |
| FieldMember.prototype.resolve = function(inType) { |
| this.isStatic = this.declaringType.get$isTop(); |
| this.isFinal = false; |
| - if ($notnull_bool(this.definition.modifiers != null)) { |
| + if (this.definition.modifiers != null) { |
| var $list = this.definition.modifiers; |
| for (var $i = 0;$i < $list.length; $i++) { |
| var mod = $list.$index($i); |
| @@ -13052,8 +13070,8 @@ FieldMember.prototype.resolve = function(inType) { |
| } |
| FieldMember.prototype.computeValue = function() { |
| var $0; |
| - if ($notnull_bool(this.value == null)) return null; |
| - if ($notnull_bool(this._computedValue == null)) { |
| + if (this.value == null) return null; |
| + if (this._computedValue == null) { |
| if ($notnull_bool(this._computing)) { |
| world.error('circular reference', this.value.span); |
| return null; |
| @@ -13063,7 +13081,7 @@ FieldMember.prototype.computeValue = function() { |
| finalMethod.isStatic = true; |
| var finalGen = new MethodGenerator(finalMethod, null); |
| this._computedValue = (($0 = this.value.visit(finalGen)) && $0.is$Value()); |
| - if ($notnull_bool(!$notnull_bool(this._computedValue.get$isConst()))) { |
| + if (!$notnull_bool(this._computedValue.get$isConst())) { |
| if ($notnull_bool(this.isStatic)) { |
| world.error('non constant static field must be initialized in functions', this.value.span); |
| } |
| @@ -13080,7 +13098,7 @@ FieldMember.prototype.computeValue = function() { |
| } |
| FieldMember.prototype._get = function(context, node, target, isDynamic) { |
| var $0; |
| - if ($notnull_bool(!$notnull_bool(isDynamic))) { |
| + if (!$notnull_bool(isDynamic)) { |
| this.declaringType.markUsed(); |
| } |
| if ($notnull_bool(this.isStatic)) { |
| @@ -13096,8 +13114,8 @@ FieldMember.prototype._get = function(context, node, target, isDynamic) { |
| } |
| } |
| else if ($notnull_bool(target.get$isConst() && this.isFinal)) { |
| - var constTarget = $notnull_bool((target instanceof GlobalValue)) ? target.get$dynamic().exp : target; |
| - if ($notnull_bool((constTarget instanceof ConstObjectValue))) { |
| + var constTarget = (target instanceof GlobalValue) ? target.get$dynamic().exp : target; |
| + if ((constTarget instanceof ConstObjectValue)) { |
| return (($0 = constTarget.fields.$index(this.name)) && $0.is$Value()); |
| } |
| else if ($notnull_bool($eq(constTarget.type, world.stringType) && this.name == 'length')) { |
| @@ -13129,7 +13147,7 @@ $inherits(PropertyMember, Member); |
| PropertyMember.prototype.is$PropertyMember = function(){return this;}; |
| PropertyMember.prototype.get$span = function() { |
| var $0; |
| - return (($0 = $notnull_bool(this.getter != null) ? this.getter.get$span() : null) && $0.is$SourceSpan()); |
| + return (($0 = this.getter != null ? this.getter.get$span() : null) && $0.is$SourceSpan()); |
| } |
| PropertyMember.prototype.get$canGet = function() { |
| return this.getter != null; |
| @@ -13150,16 +13168,16 @@ PropertyMember.prototype.providePropertySyntax = function() { |
| } |
| PropertyMember.prototype.get$isStatic = function() { |
| - return $notnull_bool(this.getter == null) ? this.setter.isStatic : this.getter.isStatic; |
| + return this.getter == null ? this.setter.isStatic : this.getter.isStatic; |
| } |
| PropertyMember.prototype.get$isProperty = function() { |
| return true; |
| } |
| PropertyMember.prototype.get$returnType = function() { |
| - return $notnull_bool(this.getter == null) ? this.setter.returnType : this.getter.returnType; |
| + return this.getter == null ? this.setter.returnType : this.getter.returnType; |
| } |
| PropertyMember.prototype.override = function(other) { |
| - if ($notnull_bool(!$notnull_bool(Member.prototype.override.call(this, other)))) return false; |
| + if (!$notnull_bool(Member.prototype.override.call(this, other))) return false; |
| if ($notnull_bool(other.get$isProperty() || other.get$isField())) { |
| if ($notnull_bool(other.get$isProperty())) this.addFromParent(other); |
| else this._overriddenField = other; |
| @@ -13171,8 +13189,8 @@ PropertyMember.prototype.override = function(other) { |
| } |
| } |
| PropertyMember.prototype._get = function(context, node, target, isDynamic) { |
| - if ($notnull_bool(this.getter == null)) { |
| - if ($notnull_bool(this._overriddenField != null)) { |
| + if (this.getter == null) { |
| + if (this._overriddenField != null) { |
| return this._overriddenField._get(context, node, target, isDynamic); |
| } |
| return target.invokeNoSuchMethod(context, ('get:' + this.name + ''), node); |
| @@ -13180,8 +13198,8 @@ PropertyMember.prototype._get = function(context, node, target, isDynamic) { |
| return this.getter.invoke(context, node, target, Arguments.get$EMPTY(), false); |
| } |
| PropertyMember.prototype._set = function(context, node, target, value, isDynamic) { |
| - if ($notnull_bool(this.setter == null)) { |
| - if ($notnull_bool(this._overriddenField != null)) { |
| + if (this.setter == null) { |
| + if (this._overriddenField != null) { |
| return this._overriddenField._set(context, node, target, value, isDynamic); |
| } |
| return target.invokeNoSuchMethod(context, ('set:' + this.name + ''), node, new Arguments(null, [value])); |
| @@ -13191,19 +13209,19 @@ PropertyMember.prototype._set = function(context, node, target, value, isDynamic |
| PropertyMember.prototype.addFromParent = function(parentMember) { |
| var $0; |
| var parent; |
| - if ($notnull_bool((parentMember instanceof ConcreteMember))) { |
| + if ((parentMember instanceof ConcreteMember)) { |
| var c = (parentMember && parentMember.is$ConcreteMember()); |
| parent = (($0 = c.baseMember) && $0.is$PropertyMember()); |
| } |
| else { |
| parent = (parentMember && parentMember.is$PropertyMember()); |
| } |
| - if ($notnull_bool(this.getter == null)) this.getter = parent.getter; |
| - if ($notnull_bool(this.setter == null)) this.setter = parent.setter; |
| + if (this.getter == null) this.getter = parent.getter; |
| + if (this.setter == null) this.setter = parent.setter; |
| } |
| PropertyMember.prototype.resolve = function(inType) { |
| - if ($notnull_bool(this.getter != null)) this.getter.resolve(inType); |
| - if ($notnull_bool(this.setter != null)) this.setter.resolve(inType); |
| + if (this.getter != null) this.getter.resolve(inType); |
| + if (this.setter != null) this.setter.resolve(inType); |
| this.get$library()._addMember(this); |
| } |
| PropertyMember.prototype._get$3 = function($0, $1, $2) { |
| @@ -13316,7 +13334,7 @@ ConcreteMember.prototype.override = function(other) { |
| } |
| ConcreteMember.prototype._get = function(context, node, target, isDynamic) { |
| var ret = this.baseMember._get(context, node, target, isDynamic); |
| - return new Value(this.returnType, ret.code, node.span, true); |
| + return new Value(this.get$inferredResult(), ret.code, node.span, true); |
| } |
| ConcreteMember.prototype._set = function(context, node, target, value, isDynamic) { |
| var ret = this.baseMember._set(context, node, target, value, isDynamic); |
| @@ -13329,7 +13347,7 @@ ConcreteMember.prototype.invoke = function(context, node, target, args, isDynami |
| code = code.replaceFirst(this.declaringType.get$genericType().get$jsname(), this.declaringType.get$jsname()); |
| } |
| this.declaringType.genMethod(this); |
| - return new Value(this.returnType, code, node.span, true); |
| + return new Value(this.get$inferredResult(), code, node.span, true); |
| } |
| ConcreteMember.prototype._get$3 = function($0, $1, $2) { |
| return this._get(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), false); |
| @@ -13392,31 +13410,31 @@ MethodMember.prototype.get$canSet = function() { |
| } |
| MethodMember.prototype.get$span = function() { |
| var $0; |
| - return (($0 = $notnull_bool(this.definition == null) ? null : this.definition.span) && $0.is$SourceSpan()); |
| + return (($0 = this.definition == null ? null : this.definition.span) && $0.is$SourceSpan()); |
| } |
| MethodMember.prototype.get$constructorName = function() { |
| var $0; |
| var returnType = (($0 = this.definition.returnType) && $0.is$NameTypeReference()); |
| - if ($notnull_bool(returnType == null)) return ''; |
| - if ($notnull_bool(returnType.names != null)) { |
| + if (returnType == null) return ''; |
| + if (returnType.names != null) { |
| return $assert_String(returnType.names.$index(0).get$name()); |
| } |
| - else if ($notnull_bool(returnType.name != null)) { |
| + else if (returnType.name != null) { |
| return returnType.name.name; |
| } |
| world.internalError('no valid constructor name', this.definition.span); |
| } |
| MethodMember.prototype.get$functionType = function() { |
| - if ($notnull_bool(this._functionType == null)) { |
| + if (this._functionType == null) { |
| this._functionType = this.get$library().getOrAddFunctionType(this.name, this.definition, this.declaringType); |
| - if ($notnull_bool(this.parameters == null)) { |
| + if (this.parameters == null) { |
| this.resolve(this.declaringType); |
| } |
| } |
| return this._functionType; |
| } |
| MethodMember.prototype.override = function(other) { |
| - if ($notnull_bool(!$notnull_bool(Member.prototype.override.call(this, other)))) return false; |
| + if (!$notnull_bool(Member.prototype.override.call(this, other))) return false; |
| if ($notnull_bool(other.get$isMethod())) { |
| return true; |
| } |
| @@ -13427,15 +13445,15 @@ MethodMember.prototype.override = function(other) { |
| } |
| MethodMember.prototype.canInvoke = function(context, args) { |
| var bareCount = args.get$bareCount(); |
| - if ($notnull_bool(bareCount > this.parameters.length)) return false; |
| - if ($notnull_bool(bareCount == this.parameters.length)) { |
| - if ($notnull_bool(bareCount != args.get$length())) return false; |
| + if (bareCount > this.parameters.length) return false; |
| + if (bareCount == this.parameters.length) { |
| + if (bareCount != args.get$length()) return false; |
| } |
| else { |
| - if ($notnull_bool(!$notnull_bool(this.parameters.$index(bareCount).get$isOptional()))) return false; |
| + if (!$notnull_bool(this.parameters.$index(bareCount).get$isOptional())) return false; |
| for (var i = bareCount; |
| - $notnull_bool(i < args.get$length()); i++) { |
| - if ($notnull_bool(this.indexOfParameter(args.getName(i)) < 0)) { |
| + i < args.get$length(); i++) { |
| + if (this.indexOfParameter(args.getName(i)) < 0) { |
| return false; |
| } |
| } |
| @@ -13444,7 +13462,7 @@ MethodMember.prototype.canInvoke = function(context, args) { |
| } |
| MethodMember.prototype.indexOfParameter = function(name) { |
| for (var i = 0; |
| - $notnull_bool(i < this.parameters.length); i++) { |
| + i < this.parameters.length; i++) { |
| var p = this.parameters.$index(i); |
| if ($notnull_bool(p.get$isOptional() && $eq(p.get$name(), name))) { |
| return i; |
| @@ -13478,13 +13496,13 @@ MethodMember.prototype._get = function(context, node, target, isDynamic) { |
| return new Value(this.get$functionType(), ('' + target.code + '.get\$' + this.get$jsname() + '()'), node.span, true); |
| } |
| MethodMember.prototype.namesInOrder = function(args) { |
| - if ($notnull_bool(!$notnull_bool(args.get$hasNames()))) return true; |
| + if (!$notnull_bool(args.get$hasNames())) return true; |
| var lastParameter = null; |
| for (var i = args.get$bareCount(); |
| - $notnull_bool(i < this.parameters.length); i++) { |
| + i < this.parameters.length; i++) { |
| var p = args.getIndexOfName($assert_String(this.parameters.$index(i).get$name())); |
| if ($notnull_bool(p >= 0 && args.values.$index(p).needsTemp)) { |
| - if ($notnull_bool(lastParameter != null && lastParameter > $assert_num(p))) { |
| + if (lastParameter != null && lastParameter > $assert_num(p)) { |
| return false; |
| } |
| lastParameter = $assert_num(p); |
| @@ -13496,16 +13514,16 @@ MethodMember.prototype.needsArgumentConversion = function(args) { |
| var $0; |
| var bareCount = args.get$bareCount(); |
| for (var i = 0; |
| - $notnull_bool(i < bareCount); i++) { |
| + i < bareCount; i++) { |
| var arg = args.values.$index(i); |
| if ($notnull_bool(arg.needsConversion((($0 = this.parameters.$index(i).type) && $0.is$lang_Type())))) { |
| return false; |
| } |
| } |
| - if ($notnull_bool(bareCount < this.parameters.length)) { |
| + if (bareCount < this.parameters.length) { |
| this.genParameterValues(); |
| for (var i = bareCount; |
| - $notnull_bool(i < this.parameters.length); i++) { |
| + i < this.parameters.length; i++) { |
| var arg = args.getValue($assert_String(this.parameters.$index(i).get$name())); |
| if ($notnull_bool($ne(arg, null) && arg.needsConversion((($0 = this.parameters.$index(i).type) && $0.is$lang_Type())))) { |
| return false; |
| @@ -13535,7 +13553,7 @@ MethodMember.prototype.genParameterValues = function() { |
| } |
| MethodMember.prototype.invoke = function(context, node, target, args, isDynamic) { |
| var $0; |
| - if ($notnull_bool(this.parameters == null)) { |
| + if (this.parameters == null) { |
| world.info(('surprised to need to resolve: ' + this.declaringType.name + '.' + this.name + '')); |
| this.resolve(this.declaringType); |
| } |
| @@ -13543,18 +13561,18 @@ MethodMember.prototype.invoke = function(context, node, target, args, isDynamic) |
| if ($notnull_bool(this.isStatic || this.isFactory)) { |
| this.declaringType.markUsed(); |
| } |
| - if ($notnull_bool(!$notnull_bool(this.namesInOrder(args)))) { |
| + if (!$notnull_bool(this.namesInOrder(args))) { |
| return context.findMembers(this.name).invokeOnVar(context, node, target, args); |
| } |
| var argsCode = []; |
| - if ($notnull_bool(target != null && ($notnull_bool(this.get$isConstructor() || target.isSuper)))) { |
| + if (target != null && ($notnull_bool(this.get$isConstructor() || target.isSuper))) { |
| argsCode.add('this'); |
| } |
| var bareCount = args.get$bareCount(); |
| for (var i = 0; |
| - $notnull_bool(i < bareCount); i++) { |
| + i < bareCount; i++) { |
| var arg = args.values.$index(i); |
| - if ($notnull_bool(i >= this.parameters.length)) { |
| + if (i >= this.parameters.length) { |
| var msg = MethodMember._argCountMsg(args.get$length(), this.parameters.length, false); |
| return this._argError(context, node, target, args, $assert_String(msg)); |
| } |
| @@ -13566,11 +13584,11 @@ MethodMember.prototype.invoke = function(context, node, target, args, isDynamic) |
| argsCode.add(arg.code); |
| } |
| } |
| - if ($notnull_bool(bareCount < this.parameters.length)) { |
| + if (bareCount < this.parameters.length) { |
| this.genParameterValues(); |
| var namedArgsUsed = 0; |
| for (var i = bareCount; |
| - $notnull_bool(i < this.parameters.length); i++) { |
| + i < this.parameters.length; i++) { |
| var arg = args.getValue($assert_String(this.parameters.$index(i).get$name())); |
| if ($notnull_bool(arg == null)) { |
| arg = this.parameters.$index(i).get$value(); |
| @@ -13587,20 +13605,20 @@ MethodMember.prototype.invoke = function(context, node, target, args, isDynamic) |
| argsCode.add($notnull_bool(this.isConst && arg.get$isConst()) ? arg.get$canonicalCode() : arg.code); |
| } |
| } |
| - if ($notnull_bool(namedArgsUsed < args.get$nameCount())) { |
| + if (namedArgsUsed < args.get$nameCount()) { |
| var seen = new HashSetImplementation$String(); |
| for (var i = bareCount; |
| - $notnull_bool(i < args.get$length()); i++) { |
| + i < args.get$length(); i++) { |
| var name = args.getName(i); |
| - if ($notnull_bool(seen.contains(name))) { |
| + if (seen.contains(name)) { |
| return this._argError(context, node, target, args, ('duplicate argument "' + name + '"')); |
| } |
| seen.add(name); |
| var p = this.indexOfParameter($assert_String(name)); |
| - if ($notnull_bool(p < 0)) { |
| + if (p < 0) { |
| return this._argError(context, node, target, args, ('method does not have optional parameter "' + name + '"')); |
| } |
| - else if ($notnull_bool(p < bareCount)) { |
| + else if (p < bareCount) { |
| return this._argError(context, node, target, args, ('argument "' + name + '" passed as positional and named')); |
| } |
| } |
| @@ -13613,50 +13631,50 @@ MethodMember.prototype.invoke = function(context, node, target, args, isDynamic) |
| return this._invokeConstructor(context, node, target, args, argsString); |
| } |
| if ($notnull_bool(target != null && target.isSuper)) { |
| - return new Value(this.returnType, ('' + this.declaringType.get$jsname() + '.prototype.' + this.get$jsname() + '.call(' + argsString + ')'), node.span, true); |
| + return new Value(this.get$inferredResult(), ('' + this.declaringType.get$jsname() + '.prototype.' + this.get$jsname() + '.call(' + argsString + ')'), node.span, true); |
| } |
| - if ($notnull_bool(this.name.startsWith('\$'))) { |
| - return this._invokeBuiltin(context, node, target, args, argsCode); |
| + if (this.name.startsWith('\$')) { |
| + return this._invokeBuiltin(context, node, target, args, argsCode, isDynamic); |
| } |
| if ($notnull_bool(this.isFactory)) { |
| - return new Value(this.returnType, ('' + this.get$generatedFactoryName() + '(' + argsString + ')'), node.span, true); |
| + return new Value(this.get$inferredResult(), ('' + this.get$generatedFactoryName() + '(' + argsString + ')'), node.span, true); |
| } |
| if ($notnull_bool(this.isStatic)) { |
| if ($notnull_bool(this.declaringType.get$isTop())) { |
| - return new Value(this.returnType, ('' + this.get$jsname() + '(' + argsString + ')'), $notnull_bool(node != null) ? node.span : node, true); |
| + return new Value(this.get$inferredResult(), ('' + this.get$jsname() + '(' + argsString + ')'), node != null ? node.span : node, true); |
| } |
| - return new Value(this.returnType, ('' + this.declaringType.get$jsname() + '.' + this.get$jsname() + '(' + argsString + ')'), node.span, true); |
| + return new Value(this.get$inferredResult(), ('' + this.declaringType.get$jsname() + '.' + this.get$jsname() + '(' + argsString + ')'), node.span, true); |
| } |
| var code = ('' + target.code + '.' + this.get$jsname() + '(' + argsString + ')'); |
| if ($notnull_bool(target.get$isConst())) { |
| - if ($notnull_bool((target instanceof GlobalValue))) { |
| + if ((target instanceof GlobalValue)) { |
| target = target.get$dynamic().exp; |
| } |
| - if ($notnull_bool(this.name == 'get\$length')) { |
| - if ($notnull_bool((target instanceof ConstListValue) || (target instanceof ConstMapValue))) { |
| + if (this.name == 'get\$length') { |
| + if ((target instanceof ConstListValue) || (target instanceof ConstMapValue)) { |
| code = ('' + target.get$dynamic().values.length + ''); |
| } |
| } |
| - else if ($notnull_bool(this.name == 'isEmpty')) { |
| - if ($notnull_bool((target instanceof ConstListValue) || (target instanceof ConstMapValue))) { |
| + else if (this.name == 'isEmpty') { |
| + if ((target instanceof ConstListValue) || (target instanceof ConstMapValue)) { |
| code = ('' + target.get$dynamic().values.isEmpty() + ''); |
| } |
| } |
| } |
| - if ($notnull_bool(this.name == 'get\$typeName' && $eq(this.declaringType.get$library(), world.get$dom()))) { |
| + if (this.name == 'get\$typeName' && $eq(this.declaringType.get$library(), world.get$dom())) { |
| world.gen.corejs.useTypeNameOf = true; |
| } |
| - return new Value(this.returnType, code, node.span, true); |
| + return new Value(this.get$inferredResult(), code, node.span, true); |
| } |
| MethodMember.prototype._invokeConstructor = function(context, node, target, args, argsString) { |
| this.declaringType.markUsed(); |
| - if ($notnull_bool(target != null)) { |
| - var code = $notnull_bool((this.get$constructorName() != '')) ? ('' + this.declaringType.get$jsname() + '.' + this.get$constructorName() + '\$ctor.call(' + argsString + ')') : ('' + this.declaringType.get$jsname() + '.call(' + argsString + ')'); |
| + if (target != null) { |
| + var code = (this.get$constructorName() != '') ? ('' + this.declaringType.get$jsname() + '.' + this.get$constructorName() + '\$ctor.call(' + argsString + ')') : ('' + this.declaringType.get$jsname() + '.call(' + argsString + ')'); |
| return new Value(this.declaringType, code, node.span, true); |
| } |
| else { |
| - var code = $notnull_bool((this.get$constructorName() != '')) ? ('new ' + this.declaringType.get$jsname() + '.' + this.get$constructorName() + '\$ctor(' + argsString + ')') : ('new ' + this.declaringType.get$jsname() + '(' + argsString + ')'); |
| - if ($notnull_bool(this.isConst && (node instanceof lang_NewExpression)) && node.get$dynamic().get$isConst()) { |
| + var code = (this.get$constructorName() != '') ? ('new ' + this.declaringType.get$jsname() + '.' + this.get$constructorName() + '\$ctor(' + argsString + ')') : ('new ' + this.declaringType.get$jsname() + '(' + argsString + ')'); |
| + if ($notnull_bool($notnull_bool(this.isConst && (node instanceof lang_NewExpression)) && node.get$dynamic().get$isConst())) { |
| return this._invokeConstConstructor(node, $assert_String(code), target, args); |
| } |
| else { |
| @@ -13668,11 +13686,11 @@ MethodMember.prototype._invokeConstConstructor = function(node, code, target, ar |
| var $0; |
| var fields = new HashMapImplementation$String$EvaluatedValue(); |
| for (var i = 0; |
| - $notnull_bool(i < this.parameters.length); i++) { |
| + i < this.parameters.length; i++) { |
| var param = this.parameters.$index(i); |
| if ($notnull_bool(param.isInitializer)) { |
| var value = null; |
| - if ($notnull_bool(i < args.get$length())) { |
| + if (i < args.get$length()) { |
| value = args.values.$index(i); |
| } |
| else { |
| @@ -13684,13 +13702,13 @@ MethodMember.prototype._invokeConstConstructor = function(node, code, target, ar |
| fields.$setindex(param.get$name(), value); |
| } |
| } |
| - if ($notnull_bool(this.definition.initializers != null)) { |
| + if (this.definition.initializers != null) { |
| this.generator._pushBlock(false); |
| for (var j = 0; |
| - $notnull_bool(j < this.definition.formals.length); j++) { |
| + j < this.definition.formals.length; j++) { |
| var name = this.definition.formals.$index(j).get$name().get$name(); |
| var value = null; |
| - if ($notnull_bool(j < args.get$length())) { |
| + if (j < args.get$length()) { |
| value = args.values.$index(j); |
| } |
| else { |
| @@ -13704,14 +13722,14 @@ MethodMember.prototype._invokeConstConstructor = function(node, code, target, ar |
| var $list = this.definition.initializers; |
| for (var $i = 0;$i < $list.length; $i++) { |
| var init = $list.$index($i); |
| - if ($notnull_bool((init instanceof CallExpression))) { |
| + if ((init instanceof CallExpression)) { |
| var delegateArgs = this.generator._makeArgs((($0 = init.get$arguments()) && $0.is$List$ArgumentNode())); |
| var value = this.initDelegate.invoke(this.generator, node, target, delegateArgs, false); |
| - if ($notnull_bool((init.target instanceof ThisExpression))) { |
| + if ((init.target instanceof ThisExpression)) { |
| return (value && value.is$Value()); |
| } |
| else { |
| - if ($notnull_bool((value instanceof GlobalValue))) { |
| + if ((value instanceof GlobalValue)) { |
| value = value.exp; |
| } |
| var $list0 = value.fields.getKeys(); |
| @@ -13734,27 +13752,27 @@ MethodMember.prototype._invokeConstConstructor = function(node, code, target, ar |
| var $list = this.declaringType.get$members().getValues(); |
| for (var $i = this.declaringType.get$members().getValues().iterator(); $i.hasNext(); ) { |
| var f = $i.next(); |
| - if ($notnull_bool((f instanceof FieldMember) && !$notnull_bool(f.get$isStatic())) && $ne(f.get$value(), null) && !$notnull_bool(fields.containsKey(f.get$name()))) { |
| + if ($notnull_bool((f instanceof FieldMember) && !$notnull_bool(f.get$isStatic()) && $ne(f.get$value(), null)) && !fields.containsKey(f.get$name())) { |
| fields.$setindex(f.get$name(), f.computeValue()); |
| } |
| } |
| return world.gen.globalForConst(ConstObjectValue.ConstObjectValue$factory(this.declaringType, fields, code, node.span), args.values); |
| } |
| -MethodMember.prototype._invokeBuiltin = function(context, node, target, args, argsCode) { |
| +MethodMember.prototype._invokeBuiltin = function(context, node, target, args, argsCode, isDynamic) { |
| var allConst = $notnull_bool(target.get$isConst() && args.values.every((function (arg) { |
| return arg.get$isConst(); |
| }) |
| )); |
| if ($notnull_bool(this.declaringType.get$isNum())) { |
| - if ($notnull_bool(!$notnull_bool(allConst))) { |
| + if (!$notnull_bool(allConst)) { |
| var code; |
| - if ($notnull_bool(this.name == '\$negate')) { |
| + if (this.name == '\$negate') { |
| code = ('-' + target.code + ''); |
| } |
| - else if ($notnull_bool(this.name == '\$bit_not')) { |
| + else if (this.name == '\$bit_not') { |
| code = ('~' + target.code + ''); |
| } |
| - else if ($notnull_bool(this.name == '\$truncdiv' || this.name == '\$mod')) { |
| + else if (this.name == '\$truncdiv' || this.name == '\$mod') { |
| world.gen.corejs.useOperator(this.name); |
| code = ('' + this.name + '(' + target.code + ', ' + argsCode.$index(0) + ')'); |
| } |
| @@ -13762,14 +13780,14 @@ MethodMember.prototype._invokeBuiltin = function(context, node, target, args, ar |
| var op = TokenKind.rawOperatorFromMethod(this.name); |
| code = ('' + target.code + ' ' + op + ' ' + argsCode.$index(0) + ''); |
| } |
| - return new Value(this.returnType, code, node.span, true); |
| + return new Value(this.get$inferredResult(), code, node.span, true); |
| } |
| else { |
| var value; |
| var val0, val1, ival0, ival1; |
| val0 = $assert_num(target.get$dynamic().get$actualValue()); |
| ival0 = val0.toInt(); |
| - if ($notnull_bool(args.values.length > 0)) { |
| + if (args.values.length > 0) { |
| val1 = $assert_num(args.values.$index(0).get$dynamic().get$actualValue()); |
| ival1 = val1.toInt(); |
| } |
| @@ -13875,14 +13893,14 @@ MethodMember.prototype._invokeBuiltin = function(context, node, target, args, ar |
| break; |
| } |
| - return EvaluatedValue.EvaluatedValue$factory(this.returnType, value, ("" + value + ""), node.span); |
| + return EvaluatedValue.EvaluatedValue$factory(this.get$inferredResult(), value, ("" + value + ""), node.span); |
| } |
| } |
| else if ($notnull_bool(this.declaringType.get$isString())) { |
| - if ($notnull_bool(this.name == '\$index')) { |
| + if (this.name == '\$index') { |
| return new Value(this.declaringType, ('' + target.code + '[' + argsCode.$index(0) + ']'), node.span, true); |
| } |
| - else if ($notnull_bool(this.name == '\$add')) { |
| + else if (this.name == '\$add') { |
| if ($notnull_bool(allConst)) { |
| var val0 = target.get$dynamic().get$actualValue(); |
| val0 = val0.substring(1, val0.length - 1); |
| @@ -13899,49 +13917,52 @@ MethodMember.prototype._invokeBuiltin = function(context, node, target, args, ar |
| } |
| } |
| else if ($notnull_bool(this.declaringType.get$isNativeType())) { |
| - if ($notnull_bool(this.name == '\$index')) { |
| + if (this.name == '\$index') { |
| return new Value(this.returnType, ('' + target.code + '[' + argsCode.$index(0) + ']'), node.span, true); |
| } |
| - else if ($notnull_bool(this.name == '\$setindex')) { |
| + else if (this.name == '\$setindex') { |
| return new Value(this.returnType, ('' + target.code + '[' + argsCode.$index(0) + '] = ' + argsCode.$index(1) + ''), node.span, true); |
| } |
| } |
| - if ($notnull_bool(this.name == '\$eq' || this.name == '\$ne')) { |
| - var op = $notnull_bool(this.name == '\$eq') ? '==' : '!='; |
| + if (this.name == '\$eq' || this.name == '\$ne') { |
| + var op = this.name == '\$eq' ? '==' : '!='; |
| + if (this.name == '\$ne') { |
| + target.invoke(context, '\$eq', node, args, isDynamic); |
| + } |
| if ($notnull_bool(allConst)) { |
| var val0 = target.get$dynamic().get$actualValue(); |
| var val1 = args.values.$index(0).get$dynamic().get$actualValue(); |
| - var newVal = $notnull_bool(this.name == '\$eq') ? $eq(val0, val1) : $ne(val0, val1); |
| - return EvaluatedValue.EvaluatedValue$factory(world.boolType, newVal, ("" + newVal + ""), node.span); |
| + var newVal = this.name == '\$eq' ? $eq(val0, val1) : $ne(val0, val1); |
| + return EvaluatedValue.EvaluatedValue$factory(world.nonNullBool, newVal, ("" + newVal + ""), node.span); |
| } |
| if ($notnull_bool($eq(argsCode.$index(0), 'null'))) { |
| - return new Value(this.returnType, ('' + target.code + ' ' + op + ' null'), node.span, true); |
| + return new Value(this.get$inferredResult(), ('' + target.code + ' ' + op + ' null'), node.span, true); |
| } |
| else if ($notnull_bool(target.type.get$isNum() || target.type.get$isString())) { |
| - return new Value(this.returnType, ('' + target.code + ' ' + op + ' ' + argsCode.$index(0) + ''), node.span, true); |
| + return new Value(this.get$inferredResult(), ('' + target.code + ' ' + op + ' ' + argsCode.$index(0) + ''), node.span, true); |
| } |
| world.gen.corejs.useOperator(this.name); |
| - return new Value(this.returnType, ('' + this.name + '(' + target.code + ', ' + argsCode.$index(0) + ')'), node.span, true); |
| + return new Value(this.get$inferredResult(), ('' + this.name + '(' + target.code + ', ' + argsCode.$index(0) + ')'), node.span, true); |
| } |
| - if ($notnull_bool(this.name == '\$call')) { |
| + if (this.name == '\$call') { |
| this.declaringType.markUsed(); |
| - return new Value(this.returnType, ('' + target.code + '(' + Strings.join((argsCode && argsCode.is$List$String()), ", ") + ')'), node.span, true); |
| + return new Value(this.get$inferredResult(), ('' + target.code + '(' + Strings.join((argsCode && argsCode.is$List$String()), ", ") + ')'), node.span, true); |
| } |
| - if ($notnull_bool(this.name == '\$index')) { |
| + if (this.name == '\$index') { |
| world.gen.corejs.useIndex = true; |
| } |
| - else if ($notnull_bool(this.name == '\$setindex')) { |
| + else if (this.name == '\$setindex') { |
| world.gen.corejs.useSetIndex = true; |
| } |
| var argsString = Strings.join((argsCode && argsCode.is$List$String()), ', '); |
| - return new Value(this.returnType, ('' + target.code + '.' + this.get$jsname() + '(' + argsString + ')'), node.span, true); |
| + return new Value(this.get$inferredResult(), ('' + target.code + '.' + this.get$jsname() + '(' + argsString + ')'), node.span, true); |
| } |
| MethodMember.prototype.resolve = function(inType) { |
| this.isStatic = inType.get$isTop(); |
| this.isConst = false; |
| this.isFactory = false; |
| this.isAbstract = !$notnull_bool(this.declaringType.get$isClass()); |
| - if ($notnull_bool(this.definition.modifiers != null)) { |
| + if (this.definition.modifiers != null) { |
| var $list = this.definition.modifiers; |
| for (var $i = 0;$i < $list.length; $i++) { |
| var mod = $list.$index($i); |
| @@ -13982,11 +14003,11 @@ MethodMember.prototype.resolve = function(inType) { |
| if ($notnull_bool(this.isFactory)) { |
| this.isStatic = true; |
| } |
| - if ($notnull_bool(this.name.startsWith('\$') && !$notnull_bool(this.name.startsWith('\$call'))) && this.isStatic) { |
| + if ($notnull_bool(this.name.startsWith('\$') && !this.name.startsWith('\$call') && this.isStatic)) { |
| world.error(('operator method may not be static "' + this.name + '"'), this.get$span()); |
| } |
| if ($notnull_bool(this.isAbstract)) { |
| - if ($notnull_bool(this.definition.body != null && !(this.declaringType.get$definition() instanceof FunctionTypeDefinition))) { |
| + if (this.definition.body != null && !(this.declaringType.get$definition() instanceof FunctionTypeDefinition)) { |
| world.error('abstract method can not have a body', this.get$span()); |
| } |
| if ($notnull_bool(this.isStatic && !(this.declaringType.get$definition() instanceof FunctionTypeDefinition))) { |
| @@ -13994,7 +14015,7 @@ MethodMember.prototype.resolve = function(inType) { |
| } |
| } |
| else { |
| - if ($notnull_bool(this.definition.body == null && !$notnull_bool(this.get$isConstructor()))) { |
| + if (this.definition.body == null && !$notnull_bool(this.get$isConstructor())) { |
| world.error('method needs a body', this.get$span()); |
| } |
| } |
| @@ -14015,7 +14036,7 @@ MethodMember.prototype.resolve = function(inType) { |
| param.resolve(this, inType); |
| this.parameters.add(param); |
| } |
| - if ($notnull_bool(!$notnull_bool(this.isLambda))) { |
| + if (!$notnull_bool(this.isLambda)) { |
| this.get$library()._addMember(this); |
| } |
| } |
| @@ -14064,13 +14085,13 @@ MemberSet.prototype.canInvoke = function(context, args) { |
| ); |
| } |
| MemberSet.prototype._makeError = function(node, target, action) { |
| - if ($notnull_bool(!$notnull_bool(target.type.get$isVar()))) { |
| + if (!$notnull_bool(target.type.get$isVar())) { |
| world.warning(('could not find applicable ' + action + ' for "' + this.name + '"'), node.span); |
| } |
| return new Value(world.varType, ('' + target.code + '.' + this.jsname + '() /*no applicable ' + action + '*/'), node.span, true); |
| } |
| MemberSet.prototype.get$treatAsField = function() { |
| - if ($notnull_bool(this._treatAsField == null)) { |
| + if (this._treatAsField == null) { |
| this._treatAsField = true; |
| var $list = this.members; |
| for (var $i = 0;$i < $list.length; $i++) { |
| @@ -14097,14 +14118,14 @@ MemberSet.prototype.get$treatAsField = function() { |
| return this._treatAsField; |
| } |
| MemberSet.prototype._get = function(context, node, target, isDynamic) { |
| - if ($notnull_bool(this.members.length == 1)) { |
| + if (this.members.length == 1) { |
| return this.members.$index(0)._get(context, node, target, isDynamic); |
| } |
| var targets = this.members.filter((function (m) { |
| return m.get$canGet(); |
| }) |
| ); |
| - if ($notnull_bool(targets.length == 1)) { |
| + if (targets.length == 1) { |
| return targets.$index(0)._get(context, node, target, isDynamic); |
| } |
| var returnValue = null; |
| @@ -14113,10 +14134,10 @@ MemberSet.prototype._get = function(context, node, target, isDynamic) { |
| var value = member._get(context, node, target, true); |
| returnValue = this._tryUnion(returnValue, value, node); |
| } |
| - if ($notnull_bool(returnValue == null)) { |
| + if (returnValue == null) { |
| return this._makeError(node, target, 'getter'); |
| } |
| - if ($notnull_bool(returnValue.code == null)) { |
| + if (returnValue.code == null) { |
| if ($notnull_bool(this.get$treatAsField())) { |
| return new Value(returnValue.type, ('' + target.code + '.' + this.jsname + ''), node.span, true); |
| } |
| @@ -14127,14 +14148,14 @@ MemberSet.prototype._get = function(context, node, target, isDynamic) { |
| return returnValue; |
| } |
| MemberSet.prototype._set = function(context, node, target, value, isDynamic) { |
| - if ($notnull_bool(this.members.length == 1)) { |
| + if (this.members.length == 1) { |
| return this.members.$index(0)._set(context, node, target, value, isDynamic); |
| } |
| var targets = this.members.filter((function (m) { |
| return m.get$canSet(); |
| }) |
| ); |
| - if ($notnull_bool(targets.length == 1)) { |
| + if (targets.length == 1) { |
| return targets.$index(0)._set(context, node, target, value, isDynamic); |
| } |
| var returnValue = null; |
| @@ -14143,10 +14164,10 @@ MemberSet.prototype._set = function(context, node, target, value, isDynamic) { |
| var res = member._set(context, node, target, value, true); |
| returnValue = this._tryUnion(returnValue, res, node); |
| } |
| - if ($notnull_bool(returnValue == null)) { |
| + if (returnValue == null) { |
| return this._makeError(node, target, 'setter'); |
| } |
| - if ($notnull_bool(returnValue.code == null)) { |
| + if (returnValue.code == null) { |
| if ($notnull_bool(this.get$treatAsField())) { |
| return new Value(returnValue.type, ('' + target.code + '.' + this.jsname + ' = ' + value.code + ''), node.span, true); |
| } |
| @@ -14157,14 +14178,14 @@ MemberSet.prototype._set = function(context, node, target, value, isDynamic) { |
| return returnValue; |
| } |
| MemberSet.prototype.invoke = function(context, node, target, args, isDynamic) { |
| - if ($notnull_bool(this.members.length == 1)) { |
| + if (this.members.length == 1) { |
| return this.members.$index(0).invoke(context, node, target, args, isDynamic); |
| } |
| var targets = this.members.filter((function (m) { |
| return m.canInvoke(context, args); |
| }) |
| ); |
| - if ($notnull_bool(targets.length == 1)) { |
| + if (targets.length == 1) { |
| return targets.$index(0).invoke(context, node, target, args, isDynamic); |
| } |
| var returnValue = null; |
| @@ -14173,11 +14194,11 @@ MemberSet.prototype.invoke = function(context, node, target, args, isDynamic) { |
| var res = member.invoke(context, node, target, args, true); |
| returnValue = this._tryUnion(returnValue, res, node); |
| } |
| - if ($notnull_bool(returnValue == null)) { |
| + if (returnValue == null) { |
| return this._makeError(node, target, 'method'); |
| } |
| - if ($notnull_bool(returnValue.code == null)) { |
| - if ($notnull_bool(this.name.startsWith('\$'))) { |
| + if (returnValue.code == null) { |
| + if (this.name.startsWith('\$')) { |
| return target.invokeSpecial(this.name, args, returnValue.type); |
| } |
| else { |
| @@ -14190,9 +14211,9 @@ MemberSet.prototype.invokeOnVar = function(context, node, target, args) { |
| return this.getVarMember(context, node, args).invoke(context, node, target, args); |
| } |
| MemberSet.prototype._tryUnion = function(x, y, node) { |
| - if ($notnull_bool(x == null)) return y; |
| + if (x == null) return y; |
| var type = lang_Type.union(x.type, y.type); |
| - if ($notnull_bool(x.code == y.code)) { |
| + if (x.code == y.code) { |
| if ($notnull_bool($eq(type, x.type))) { |
| return x; |
| } |
| @@ -14212,7 +14233,7 @@ MemberSet.prototype._tryUnion = function(x, y, node) { |
| } |
| } |
| MemberSet.prototype.getVarMember = function(context, node, args) { |
| - if ($notnull_bool(world.objectType.varStubs == null)) { |
| + if (world.objectType.varStubs == null) { |
| world.objectType.varStubs = $map([]); |
| } |
| var stubName = _getCallStubName(this.name, args); |
| @@ -14288,7 +14309,7 @@ lang_Token.prototype.toString = function() { |
| var kindText = TokenKind.kindToString(this.kind); |
| var actualText = this.get$text(); |
| if ($notnull_bool($ne(kindText, actualText))) { |
| - if ($notnull_bool(actualText.length > 10)) { |
| + if (actualText.length > 10) { |
| actualText = actualText.substring(0, 8) + '...'; |
| } |
| return ('' + kindText + '(' + actualText + ')'); |
| @@ -14311,12 +14332,12 @@ SourceFile.prototype.get$text = function() { |
| return this._text; |
| } |
| SourceFile.prototype.get$lineStarts = function() { |
| - if ($notnull_bool(this._lineStarts == null)) { |
| + if (this._lineStarts == null) { |
| var starts = [0]; |
| var index = 0; |
| - while ($notnull_bool(index < this.get$text().length)) { |
| + while (index < this.get$text().length) { |
| index = this.get$text().indexOf('\n', index) + 1; |
| - if ($notnull_bool(index <= 0)) break; |
| + if (index <= 0) break; |
| starts.add(index); |
| } |
| starts.add(this.get$text().length + 1); |
| @@ -14327,8 +14348,8 @@ SourceFile.prototype.get$lineStarts = function() { |
| SourceFile.prototype.getLine = function(position) { |
| var starts = this.get$lineStarts(); |
| for (var i = 0; |
| - $notnull_bool(i < starts.length); i++) { |
| - if ($notnull_bool(starts.$index(i) > position)) return i - 1; |
| + i < starts.length; i++) { |
| + if (starts.$index(i) > position) return i - 1; |
| } |
| world.internalError('bad position'); |
| } |
| @@ -14342,7 +14363,7 @@ SourceFile.prototype.getLocationMessage = function(message, start, end, includeT |
| if ($notnull_bool(includeText)) { |
| buf.add('\n'); |
| var textLine; |
| - if ($notnull_bool((line + 2) < this._lineStarts.length)) { |
| + if ((line + 2) < this._lineStarts.length) { |
| textLine = this.get$text().substring(this._lineStarts.$index(line), this._lineStarts.$index(line + 1)); |
| } |
| else { |
| @@ -14350,18 +14371,18 @@ SourceFile.prototype.getLocationMessage = function(message, start, end, includeT |
| } |
| buf.add(textLine); |
| var i = 0; |
| - for (; $notnull_bool(i < $assert_num(column)); i++) { |
| + for (; i < $assert_num(column); i++) { |
| buf.add(' '); |
| } |
| var toColumn = Math.min($assert_num(column + (end - start)), textLine.length); |
| - for (; $notnull_bool(i < toColumn); i++) { |
| + for (; i < toColumn; i++) { |
| buf.add('^'); |
| } |
| } |
| return $assert_String(buf.toString()); |
| } |
| SourceFile.prototype.compareTo = function(other) { |
| - if ($notnull_bool(this.orderInLibrary != null && other.orderInLibrary != null)) { |
| + if (this.orderInLibrary != null && other.orderInLibrary != null) { |
| return this.orderInLibrary - other.orderInLibrary; |
| } |
| else { |
| @@ -14388,9 +14409,9 @@ SourceSpan.prototype.get$locationText = function() { |
| return ('' + this.file.filename + ':' + (line + 1) + ':' + (column + 1) + ''); |
| } |
| SourceSpan.prototype.compareTo = function(other) { |
| - if ($notnull_bool($eq(this.file, other.file))) { |
| + if ($eq(this.file, other.file)) { |
| var d = this.start - other.start; |
| - return $notnull_bool(d == 0) ? (this.end - other.end) : d; |
| + return d == 0 ? (this.end - other.end) : d; |
| } |
| return this.file.compareTo(other.file); |
| } |
| @@ -14408,7 +14429,7 @@ InterpStack.prototype.pop = function() { |
| } |
| InterpStack.push = function(stack, quote, isMultiline) { |
| var newStack = new InterpStack(stack, quote, isMultiline); |
| - if ($notnull_bool(stack != null)) newStack.previous = stack; |
| + if (stack != null) newStack.previous = stack; |
| return (newStack && newStack.is$InterpStack()); |
| } |
| // ********** Code for TokenizerBase ************** |
| @@ -14421,7 +14442,7 @@ function TokenizerBase(_source, _skipWhitespace, _index) { |
| } |
| $inherits(TokenizerBase, TokenizerHelpers); |
| TokenizerBase.prototype._nextChar = function() { |
| - if ($notnull_bool(this._lang_index < this._text.length)) { |
| + if (this._lang_index < this._text.length) { |
| return this._text.charCodeAt(this._lang_index++); |
| } |
| else { |
| @@ -14429,7 +14450,7 @@ TokenizerBase.prototype._nextChar = function() { |
| } |
| } |
| TokenizerBase.prototype._peekChar = function() { |
| - if ($notnull_bool(this._lang_index < this._text.length)) { |
| + if (this._lang_index < this._text.length) { |
| return this._text.charCodeAt(this._lang_index); |
| } |
| else { |
| @@ -14437,8 +14458,8 @@ TokenizerBase.prototype._peekChar = function() { |
| } |
| } |
| TokenizerBase.prototype._maybeEatChar = function(ch) { |
| - if ($notnull_bool(this._lang_index < this._text.length)) { |
| - if ($notnull_bool(this._text.charCodeAt(this._lang_index) == ch)) { |
| + if (this._lang_index < this._text.length) { |
| + if (this._text.charCodeAt(this._lang_index) == ch) { |
| this._lang_index++; |
| return true; |
| } |
| @@ -14457,8 +14478,8 @@ TokenizerBase.prototype._errorToken = function() { |
| return this._finishToken(65/*TokenKind.ERROR*/); |
| } |
| TokenizerBase.prototype.finishWhitespace = function() { |
| - while ($notnull_bool(this._lang_index < this._text.length)) { |
| - if ($notnull_bool(!$notnull_bool(TokenizerHelpers.isWhitespace(this._text.charCodeAt(this._lang_index++))))) { |
| + while (this._lang_index < this._text.length) { |
| + if (!$notnull_bool(TokenizerHelpers.isWhitespace(this._text.charCodeAt(this._lang_index++)))) { |
| this._lang_index--; |
| if ($notnull_bool(this._skipWhitespace)) { |
| return this.next(); |
| @@ -14471,17 +14492,17 @@ TokenizerBase.prototype.finishWhitespace = function() { |
| return this._finishToken(1/*TokenKind.END_OF_FILE*/); |
| } |
| TokenizerBase.prototype.finishHashBang = function() { |
| - while ($notnull_bool(true)) { |
| + while (true) { |
| var ch = this._nextChar(); |
| - if ($notnull_bool(ch == 0 || ch == 10) || ch == 13) { |
| + if (ch == 0 || ch == 10 || ch == 13) { |
| return this._finishToken(13/*TokenKind.HASHBANG*/); |
| } |
| } |
| } |
| TokenizerBase.prototype.finishSingleLineComment = function() { |
| - while ($notnull_bool(true)) { |
| + while (true) { |
| var ch = this._nextChar(); |
| - if ($notnull_bool(ch == 0 || ch == 10) || ch == 13) { |
| + if (ch == 0 || ch == 10 || ch == 13) { |
| if ($notnull_bool(this._skipWhitespace)) { |
| return this.next(); |
| } |
| @@ -14492,12 +14513,12 @@ TokenizerBase.prototype.finishSingleLineComment = function() { |
| } |
| } |
| TokenizerBase.prototype.finishMultiLineComment = function() { |
| - while ($notnull_bool(true)) { |
| + while (true) { |
| var ch = this._nextChar(); |
| - if ($notnull_bool(ch == 0)) { |
| + if (ch == 0) { |
| return this._finishToken(67/*TokenKind.INCOMPLETE_COMMENT*/); |
| } |
| - else if ($notnull_bool(ch == 42)) { |
| + else if (ch == 42) { |
| if ($notnull_bool(this._maybeEatChar(47))) { |
| if ($notnull_bool(this._skipWhitespace)) { |
| return this.next(); |
| @@ -14511,7 +14532,7 @@ TokenizerBase.prototype.finishMultiLineComment = function() { |
| return this._errorToken(); |
| } |
| TokenizerBase.prototype.eatDigits = function() { |
| - while ($notnull_bool(this._lang_index < this._text.length)) { |
| + while (this._lang_index < this._text.length) { |
| if ($notnull_bool(TokenizerHelpers.isDigit(this._text.charCodeAt(this._lang_index)))) { |
| this._lang_index++; |
| } |
| @@ -14521,7 +14542,7 @@ TokenizerBase.prototype.eatDigits = function() { |
| } |
| } |
| TokenizerBase.prototype.eatHexDigits = function() { |
| - while ($notnull_bool(this._lang_index < this._text.length)) { |
| + while (this._lang_index < this._text.length) { |
| if ($notnull_bool(TokenizerHelpers.isHexDigit(this._text.charCodeAt(this._lang_index)))) { |
| this._lang_index++; |
| } |
| @@ -14543,7 +14564,7 @@ TokenizerBase.prototype.finishHex = function() { |
| } |
| TokenizerBase.prototype.finishNumber = function() { |
| this.eatDigits(); |
| - if ($notnull_bool(this._peekChar() == 46)) { |
| + if (this._peekChar() == 46) { |
| this._nextChar(); |
| if ($notnull_bool(TokenizerHelpers.isDigit(this._peekChar()))) { |
| this.eatDigits(); |
| @@ -14569,25 +14590,25 @@ TokenizerBase.prototype.finishNumberExtra = function(kind) { |
| return this._finishToken(kind); |
| } |
| TokenizerBase.prototype.finishMultilineString = function(quote) { |
| - while ($notnull_bool(true)) { |
| + while (true) { |
| var ch = this._nextChar(); |
| - if ($notnull_bool(ch == 0)) { |
| - var kind = $notnull_bool(quote == 34) ? 68/*TokenKind.INCOMPLETE_MULTILINE_STRING_DQ*/ : 69/*TokenKind.INCOMPLETE_MULTILINE_STRING_SQ*/; |
| + if (ch == 0) { |
| + var kind = quote == 34 ? 68/*TokenKind.INCOMPLETE_MULTILINE_STRING_DQ*/ : 69/*TokenKind.INCOMPLETE_MULTILINE_STRING_SQ*/; |
| return this._finishToken(kind); |
| } |
| - else if ($notnull_bool(ch == quote)) { |
| + else if (ch == quote) { |
| if ($notnull_bool(this._maybeEatChar(quote))) { |
| if ($notnull_bool(this._maybeEatChar(quote))) { |
| return this._finishToken(58/*TokenKind.STRING*/); |
| } |
| } |
| } |
| - else if ($notnull_bool(ch == 36)) { |
| + else if (ch == 36) { |
| this._interpStack = InterpStack.push(this._interpStack, quote, true); |
| return this._finishToken(66/*TokenKind.INCOMPLETE_STRING*/); |
| } |
| - else if ($notnull_bool(ch == 92)) { |
| - if ($notnull_bool(!$notnull_bool(this.eatEscapeSequence()))) { |
| + else if (ch == 92) { |
| + if (!$notnull_bool(this.eatEscapeSequence())) { |
| return this._errorToken(); |
| } |
| } |
| @@ -14595,8 +14616,8 @@ TokenizerBase.prototype.finishMultilineString = function(quote) { |
| } |
| TokenizerBase.prototype._finishOpenBrace = function() { |
| var $0; |
| - if ($notnull_bool(this._interpStack != null)) { |
| - if ($notnull_bool(this._interpStack.depth == -1)) { |
| + if (this._interpStack != null) { |
| + if (this._interpStack.depth == -1) { |
| this._interpStack.depth = 1; |
| } |
| else { |
| @@ -14608,7 +14629,7 @@ TokenizerBase.prototype._finishOpenBrace = function() { |
| } |
| TokenizerBase.prototype._finishCloseBrace = function() { |
| var $0; |
| - if ($notnull_bool(this._interpStack != null)) { |
| + if (this._interpStack != null) { |
| ($0 = this._interpStack).depth = $0.depth - 1; |
| $assert(this._interpStack.depth >= 0, "_interpStack.depth >= 0", "tokenizer.dart", 271, 14); |
| } |
| @@ -14634,43 +14655,43 @@ TokenizerBase.prototype.finishRawString = function(quote) { |
| return this._finishToken(58/*TokenKind.STRING*/); |
| } |
| } |
| - while ($notnull_bool(true)) { |
| + while (true) { |
| var ch = this._nextChar(); |
| - if ($notnull_bool(ch == quote)) { |
| + if (ch == quote) { |
| return this._finishToken(58/*TokenKind.STRING*/); |
| } |
| - else if ($notnull_bool(ch == 0)) { |
| + else if (ch == 0) { |
| return this._finishToken(66/*TokenKind.INCOMPLETE_STRING*/); |
| } |
| } |
| } |
| TokenizerBase.prototype.finishMultilineRawString = function(quote) { |
| - while ($notnull_bool(true)) { |
| + while (true) { |
| var ch = this._nextChar(); |
| - if ($notnull_bool(ch == 0)) { |
| - var kind = $notnull_bool(quote == 34) ? 68/*TokenKind.INCOMPLETE_MULTILINE_STRING_DQ*/ : 69/*TokenKind.INCOMPLETE_MULTILINE_STRING_SQ*/; |
| + if (ch == 0) { |
| + var kind = quote == 34 ? 68/*TokenKind.INCOMPLETE_MULTILINE_STRING_DQ*/ : 69/*TokenKind.INCOMPLETE_MULTILINE_STRING_SQ*/; |
| return this._finishToken(kind); |
| } |
| - else if ($notnull_bool(ch == quote && this._maybeEatChar(quote)) && this._maybeEatChar(quote)) { |
| + else if ($notnull_bool($notnull_bool(ch == quote && this._maybeEatChar(quote)) && this._maybeEatChar(quote))) { |
| return this._finishToken(58/*TokenKind.STRING*/); |
| } |
| } |
| } |
| TokenizerBase.prototype.finishStringBody = function(quote) { |
| - while ($notnull_bool(true)) { |
| + while (true) { |
| var ch = this._nextChar(); |
| - if ($notnull_bool(ch == quote)) { |
| + if (ch == quote) { |
| return this._finishToken(58/*TokenKind.STRING*/); |
| } |
| - else if ($notnull_bool(ch == 36)) { |
| + else if (ch == 36) { |
| this._interpStack = InterpStack.push(this._interpStack, quote, false); |
| return this._finishToken(66/*TokenKind.INCOMPLETE_STRING*/); |
| } |
| - else if ($notnull_bool(ch == 0)) { |
| + else if (ch == 0) { |
| return this._finishToken(66/*TokenKind.INCOMPLETE_STRING*/); |
| } |
| - else if ($notnull_bool(ch == 92)) { |
| - if ($notnull_bool(!$notnull_bool(this.eatEscapeSequence()))) { |
| + else if (ch == 92) { |
| + if (!$notnull_bool(this.eatEscapeSequence())) { |
| return this._errorToken(); |
| } |
| } |
| @@ -14689,7 +14710,7 @@ TokenizerBase.prototype.eatEscapeSequence = function() { |
| var start = this._lang_index; |
| this.eatHexDigits(); |
| var chars = this._lang_index - start; |
| - if ($notnull_bool(chars > 0 && chars <= 6) && this._maybeEatChar(125)) { |
| + if ($notnull_bool(chars > 0 && chars <= 6 && this._maybeEatChar(125))) { |
| hex = this._text.substring(start, start + chars); |
| break; |
| } |
| @@ -14698,7 +14719,7 @@ TokenizerBase.prototype.eatEscapeSequence = function() { |
| } |
| } |
| else { |
| - if ($notnull_bool(this.maybeEatHexDigit() && this.maybeEatHexDigit()) && this.maybeEatHexDigit() && this.maybeEatHexDigit()) { |
| + if ($notnull_bool($notnull_bool($notnull_bool(this.maybeEatHexDigit() && this.maybeEatHexDigit()) && this.maybeEatHexDigit()) && this.maybeEatHexDigit())) { |
| hex = this._text.substring(this._lang_index - 4, this._lang_index); |
| break; |
| } |
| @@ -14713,7 +14734,7 @@ TokenizerBase.prototype.eatEscapeSequence = function() { |
| } |
| var n = lang_Parser.parseHex(hex); |
| - return $notnull_bool(n < 0xD800 || $notnull_bool(n > 0xDFFF && n <= 0x10FFFF)); |
| + return n < 0xD800 || n > 0xDFFF && n <= 0x10FFFF; |
| } |
| TokenizerBase.prototype.finishDot = function() { |
| if ($notnull_bool(TokenizerHelpers.isDigit(this._peekChar()))) { |
| @@ -14725,17 +14746,17 @@ TokenizerBase.prototype.finishDot = function() { |
| } |
| } |
| TokenizerBase.prototype.finishIdentifier = function() { |
| - while ($notnull_bool(this._lang_index < this._text.length)) { |
| - if ($notnull_bool(!$notnull_bool(TokenizerHelpers.isIdentifierPart(this._text.charCodeAt(this._lang_index++))))) { |
| + while (this._lang_index < this._text.length) { |
| + if (!$notnull_bool(TokenizerHelpers.isIdentifierPart(this._text.charCodeAt(this._lang_index++)))) { |
| this._lang_index--; |
| break; |
| } |
| } |
| var kind = this.getIdentifierKind(); |
| - if ($notnull_bool(this._interpStack != null && this._interpStack.depth == -1)) { |
| + if (this._interpStack != null && this._interpStack.depth == -1) { |
| this._interpStack.depth = 0; |
| } |
| - if ($notnull_bool(kind == 70/*TokenKind.IDENTIFIER*/)) { |
| + if (kind == 70/*TokenKind.IDENTIFIER*/) { |
| return this._finishToken(70/*TokenKind.IDENTIFIER*/); |
| } |
| else { |
| @@ -14750,7 +14771,7 @@ function Tokenizer(source, skipWhitespace, index) { |
| $inherits(Tokenizer, TokenizerBase); |
| Tokenizer.prototype.next = function() { |
| this._startIndex = this._lang_index; |
| - if ($notnull_bool(this._interpStack != null && this._interpStack.depth == 0)) { |
| + if (this._interpStack != null && this._interpStack.depth == 0) { |
| var istack = this._interpStack; |
| this._interpStack = this._interpStack.pop(); |
| if ($notnull_bool(istack.isMultiline)) { |
| @@ -15087,17 +15108,17 @@ Tokenizer.prototype.getIdentifierKind = function() { |
| switch (this._lang_index - i0) { |
| case 2: |
| - if ($notnull_bool(this._text.charCodeAt(i0) == 100)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 111)) return 94/*TokenKind.DO*/; |
| + if (this._text.charCodeAt(i0) == 100) { |
| + if (this._text.charCodeAt(i0 + 1) == 111) return 94/*TokenKind.DO*/; |
| } |
| - else if ($notnull_bool(this._text.charCodeAt(i0) == 105)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 102)) { |
| + else if (this._text.charCodeAt(i0) == 105) { |
| + if (this._text.charCodeAt(i0 + 1) == 102) { |
| return 100/*TokenKind.IF*/; |
| } |
| - else if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 110)) { |
| + else if (this._text.charCodeAt(i0 + 1) == 110) { |
| return 101/*TokenKind.IN*/; |
| } |
| - else if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 115)) { |
| + else if (this._text.charCodeAt(i0 + 1) == 115) { |
| return 102/*TokenKind.IS*/; |
| } |
| } |
| @@ -15105,162 +15126,162 @@ Tokenizer.prototype.getIdentifierKind = function() { |
| case 3: |
| - if ($notnull_bool(this._text.charCodeAt(i0) == 102)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 111 && this._text.charCodeAt(i0 + 2) == 114)) return 99/*TokenKind.FOR*/; |
| + if (this._text.charCodeAt(i0) == 102) { |
| + if (this._text.charCodeAt(i0 + 1) == 111 && this._text.charCodeAt(i0 + 2) == 114) return 99/*TokenKind.FOR*/; |
| } |
| - else if ($notnull_bool(this._text.charCodeAt(i0) == 103)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 101 && this._text.charCodeAt(i0 + 2) == 116)) return 76/*TokenKind.GET*/; |
| + else if (this._text.charCodeAt(i0) == 103) { |
| + if (this._text.charCodeAt(i0 + 1) == 101 && this._text.charCodeAt(i0 + 2) == 116) return 76/*TokenKind.GET*/; |
| } |
| - else if ($notnull_bool(this._text.charCodeAt(i0) == 110)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 101 && this._text.charCodeAt(i0 + 2) == 119)) return 103/*TokenKind.NEW*/; |
| + else if (this._text.charCodeAt(i0) == 110) { |
| + if (this._text.charCodeAt(i0 + 1) == 101 && this._text.charCodeAt(i0 + 2) == 119) return 103/*TokenKind.NEW*/; |
| } |
| - else if ($notnull_bool(this._text.charCodeAt(i0) == 115)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 101 && this._text.charCodeAt(i0 + 2) == 116)) return 84/*TokenKind.SET*/; |
| + else if (this._text.charCodeAt(i0) == 115) { |
| + if (this._text.charCodeAt(i0 + 1) == 101 && this._text.charCodeAt(i0 + 2) == 116) return 84/*TokenKind.SET*/; |
| } |
| - else if ($notnull_bool(this._text.charCodeAt(i0) == 116)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 114 && this._text.charCodeAt(i0 + 2) == 121)) return 111/*TokenKind.TRY*/; |
| + else if (this._text.charCodeAt(i0) == 116) { |
| + if (this._text.charCodeAt(i0 + 1) == 114 && this._text.charCodeAt(i0 + 2) == 121) return 111/*TokenKind.TRY*/; |
| } |
| - else if ($notnull_bool(this._text.charCodeAt(i0) == 118)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 97 && this._text.charCodeAt(i0 + 2) == 114)) return 112/*TokenKind.VAR*/; |
| + else if (this._text.charCodeAt(i0) == 118) { |
| + if (this._text.charCodeAt(i0 + 1) == 97 && this._text.charCodeAt(i0 + 2) == 114) return 112/*TokenKind.VAR*/; |
| } |
| return 70/*TokenKind.IDENTIFIER*/; |
| case 4: |
| - if ($notnull_bool(this._text.charCodeAt(i0) == 99)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 97 && this._text.charCodeAt(i0 + 2) == 115) && this._text.charCodeAt(i0 + 3) == 101) return 89/*TokenKind.CASE*/; |
| + if (this._text.charCodeAt(i0) == 99) { |
| + if (this._text.charCodeAt(i0 + 1) == 97 && this._text.charCodeAt(i0 + 2) == 115 && this._text.charCodeAt(i0 + 3) == 101) return 89/*TokenKind.CASE*/; |
| } |
| - else if ($notnull_bool(this._text.charCodeAt(i0) == 101)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 108 && this._text.charCodeAt(i0 + 2) == 115) && this._text.charCodeAt(i0 + 3) == 101) return 95/*TokenKind.ELSE*/; |
| + else if (this._text.charCodeAt(i0) == 101) { |
| + if (this._text.charCodeAt(i0 + 1) == 108 && this._text.charCodeAt(i0 + 2) == 115 && this._text.charCodeAt(i0 + 3) == 101) return 95/*TokenKind.ELSE*/; |
| } |
| - else if ($notnull_bool(this._text.charCodeAt(i0) == 110)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 117 && this._text.charCodeAt(i0 + 2) == 108) && this._text.charCodeAt(i0 + 3) == 108) return 104/*TokenKind.NULL*/; |
| + else if (this._text.charCodeAt(i0) == 110) { |
| + if (this._text.charCodeAt(i0 + 1) == 117 && this._text.charCodeAt(i0 + 2) == 108 && this._text.charCodeAt(i0 + 3) == 108) return 104/*TokenKind.NULL*/; |
| } |
| - else if ($notnull_bool(this._text.charCodeAt(i0) == 116)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 104)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 2) == 105 && this._text.charCodeAt(i0 + 3) == 115)) return 108/*TokenKind.THIS*/; |
| + else if (this._text.charCodeAt(i0) == 116) { |
| + if (this._text.charCodeAt(i0 + 1) == 104) { |
| + if (this._text.charCodeAt(i0 + 2) == 105 && this._text.charCodeAt(i0 + 3) == 115) return 108/*TokenKind.THIS*/; |
| } |
| - else if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 114)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 2) == 117 && this._text.charCodeAt(i0 + 3) == 101)) return 110/*TokenKind.TRUE*/; |
| + else if (this._text.charCodeAt(i0 + 1) == 114) { |
| + if (this._text.charCodeAt(i0 + 2) == 117 && this._text.charCodeAt(i0 + 3) == 101) return 110/*TokenKind.TRUE*/; |
| } |
| } |
| - else if ($notnull_bool(this._text.charCodeAt(i0) == 118)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 111 && this._text.charCodeAt(i0 + 2) == 105) && this._text.charCodeAt(i0 + 3) == 100) return 113/*TokenKind.VOID*/; |
| + else if (this._text.charCodeAt(i0) == 118) { |
| + if (this._text.charCodeAt(i0 + 1) == 111 && this._text.charCodeAt(i0 + 2) == 105 && this._text.charCodeAt(i0 + 3) == 100) return 113/*TokenKind.VOID*/; |
| } |
| return 70/*TokenKind.IDENTIFIER*/; |
| case 5: |
| - if ($notnull_bool(this._text.charCodeAt(i0) == 98)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 114 && this._text.charCodeAt(i0 + 2) == 101) && this._text.charCodeAt(i0 + 3) == 97 && this._text.charCodeAt(i0 + 4) == 107) return 88/*TokenKind.BREAK*/; |
| + if (this._text.charCodeAt(i0) == 98) { |
| + if (this._text.charCodeAt(i0 + 1) == 114 && this._text.charCodeAt(i0 + 2) == 101 && this._text.charCodeAt(i0 + 3) == 97 && this._text.charCodeAt(i0 + 4) == 107) return 88/*TokenKind.BREAK*/; |
| } |
| - else if ($notnull_bool(this._text.charCodeAt(i0) == 99)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 97)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 2) == 116 && this._text.charCodeAt(i0 + 3) == 99) && this._text.charCodeAt(i0 + 4) == 104) return 90/*TokenKind.CATCH*/; |
| + else if (this._text.charCodeAt(i0) == 99) { |
| + if (this._text.charCodeAt(i0 + 1) == 97) { |
| + if (this._text.charCodeAt(i0 + 2) == 116 && this._text.charCodeAt(i0 + 3) == 99 && this._text.charCodeAt(i0 + 4) == 104) return 90/*TokenKind.CATCH*/; |
| } |
| - else if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 108)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 2) == 97 && this._text.charCodeAt(i0 + 3) == 115) && this._text.charCodeAt(i0 + 4) == 115) return 73/*TokenKind.CLASS*/; |
| + else if (this._text.charCodeAt(i0 + 1) == 108) { |
| + if (this._text.charCodeAt(i0 + 2) == 97 && this._text.charCodeAt(i0 + 3) == 115 && this._text.charCodeAt(i0 + 4) == 115) return 73/*TokenKind.CLASS*/; |
| } |
| - else if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 111)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 2) == 110 && this._text.charCodeAt(i0 + 3) == 115) && this._text.charCodeAt(i0 + 4) == 116) return 91/*TokenKind.CONST*/; |
| + else if (this._text.charCodeAt(i0 + 1) == 111) { |
| + if (this._text.charCodeAt(i0 + 2) == 110 && this._text.charCodeAt(i0 + 3) == 115 && this._text.charCodeAt(i0 + 4) == 116) return 91/*TokenKind.CONST*/; |
| } |
| } |
| - else if ($notnull_bool(this._text.charCodeAt(i0) == 102)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 97)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 2) == 108 && this._text.charCodeAt(i0 + 3) == 115) && this._text.charCodeAt(i0 + 4) == 101) return 96/*TokenKind.FALSE*/; |
| + else if (this._text.charCodeAt(i0) == 102) { |
| + if (this._text.charCodeAt(i0 + 1) == 97) { |
| + if (this._text.charCodeAt(i0 + 2) == 108 && this._text.charCodeAt(i0 + 3) == 115 && this._text.charCodeAt(i0 + 4) == 101) return 96/*TokenKind.FALSE*/; |
| } |
| - else if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 105)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 2) == 110 && this._text.charCodeAt(i0 + 3) == 97) && this._text.charCodeAt(i0 + 4) == 108) return 97/*TokenKind.FINAL*/; |
| + else if (this._text.charCodeAt(i0 + 1) == 105) { |
| + if (this._text.charCodeAt(i0 + 2) == 110 && this._text.charCodeAt(i0 + 3) == 97 && this._text.charCodeAt(i0 + 4) == 108) return 97/*TokenKind.FINAL*/; |
| } |
| } |
| - else if ($notnull_bool(this._text.charCodeAt(i0) == 115)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 117 && this._text.charCodeAt(i0 + 2) == 112) && this._text.charCodeAt(i0 + 3) == 101 && this._text.charCodeAt(i0 + 4) == 114) return 106/*TokenKind.SUPER*/; |
| + else if (this._text.charCodeAt(i0) == 115) { |
| + if (this._text.charCodeAt(i0 + 1) == 117 && this._text.charCodeAt(i0 + 2) == 112 && this._text.charCodeAt(i0 + 3) == 101 && this._text.charCodeAt(i0 + 4) == 114) return 106/*TokenKind.SUPER*/; |
| } |
| - else if ($notnull_bool(this._text.charCodeAt(i0) == 116)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 104 && this._text.charCodeAt(i0 + 2) == 114) && this._text.charCodeAt(i0 + 3) == 111 && this._text.charCodeAt(i0 + 4) == 119) return 109/*TokenKind.THROW*/; |
| + else if (this._text.charCodeAt(i0) == 116) { |
| + if (this._text.charCodeAt(i0 + 1) == 104 && this._text.charCodeAt(i0 + 2) == 114 && this._text.charCodeAt(i0 + 3) == 111 && this._text.charCodeAt(i0 + 4) == 119) return 109/*TokenKind.THROW*/; |
| } |
| - else if ($notnull_bool(this._text.charCodeAt(i0) == 119)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 104 && this._text.charCodeAt(i0 + 2) == 105) && this._text.charCodeAt(i0 + 3) == 108 && this._text.charCodeAt(i0 + 4) == 101) return 114/*TokenKind.WHILE*/; |
| + else if (this._text.charCodeAt(i0) == 119) { |
| + if (this._text.charCodeAt(i0 + 1) == 104 && this._text.charCodeAt(i0 + 2) == 105 && this._text.charCodeAt(i0 + 3) == 108 && this._text.charCodeAt(i0 + 4) == 101) return 114/*TokenKind.WHILE*/; |
| } |
| return 70/*TokenKind.IDENTIFIER*/; |
| case 6: |
| - if ($notnull_bool(this._text.charCodeAt(i0) == 97)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 115 && this._text.charCodeAt(i0 + 2) == 115) && this._text.charCodeAt(i0 + 3) == 101 && this._text.charCodeAt(i0 + 4) == 114 && this._text.charCodeAt(i0 + 5) == 116) return 72/*TokenKind.ASSERT*/; |
| + if (this._text.charCodeAt(i0) == 97) { |
| + if (this._text.charCodeAt(i0 + 1) == 115 && this._text.charCodeAt(i0 + 2) == 115 && this._text.charCodeAt(i0 + 3) == 101 && this._text.charCodeAt(i0 + 4) == 114 && this._text.charCodeAt(i0 + 5) == 116) return 72/*TokenKind.ASSERT*/; |
| } |
| - else if ($notnull_bool(this._text.charCodeAt(i0) == 105)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 109 && this._text.charCodeAt(i0 + 2) == 112) && this._text.charCodeAt(i0 + 3) == 111 && this._text.charCodeAt(i0 + 4) == 114 && this._text.charCodeAt(i0 + 5) == 116) return 78/*TokenKind.IMPORT*/; |
| + else if (this._text.charCodeAt(i0) == 105) { |
| + if (this._text.charCodeAt(i0 + 1) == 109 && this._text.charCodeAt(i0 + 2) == 112 && this._text.charCodeAt(i0 + 3) == 111 && this._text.charCodeAt(i0 + 4) == 114 && this._text.charCodeAt(i0 + 5) == 116) return 78/*TokenKind.IMPORT*/; |
| } |
| - else if ($notnull_bool(this._text.charCodeAt(i0) == 110)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 97)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 2) == 116 && this._text.charCodeAt(i0 + 3) == 105) && this._text.charCodeAt(i0 + 4) == 118 && this._text.charCodeAt(i0 + 5) == 101) return 81/*TokenKind.NATIVE*/; |
| + else if (this._text.charCodeAt(i0) == 110) { |
| + if (this._text.charCodeAt(i0 + 1) == 97) { |
| + if (this._text.charCodeAt(i0 + 2) == 116 && this._text.charCodeAt(i0 + 3) == 105 && this._text.charCodeAt(i0 + 4) == 118 && this._text.charCodeAt(i0 + 5) == 101) return 81/*TokenKind.NATIVE*/; |
| } |
| - else if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 101)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 2) == 103 && this._text.charCodeAt(i0 + 3) == 97) && this._text.charCodeAt(i0 + 4) == 116 && this._text.charCodeAt(i0 + 5) == 101) return 82/*TokenKind.NEGATE*/; |
| + else if (this._text.charCodeAt(i0 + 1) == 101) { |
| + if (this._text.charCodeAt(i0 + 2) == 103 && this._text.charCodeAt(i0 + 3) == 97 && this._text.charCodeAt(i0 + 4) == 116 && this._text.charCodeAt(i0 + 5) == 101) return 82/*TokenKind.NEGATE*/; |
| } |
| } |
| - else if ($notnull_bool(this._text.charCodeAt(i0) == 114)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 101 && this._text.charCodeAt(i0 + 2) == 116) && this._text.charCodeAt(i0 + 3) == 117 && this._text.charCodeAt(i0 + 4) == 114 && this._text.charCodeAt(i0 + 5) == 110) return 105/*TokenKind.RETURN*/; |
| + else if (this._text.charCodeAt(i0) == 114) { |
| + if (this._text.charCodeAt(i0 + 1) == 101 && this._text.charCodeAt(i0 + 2) == 116 && this._text.charCodeAt(i0 + 3) == 117 && this._text.charCodeAt(i0 + 4) == 114 && this._text.charCodeAt(i0 + 5) == 110) return 105/*TokenKind.RETURN*/; |
| } |
| - else if ($notnull_bool(this._text.charCodeAt(i0) == 115)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 111)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 2) == 117 && this._text.charCodeAt(i0 + 3) == 114) && this._text.charCodeAt(i0 + 4) == 99 && this._text.charCodeAt(i0 + 5) == 101) return 85/*TokenKind.SOURCE*/; |
| + else if (this._text.charCodeAt(i0) == 115) { |
| + if (this._text.charCodeAt(i0 + 1) == 111) { |
| + if (this._text.charCodeAt(i0 + 2) == 117 && this._text.charCodeAt(i0 + 3) == 114 && this._text.charCodeAt(i0 + 4) == 99 && this._text.charCodeAt(i0 + 5) == 101) return 85/*TokenKind.SOURCE*/; |
| } |
| - else if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 116)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 2) == 97 && this._text.charCodeAt(i0 + 3) == 116) && this._text.charCodeAt(i0 + 4) == 105 && this._text.charCodeAt(i0 + 5) == 99) return 86/*TokenKind.STATIC*/; |
| + else if (this._text.charCodeAt(i0 + 1) == 116) { |
| + if (this._text.charCodeAt(i0 + 2) == 97 && this._text.charCodeAt(i0 + 3) == 116 && this._text.charCodeAt(i0 + 4) == 105 && this._text.charCodeAt(i0 + 5) == 99) return 86/*TokenKind.STATIC*/; |
| } |
| - else if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 119)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 2) == 105 && this._text.charCodeAt(i0 + 3) == 116) && this._text.charCodeAt(i0 + 4) == 99 && this._text.charCodeAt(i0 + 5) == 104) return 107/*TokenKind.SWITCH*/; |
| + else if (this._text.charCodeAt(i0 + 1) == 119) { |
| + if (this._text.charCodeAt(i0 + 2) == 105 && this._text.charCodeAt(i0 + 3) == 116 && this._text.charCodeAt(i0 + 4) == 99 && this._text.charCodeAt(i0 + 5) == 104) return 107/*TokenKind.SWITCH*/; |
| } |
| } |
| return 70/*TokenKind.IDENTIFIER*/; |
| case 7: |
| - if ($notnull_bool(this._text.charCodeAt(i0) == 100)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 101 && this._text.charCodeAt(i0 + 2) == 102) && this._text.charCodeAt(i0 + 3) == 97 && this._text.charCodeAt(i0 + 4) == 117 && this._text.charCodeAt(i0 + 5) == 108 && this._text.charCodeAt(i0 + 6) == 116) return 93/*TokenKind.DEFAULT*/; |
| + if (this._text.charCodeAt(i0) == 100) { |
| + if (this._text.charCodeAt(i0 + 1) == 101 && this._text.charCodeAt(i0 + 2) == 102 && this._text.charCodeAt(i0 + 3) == 97 && this._text.charCodeAt(i0 + 4) == 117 && this._text.charCodeAt(i0 + 5) == 108 && this._text.charCodeAt(i0 + 6) == 116) return 93/*TokenKind.DEFAULT*/; |
| } |
| - else if ($notnull_bool(this._text.charCodeAt(i0) == 101)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 120 && this._text.charCodeAt(i0 + 2) == 116) && this._text.charCodeAt(i0 + 3) == 101 && this._text.charCodeAt(i0 + 4) == 110 && this._text.charCodeAt(i0 + 5) == 100 && this._text.charCodeAt(i0 + 6) == 115) return 74/*TokenKind.EXTENDS*/; |
| + else if (this._text.charCodeAt(i0) == 101) { |
| + if (this._text.charCodeAt(i0 + 1) == 120 && this._text.charCodeAt(i0 + 2) == 116 && this._text.charCodeAt(i0 + 3) == 101 && this._text.charCodeAt(i0 + 4) == 110 && this._text.charCodeAt(i0 + 5) == 100 && this._text.charCodeAt(i0 + 6) == 115) return 74/*TokenKind.EXTENDS*/; |
| } |
| - else if ($notnull_bool(this._text.charCodeAt(i0) == 102)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 97)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 2) == 99 && this._text.charCodeAt(i0 + 3) == 116) && this._text.charCodeAt(i0 + 4) == 111 && this._text.charCodeAt(i0 + 5) == 114 && this._text.charCodeAt(i0 + 6) == 121) return 75/*TokenKind.FACTORY*/; |
| + else if (this._text.charCodeAt(i0) == 102) { |
| + if (this._text.charCodeAt(i0 + 1) == 97) { |
| + if (this._text.charCodeAt(i0 + 2) == 99 && this._text.charCodeAt(i0 + 3) == 116 && this._text.charCodeAt(i0 + 4) == 111 && this._text.charCodeAt(i0 + 5) == 114 && this._text.charCodeAt(i0 + 6) == 121) return 75/*TokenKind.FACTORY*/; |
| } |
| - else if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 105)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 2) == 110 && this._text.charCodeAt(i0 + 3) == 97) && this._text.charCodeAt(i0 + 4) == 108 && this._text.charCodeAt(i0 + 5) == 108 && this._text.charCodeAt(i0 + 6) == 121) return 98/*TokenKind.FINALLY*/; |
| + else if (this._text.charCodeAt(i0 + 1) == 105) { |
| + if (this._text.charCodeAt(i0 + 2) == 110 && this._text.charCodeAt(i0 + 3) == 97 && this._text.charCodeAt(i0 + 4) == 108 && this._text.charCodeAt(i0 + 5) == 108 && this._text.charCodeAt(i0 + 6) == 121) return 98/*TokenKind.FINALLY*/; |
| } |
| } |
| - else if ($notnull_bool(this._text.charCodeAt(i0) == 108)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 105 && this._text.charCodeAt(i0 + 2) == 98) && this._text.charCodeAt(i0 + 3) == 114 && this._text.charCodeAt(i0 + 4) == 97 && this._text.charCodeAt(i0 + 5) == 114 && this._text.charCodeAt(i0 + 6) == 121) return 80/*TokenKind.LIBRARY*/; |
| + else if (this._text.charCodeAt(i0) == 108) { |
| + if (this._text.charCodeAt(i0 + 1) == 105 && this._text.charCodeAt(i0 + 2) == 98 && this._text.charCodeAt(i0 + 3) == 114 && this._text.charCodeAt(i0 + 4) == 97 && this._text.charCodeAt(i0 + 5) == 114 && this._text.charCodeAt(i0 + 6) == 121) return 80/*TokenKind.LIBRARY*/; |
| } |
| - else if ($notnull_bool(this._text.charCodeAt(i0) == 116)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 121 && this._text.charCodeAt(i0 + 2) == 112) && this._text.charCodeAt(i0 + 3) == 101 && this._text.charCodeAt(i0 + 4) == 100 && this._text.charCodeAt(i0 + 5) == 101 && this._text.charCodeAt(i0 + 6) == 102) return 87/*TokenKind.TYPEDEF*/; |
| + else if (this._text.charCodeAt(i0) == 116) { |
| + if (this._text.charCodeAt(i0 + 1) == 121 && this._text.charCodeAt(i0 + 2) == 112 && this._text.charCodeAt(i0 + 3) == 101 && this._text.charCodeAt(i0 + 4) == 100 && this._text.charCodeAt(i0 + 5) == 101 && this._text.charCodeAt(i0 + 6) == 102) return 87/*TokenKind.TYPEDEF*/; |
| } |
| return 70/*TokenKind.IDENTIFIER*/; |
| case 8: |
| - if ($notnull_bool(this._text.charCodeAt(i0) == 97)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 98 && this._text.charCodeAt(i0 + 2) == 115) && this._text.charCodeAt(i0 + 3) == 116 && this._text.charCodeAt(i0 + 4) == 114 && this._text.charCodeAt(i0 + 5) == 97 && this._text.charCodeAt(i0 + 6) == 99 && this._text.charCodeAt(i0 + 7) == 116) return 71/*TokenKind.ABSTRACT*/; |
| + if (this._text.charCodeAt(i0) == 97) { |
| + if (this._text.charCodeAt(i0 + 1) == 98 && this._text.charCodeAt(i0 + 2) == 115 && this._text.charCodeAt(i0 + 3) == 116 && this._text.charCodeAt(i0 + 4) == 114 && this._text.charCodeAt(i0 + 5) == 97 && this._text.charCodeAt(i0 + 6) == 99 && this._text.charCodeAt(i0 + 7) == 116) return 71/*TokenKind.ABSTRACT*/; |
| } |
| - else if ($notnull_bool(this._text.charCodeAt(i0) == 99)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 111 && this._text.charCodeAt(i0 + 2) == 110) && this._text.charCodeAt(i0 + 3) == 116 && this._text.charCodeAt(i0 + 4) == 105 && this._text.charCodeAt(i0 + 5) == 110 && this._text.charCodeAt(i0 + 6) == 117 && this._text.charCodeAt(i0 + 7) == 101) return 92/*TokenKind.CONTINUE*/; |
| + else if (this._text.charCodeAt(i0) == 99) { |
| + if (this._text.charCodeAt(i0 + 1) == 111 && this._text.charCodeAt(i0 + 2) == 110 && this._text.charCodeAt(i0 + 3) == 116 && this._text.charCodeAt(i0 + 4) == 105 && this._text.charCodeAt(i0 + 5) == 110 && this._text.charCodeAt(i0 + 6) == 117 && this._text.charCodeAt(i0 + 7) == 101) return 92/*TokenKind.CONTINUE*/; |
| } |
| - else if ($notnull_bool(this._text.charCodeAt(i0) == 111)) { |
| - if ($notnull_bool(this._text.charCodeAt(i0 + 1) == 112 && this._text.charCodeAt(i0 + 2) == 101) && this._text.charCodeAt(i0 + 3) == 114 && this._text.charCodeAt(i0 + 4) == 97 && this._text.charCodeAt(i0 + 5) == 116 && this._text.charCodeAt(i0 + 6) == 111 && this._text.charCodeAt(i0 + 7) == 114) return 83/*TokenKind.OPERATOR*/; |
| + else if (this._text.charCodeAt(i0) == 111) { |
| + if (this._text.charCodeAt(i0 + 1) == 112 && this._text.charCodeAt(i0 + 2) == 101 && this._text.charCodeAt(i0 + 3) == 114 && this._text.charCodeAt(i0 + 4) == 97 && this._text.charCodeAt(i0 + 5) == 116 && this._text.charCodeAt(i0 + 6) == 111 && this._text.charCodeAt(i0 + 7) == 114) return 83/*TokenKind.OPERATOR*/; |
| } |
| return 70/*TokenKind.IDENTIFIER*/; |
| case 9: |
| - if ($notnull_bool(this._text.charCodeAt(i0) == 105 && this._text.charCodeAt(i0 + 1) == 110) && this._text.charCodeAt(i0 + 2) == 116 && this._text.charCodeAt(i0 + 3) == 101 && this._text.charCodeAt(i0 + 4) == 114 && this._text.charCodeAt(i0 + 5) == 102 && this._text.charCodeAt(i0 + 6) == 97 && this._text.charCodeAt(i0 + 7) == 99 && this._text.charCodeAt(i0 + 8) == 101) return 79/*TokenKind.INTERFACE*/; |
| + if (this._text.charCodeAt(i0) == 105 && this._text.charCodeAt(i0 + 1) == 110 && this._text.charCodeAt(i0 + 2) == 116 && this._text.charCodeAt(i0 + 3) == 101 && this._text.charCodeAt(i0 + 4) == 114 && this._text.charCodeAt(i0 + 5) == 102 && this._text.charCodeAt(i0 + 6) == 97 && this._text.charCodeAt(i0 + 7) == 99 && this._text.charCodeAt(i0 + 8) == 101) return 79/*TokenKind.INTERFACE*/; |
| return 70/*TokenKind.IDENTIFIER*/; |
| case 10: |
| - if ($notnull_bool(this._text.charCodeAt(i0) == 105 && this._text.charCodeAt(i0 + 1) == 109) && this._text.charCodeAt(i0 + 2) == 112 && this._text.charCodeAt(i0 + 3) == 108 && this._text.charCodeAt(i0 + 4) == 101 && this._text.charCodeAt(i0 + 5) == 109 && this._text.charCodeAt(i0 + 6) == 101 && this._text.charCodeAt(i0 + 7) == 110 && this._text.charCodeAt(i0 + 8) == 116 && this._text.charCodeAt(i0 + 9) == 115) return 77/*TokenKind.IMPLEMENTS*/; |
| + if (this._text.charCodeAt(i0) == 105 && this._text.charCodeAt(i0 + 1) == 109 && this._text.charCodeAt(i0 + 2) == 112 && this._text.charCodeAt(i0 + 3) == 108 && this._text.charCodeAt(i0 + 4) == 101 && this._text.charCodeAt(i0 + 5) == 109 && this._text.charCodeAt(i0 + 6) == 101 && this._text.charCodeAt(i0 + 7) == 110 && this._text.charCodeAt(i0 + 8) == 116 && this._text.charCodeAt(i0 + 9) == 115) return 77/*TokenKind.IMPLEMENTS*/; |
| return 70/*TokenKind.IDENTIFIER*/; |
| default: |
| @@ -15272,16 +15293,16 @@ Tokenizer.prototype.getIdentifierKind = function() { |
| // ********** Code for TokenizerHelpers ************** |
| function TokenizerHelpers() {} |
| TokenizerHelpers.isIdentifierStart = function(c) { |
| - return ($notnull_bool(($notnull_bool(c >= 97 && c <= 122)) || ($notnull_bool(c >= 65 && c <= 90))) || c == 95); |
| + return ((c >= 97 && c <= 122) || (c >= 65 && c <= 90) || c == 95); |
| } |
| TokenizerHelpers.isDigit = function(c) { |
| - return ($notnull_bool(c >= 48 && c <= 57)); |
| + return (c >= 48 && c <= 57); |
| } |
| TokenizerHelpers.isHexDigit = function(c) { |
| - return ($notnull_bool(TokenizerHelpers.isDigit(c) || ($notnull_bool(c >= 97 && c <= 102))) || ($notnull_bool(c >= 65 && c <= 70))); |
| + return ($notnull_bool(TokenizerHelpers.isDigit(c) || (c >= 97 && c <= 102)) || (c >= 65 && c <= 70)); |
| } |
| TokenizerHelpers.isWhitespace = function(c) { |
| - return ($notnull_bool(c == 32 || c == 9) || c == 10 || c == 13); |
| + return (c == 32 || c == 9 || c == 10 || c == 13); |
| } |
| TokenizerHelpers.isIdentifierPart = function(c) { |
| return ($notnull_bool(TokenizerHelpers.isIdentifierStart(c) || TokenizerHelpers.isDigit(c))); |
| @@ -15753,7 +15774,7 @@ TokenKind.kindToString = function(kind) { |
| } |
| } |
| TokenKind.isIdentifier = function(kind) { |
| - return $notnull_bool(kind >= 70/*TokenKind.IDENTIFIER*/ && kind < 88/*TokenKind.BREAK*/); |
| + return kind >= 70/*TokenKind.IDENTIFIER*/ && kind < 88/*TokenKind.BREAK*/; |
| } |
| TokenKind.infixPrecedence = function(kind) { |
| switch (kind) { |
| @@ -16084,8 +16105,8 @@ TokenKind.binaryMethodName = function(kind) { |
| } |
| } |
| TokenKind.kindFromAssign = function(kind) { |
| - if ($notnull_bool(kind == 20/*TokenKind.ASSIGN*/)) return 0; |
| - if ($notnull_bool(kind > 20/*TokenKind.ASSIGN*/ && kind <= 32/*TokenKind.ASSIGN_MOD*/)) { |
| + if (kind == 20/*TokenKind.ASSIGN*/) return 0; |
| + if (kind > 20/*TokenKind.ASSIGN*/ && kind <= 32/*TokenKind.ASSIGN_MOD*/) { |
| return kind + (15)/*(ADD - ASSIGN_ADD)*/; |
| } |
| return -1; |
| @@ -16103,7 +16124,7 @@ function lang_Parser(source, diet, throwOnIncomplete, optionalSemicolons, startO |
| this._inInitializers = false; |
| } |
| lang_Parser.prototype.isPrematureEndOfFile = function() { |
| - if ($notnull_bool(this.throwOnIncomplete && this._maybeEat(1/*TokenKind.END_OF_FILE*/)) || this._maybeEat(68/*TokenKind.INCOMPLETE_MULTILINE_STRING_DQ*/) || this._maybeEat(69/*TokenKind.INCOMPLETE_MULTILINE_STRING_SQ*/)) { |
| + if ($notnull_bool($notnull_bool($notnull_bool(this.throwOnIncomplete && this._maybeEat(1/*TokenKind.END_OF_FILE*/)) || this._maybeEat(68/*TokenKind.INCOMPLETE_MULTILINE_STRING_DQ*/)) || this._maybeEat(69/*TokenKind.INCOMPLETE_MULTILINE_STRING_SQ*/))) { |
| $throw(new IncompleteSourceException(this._previousToken)); |
| } |
| else if ($notnull_bool(this._maybeEat(1/*TokenKind.END_OF_FILE*/))) { |
| @@ -16129,7 +16150,7 @@ lang_Parser.prototype._peekIdentifier = function() { |
| return TokenKind.isIdentifier(this._peekToken.kind); |
| } |
| lang_Parser.prototype._maybeEat = function(kind) { |
| - if ($notnull_bool(this._peekToken.kind == kind)) { |
| + if (this._peekToken.kind == kind) { |
| this._previousToken = this._peekToken; |
| this._peekToken = this.tokenizer.next(); |
| return true; |
| @@ -16139,7 +16160,7 @@ lang_Parser.prototype._maybeEat = function(kind) { |
| } |
| } |
| lang_Parser.prototype._eat = function(kind) { |
| - if ($notnull_bool(!$notnull_bool(this._maybeEat(kind)))) { |
| + if (!$notnull_bool(this._maybeEat(kind))) { |
| this._errorExpected(TokenKind.kindToString(kind)); |
| } |
| } |
| @@ -16154,7 +16175,7 @@ lang_Parser.prototype._errorExpected = function(expected) { |
| this._lang_error($assert_String(message), tok.get$span()); |
| } |
| lang_Parser.prototype._lang_error = function(message, location) { |
| - if ($notnull_bool(location == null)) { |
| + if (location == null) { |
| location = this._peekToken.get$span(); |
| } |
| world.fatal(message, location); |
| @@ -16162,14 +16183,14 @@ lang_Parser.prototype._lang_error = function(message, location) { |
| lang_Parser.prototype._skipBlock = function() { |
| var depth = 1; |
| this._eat(6/*TokenKind.LBRACE*/); |
| - while ($notnull_bool(true)) { |
| + while (true) { |
| var tok = this._lang_next(); |
| if ($notnull_bool($eq(tok.kind, 6/*TokenKind.LBRACE*/))) { |
| depth += 1; |
| } |
| else if ($notnull_bool($eq(tok.kind, 7/*TokenKind.RBRACE*/))) { |
| depth -= 1; |
| - if ($notnull_bool(depth == 0)) return; |
| + if (depth == 0) return; |
| } |
| else if ($notnull_bool($eq(tok.kind, 1/*TokenKind.END_OF_FILE*/))) { |
| this._lang_error('unexpected end of file during diet parse', tok.get$span()); |
| @@ -16186,7 +16207,7 @@ lang_Parser.prototype.compilationUnit = function() { |
| while ($notnull_bool(this._peekKind(12/*TokenKind.HASH*/))) { |
| ret.add(this.directive()); |
| } |
| - while ($notnull_bool(!$notnull_bool(this._maybeEat(1/*TokenKind.END_OF_FILE*/)))) { |
| + while (!$notnull_bool(this._maybeEat(1/*TokenKind.END_OF_FILE*/))) { |
| ret.add(this.topLevelDefinition()); |
| } |
| return (ret && ret.is$List$Definition()); |
| @@ -16245,7 +16266,7 @@ lang_Parser.prototype.classDefinition = function(kind) { |
| } |
| var body = []; |
| if ($notnull_bool(this._maybeEat(6/*TokenKind.LBRACE*/))) { |
| - while ($notnull_bool(!$notnull_bool(this._maybeEat(7/*TokenKind.RBRACE*/)))) { |
| + while (!$notnull_bool(this._maybeEat(7/*TokenKind.RBRACE*/))) { |
| if ($notnull_bool(this.isPrematureEndOfFile())) break; |
| body.add(this.declaration(true)); |
| } |
| @@ -16282,7 +16303,7 @@ lang_Parser.prototype.functionBody = function(inExpression) { |
| var start = this._peekToken.start; |
| if ($notnull_bool(this._maybeEat(9/*TokenKind.ARROW*/))) { |
| var expr = this.expression(); |
| - if ($notnull_bool(!$notnull_bool(inExpression))) { |
| + if (!$notnull_bool(inExpression)) { |
| this._eatSemicolon(); |
| } |
| return new ReturnStatement(expr, this._makeSpan(start)); |
| @@ -16296,7 +16317,7 @@ lang_Parser.prototype.functionBody = function(inExpression) { |
| return this.block(); |
| } |
| } |
| - else if ($notnull_bool(!$notnull_bool(inExpression))) { |
| + else if (!$notnull_bool(inExpression)) { |
| if ($notnull_bool(this._maybeEat(10/*TokenKind.SEMICOLON*/))) { |
| return null; |
| } |
| @@ -16386,7 +16407,7 @@ lang_Parser.prototype.factoryConstructorDeclaration = function() { |
| name = this.identifier(); |
| } |
| else if ($notnull_bool(typeParams == null)) { |
| - if ($notnull_bool(names.length > 1)) { |
| + if (names.length > 1) { |
| name = names.removeLast(); |
| } |
| else { |
| @@ -16396,7 +16417,7 @@ lang_Parser.prototype.factoryConstructorDeclaration = function() { |
| else { |
| name = new lang_Identifier('', names.$index(0).get$span()); |
| } |
| - if ($notnull_bool(names.length > 1)) { |
| + if (names.length > 1) { |
| this._lang_error('unsupported qualified name for factory', names.$index(0).get$span()); |
| } |
| type = new NameTypeReference(false, names.$index(0), null, names.$index(0).get$span()); |
| @@ -16479,14 +16500,14 @@ lang_Parser.prototype.finishExpressionAsStatement = function(expr) { |
| var label = this._makeLabel(expr); |
| return new LabeledStatement(label, this.statement(), this._makeSpan(start)); |
| } |
| - if ($notnull_bool((expr instanceof LambdaExpression))) { |
| - if ($notnull_bool(!(expr.func.body instanceof BlockStatement))) { |
| + if ((expr instanceof LambdaExpression)) { |
| + if (!(expr.func.body instanceof BlockStatement)) { |
| this._eatSemicolon(); |
| expr.func.span = this._makeSpan(start); |
| } |
| return expr.func; |
| } |
| - else if ($notnull_bool((expr instanceof DeclaredIdentifier))) { |
| + else if ((expr instanceof DeclaredIdentifier)) { |
| var value = null; |
| if ($notnull_bool(this._maybeEat(20/*TokenKind.ASSIGN*/))) { |
| value = this.expression(); |
| @@ -16523,7 +16544,7 @@ lang_Parser.prototype.block = function() { |
| var start = this._peekToken.start; |
| this._eat(6/*TokenKind.LBRACE*/); |
| var stmts = []; |
| - while ($notnull_bool(!$notnull_bool(this._maybeEat(7/*TokenKind.RBRACE*/)))) { |
| + while (!$notnull_bool(this._maybeEat(7/*TokenKind.RBRACE*/))) { |
| if ($notnull_bool(this.isPrematureEndOfFile())) break; |
| stmts.add(this.statement()); |
| } |
| @@ -16566,16 +16587,16 @@ lang_Parser.prototype.forStatement = function() { |
| this._eat(99/*TokenKind.FOR*/); |
| this._eat(2/*TokenKind.LPAREN*/); |
| var init = this.forInitializerStatement(start); |
| - if ($notnull_bool((init instanceof ForInStatement))) { |
| + if ((init instanceof ForInStatement)) { |
| return init; |
| } |
| var test = null; |
| - if ($notnull_bool(!$notnull_bool(this._maybeEat(10/*TokenKind.SEMICOLON*/)))) { |
| + if (!$notnull_bool(this._maybeEat(10/*TokenKind.SEMICOLON*/))) { |
| test = this.expression(); |
| this._eatSemicolon(); |
| } |
| var step = []; |
| - if ($notnull_bool(!$notnull_bool(this._maybeEat(3/*TokenKind.RPAREN*/)))) { |
| + if (!$notnull_bool(this._maybeEat(3/*TokenKind.RPAREN*/))) { |
| step.add(this.expression()); |
| while ($notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) { |
| step.add(this.expression()); |
| @@ -16647,14 +16668,14 @@ lang_Parser.prototype.switchStatement = function() { |
| var test = this.testCondition(); |
| var cases = []; |
| this._eat(6/*TokenKind.LBRACE*/); |
| - while ($notnull_bool(!$notnull_bool(this._maybeEat(7/*TokenKind.RBRACE*/)))) { |
| + while (!$notnull_bool(this._maybeEat(7/*TokenKind.RBRACE*/))) { |
| cases.add(this.caseNode()); |
| } |
| return new SwitchStatement(test, cases, this._makeSpan(start)); |
| } |
| lang_Parser.prototype._peekCaseEnd = function() { |
| var kind = this._peek(); |
| - return $notnull_bool($eq(kind, 7/*TokenKind.RBRACE*/) || $eq(kind, 89/*TokenKind.CASE*/)) || $eq(kind, 93/*TokenKind.DEFAULT*/); |
| + return $notnull_bool($notnull_bool($eq(kind, 7/*TokenKind.RBRACE*/) || $eq(kind, 89/*TokenKind.CASE*/)) || $eq(kind, 93/*TokenKind.DEFAULT*/)); |
| } |
| lang_Parser.prototype.caseNode = function() { |
| var start = this._peekToken.start; |
| @@ -16664,7 +16685,7 @@ lang_Parser.prototype.caseNode = function() { |
| this._eat(8/*TokenKind.COLON*/); |
| } |
| var cases = []; |
| - while ($notnull_bool(true)) { |
| + while (true) { |
| if ($notnull_bool(this._maybeEat(89/*TokenKind.CASE*/))) { |
| cases.add(this.expression()); |
| this._eat(8/*TokenKind.COLON*/); |
| @@ -16677,11 +16698,11 @@ lang_Parser.prototype.caseNode = function() { |
| break; |
| } |
| } |
| - if ($notnull_bool(cases.length == 0)) { |
| + if (cases.length == 0) { |
| this._lang_error('case or default'); |
| } |
| var stmts = []; |
| - while ($notnull_bool(!$notnull_bool(this._peekCaseEnd()))) { |
| + while (!$notnull_bool(this._peekCaseEnd())) { |
| if ($notnull_bool(this.isPrematureEndOfFile())) break; |
| stmts.add(this.statement()); |
| } |
| @@ -16746,12 +16767,12 @@ lang_Parser.prototype.expression = function() { |
| return this.infixExpression(0); |
| } |
| lang_Parser.prototype._makeType = function(expr) { |
| - if ($notnull_bool((expr instanceof VarExpression))) { |
| + if ((expr instanceof VarExpression)) { |
| return new NameTypeReference(false, expr.get$name(), null, expr.get$span()); |
| } |
| - else if ($notnull_bool((expr instanceof DotExpression))) { |
| + else if ((expr instanceof DotExpression)) { |
| var type = this._makeType(expr.self); |
| - if ($notnull_bool(type.names == null)) { |
| + if (type.names == null) { |
| type.names = [expr.get$name()]; |
| } |
| else { |
| @@ -16787,7 +16808,7 @@ lang_Parser.prototype._fixAsType = function(x) { |
| var paramBase = this._makeType(x.y); |
| var firstParam = this.addTypeArguments((paramBase && paramBase.is$TypeReference()), 1); |
| var type; |
| - if ($notnull_bool(firstParam.depth <= 0)) { |
| + if (firstParam.depth <= 0) { |
| type = new GenericTypeReference(base, [firstParam], 0, this._makeSpan(x.span.start)); |
| } |
| else if ($notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) { |
| @@ -16801,11 +16822,11 @@ lang_Parser.prototype._fixAsType = function(x) { |
| } |
| } |
| lang_Parser.prototype.finishInfixExpression = function(x, precedence) { |
| - while ($notnull_bool(true)) { |
| + while (true) { |
| var kind = this._peek(); |
| var prec = TokenKind.infixPrecedence(this._peek()); |
| - if ($notnull_bool(prec >= precedence)) { |
| - if ($notnull_bool(kind == 52/*TokenKind.LT*/ || kind == 53/*TokenKind.GT*/)) { |
| + if (prec >= precedence) { |
| + if (kind == 52/*TokenKind.LT*/ || kind == 53/*TokenKind.GT*/) { |
| if ($notnull_bool(this._isBin(x, 52/*TokenKind.LT*/))) { |
| return this._fixAsType((x && x.is$BinaryExpression())); |
| } |
| @@ -16820,7 +16841,7 @@ lang_Parser.prototype.finishInfixExpression = function(x, precedence) { |
| var y = this.infixExpression($assert_num($notnull_bool($eq(prec, 2)) ? prec : prec + 1)); |
| if ($notnull_bool($eq(op.kind, 33/*TokenKind.CONDITIONAL*/))) { |
| this._eat(8/*TokenKind.COLON*/); |
| - var z = this.infixExpression($assert_num(prec + 1)); |
| + var z = this.infixExpression($assert_num(prec)); |
| x = new ConditionalExpression(x, y, z, this._makeSpan(x.span.start)); |
| } |
| else { |
| @@ -16876,7 +16897,7 @@ lang_Parser.prototype.argument = function() { |
| lang_Parser.prototype.arguments = function() { |
| var args = []; |
| this._eat(2/*TokenKind.LPAREN*/); |
| - if ($notnull_bool(!$notnull_bool(this._maybeEat(3/*TokenKind.RPAREN*/)))) { |
| + if (!$notnull_bool(this._maybeEat(3/*TokenKind.RPAREN*/))) { |
| do { |
| args.add(this.argument()); |
| } |
| @@ -16933,10 +16954,10 @@ lang_Parser.prototype.finishPostfixExpression = function(expr) { |
| } |
| } |
| lang_Parser.prototype._isBin = function(expr, kind) { |
| - return $notnull_bool((expr instanceof BinaryExpression) && expr.op.kind == kind); |
| + return (expr instanceof BinaryExpression) && expr.op.kind == kind; |
| } |
| lang_Parser.prototype._boolTypeRef = function(span) { |
| - return new TypeReference(span, world.boolType); |
| + return new TypeReference(span, world.nonNullBool); |
| } |
| lang_Parser.prototype._intTypeRef = function(span) { |
| return new TypeReference(span, world.intType); |
| @@ -17044,7 +17065,7 @@ lang_Parser.prototype.primary = function() { |
| default: |
| - if ($notnull_bool(!$notnull_bool(this._peekIdentifier()))) { |
| + if (!$notnull_bool(this._peekIdentifier())) { |
| this._errorExpected('expression'); |
| } |
| return new VarExpression(this.identifier(), this._makeSpan(start)); |
| @@ -17115,14 +17136,14 @@ lang_Parser.prototype.maybeStringLiteral = function() { |
| lang_Parser.prototype._parenOrLambda = function() { |
| var start = this._peekToken.start; |
| var args = this.arguments(); |
| - if ($notnull_bool(!$notnull_bool(this._inInitializers) && ($notnull_bool(this._peekKind(9/*TokenKind.ARROW*/) || this._peekKind(6/*TokenKind.LBRACE*/))))) { |
| + if (!$notnull_bool(this._inInitializers) && ($notnull_bool(this._peekKind(9/*TokenKind.ARROW*/) || this._peekKind(6/*TokenKind.LBRACE*/)))) { |
| var body = this.functionBody(true); |
| var formals = this._makeFormals(args); |
| var func = new FunctionDefinition(null, null, null, formals, null, body, this._makeSpan(start)); |
| return new LambdaExpression(func, func.get$span()); |
| } |
| else { |
| - if ($notnull_bool(args.length == 1)) { |
| + if (args.length == 1) { |
| return new ParenExpression(args.$index(0).get$value(), this._makeSpan(start)); |
| } |
| else { |
| @@ -17154,7 +17175,7 @@ lang_Parser.prototype._specialIdentifier = function(includeOperators) { |
| case 76/*TokenKind.GET*/: |
| - if ($notnull_bool(!$notnull_bool(includeOperators))) return null; |
| + if (!$notnull_bool(includeOperators)) return null; |
| this._eat(76/*TokenKind.GET*/); |
| if ($notnull_bool(this._peekIdentifier())) { |
| name = ('get\$' + this.identifier().get$name() + ''); |
| @@ -17166,7 +17187,7 @@ lang_Parser.prototype._specialIdentifier = function(includeOperators) { |
| case 84/*TokenKind.SET*/: |
| - if ($notnull_bool(!$notnull_bool(includeOperators))) return null; |
| + if (!$notnull_bool(includeOperators)) return null; |
| this._eat(84/*TokenKind.SET*/); |
| if ($notnull_bool(this._peekIdentifier())) { |
| name = ('set\$' + this.identifier().get$name() + ''); |
| @@ -17178,7 +17199,7 @@ lang_Parser.prototype._specialIdentifier = function(includeOperators) { |
| case 83/*TokenKind.OPERATOR*/: |
| - if ($notnull_bool(!$notnull_bool(includeOperators))) return null; |
| + if (!$notnull_bool(includeOperators)) return null; |
| this._eat(83/*TokenKind.OPERATOR*/); |
| var kind = this._peek(); |
| if ($notnull_bool($eq(kind, 82/*TokenKind.NEGATE*/))) { |
| @@ -17187,7 +17208,7 @@ lang_Parser.prototype._specialIdentifier = function(includeOperators) { |
| } |
| else { |
| name = TokenKind.binaryMethodName($assert_num(kind)); |
| - if ($notnull_bool(name == null)) { |
| + if (name == null) { |
| name = 'operator'; |
| } |
| else { |
| @@ -17207,14 +17228,14 @@ lang_Parser.prototype.declaredIdentifier = function(includeOperators) { |
| var start = this._peekToken.start; |
| var myType = null; |
| var name = this._specialIdentifier(includeOperators); |
| - if ($notnull_bool(name == null)) { |
| + if (name == null) { |
| myType = this.type(0); |
| name = this._specialIdentifier(includeOperators); |
| - if ($notnull_bool(name == null)) { |
| + if (name == null) { |
| if ($notnull_bool(this._peekIdentifier())) { |
| name = this.identifier(); |
| } |
| - else if ($notnull_bool((myType instanceof NameTypeReference) && myType.names == null)) { |
| + else if ((myType instanceof NameTypeReference) && myType.names == null) { |
| name = this._typeAsIdentifier(myType); |
| myType = null; |
| } |
| @@ -17225,13 +17246,13 @@ lang_Parser.prototype.declaredIdentifier = function(includeOperators) { |
| return new DeclaredIdentifier(myType, name, this._makeSpan(start)); |
| } |
| lang_Parser._hexDigit = function(c) { |
| - if ($notnull_bool(c >= 48 && c <= 57)) { |
| + if (c >= 48 && c <= 57) { |
| return c - 48; |
| } |
| - else if ($notnull_bool(c >= 97 && c <= 102)) { |
| + else if (c >= 97 && c <= 102) { |
| return c - 87; |
| } |
| - else if ($notnull_bool(c >= 65 && c <= 70)) { |
| + else if (c >= 65 && c <= 70) { |
| return c - 55; |
| } |
| else { |
| @@ -17241,9 +17262,9 @@ lang_Parser._hexDigit = function(c) { |
| lang_Parser.parseHex = function(hex) { |
| var result = 0; |
| for (var i = 0; |
| - $notnull_bool(i < hex.length); i++) { |
| + i < hex.length; i++) { |
| var digit = lang_Parser._hexDigit(hex.charCodeAt(i)); |
| - $assert($ne(digit, -1), "digit != -1", "parser.dart", 1257, 14); |
| + $assert($ne(digit, -1), "digit != -1", "parser.dart", 1259, 14); |
| result = (result << 4) + $assert_num(digit); |
| } |
| return $assert_num(result); |
| @@ -17263,10 +17284,10 @@ lang_Parser.prototype.finishListLiteral = function(start, isConst, type) { |
| } |
| var values = []; |
| this._eat(4/*TokenKind.LBRACK*/); |
| - while ($notnull_bool(!$notnull_bool(this._maybeEat(5/*TokenKind.RBRACK*/)))) { |
| + while (!$notnull_bool(this._maybeEat(5/*TokenKind.RBRACK*/))) { |
| if ($notnull_bool(this.isPrematureEndOfFile())) break; |
| values.add(this.expression()); |
| - if ($notnull_bool(!$notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/)))) { |
| + if (!$notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) { |
| this._eat(5/*TokenKind.RBRACK*/); |
| break; |
| } |
| @@ -17276,12 +17297,12 @@ lang_Parser.prototype.finishListLiteral = function(start, isConst, type) { |
| lang_Parser.prototype.finishMapLiteral = function(start, isConst, type) { |
| var items = []; |
| this._eat(6/*TokenKind.LBRACE*/); |
| - while ($notnull_bool(!$notnull_bool(this._maybeEat(7/*TokenKind.RBRACE*/)))) { |
| + while (!$notnull_bool(this._maybeEat(7/*TokenKind.RBRACE*/))) { |
| if ($notnull_bool(this.isPrematureEndOfFile())) break; |
| items.add(this.expression()); |
| this._eat(8/*TokenKind.COLON*/); |
| items.add(this.expression()); |
| - if ($notnull_bool(!$notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/)))) { |
| + if (!$notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) { |
| this._eat(7/*TokenKind.RBRACE*/); |
| break; |
| } |
| @@ -17304,7 +17325,7 @@ lang_Parser.prototype.finishTypedLiteral = function(start, isConst) { |
| } |
| lang_Parser.prototype._readModifiers = function() { |
| var modifiers = null; |
| - while ($notnull_bool(true)) { |
| + while (true) { |
| switch (this._peek()) { |
| case 86/*TokenKind.STATIC*/: |
| case 97/*TokenKind.FINAL*/: |
| @@ -17312,7 +17333,7 @@ lang_Parser.prototype._readModifiers = function() { |
| case 71/*TokenKind.ABSTRACT*/: |
| case 75/*TokenKind.FACTORY*/: |
| - if ($notnull_bool(modifiers == null)) modifiers = []; |
| + if (modifiers == null) modifiers = []; |
| modifiers.add(this._lang_next()); |
| break; |
| @@ -17340,13 +17361,13 @@ lang_Parser.prototype.typeParameters = function() { |
| do { |
| var tp = this.typeParameter(); |
| ret.add(tp); |
| - if ($notnull_bool((tp.extendsType instanceof GenericTypeReference) && tp.extendsType.depth == 0)) { |
| + if ((tp.extendsType instanceof GenericTypeReference) && tp.extendsType.depth == 0) { |
| closed = true; |
| break; |
| } |
| } |
| while ($notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) |
| - if ($notnull_bool(!$notnull_bool(closed))) { |
| + if (!$notnull_bool(closed)) { |
| this._eat(53/*TokenKind.GT*/); |
| } |
| return ret; |
| @@ -17378,13 +17399,13 @@ lang_Parser.prototype._finishTypeArguments = function(baseType, depth, types) { |
| do { |
| var myType = this.type(depth + 1); |
| types.add(myType); |
| - if ($notnull_bool((myType instanceof GenericTypeReference) && myType.depth <= depth)) { |
| + if ((myType instanceof GenericTypeReference) && myType.depth <= depth) { |
| delta = depth - myType.depth; |
| break; |
| } |
| } |
| while ($notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) |
| - if ($notnull_bool(delta >= 0)) { |
| + if (delta >= 0) { |
| depth -= $assert_num(delta); |
| } |
| else { |
| @@ -17430,7 +17451,7 @@ lang_Parser.prototype.type = function(depth) { |
| } |
| while ($notnull_bool(this._maybeEat(14/*TokenKind.DOT*/))) { |
| - if ($notnull_bool(names == null)) names = []; |
| + if (names == null) names = []; |
| names.add(this.identifier()); |
| } |
| var typeRef = new NameTypeReference(isFinal, name, names, this._makeSpan(start)); |
| @@ -17450,7 +17471,7 @@ lang_Parser.prototype.formalParameter = function(inOptionalBlock) { |
| var name = di.get$name(); |
| var value = null; |
| if ($notnull_bool(this._maybeEat(20/*TokenKind.ASSIGN*/))) { |
| - if ($notnull_bool(!$notnull_bool(inOptionalBlock))) { |
| + if (!$notnull_bool(inOptionalBlock)) { |
| this._lang_error('default values only allowed inside [optional] section'); |
| } |
| value = this.expression(); |
| @@ -17469,7 +17490,7 @@ lang_Parser.prototype.formalParameterList = function() { |
| this._eat(2/*TokenKind.LPAREN*/); |
| var formals = []; |
| var inOptionalBlock = false; |
| - if ($notnull_bool(!$notnull_bool(this._maybeEat(3/*TokenKind.RPAREN*/)))) { |
| + if (!$notnull_bool(this._maybeEat(3/*TokenKind.RPAREN*/))) { |
| if ($notnull_bool(this._maybeEat(4/*TokenKind.LBRACK*/))) { |
| inOptionalBlock = true; |
| } |
| @@ -17492,19 +17513,19 @@ lang_Parser.prototype.formalParameterList = function() { |
| } |
| lang_Parser.prototype.identifier = function() { |
| var tok = this._lang_next(); |
| - if ($notnull_bool(!$notnull_bool(TokenKind.isIdentifier($assert_num(tok.kind))))) { |
| + if (!$notnull_bool(TokenKind.isIdentifier($assert_num(tok.kind)))) { |
| this._lang_error(('expected identifier, but found ' + tok + ''), tok.get$span()); |
| } |
| return new lang_Identifier(tok.get$text(), this._makeSpan(tok.start)); |
| } |
| lang_Parser.prototype._makeFunction = function(expr, body) { |
| var name, type; |
| - if ($notnull_bool((expr instanceof CallExpression))) { |
| - if ($notnull_bool((expr.target instanceof VarExpression))) { |
| + if ((expr instanceof CallExpression)) { |
| + if ((expr.target instanceof VarExpression)) { |
| name = expr.target.get$name(); |
| type = null; |
| } |
| - else if ($notnull_bool((expr.target instanceof DeclaredIdentifier))) { |
| + else if ((expr.target instanceof DeclaredIdentifier)) { |
| name = expr.target.get$name(); |
| type = expr.target.type; |
| } |
| @@ -17522,10 +17543,10 @@ lang_Parser.prototype._makeFunction = function(expr, body) { |
| } |
| lang_Parser.prototype._makeFormal = function(expr) { |
| var $0; |
| - if ($notnull_bool((expr instanceof VarExpression))) { |
| + if ((expr instanceof VarExpression)) { |
| return new FormalNode(false, false, null, expr.get$name(), null, expr.get$span()); |
| } |
| - else if ($notnull_bool((expr instanceof DeclaredIdentifier))) { |
| + else if ((expr instanceof DeclaredIdentifier)) { |
| return new FormalNode(false, false, expr.type, expr.get$name(), null, expr.get$span()); |
| } |
| else if ($notnull_bool(this._isBin(expr, 20/*TokenKind.ASSIGN*/) && ((expr.x instanceof DeclaredIdentifier)))) { |
| @@ -17535,7 +17556,7 @@ lang_Parser.prototype._makeFormal = function(expr) { |
| else if ($notnull_bool(this._isBin(expr, 52/*TokenKind.LT*/))) { |
| return null; |
| } |
| - else if ($notnull_bool((expr instanceof ListExpression))) { |
| + else if ((expr instanceof ListExpression)) { |
| return this._makeFormalsFromList(expr); |
| } |
| else { |
| @@ -17554,9 +17575,9 @@ lang_Parser.prototype._makeFormalsFromList = function(expr) { |
| lang_Parser.prototype._makeFormals = function(arguments) { |
| var expressions = []; |
| for (var i = 0; |
| - $notnull_bool(i < arguments.length); i++) { |
| + i < arguments.length; i++) { |
| var arg = arguments.$index(i); |
| - if ($notnull_bool(arg.label != null)) { |
| + if (arg.label != null) { |
| this._lang_error('expected formal, but found ":"'); |
| } |
| expressions.add(arg.get$value()); |
| @@ -17567,19 +17588,19 @@ lang_Parser.prototype._makeFormalsFromExpressions = function(expressions, allowO |
| var $0; |
| var formals = []; |
| for (var i = 0; |
| - $notnull_bool(i < expressions.length); i++) { |
| + i < expressions.length; i++) { |
| var formal = this._makeFormal(expressions.$index(i)); |
| if ($notnull_bool(formal == null)) { |
| var baseType = this._makeType(expressions.$index(i).x); |
| var typeParams = [this._makeType(expressions.$index(i).y)]; |
| i++; |
| - while ($notnull_bool(i < expressions.length)) { |
| + while (i < expressions.length) { |
| var expr = expressions.$index(i++); |
| if ($notnull_bool(this._isBin(expr, 53/*TokenKind.GT*/))) { |
| typeParams.add(this._makeType(expr.x)); |
| var type = new GenericTypeReference(baseType, typeParams, 0, this._makeSpan(baseType.get$span().start)); |
| var name = null; |
| - if ($notnull_bool((expr.y instanceof VarExpression))) { |
| + if ((expr.y instanceof VarExpression)) { |
| var ve = (($0 = expr.y) && $0.is$VarExpression()); |
| name = ve.name; |
| } |
| @@ -17595,9 +17616,9 @@ lang_Parser.prototype._makeFormalsFromExpressions = function(expressions, allowO |
| } |
| formals.add(formal); |
| } |
| - else if ($notnull_bool(!!(formal && formal.is$List))) { |
| + else if (!!(formal && formal.is$List)) { |
| formals.addAll(formal); |
| - if ($notnull_bool(!$notnull_bool(allowOptional))) { |
| + if (!$notnull_bool(allowOptional)) { |
| this._lang_error('unexpected nested optional formal', expressions.$index(i).get$span()); |
| } |
| } |
| @@ -17608,10 +17629,10 @@ lang_Parser.prototype._makeFormalsFromExpressions = function(expressions, allowO |
| return formals; |
| } |
| lang_Parser.prototype._makeDeclaredIdentifier = function(e) { |
| - if ($notnull_bool((e instanceof VarExpression))) { |
| + if ((e instanceof VarExpression)) { |
| return new DeclaredIdentifier(null, e.get$name(), e.get$span()); |
| } |
| - else if ($notnull_bool((e instanceof DeclaredIdentifier))) { |
| + else if ((e instanceof DeclaredIdentifier)) { |
| return e; |
| } |
| else { |
| @@ -17620,7 +17641,7 @@ lang_Parser.prototype._makeDeclaredIdentifier = function(e) { |
| } |
| } |
| lang_Parser.prototype._makeLabel = function(expr) { |
| - if ($notnull_bool((expr instanceof VarExpression))) { |
| + if ((expr instanceof VarExpression)) { |
| return expr.get$name(); |
| } |
| else { |
| @@ -17634,7 +17655,7 @@ function IncompleteSourceException(token) { |
| // Initializers done |
| } |
| IncompleteSourceException.prototype.toString = function() { |
| - if ($notnull_bool(this.token.get$span() == null)) return ('Unexpected ' + this.token + ''); |
| + if (this.token.get$span() == null) return ('Unexpected ' + this.token + ''); |
| return $assert_String(this.token.get$span().toMessageString(('Unexpected ' + this.token + ''))); |
| } |
| // ********** Code for lang_Node ************** |
| @@ -18342,7 +18363,7 @@ lang_Type.prototype.markUsed = function() { |
| } |
| lang_Type.prototype.get$typeMember = function() { |
| var $0; |
| - if ($notnull_bool(this._typeMember == null)) { |
| + if (this._typeMember == null) { |
| this._typeMember = new TypeMember((this && this.is$DefinedType())); |
| } |
| return (($0 = this._typeMember) && $0.is$TypeMember()); |
| @@ -18384,7 +18405,7 @@ lang_Type.prototype.getCallMethod = function() { |
| return null; |
| } |
| lang_Type.prototype.get$isClosed = function() { |
| - return $notnull_bool(this.get$isString() || this.get$isBool()) || this.get$isNum() || this.get$isFunction() || this.get$isVar(); |
| + return $notnull_bool($notnull_bool($notnull_bool($notnull_bool(this.get$isString() || this.get$isBool()) || this.get$isNum()) || this.get$isFunction()) || this.get$isVar()); |
| } |
| lang_Type.prototype.get$isUsed = function() { |
| return false; |
| @@ -18405,7 +18426,7 @@ lang_Type.prototype.get$typeofName = function() { |
| return null; |
| } |
| lang_Type.prototype.get$jsname = function() { |
| - return $notnull_bool(this._jsname == null) ? this.name : this._jsname; |
| + return this._jsname == null ? this.name : this._jsname; |
| } |
| lang_Type.prototype.set$jsname = function(name) { |
| return this._jsname = name; |
| @@ -18438,7 +18459,7 @@ lang_Type.prototype.hashCode = function() { |
| return this.name.hashCode(); |
| } |
| lang_Type.prototype.ensureSubtypeOf = function(other, span, typeErrors) { |
| - if ($notnull_bool(!$notnull_bool(this.isSubtypeOf(other)))) { |
| + if (!$notnull_bool(this.isSubtypeOf(other))) { |
| var msg = ('type ' + this.name + ' is not a subtype of ' + other.name + ''); |
| if ($notnull_bool(typeErrors)) { |
| world.error($assert_String(msg), span); |
| @@ -18454,14 +18475,14 @@ lang_Type.prototype.needsVarCall = function(args) { |
| } |
| var call = this.getCallMethod(); |
| if ($notnull_bool($ne(call, null))) { |
| - if ($notnull_bool(args.get$length() != call.get$parameters().length || !$notnull_bool(call.namesInOrder(args)))) { |
| + if (args.get$length() != call.get$parameters().length || !$notnull_bool(call.namesInOrder(args))) { |
| return true; |
| } |
| } |
| return false; |
| } |
| lang_Type.union = function(x, y) { |
| - if ($notnull_bool($eq(x, y))) return x; |
| + if ($eq(x, y)) return x; |
| if ($notnull_bool(x.get$isNum() && y.get$isNum())) return world.numType; |
| if ($notnull_bool(x.get$isString() && y.get$isString())) return world.stringType; |
| return world.varType; |
| @@ -18472,10 +18493,10 @@ lang_Type.prototype.isAssignable = function(other) { |
| lang_Type.prototype._isDirectSupertypeOf = function(other) { |
| var $this = this; // closure support |
| if ($notnull_bool(other.get$isClass())) { |
| - return $notnull_bool($eq(other.get$parent(), this) || $notnull_bool(this.get$isObject() && other.get$parent() == null)); |
| + return $eq(other.get$parent(), this) || $notnull_bool(this.get$isObject() && other.get$parent() == null); |
| } |
| else { |
| - if ($notnull_bool(other.get$interfaces() == null || other.get$interfaces().isEmpty())) { |
| + if (other.get$interfaces() == null || other.get$interfaces().isEmpty()) { |
| return this.get$isObject(); |
| } |
| else { |
| @@ -18487,10 +18508,10 @@ lang_Type.prototype._isDirectSupertypeOf = function(other) { |
| } |
| } |
| lang_Type.prototype.isSubtypeOf = function(other) { |
| - if ($notnull_bool((other instanceof ParameterType))) { |
| + if ((other instanceof ParameterType)) { |
| return true; |
| } |
| - if ($notnull_bool($eq(this, other))) return true; |
| + if ($eq(this, other)) return true; |
| if ($notnull_bool(this.get$isVar())) return true; |
| if ($notnull_bool(other.get$isVar())) return true; |
| if ($notnull_bool(other._isDirectSupertypeOf(this))) return true; |
| @@ -18499,40 +18520,40 @@ lang_Type.prototype.isSubtypeOf = function(other) { |
| if ($notnull_bool($ne(call, null) && $ne(otherCall, null))) { |
| return lang_Type._isFunctionSubtypeOf((call && call.is$MethodMember()), (otherCall && otherCall.is$MethodMember())); |
| } |
| - if ($notnull_bool($eq(this.get$genericType(), other.get$genericType()) && $ne(this.get$typeArgsInOrder(), null)) && $ne(other.get$typeArgsInOrder(), null) && this.get$typeArgsInOrder().length == other.get$typeArgsInOrder().length) { |
| + if ($notnull_bool($notnull_bool($eq(this.get$genericType(), other.get$genericType()) && $ne(this.get$typeArgsInOrder(), null)) && $ne(other.get$typeArgsInOrder(), null)) && this.get$typeArgsInOrder().length == other.get$typeArgsInOrder().length) { |
| var t = this.get$typeArgsInOrder().iterator(); |
| var s = other.get$typeArgsInOrder().iterator(); |
| while ($notnull_bool(t.hasNext())) { |
| - if ($notnull_bool(!$notnull_bool(t.next().isSubtypeOf(s.next())))) return false; |
| + if (!$notnull_bool(t.next().isSubtypeOf(s.next()))) return false; |
| } |
| return true; |
| } |
| if ($notnull_bool(this.get$parent() != null && this.get$parent().isSubtypeOf(other))) { |
| return true; |
| } |
| - if ($notnull_bool(this.get$interfaces() != null && this.get$interfaces().some((function (i) { |
| + if (this.get$interfaces() != null && this.get$interfaces().some((function (i) { |
| return i.isSubtypeOf(other); |
| }) |
| - ))) { |
| + )) { |
| return true; |
| } |
| return false; |
| } |
| lang_Type._isFunctionSubtypeOf = function(t, s) { |
| var $0; |
| - if ($notnull_bool(!$notnull_bool(s.returnType.get$isVoid()) && !$notnull_bool(s.returnType.isAssignable(t.returnType)))) { |
| + if (!$notnull_bool(s.returnType.get$isVoid()) && !$notnull_bool(s.returnType.isAssignable(t.returnType))) { |
| return false; |
| } |
| var tp = t.parameters; |
| var sp = s.parameters; |
| - if ($notnull_bool(tp.length < sp.length)) return false; |
| + if (tp.length < sp.length) return false; |
| for (var i = 0; |
| - $notnull_bool(i < sp.length); i++) { |
| - if ($notnull_bool($ne(tp.$index(i).get$isOptional(), sp.$index(i).get$isOptional()))) return false; |
| + i < sp.length; i++) { |
| + if ($ne(tp.$index(i).get$isOptional(), sp.$index(i).get$isOptional())) return false; |
| if ($notnull_bool(tp.$index(i).get$isOptional() && $ne(tp.$index(i).get$name(), sp.$index(i).get$name()))) return false; |
| - if ($notnull_bool(!$notnull_bool(tp.$index(i).type.isAssignable((($0 = sp.$index(i).type) && $0.is$lang_Type()))))) return false; |
| + if (!$notnull_bool(tp.$index(i).type.isAssignable((($0 = sp.$index(i).type) && $0.is$lang_Type())))) return false; |
| } |
| - if ($notnull_bool(tp.length > sp.length && !$notnull_bool(tp.$index(sp.length).get$isOptional()))) return false; |
| + if (tp.length > sp.length && !$notnull_bool(tp.$index(sp.length).get$isOptional())) return false; |
| return true; |
| } |
| // ********** Code for ParameterType ************** |
| @@ -18561,7 +18582,7 @@ ParameterType.prototype.getCallMethod = function() { |
| ParameterType.prototype.genMethod = function(method) { |
| this.extendsType.genMethod(method); |
| } |
| -ParameterType.prototype.isSubtypeOf = function(child) { |
| +ParameterType.prototype.isSubtypeOf = function(other) { |
| return true; |
| } |
| ParameterType.prototype.resolveMember = function(memberName) { |
| @@ -18581,13 +18602,119 @@ ParameterType.prototype.addDirectSubtype = function(type) { |
| world.internalError('no subtypes of type parameters yet', this.get$span()); |
| } |
| ParameterType.prototype.resolve = function(inType) { |
| - if ($notnull_bool(this.typeParameter.extendsType != null)) { |
| + if (this.typeParameter.extendsType != null) { |
| this.extendsType = inType.resolveType(this.typeParameter.extendsType, true); |
| } |
| else { |
| this.extendsType = world.objectType; |
| } |
| } |
| +// ********** Code for NonNullableType ************** |
| +function NonNullableType(type) { |
| + this.type = type; |
| + lang_Type.call(this, type.name); |
| + // Initializers done |
| +} |
| +$inherits(NonNullableType, lang_Type); |
| +NonNullableType.prototype.get$isBool = function() { |
| + return this.type.get$isBool(); |
| +} |
| +NonNullableType.prototype.get$isUsed = function() { |
| + return false; |
| +} |
| +NonNullableType.prototype.isSubtypeOf = function(other) { |
| + return $notnull_bool($eq(this, other) || $eq(this.type, other) || this.type.isSubtypeOf(other)); |
| +} |
| +NonNullableType.prototype.resolveType = function(node, isRequired) { |
| + return this.type.resolveType(node, isRequired); |
| +} |
| +NonNullableType.prototype.resolveTypeParams = function(inType) { |
| + return this.type.resolveTypeParams(inType); |
| +} |
| +NonNullableType.prototype.addDirectSubtype = function(subtype) { |
| + this.type.addDirectSubtype(subtype); |
| +} |
| +NonNullableType.prototype.markUsed = function() { |
| + this.type.markUsed(); |
| +} |
| +NonNullableType.prototype.genMethod = function(method) { |
| + this.type.genMethod(method); |
| +} |
| +NonNullableType.prototype.get$span = function() { |
| + return this.type.get$span(); |
| +} |
| +NonNullableType.prototype.resolveMember = function(name) { |
| + return this.type.resolveMember(name); |
| +} |
| +NonNullableType.prototype.getMember = function(name) { |
| + return this.type.getMember(name); |
| +} |
| +NonNullableType.prototype.getConstructor = function(name) { |
| + var $0; |
| + return (($0 = this.type.getConstructor(name)) && $0.is$MethodMember()); |
| +} |
| +NonNullableType.prototype.getFactory = function(t, name) { |
| + var $0; |
| + return (($0 = this.type.getFactory(t, name)) && $0.is$MethodMember()); |
| +} |
| +NonNullableType.prototype.getOrMakeConcreteType = function(typeArgs) { |
| + return this.type.getOrMakeConcreteType(typeArgs); |
| +} |
| +NonNullableType.prototype.get$constructors = function() { |
| + return this.type.get$constructors(); |
| +} |
| +NonNullableType.prototype.get$isClass = function() { |
| + return this.type.get$isClass(); |
| +} |
| +NonNullableType.prototype.get$library = function() { |
| + return this.type.get$library(); |
| +} |
| +NonNullableType.prototype.getCallMethod = function() { |
| + return this.type.getCallMethod(); |
| +} |
| +NonNullableType.prototype.get$isGeneric = function() { |
| + return this.type.get$isGeneric(); |
| +} |
| +NonNullableType.prototype.get$hasTypeParams = function() { |
| + return this.type.get$hasTypeParams(); |
| +} |
| +NonNullableType.prototype.get$typeofName = function() { |
| + return this.type.get$typeofName(); |
| +} |
| +NonNullableType.prototype.get$jsname = function() { |
| + return this.type.get$jsname(); |
| +} |
| +NonNullableType.prototype.set$jsname = function(name) { |
| + return this.type.set$jsname(name); |
| +} |
| +NonNullableType.prototype.get$members = function() { |
| + return this.type.get$members(); |
| +} |
| +NonNullableType.prototype.get$definition = function() { |
| + return this.type.get$definition(); |
| +} |
| +NonNullableType.prototype.get$factories = function() { |
| + return this.type.get$factories(); |
| +} |
| +NonNullableType.prototype.get$typeArgsInOrder = function() { |
| + var $0; |
| + return (($0 = this.type.get$typeArgsInOrder()) && $0.is$Collection$Type()); |
| +} |
| +NonNullableType.prototype.get$genericType = function() { |
| + return this.type.get$genericType(); |
| +} |
| +NonNullableType.prototype.get$interfaces = function() { |
| + return this.type.get$interfaces(); |
| +} |
| +NonNullableType.prototype.get$parent = function() { |
| + return this.type.get$parent(); |
| +} |
| +NonNullableType.prototype.getAllMembers = function() { |
| + return this.type.getAllMembers(); |
| +} |
| +NonNullableType.prototype.get$isNativeType = function() { |
| + return this.type.get$isNativeType(); |
| +} |
| // ********** Code for ConcreteType ************** |
| function ConcreteType(name, genericType, typeArguments, typeArgsInOrder) { |
| this.genericType = genericType; |
| @@ -18616,10 +18743,10 @@ ConcreteType.prototype.get$span = function() { |
| return this.genericType.get$span(); |
| } |
| ConcreteType.prototype.get$hasTypeParams = function() { |
| - return this.typeArguments.getValues().some((function (e) { |
| + return $assert_bool(this.typeArguments.getValues().some((function (e) { |
| return (e instanceof ParameterType); |
| }) |
| - ); |
| + )); |
| } |
| ConcreteType.prototype.get$members = function() { return this.members; }; |
| ConcreteType.prototype.set$members = function(value) { return this.members = value; }; |
| @@ -18637,7 +18764,7 @@ ConcreteType.prototype.resolveTypeParams = function(inType) { |
| if ($notnull_bool($ne(newType, t))) needsNewType = true; |
| newTypeArgs.add(newType); |
| } |
| - if ($notnull_bool(!$notnull_bool(needsNewType))) return this; |
| + if (!$notnull_bool(needsNewType)) return this; |
| return this.genericType.getOrMakeConcreteType((newTypeArgs && newTypeArgs.is$List$Type())); |
| } |
| ConcreteType.prototype.getOrMakeConcreteType = function(typeArgs) { |
| @@ -18647,7 +18774,7 @@ ConcreteType.prototype.get$parent = function() { |
| return this.genericType.get$parent(); |
| } |
| ConcreteType.prototype.get$interfaces = function() { |
| - if ($notnull_bool(this._interfaces == null && this.genericType.interfaces != null)) { |
| + if (this._interfaces == null && this.genericType.interfaces != null) { |
| this._interfaces = []; |
| var $list = this.genericType.interfaces; |
| for (var $i = 0;$i < $list.length; $i++) { |
| @@ -18688,8 +18815,8 @@ ConcreteType.prototype.getConstructor = function(constructorName) { |
| if ($notnull_bool($ne(ret, null))) return ret; |
| var genericMember = this.genericType.getConstructor(constructorName); |
| if ($notnull_bool(genericMember == null)) return null; |
| - if ($notnull_bool($ne(genericMember.declaringType, this.genericType))) { |
| - if ($notnull_bool(!$notnull_bool(genericMember.declaringType.get$isGeneric()))) return genericMember; |
| + if ($ne(genericMember.declaringType, this.genericType)) { |
| + if (!$notnull_bool(genericMember.declaringType.get$isGeneric())) return genericMember; |
| var newDeclaringType = genericMember.declaringType.getOrMakeConcreteType(this.typeArgsInOrder); |
| return newDeclaringType.getConstructor(constructorName); |
| } |
| @@ -18774,12 +18901,12 @@ DefinedType.prototype.set$isUsed = function(value) { return this.isUsed = value; |
| DefinedType.prototype.get$isNativeType = function() { return this.isNativeType; }; |
| DefinedType.prototype.set$isNativeType = function(value) { return this.isNativeType = value; }; |
| DefinedType.prototype.setDefinition = function(def) { |
| - $assert(this.definition == null, "definition == null", "type.dart", 564, 12); |
| + $assert(this.definition == null, "definition == null", "type.dart", 628, 12); |
| this.definition = def; |
| - if ($notnull_bool((this.definition instanceof TypeDefinition) && this.definition.get$nativeType() != null)) { |
| + if ((this.definition instanceof TypeDefinition) && this.definition.get$nativeType() != null) { |
| this.isNativeType = true; |
| } |
| - if ($notnull_bool(this.definition != null && this.definition.get$typeParameters() != null)) { |
| + if (this.definition != null && this.definition.get$typeParameters() != null) { |
| this._concreteTypes = $map([]); |
| this.typeParameters = []; |
| var $list = this.definition.get$typeParameters(); |
| @@ -18791,8 +18918,8 @@ DefinedType.prototype.setDefinition = function(def) { |
| } |
| } |
| DefinedType.prototype.get$typeArgsInOrder = function() { |
| - if ($notnull_bool(this.typeParameters == null)) return null; |
| - if ($notnull_bool(this._typeArgsInOrder == null)) { |
| + if (this.typeParameters == null) return null; |
| + if (this._typeArgsInOrder == null) { |
| this._typeArgsInOrder = new FixedCollection$Type(world.varType, this.typeParameters.length); |
| } |
| return this._typeArgsInOrder; |
| @@ -18826,10 +18953,10 @@ DefinedType.prototype.get$isGeneric = function() { |
| } |
| DefinedType.prototype.get$span = function() { |
| var $0; |
| - return (($0 = $notnull_bool(this.definition == null) ? null : this.definition.span) && $0.is$SourceSpan()); |
| + return (($0 = this.definition == null ? null : this.definition.span) && $0.is$SourceSpan()); |
| } |
| DefinedType.prototype.get$typeofName = function() { |
| - if ($notnull_bool(!$notnull_bool(this.library.get$isCore()))) return null; |
| + if (!$notnull_bool(this.library.get$isCore())) return null; |
| if ($notnull_bool(this.get$isBool())) return 'boolean'; |
| else if ($notnull_bool(this.get$isNum())) return 'number'; |
| else if ($notnull_bool(this.get$isString())) return 'string'; |
| @@ -18837,7 +18964,7 @@ DefinedType.prototype.get$typeofName = function() { |
| else return null; |
| } |
| DefinedType.prototype.get$isNum = function() { |
| - return $notnull_bool(this.library != null && this.library.get$isCore()) && ($notnull_bool(this.name == 'num' || this.name == 'int') || this.name == 'double'); |
| + return $notnull_bool(this.library != null && this.library.get$isCore()) && (this.name == 'num' || this.name == 'int' || this.name == 'double'); |
| } |
| DefinedType.prototype.getCallMethod = function() { |
| var $0; |
| @@ -18849,7 +18976,7 @@ DefinedType.prototype.getAllMembers = function() { |
| DefinedType.prototype.markUsed = function() { |
| if ($notnull_bool(this.isUsed)) return; |
| this.isUsed = true; |
| - if ($notnull_bool(this._lazyGenMethods != null)) { |
| + if (this._lazyGenMethods != null) { |
| var $list = orderValuesByKeys(this._lazyGenMethods); |
| for (var $i = 0;$i < $list.length; $i++) { |
| var method = $list.$index($i); |
| @@ -18857,24 +18984,24 @@ DefinedType.prototype.markUsed = function() { |
| } |
| this._lazyGenMethods = null; |
| } |
| - if ($notnull_bool(this.get$parent() != null)) this.get$parent().markUsed(); |
| + if (this.get$parent() != null) this.get$parent().markUsed(); |
| } |
| DefinedType.prototype.genMethod = function(method) { |
| if ($notnull_bool(this.isUsed)) { |
| world.gen.genMethod(method); |
| } |
| else if ($notnull_bool(this.isClass)) { |
| - if ($notnull_bool(this._lazyGenMethods == null)) this._lazyGenMethods = $map([]); |
| + if (this._lazyGenMethods == null) this._lazyGenMethods = $map([]); |
| this._lazyGenMethods.$setindex(method.name, method); |
| } |
| } |
| DefinedType.prototype._resolveInterfaces = function(types) { |
| - if ($notnull_bool(types == null)) return []; |
| + if (types == null) return []; |
| var interfaces = []; |
| for (var $i = 0;$i < types.length; $i++) { |
| var type = types.$index($i); |
| var resolvedInterface = this.resolveType((type && type.is$TypeReference()), true); |
| - if ($notnull_bool(resolvedInterface.get$isClosed() && !$notnull_bool(($notnull_bool(this.library.get$isCore() || this.library.get$isCoreImpl()))))) { |
| + if ($notnull_bool(resolvedInterface.get$isClosed() && !($notnull_bool(this.library.get$isCore() || this.library.get$isCoreImpl())))) { |
| world.error(('can not implement "' + resolvedInterface.get$name() + '": ') + 'only native implementation allowed', type.get$span()); |
| } |
| resolvedInterface.addDirectSubtype(this); |
| @@ -18883,11 +19010,11 @@ DefinedType.prototype._resolveInterfaces = function(types) { |
| return (interfaces && interfaces.is$List$Type()); |
| } |
| DefinedType.prototype.addDirectSubtype = function(type) { |
| - $assert(this._subtypes == null, "_subtypes == null", "type.dart", 680, 12); |
| + $assert(this._subtypes == null, "_subtypes == null", "type.dart", 744, 12); |
| this.directSubtypes.add(type); |
| } |
| DefinedType.prototype.get$subtypes = function() { |
| - if ($notnull_bool(this._subtypes == null)) { |
| + if (this._subtypes == null) { |
| this._subtypes = new HashSetImplementation$Type(); |
| var $list = this.directSubtypes; |
| for (var $i = this.directSubtypes.iterator(); $i.hasNext(); ) { |
| @@ -18903,10 +19030,10 @@ DefinedType.prototype._cycleInClassExtends = function() { |
| seen.add(this); |
| var ancestor = this.get$parent(); |
| while ($notnull_bool($ne(ancestor, null))) { |
| - if ($notnull_bool(ancestor === this)) { |
| + if (ancestor === this) { |
| return true; |
| } |
| - if ($notnull_bool(seen.contains(ancestor))) { |
| + if (seen.contains(ancestor)) { |
| return false; |
| } |
| seen.add(ancestor); |
| @@ -18920,8 +19047,8 @@ DefinedType.prototype._cycleInInterfaceExtends = function() { |
| seen.add(this); |
| function _helper(ancestor) { |
| if ($notnull_bool(ancestor == null)) return false; |
| - if ($notnull_bool(ancestor === $this)) return true; |
| - if ($notnull_bool(seen.contains(ancestor))) { |
| + if (ancestor === $this) return true; |
| + if (seen.contains(ancestor)) { |
| return false; |
| } |
| seen.add(ancestor); |
| @@ -18935,7 +19062,7 @@ DefinedType.prototype._cycleInInterfaceExtends = function() { |
| return false; |
| } |
| for (var i = 0; |
| - $notnull_bool(i < this.interfaces.length); i++) { |
| + i < this.interfaces.length; i++) { |
| if ($notnull_bool(_helper(this.interfaces.$index(i)))) return i; |
| } |
| return -1; |
| @@ -18943,20 +19070,20 @@ DefinedType.prototype._cycleInInterfaceExtends = function() { |
| DefinedType.prototype.resolve = function() { |
| var $this = this; // closure support |
| var $0; |
| - if ($notnull_bool((this.definition instanceof TypeDefinition))) { |
| + if ((this.definition instanceof TypeDefinition)) { |
| var typeDef = (($0 = this.definition) && $0.is$TypeDefinition()); |
| if ($notnull_bool(this.isClass)) { |
| - if ($notnull_bool(typeDef.extendsTypes != null && typeDef.extendsTypes.length > 0)) { |
| - if ($notnull_bool(typeDef.extendsTypes.length > 1)) { |
| + if (typeDef.extendsTypes != null && typeDef.extendsTypes.length > 0) { |
| + if (typeDef.extendsTypes.length > 1) { |
| world.error('more than one base class', typeDef.extendsTypes.$index(1).get$span()); |
| } |
| var extendsTypeRef = typeDef.extendsTypes.$index(0); |
| - if ($notnull_bool((extendsTypeRef instanceof GenericTypeReference))) { |
| + if ((extendsTypeRef instanceof GenericTypeReference)) { |
| var g = (extendsTypeRef && extendsTypeRef.is$GenericTypeReference()); |
| this.set$parent(this.resolveType(g.baseType, true)); |
| } |
| this.set$parent(this.resolveType((extendsTypeRef && extendsTypeRef.is$TypeReference()), true)); |
| - if ($notnull_bool(!$notnull_bool(this.get$parent().get$isClass()))) { |
| + if (!$notnull_bool(this.get$parent().get$isClass())) { |
| world.error('class may not extend an interface - use implements', typeDef.extendsTypes.$index(0).get$span()); |
| } |
| this.get$parent().addDirectSubtype(this); |
| @@ -18965,36 +19092,36 @@ DefinedType.prototype.resolve = function() { |
| } |
| } |
| else { |
| - if ($notnull_bool(!$notnull_bool(this.get$isObject()))) { |
| + if (!$notnull_bool(this.get$isObject())) { |
| this.set$parent(world.objectType); |
| } |
| } |
| this.interfaces = this._resolveInterfaces(typeDef.implementsTypes); |
| - if ($notnull_bool(typeDef.factoryType != null)) { |
| + if (typeDef.factoryType != null) { |
| world.error('factory not allowed on classes', typeDef.factoryType.span); |
| } |
| } |
| else { |
| - if ($notnull_bool(typeDef.implementsTypes != null && typeDef.implementsTypes.length > 0)) { |
| + if (typeDef.implementsTypes != null && typeDef.implementsTypes.length > 0) { |
| world.error('implements not allowed on interfaces (use extends)', typeDef.implementsTypes.$index(0).get$span()); |
| } |
| this.interfaces = this._resolveInterfaces(typeDef.extendsTypes); |
| var res = this._cycleInInterfaceExtends(); |
| - if ($notnull_bool(res >= 0)) { |
| + if (res >= 0) { |
| world.error(('interface "' + this.name + '" has a cycle in its inheritance chain'), typeDef.extendsTypes.$index(res).get$span()); |
| } |
| - if ($notnull_bool(typeDef.factoryType != null)) { |
| + if (typeDef.factoryType != null) { |
| this.factory_ = this.resolveType(typeDef.factoryType, true); |
| - if ($notnull_bool(this.factory_ == null)) { |
| + if (this.factory_ == null) { |
| world.warning('unresolved factory', typeDef.factoryType.span); |
| } |
| } |
| } |
| } |
| - else if ($notnull_bool((this.definition instanceof FunctionTypeDefinition))) { |
| + else if ((this.definition instanceof FunctionTypeDefinition)) { |
| this.interfaces = [world.functionType]; |
| } |
| - if ($notnull_bool(this.typeParameters != null)) { |
| + if (this.typeParameters != null) { |
| var $list = this.typeParameters; |
| for (var $i = 0;$i < $list.length; $i++) { |
| var tp = $list.$index($i); |
| @@ -19018,50 +19145,50 @@ DefinedType.prototype.resolve = function() { |
| ); |
| } |
| DefinedType.prototype.addMethod = function(methodName, definition) { |
| - if ($notnull_bool(methodName == null)) methodName = definition.name.name; |
| + if (methodName == null) methodName = definition.name.name; |
| var method = new MethodMember(methodName, this, definition); |
| if ($notnull_bool(method.get$isConstructor())) { |
| - if ($notnull_bool(this.constructors.containsKey(method.get$constructorName()))) { |
| + if (this.constructors.containsKey(method.get$constructorName())) { |
| world.error(('duplicate constructor definition of ' + method.get$name() + ''), definition.span); |
| return; |
| } |
| this.constructors.$setindex(method.get$constructorName(), method); |
| return; |
| } |
| - if ($notnull_bool(definition.modifiers != null && definition.modifiers.length == 1) && $eq(definition.modifiers.$index(0).kind, 75/*TokenKind.FACTORY*/)) { |
| - if ($notnull_bool(this.factories.getFactory(method.get$constructorName(), $assert_String(method.get$name())) != null)) { |
| + if ($notnull_bool(definition.modifiers != null && definition.modifiers.length == 1 && $eq(definition.modifiers.$index(0).kind, 75/*TokenKind.FACTORY*/))) { |
| + if (this.factories.getFactory(method.get$constructorName(), $assert_String(method.get$name())) != null) { |
| world.error(('duplicate factory definition of "' + method.get$name() + '"'), definition.span); |
| return; |
| } |
| this.factories.addFactory(method.get$constructorName(), $assert_String(method.get$name()), (method && method.is$Member())); |
| return; |
| } |
| - if ($notnull_bool(methodName.startsWith('get\$') || methodName.startsWith('set\$'))) { |
| + if (methodName.startsWith('get\$') || methodName.startsWith('set\$')) { |
| var propName = methodName.substring(4); |
| var prop = this.members.$index(propName); |
| if ($notnull_bool(prop == null)) { |
| prop = new PropertyMember($assert_String(propName), this); |
| this.members.$setindex(propName, prop); |
| } |
| - if ($notnull_bool(!(prop instanceof PropertyMember))) { |
| + if (!(prop instanceof PropertyMember)) { |
| world.error(('property conflicts with field "' + propName + '"'), definition.span); |
| return; |
| } |
| - if ($notnull_bool(methodName[0] == 'g')) { |
| - if ($notnull_bool(prop.getter != null)) { |
| + if (methodName[0] == 'g') { |
| + if (prop.getter != null) { |
| world.error(('duplicate getter definition for "' + propName + '"'), definition.span); |
| } |
| prop.getter = (method && method.is$MethodMember()); |
| } |
| else { |
| - if ($notnull_bool(prop.setter != null)) { |
| + if (prop.setter != null) { |
| world.error(('duplicate setter definition for "' + propName + '"'), definition.span); |
| } |
| prop.setter = (method && method.is$MethodMember()); |
| } |
| return; |
| } |
| - if ($notnull_bool(this.members.containsKey(methodName))) { |
| + if (this.members.containsKey(methodName)) { |
| world.error(('duplicate method definition of "' + method.get$name() + '"'), definition.span); |
| return; |
| } |
| @@ -19069,14 +19196,14 @@ DefinedType.prototype.addMethod = function(methodName, definition) { |
| } |
| DefinedType.prototype.addField = function(definition) { |
| for (var i = 0; |
| - $notnull_bool(i < definition.names.length); i++) { |
| + i < definition.names.length; i++) { |
| var name = definition.names.$index(i).get$name(); |
| - if ($notnull_bool(this.members.containsKey(name))) { |
| + if (this.members.containsKey(name)) { |
| world.error(('duplicate field definition of "' + name + '"'), definition.span); |
| return; |
| } |
| var value = null; |
| - if ($notnull_bool(definition.values != null)) { |
| + if (definition.values != null) { |
| value = definition.values.$index(i); |
| } |
| var field = new FieldMember($assert_String(name), this, definition, value); |
| @@ -19098,7 +19225,7 @@ DefinedType.prototype.getFactory = function(type, constructorName) { |
| DefinedType.prototype.getConstructor = function(constructorName) { |
| var ret = this.constructors.$index(constructorName); |
| if ($notnull_bool($ne(ret, null))) { |
| - if ($notnull_bool(this.factory_ != null)) { |
| + if (this.factory_ != null) { |
| return this.factory_.getFactory(this, constructorName); |
| } |
| return ret; |
| @@ -19109,7 +19236,7 @@ DefinedType.prototype.getConstructor = function(constructorName) { |
| } |
| DefinedType.prototype._tryCreateDefaultConstructor = function(name) { |
| var $0; |
| - if ($notnull_bool(name == '' && this.definition != null) && this.isClass && this.constructors.get$length() == 0) { |
| + if ($notnull_bool(name == '' && this.definition != null && this.isClass) && this.constructors.get$length() == 0) { |
| var span = this.definition.span; |
| var inits = null, body = null; |
| if ($notnull_bool(this.isNativeType)) { |
| @@ -19131,10 +19258,10 @@ DefinedType.prototype._tryCreateDefaultConstructor = function(name) { |
| DefinedType.prototype.getMember = function(memberName) { |
| var $0; |
| var member = (($0 = this.members.$index(memberName)) && $0.is$Member()); |
| - if ($notnull_bool(member != null)) { |
| + if (member != null) { |
| var parentMember = this.getMemberInParents(memberName); |
| if ($notnull_bool($ne(parentMember, null))) { |
| - if ($notnull_bool(!$notnull_bool(member.get$isPrivate()) || $eq(member.get$library(), parentMember.get$library()))) { |
| + if (!$notnull_bool(member.get$isPrivate()) || $eq(member.get$library(), parentMember.get$library())) { |
| member.override(parentMember); |
| } |
| } |
| @@ -19150,11 +19277,11 @@ DefinedType.prototype.getMember = function(memberName) { |
| } |
| DefinedType.prototype.getMemberInParents = function(memberName) { |
| if ($notnull_bool(this.isClass)) { |
| - if ($notnull_bool(this.get$parent() != null)) { |
| + if (this.get$parent() != null) { |
| return this.get$parent().getMember(memberName); |
| } |
| else if ($notnull_bool(this.get$isObject())) { |
| - if ($notnull_bool(memberName == '\$ne')) { |
| + if (memberName == '\$ne') { |
| var ret = this._createNotEqualMember(); |
| this.members.$setindex(memberName, ret); |
| return (ret && ret.is$Member()); |
| @@ -19163,7 +19290,7 @@ DefinedType.prototype.getMemberInParents = function(memberName) { |
| } |
| } |
| else { |
| - if ($notnull_bool(this.interfaces != null && this.interfaces.length > 0)) { |
| + if (this.interfaces != null && this.interfaces.length > 0) { |
| var $list = this.interfaces; |
| for (var $i = 0;$i < $list.length; $i++) { |
| var i = $list.$index($i); |
| @@ -19182,9 +19309,9 @@ DefinedType.prototype.getMemberInParents = function(memberName) { |
| DefinedType.prototype.resolveMember = function(memberName) { |
| var $0; |
| var ret = (($0 = this._resolvedMembers.$index(memberName)) && $0.is$MemberSet()); |
| - if ($notnull_bool(ret != null)) return ret; |
| + if (ret != null) return ret; |
| var member = this.getMember(memberName); |
| - if ($notnull_bool(member == null)) { |
| + if (member == null) { |
| return null; |
| } |
| ret = new MemberSet(member); |
| @@ -19211,7 +19338,7 @@ DefinedType.prototype.resolveMember = function(memberName) { |
| DefinedType.prototype._createNotEqualMember = function() { |
| var $0; |
| var eq = (($0 = this.members.$index('\$eq')) && $0.is$MethodMember()); |
| - if ($notnull_bool(eq == null)) { |
| + if (eq == null) { |
| world.internalError('INTERNAL: object does not define ==', this.definition.span); |
| } |
| var ne = new MethodMember('\$ne', this, eq.definition); |
| @@ -19223,7 +19350,7 @@ DefinedType.prototype._createNotEqualMember = function() { |
| return ne; |
| } |
| DefinedType._getDottedName = function(type) { |
| - if ($notnull_bool(type.names != null)) { |
| + if (type.names != null) { |
| var names = map(type.names, (function (n) { |
| return n.get$name(); |
| }) |
| @@ -19236,18 +19363,18 @@ DefinedType._getDottedName = function(type) { |
| } |
| DefinedType.prototype.resolveType = function(node, typeErrors) { |
| var $0; |
| - if ($notnull_bool(node == null)) return world.varType; |
| - if ($notnull_bool(node.type != null)) return node.type; |
| - if ($notnull_bool((node instanceof NameTypeReference))) { |
| + if (node == null) return world.varType; |
| + if (node.type != null) return node.type; |
| + if ((node instanceof NameTypeReference)) { |
| var typeRef = (node && node.is$NameTypeReference()); |
| var name; |
| - if ($notnull_bool(typeRef.names != null)) { |
| + if (typeRef.names != null) { |
| name = $assert_String(typeRef.names.last().get$name()); |
| } |
| else { |
| name = typeRef.name.name; |
| } |
| - if ($notnull_bool(this.typeParameters != null)) { |
| + if (this.typeParameters != null) { |
| var $list = this.typeParameters; |
| for (var $i = 0;$i < $list.length; $i++) { |
| var tp = $list.$index($i); |
| @@ -19256,10 +19383,10 @@ DefinedType.prototype.resolveType = function(node, typeErrors) { |
| } |
| } |
| } |
| - if ($notnull_bool(typeRef.type == null)) { |
| + if (typeRef.type == null) { |
| typeRef.type = this.library.findType(typeRef); |
| } |
| - if ($notnull_bool(typeRef.type == null)) { |
| + if (typeRef.type == null) { |
| var message = ('can not find type ' + DefinedType._getDottedName(typeRef) + ''); |
| if ($notnull_bool(typeErrors)) { |
| world.error($assert_String(message), typeRef.span); |
| @@ -19271,20 +19398,20 @@ DefinedType.prototype.resolveType = function(node, typeErrors) { |
| } |
| } |
| } |
| - else if ($notnull_bool((node instanceof GenericTypeReference))) { |
| + else if ((node instanceof GenericTypeReference)) { |
| var typeRef = (node && node.is$GenericTypeReference()); |
| var baseType = this.resolveType(typeRef.baseType, typeErrors); |
| - if ($notnull_bool(!$notnull_bool(baseType.get$isGeneric()))) { |
| + if (!$notnull_bool(baseType.get$isGeneric())) { |
| world.error(('' + baseType.get$name() + ' is not generic'), typeRef.span); |
| return null; |
| } |
| - if ($notnull_bool(typeRef.typeArguments.length != baseType.get$typeParameters().length)) { |
| + if (typeRef.typeArguments.length != baseType.get$typeParameters().length) { |
| world.error('wrong number of type arguments', typeRef.span); |
| return null; |
| } |
| var typeArgs = []; |
| for (var i = 0; |
| - $notnull_bool(i < typeRef.typeArguments.length); i++) { |
| + i < typeRef.typeArguments.length; i++) { |
| var extendsType = baseType.get$typeParameters().$index(i).extendsType; |
| var typeArg = this.resolveType((($0 = typeRef.typeArguments.$index(i)) && $0.is$TypeReference()), typeErrors); |
| typeArgs.add(typeArg); |
| @@ -19294,10 +19421,10 @@ DefinedType.prototype.resolveType = function(node, typeErrors) { |
| } |
| typeRef.type = baseType.getOrMakeConcreteType(typeArgs); |
| } |
| - else if ($notnull_bool((node instanceof FunctionTypeReference))) { |
| + else if ((node instanceof FunctionTypeReference)) { |
| var typeRef = (node && node.is$FunctionTypeReference()); |
| var name = ''; |
| - if ($notnull_bool(typeRef.func.name != null)) name = typeRef.func.name.name; |
| + if (typeRef.func.name != null) name = typeRef.func.name.name; |
| typeRef.type = this.library.getOrAddFunctionType($assert_String(name), typeRef.func, this); |
| } |
| else { |
| @@ -19309,11 +19436,11 @@ DefinedType.prototype.resolveTypeParams = function(inType) { |
| return this; |
| } |
| DefinedType.prototype.getOrMakeConcreteType = function(typeArgs) { |
| - $assert(this.get$isGeneric(), "isGeneric", "type.dart", 1162, 12); |
| + $assert(this.get$isGeneric(), "isGeneric", "type.dart", 1226, 12); |
| var names = [this.name]; |
| var typeMap = $map([]); |
| for (var i = 0; |
| - $notnull_bool(i < typeArgs.length); i++) { |
| + i < typeArgs.length; i++) { |
| var paramName = this.typeParameters.$index(i).get$name(); |
| typeMap.$setindex(paramName, typeArgs.$index(i)); |
| names.add(typeArgs.$index(i).get$name()); |
| @@ -19327,9 +19454,9 @@ DefinedType.prototype.getOrMakeConcreteType = function(typeArgs) { |
| return (ret && ret.is$lang_Type()); |
| } |
| DefinedType.prototype.getCallStub = function(args) { |
| - $assert(this.get$isFunction(), "isFunction", "type.dart", 1182, 12); |
| + $assert(this.get$isFunction(), "isFunction", "type.dart", 1246, 12); |
| var name = _getCallStubName('call', args); |
| - if ($notnull_bool(this.varStubs == null)) this.varStubs = $map([]); |
| + if (this.varStubs == null) this.varStubs = $map([]); |
| var stub = this.varStubs.$index(name); |
| if ($notnull_bool(stub == null)) { |
| stub = new VarFunctionStub($assert_String(name), args); |
| @@ -19343,6 +19470,7 @@ function FixedCollection(value, length) { |
| this.length = length; |
| // Initializers done |
| } |
| +FixedCollection.prototype.is$Collection$Type = function(){return this;}; |
| FixedCollection.prototype.is$Iterable = function(){return this;}; |
| FixedCollection.prototype.get$value = function() { return this.value; }; |
| FixedCollection.prototype.iterator = function() { |
| @@ -19367,6 +19495,7 @@ function FixedCollection$Type(value, length) { |
| // Initializers done |
| } |
| $inherits(FixedCollection$Type, FixedCollection); |
| +FixedCollection$Type.prototype.is$Collection$Type = function(){return this;}; |
| FixedCollection$Type.prototype.is$Iterable = function(){return this;}; |
| // ********** Code for FixedIterator ************** |
| function FixedIterator(value, length) { |
| @@ -19402,7 +19531,7 @@ function Value(type, code, span, needsTemp) { |
| this.span = span; |
| this.needsTemp = needsTemp; |
| // Initializers done |
| - if ($notnull_bool(this.type == null)) world.internalError('type passed as null', this.span); |
| + if (this.type == null) world.internalError('type passed as null', this.span); |
| } |
| Value.prototype.is$Value = function(){return this;}; |
| Value.prototype.get$span = function() { return this.span; }; |
| @@ -19436,13 +19565,14 @@ Value.prototype.set_ = function(context, name, node, value, isDynamic) { |
| } |
| Value.prototype.invoke = function(context, name, node, args, isDynamic) { |
| if ($notnull_bool(this.get$_typeIsVarOrParameterType() && name == '\$ne')) { |
| - if ($notnull_bool(args.values.length != 1)) { |
| + if (args.values.length != 1) { |
| world.warning('wrong number of arguments for !=', node.span); |
| } |
| + var eq = this.invoke(context, '\$eq', node, args, isDynamic); |
| world.gen.corejs.useOperator('\$ne'); |
| - return new Value(world.varType, ('\$ne(' + this.code + ', ' + args.values.$index(0).code + ')'), node.span, true); |
| + return new Value(eq.type, ('\$ne(' + this.code + ', ' + args.values.$index(0).code + ')'), node.span, true); |
| } |
| - if ($notnull_bool(name == '\$call')) { |
| + if (name == '\$call') { |
| if ($notnull_bool(this.isType)) { |
| world.error('must use "new" or "const" to construct a new instance', node.span); |
| } |
| @@ -19487,16 +19617,16 @@ Value.prototype._tryResolveMember = function(context, name) { |
| } |
| Value.prototype._resolveMember = function(context, name, node, isDynamic) { |
| var member; |
| - if ($notnull_bool(!$notnull_bool(this.get$_typeIsVarOrParameterType()))) { |
| + if (!$notnull_bool(this.get$_typeIsVarOrParameterType())) { |
| member = this._tryResolveMember(context, name); |
| if ($notnull_bool($ne(member, null) && this.isType) && !$notnull_bool(member.get$isStatic())) { |
| - if ($notnull_bool(!$notnull_bool(isDynamic))) { |
| + if (!$notnull_bool(isDynamic)) { |
| world.error('can not refer to instance member as static', node.span); |
| } |
| return null; |
| } |
| if ($notnull_bool(member == null && !$notnull_bool(isDynamic)) && !$notnull_bool(this._hasOverriddenNoSuchMethod())) { |
| - var typeName = $notnull_bool(this.type.name == null) ? this.type.get$library().name : this.type.name; |
| + var typeName = this.type.name == null ? this.type.get$library().name : this.type.name; |
| var message = ('can not resolve "' + name + '" on "' + typeName + '"'); |
| if ($notnull_bool(this.isType)) { |
| world.error($assert_String(message), node.span); |
| @@ -19566,10 +19696,10 @@ Value.prototype.convertTo = function(context, toType, node, isDynamic) { |
| fromType = world.objectType; |
| } |
| var bothNum = $notnull_bool(this.type.get$isNum() && toType.get$isNum()); |
| - if ($notnull_bool(!$notnull_bool(checked) || fromType.isSubtypeOf(toType)) || bothNum) { |
| + if ($notnull_bool($notnull_bool(!$notnull_bool(checked) || fromType.isSubtypeOf(toType)) || bothNum)) { |
| return this; |
| } |
| - if ($notnull_bool(!$notnull_bool(toType.isSubtypeOf(this.type)))) { |
| + if ($notnull_bool(checked && !$notnull_bool(toType.isSubtypeOf(this.type)))) { |
| this.convertWarning(toType, node); |
| } |
| if ($notnull_bool(options.enableTypeChecks)) { |
| @@ -19579,31 +19709,14 @@ Value.prototype.convertTo = function(context, toType, node, isDynamic) { |
| return this; |
| } |
| } |
| -Value.prototype.convertToNonNullBool = function(context, node) { |
| - if ($notnull_bool(!$notnull_bool(this.type.isAssignable(world.boolType)))) { |
| - this.convertWarning(world.boolType, node); |
| - } |
| - if ($notnull_bool(!$notnull_bool(options.enableTypeChecks))) { |
| - return this; |
| - } |
| - else { |
| - if ($notnull_bool(this.code.startsWith('\$notnull_bool'))) { |
| - return this; |
| - } |
| - else { |
| - world.gen.corejs.useNotNullBool = true; |
| - return new Value(world.boolType, ('\$notnull_bool(' + this.code + ')'), this.span, true); |
| - } |
| - } |
| -} |
| Value.prototype._isDomCallback = function(toType) { |
| - return ($notnull_bool((toType.get$definition() instanceof FunctionTypeDefinition) && $eq(toType.get$library(), world.get$dom()))); |
| + return ((toType.get$definition() instanceof FunctionTypeDefinition) && $eq(toType.get$library(), world.get$dom())); |
| } |
| Value.prototype._wrapDomCallback = function(toType, arity) { |
| return new Value(toType, ('\$wrap_call\$' + arity + '(' + this.code + ')'), this.span, true); |
| } |
| Value.prototype._typeAssert = function(context, toType, node) { |
| - if ($notnull_bool((toType instanceof ParameterType))) { |
| + if ((toType instanceof ParameterType)) { |
| var p = (toType && toType.is$ParameterType()); |
| toType = p.extendsType; |
| } |
| @@ -19614,13 +19727,17 @@ Value.prototype._typeAssert = function(context, toType, node) { |
| var check; |
| if ($notnull_bool(toType.get$isVoid())) { |
| check = ('\$assert_void(' + this.code + ')'); |
| - if ($notnull_bool(toType.typeCheckCode == null)) { |
| + if (toType.typeCheckCode == null) { |
| toType.typeCheckCode = "function $assert_void(x) {\n return x == null ? x : x.is$void(); // throws TypeError\n}"; |
| } |
| } |
| + else if ($eq(toType, world.nonNullBool)) { |
| + world.gen.corejs.useNotNullBool = true; |
| + check = ('\$notnull_bool(' + this.code + ')'); |
| + } |
| else if ($notnull_bool(toType.get$library().get$isCore() && toType.get$typeofName() != null)) { |
| check = ('\$assert_' + toType.name + '(' + this.code + ')'); |
| - if ($notnull_bool(toType.typeCheckCode == null)) { |
| + if (toType.typeCheckCode == null) { |
| toType.typeCheckCode = ("function $assert_" + toType.name + "(x) {\n if (x == null || typeof(x) == \"" + toType.get$typeofName() + "\") return x;\n throw new TypeError(\"'\" + x + \"' is not a " + toType.name + ".\");\n}"); |
| } |
| } |
| @@ -19629,17 +19746,17 @@ Value.prototype._typeAssert = function(context, toType, node) { |
| var temp = context.getTemp(this); |
| check = ('(' + context.assignTemp((temp && temp.is$Value()), this).code + ' &&'); |
| check = check + (' ' + temp.code + '.is\$' + toType.get$jsname() + '())'); |
| - if ($notnull_bool($ne(this, temp))) context.freeTemp((temp && temp.is$Value())); |
| + if ($ne(this, temp)) context.freeTemp((temp && temp.is$Value())); |
| } |
| return new Value(toType, check, this.span, true); |
| } |
| Value.prototype.instanceOf = function(context, toType, span, isTrue, forceCheck) { |
| if ($notnull_bool(toType.get$isVar())) { |
| world.error('can not resolve type', span); |
| - return EvaluatedValue.EvaluatedValue$factory(world.boolType, true, 'true', null); |
| + return EvaluatedValue.EvaluatedValue$factory(world.nonNullBool, true, 'true', null); |
| } |
| - if ($notnull_bool((toType instanceof ParameterType))) { |
| - return EvaluatedValue.EvaluatedValue$factory(world.boolType, true, 'true', null); |
| + if ((toType instanceof ParameterType)) { |
| + return EvaluatedValue.EvaluatedValue$factory(world.nonNullBool, true, 'true', null); |
| } |
| var testCode = null; |
| if ($notnull_bool(toType.get$library().get$isCore())) { |
| @@ -19651,11 +19768,11 @@ Value.prototype.instanceOf = function(context, toType, span, isTrue, forceCheck) |
| if ($notnull_bool(toType.get$isClass() && !(toType instanceof ConcreteType))) { |
| toType.markUsed(); |
| testCode = ('(' + this.code + ' instanceof ' + toType.get$jsname() + ')'); |
| - if ($notnull_bool(!$notnull_bool(isTrue))) { |
| + if (!$notnull_bool(isTrue)) { |
| testCode = '!' + testCode; |
| } |
| } |
| - if ($notnull_bool(testCode == null)) { |
| + if (testCode == null) { |
| toType.isTested = true; |
| var temp = context.getTemp(this); |
| testCode = ('(' + context.assignTemp((temp && temp.is$Value()), this).code + ' &&'); |
| @@ -19666,9 +19783,9 @@ Value.prototype.instanceOf = function(context, toType, span, isTrue, forceCheck) |
| else { |
| testCode = '!' + testCode; |
| } |
| - if ($notnull_bool($ne(this, temp))) context.freeTemp((temp && temp.is$Value())); |
| + if ($ne(this, temp)) context.freeTemp((temp && temp.is$Value())); |
| } |
| - return new Value(world.boolType, testCode, span, true); |
| + return new Value(world.nonNullBool, testCode, span, true); |
| } |
| Value.prototype.convertWarning = function(toType, node) { |
| world.warning(('type "' + this.type.name + '" is not assignable to "' + toType.name + '"'), node.span); |
| @@ -19676,10 +19793,10 @@ Value.prototype.convertWarning = function(toType, node) { |
| Value.prototype.invokeNoSuchMethod = function(context, name, node, args) { |
| var $0; |
| var pos = ''; |
| - if ($notnull_bool(args != null)) { |
| + if (args != null) { |
| var argsCode = []; |
| for (var i = 0; |
| - $notnull_bool(i < args.get$length()); i++) { |
| + i < args.get$length(); i++) { |
| argsCode.add(args.values.$index(i).code); |
| } |
| pos = Strings.join((argsCode && argsCode.is$List$String()), ", "); |
| @@ -19688,14 +19805,14 @@ Value.prototype.invokeNoSuchMethod = function(context, name, node, args) { |
| return (($0 = this._resolveMember(context, 'noSuchMethod', node, false).invoke$4(context, node, this, new Arguments(null, noSuchArgs))) && $0.is$Value()); |
| } |
| Value.prototype.invokeSpecial = function(name, args, returnType) { |
| - $assert(name.startsWith('\$'), "name.startsWith('\\$')", "value.dart", 464, 12); |
| - $assert(!$notnull_bool(args.get$hasNames()), "!args.hasNames", "value.dart", 465, 12); |
| + $assert(name.startsWith('\$'), "name.startsWith('\\$')", "value.dart", 449, 12); |
| + $assert(!$notnull_bool(args.get$hasNames()), "!args.hasNames", "value.dart", 450, 12); |
| var argsString = args.getCode(); |
| - if ($notnull_bool(name == '\$index' || name == '\$setindex')) { |
| + if (name == '\$index' || name == '\$setindex') { |
| return new Value(returnType, ('' + this.code + '.' + name + '(' + argsString + ')'), this.span, true); |
| } |
| else { |
| - if ($notnull_bool(argsString.length > 0)) argsString = (', ' + argsString + ''); |
| + if (argsString.length > 0) argsString = (', ' + argsString + ''); |
| world.gen.corejs.useOperator(name); |
| return new Value(returnType, ('' + name + '(' + this.code + '' + argsString + ')'), this.span, true); |
| } |
| @@ -19725,7 +19842,7 @@ EvaluatedValue.prototype.get$isConst = function() { |
| EvaluatedValue.prototype.get$canonicalCode = function() { return this.canonicalCode; }; |
| EvaluatedValue.prototype.set$canonicalCode = function(value) { return this.canonicalCode = value; }; |
| EvaluatedValue.codeWithComments = function(canonicalCode, span) { |
| - return $notnull_bool(($notnull_bool(span != null && span.get$text() != canonicalCode))) ? ('' + canonicalCode + '/*' + span.get$text() + '*/') : canonicalCode; |
| + return (span != null && span.get$text() != canonicalCode) ? ('' + canonicalCode + '/*' + span.get$text() + '*/') : canonicalCode; |
| } |
| // ********** Code for ConstListValue ************** |
| function ConstListValue() {} |
| @@ -19751,7 +19868,7 @@ $inherits(ConstMapValue, EvaluatedValue); |
| ConstMapValue.ConstMapValue$factory = function(type, keyValuePairs, actualValue, canonicalCode, span) { |
| var values = new HashMapImplementation$String$EvaluatedValue(); |
| for (var i = 0; |
| - $notnull_bool(i < keyValuePairs.length); i += 2) { |
| + i < keyValuePairs.length; i += 2) { |
| values.$setindex(keyValuePairs.$index(i).get$actualValue(), keyValuePairs.$index(i + 1)); |
| } |
| return new ConstMapValue._internal$ctor(type, values, actualValue, canonicalCode, span, EvaluatedValue.codeWithComments(canonicalCode, span)); |
| @@ -19818,28 +19935,28 @@ GlobalValue.prototype.get$actualValue = function() { |
| return this.exp.get$dynamic().get$actualValue(); |
| } |
| GlobalValue.prototype.compareTo = function(other) { |
| - if ($notnull_bool($eq(other, this))) { |
| + if ($eq(other, this)) { |
| return 0; |
| } |
| - else if ($notnull_bool(this.dependencies.indexOf(other, 0) >= 0)) { |
| + else if (this.dependencies.indexOf(other, 0) >= 0) { |
| return 1; |
| } |
| - else if ($notnull_bool(other.dependencies.indexOf(this, 0) >= 0)) { |
| + else if (other.dependencies.indexOf(this, 0) >= 0) { |
| return -1; |
| } |
| - else if ($notnull_bool(this.dependencies.length > other.dependencies.length)) { |
| + else if (this.dependencies.length > other.dependencies.length) { |
| return 1; |
| } |
| - else if ($notnull_bool(this.dependencies.length < other.dependencies.length)) { |
| + else if (this.dependencies.length < other.dependencies.length) { |
| return -1; |
| } |
| - else if ($notnull_bool(this.name == null && other.name != null)) { |
| + else if (this.name == null && other.name != null) { |
| return 1; |
| } |
| - else if ($notnull_bool(this.name != null && other.name == null)) { |
| + else if (this.name != null && other.name == null) { |
| return -1; |
| } |
| - else if ($notnull_bool(this.name != null)) { |
| + else if (this.name != null) { |
| return this.name.compareTo(other.name); |
| } |
| else { |
| @@ -19855,10 +19972,10 @@ function BareValue(home, outermost, span) { |
| } |
| $inherits(BareValue, Value); |
| BareValue.prototype._tryResolveMember = function(context, name) { |
| - $assert($eq(context, this.home), "context == home", "value.dart", 669, 12); |
| + $assert($eq(context, this.home), "context == home", "value.dart", 654, 12); |
| var member = this.type.resolveMember(name); |
| if ($notnull_bool($ne(member, null))) { |
| - $assert(this.code == null, "code == null", "value.dart", 674, 14); |
| + $assert(this.code == null, "code == null", "value.dart", 659, 14); |
| if ($notnull_bool(this.isType)) { |
| this.code = this.type.get$jsname(); |
| } |
| @@ -19880,7 +19997,7 @@ function CompilerException(_message, _location) { |
| // Initializers done |
| } |
| CompilerException.prototype.toString = function() { |
| - if ($notnull_bool(this._location != null)) { |
| + if (this._location != null) { |
| return ('CompilerException: ' + this._location.toMessageString(this._lang_message) + ''); |
| } |
| else { |
| @@ -19929,9 +20046,10 @@ World.prototype.init = function() { |
| this.listType = (($0 = this._addToCoreLib('List', false)) && $0.is$DefinedType()); |
| this.mapType = (($0 = this._addToCoreLib('Map', false)) && $0.is$DefinedType()); |
| this.functionType = (($0 = this._addToCoreLib('Function', false)) && $0.is$DefinedType()); |
| + this.nonNullBool = new NonNullableType(this.boolType); |
| } |
| World.prototype._addMember = function(member) { |
| - $assert(!$notnull_bool(member.get$isPrivate()), "!member.isPrivate", "world.dart", 141, 12); |
| + $assert(!$notnull_bool(member.get$isPrivate()), "!member.isPrivate", "world.dart", 145, 12); |
| if ($notnull_bool(member.get$isStatic())) { |
| if ($notnull_bool(member.declaringType.get$isTop())) { |
| this._addTopName(member); |
| @@ -19986,7 +20104,7 @@ World.prototype._addJavascriptTopName = function(named) { |
| this._topNames.$setindex(named.get$jsname(), named); |
| } |
| World.prototype._addType = function(type) { |
| - if ($notnull_bool(!$notnull_bool(type.get$isTop()))) this._addTopName(type); |
| + if (!$notnull_bool(type.get$isTop())) this._addTopName(type); |
| } |
| World.prototype._addToCoreLib = function(name, isClass) { |
| var ret = new DefinedType(name, this.corelib, null, isClass); |
| @@ -19994,10 +20112,10 @@ World.prototype._addToCoreLib = function(name, isClass) { |
| return ret; |
| } |
| World.prototype.toJsIdentifier = function(name) { |
| - if ($notnull_bool(this._jsKeywords == null)) { |
| + if (this._jsKeywords == null) { |
| this._jsKeywords = HashSetImplementation.HashSetImplementation$from$factory(['break', 'case', 'catch', 'continue', 'debugger', 'default', 'delete', 'do', 'else', 'finally', 'for', 'function', 'if', 'in', 'instanceof', 'new', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'var', 'void', 'while', 'with', 'class', 'enum', 'export', 'extends', 'import', 'super', 'implements', 'interface', 'let', 'package', 'private', 'protected', 'public', 'static', 'yield', 'native']); |
| } |
| - if ($notnull_bool(this._jsKeywords.contains(name))) { |
| + if (this._jsKeywords.contains(name)) { |
| return name + '_'; |
| } |
| else { |
| @@ -20005,13 +20123,13 @@ World.prototype.toJsIdentifier = function(name) { |
| } |
| } |
| World.prototype.compile = function() { |
| - if ($notnull_bool(options.dartScript == null)) { |
| + if (options.dartScript == null) { |
| this.fatal('no script provided to compile'); |
| return false; |
| } |
| try { |
| this.info(('compiling ' + options.dartScript + ' with corelib ' + this.corelib + '')); |
| - if ($notnull_bool(!$notnull_bool(this.runLeg()))) this.runCompilationPhases(); |
| + if (!$notnull_bool(this.runLeg())) this.runCompilationPhases(); |
| } catch (exc) { |
| exc = $toDartException(exc); |
| if ($notnull_bool(this.get$hasErrors() && !$notnull_bool(options.throwOnErrors))) { |
| @@ -20025,7 +20143,7 @@ World.prototype.compile = function() { |
| } |
| World.prototype.runLeg = function() { |
| var $this = this; // closure support |
| - if ($notnull_bool(!$notnull_bool(options.enableLeg))) return false; |
| + if (!$notnull_bool(options.enableLeg)) return false; |
| var res = $assert_bool(this.withTiming('try leg compile', (function () { |
| return compile($this); |
| }) |
| @@ -20052,7 +20170,7 @@ World.prototype.runCompilationPhases = function() { |
| if ($notnull_bool(mainMembers == null || mainMembers.get$members().length == 0)) { |
| $this.fatal('no main method specified'); |
| } |
| - else if ($notnull_bool(mainMembers.get$members().length > 1)) { |
| + else if (mainMembers.get$members().length > 1) { |
| var $list = mainMembers.get$members(); |
| for (var $i = mainMembers.get$members().iterator(); $i.hasNext(); ) { |
| var m = $i.next(); |
| @@ -20071,8 +20189,8 @@ World.prototype.runCompilationPhases = function() { |
| ); |
| } |
| World.prototype.getGeneratedCode = function() { |
| - if ($notnull_bool(this.legCode != null)) { |
| - $assert(options.enableLeg, "options.enableLeg", "world.dart", 306, 14); |
| + if (this.legCode != null) { |
| + $assert(options.enableLeg, "options.enableLeg", "world.dart", 310, 14); |
| return this.legCode; |
| } |
| else { |
| @@ -20093,13 +20211,13 @@ World.prototype.readFile = function(filename) { |
| World.prototype.getOrAddLibrary = function(filename) { |
| var $0; |
| var library = (($0 = this.libraries.$index(filename)) && $0.is$Library()); |
| - if ($notnull_bool(library == null)) { |
| + if (library == null) { |
| library = new Library(this.readFile(filename)); |
| this.info(('read library ' + filename + '')); |
| - if ($notnull_bool(!$notnull_bool(library.get$isCore()) && !$notnull_bool(library.imports.some((function (li) { |
| + if (!$notnull_bool(library.get$isCore()) && !library.imports.some((function (li) { |
| return li.get$library().get$isCore(); |
| }) |
| - )))) { |
| + )) { |
| library.imports.add(new LibraryImport(this.corelib)); |
| } |
| this.libraries.$setindex(filename, library); |
| @@ -20108,7 +20226,7 @@ World.prototype.getOrAddLibrary = function(filename) { |
| return library; |
| } |
| World.prototype.process = function() { |
| - while ($notnull_bool(this._todo.length > 0)) { |
| + while (this._todo.length > 0) { |
| var todo = this._todo; |
| this._todo = []; |
| for (var $i = 0;$i < todo.length; $i++) { |
| @@ -20131,14 +20249,14 @@ World.prototype.resolveAll = function() { |
| } |
| World.prototype._message = function(message, span, span1, span2, throwing) { |
| var text = message; |
| - if ($notnull_bool(span != null)) { |
| + if (span != null) { |
| text = span.toMessageString(message); |
| } |
| print(text); |
| - if ($notnull_bool(span1 != null)) { |
| + if (span1 != null) { |
| print(span1.toMessageString(message)); |
| } |
| - if ($notnull_bool(span2 != null)) { |
| + if (span2 != null) { |
| print(span2.toMessageString(message)); |
| } |
| if ($notnull_bool(throwing)) { |
| @@ -20177,7 +20295,7 @@ World.prototype.printStatus = function() { |
| print(('compilation failed with ' + this.errors + ' errors')); |
| } |
| else { |
| - if ($notnull_bool(this.warnings > 0)) { |
| + if (this.warnings > 0) { |
| this.info(('compilation completed successfully with ' + this.warnings + ' warnings')); |
| } |
| else { |
| @@ -20216,7 +20334,7 @@ function FrogOptions(homedir, args, files) { |
| this.childArgs = []; |
| loop: |
| for (var i = 2; |
| - $notnull_bool(i < args.length); i++) { |
| + i < args.length; i++) { |
| var arg = args.$index(i); |
| switch (arg) { |
| case '--enable_leg': |
| @@ -20288,27 +20406,27 @@ function FrogOptions(homedir, args, files) { |
| default: |
| - if ($notnull_bool(arg.endsWith('.dart'))) { |
| + if (arg.endsWith('.dart')) { |
| this.dartScript = $assert_String(arg); |
| this.childArgs = (($0 = args.getRange(i + 1, args.length - i - 1)) && $0.is$List$String()); |
| break loop; |
| } |
| - else if ($notnull_bool(arg.startsWith('--out='))) { |
| + else if (arg.startsWith('--out=')) { |
| this.outfile = arg.substring('--out='.length); |
| } |
| - else if ($notnull_bool(arg.startsWith('--libdir='))) { |
| + else if (arg.startsWith('--libdir=')) { |
| this.libDir = arg.substring('--libdir='.length); |
| passedLibDir = true; |
| } |
| else { |
| - if ($notnull_bool(!$notnull_bool(ignoreUnrecognizedFlags))) { |
| + if (!$notnull_bool(ignoreUnrecognizedFlags)) { |
| print(('unrecognized flag: "' + arg + '"')); |
| } |
| } |
| } |
| } |
| - if ($notnull_bool(!$notnull_bool(passedLibDir) && !$notnull_bool(files.fileExists(this.libDir)))) { |
| + if (!$notnull_bool(passedLibDir) && !$notnull_bool(files.fileExists(this.libDir))) { |
| var temp = 'frog/lib'; |
| if ($notnull_bool(files.fileExists(temp))) { |
| this.libDir = $assert_String(temp); |
| @@ -20402,10 +20520,10 @@ function VarMethodStub(name, member, args, body) { |
| $inherits(VarMethodStub, VarMember); |
| VarMethodStub.prototype.get$returnType = function() { |
| var $0; |
| - return (($0 = $notnull_bool(this.member != null) ? this.member.get$returnType() : world.varType) && $0.is$lang_Type()); |
| + return (($0 = this.member != null ? this.member.get$returnType() : world.varType) && $0.is$lang_Type()); |
| } |
| VarMethodStub.prototype.get$typeName = function() { |
| - return $notnull_bool(this.member != null) ? this.member.declaringType.get$jsname() : 'Object'; |
| + return this.member != null ? this.member.declaringType.get$jsname() : 'Object'; |
| } |
| VarMethodStub.prototype.generate = function(code) { |
| code.write(('' + this.get$typeName() + '.prototype.' + this.name + ' = ')); |
| @@ -20423,14 +20541,14 @@ VarMethodStub.prototype.generateBody = function(code) { |
| } |
| } |
| VarMethodStub.prototype._useDirectCall = function(member, args) { |
| - if ($notnull_bool((member instanceof MethodMember) && $ne(member.declaringType.get$library(), world.get$dom()))) { |
| + if ((member instanceof MethodMember) && $ne(member.declaringType.get$library(), world.get$dom())) { |
| var method = (member && member.is$MethodMember()); |
| if ($notnull_bool(method.needsArgumentConversion(args))) { |
| return false; |
| } |
| for (var i = args.get$length(); |
| - $notnull_bool(i < method.parameters.length); i++) { |
| - if ($notnull_bool(method.parameters.$index(i).get$value().code != 'null')) { |
| + i < method.parameters.length; i++) { |
| + if (method.parameters.$index(i).get$value().code != 'null') { |
| return false; |
| } |
| } |
| @@ -20459,7 +20577,7 @@ VarMethodSet.prototype.invoke = function(context, node, target, args) { |
| return VarMember.prototype.invoke.call(this, context, node, target, args); |
| } |
| VarMethodSet.prototype._invokeMembers = function(context, node) { |
| - if ($notnull_bool(this._fallbackStubs != null)) return; |
| + if (this._fallbackStubs != null) return; |
| this._fallbackStubs = []; |
| var $list = this.members; |
| for (var $i = 0;$i < $list.length; $i++) { |
| @@ -20468,7 +20586,7 @@ VarMethodSet.prototype._invokeMembers = function(context, node) { |
| var result = member.invoke$4(context, node, target, this.args); |
| var stub = new VarMethodStub(this.name, member, this.args, result); |
| var type = member.declaringType; |
| - if ($notnull_bool($ne(type.get$library(), world.get$dom()) && !$notnull_bool(type.get$isObject()))) { |
| + if ($ne(type.get$library(), world.get$dom()) && !$notnull_bool(type.get$isObject())) { |
| VarMethodSet._addVarStub((type && type.is$lang_Type()), (stub && stub.is$VarMember())); |
| } |
| else { |
| @@ -20478,7 +20596,7 @@ VarMethodSet.prototype._invokeMembers = function(context, node) { |
| var target = new Value(world.objectType, 'this', node.span, true); |
| var result = target.invokeNoSuchMethod(context, this.get$baseName(), node, this.args); |
| var stub = new VarMethodStub(this.name, null, this.args, result); |
| - if ($notnull_bool(this._fallbackStubs.length == 0)) { |
| + if (this._fallbackStubs.length == 0) { |
| VarMethodSet._addVarStub(world.objectType, (stub && stub.is$VarMember())); |
| } |
| else { |
| @@ -20487,11 +20605,11 @@ VarMethodSet.prototype._invokeMembers = function(context, node) { |
| } |
| } |
| VarMethodSet._addVarStub = function(type, stub) { |
| - if ($notnull_bool(type.varStubs == null)) type.varStubs = $map([]); |
| + if (type.varStubs == null) type.varStubs = $map([]); |
| type.varStubs.$setindex(stub.name, stub); |
| } |
| VarMethodSet.prototype.generate = function(code) { |
| - if ($notnull_bool(this._fallbackStubs.length == 0)) return; |
| + if (this._fallbackStubs.length == 0) return; |
| code.enterBlock(('\$varMethod("' + this.name + '", {')); |
| var lastOne = this._fallbackStubs.$index(this._fallbackStubs.length - 1); |
| var $list = this._fallbackStubs; |
| @@ -20510,11 +20628,11 @@ VarMethodSet.prototype.invoke$4 = function($0, $1, $2, $3) { |
| // ********** Code for top level ************** |
| function map(source, mapper) { |
| var result = new ListFactory(); |
| - if ($notnull_bool(!!(source && source.is$List))) { |
| + if (!!(source && source.is$List)) { |
| var list = (source && source.is$List()); |
| result.length = list.length; |
| for (var i = 0; |
| - $notnull_bool(i < list.length); i++) { |
| + i < list.length; i++) { |
| result.$setindex(i, mapper(list.$index(i))); |
| } |
| } |
| @@ -20552,13 +20670,13 @@ function orderValuesByKeys(map) { |
| return values; |
| } |
| function isMultilineString(text) { |
| - return $notnull_bool(text.startsWith('"""') || text.startsWith("'''")); |
| + return text.startsWith('"""') || text.startsWith("'''"); |
| } |
| function isRawMultilineString(text) { |
| - return $notnull_bool(text.startsWith('@"""') || text.startsWith("@'''")); |
| + return text.startsWith('@"""') || text.startsWith("@'''"); |
| } |
| function parseStringLiteral(lit) { |
| - if ($notnull_bool(lit.startsWith('@'))) { |
| + if (lit.startsWith('@')) { |
| if ($notnull_bool(isRawMultilineString(lit))) { |
| return stripLeadingNewline(lit.substring(4, lit.length - 3)); |
| } |
| @@ -20575,11 +20693,11 @@ function parseStringLiteral(lit) { |
| } |
| } |
| function stripLeadingNewline(text) { |
| - if ($notnull_bool(text.startsWith('\n'))) { |
| + if (text.startsWith('\n')) { |
| return text.substring(1); |
| } |
| - else if ($notnull_bool(text.startsWith('\r'))) { |
| - if ($notnull_bool(text.startsWith('\r\n'))) { |
| + else if (text.startsWith('\r')) { |
| + if (text.startsWith('\r\n')) { |
| return text.substring(2); |
| } |
| else { |
| @@ -20600,10 +20718,10 @@ function lang_compile(homedir, args, files) { |
| parseOptions(homedir, args, files); |
| initializeWorld(files); |
| var success = world.compile(); |
| - if ($notnull_bool(options.outfile != null)) { |
| + if (options.outfile != null) { |
| if ($notnull_bool(success)) { |
| var code = world.getGeneratedCode(); |
| - if ($notnull_bool(!$notnull_bool(options.outfile.endsWith('.js')))) { |
| + if (!options.outfile.endsWith('.js')) { |
| code = '#!/usr/bin/env node\n' + code; |
| } |
| world.files.writeString(options.outfile, code); |
| @@ -20622,7 +20740,7 @@ function parseOptions(homedir, args, files) { |
| function _getCallStubName(name, args) { |
| var nameBuilder = new StringBufferImpl(('' + name + '\$' + args.get$bareCount() + '')); |
| for (var i = args.get$bareCount(); |
| - $notnull_bool(i < args.get$length()); i++) { |
| + i < args.get$length(); i++) { |
| nameBuilder.add('\$').add(args.getName(i)); |
| } |
| return nameBuilder.toString(); |
| @@ -20634,7 +20752,7 @@ function main() { |
| var argv = ListFactory.ListFactory$from$factory(process.argv); |
| if ($notnull_bool(lang_compile($assert_String(homedir), (argv && argv.is$List$String()), new NodeFileSystem()))) { |
| var code = world.getGeneratedCode(); |
| - if ($notnull_bool(!$notnull_bool(options.compileOnly))) { |
| + if (!$notnull_bool(options.compileOnly)) { |
| process.argv = [argv.$index(0), argv.$index(1)]; |
| process.argv.addAll(options.childArgs); |
| get$vm().runInNewContext($assert_String(code), createSandbox()); |