Index: frog/frogsh |
diff --git a/frog/frogsh b/frog/frogsh |
index bdd9d258b2036fd9138e96d9bc6135714950ba04..04561f786438bf43d20c19e34b401a377c307cef 100755 |
--- a/frog/frogsh |
+++ b/frog/frogsh |
@@ -108,13 +108,6 @@ function $toDartException(e) { |
res.stack = e.stack; |
return res; |
} |
-function $notnull_bool(test) { |
- return (test === true || test === false) ? test : test.is$bool(); // TypeError |
-} |
-function $assert(test, text, url, line, column) { |
- if (typeof test == 'function') test = test(); |
- if (!test) $throw(new AssertError(text, url, line, column)); |
-} |
function $throw(e) { |
// If e is not a value, we can use V8's captureStackTrace utility method. |
// TODO(jmesserly): capture the stack trace on other JS engines. |
@@ -136,11 +129,6 @@ Array.prototype.$index = function(i) { return this[i]; } |
String.prototype.$index = function(i) { return this[i]; } |
Object.prototype.$setindex = function(i, value) { return this[i] = value; } |
Array.prototype.$setindex = function(i, value) { return this[i] = value; } |
-function $add(x, y) { |
- return ((typeof(x) == 'number' && typeof(y) == 'number') || |
- (typeof(x) == 'string' && typeof(y) == 'string')) |
- ? x + y : x.$add(y); |
-} |
function $eq(x, y) { |
if (x == null) return y == null; |
return (typeof(x) == 'number' && typeof(y) == 'number') || |
@@ -191,20 +179,6 @@ Clock.now = function() { |
Clock.frequency = function() { |
return 1000; |
} |
-// ********** Code for AssertError ************** |
-function AssertError(failedAssertion, url, line, column) { |
- this.failedAssertion = failedAssertion; |
- this.url = url; |
- this.line = line; |
- this.column = column; |
- // Initializers done |
-} |
-AssertError.prototype.toString = function() { |
- return ("Failed assertion: '" + this.failedAssertion + "' is not true ") + ("in " + this.url + " at line " + this.line + ", column " + this.column + "."); |
-} |
-AssertError.prototype.toString$0 = function() { |
- return this.toString(); |
-}; |
// ********** Code for Object ************** |
Object.prototype.get$dynamic = function() { |
return this; |
@@ -236,9 +210,6 @@ Object.prototype.addMethod$2 = function($0, $1) { |
Object.prototype.addSource$1 = function($0) { |
return this.noSuchMethod("addSource", [$0]); |
}; |
-Object.prototype.appendByteStringToken$2 = function($0, $1) { |
- return this.noSuchMethod("appendByteStringToken", [$0, $1]); |
-}; |
Object.prototype.beginArguments$1 = function($0) { |
return this.noSuchMethod("beginArguments", [$0]); |
}; |
@@ -668,10 +639,6 @@ Object.prototype.visitSources$0 = function() { |
Object.prototype.writeDefinition$2 = function($0, $1) { |
return this.noSuchMethod("writeDefinition", [$0, $1]); |
}; |
-function $assert_bool(x) { |
- if (x == null || typeof(x) == "boolean") return x; |
- throw new TypeError("'" + x + "' is not a bool."); |
-} |
// ********** Code for IllegalAccessException ************** |
function IllegalAccessException() { |
// Initializers done |
@@ -821,14 +788,6 @@ Math.min = function(a, b) { |
if (isNaN(a)) return a; |
else return b; |
} |
-function $assert_num(x) { |
- if (x == null || typeof(x) == "number") return x; |
- throw new TypeError("'" + x + "' is not a num."); |
-} |
-function $assert_String(x) { |
- if (x == null || typeof(x) == "string") return x; |
- throw new TypeError("'" + x + "' is not a String."); |
-} |
// ********** Code for Strings ************** |
function Strings() {} |
Strings.String$fromCharCodes$factory = function(charCodes) { |
@@ -1343,26 +1302,14 @@ function isolate$deserializeMessage(message_) { |
function _IsolateJsUtil() {} |
// ********** Code for ListFactory ************** |
ListFactory = Array; |
-ListFactory.prototype.is$ListFactory = function(){return this;}; |
ListFactory.prototype.is$List = function(){return this;}; |
-ListFactory.prototype.is$List$ArgumentNode = function(){return this;}; |
-ListFactory.prototype.is$List$Definition = function(){return this;}; |
-ListFactory.prototype.is$List$EvaluatedValue = function(){return this;}; |
-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$E = function(){return this;}; |
-ListFactory.prototype.is$Collection$Object = 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 = []; |
for (var $i = other.iterator(); $i.hasNext$0(); ) { |
var e = $i.next$0(); |
list.add(e); |
} |
- return (list && list.is$ListFactory()); |
+ return list; |
} |
ListFactory.prototype.add = function(value) { |
this.push(value); |
@@ -1394,12 +1341,16 @@ ListFactory.prototype.isEmpty = function() { |
ListFactory.prototype.iterator = function() { |
return new ListIterator(this); |
} |
-ListFactory.prototype.add$1 = ListFactory.prototype.add; |
+ListFactory.prototype.add$1 = function($0) { |
+ return this.add($0); |
+}; |
ListFactory.prototype.addAll$1 = function($0) { |
- return this.addAll(($0 && $0.is$Collection$E())); |
+ return this.addAll($0); |
}; |
ListFactory.prototype.filter$1 = ListFactory.prototype.filter; |
-ListFactory.prototype.indexOf$2 = ListFactory.prototype.indexOf; |
+ListFactory.prototype.indexOf$2 = function($0, $1) { |
+ return this.indexOf($0, $1); |
+}; |
ListFactory.prototype.isEmpty$0 = function() { |
return this.isEmpty(); |
}; |
@@ -1428,7 +1379,6 @@ function ListIterator(array) { |
this._pos = 0; |
// Initializers done |
} |
-ListIterator.prototype.is$Iterator$T = function(){return this;}; |
ListIterator.prototype.hasNext = function() { |
return this._array.length > this._pos; |
} |
@@ -1510,9 +1460,11 @@ ImmutableList.prototype.clear = function() { |
ImmutableList.prototype.removeLast = function() { |
$throw(const$12/*const IllegalAccessException()*/); |
} |
-ImmutableList.prototype.add$1 = ImmutableList.prototype.add; |
+ImmutableList.prototype.add$1 = function($0) { |
+ return this.add($0); |
+}; |
ImmutableList.prototype.addAll$1 = function($0) { |
- return this.addAll(($0 && $0.is$Collection$E())); |
+ return this.addAll($0); |
}; |
ImmutableList.prototype.removeLast$0 = function() { |
return this.removeLast(); |
@@ -1527,8 +1479,6 @@ function ImmutableMap(keyValuePairs) { |
this._internal.$setindex(keyValuePairs.$index(i), keyValuePairs.$index(i + 1)); |
} |
} |
-ImmutableMap.prototype.is$Map$Node$Element = function(){return this;}; |
-ImmutableMap.prototype.is$Map$String$Member = function(){return this;}; |
ImmutableMap.prototype.$index = function(key) { |
return this._internal.$index(key); |
} |
@@ -1572,12 +1522,10 @@ function MatchImplementation(pattern, str, _start, _end, _groups) { |
// Initializers done |
} |
MatchImplementation.prototype.$index = function(group) { |
- return $assert_String(this._groups.$index(group)); |
+ return this._groups.$index(group); |
} |
// ********** Code for NumImplementation ************** |
NumImplementation = Number; |
-NumImplementation.prototype.is$NumImplementation = function(){return this;}; |
-NumImplementation.prototype.is$Comparable = function(){return this;}; |
NumImplementation.prototype.isNaN = function() { |
return isNaN(this); |
} |
@@ -1613,7 +1561,7 @@ NumImplementation.prototype.compareTo = function(other) { |
var thisIsNegative = this.isNegative(); |
var otherIsNegative = other.isNegative(); |
if ($eq(thisIsNegative, otherIsNegative)) return 0; |
- if ($notnull_bool(thisIsNegative)) return -1; |
+ if (thisIsNegative) return -1; |
return 1; |
} |
return 0; |
@@ -1629,7 +1577,7 @@ NumImplementation.prototype.compareTo = function(other) { |
} |
} |
NumImplementation.prototype.compareTo$1 = function($0) { |
- return this.compareTo(($0 && $0.is$NumImplementation())); |
+ return this.compareTo($0); |
}; |
NumImplementation.prototype.hashCode$0 = function() { |
return this.hashCode(); |
@@ -1657,16 +1605,13 @@ function HashMapImplementation() { |
this._keys = new ListFactory(8/*HashMapImplementation._INITIAL_CAPACITY*/); |
this._values = new ListFactory(8/*HashMapImplementation._INITIAL_CAPACITY*/); |
} |
-HashMapImplementation.prototype.is$HashMapImplementation = function(){return this;}; |
-HashMapImplementation.prototype.is$Map$Node$Element = function(){return this;}; |
-HashMapImplementation.prototype.is$Map$String$Member = function(){return this;}; |
HashMapImplementation.HashMapImplementation$from$factory = function(other) { |
var result = new HashMapImplementation(); |
other.forEach((function (key, value) { |
result.$setindex(key, value); |
}) |
); |
- return (result && result.is$HashMapImplementation()); |
+ return result; |
} |
HashMapImplementation._computeLoadLimit = function(capacity) { |
return $truncdiv((capacity * 3), 4); |
@@ -1678,7 +1623,7 @@ HashMapImplementation._nextProbe = function(currentProbe, numberOfProbes, length |
return (currentProbe + numberOfProbes) & (length - 1); |
} |
HashMapImplementation.prototype._probeForAdding = function(key) { |
- var hash = HashMapImplementation._firstProbe($assert_num(key.hashCode$0()), this._keys.length); |
+ var hash = HashMapImplementation._firstProbe(key.hashCode$0(), this._keys.length); |
var numberOfProbes = 1; |
var initialHash = hash; |
var insertionIndex = -1; |
@@ -1688,7 +1633,7 @@ HashMapImplementation.prototype._probeForAdding = function(key) { |
if (insertionIndex < 0) return hash; |
return insertionIndex; |
} |
- else if ($notnull_bool($eq(existingKey, key))) { |
+ else if ($eq(existingKey, key)) { |
return hash; |
} |
else if ((insertionIndex < 0) && (HashMapImplementation._deletedKey === existingKey)) { |
@@ -1698,13 +1643,13 @@ HashMapImplementation.prototype._probeForAdding = function(key) { |
} |
} |
HashMapImplementation.prototype._probeForLookup = function(key) { |
- var hash = HashMapImplementation._firstProbe($assert_num(key.hashCode$0()), this._keys.length); |
+ var hash = HashMapImplementation._firstProbe(key.hashCode$0(), this._keys.length); |
var numberOfProbes = 1; |
var initialHash = hash; |
while (true) { |
var existingKey = this._keys.$index(hash); |
if (existingKey == null) return -1; |
- if ($notnull_bool($eq(existingKey, key))) return hash; |
+ if ($eq(existingKey, key)) return hash; |
hash = HashMapImplementation._nextProbe(hash, numberOfProbes++, this._keys.length); |
} |
} |
@@ -1725,7 +1670,6 @@ HashMapImplementation._isPowerOfTwo = function(x) { |
return ((x & (x - 1)) == 0); |
} |
HashMapImplementation.prototype._grow = function(newCapacity) { |
- $assert(HashMapImplementation._isPowerOfTwo(newCapacity), "_isPowerOfTwo(newCapacity)", "hash_map_set.dart", 153, 12); |
var capacity = this._keys.length; |
this._loadLimit = HashMapImplementation._computeLoadLimit(newCapacity); |
var oldKeys = this._keys; |
@@ -1829,8 +1773,6 @@ function HashMapImplementation$E$E() { |
this._values = new ListFactory(8/*HashMapImplementation._INITIAL_CAPACITY*/); |
} |
$inherits(HashMapImplementation$E$E, HashMapImplementation); |
-HashMapImplementation$E$E.prototype.is$Map$Node$Element = function(){return this;}; |
-HashMapImplementation$E$E.prototype.is$Map$String$Member = function(){return this;}; |
HashMapImplementation$E$E._computeLoadLimit = function(capacity) { |
return $truncdiv((capacity * 3), 4); |
} |
@@ -1841,7 +1783,7 @@ HashMapImplementation$E$E._nextProbe = function(currentProbe, numberOfProbes, le |
return (currentProbe + numberOfProbes) & (length - 1); |
} |
HashMapImplementation$E$E.prototype._probeForAdding = function(key) { |
- var hash = HashMapImplementation._firstProbe($assert_num(key.hashCode$0()), this._keys.length); |
+ var hash = HashMapImplementation._firstProbe(key.hashCode$0(), this._keys.length); |
var numberOfProbes = 1; |
var initialHash = hash; |
var insertionIndex = -1; |
@@ -1851,7 +1793,7 @@ HashMapImplementation$E$E.prototype._probeForAdding = function(key) { |
if (insertionIndex < 0) return hash; |
return insertionIndex; |
} |
- else if ($notnull_bool($eq(existingKey, key))) { |
+ else if ($eq(existingKey, key)) { |
return hash; |
} |
else if ((insertionIndex < 0) && (HashMapImplementation._deletedKey === existingKey)) { |
@@ -1861,13 +1803,13 @@ HashMapImplementation$E$E.prototype._probeForAdding = function(key) { |
} |
} |
HashMapImplementation$E$E.prototype._probeForLookup = function(key) { |
- var hash = HashMapImplementation._firstProbe($assert_num(key.hashCode$0()), this._keys.length); |
+ var hash = HashMapImplementation._firstProbe(key.hashCode$0(), this._keys.length); |
var numberOfProbes = 1; |
var initialHash = hash; |
while (true) { |
var existingKey = this._keys.$index(hash); |
if (existingKey == null) return -1; |
- if ($notnull_bool($eq(existingKey, key))) return hash; |
+ if ($eq(existingKey, key)) return hash; |
hash = HashMapImplementation._nextProbe(hash, numberOfProbes++, this._keys.length); |
} |
} |
@@ -1888,7 +1830,6 @@ HashMapImplementation$E$E._isPowerOfTwo = function(x) { |
return ((x & (x - 1)) == 0); |
} |
HashMapImplementation$E$E.prototype._grow = function(newCapacity) { |
- $assert(HashMapImplementation._isPowerOfTwo(newCapacity), "_isPowerOfTwo(newCapacity)", "hash_map_set.dart", 153, 12); |
var capacity = this._keys.length; |
this._loadLimit = HashMapImplementation._computeLoadLimit(newCapacity); |
var oldKeys = this._keys; |
@@ -1956,35 +1897,24 @@ HashMapImplementation$E$E.prototype.containsKey = function(key) { |
// ********** Code for HashMapImplementation$Element$HInstruction ************** |
function HashMapImplementation$Element$HInstruction() {} |
$inherits(HashMapImplementation$Element$HInstruction, HashMapImplementation); |
-HashMapImplementation$Element$HInstruction.prototype.is$Map$Node$Element = false; |
-HashMapImplementation$Element$HInstruction.prototype.is$Map$String$Member = false; |
// ********** Code for HashMapImplementation$K$DoubleLinkedQueueEntry$KeyValuePair$K$V ************** |
function HashMapImplementation$K$DoubleLinkedQueueEntry$KeyValuePair$K$V() {} |
$inherits(HashMapImplementation$K$DoubleLinkedQueueEntry$KeyValuePair$K$V, HashMapImplementation); |
-HashMapImplementation$K$DoubleLinkedQueueEntry$KeyValuePair$K$V.prototype.is$Map$Node$Element = false; |
-HashMapImplementation$K$DoubleLinkedQueueEntry$KeyValuePair$K$V.prototype.is$Map$String$Member = false; |
// ********** Code for HashMapImplementation$String$EvaluatedValue ************** |
function HashMapImplementation$String$EvaluatedValue() {} |
$inherits(HashMapImplementation$String$EvaluatedValue, HashMapImplementation); |
-HashMapImplementation$String$EvaluatedValue.prototype.is$Map$Node$Element = false; |
-HashMapImplementation$String$EvaluatedValue.prototype.is$Map$String$Member = false; |
// ********** Code for HashSetImplementation ************** |
function HashSetImplementation() { |
// Initializers done |
this._backingMap = new HashMapImplementation$E$E(); |
} |
-HashSetImplementation.prototype.is$HashSetImplementation = function(){return this;}; |
-HashSetImplementation.prototype.is$Collection$E = function(){return this;}; |
-HashSetImplementation.prototype.is$Collection$Object = 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(); |
for (var $i = other.iterator(); $i.hasNext$0(); ) { |
var e = $i.next$0(); |
set.add(e); |
} |
- return (set && set.is$HashSetImplementation()); |
+ return set; |
} |
HashSetImplementation.prototype.add = function(value) { |
this._backingMap.$setindex(value, value); |
@@ -2020,7 +1950,7 @@ HashSetImplementation.prototype.filter = function(f) { |
} |
HashSetImplementation.prototype.some = function(f) { |
var keys = this._backingMap.getKeys(); |
- return $assert_bool(keys.some(f)); |
+ return keys.some(f); |
} |
HashSetImplementation.prototype.isEmpty = function() { |
return this._backingMap.isEmpty(); |
@@ -2034,11 +1964,15 @@ Object.defineProperty(HashSetImplementation.prototype, "length", { |
HashSetImplementation.prototype.iterator = function() { |
return new HashSetIterator$E(this); |
} |
-HashSetImplementation.prototype.add$1 = HashSetImplementation.prototype.add; |
+HashSetImplementation.prototype.add$1 = function($0) { |
+ return this.add($0); |
+}; |
HashSetImplementation.prototype.addAll$1 = function($0) { |
- return this.addAll(($0 && $0.is$Collection$E())); |
+ return this.addAll($0); |
+}; |
+HashSetImplementation.prototype.contains$1 = function($0) { |
+ return this.contains($0); |
}; |
-HashSetImplementation.prototype.contains$1 = HashSetImplementation.prototype.contains; |
HashSetImplementation.prototype.filter$1 = HashSetImplementation.prototype.filter; |
HashSetImplementation.prototype.isEmpty$0 = function() { |
return this.isEmpty(); |
@@ -2050,24 +1984,12 @@ HashSetImplementation.prototype.some$1 = HashSetImplementation.prototype.some; |
// ********** Code for HashSetImplementation$E ************** |
function HashSetImplementation$E() {} |
$inherits(HashSetImplementation$E, HashSetImplementation); |
-HashSetImplementation$E.prototype.is$Collection$E = function(){return this;}; |
-HashSetImplementation$E.prototype.is$Collection$Object = function(){return this;}; |
-HashSetImplementation$E.prototype.is$Collection$Type = function(){return this;}; |
-HashSetImplementation$E.prototype.is$Iterable = function(){return this;}; |
// ********** Code for HashSetImplementation$String ************** |
function HashSetImplementation$String() {} |
$inherits(HashSetImplementation$String, HashSetImplementation); |
-HashSetImplementation$String.prototype.is$Collection$E = function(){return this;}; |
-HashSetImplementation$String.prototype.is$Collection$Object = function(){return this;}; |
-HashSetImplementation$String.prototype.is$Collection$Type = false; |
-HashSetImplementation$String.prototype.is$Iterable = function(){return this;}; |
// ********** Code for HashSetImplementation$Type ************** |
function HashSetImplementation$Type() {} |
$inherits(HashSetImplementation$Type, HashSetImplementation); |
-HashSetImplementation$Type.prototype.is$Collection$E = function(){return this;}; |
-HashSetImplementation$Type.prototype.is$Collection$Object = function(){return this;}; |
-HashSetImplementation$Type.prototype.is$Collection$Type = function(){return this;}; |
-HashSetImplementation$Type.prototype.is$Iterable = function(){return this;}; |
// ********** Code for HashSetIterator ************** |
function HashSetIterator(set_) { |
this._nextValidIndex = -1; |
@@ -2075,7 +1997,6 @@ function HashSetIterator(set_) { |
// Initializers done |
this._advance(); |
} |
-HashSetIterator.prototype.is$Iterator$T = function(){return this;}; |
HashSetIterator.prototype.hasNext = function() { |
if (this._nextValidIndex >= this._entries.length) return false; |
if (this._entries.$index(this._nextValidIndex) === HashMapImplementation._deletedKey) { |
@@ -2115,7 +2036,6 @@ function HashSetIterator$E(set_) { |
this._advance(); |
} |
$inherits(HashSetIterator$E, HashSetIterator); |
-HashSetIterator$E.prototype.is$Iterator$T = function(){return this;}; |
HashSetIterator$E.prototype._advance = function() { |
var length = this._entries.length; |
var entry; |
@@ -2147,8 +2067,6 @@ function LinkedHashMapImplementation() { |
this._map = new HashMapImplementation(); |
this._list = new DoubleLinkedQueue$KeyValuePair$K$V(); |
} |
-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 (this._map.containsKey(key)) { |
this._map.$index(key).get$element().value = value; |
@@ -2159,8 +2077,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()); |
+ var entry = this._map.$index(key); |
if (entry == null) return null; |
return entry.get$element().get$value(); |
} |
@@ -2171,7 +2088,6 @@ LinkedHashMapImplementation.prototype.getKeys = function() { |
list.$setindex(index++, entry.key); |
} |
); |
- $assert(index == this.get$length(), "index == length", "linked_hash_map.dart", 75, 12); |
return list; |
} |
LinkedHashMapImplementation.prototype.getValues = function() { |
@@ -2181,7 +2097,6 @@ LinkedHashMapImplementation.prototype.getValues = function() { |
list.$setindex(index++, entry.value); |
} |
); |
- $assert(index == this.get$length(), "index == length", "linked_hash_map.dart", 86, 12); |
return list; |
} |
LinkedHashMapImplementation.prototype.forEach = function(f) { |
@@ -2211,19 +2126,14 @@ LinkedHashMapImplementation.prototype.isEmpty$0 = function() { |
// ********** Code for LinkedHashMapImplementation$Node$Element ************** |
function LinkedHashMapImplementation$Node$Element() {} |
$inherits(LinkedHashMapImplementation$Node$Element, LinkedHashMapImplementation); |
-LinkedHashMapImplementation$Node$Element.prototype.is$Map$Node$Element = function(){return this;}; |
-LinkedHashMapImplementation$Node$Element.prototype.is$Map$String$Member = false; |
// ********** Code for LinkedHashMapImplementation$String$Keyword ************** |
function LinkedHashMapImplementation$String$Keyword() {} |
$inherits(LinkedHashMapImplementation$String$Keyword, LinkedHashMapImplementation); |
-LinkedHashMapImplementation$String$Keyword.prototype.is$Map$Node$Element = false; |
-LinkedHashMapImplementation$String$Keyword.prototype.is$Map$String$Member = false; |
// ********** Code for DoubleLinkedQueueEntry ************** |
function DoubleLinkedQueueEntry(e) { |
// Initializers done |
this._element = e; |
} |
-DoubleLinkedQueueEntry.prototype.is$DoubleLinkedQueueEntry$KeyValuePair$K$V = function(){return this;}; |
DoubleLinkedQueueEntry.prototype._link = function(p, n) { |
this._next = n; |
this._previous = p; |
@@ -2255,7 +2165,6 @@ function DoubleLinkedQueueEntry$E(e) { |
this._element = e; |
} |
$inherits(DoubleLinkedQueueEntry$E, DoubleLinkedQueueEntry); |
-DoubleLinkedQueueEntry$E.prototype.is$DoubleLinkedQueueEntry$KeyValuePair$K$V = function(){return this;}; |
DoubleLinkedQueueEntry$E.prototype._link = function(p, n) { |
this._next = n; |
this._previous = p; |
@@ -2284,7 +2193,6 @@ function DoubleLinkedQueueEntry$KeyValuePair$K$V(e) { |
this._element = e; |
} |
$inherits(DoubleLinkedQueueEntry$KeyValuePair$K$V, DoubleLinkedQueueEntry); |
-DoubleLinkedQueueEntry$KeyValuePair$K$V.prototype.is$DoubleLinkedQueueEntry$KeyValuePair$K$V = function(){return this;}; |
DoubleLinkedQueueEntry$KeyValuePair$K$V.prototype._asNonSentinelEntry = function() { |
return this; |
} |
@@ -2340,18 +2248,13 @@ _DoubleLinkedQueueEntrySentinel$KeyValuePair$K$V.prototype.prepend = function(e) |
new DoubleLinkedQueueEntry$KeyValuePair$K$V(e)._link(this._previous, this); |
} |
_DoubleLinkedQueueEntrySentinel$KeyValuePair$K$V.prototype.previousEntry = function() { |
- var $0; |
- return (($0 = this._previous._asNonSentinelEntry()) && $0.is$DoubleLinkedQueueEntry$KeyValuePair$K$V()); |
+ return this._previous._asNonSentinelEntry(); |
} |
// ********** Code for DoubleLinkedQueue ************** |
function DoubleLinkedQueue() { |
// Initializers done |
this._sentinel = new _DoubleLinkedQueueEntrySentinel$E(); |
} |
-DoubleLinkedQueue.prototype.is$Collection$E = function(){return this;}; |
-DoubleLinkedQueue.prototype.is$Collection$Object = function(){return this;}; |
-DoubleLinkedQueue.prototype.is$Collection$Type = function(){return this;}; |
-DoubleLinkedQueue.prototype.is$Iterable = function(){return this;}; |
DoubleLinkedQueue.prototype.addLast = function(value) { |
this._sentinel.prepend(value); |
} |
@@ -2420,9 +2323,11 @@ DoubleLinkedQueue.prototype.filter = function(f) { |
DoubleLinkedQueue.prototype.iterator = function() { |
return new _DoubleLinkedQueueIterator$E(this._sentinel); |
} |
-DoubleLinkedQueue.prototype.add$1 = DoubleLinkedQueue.prototype.add; |
+DoubleLinkedQueue.prototype.add$1 = function($0) { |
+ return this.add($0); |
+}; |
DoubleLinkedQueue.prototype.addAll$1 = function($0) { |
- return this.addAll(($0 && $0.is$Collection$E())); |
+ return this.addAll($0); |
}; |
DoubleLinkedQueue.prototype.filter$1 = DoubleLinkedQueue.prototype.filter; |
DoubleLinkedQueue.prototype.isEmpty$0 = function() { |
@@ -2441,34 +2346,18 @@ DoubleLinkedQueue.prototype.some$1 = DoubleLinkedQueue.prototype.some; |
// ********** Code for DoubleLinkedQueue$ClassElement ************** |
function DoubleLinkedQueue$ClassElement() {} |
$inherits(DoubleLinkedQueue$ClassElement, DoubleLinkedQueue); |
-DoubleLinkedQueue$ClassElement.prototype.is$Collection$E = function(){return this;}; |
-DoubleLinkedQueue$ClassElement.prototype.is$Collection$Object = function(){return this;}; |
-DoubleLinkedQueue$ClassElement.prototype.is$Collection$Type = false; |
-DoubleLinkedQueue$ClassElement.prototype.is$Iterable = function(){return this;}; |
// ********** Code for DoubleLinkedQueue$E ************** |
function DoubleLinkedQueue$E() {} |
$inherits(DoubleLinkedQueue$E, DoubleLinkedQueue); |
-DoubleLinkedQueue$E.prototype.is$Collection$E = function(){return this;}; |
-DoubleLinkedQueue$E.prototype.is$Collection$Object = function(){return this;}; |
-DoubleLinkedQueue$E.prototype.is$Collection$Type = function(){return this;}; |
-DoubleLinkedQueue$E.prototype.is$Iterable = function(){return this;}; |
// ********** Code for DoubleLinkedQueue$Element ************** |
function DoubleLinkedQueue$Element() {} |
$inherits(DoubleLinkedQueue$Element, DoubleLinkedQueue); |
-DoubleLinkedQueue$Element.prototype.is$Collection$E = function(){return this;}; |
-DoubleLinkedQueue$Element.prototype.is$Collection$Object = function(){return this;}; |
-DoubleLinkedQueue$Element.prototype.is$Collection$Type = false; |
-DoubleLinkedQueue$Element.prototype.is$Iterable = function(){return this;}; |
// ********** Code for DoubleLinkedQueue$KeyValuePair$K$V ************** |
function DoubleLinkedQueue$KeyValuePair$K$V() { |
// Initializers done |
this._sentinel = new _DoubleLinkedQueueEntrySentinel$KeyValuePair$K$V(); |
} |
$inherits(DoubleLinkedQueue$KeyValuePair$K$V, DoubleLinkedQueue); |
-DoubleLinkedQueue$KeyValuePair$K$V.prototype.is$Collection$E = function(){return this;}; |
-DoubleLinkedQueue$KeyValuePair$K$V.prototype.is$Collection$Object = function(){return this;}; |
-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); |
} |
@@ -2489,7 +2378,6 @@ function _DoubleLinkedQueueIterator(_sentinel) { |
// Initializers done |
this._currentEntry = this._sentinel; |
} |
-_DoubleLinkedQueueIterator.prototype.is$Iterator$T = function(){return this;}; |
_DoubleLinkedQueueIterator.prototype.hasNext = function() { |
return this._currentEntry._next !== this._sentinel; |
} |
@@ -2513,7 +2401,6 @@ function _DoubleLinkedQueueIterator$E(_sentinel) { |
this._currentEntry = this._sentinel; |
} |
$inherits(_DoubleLinkedQueueIterator$E, _DoubleLinkedQueueIterator); |
-_DoubleLinkedQueueIterator$E.prototype.is$Iterator$T = function(){return this;}; |
// ********** Code for StopwatchImplementation ************** |
function StopwatchImplementation() { |
this._start = null; |
@@ -2555,7 +2442,6 @@ function StringBufferImpl(content) { |
this.clear(); |
this.add(content); |
} |
-StringBufferImpl.prototype.is$StringBuffer = function(){return this;}; |
StringBufferImpl.prototype.get$length = function() { |
return this._length; |
} |
@@ -2566,7 +2452,7 @@ StringBufferImpl.prototype.isEmpty = function() { |
return this._length == 0; |
} |
StringBufferImpl.prototype.add = function(obj) { |
- var str = $assert_String(obj.toString()); |
+ var str = obj.toString(); |
if (str == null || str.isEmpty()) return this; |
this._buffer.add(str); |
this._length += str.length; |
@@ -2586,15 +2472,17 @@ StringBufferImpl.prototype.clear = function() { |
} |
StringBufferImpl.prototype.toString = function() { |
if (this._buffer.length == 0) return ""; |
- if (this._buffer.length == 1) return $assert_String(this._buffer.$index(0)); |
+ if (this._buffer.length == 1) return this._buffer.$index(0); |
var result = StringBase.concatAll(this._buffer); |
this._buffer.clear(); |
this._buffer.add(result); |
return result; |
} |
-StringBufferImpl.prototype.add$1 = StringBufferImpl.prototype.add; |
+StringBufferImpl.prototype.add$1 = function($0) { |
+ return this.add($0); |
+}; |
StringBufferImpl.prototype.addAll$1 = function($0) { |
- return this.addAll(($0 && $0.is$Collection$Object())); |
+ return this.addAll($0); |
}; |
StringBufferImpl.prototype.isEmpty$0 = function() { |
return this.isEmpty(); |
@@ -2617,7 +2505,7 @@ StringBase.createFromCharCodes = function(charCodes) { |
} |
StringBase.join = function(strings, separator) { |
if (strings.length == 0) return ''; |
- var s = $assert_String(strings.$index(0)); |
+ var s = strings.$index(0); |
for (var i = 1; |
i < strings.length; i++) { |
s = s + separator + strings.$index(i); |
@@ -2629,8 +2517,6 @@ StringBase.concatAll = function(strings) { |
} |
// ********** Code for StringImplementation ************** |
StringImplementation = String; |
-StringImplementation.prototype.is$Pattern = function(){return this;}; |
-StringImplementation.prototype.is$Comparable = function(){return this;}; |
StringImplementation.prototype.endsWith = function(other) { |
if (other.length > this.length) return false; |
return other == this.substring(this.length - other.length); |
@@ -2671,37 +2557,37 @@ StringImplementation.prototype.compareTo = function(other) { |
return this == other ? 0 : this < other ? -1 : 1; |
} |
StringImplementation.prototype.charCodeAt$1 = function($0) { |
- return this.charCodeAt($assert_num($0)); |
+ return this.charCodeAt($0); |
}; |
StringImplementation.prototype.compareTo$1 = function($0) { |
- return this.compareTo($assert_String($0)); |
+ return this.compareTo($0); |
}; |
StringImplementation.prototype.endsWith$1 = function($0) { |
- return this.endsWith($assert_String($0)); |
+ return this.endsWith($0); |
}; |
StringImplementation.prototype.hashCode$0 = function() { |
return this.hashCode(); |
}; |
StringImplementation.prototype.indexOf$2 = function($0, $1) { |
- return this.indexOf($assert_String($0), $assert_num($1)); |
+ return this.indexOf($0, $1); |
}; |
StringImplementation.prototype.isEmpty$0 = function() { |
return this.isEmpty(); |
}; |
StringImplementation.prototype.replaceAll$2 = function($0, $1) { |
- return this.replaceAll(($0 && $0.is$Pattern()), $assert_String($1)); |
+ return this.replaceAll($0, $1); |
}; |
StringImplementation.prototype.replaceFirst$2 = function($0, $1) { |
- return this.replaceFirst(($0 && $0.is$Pattern()), $assert_String($1)); |
+ return this.replaceFirst($0, $1); |
}; |
StringImplementation.prototype.startsWith$1 = function($0) { |
- return this.startsWith($assert_String($0)); |
+ return this.startsWith($0); |
}; |
StringImplementation.prototype.substring$1 = function($0) { |
- return this.substring($assert_num($0)); |
+ return this.substring($0); |
}; |
StringImplementation.prototype.substring$2 = function($0, $1) { |
- return this.substring($assert_num($0), $assert_num($1)); |
+ return this.substring($0, $1); |
}; |
// ********** Code for Collections ************** |
function Collections() {} |
@@ -2740,16 +2626,13 @@ DateImplementation.now$ctor = function() { |
this._asJs(); |
} |
DateImplementation.now$ctor.prototype = DateImplementation.prototype; |
-DateImplementation.prototype.is$Date = function(){return this;}; |
-DateImplementation.prototype.is$Comparable = function(){return this;}; |
DateImplementation.prototype.get$value = function() { return this.value; }; |
DateImplementation.prototype.$eq = function(other) { |
if (!((other instanceof DateImplementation))) return false; |
return (this.value == other.get$value()) && ($eq(this.timeZone, other.timeZone)); |
} |
DateImplementation.prototype.compareTo = function(other) { |
- var $0; |
- return $assert_num(this.value.compareTo$1(other.value)); |
+ return this.value.compareTo(other.value); |
} |
DateImplementation.prototype.get$year = function() { |
return this.isUtc ? this._asJs().getUTCFullYear() : |
@@ -2791,7 +2674,7 @@ DateImplementation.prototype.toString = function() { |
var min = twoDigits(this.get$minutes()); |
var sec = twoDigits(this.get$seconds()); |
var ms = threeDigits(this.get$milliseconds()); |
- if ($notnull_bool(this.timeZone.isUtc)) { |
+ if (this.timeZone.isUtc) { |
return ("" + this.get$year() + "-" + m + "-" + d + " " + h + ":" + min + ":" + sec + "." + ms + "Z"); |
} |
else { |
@@ -2811,10 +2694,10 @@ DateImplementation.prototype._asJs = function() { |
return this.date; |
} |
DateImplementation.prototype.add$1 = function($0) { |
- return this.add(($0 && $0.is$Duration())); |
+ return this.add($0); |
}; |
DateImplementation.prototype.compareTo$1 = function($0) { |
- return this.compareTo(($0 && $0.is$Date())); |
+ return this.compareTo($0); |
}; |
DateImplementation.prototype.toString$0 = function() { |
return this.toString(); |
@@ -2831,7 +2714,7 @@ TimeZoneImplementation.prototype.$eq = function(other) { |
return $eq(this.isUtc, other.isUtc); |
} |
TimeZoneImplementation.prototype.toString = function() { |
- if ($notnull_bool(this.isUtc)) return "TimeZone (UTC)"; |
+ if (this.isUtc) return "TimeZone (UTC)"; |
return "TimeZone (Local)"; |
} |
TimeZoneImplementation.prototype.toString$0 = function() { |
@@ -2858,17 +2741,17 @@ 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 && $notnull_bool($ne(pieces.last$0(), '.')) && $notnull_bool($ne(pieces.last$0(), '..'))) { |
+ if ($eq(piece, '..') && pieces.length > 0 && $ne(pieces.last$0(), '.') && $ne(pieces.last$0(), '..')) { |
pieces.removeLast$0(); |
} |
- else if ($notnull_bool($ne(piece, ''))) { |
- if (pieces.length > 0 && $notnull_bool($eq(pieces.last$0(), '.'))) { |
+ else if ($ne(piece, '')) { |
+ if (pieces.length > 0 && $eq(pieces.last$0(), '.')) { |
pieces.removeLast$0(); |
} |
pieces.add$1(piece); |
} |
} |
- return Strings.join((pieces && pieces.is$List$String()), '/'); |
+ return Strings.join(pieces, '/'); |
} |
function dirname(path) { |
var lastSlash = path.lastIndexOf('/', path.length); |
@@ -2915,8 +2798,7 @@ function readSync(fileName) { |
// ********** Code for LinkFactory ************** |
function LinkFactory() {} |
LinkFactory.Link$factory = function(head, tail) { |
- var $0; |
- return new LinkEntry(head, (($0 = (tail == null) ? const$14/*const EmptyLink()*/ : tail) && $0.is$Link$T())); |
+ return new LinkEntry(head, (tail == null) ? const$14/*const EmptyLink()*/ : tail); |
} |
// ********** Code for LinkFactory$Node ************** |
function LinkFactory$Node() {} |
@@ -2926,13 +2808,6 @@ function LinkFactory$T() {} |
$inherits(LinkFactory$T, LinkFactory); |
// ********** Code for AbstractLink ************** |
function AbstractLink() {} |
-AbstractLink.prototype.is$Link = function(){return this;}; |
-AbstractLink.prototype.is$Link$Element = function(){return this;}; |
-AbstractLink.prototype.is$Link$Node = function(){return this;}; |
-AbstractLink.prototype.is$Link$T = function(){return this;}; |
-AbstractLink.prototype.is$Link$Token = function(){return this;}; |
-AbstractLink.prototype.is$Link$Type = function(){return this;}; |
-AbstractLink.prototype.is$Iterable = function(){return this;}; |
AbstractLink.prototype.get$head = function() { |
$throw("bug"); |
} |
@@ -2943,16 +2818,14 @@ AbstractLink.prototype.prepend = function(element) { |
return LinkFactory.Link$factory(element, this); |
} |
AbstractLink.prototype.iterator = function() { |
- var $0; |
- return (($0 = this.toList().iterator$0()) && $0.is$Iterator$T()); |
+ return this.toList().iterator$0(); |
} |
AbstractLink.prototype.printOn = function(buffer, separatedBy) { |
- var $0; |
- if ($notnull_bool(this.isEmpty())) return; |
+ if (this.isEmpty()) return; |
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(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link())) { |
+ for (var link = this.get$tail(); |
+ !link.isEmpty(); link = link.get$tail()) { |
buffer.add(separatedBy); |
buffer.add(link.get$head() == null ? 'null' : link.get$head()); |
} |
@@ -2971,7 +2844,7 @@ AbstractLink.prototype.iterator$0 = function() { |
return this.iterator(); |
}; |
AbstractLink.prototype.printOn$1 = function($0) { |
- return this.printOn(($0 && $0.is$StringBuffer())); |
+ return this.printOn($0); |
}; |
AbstractLink.prototype.toString$0 = function() { |
return this.toString(); |
@@ -2979,29 +2852,14 @@ AbstractLink.prototype.toString$0 = function() { |
// ********** Code for AbstractLink$T ************** |
function AbstractLink$T() {} |
$inherits(AbstractLink$T, AbstractLink); |
-AbstractLink$T.prototype.is$Link = function(){return this;}; |
-AbstractLink$T.prototype.is$Link$Element = function(){return this;}; |
-AbstractLink$T.prototype.is$Link$Node = function(){return this;}; |
-AbstractLink$T.prototype.is$Link$T = function(){return this;}; |
-AbstractLink$T.prototype.is$Link$Token = function(){return this;}; |
-AbstractLink$T.prototype.is$Link$Type = function(){return this;}; |
-AbstractLink$T.prototype.is$Iterable = function(){return this;}; |
AbstractLink$T.prototype.iterator = function() { |
- var $0; |
- return (($0 = this.toList().iterator$0()) && $0.is$Iterator$T()); |
+ return this.toList().iterator$0(); |
} |
// ********** Code for LinkTail ************** |
function LinkTail() { |
// Initializers done |
} |
$inherits(LinkTail, AbstractLink$T); |
-LinkTail.prototype.is$Link = function(){return this;}; |
-LinkTail.prototype.is$Link$Element = function(){return this;}; |
-LinkTail.prototype.is$Link$Node = function(){return this;}; |
-LinkTail.prototype.is$Link$T = function(){return this;}; |
-LinkTail.prototype.is$Link$Token = function(){return this;}; |
-LinkTail.prototype.is$Link$Type = function(){return this;}; |
-LinkTail.prototype.is$Iterable = function(){return this;}; |
LinkTail.prototype.get$head = function() { |
return null; |
} |
@@ -3020,23 +2878,9 @@ LinkTail.prototype.isEmpty$0 = function() { |
// ********** Code for LinkTail$Node ************** |
function LinkTail$Node() {} |
$inherits(LinkTail$Node, LinkTail); |
-LinkTail$Node.prototype.is$Link = function(){return this;}; |
-LinkTail$Node.prototype.is$Link$Element = function(){return this;}; |
-LinkTail$Node.prototype.is$Link$Node = function(){return this;}; |
-LinkTail$Node.prototype.is$Link$T = function(){return this;}; |
-LinkTail$Node.prototype.is$Link$Token = function(){return this;}; |
-LinkTail$Node.prototype.is$Link$Type = function(){return this;}; |
-LinkTail$Node.prototype.is$Iterable = function(){return this;}; |
// ********** Code for LinkTail$Type ************** |
function LinkTail$Type() {} |
$inherits(LinkTail$Type, LinkTail); |
-LinkTail$Type.prototype.is$Link = function(){return this;}; |
-LinkTail$Type.prototype.is$Link$Element = function(){return this;}; |
-LinkTail$Type.prototype.is$Link$Node = function(){return this;}; |
-LinkTail$Type.prototype.is$Link$T = function(){return this;}; |
-LinkTail$Type.prototype.is$Link$Token = function(){return this;}; |
-LinkTail$Type.prototype.is$Link$Type = function(){return this;}; |
-LinkTail$Type.prototype.is$Iterable = function(){return this;}; |
// ********** Code for LinkEntry ************** |
function LinkEntry(head, realTail) { |
this.head = head; |
@@ -3052,10 +2896,9 @@ LinkEntry.prototype.isEmpty = function() { |
return false; |
} |
LinkEntry.prototype.toList = function() { |
- var $0; |
var list = new ListFactory(); |
for (var link = this; |
- !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link$T())) { |
+ !link.isEmpty(); link = link.get$tail()) { |
list.addLast(link.get$head()); |
} |
return list; |
@@ -3161,63 +3004,59 @@ ArrayBasedScanner.prototype.appendWhiteSpace = function(next) { |
} |
ArrayBasedScanner.prototype.appendBeginGroup = function(kind, value) { |
- var $0; |
var token = new BeginGroupToken(kind, value, this.tokenStart); |
this.tail.next = token; |
this.tail = this.tail.next; |
- 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()); |
+ while (kind !== 60/*null.LT_TOKEN*/ && !this.groupingStack.isEmpty() && this.groupingStack.get$head().kind === 60/*null.LT_TOKEN*/) { |
+ this.groupingStack = this.groupingStack.get$tail(); |
} |
- this.groupingStack = (($0 = this.groupingStack.prepend(token)) && $0.is$Link$Token()); |
+ this.groupingStack = this.groupingStack.prepend(token); |
} |
ArrayBasedScanner.prototype.appendEndGroup = function(kind, value, openKind) { |
- var $0; |
var oldTail = this.tail; |
this.appendStringToken(kind, value); |
- if ($notnull_bool(this.groupingStack.isEmpty())) { |
+ if (this.groupingStack.isEmpty()) { |
if (openKind === 60/*null.LT_TOKEN*/) return; |
$throw(new MalformedInputException(('Unmatched ' + value + ''))); |
} |
- 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()); |
+ while (openKind !== 60/*null.LT_TOKEN*/ && !this.groupingStack.isEmpty() && this.groupingStack.get$head().kind === 60/*null.LT_TOKEN*/) { |
+ this.groupingStack = this.groupingStack.get$tail(); |
} |
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; |
- this.groupingStack = (($0 = this.groupingStack.get$tail()) && $0.is$Link$Token()); |
+ this.groupingStack = this.groupingStack.get$tail(); |
} |
ArrayBasedScanner.prototype.appendGtGt = function(kind, value) { |
- var $0; |
var oldTail = this.tail; |
this.appendStringToken(kind, value); |
- if ($notnull_bool(this.groupingStack.isEmpty())) return; |
- if ($notnull_bool($eq(this.groupingStack.get$head().kind, 60/*null.LT_TOKEN*/))) { |
- this.groupingStack = (($0 = this.groupingStack.get$tail()) && $0.is$Link$Token()); |
+ if (this.groupingStack.isEmpty()) return; |
+ if ($eq(this.groupingStack.get$head().kind, 60/*null.LT_TOKEN*/)) { |
+ this.groupingStack = this.groupingStack.get$tail(); |
} |
- if ($notnull_bool(this.groupingStack.isEmpty())) return; |
- if ($notnull_bool($eq(this.groupingStack.get$head().kind, 60/*null.LT_TOKEN*/))) { |
+ if (this.groupingStack.isEmpty()) return; |
+ if ($eq(this.groupingStack.get$head().kind, 60/*null.LT_TOKEN*/)) { |
this.groupingStack.get$head().endGroup = oldTail.next; |
- this.groupingStack = (($0 = this.groupingStack.get$tail()) && $0.is$Link$Token()); |
+ this.groupingStack = this.groupingStack.get$tail(); |
} |
} |
ArrayBasedScanner.prototype.appendGtGtGt = function(kind, value) { |
- var $0; |
var oldTail = this.tail; |
this.appendStringToken(kind, value); |
- if ($notnull_bool(this.groupingStack.isEmpty())) return; |
- if ($notnull_bool($eq(this.groupingStack.get$head().kind, 60/*null.LT_TOKEN*/))) { |
- this.groupingStack = (($0 = this.groupingStack.get$tail()) && $0.is$Link$Token()); |
+ if (this.groupingStack.isEmpty()) return; |
+ if ($eq(this.groupingStack.get$head().kind, 60/*null.LT_TOKEN*/)) { |
+ this.groupingStack = this.groupingStack.get$tail(); |
} |
- if ($notnull_bool(this.groupingStack.isEmpty())) return; |
- if ($notnull_bool($eq(this.groupingStack.get$head().kind, 60/*null.LT_TOKEN*/))) { |
- this.groupingStack = (($0 = this.groupingStack.get$tail()) && $0.is$Link$Token()); |
+ if (this.groupingStack.isEmpty()) return; |
+ if ($eq(this.groupingStack.get$head().kind, 60/*null.LT_TOKEN*/)) { |
+ this.groupingStack = this.groupingStack.get$tail(); |
} |
- if ($notnull_bool(this.groupingStack.isEmpty())) return; |
- if ($notnull_bool($eq(this.groupingStack.get$head().kind, 60/*null.LT_TOKEN*/))) { |
+ if (this.groupingStack.isEmpty()) return; |
+ if ($eq(this.groupingStack.get$head().kind, 60/*null.LT_TOKEN*/)) { |
this.groupingStack.get$head().endGroup = oldTail.next; |
- this.groupingStack = (($0 = this.groupingStack.get$tail()) && $0.is$Link$Token()); |
+ this.groupingStack = this.groupingStack.get$tail(); |
} |
} |
// ********** Code for ArrayBasedScanner$SourceString ************** |
@@ -3271,63 +3110,59 @@ ArrayBasedScanner$SourceString.prototype.appendWhiteSpace = function(next) { |
} |
ArrayBasedScanner$SourceString.prototype.appendBeginGroup = function(kind, value) { |
- var $0; |
var token = new BeginGroupToken(kind, value, this.tokenStart); |
this.tail.next = token; |
this.tail = this.tail.next; |
- 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()); |
+ while (kind !== 60/*null.LT_TOKEN*/ && !this.groupingStack.isEmpty() && this.groupingStack.get$head().kind === 60/*null.LT_TOKEN*/) { |
+ this.groupingStack = this.groupingStack.get$tail(); |
} |
- this.groupingStack = (($0 = this.groupingStack.prepend(token)) && $0.is$Link$Token()); |
+ this.groupingStack = this.groupingStack.prepend(token); |
} |
ArrayBasedScanner$SourceString.prototype.appendEndGroup = function(kind, value, openKind) { |
- var $0; |
var oldTail = this.tail; |
this.appendStringToken(kind, value); |
- if ($notnull_bool(this.groupingStack.isEmpty())) { |
+ if (this.groupingStack.isEmpty()) { |
if (openKind === 60/*null.LT_TOKEN*/) return; |
$throw(new MalformedInputException(('Unmatched ' + value + ''))); |
} |
- 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()); |
+ while (openKind !== 60/*null.LT_TOKEN*/ && !this.groupingStack.isEmpty() && this.groupingStack.get$head().kind === 60/*null.LT_TOKEN*/) { |
+ this.groupingStack = this.groupingStack.get$tail(); |
} |
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; |
- this.groupingStack = (($0 = this.groupingStack.get$tail()) && $0.is$Link$Token()); |
+ this.groupingStack = this.groupingStack.get$tail(); |
} |
ArrayBasedScanner$SourceString.prototype.appendGtGt = function(kind, value) { |
- var $0; |
var oldTail = this.tail; |
this.appendStringToken(kind, value); |
- if ($notnull_bool(this.groupingStack.isEmpty())) return; |
- if ($notnull_bool($eq(this.groupingStack.get$head().kind, 60/*null.LT_TOKEN*/))) { |
- this.groupingStack = (($0 = this.groupingStack.get$tail()) && $0.is$Link$Token()); |
+ if (this.groupingStack.isEmpty()) return; |
+ if ($eq(this.groupingStack.get$head().kind, 60/*null.LT_TOKEN*/)) { |
+ this.groupingStack = this.groupingStack.get$tail(); |
} |
- if ($notnull_bool(this.groupingStack.isEmpty())) return; |
- if ($notnull_bool($eq(this.groupingStack.get$head().kind, 60/*null.LT_TOKEN*/))) { |
+ if (this.groupingStack.isEmpty()) return; |
+ if ($eq(this.groupingStack.get$head().kind, 60/*null.LT_TOKEN*/)) { |
this.groupingStack.get$head().endGroup = oldTail.next; |
- this.groupingStack = (($0 = this.groupingStack.get$tail()) && $0.is$Link$Token()); |
+ this.groupingStack = this.groupingStack.get$tail(); |
} |
} |
ArrayBasedScanner$SourceString.prototype.appendGtGtGt = function(kind, value) { |
- var $0; |
var oldTail = this.tail; |
this.appendStringToken(kind, value); |
- if ($notnull_bool(this.groupingStack.isEmpty())) return; |
- if ($notnull_bool($eq(this.groupingStack.get$head().kind, 60/*null.LT_TOKEN*/))) { |
- this.groupingStack = (($0 = this.groupingStack.get$tail()) && $0.is$Link$Token()); |
+ if (this.groupingStack.isEmpty()) return; |
+ if ($eq(this.groupingStack.get$head().kind, 60/*null.LT_TOKEN*/)) { |
+ this.groupingStack = this.groupingStack.get$tail(); |
} |
- if ($notnull_bool(this.groupingStack.isEmpty())) return; |
- if ($notnull_bool($eq(this.groupingStack.get$head().kind, 60/*null.LT_TOKEN*/))) { |
- this.groupingStack = (($0 = this.groupingStack.get$tail()) && $0.is$Link$Token()); |
+ if (this.groupingStack.isEmpty()) return; |
+ if ($eq(this.groupingStack.get$head().kind, 60/*null.LT_TOKEN*/)) { |
+ this.groupingStack = this.groupingStack.get$tail(); |
} |
- if ($notnull_bool(this.groupingStack.isEmpty())) return; |
- if ($notnull_bool($eq(this.groupingStack.get$head().kind, 60/*null.LT_TOKEN*/))) { |
+ if (this.groupingStack.isEmpty()) return; |
+ if ($eq(this.groupingStack.get$head().kind, 60/*null.LT_TOKEN*/)) { |
this.groupingStack.get$head().endGroup = oldTail.next; |
- this.groupingStack = (($0 = this.groupingStack.get$tail()) && $0.is$Link$Token()); |
+ this.groupingStack = this.groupingStack.get$tail(); |
} |
} |
ArrayBasedScanner$SourceString.prototype.tokenize = function() { |
@@ -3844,7 +3679,7 @@ ArrayBasedScanner$SourceString.prototype.tokenizeHex = function(next) { |
default: |
- if (!$notnull_bool(hasDigits)) { |
+ if (!hasDigits) { |
$throw(new MalformedInputException(this.get$charOffset())); |
} |
this.appendByteStringToken(120/*null.HEXADECIMAL_TOKEN*/, this.asciiString(start)); |
@@ -3886,7 +3721,7 @@ ArrayBasedScanner$SourceString.prototype.tokenizeDotOrNumber = function(next) { |
ArrayBasedScanner$SourceString.prototype.tokenizeFractionPart = function(next, start) { |
var done = false; |
LOOP: |
- while (!$notnull_bool(done)) { |
+ while (!done) { |
switch (next) { |
case 48/*null.$0*/: |
case 49/*null.$1*/: |
@@ -3945,7 +3780,7 @@ ArrayBasedScanner$SourceString.prototype.tokenizeExponent = function(next) { |
default: |
- if (!$notnull_bool(hasDigits)) { |
+ if (!hasDigits) { |
$throw(new MalformedInputException(this.get$charOffset())); |
} |
return next; |
@@ -4035,10 +3870,10 @@ ArrayBasedScanner$SourceString.prototype.tokenizeIdentifier = function(next) { |
state = null; |
} |
else if (next < 128) { |
- if (state != null && $notnull_bool(state.isLeaf())) { |
+ if (state != null && state.isLeaf()) { |
this.appendKeywordToken(state.get$keyword()); |
} |
- else if ($notnull_bool(isAscii)) { |
+ else if (isAscii) { |
this.appendByteStringToken(97/*null.IDENTIFIER_TOKEN*/, this.asciiString(start)); |
} |
else { |
@@ -4083,7 +3918,7 @@ ArrayBasedScanner$SourceString.prototype.tokenizeString = function(next, start, |
return next; |
} |
} |
- if ($notnull_bool(raw)) { |
+ if (raw) { |
return this.tokenizeSingleLineRawString(next, q, start); |
} |
else { |
@@ -4580,7 +4415,6 @@ AbstractScanner.prototype.tokenizeLessThan = function(next) { |
} |
} |
AbstractScanner.prototype.tokenizeNumber = function(next) { |
- var $0; |
var start = this.get$byteOffset(); |
while (true) { |
next = this.advance(); |
@@ -4611,7 +4445,7 @@ AbstractScanner.prototype.tokenizeNumber = function(next) { |
default: |
- this.appendByteStringToken$2(105/*null.INT_TOKEN*/, this.asciiString(start)); |
+ this.appendByteStringToken(105/*null.INT_TOKEN*/, this.asciiString(start)); |
return next; |
} |
@@ -4626,7 +4460,6 @@ AbstractScanner.prototype.tokenizeHexOrNumber = function(next) { |
return this.tokenizeNumber(next); |
} |
AbstractScanner.prototype.tokenizeHex = function(next) { |
- var $0; |
var start = this.get$byteOffset(); |
var hasDigits = false; |
while (true) { |
@@ -4660,10 +4493,10 @@ AbstractScanner.prototype.tokenizeHex = function(next) { |
default: |
- if (!$notnull_bool(hasDigits)) { |
+ if (!hasDigits) { |
$throw(new MalformedInputException(this.get$charOffset())); |
} |
- this.appendByteStringToken$2(120/*null.HEXADECIMAL_TOKEN*/, this.asciiString(start)); |
+ this.appendByteStringToken(120/*null.HEXADECIMAL_TOKEN*/, this.asciiString(start)); |
return next; |
} |
@@ -4700,10 +4533,9 @@ AbstractScanner.prototype.tokenizeDotOrNumber = function(next) { |
} |
} |
AbstractScanner.prototype.tokenizeFractionPart = function(next, start) { |
- var $0; |
var done = false; |
LOOP: |
- while (!$notnull_bool(done)) { |
+ while (!done) { |
switch (next) { |
case 48/*null.$0*/: |
case 49/*null.$1*/: |
@@ -4736,7 +4568,7 @@ AbstractScanner.prototype.tokenizeFractionPart = function(next, start) { |
if (next == 100/*null.$d*/ || next == 68/*null.$D*/) { |
next = this.advance(); |
} |
- this.appendByteStringToken$2(100/*null.DOUBLE_TOKEN*/, this.asciiString(start)); |
+ this.appendByteStringToken(100/*null.DOUBLE_TOKEN*/, this.asciiString(start)); |
return next; |
} |
AbstractScanner.prototype.tokenizeExponent = function(next) { |
@@ -4762,7 +4594,7 @@ AbstractScanner.prototype.tokenizeExponent = function(next) { |
default: |
- if (!$notnull_bool(hasDigits)) { |
+ if (!hasDigits) { |
$throw(new MalformedInputException(this.get$charOffset())); |
} |
return next; |
@@ -4835,7 +4667,6 @@ AbstractScanner.prototype.tokenizeMultiLineComment = function(next) { |
} |
} |
AbstractScanner.prototype.tokenizeIdentifier = function(next) { |
- var $0; |
var start = this.get$byteOffset(); |
var state = null; |
if (97/*null.$a*/ <= next && next <= 122/*null.$z*/) { |
@@ -4853,14 +4684,14 @@ AbstractScanner.prototype.tokenizeIdentifier = function(next) { |
state = null; |
} |
else if (next < 128) { |
- if (state != null && $notnull_bool(state.isLeaf())) { |
+ if (state != null && state.isLeaf()) { |
this.appendKeywordToken(state.get$keyword()); |
} |
- else if ($notnull_bool(isAscii)) { |
- this.appendByteStringToken$2(97/*null.IDENTIFIER_TOKEN*/, this.asciiString(start)); |
+ else if (isAscii) { |
+ this.appendByteStringToken(97/*null.IDENTIFIER_TOKEN*/, this.asciiString(start)); |
} |
else { |
- this.appendByteStringToken$2(97/*null.IDENTIFIER_TOKEN*/, this.utf8String(start, -1)); |
+ this.appendByteStringToken(97/*null.IDENTIFIER_TOKEN*/, this.utf8String(start, -1)); |
} |
return next; |
} |
@@ -4889,7 +4720,6 @@ AbstractScanner.prototype.tokenizeRawString = function(next) { |
} |
} |
AbstractScanner.prototype.tokenizeString = function(next, start, raw) { |
- var $0; |
var q = next; |
next = this.advance(); |
if (q == next) { |
@@ -4898,11 +4728,11 @@ AbstractScanner.prototype.tokenizeString = function(next, start, raw) { |
return this.tokenizeMultiLineString(q, start, raw); |
} |
else { |
- this.appendByteStringToken$2(39/*null.STRING_TOKEN*/, this.utf8String(start, -1)); |
+ this.appendByteStringToken(39/*null.STRING_TOKEN*/, this.utf8String(start, -1)); |
return next; |
} |
} |
- if ($notnull_bool(raw)) { |
+ if (raw) { |
return this.tokenizeSingleLineRawString(next, q, start); |
} |
else { |
@@ -4910,10 +4740,9 @@ AbstractScanner.prototype.tokenizeString = function(next, start, raw) { |
} |
} |
AbstractScanner.prototype.tokenizeSingleLineString = function(next, q1, start) { |
- var $0; |
while (next != -1) { |
if (next == q1) { |
- this.appendByteStringToken$2(39/*null.STRING_TOKEN*/, this.utf8String(start, 0)); |
+ this.appendByteStringToken(39/*null.STRING_TOKEN*/, this.utf8String(start, 0)); |
return this.advance(); |
} |
else if (next == 92/*null.$BACKSLASH*/) { |
@@ -4930,11 +4759,10 @@ AbstractScanner.prototype.tokenizeSingleLineString = function(next, q1, start) { |
$throw(new MalformedInputException(this.get$charOffset())); |
} |
AbstractScanner.prototype.tokenizeSingleLineRawString = function(next, q1, start) { |
- var $0; |
next = this.advance(); |
while (next != -1) { |
if (next == q1) { |
- this.appendByteStringToken$2(39/*null.STRING_TOKEN*/, this.utf8String(start, 0)); |
+ this.appendByteStringToken(39/*null.STRING_TOKEN*/, this.utf8String(start, 0)); |
return this.advance(); |
} |
else if (next == 10/*null.$LF*/ || next == 13/*null.$CR*/) { |
@@ -4945,7 +4773,6 @@ AbstractScanner.prototype.tokenizeSingleLineRawString = function(next, q1, start |
$throw(new MalformedInputException(this.get$charOffset())); |
} |
AbstractScanner.prototype.tokenizeMultiLineString = function(q, start, raw) { |
- var $0; |
var next = this.advance(); |
while (next != -1) { |
if (next == q) { |
@@ -4953,7 +4780,7 @@ AbstractScanner.prototype.tokenizeMultiLineString = function(q, start, raw) { |
if (next == q) { |
next = this.advance(); |
if (next == q) { |
- this.appendByteStringToken$2(39/*null.STRING_TOKEN*/, this.utf8String(start, 0)); |
+ this.appendByteStringToken(39/*null.STRING_TOKEN*/, this.utf8String(start, 0)); |
return this.advance(); |
} |
} |
@@ -4962,7 +4789,6 @@ AbstractScanner.prototype.tokenizeMultiLineString = function(q, start, raw) { |
} |
return next; |
} |
-AbstractScanner.prototype.appendByteStringToken$2 = AbstractScanner.prototype.appendByteStringToken; |
// ********** Code for AbstractScanner$S ************** |
function AbstractScanner$S() {} |
$inherits(AbstractScanner$S, AbstractScanner); |
@@ -5402,7 +5228,6 @@ AbstractScanner$S.prototype.tokenizeLessThan = function(next) { |
} |
} |
AbstractScanner$S.prototype.tokenizeNumber = function(next) { |
- var $0; |
var start = this.get$byteOffset(); |
while (true) { |
next = this.advance(); |
@@ -5433,7 +5258,7 @@ AbstractScanner$S.prototype.tokenizeNumber = function(next) { |
default: |
- this.appendByteStringToken$2(105/*null.INT_TOKEN*/, this.asciiString(start)); |
+ this.appendByteStringToken(105/*null.INT_TOKEN*/, this.asciiString(start)); |
return next; |
} |
@@ -5448,7 +5273,6 @@ AbstractScanner$S.prototype.tokenizeHexOrNumber = function(next) { |
return this.tokenizeNumber(next); |
} |
AbstractScanner$S.prototype.tokenizeHex = function(next) { |
- var $0; |
var start = this.get$byteOffset(); |
var hasDigits = false; |
while (true) { |
@@ -5482,10 +5306,10 @@ AbstractScanner$S.prototype.tokenizeHex = function(next) { |
default: |
- if (!$notnull_bool(hasDigits)) { |
+ if (!hasDigits) { |
$throw(new MalformedInputException(this.get$charOffset())); |
} |
- this.appendByteStringToken$2(120/*null.HEXADECIMAL_TOKEN*/, this.asciiString(start)); |
+ this.appendByteStringToken(120/*null.HEXADECIMAL_TOKEN*/, this.asciiString(start)); |
return next; |
} |
@@ -5522,10 +5346,9 @@ AbstractScanner$S.prototype.tokenizeDotOrNumber = function(next) { |
} |
} |
AbstractScanner$S.prototype.tokenizeFractionPart = function(next, start) { |
- var $0; |
var done = false; |
LOOP: |
- while (!$notnull_bool(done)) { |
+ while (!done) { |
switch (next) { |
case 48/*null.$0*/: |
case 49/*null.$1*/: |
@@ -5558,7 +5381,7 @@ AbstractScanner$S.prototype.tokenizeFractionPart = function(next, start) { |
if (next == 100/*null.$d*/ || next == 68/*null.$D*/) { |
next = this.advance(); |
} |
- this.appendByteStringToken$2(100/*null.DOUBLE_TOKEN*/, this.asciiString(start)); |
+ this.appendByteStringToken(100/*null.DOUBLE_TOKEN*/, this.asciiString(start)); |
return next; |
} |
AbstractScanner$S.prototype.tokenizeExponent = function(next) { |
@@ -5584,7 +5407,7 @@ AbstractScanner$S.prototype.tokenizeExponent = function(next) { |
default: |
- if (!$notnull_bool(hasDigits)) { |
+ if (!hasDigits) { |
$throw(new MalformedInputException(this.get$charOffset())); |
} |
return next; |
@@ -5657,7 +5480,6 @@ AbstractScanner$S.prototype.tokenizeMultiLineComment = function(next) { |
} |
} |
AbstractScanner$S.prototype.tokenizeIdentifier = function(next) { |
- var $0; |
var start = this.get$byteOffset(); |
var state = null; |
if (97/*null.$a*/ <= next && next <= 122/*null.$z*/) { |
@@ -5675,14 +5497,14 @@ AbstractScanner$S.prototype.tokenizeIdentifier = function(next) { |
state = null; |
} |
else if (next < 128) { |
- if (state != null && $notnull_bool(state.isLeaf())) { |
+ if (state != null && state.isLeaf()) { |
this.appendKeywordToken(state.get$keyword()); |
} |
- else if ($notnull_bool(isAscii)) { |
- this.appendByteStringToken$2(97/*null.IDENTIFIER_TOKEN*/, this.asciiString(start)); |
+ else if (isAscii) { |
+ this.appendByteStringToken(97/*null.IDENTIFIER_TOKEN*/, this.asciiString(start)); |
} |
else { |
- this.appendByteStringToken$2(97/*null.IDENTIFIER_TOKEN*/, this.utf8String(start, -1)); |
+ this.appendByteStringToken(97/*null.IDENTIFIER_TOKEN*/, this.utf8String(start, -1)); |
} |
return next; |
} |
@@ -5711,7 +5533,6 @@ AbstractScanner$S.prototype.tokenizeRawString = function(next) { |
} |
} |
AbstractScanner$S.prototype.tokenizeString = function(next, start, raw) { |
- var $0; |
var q = next; |
next = this.advance(); |
if (q == next) { |
@@ -5720,11 +5541,11 @@ AbstractScanner$S.prototype.tokenizeString = function(next, start, raw) { |
return this.tokenizeMultiLineString(q, start, raw); |
} |
else { |
- this.appendByteStringToken$2(39/*null.STRING_TOKEN*/, this.utf8String(start, -1)); |
+ this.appendByteStringToken(39/*null.STRING_TOKEN*/, this.utf8String(start, -1)); |
return next; |
} |
} |
- if ($notnull_bool(raw)) { |
+ if (raw) { |
return this.tokenizeSingleLineRawString(next, q, start); |
} |
else { |
@@ -5732,10 +5553,9 @@ AbstractScanner$S.prototype.tokenizeString = function(next, start, raw) { |
} |
} |
AbstractScanner$S.prototype.tokenizeSingleLineString = function(next, q1, start) { |
- var $0; |
while (next != -1) { |
if (next == q1) { |
- this.appendByteStringToken$2(39/*null.STRING_TOKEN*/, this.utf8String(start, 0)); |
+ this.appendByteStringToken(39/*null.STRING_TOKEN*/, this.utf8String(start, 0)); |
return this.advance(); |
} |
else if (next == 92/*null.$BACKSLASH*/) { |
@@ -5752,11 +5572,10 @@ AbstractScanner$S.prototype.tokenizeSingleLineString = function(next, q1, start) |
$throw(new MalformedInputException(this.get$charOffset())); |
} |
AbstractScanner$S.prototype.tokenizeSingleLineRawString = function(next, q1, start) { |
- var $0; |
next = this.advance(); |
while (next != -1) { |
if (next == q1) { |
- this.appendByteStringToken$2(39/*null.STRING_TOKEN*/, this.utf8String(start, 0)); |
+ this.appendByteStringToken(39/*null.STRING_TOKEN*/, this.utf8String(start, 0)); |
return this.advance(); |
} |
else if (next == 10/*null.$LF*/ || next == 13/*null.$CR*/) { |
@@ -5767,7 +5586,6 @@ AbstractScanner$S.prototype.tokenizeSingleLineRawString = function(next, q1, sta |
$throw(new MalformedInputException(this.get$charOffset())); |
} |
AbstractScanner$S.prototype.tokenizeMultiLineString = function(q, start, raw) { |
- var $0; |
var next = this.advance(); |
while (next != -1) { |
if (next == q) { |
@@ -5775,7 +5593,7 @@ AbstractScanner$S.prototype.tokenizeMultiLineString = function(q, start, raw) { |
if (next == q) { |
next = this.advance(); |
if (next == q) { |
- this.appendByteStringToken$2(39/*null.STRING_TOKEN*/, this.utf8String(start, 0)); |
+ this.appendByteStringToken(39/*null.STRING_TOKEN*/, this.utf8String(start, 0)); |
return this.advance(); |
} |
} |
@@ -5807,11 +5625,10 @@ ScannerTask.prototype.get$name = function() { |
ScannerTask.prototype.scan = function(script) { |
var $this = this; // closure support |
this.measure((function () { |
- var $0; |
var elements = $this.scanElements(script.get$text()); |
for (var link = elements; |
- !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link$Element())) { |
- $this.compiler.universe.define((($0 = link.get$head()) && $0.is$Element())); |
+ !link.isEmpty(); link = link.get$tail()) { |
+ $this.compiler.universe.define(link.get$head()); |
} |
}) |
); |
@@ -5833,7 +5650,7 @@ function PartialParser(listener) { |
}) |
; |
this.parseTypeFunction = (function (t) { |
- return $this.parseType((t && t.is$Token())); |
+ return $this.parseType(t); |
}) |
; |
this.endTypeArguments = (function (c, bt, et) { |
@@ -5849,7 +5666,7 @@ function PartialParser(listener) { |
}) |
; |
this.parseTypeVariableFunction = (function (t) { |
- return $this.parseTypeVariable((t && t.is$Token())); |
+ return $this.parseTypeVariable(t); |
}) |
; |
this.endTypeVariables = (function (c, bt, et) { |
@@ -5939,7 +5756,7 @@ PartialParser.prototype.parseFormalParameters = function(token) { |
this.listener.beginFormalParameters$1(begin); |
this.expect('(', token); |
var parameterCount = 0; |
- if ($notnull_bool(this.optional(')', token.next))) { |
+ if (this.optional(')', token.next)) { |
this.listener.endFormalParameters$3(parameterCount, begin, token.next); |
return token.next.next; |
} |
@@ -5950,7 +5767,7 @@ PartialParser.prototype.parseFormalParameters = function(token) { |
this.listener.endFormalParameter$1(token); |
++parameterCount; |
} |
- while ($notnull_bool(this.optional(',', token))) |
+ while (this.optional(',', token)) |
this.listener.endFormalParameters$3(parameterCount, begin, token); |
return this.expect(')', token); |
} |
@@ -5988,26 +5805,25 @@ PartialParser.prototype.isIdentifier = function(token) { |
} |
} |
PartialParser.prototype.parseSupertypesClauseOpt = function(token) { |
- if ($notnull_bool(this.optional('extends', token))) { |
+ if (this.optional('extends', token)) { |
do { |
token = this.parseType(this.next(token)); |
} |
- while ($notnull_bool(this.optional(',', token))) |
+ while (this.optional(',', token)) |
} |
return token; |
} |
PartialParser.prototype.parseFactoryClauseOpt = function(token) { |
- if ($notnull_bool(this.optional('factory', token))) { |
+ if (this.optional('factory', token)) { |
return this.parseType(this.next(token)); |
} |
return token; |
} |
PartialParser.prototype.skipBlock = function(token) { |
- if (!$notnull_bool(this.optional('{', token))) { |
+ if (!this.optional('{', token)) { |
return this.listener.expectedBlock$1(token); |
} |
- var beginGroupToken = (token && token.is$BeginGroupToken()); |
- $assert(beginGroupToken.endGroup == null || beginGroupToken.endGroup.kind === 125/*null.$RBRACE*/, "beginGroupToken.endGroup === null ||\n beginGroupToken.endGroup.kind === $RBRACE", "parser.dart", 171, 12); |
+ var beginGroupToken = token; |
return beginGroupToken.endGroup; |
} |
PartialParser.prototype.skipArguments = function(token) { |
@@ -6019,7 +5835,7 @@ PartialParser.prototype.parseClass = function(token) { |
token = this.parseIdentifier(this.next(token)); |
token = this.parseTypeVariablesOpt(token); |
var extendsKeyword; |
- if ($notnull_bool(this.optional('extends', token))) { |
+ if (this.optional('extends', token)) { |
extendsKeyword = token; |
token = this.parseType(this.next(token)); |
} |
@@ -6029,12 +5845,12 @@ PartialParser.prototype.parseClass = function(token) { |
} |
var implementsKeyword; |
var interfacesCount = 0; |
- if ($notnull_bool(this.optional('implements', token))) { |
+ if (this.optional('implements', token)) { |
do { |
token = this.parseType(this.next(token)); |
++interfacesCount; |
} |
- while ($notnull_bool(this.optional(',', token))) |
+ while (this.optional(',', token)) |
} |
token = this.parseNativeClassClauseOpt(token); |
token = this.parseClassBody(token); |
@@ -6042,22 +5858,21 @@ PartialParser.prototype.parseClass = function(token) { |
return token.next; |
} |
PartialParser.prototype.parseNativeClassClauseOpt = function(token) { |
- if ($notnull_bool(this.optional('native', token))) { |
+ if (this.optional('native', token)) { |
return this.parseString(this.next(token)); |
} |
return token; |
} |
PartialParser.prototype.parseString = function(token) { |
- var $0; |
if (token.kind === 39/*null.STRING_TOKEN*/) { |
return this.next(token); |
} |
else { |
- return (($0 = this.listener.expected$2('string', token)) && $0.is$Token()); |
+ return this.listener.expected$2('string', token); |
} |
} |
PartialParser.prototype.parseIdentifier = function(token) { |
- if ($notnull_bool(this.isIdentifier(token))) { |
+ if (this.isIdentifier(token)) { |
this.listener.handleIdentifier$1(token); |
} |
else { |
@@ -6086,7 +5901,7 @@ PartialParser.prototype.expect = function(string, token) { |
PartialParser.prototype.parseTypeVariable = function(token) { |
this.listener.beginTypeVariable$1(token); |
token = this.parseIdentifier(token); |
- if ($notnull_bool(this.optional('extends', token))) { |
+ if (this.optional('extends', token)) { |
token = this.parseType(this.next(token)); |
} |
else { |
@@ -6101,14 +5916,14 @@ PartialParser.prototype.optional = function(value, token) { |
PartialParser.prototype.parseType = function(token) { |
var begin = token; |
var identifierCount = 1; |
- if ($notnull_bool(this.isIdentifier(token))) { |
+ if (this.isIdentifier(token)) { |
token = this.parseIdentifier(token); |
- while ($notnull_bool(this.optional('.', token))) { |
+ while (this.optional('.', token)) { |
token = this.parseIdentifier(this.next(token)); |
++identifierCount; |
} |
} |
- else if ($notnull_bool(this.optional('var', token))) { |
+ else if (this.optional('var', token)) { |
this.listener.handleVarKeyword$1(token); |
this.listener.endType$3(identifierCount, begin, token); |
return this.next(token); |
@@ -6124,24 +5939,23 @@ PartialParser.prototype.parseTypeArgumentsOpt = function(token) { |
return this.parseStuff(token, this.beginTypeArguments, this.parseTypeFunction, this.endTypeArguments, this.handleNoTypeArguments); |
} |
PartialParser.prototype.parseTypeVariablesOpt = function(token) { |
- if ($notnull_bool(this.optional('<', token))) { |
- var beginGroupToken = (token && token.is$BeginGroupToken()); |
+ if (this.optional('<', token)) { |
+ var beginGroupToken = token; |
token = this.next(beginGroupToken.endGroup); |
} |
this.listener.handleNoTypeVariables$1(token); |
return token; |
} |
PartialParser.prototype.parseStuff = function(token, beginStuff, stuffParser, endStuff, handleNoStuff) { |
- var $0; |
- if ($notnull_bool(this.optional('<', token))) { |
+ if (this.optional('<', token)) { |
var begin = token; |
beginStuff.call$1(begin); |
var count = 0; |
do { |
- token = (($0 = stuffParser.call$1(this.next(token))) && $0.is$Token()); |
+ token = stuffParser.call$1(this.next(token)); |
++count; |
} |
- while ($notnull_bool(this.optional(',', token))) |
+ while (this.optional(',', token)) |
endStuff.call$3(count, begin, token); |
return this.expect('>', token); |
} |
@@ -6177,11 +5991,11 @@ PartialParser.prototype.parseTopLevelMember = function(token) { |
token = this.parseIdentifier(previous); |
var isField; |
while (true) { |
- if ($notnull_bool(this.optional('(', token))) { |
+ if (this.optional('(', token)) { |
isField = false; |
break; |
} |
- else if ($notnull_bool(this.optional('=', token)) || $notnull_bool(this.optional(';', token))) { |
+ else if (this.optional('=', token) || this.optional(';', token)) { |
isField = true; |
break; |
} |
@@ -6189,16 +6003,16 @@ PartialParser.prototype.parseTopLevelMember = function(token) { |
token = this.listener.unexpected$1(token); |
} |
} |
- if (!$notnull_bool(isField)) { |
- token = this.next(this.skipArguments((token && token.is$BeginGroupToken()))); |
+ if (!isField) { |
+ token = this.next(this.skipArguments(token)); |
} |
while (token != null && token.kind !== 123/*null.LBRACE_TOKEN*/ && token.kind !== 59/*null.SEMICOLON_TOKEN*/) { |
token = this.next(token); |
} |
- if (!$notnull_bool(this.optional(';', token))) { |
+ if (!this.optional(';', token)) { |
token = this.skipBlock(token); |
} |
- if ($notnull_bool(isField)) { |
+ if (isField) { |
this.listener.endTopLevelField$2(start, token); |
} |
else { |
@@ -6235,7 +6049,7 @@ PartialParser.prototype.handleNoTypeVariables$1 = function($0) { |
return this.handleNoTypeVariables.call$1($0); |
}; |
PartialParser.prototype.parseClass$1 = function($0) { |
- return this.parseClass(($0 && $0.is$Token())); |
+ return this.parseClass($0); |
}; |
// ********** Code for Parser ************** |
function Parser(listener) { |
@@ -6253,7 +6067,7 @@ Parser.prototype.parseFunction = function(token) { |
return this.parseFunctionBody(token); |
} |
Parser.prototype.parseFunctionBody = function(token) { |
- if ($notnull_bool(this.optional(';', token))) { |
+ if (this.optional(';', token)) { |
this.listener.endFunctionBody$3(0, null, token); |
return token.next; |
} |
@@ -6261,7 +6075,7 @@ Parser.prototype.parseFunctionBody = function(token) { |
var statementCount = 0; |
this.listener.beginFunctionBody$1(begin); |
token = this.checkEof(this.expect('{', token)); |
- while (!$notnull_bool(this.optional('}', token))) { |
+ while (!this.optional('}', token)) { |
token = this.parseStatement(token); |
++statementCount; |
} |
@@ -6312,9 +6126,8 @@ Parser.prototype.expectSemicolon = function(token) { |
Parser.prototype.parseReturnStatement = function(token) { |
var begin = token; |
this.listener.beginReturnStatement$1(begin); |
- $assert('return' === token.get$stringValue(), "'return' === token.stringValue", "parser.dart", 455, 12); |
token = this.next(token); |
- if ($notnull_bool(this.optional(';', token))) { |
+ if (this.optional(';', token)) { |
this.listener.endReturnStatement$3(false, begin, token); |
} |
else { |
@@ -6324,7 +6137,6 @@ Parser.prototype.parseReturnStatement = function(token) { |
return this.expectSemicolon(token); |
} |
Parser.prototype.parseExpressionStatementOrDeclaration = function(token) { |
- $assert(token.kind === 97/*null.IDENTIFIER_TOKEN*/, "token.kind === IDENTIFIER_TOKEN", "parser.dart", 467, 12); |
var peek = token.next; |
if (peek.kind === 46/*null.PERIOD_TOKEN*/) { |
if (peek.next.kind === 97/*null.IDENTIFIER_TOKEN*/) { |
@@ -6335,7 +6147,7 @@ Parser.prototype.parseExpressionStatementOrDeclaration = function(token) { |
return this.parseLocalDeclaration(token, peek); |
} |
else if (peek.kind === 60/*null.LT_TOKEN*/) { |
- var beginGroupToken = (peek && peek.is$BeginGroupToken()); |
+ var beginGroupToken = peek; |
var gtToken = beginGroupToken.endGroup; |
if (gtToken != null && gtToken.next.kind === 97/*null.IDENTIFIER_TOKEN*/) { |
var identifier = gtToken.next; |
@@ -6345,10 +6157,10 @@ Parser.prototype.parseExpressionStatementOrDeclaration = function(token) { |
return this.parseLocalDeclaration(token, identifier); |
} |
else if (afterIdKind === 41/*null.RPAREN_TOKEN*/) { |
- var beginParen = (afterId && afterId.is$BeginGroupToken()); |
+ var beginParen = afterId; |
var endParen = beginParen.endGroup; |
var afterParens = endParen.next; |
- if ($notnull_bool(this.optional('{', afterParens)) || $notnull_bool(this.optional('=>', afterParens))) { |
+ if (this.optional('{', afterParens) || this.optional('=>', afterParens)) { |
return this.parseLocalDeclaration(token, identifier); |
} |
} |
@@ -6373,7 +6185,7 @@ Parser.prototype.parseExpressionStatement = function(token) { |
} |
Parser.prototype.parseExpression = function(token) { |
token = this.parseConditionalExpression(token); |
- if ($notnull_bool(this.isAssignmentOperator(token))) { |
+ if (this.isAssignmentOperator(token)) { |
var operator = token; |
token = this.parseExpression(this.next(token)); |
this.listener.handleAssignmentExpression$1(operator); |
@@ -6385,7 +6197,7 @@ Parser.prototype.isAssignmentOperator = function(token) { |
} |
Parser.prototype.parseConditionalExpression = function(token) { |
token = this.parseBinaryExpression(token, 4); |
- if ($notnull_bool(this.optional('?', token))) { |
+ if (this.optional('?', token)) { |
var question = token; |
token = this.parseExpression(this.next(token)); |
var colon = token; |
@@ -6396,10 +6208,9 @@ Parser.prototype.parseConditionalExpression = function(token) { |
return token; |
} |
Parser.prototype.parseBinaryExpression = function(token, precedence) { |
- $assert(precedence >= 4, "precedence >= 4", "parser.dart", 553, 12); |
token = this.parsePrimary(token); |
var tokenLevel = this.getPrecedence(token); |
- for (var level = $assert_num(tokenLevel); |
+ for (var level = tokenLevel; |
level >= precedence; --level) { |
while (tokenLevel === level) { |
var operator = token; |
@@ -6650,7 +6461,7 @@ Parser.prototype.parseSend = function(token) { |
return token; |
} |
Parser.prototype.parseArgumentsOpt = function(token) { |
- if (!$notnull_bool(this.optional('(', token))) { |
+ if (!this.optional('(', token)) { |
this.listener.handleNoArguments$1(token); |
return token; |
} |
@@ -6661,9 +6472,8 @@ Parser.prototype.parseArgumentsOpt = function(token) { |
Parser.prototype.parseArguments = function(token) { |
var begin = token; |
this.listener.beginArguments$1(begin); |
- $assert('(' === token.get$stringValue(), "'(' === token.stringValue", "parser.dart", 686, 12); |
var argumentCount = 0; |
- if ($notnull_bool(this.optional(')', token.next))) { |
+ if (this.optional(')', token.next)) { |
this.listener.endArguments$3(argumentCount, begin, token.next); |
return token.next.next; |
} |
@@ -6671,7 +6481,7 @@ Parser.prototype.parseArguments = function(token) { |
token = this.parseExpression(this.next(token)); |
++argumentCount; |
} |
- while ($notnull_bool(this.optional(',', token))) |
+ while (this.optional(',', token)) |
this.listener.endArguments$3(argumentCount, begin, token); |
return this.expect(')', token); |
} |
@@ -6680,7 +6490,7 @@ Parser.prototype.parseVariablesDeclaration = function(token) { |
this.listener.beginVariablesDeclaration$1(token); |
token = this.parseFinalVarOrType(token); |
token = this.parseOptionallyInitializedIdentifier(token); |
- while ($notnull_bool(this.optional(',', token))) { |
+ while (this.optional(',', token)) { |
token = this.parseOptionallyInitializedIdentifier(this.next(token)); |
++count; |
} |
@@ -6690,7 +6500,7 @@ Parser.prototype.parseVariablesDeclaration = function(token) { |
Parser.prototype.parseOptionallyInitializedIdentifier = function(token) { |
this.listener.beginInitializedIdentifier$1(token); |
token = this.parseIdentifier(token); |
- if ($notnull_bool(this.optional('=', token))) { |
+ if (this.optional('=', token)) { |
var assignment = token; |
this.listener.beginInitializer$1(token); |
token = this.parseExpression(this.next(token)); |
@@ -6721,7 +6531,7 @@ Parser.prototype.parseIfStatement = function(token) { |
token = this.parseArguments(token); |
token = this.parseStatement(token); |
var elseToken = null; |
- if ($notnull_bool(this.optional('else', token))) { |
+ if (this.optional('else', token)) { |
elseToken = token; |
token = this.parseStatement(token.next); |
} |
@@ -6746,7 +6556,7 @@ Parser.prototype.parseBlock = function(token) { |
this.listener.beginBlock$1(begin); |
var statementCount = 0; |
token = this.expect('{', token); |
- while (!$notnull_bool(this.optional('}', token))) { |
+ while (!this.optional('}', token)) { |
token = this.parseStatement(token); |
++statementCount; |
} |
@@ -6757,7 +6567,7 @@ Parser.prototype.parseThrowStatement = function(token) { |
var throwToken = token; |
this.listener.beginThrowStatement$1(throwToken); |
token = this.expect('throw', token); |
- if ($notnull_bool(this.optional(';', token))) { |
+ if (this.optional(';', token)) { |
this.listener.endRethrowStatement$2(throwToken, token); |
return token.next; |
} |
@@ -6768,7 +6578,7 @@ Parser.prototype.parseThrowStatement = function(token) { |
} |
} |
Parser.prototype.parseFunction$1 = function($0) { |
- return this.parseFunction(($0 && $0.is$Token())); |
+ return this.parseFunction($0); |
}; |
// ********** Code for ParserTask ************** |
function ParserTask(compiler) { |
@@ -6781,11 +6591,10 @@ ParserTask.prototype.get$name = function() { |
} |
ParserTask.prototype.parse = function(element) { |
var $this = this; // closure support |
- var $0; |
- return (($0 = this.measure((function () { |
+ return this.measure((function () { |
return element.parseNode($this.compiler, $this.compiler); |
}) |
- )) && $0.is$Node()); |
+ ); |
} |
// ********** Code for Listener ************** |
function Listener() {} |
@@ -6997,208 +6806,208 @@ Listener.prototype.unexpected = function(token) { |
$throw(new ParserError(("Unexpected token '" + token + "' @ " + token.charOffset + ""))); |
} |
Listener.prototype.beginArguments$1 = function($0) { |
- return this.beginArguments(($0 && $0.is$Token())); |
+ return this.beginArguments($0); |
}; |
Listener.prototype.beginBlock$1 = function($0) { |
- return this.beginBlock(($0 && $0.is$Token())); |
+ return this.beginBlock($0); |
}; |
Listener.prototype.beginClass$1 = function($0) { |
- return this.beginClass(($0 && $0.is$Token())); |
+ return this.beginClass($0); |
}; |
Listener.prototype.beginExpressionStatement$1 = function($0) { |
- return this.beginExpressionStatement(($0 && $0.is$Token())); |
+ return this.beginExpressionStatement($0); |
}; |
Listener.prototype.beginForStatement$1 = function($0) { |
- return this.beginForStatement(($0 && $0.is$Token())); |
+ return this.beginForStatement($0); |
}; |
Listener.prototype.beginFormalParameter$1 = function($0) { |
- return this.beginFormalParameter(($0 && $0.is$Token())); |
+ return this.beginFormalParameter($0); |
}; |
Listener.prototype.beginFormalParameters$1 = function($0) { |
- return this.beginFormalParameters(($0 && $0.is$Token())); |
+ return this.beginFormalParameters($0); |
}; |
Listener.prototype.beginFunction$1 = function($0) { |
- return this.beginFunction(($0 && $0.is$Token())); |
+ return this.beginFunction($0); |
}; |
Listener.prototype.beginFunctionBody$1 = function($0) { |
- return this.beginFunctionBody(($0 && $0.is$Token())); |
+ return this.beginFunctionBody($0); |
}; |
Listener.prototype.beginFunctionName$1 = function($0) { |
- return this.beginFunctionName(($0 && $0.is$Token())); |
+ return this.beginFunctionName($0); |
}; |
Listener.prototype.beginFunctionTypeAlias$1 = function($0) { |
- return this.beginFunctionTypeAlias(($0 && $0.is$Token())); |
+ return this.beginFunctionTypeAlias($0); |
}; |
Listener.prototype.beginIfStatement$1 = function($0) { |
- return this.beginIfStatement(($0 && $0.is$Token())); |
+ return this.beginIfStatement($0); |
}; |
Listener.prototype.beginInitializedIdentifier$1 = function($0) { |
- return this.beginInitializedIdentifier(($0 && $0.is$Token())); |
+ return this.beginInitializedIdentifier($0); |
}; |
Listener.prototype.beginInitializer$1 = function($0) { |
- return this.beginInitializer(($0 && $0.is$Token())); |
+ return this.beginInitializer($0); |
}; |
Listener.prototype.beginInterface$1 = function($0) { |
- return this.beginInterface(($0 && $0.is$Token())); |
+ return this.beginInterface($0); |
}; |
Listener.prototype.beginLibraryTag$1 = function($0) { |
- return this.beginLibraryTag(($0 && $0.is$Token())); |
+ return this.beginLibraryTag($0); |
}; |
Listener.prototype.beginReturnStatement$1 = function($0) { |
- return this.beginReturnStatement(($0 && $0.is$Token())); |
+ return this.beginReturnStatement($0); |
}; |
Listener.prototype.beginSend$1 = function($0) { |
- return this.beginSend(($0 && $0.is$Token())); |
+ return this.beginSend($0); |
}; |
Listener.prototype.beginThrowStatement$1 = function($0) { |
- return this.beginThrowStatement(($0 && $0.is$Token())); |
+ return this.beginThrowStatement($0); |
}; |
Listener.prototype.beginTopLevelMember$1 = function($0) { |
- return this.beginTopLevelMember(($0 && $0.is$Token())); |
+ return this.beginTopLevelMember($0); |
}; |
Listener.prototype.beginTypeArguments$1 = function($0) { |
- return this.beginTypeArguments(($0 && $0.is$Token())); |
+ return this.beginTypeArguments($0); |
}; |
Listener.prototype.beginTypeVariable$1 = function($0) { |
- return this.beginTypeVariable(($0 && $0.is$Token())); |
+ return this.beginTypeVariable($0); |
}; |
Listener.prototype.beginTypeVariables$1 = function($0) { |
- return this.beginTypeVariables(($0 && $0.is$Token())); |
+ return this.beginTypeVariables($0); |
}; |
Listener.prototype.beginVariablesDeclaration$1 = function($0) { |
- return this.beginVariablesDeclaration(($0 && $0.is$Token())); |
+ return this.beginVariablesDeclaration($0); |
}; |
Listener.prototype.endArguments$3 = function($0, $1, $2) { |
- return this.endArguments($assert_num($0), ($1 && $1.is$Token()), ($2 && $2.is$Token())); |
+ return this.endArguments($0, $1, $2); |
}; |
Listener.prototype.endBlock$3 = function($0, $1, $2) { |
- return this.endBlock($assert_num($0), ($1 && $1.is$Token()), ($2 && $2.is$Token())); |
+ return this.endBlock($0, $1, $2); |
}; |
Listener.prototype.endClass$5 = function($0, $1, $2, $3, $4) { |
- return this.endClass($assert_num($0), ($1 && $1.is$Token()), ($2 && $2.is$Token()), ($3 && $3.is$Token()), ($4 && $4.is$Token())); |
+ return this.endClass($0, $1, $2, $3, $4); |
}; |
Listener.prototype.endExpressionStatement$1 = function($0) { |
- return this.endExpressionStatement(($0 && $0.is$Token())); |
+ return this.endExpressionStatement($0); |
}; |
Listener.prototype.endForStatement$2 = function($0, $1) { |
- return this.endForStatement(($0 && $0.is$Token()), ($1 && $1.is$Token())); |
+ return this.endForStatement($0, $1); |
}; |
Listener.prototype.endFormalParameter$1 = function($0) { |
- return this.endFormalParameter(($0 && $0.is$Token())); |
+ return this.endFormalParameter($0); |
}; |
Listener.prototype.endFormalParameters$3 = function($0, $1, $2) { |
- return this.endFormalParameters($assert_num($0), ($1 && $1.is$Token()), ($2 && $2.is$Token())); |
+ return this.endFormalParameters($0, $1, $2); |
}; |
Listener.prototype.endFunctionBody$3 = function($0, $1, $2) { |
- return this.endFunctionBody($assert_num($0), ($1 && $1.is$Token()), ($2 && $2.is$Token())); |
+ return this.endFunctionBody($0, $1, $2); |
}; |
Listener.prototype.endFunctionName$1 = function($0) { |
- return this.endFunctionName(($0 && $0.is$Token())); |
+ return this.endFunctionName($0); |
}; |
Listener.prototype.endFunctionTypeAlias$1 = function($0) { |
- return this.endFunctionTypeAlias(($0 && $0.is$Token())); |
+ return this.endFunctionTypeAlias($0); |
}; |
Listener.prototype.endIfStatement$2 = function($0, $1) { |
- return this.endIfStatement(($0 && $0.is$Token()), ($1 && $1.is$Token())); |
+ return this.endIfStatement($0, $1); |
}; |
Listener.prototype.endInitializedIdentifier$0 = function() { |
return this.endInitializedIdentifier(); |
}; |
Listener.prototype.endInitializer$1 = function($0) { |
- return this.endInitializer(($0 && $0.is$Token())); |
+ return this.endInitializer($0); |
}; |
Listener.prototype.endInterface$1 = function($0) { |
- return this.endInterface(($0 && $0.is$Token())); |
+ return this.endInterface($0); |
}; |
Listener.prototype.endRethrowStatement$2 = function($0, $1) { |
- return this.endRethrowStatement(($0 && $0.is$Token()), ($1 && $1.is$Token())); |
+ return this.endRethrowStatement($0, $1); |
}; |
Listener.prototype.endReturnStatement$3 = function($0, $1, $2) { |
- return this.endReturnStatement($assert_bool($0), ($1 && $1.is$Token()), ($2 && $2.is$Token())); |
+ return this.endReturnStatement($0, $1, $2); |
}; |
Listener.prototype.endSend$1 = function($0) { |
- return this.endSend(($0 && $0.is$Token())); |
+ return this.endSend($0); |
}; |
Listener.prototype.endThrowStatement$2 = function($0, $1) { |
- return this.endThrowStatement(($0 && $0.is$Token()), ($1 && $1.is$Token())); |
+ return this.endThrowStatement($0, $1); |
}; |
Listener.prototype.endTopLevelField$2 = function($0, $1) { |
- return this.endTopLevelField(($0 && $0.is$Token()), ($1 && $1.is$Token())); |
+ return this.endTopLevelField($0, $1); |
}; |
Listener.prototype.endTopLevelMethod$2 = function($0, $1) { |
- return this.endTopLevelMethod(($0 && $0.is$Token()), ($1 && $1.is$Token())); |
+ return this.endTopLevelMethod($0, $1); |
}; |
Listener.prototype.endType$3 = function($0, $1, $2) { |
- return this.endType($assert_num($0), ($1 && $1.is$Token()), ($2 && $2.is$Token())); |
+ return this.endType($0, $1, $2); |
}; |
Listener.prototype.endTypeArguments$3 = function($0, $1, $2) { |
- return this.endTypeArguments($assert_num($0), ($1 && $1.is$Token()), ($2 && $2.is$Token())); |
+ return this.endTypeArguments($0, $1, $2); |
}; |
Listener.prototype.endTypeVariable$1 = function($0) { |
- return this.endTypeVariable(($0 && $0.is$Token())); |
+ return this.endTypeVariable($0); |
}; |
Listener.prototype.endTypeVariables$3 = function($0, $1, $2) { |
- return this.endTypeVariables($assert_num($0), ($1 && $1.is$Token()), ($2 && $2.is$Token())); |
+ return this.endTypeVariables($0, $1, $2); |
}; |
Listener.prototype.endVariablesDeclaration$2 = function($0, $1) { |
- return this.endVariablesDeclaration($assert_num($0), ($1 && $1.is$Token())); |
+ return this.endVariablesDeclaration($0, $1); |
}; |
Listener.prototype.expected$2 = function($0, $1) { |
- return this.expected($assert_String($0), ($1 && $1.is$Token())); |
+ return this.expected($0, $1); |
}; |
Listener.prototype.expectedBlock$1 = function($0) { |
- return this.expectedBlock(($0 && $0.is$Token())); |
+ return this.expectedBlock($0); |
}; |
Listener.prototype.expectedIdentifier$1 = function($0) { |
- return this.expectedIdentifier(($0 && $0.is$Token())); |
+ return this.expectedIdentifier($0); |
}; |
Listener.prototype.expectedType$1 = function($0) { |
- return this.expectedType(($0 && $0.is$Token())); |
+ return this.expectedType($0); |
}; |
Listener.prototype.handleAssignmentExpression$1 = function($0) { |
- return this.handleAssignmentExpression(($0 && $0.is$Token())); |
+ return this.handleAssignmentExpression($0); |
}; |
Listener.prototype.handleBinaryExpression$1 = function($0) { |
- return this.handleBinaryExpression(($0 && $0.is$Token())); |
+ return this.handleBinaryExpression($0); |
}; |
Listener.prototype.handleConditionalExpression$2 = function($0, $1) { |
- return this.handleConditionalExpression(($0 && $0.is$Token()), ($1 && $1.is$Token())); |
+ return this.handleConditionalExpression($0, $1); |
}; |
Listener.prototype.handleIdentifier$1 = function($0) { |
- return this.handleIdentifier(($0 && $0.is$Token())); |
+ return this.handleIdentifier($0); |
}; |
Listener.prototype.handleLiteralBool$1 = function($0) { |
- return this.handleLiteralBool(($0 && $0.is$Token())); |
+ return this.handleLiteralBool($0); |
}; |
Listener.prototype.handleLiteralDouble$1 = function($0) { |
- return this.handleLiteralDouble(($0 && $0.is$Token())); |
+ return this.handleLiteralDouble($0); |
}; |
Listener.prototype.handleLiteralInt$1 = function($0) { |
- return this.handleLiteralInt(($0 && $0.is$Token())); |
+ return this.handleLiteralInt($0); |
}; |
Listener.prototype.handleLiteralString$1 = function($0) { |
- return this.handleLiteralString(($0 && $0.is$Token())); |
+ return this.handleLiteralString($0); |
}; |
Listener.prototype.handleNoArguments$1 = function($0) { |
- return this.handleNoArguments(($0 && $0.is$Token())); |
+ return this.handleNoArguments($0); |
}; |
Listener.prototype.handleNoType$1 = function($0) { |
- return this.handleNoType(($0 && $0.is$Token())); |
+ return this.handleNoType($0); |
}; |
Listener.prototype.handleNoTypeArguments$1 = function($0) { |
- return this.handleNoTypeArguments(($0 && $0.is$Token())); |
+ return this.handleNoTypeArguments($0); |
}; |
Listener.prototype.handleNoTypeVariables$1 = function($0) { |
- return this.handleNoTypeVariables(($0 && $0.is$Token())); |
+ return this.handleNoTypeVariables($0); |
}; |
Listener.prototype.handleVarKeyword$1 = function($0) { |
- return this.handleVarKeyword(($0 && $0.is$Token())); |
+ return this.handleVarKeyword($0); |
}; |
Listener.prototype.handleVoidKeyword$1 = function($0) { |
- return this.handleVoidKeyword(($0 && $0.is$Token())); |
+ return this.handleVoidKeyword($0); |
}; |
Listener.prototype.unexpected$1 = function($0) { |
- return this.unexpected(($0 && $0.is$Token())); |
+ return this.unexpected($0); |
}; |
Listener.prototype.unexpectedEof$0 = function() { |
return this.unexpectedEof(); |
@@ -7227,12 +7036,11 @@ ElementListener.prototype.beginLibraryTag = function(token) { |
this.canceler.cancel("Cannot handle library tags"); |
} |
ElementListener.prototype.endClass = function(interfacesCount, beginToken, extendsKeyword, implementsKeyword, endToken) { |
- var $0; |
for (; interfacesCount > 0; --interfacesCount) { |
this.popNode(); |
} |
- var supertype = (($0 = this.popNode()) && $0.is$Identifier()); |
- var name = (($0 = this.popNode()) && $0.is$Identifier()); |
+ var supertype = this.popNode(); |
+ var name = this.popNode(); |
this.pushElement(new PartialClassElement(name.get$source(), beginToken, endToken)); |
} |
ElementListener.prototype.endInterface = function(token) { |
@@ -7242,8 +7050,7 @@ ElementListener.prototype.endFunctionTypeAlias = function(token) { |
this.canceler.cancel("Cannot handle typedefs"); |
} |
ElementListener.prototype.endTopLevelMethod = function(beginToken, endToken) { |
- var $0; |
- var name = (($0 = this.popNode()) && $0.is$Identifier()); |
+ var name = this.popNode(); |
this.pushElement(new PartialFunctionElement(name.get$source(), beginToken, endToken)); |
} |
ElementListener.prototype.endTopLevelField = function(beginToken, endToken) { |
@@ -7256,9 +7063,8 @@ ElementListener.prototype.handleNoType = function(token) { |
this.pushNode(null); |
} |
ElementListener.prototype.endTypeVariable = function(token) { |
- var $0; |
- var bound = (($0 = this.popNode()) && $0.is$TypeAnnotation()); |
- var name = (($0 = this.popNode()) && $0.is$Identifier()); |
+ var bound = this.popNode(); |
+ var name = this.popNode(); |
} |
ElementListener.prototype.endTypeArguments = function(count, beginToken, endToken) { |
for (; count > 0; --count) { |
@@ -7284,19 +7090,15 @@ ElementListener.prototype.unexpected = function(token) { |
this.canceler.cancel(("Unexpected token '" + token + "' @ " + token.charOffset + "")); |
} |
ElementListener.prototype.pushElement = function(element) { |
- var $0; |
- this.topLevelElements = (($0 = this.topLevelElements.prepend(element)) && $0.is$Link$Element()); |
+ this.topLevelElements = this.topLevelElements.prepend(element); |
} |
ElementListener.prototype.pushNode = function(node) { |
- var $0; |
- this.nodes = (($0 = this.nodes.prepend(node)) && $0.is$Link$Node()); |
+ this.nodes = this.nodes.prepend(node); |
this.log(("push " + this.nodes + "")); |
} |
ElementListener.prototype.popNode = function() { |
- var $0; |
- $assert(!$notnull_bool(this.nodes.isEmpty()), "!nodes.isEmpty()", "listener.dart", 337, 12); |
- var node = (($0 = this.nodes.get$head()) && $0.is$Node()); |
- this.nodes = (($0 = this.nodes.get$tail()) && $0.is$Link$Node()); |
+ var node = this.nodes.get$head(); |
+ this.nodes = this.nodes.get$tail(); |
this.log(("pop " + this.nodes + "")); |
return node; |
} |
@@ -7304,49 +7106,49 @@ ElementListener.prototype.log = function(message) { |
} |
ElementListener.prototype.beginLibraryTag$1 = function($0) { |
- return this.beginLibraryTag(($0 && $0.is$Token())); |
+ return this.beginLibraryTag($0); |
}; |
ElementListener.prototype.endClass$5 = function($0, $1, $2, $3, $4) { |
- return this.endClass($assert_num($0), ($1 && $1.is$Token()), ($2 && $2.is$Token()), ($3 && $3.is$Token()), ($4 && $4.is$Token())); |
+ return this.endClass($0, $1, $2, $3, $4); |
}; |
ElementListener.prototype.endFunctionTypeAlias$1 = function($0) { |
- return this.endFunctionTypeAlias(($0 && $0.is$Token())); |
+ return this.endFunctionTypeAlias($0); |
}; |
ElementListener.prototype.endInterface$1 = function($0) { |
- return this.endInterface(($0 && $0.is$Token())); |
+ return this.endInterface($0); |
}; |
ElementListener.prototype.endTopLevelField$2 = function($0, $1) { |
- return this.endTopLevelField(($0 && $0.is$Token()), ($1 && $1.is$Token())); |
+ return this.endTopLevelField($0, $1); |
}; |
ElementListener.prototype.endTopLevelMethod$2 = function($0, $1) { |
- return this.endTopLevelMethod(($0 && $0.is$Token()), ($1 && $1.is$Token())); |
+ return this.endTopLevelMethod($0, $1); |
}; |
ElementListener.prototype.endTypeArguments$3 = function($0, $1, $2) { |
- return this.endTypeArguments($assert_num($0), ($1 && $1.is$Token()), ($2 && $2.is$Token())); |
+ return this.endTypeArguments($0, $1, $2); |
}; |
ElementListener.prototype.endTypeVariable$1 = function($0) { |
- return this.endTypeVariable(($0 && $0.is$Token())); |
+ return this.endTypeVariable($0); |
}; |
ElementListener.prototype.expected$2 = function($0, $1) { |
- return this.expected($assert_String($0), ($1 && $1.is$Token())); |
+ return this.expected($0, $1); |
}; |
ElementListener.prototype.expectedBlock$1 = function($0) { |
- return this.expectedBlock(($0 && $0.is$Token())); |
+ return this.expectedBlock($0); |
}; |
ElementListener.prototype.expectedIdentifier$1 = function($0) { |
- return this.expectedIdentifier(($0 && $0.is$Token())); |
+ return this.expectedIdentifier($0); |
}; |
ElementListener.prototype.expectedType$1 = function($0) { |
- return this.expectedType(($0 && $0.is$Token())); |
+ return this.expectedType($0); |
}; |
ElementListener.prototype.handleIdentifier$1 = function($0) { |
- return this.handleIdentifier(($0 && $0.is$Token())); |
+ return this.handleIdentifier($0); |
}; |
ElementListener.prototype.handleNoType$1 = function($0) { |
- return this.handleNoType(($0 && $0.is$Token())); |
+ return this.handleNoType($0); |
}; |
ElementListener.prototype.unexpected$1 = function($0) { |
- return this.unexpected(($0 && $0.is$Token())); |
+ return this.unexpected($0); |
}; |
ElementListener.prototype.unexpectedEof$0 = function() { |
return this.unexpectedEof(); |
@@ -7360,16 +7162,14 @@ function NodeListener(canceler, logger) { |
} |
$inherits(NodeListener, ElementListener); |
NodeListener.prototype.endClass = function(interfacesCount, beginToken, extendsKeyword, implementsKeyword, endToken) { |
- var $0; |
var interfaces = this.makeNodeList(interfacesCount, implementsKeyword, null, ","); |
- var supertype = (($0 = this.popNode()) && $0.is$TypeAnnotation()); |
- var name = (($0 = this.popNode()) && $0.is$Identifier()); |
+ var supertype = this.popNode(); |
+ var name = this.popNode(); |
this.pushNode(new ClassNode(name, supertype, interfaces, beginToken, extendsKeyword, endToken)); |
} |
NodeListener.prototype.endFormalParameter = function(token) { |
- var $0; |
var name = new NodeList.singleton$ctor(this.popNode()); |
- var type = (($0 = this.popNode()) && $0.is$TypeAnnotation()); |
+ var type = this.popNode(); |
this.pushNode(new VariableDefinitions(type, null, name, token)); |
} |
NodeListener.prototype.endFormalParameters = function(count, beginToken, endToken) { |
@@ -7382,8 +7182,7 @@ NodeListener.prototype.handleNoArguments = function(token) { |
this.pushNode(null); |
} |
NodeListener.prototype.endReturnStatement = function(hasExpression, beginToken, endToken) { |
- var $0; |
- var expression = (($0 = $notnull_bool(hasExpression) ? this.popNode() : null) && $0.is$Expression()); |
+ var expression = hasExpression ? this.popNode() : null; |
this.pushNode(new Return(beginToken, endToken, expression)); |
} |
NodeListener.prototype.endExpressionStatement = function(token) { |
@@ -7415,8 +7214,8 @@ NodeListener.prototype.handleAssignmentExpression = function(token) { |
var arguments = new NodeList.singleton$ctor(this.popNode()); |
var node = this.popNode(); |
if (!(node instanceof Send)) this.canceler.cancel(('not assignable: ' + node + '')); |
- var send = (node && node.is$Send()); |
- if (!$notnull_bool(send.get$isPropertyAccess())) this.canceler.cancel(('not assignable: ' + node + '')); |
+ var send = node; |
+ if (!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)); |
} |
@@ -7427,8 +7226,7 @@ NodeListener.prototype.handleConditionalExpression = function(question, colon) { |
this.canceler.cancel('conditional expression not implemented yet'); |
} |
NodeListener.prototype.endSend = function(token) { |
- var $0; |
- var arguments = (($0 = this.popNode()) && $0.is$NodeList()); |
+ var arguments = this.popNode(); |
var selector = this.popNode(); |
this.pushNode(new Send(null, selector, arguments)); |
} |
@@ -7436,11 +7234,10 @@ NodeListener.prototype.handleVoidKeyword = function(token) { |
this.pushNode(new TypeAnnotation(new Identifier(token))); |
} |
NodeListener.prototype.endFunctionBody = function(count, beginToken, endToken) { |
- var $0; |
var block = new Block(this.makeNodeList(count, beginToken, endToken, null)); |
var formals = this.popNode(); |
var name = this.popNode(); |
- var type = (($0 = this.popNode()) && $0.is$TypeAnnotation()); |
+ var type = this.popNode(); |
this.pushNode(new FunctionExpression(name, formals, block, type)); |
} |
NodeListener.prototype.handleVarKeyword = function(token) { |
@@ -7450,144 +7247,137 @@ NodeListener.prototype.handleFinalKeyword = function(token) { |
this.pushNode(new Identifier(token)); |
} |
NodeListener.prototype.endVariablesDeclaration = function(count, endToken) { |
- var $0; |
var variables = this.makeNodeList(count, null, null, ","); |
- var type = (($0 = this.popNode()) && $0.is$TypeAnnotation()); |
+ var type = this.popNode(); |
this.pushNode(new VariableDefinitions(type, null, variables, endToken)); |
} |
NodeListener.prototype.endInitializer = function(assignmentOperator) { |
- var $0; |
- var initializer = (($0 = this.popNode()) && $0.is$Expression()); |
+ var initializer = this.popNode(); |
var arguments = new NodeList.singleton$ctor(initializer); |
- var name = (($0 = this.popNode()) && $0.is$Expression()); |
+ var name = this.popNode(); |
this.pushNode(new SendSet(null, name, assignmentOperator, arguments)); |
} |
NodeListener.prototype.endIfStatement = function(ifToken, elseToken) { |
- var $0; |
- 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()); |
+ var elsePart = (elseToken == null) ? null : this.popNode(); |
+ var thenPart = this.popNode(); |
+ var condition = this.popNode(); |
this.pushNode(new If(condition, thenPart, elsePart, ifToken, elseToken)); |
} |
NodeListener.prototype.endForStatement = function(beginToken, endToken) { |
- var $0; |
- var body = (($0 = this.popNode()) && $0.is$Statement()); |
- var update = (($0 = this.popNode()) && $0.is$Expression()); |
- var condition = (($0 = this.popNode()) && $0.is$ExpressionStatement()); |
- var initializer = (($0 = this.popNode()) && $0.is$VariableDefinitions()); |
+ var body = this.popNode(); |
+ var update = this.popNode(); |
+ var condition = this.popNode(); |
+ var initializer = this.popNode(); |
this.pushNode(new For(initializer, condition, update, body, beginToken)); |
} |
NodeListener.prototype.endBlock = function(count, beginToken, endToken) { |
this.pushNode(new Block(this.makeNodeList(count, beginToken, endToken, null))); |
} |
NodeListener.prototype.endType = function(count, beginToken, endToken) { |
- var $0; |
- var type = new TypeAnnotation((($0 = this.popNode()) && $0.is$Identifier())); |
+ var type = new TypeAnnotation(this.popNode()); |
for (; count > 1; --count) { |
this.popNode(); |
} |
this.pushNode(type); |
} |
NodeListener.prototype.endThrowStatement = function(throwToken, endToken) { |
- var $0; |
- var expression = (($0 = this.popNode()) && $0.is$Expression()); |
+ var expression = this.popNode(); |
this.pushNode(new Throw(expression, throwToken, endToken)); |
} |
NodeListener.prototype.endRethrowStatement = function(throwToken, endToken) { |
this.pushNode(new Throw(null, throwToken, endToken)); |
} |
NodeListener.prototype.makeNodeList = function(count, beginToken, endToken, delimiter) { |
- var $0; |
var nodes = const$14/*const EmptyLink()*/; |
for (; count > 0; --count) { |
- nodes = (($0 = nodes.prepend(this.popNode())) && $0.is$Link$Node()); |
+ nodes = nodes.prepend(this.popNode()); |
} |
- var sourceDelimiter = (($0 = (delimiter == null) ? null : new StringWrapper(delimiter)) && $0.is$SourceString()); |
+ var sourceDelimiter = (delimiter == null) ? null : new StringWrapper(delimiter); |
return new NodeList(beginToken, nodes, endToken, sourceDelimiter); |
} |
NodeListener.prototype.log = function(message) { |
this.logger.log(message); |
} |
NodeListener.prototype.endArguments$3 = function($0, $1, $2) { |
- return this.endArguments($assert_num($0), ($1 && $1.is$Token()), ($2 && $2.is$Token())); |
+ return this.endArguments($0, $1, $2); |
}; |
NodeListener.prototype.endBlock$3 = function($0, $1, $2) { |
- return this.endBlock($assert_num($0), ($1 && $1.is$Token()), ($2 && $2.is$Token())); |
+ return this.endBlock($0, $1, $2); |
}; |
NodeListener.prototype.endClass$5 = function($0, $1, $2, $3, $4) { |
- return this.endClass($assert_num($0), ($1 && $1.is$Token()), ($2 && $2.is$Token()), ($3 && $3.is$Token()), ($4 && $4.is$Token())); |
+ return this.endClass($0, $1, $2, $3, $4); |
}; |
NodeListener.prototype.endExpressionStatement$1 = function($0) { |
- return this.endExpressionStatement(($0 && $0.is$Token())); |
+ return this.endExpressionStatement($0); |
}; |
NodeListener.prototype.endForStatement$2 = function($0, $1) { |
- return this.endForStatement(($0 && $0.is$Token()), ($1 && $1.is$Token())); |
+ return this.endForStatement($0, $1); |
}; |
NodeListener.prototype.endFormalParameter$1 = function($0) { |
- return this.endFormalParameter(($0 && $0.is$Token())); |
+ return this.endFormalParameter($0); |
}; |
NodeListener.prototype.endFormalParameters$3 = function($0, $1, $2) { |
- return this.endFormalParameters($assert_num($0), ($1 && $1.is$Token()), ($2 && $2.is$Token())); |
+ return this.endFormalParameters($0, $1, $2); |
}; |
NodeListener.prototype.endFunctionBody$3 = function($0, $1, $2) { |
- return this.endFunctionBody($assert_num($0), ($1 && $1.is$Token()), ($2 && $2.is$Token())); |
+ return this.endFunctionBody($0, $1, $2); |
}; |
NodeListener.prototype.endIfStatement$2 = function($0, $1) { |
- return this.endIfStatement(($0 && $0.is$Token()), ($1 && $1.is$Token())); |
+ return this.endIfStatement($0, $1); |
}; |
NodeListener.prototype.endInitializer$1 = function($0) { |
- return this.endInitializer(($0 && $0.is$Token())); |
+ return this.endInitializer($0); |
}; |
NodeListener.prototype.endRethrowStatement$2 = function($0, $1) { |
- return this.endRethrowStatement(($0 && $0.is$Token()), ($1 && $1.is$Token())); |
+ return this.endRethrowStatement($0, $1); |
}; |
NodeListener.prototype.endReturnStatement$3 = function($0, $1, $2) { |
- return this.endReturnStatement($assert_bool($0), ($1 && $1.is$Token()), ($2 && $2.is$Token())); |
+ return this.endReturnStatement($0, $1, $2); |
}; |
NodeListener.prototype.endSend$1 = function($0) { |
- return this.endSend(($0 && $0.is$Token())); |
+ return this.endSend($0); |
}; |
NodeListener.prototype.endThrowStatement$2 = function($0, $1) { |
- return this.endThrowStatement(($0 && $0.is$Token()), ($1 && $1.is$Token())); |
+ return this.endThrowStatement($0, $1); |
}; |
NodeListener.prototype.endType$3 = function($0, $1, $2) { |
- return this.endType($assert_num($0), ($1 && $1.is$Token()), ($2 && $2.is$Token())); |
+ return this.endType($0, $1, $2); |
}; |
NodeListener.prototype.endVariablesDeclaration$2 = function($0, $1) { |
- return this.endVariablesDeclaration($assert_num($0), ($1 && $1.is$Token())); |
+ return this.endVariablesDeclaration($0, $1); |
}; |
NodeListener.prototype.handleAssignmentExpression$1 = function($0) { |
- return this.handleAssignmentExpression(($0 && $0.is$Token())); |
+ return this.handleAssignmentExpression($0); |
}; |
NodeListener.prototype.handleBinaryExpression$1 = function($0) { |
- return this.handleBinaryExpression(($0 && $0.is$Token())); |
+ return this.handleBinaryExpression($0); |
}; |
NodeListener.prototype.handleConditionalExpression$2 = function($0, $1) { |
- return this.handleConditionalExpression(($0 && $0.is$Token()), ($1 && $1.is$Token())); |
+ return this.handleConditionalExpression($0, $1); |
}; |
NodeListener.prototype.handleFinalKeyword$1 = function($0) { |
- return this.handleFinalKeyword(($0 && $0.is$Token())); |
+ return this.handleFinalKeyword($0); |
}; |
NodeListener.prototype.handleLiteralBool$1 = function($0) { |
- return this.handleLiteralBool(($0 && $0.is$Token())); |
+ return this.handleLiteralBool($0); |
}; |
NodeListener.prototype.handleLiteralDouble$1 = function($0) { |
- return this.handleLiteralDouble(($0 && $0.is$Token())); |
+ return this.handleLiteralDouble($0); |
}; |
NodeListener.prototype.handleLiteralInt$1 = function($0) { |
- return this.handleLiteralInt(($0 && $0.is$Token())); |
+ return this.handleLiteralInt($0); |
}; |
NodeListener.prototype.handleLiteralString$1 = function($0) { |
- return this.handleLiteralString(($0 && $0.is$Token())); |
+ return this.handleLiteralString($0); |
}; |
NodeListener.prototype.handleNoArguments$1 = function($0) { |
- return this.handleNoArguments(($0 && $0.is$Token())); |
+ return this.handleNoArguments($0); |
}; |
NodeListener.prototype.handleVarKeyword$1 = function($0) { |
- return this.handleVarKeyword(($0 && $0.is$Token())); |
+ return this.handleVarKeyword($0); |
}; |
NodeListener.prototype.handleVoidKeyword$1 = function($0) { |
- return this.handleVoidKeyword(($0 && $0.is$Token())); |
+ return this.handleVoidKeyword($0); |
}; |
// ********** Code for PartialFunctionElement ************** |
function PartialFunctionElement(name, beginToken, endToken) { |
@@ -7599,12 +7389,11 @@ function PartialFunctionElement(name, beginToken, endToken) { |
$inherits(PartialFunctionElement, FunctionElement); |
PartialFunctionElement.prototype.parseNode = function(canceler, logger) { |
var $this = this; // closure support |
- var $0; |
if (this.node != null) return this.node; |
- this.node = (($0 = parse(canceler, logger, (function (p) { |
+ this.node = parse(canceler, logger, (function (p) { |
return p.parseFunction$1($this.beginToken); |
}) |
- )) && $0.is$FunctionExpression()); |
+ ); |
return this.node; |
} |
// ********** Code for PartialClassElement ************** |
@@ -7617,12 +7406,11 @@ function PartialClassElement(name, beginToken, endToken) { |
$inherits(PartialClassElement, ClassElement); |
PartialClassElement.prototype.parseNode = function(canceler, logger) { |
var $this = this; // closure support |
- var $0; |
if (this.node != null) return this.node; |
- this.node = (($0 = parse(canceler, logger, (function (p) { |
+ this.node = parse(canceler, logger, (function (p) { |
return p.parseClass$1($this.beginToken); |
}) |
- )) && $0.is$ClassNode()); |
+ ); |
return this.node; |
} |
// ********** Code for StringScanner ************** |
@@ -7639,7 +7427,7 @@ StringScanner.prototype.peek = function() { |
return this.charAt(this.byteOffset + 1); |
} |
StringScanner.prototype.charAt = function(index) { |
- return (this.string.length > $assert_num(index)) ? this.string.charCodeAt($assert_num(index)) : -1; |
+ return (this.string.length > index) ? this.string.charCodeAt(index) : -1; |
} |
StringScanner.prototype.asciiString = function(start) { |
return new SubstringWrapper(this.string, start, this.byteOffset); |
@@ -7651,9 +7439,6 @@ StringScanner.prototype.appendByteStringToken = function(kind, value) { |
this.tail.next = new StringToken.fromSource$ctor(kind, value, this.tokenStart); |
this.tail = this.tail.next; |
} |
-StringScanner.prototype.appendByteStringToken$2 = function($0, $1) { |
- return this.appendByteStringToken($assert_num($0), ($1 && $1.is$SourceString())); |
-}; |
// ********** Code for SubstringWrapper ************** |
function SubstringWrapper(internalString, begin, end) { |
this.internalString = internalString; |
@@ -7681,7 +7466,7 @@ SubstringWrapper.prototype.hashCode$0 = function() { |
return this.hashCode(); |
}; |
SubstringWrapper.prototype.printOn$1 = function($0) { |
- return this.printOn(($0 && $0.is$StringBuffer())); |
+ return this.printOn($0); |
}; |
SubstringWrapper.prototype.toString$0 = function() { |
return this.toString(); |
@@ -7692,7 +7477,6 @@ function Token(kind, charOffset) { |
this.charOffset = charOffset; |
// Initializers done |
} |
-Token.prototype.is$Token = function(){return this;}; |
Token.prototype.get$charOffset = function() { return this.charOffset; }; |
Token.prototype.get$value = function() { |
return const$234/*const SourceString('EOF')*/; |
@@ -7773,7 +7557,7 @@ StringWrapper.prototype.hashCode$0 = function() { |
return this.hashCode(); |
}; |
StringWrapper.prototype.printOn$1 = function($0) { |
- return this.printOn(($0 && $0.is$StringBuffer())); |
+ return this.printOn($0); |
}; |
StringWrapper.prototype.toString$0 = function() { |
return this.toString(); |
@@ -7784,7 +7568,6 @@ function BeginGroupToken(kind, value, charOffset) { |
// Initializers done |
} |
$inherits(BeginGroupToken, StringToken); |
-BeginGroupToken.prototype.is$BeginGroupToken = function(){return this;}; |
// ********** Code for Keyword ************** |
function Keyword(syntax, isPseudo) { |
this.syntax = syntax; |
@@ -7825,14 +7608,13 @@ Keyword.prototype.hashCode$0 = function() { |
return this.hashCode(); |
}; |
Keyword.prototype.printOn$1 = function($0) { |
- return this.printOn(($0 && $0.is$StringBuffer())); |
+ return this.printOn($0); |
}; |
Keyword.prototype.toString$0 = function() { |
return this.toString(); |
}; |
// ********** Code for KeywordState ************** |
function KeywordState() {} |
-KeywordState.prototype.is$KeywordState = function(){return this;}; |
KeywordState.get$KEYWORD_STATE = function() { |
if (KeywordState._KEYWORD_STATE == null) { |
var strings = new ListFactory(const$232/*Keyword.values*/.get$length()); |
@@ -7850,7 +7632,6 @@ KeywordState.get$KEYWORD_STATE = function() { |
} |
KeywordState.computeKeywordStateTable = function(start, strings, offset, length) { |
var result = new ListFactory(26); |
- $assert(length != 0, "length != 0", "keyword.dart", 161, 12); |
var chunk = 0; |
var chunkStart = -1; |
for (var i = offset; |
@@ -7870,8 +7651,7 @@ KeywordState.computeKeywordStateTable = function(start, strings, offset, length) |
result.$setindex(chunk - 97/*null.$a*/, KeywordState.computeKeywordStateTable(start + 1, strings, chunkStart, offset + length - chunkStart)); |
} |
else { |
- $assert(length == 1, "length == 1", "keyword.dart", 183, 14); |
- return new LeafKeywordState($assert_String(strings.$index(offset))); |
+ return new LeafKeywordState(strings.$index(offset)); |
} |
return new ArrayKeywordState(result); |
} |
@@ -7885,8 +7665,7 @@ ArrayKeywordState.prototype.isLeaf = function() { |
return false; |
} |
ArrayKeywordState.prototype.next = function(c) { |
- var $0; |
- return (($0 = this.table.$index(c - 97/*null.$a*/)) && $0.is$KeywordState()); |
+ return this.table.$index(c - 97/*null.$a*/); |
} |
ArrayKeywordState.prototype.get$keyword = function() { |
$throw("should not be called"); |
@@ -7897,7 +7676,7 @@ ArrayKeywordState.prototype.toString = function() { |
var foo = this.table; |
for (var i = 0; |
i < foo.length; i++) { |
- if ($notnull_bool($ne(foo.$index(i), null))) { |
+ if ($ne(foo.$index(i), null)) { |
sb.add(("" + (i + 97/*null.$a*/) + ": " + foo.$index(i) + "; ")); |
} |
} |
@@ -7938,7 +7717,6 @@ function parse(canceler, logger, doParse) { |
// ********** Library tree ************** |
// ********** Code for Node ************** |
function Node() {} |
-Node.prototype.is$Node = function(){return this;}; |
Node.prototype.hashCode = function() { |
return this._hashCode; |
} |
@@ -7958,7 +7736,7 @@ Node.prototype.unparse = function() { |
} |
} |
Node.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$Visitor())); |
+ return this.accept($0); |
}; |
Node.prototype.getBeginToken$0 = function() { |
return this.getBeginToken(); |
@@ -7983,7 +7761,6 @@ function ClassNode(name, superclass, interfaces, beginToken, extendsKeyword, end |
// Initializers done |
} |
$inherits(ClassNode, Node); |
-ClassNode.prototype.is$ClassNode = function(){return this;}; |
ClassNode.prototype.get$name = function() { return this.name; }; |
ClassNode.prototype.get$interfaces = function() { return this.interfaces; }; |
ClassNode.prototype.accept = function(visitor) { |
@@ -7993,7 +7770,7 @@ ClassNode.prototype.get$isInterface = function() { |
return this.beginToken.get$stringValue() === 'interface'; |
} |
ClassNode.prototype.get$isClass = function() { |
- return !$notnull_bool(this.get$isInterface()); |
+ return !this.get$isInterface(); |
} |
ClassNode.prototype.getBeginToken = function() { |
return this.beginToken; |
@@ -8002,7 +7779,7 @@ ClassNode.prototype.getEndToken = function() { |
return this.endToken; |
} |
ClassNode.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$Visitor())); |
+ return this.accept($0); |
}; |
ClassNode.prototype.getBeginToken$0 = function() { |
return this.getBeginToken(); |
@@ -8013,11 +7790,9 @@ ClassNode.prototype.getEndToken$0 = function() { |
// ********** Code for Expression ************** |
function Expression() {} |
$inherits(Expression, Node); |
-Expression.prototype.is$Expression = function(){return this;}; |
// ********** Code for Statement ************** |
function Statement() {} |
$inherits(Statement, Node); |
-Statement.prototype.is$Statement = function(){return this;}; |
// ********** Code for Send ************** |
function Send(receiver, selector, argumentsNode) { |
this.receiver = receiver; |
@@ -8026,7 +7801,6 @@ function Send(receiver, selector, argumentsNode) { |
// Initializers done |
} |
$inherits(Send, Expression); |
-Send.prototype.is$Send = function(){return this;}; |
Send.prototype.get$arguments = function() { |
return this.argumentsNode.nodes; |
} |
@@ -8046,17 +7820,16 @@ Send.prototype.getBeginToken = function() { |
return firstBeginToken(this.receiver, this.selector); |
} |
Send.prototype.getEndToken = function() { |
- var $0; |
var token; |
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 this.selector.getEndToken(); |
} |
- return (($0 = this.receiver.getBeginToken()) && $0.is$Token()); |
+ return this.receiver.getBeginToken(); |
} |
Send.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$Visitor())); |
+ return this.accept($0); |
}; |
Send.prototype.getBeginToken$0 = function() { |
return this.getBeginToken(); |
@@ -8071,12 +7844,11 @@ function SendSet(receiver, selector, assignmentOperator, argumentsNode) { |
// Initializers done |
} |
$inherits(SendSet, Send); |
-SendSet.prototype.is$SendSet = function(){return this;}; |
SendSet.prototype.accept = function(visitor) { |
return visitor.visitSendSet(this); |
} |
SendSet.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$Visitor())); |
+ return this.accept($0); |
}; |
// ********** Code for NodeList ************** |
function NodeList(beginToken, nodes, endToken, delimiter) { |
@@ -8092,39 +7864,36 @@ NodeList.singleton$ctor = function(node) { |
} |
NodeList.singleton$ctor.prototype = NodeList.prototype; |
$inherits(NodeList, Node); |
-NodeList.prototype.is$NodeList = function(){return this;}; |
NodeList.prototype.accept = function(visitor) { |
return visitor.visitNodeList(this); |
} |
NodeList.prototype.getBeginToken = function() { |
- var $0; |
if (this.beginToken != null) return this.beginToken; |
if (this.nodes != null) { |
for (var link = this.nodes; |
- !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link$Node())) { |
+ !link.isEmpty(); link = link.get$tail()) { |
if (link.get$head().getBeginToken$0() != null) { |
- return (($0 = link.get$head().getBeginToken$0()) && $0.is$Token()); |
+ return link.get$head().getBeginToken$0(); |
} |
if (link.get$head().getEndToken$0() != null) { |
- return (($0 = link.get$head().getEndToken$0()) && $0.is$Token()); |
+ return link.get$head().getEndToken$0(); |
} |
} |
} |
return this.endToken; |
} |
NodeList.prototype.getEndToken = function() { |
- var $0; |
if (this.endToken != null) return this.endToken; |
if (this.nodes != null) { |
var link = this.nodes; |
- while (!$notnull_bool(link.get$tail().isEmpty$0())) link = (($0 = link.get$tail()) && $0.is$Link$Node()); |
- if (link.get$head().getEndToken$0() != null) return (($0 = link.get$head().getEndToken$0()) && $0.is$Token()); |
- if (link.get$head().getBeginToken$0() != null) return (($0 = link.get$head().getBeginToken$0()) && $0.is$Token()); |
+ while (!link.get$tail().isEmpty$0()) link = link.get$tail(); |
+ if (link.get$head().getEndToken$0() != null) return link.get$head().getEndToken$0(); |
+ if (link.get$head().getBeginToken$0() != null) return link.get$head().getBeginToken$0(); |
} |
return this.beginToken; |
} |
NodeList.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$Visitor())); |
+ return this.accept($0); |
}; |
NodeList.prototype.getBeginToken$0 = function() { |
return this.getBeginToken(); |
@@ -8148,7 +7917,7 @@ Block.prototype.getEndToken = function() { |
return this.statements.getEndToken(); |
} |
Block.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$Visitor())); |
+ return this.accept($0); |
}; |
Block.prototype.getBeginToken$0 = function() { |
return this.getBeginToken(); |
@@ -8180,7 +7949,7 @@ If.prototype.getEndToken = function() { |
return this.elsePart.getEndToken(); |
} |
If.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$Visitor())); |
+ return this.accept($0); |
}; |
If.prototype.getBeginToken$0 = function() { |
return this.getBeginToken(); |
@@ -8208,7 +7977,7 @@ For.prototype.getEndToken = function() { |
return this.body.getEndToken(); |
} |
For.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$Visitor())); |
+ return this.accept($0); |
}; |
For.prototype.getBeginToken$0 = function() { |
return this.getBeginToken(); |
@@ -8225,7 +7994,6 @@ function FunctionExpression(name, parameters, body, returnType) { |
// Initializers done |
} |
$inherits(FunctionExpression, Expression); |
-FunctionExpression.prototype.is$FunctionExpression = function(){return this;}; |
FunctionExpression.prototype.get$name = function() { return this.name; }; |
FunctionExpression.prototype.get$parameters = function() { return this.parameters; }; |
FunctionExpression.prototype.get$returnType = function() { return this.returnType; }; |
@@ -8239,7 +8007,7 @@ FunctionExpression.prototype.getEndToken = function() { |
return this.body.getEndToken(); |
} |
FunctionExpression.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$Visitor())); |
+ return this.accept($0); |
}; |
FunctionExpression.prototype.getBeginToken$0 = function() { |
return this.getBeginToken(); |
@@ -8313,7 +8081,7 @@ LiteralInt.prototype.accept = function(visitor) { |
return visitor.visitLiteralInt(this); |
} |
LiteralInt.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$Visitor())); |
+ return this.accept($0); |
}; |
// ********** Code for LiteralDouble ************** |
function LiteralDouble(token, handler) { |
@@ -8334,7 +8102,7 @@ LiteralDouble.prototype.accept = function(visitor) { |
return visitor.visitLiteralDouble(this); |
} |
LiteralDouble.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$Visitor())); |
+ return this.accept($0); |
}; |
// ********** Code for LiteralBool ************** |
function LiteralBool(token, handler) { |
@@ -8362,7 +8130,7 @@ LiteralBool.prototype.accept = function(visitor) { |
return visitor.visitLiteralBool(this); |
} |
LiteralBool.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$Visitor())); |
+ return this.accept($0); |
}; |
// ********** Code for LiteralString ************** |
function LiteralString(token) { |
@@ -8370,16 +8138,14 @@ function LiteralString(token) { |
// Initializers done |
} |
$inherits(LiteralString, Literal$SourceString); |
-LiteralString.prototype.is$LiteralString = function(){return this;}; |
LiteralString.prototype.get$value = function() { |
- var $0; |
- return (($0 = this.token.get$value()) && $0.is$SourceString()); |
+ return this.token.get$value(); |
} |
LiteralString.prototype.accept = function(visitor) { |
return visitor.visitLiteralString(this); |
} |
LiteralString.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$Visitor())); |
+ return this.accept($0); |
}; |
// ********** Code for Identifier ************** |
function Identifier(token) { |
@@ -8387,10 +8153,8 @@ function Identifier(token) { |
// Initializers done |
} |
$inherits(Identifier, Expression); |
-Identifier.prototype.is$Identifier = function(){return this;}; |
Identifier.prototype.get$source = function() { |
- var $0; |
- return (($0 = this.token.get$value()) && $0.is$SourceString()); |
+ return this.token.get$value(); |
} |
Identifier.prototype.accept = function(visitor) { |
return visitor.visitIdentifier(this); |
@@ -8402,7 +8166,7 @@ Identifier.prototype.getEndToken = function() { |
return this.token; |
} |
Identifier.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$Visitor())); |
+ return this.accept($0); |
}; |
Identifier.prototype.getBeginToken$0 = function() { |
return this.getBeginToken(); |
@@ -8416,12 +8180,11 @@ function Operator(token) { |
// Initializers done |
} |
$inherits(Operator, Identifier); |
-Operator.prototype.is$Operator = function(){return this;}; |
Operator.prototype.accept = function(visitor) { |
return visitor.visitOperator(this); |
} |
Operator.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$Visitor())); |
+ return this.accept($0); |
}; |
// ********** Code for Return ************** |
function Return(beginToken, endToken, expression) { |
@@ -8444,7 +8207,7 @@ Return.prototype.getEndToken = function() { |
return this.endToken; |
} |
Return.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$Visitor())); |
+ return this.accept($0); |
}; |
Return.prototype.getBeginToken$0 = function() { |
return this.getBeginToken(); |
@@ -8459,19 +8222,17 @@ function ExpressionStatement(expression, endToken) { |
// Initializers done |
} |
$inherits(ExpressionStatement, Statement); |
-ExpressionStatement.prototype.is$ExpressionStatement = function(){return this;}; |
ExpressionStatement.prototype.accept = function(visitor) { |
return visitor.visitExpressionStatement(this); |
} |
ExpressionStatement.prototype.getBeginToken = function() { |
- var $0; |
- return (($0 = this.expression.getBeginToken()) && $0.is$Token()); |
+ return this.expression.getBeginToken(); |
} |
ExpressionStatement.prototype.getEndToken = function() { |
return this.endToken; |
} |
ExpressionStatement.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$Visitor())); |
+ return this.accept($0); |
}; |
ExpressionStatement.prototype.getBeginToken$0 = function() { |
return this.getBeginToken(); |
@@ -8497,7 +8258,7 @@ Throw.prototype.getEndToken = function() { |
return this.endToken; |
} |
Throw.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$Visitor())); |
+ return this.accept($0); |
}; |
Throw.prototype.getBeginToken$0 = function() { |
return this.getBeginToken(); |
@@ -8511,21 +8272,18 @@ function TypeAnnotation(typeName) { |
// Initializers done |
} |
$inherits(TypeAnnotation, Node); |
-TypeAnnotation.prototype.is$TypeAnnotation = function(){return this;}; |
TypeAnnotation.prototype.get$typeName = function() { return this.typeName; }; |
TypeAnnotation.prototype.accept = function(visitor) { |
return visitor.visitTypeAnnotation(this); |
} |
TypeAnnotation.prototype.getBeginToken = function() { |
- var $0; |
- return (($0 = this.typeName.getBeginToken()) && $0.is$Token()); |
+ return this.typeName.getBeginToken(); |
} |
TypeAnnotation.prototype.getEndToken = function() { |
- var $0; |
- return (($0 = this.typeName.getEndToken()) && $0.is$Token()); |
+ return this.typeName.getEndToken(); |
} |
TypeAnnotation.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$Visitor())); |
+ return this.accept($0); |
}; |
TypeAnnotation.prototype.getBeginToken$0 = function() { |
return this.getBeginToken(); |
@@ -8542,8 +8300,6 @@ function VariableDefinitions(type, modifiers, definitions, endToken) { |
// Initializers done |
} |
$inherits(VariableDefinitions, Statement); |
-VariableDefinitions.prototype.is$VariableDefinitions = function(){return this;}; |
-VariableDefinitions.prototype.get$type = function() { return this.type; }; |
VariableDefinitions.prototype.accept = function(visitor) { |
return visitor.visitVariableDefinitions(this); |
} |
@@ -8554,7 +8310,7 @@ VariableDefinitions.prototype.getEndToken = function() { |
return this.endToken; |
} |
VariableDefinitions.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$Visitor())); |
+ return this.accept($0); |
}; |
VariableDefinitions.prototype.getBeginToken$0 = function() { |
return this.getBeginToken(); |
@@ -8567,7 +8323,6 @@ function Unparser(printDebugInfo) { |
this.printDebugInfo = printDebugInfo; |
// Initializers done |
} |
-Unparser.prototype.is$Visitor = function(){return this;}; |
Unparser.prototype.unparse = function(node) { |
this.sb = new StringBufferImpl(""); |
this.visit(node); |
@@ -8578,11 +8333,11 @@ Unparser.prototype.add = function(string) { |
} |
Unparser.prototype.visit = function(node) { |
if (node != null) { |
- if ($notnull_bool(this.printDebugInfo)) this.sb.add(('[' + node.getObjectDescription() + ': ')); |
+ if (this.printDebugInfo) this.sb.add(('[' + node.getObjectDescription() + ': ')); |
node.accept(this); |
- if ($notnull_bool(this.printDebugInfo)) this.sb.add(']'); |
+ if (this.printDebugInfo) this.sb.add(']'); |
} |
- else if ($notnull_bool(this.printDebugInfo)) { |
+ else if (this.printDebugInfo) { |
this.sb.add('[null]'); |
} |
} |
@@ -8590,9 +8345,8 @@ Unparser.prototype.visitBlock = function(node) { |
this.visit(node.statements); |
} |
Unparser.prototype.visitExpressionStatement = function(node) { |
- var $0; |
this.visit(node.expression); |
- this.add((($0 = node.endToken.get$value()) && $0.is$SourceString())); |
+ this.add(node.endToken.get$value()); |
} |
Unparser.prototype.visitFor = function(node) { |
node.forToken.get$value().printOn$1(this.sb); |
@@ -8613,54 +8367,46 @@ Unparser.prototype.visitFunctionExpression = function(node) { |
this.visit(node.body); |
} |
Unparser.prototype.visitIdentifier = function(node) { |
- var $0; |
- this.add((($0 = node.token.get$value()) && $0.is$SourceString())); |
+ this.add(node.token.get$value()); |
} |
Unparser.prototype.visitIf = function(node) { |
- var $0; |
- this.add((($0 = node.ifToken.get$value()) && $0.is$SourceString())); |
+ this.add(node.ifToken.get$value()); |
this.visit(node.condition); |
this.visit(node.thenPart); |
- if ($notnull_bool(node.get$hasElsePart())) { |
- this.add((($0 = node.elseToken.get$value()) && $0.is$SourceString())); |
+ if (node.get$hasElsePart()) { |
+ this.add(node.elseToken.get$value()); |
this.visit(node.elsePart); |
} |
} |
Unparser.prototype.visitLiteralBool = function(node) { |
- var $0; |
- this.add((($0 = node.token.get$value()) && $0.is$SourceString())); |
+ this.add(node.token.get$value()); |
} |
Unparser.prototype.visitLiteralDouble = function(node) { |
- var $0; |
- this.add((($0 = node.token.get$value()) && $0.is$SourceString())); |
+ this.add(node.token.get$value()); |
} |
Unparser.prototype.visitLiteralInt = function(node) { |
- var $0; |
- this.add((($0 = node.token.get$value()) && $0.is$SourceString())); |
+ this.add(node.token.get$value()); |
} |
Unparser.prototype.visitLiteralString = function(node) { |
- var $0; |
- this.add((($0 = node.token.get$value()) && $0.is$SourceString())); |
+ this.add(node.token.get$value()); |
} |
Unparser.prototype.visitNodeList = function(node) { |
- var $0; |
- if (node.beginToken != null) this.add((($0 = node.beginToken.get$value()) && $0.is$SourceString())); |
+ if (node.beginToken != null) this.add(node.beginToken.get$value()); |
if (node.nodes != null) { |
node.nodes.printOn(this.sb, node.delimiter); |
} |
- if (node.endToken != null) this.add((($0 = node.endToken.get$value()) && $0.is$SourceString())); |
+ if (node.endToken != null) this.add(node.endToken.get$value()); |
} |
Unparser.prototype.visitOperator = function(node) { |
this.visitIdentifier(node); |
} |
Unparser.prototype.visitReturn = function(node) { |
- var $0; |
- this.add((($0 = node.beginToken.get$value()) && $0.is$SourceString())); |
- if ($notnull_bool(node.get$hasExpression())) { |
+ this.add(node.beginToken.get$value()); |
+ if (node.get$hasExpression()) { |
this.sb.add(' '); |
this.visit(node.expression); |
} |
- this.add((($0 = node.endToken.get$value()) && $0.is$SourceString())); |
+ this.add(node.endToken.get$value()); |
} |
Unparser.prototype.visitSend = function(node) { |
if (node.receiver != null) { |
@@ -8671,13 +8417,12 @@ Unparser.prototype.visitSend = function(node) { |
this.visit(node.argumentsNode); |
} |
Unparser.prototype.visitSendSet = function(node) { |
- var $0; |
if (node.receiver != null) { |
this.visit(node.receiver); |
this.sb.add('.'); |
} |
this.visit(node.selector); |
- this.add((($0 = node.assignmentOperator.get$value()) && $0.is$SourceString())); |
+ this.add(node.assignmentOperator.get$value()); |
this.visit(node.argumentsNode); |
} |
Unparser.prototype.visitThrow = function(node) { |
@@ -8691,7 +8436,6 @@ Unparser.prototype.visitTypeAnnotation = function(node) { |
this.visit(node.typeName); |
} |
Unparser.prototype.visitVariableDefinitions = function(node) { |
- var $0; |
if (node.type != null) { |
this.visit(node.type); |
} |
@@ -8700,18 +8444,17 @@ Unparser.prototype.visitVariableDefinitions = function(node) { |
} |
this.sb.add(' '); |
this.visit(node.definitions); |
- if (node.endToken != null) this.add((($0 = node.endToken.get$value()) && $0.is$SourceString())); |
+ if (node.endToken != null) this.add(node.endToken.get$value()); |
} |
Unparser.prototype.add$1 = function($0) { |
- return this.add(($0 && $0.is$SourceString())); |
+ return this.add($0); |
}; |
Unparser.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$Node())); |
+ return this.visit($0); |
}; |
// ********** Code for top level ************** |
function firstBeginToken(first, second) { |
- var $0; |
- return (($0 = (first != null) ? first.getBeginToken() : second.getBeginToken()) && $0.is$Token()); |
+ return (first != null) ? first.getBeginToken() : second.getBeginToken(); |
} |
// ********** Library elements ************** |
// ********** Code for ElementKind ************** |
@@ -8726,13 +8469,12 @@ function Element(name, kind, enclosingElement) { |
this.enclosingElement = enclosingElement; |
// Initializers done |
} |
-Element.prototype.is$Element = function(){return this;}; |
Element.prototype.get$name = function() { return this.name; }; |
Element.prototype.hashCode = function() { |
return this.name.hashCode(); |
} |
Element.prototype.computeType$2 = function($0, $1) { |
- return this.computeType(($0 && $0.is$Compiler()), ($1 && $1.is$Types())); |
+ return this.computeType($0, $1); |
}; |
Element.prototype.hashCode$0 = function() { |
return this.hashCode(); |
@@ -8745,8 +8487,6 @@ function VariableElement(node, typeAnnotation, name, enclosingElement) { |
// Initializers done |
} |
$inherits(VariableElement, Element); |
-VariableElement.prototype.get$type = function() { return this.type; }; |
-VariableElement.prototype.set$type = function(value) { return this.type = value; }; |
VariableElement.prototype.parseNode = function(canceler, logger) { |
return this.node; |
} |
@@ -8754,7 +8494,7 @@ VariableElement.prototype.computeType = function(compiler, types) { |
return getType(this.typeAnnotation, types); |
} |
VariableElement.prototype.computeType$2 = function($0, $1) { |
- return this.computeType(($0 && $0.is$Compiler()), ($1 && $1.is$Types())); |
+ return this.computeType($0, $1); |
}; |
// ********** Code for ForeignElement ************** |
function ForeignElement(name) { |
@@ -8766,7 +8506,7 @@ ForeignElement.prototype.computeType = function(compiler, types) { |
return types.dynamicType; |
} |
ForeignElement.prototype.computeType$2 = function($0, $1) { |
- return this.computeType(($0 && $0.is$Compiler()), ($1 && $1.is$Types())); |
+ return this.computeType($0, $1); |
}; |
// ********** Code for FunctionElement ************** |
function FunctionElement(name) { |
@@ -8774,24 +8514,23 @@ function FunctionElement(name) { |
// Initializers done |
} |
$inherits(FunctionElement, Element); |
-FunctionElement.prototype.get$type = function() { return this.type; }; |
-FunctionElement.prototype.set$type = function(value) { return this.type = value; }; |
FunctionElement.prototype.computeType = function(compiler, types) { |
- var $0; |
- if (this.type != null) return (($0 = this.type) && $0.is$FunctionType()); |
- var node = (($0 = this.parseNode(compiler, compiler)) && $0.is$FunctionExpression()); |
+ if (this.type != null) return this.type; |
+ var node = this.parseNode(compiler, compiler); |
var returnType = getType(node.returnType, types); |
if (returnType == null) compiler.cancel(('unknown type ' + returnType + '')); |
var parameterTypes = new LinkBuilderImplementation(); |
for (var link = node.parameters.nodes; |
- !$notnull_bool(link.isEmpty$0()); link = link.get$tail()) { |
- var parameter = (($0 = link.get$head()) && $0.is$VariableDefinitions()); |
+ !link.isEmpty$0(); link = link.get$tail()) { |
+ var parameter = link.get$head(); |
parameterTypes.addLast(getType(parameter.type, types)); |
} |
- this.type = new FunctionType(returnType, (($0 = parameterTypes.toLink()) && $0.is$Link$Type())); |
- return (($0 = this.type) && $0.is$FunctionType()); |
+ this.type = new FunctionType(returnType, parameterTypes.toLink()); |
+ return this.type; |
} |
-FunctionElement.prototype.computeType$2 = FunctionElement.prototype.computeType; |
+FunctionElement.prototype.computeType$2 = function($0, $1) { |
+ return this.computeType($0, $1); |
+}; |
// ********** Code for ClassElement ************** |
function ClassElement(name) { |
this.interfaces = const$14/*const EmptyLink()*/ |
@@ -8800,9 +8539,6 @@ function ClassElement(name) { |
// Initializers done |
} |
$inherits(ClassElement, Element); |
-ClassElement.prototype.is$ClassElement = function(){return this;}; |
-ClassElement.prototype.get$type = function() { return this.type; }; |
-ClassElement.prototype.set$type = function(value) { return this.type = value; }; |
ClassElement.prototype.get$interfaces = function() { return this.interfaces; }; |
ClassElement.prototype.set$interfaces = function(value) { return this.interfaces = value; }; |
ClassElement.prototype.computeType = function(compiler, types) { |
@@ -8812,21 +8548,22 @@ ClassElement.prototype.computeType = function(compiler, types) { |
return this.type; |
} |
ClassElement.prototype.resolve = function(compiler) { |
- if ($notnull_bool(this.isResolved)) return; |
+ if (this.isResolved) return; |
compiler.resolveType(this); |
this.isResolved = true; |
} |
-ClassElement.prototype.computeType$2 = ClassElement.prototype.computeType; |
+ClassElement.prototype.computeType$2 = function($0, $1) { |
+ return this.computeType($0, $1); |
+}; |
ClassElement.prototype.resolve$1 = function($0) { |
- return this.resolve(($0 && $0.is$Compiler())); |
+ return this.resolve($0); |
}; |
// ********** Code for top level ************** |
function getType(annotation, types) { |
- var $0; |
if (annotation == null || annotation.typeName == null) { |
- return (($0 = types.dynamicType) && $0.is$Type()); |
+ return types.dynamicType; |
} |
- return (($0 = types.lookup$1(annotation.typeName.get$source())) && $0.is$Type()); |
+ return types.lookup$1(annotation.typeName.get$source()); |
} |
// ********** Library ssa ************** |
// ********** Code for SsaBuilderTask ************** |
@@ -8840,20 +8577,17 @@ SsaBuilderTask.prototype.get$name = function() { |
} |
SsaBuilderTask.prototype.build = function(tree, elements) { |
var $this = this; // closure support |
- var $0; |
- return (($0 = this.measure((function () { |
- var $0; |
- var function_ = (tree && tree.is$FunctionExpression()); |
+ return this.measure((function () { |
+ var function_ = tree; |
var graph = $this.compileMethod(function_.parameters, function_.body, elements); |
- $assert(graph.isValid(), "graph.isValid()", "builder.dart", 14, 14); |
if (false/*null.GENERATE_SSA_TRACE*/) { |
- var name = (($0 = function_.name) && $0.is$Identifier()); |
+ var name = function_.name; |
HTracer.HTracer$singleton$factory().traceCompilation(name.get$source().toString()); |
HTracer.HTracer$singleton$factory().traceGraph('builder', graph); |
} |
return graph; |
}) |
- )) && $0.is$HGraph()); |
+ ); |
} |
SsaBuilderTask.prototype.compileMethod = function(parameters, body, elements) { |
var builder = new SsaBuilder(this.compiler, elements); |
@@ -8866,7 +8600,6 @@ function SsaBuilder(compiler, elements) { |
this.elements = elements; |
// Initializers done |
} |
-SsaBuilder.prototype.is$Visitor = function(){return this;}; |
SsaBuilder.prototype.build = function(parameters, body) { |
this.stack = new ListFactory(); |
this.definitions = new HashMapImplementation(); |
@@ -8877,7 +8610,7 @@ SsaBuilder.prototype.build = function(parameters, body) { |
this.close(new HGoto()).addSuccessor(block); |
this.open(block); |
body.accept(this); |
- if (!$notnull_bool(this.isAborted())) this.close(new HGoto()).addSuccessor(this.graph.exit); |
+ if (!this.isAborted()) this.close(new HGoto()).addSuccessor(this.graph.exit); |
this.graph.finalize(); |
return this.graph; |
} |
@@ -8906,41 +8639,36 @@ SsaBuilder.prototype.push = function(instruction) { |
this.stack.add(instruction); |
} |
SsaBuilder.prototype.pop = function() { |
- var $0; |
- return (($0 = this.stack.removeLast()) && $0.is$HInstruction()); |
+ return this.stack.removeLast(); |
} |
SsaBuilder.prototype.visit = function(node) { |
if (node != null) node.accept(this); |
} |
SsaBuilder.prototype.visitParameters = function(parameters) { |
- var $0; |
var parameterIndex = 0; |
for (var link = parameters.nodes; |
- !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link$Node())) { |
- var container = (($0 = link.get$head()) && $0.is$VariableDefinitions()); |
+ !link.isEmpty(); link = link.get$tail()) { |
+ var container = link.get$head(); |
var identifierLink = container.definitions.nodes; |
- $assert(!$notnull_bool(identifierLink.isEmpty()) && $notnull_bool(identifierLink.get$tail().isEmpty$0()), "!identifierLink.isEmpty() && identifierLink.tail.isEmpty()", "builder.dart", 115, 14); |
if (!(identifierLink.get$head() instanceof Identifier)) { |
this.compiler.unimplemented("SsaBuilder.visitParameters non-identifier"); |
} |
- var parameterId = (($0 = identifierLink.get$head()) && $0.is$Identifier()); |
- var element = (($0 = this.elements.$index(parameterId)) && $0.is$Element()); |
+ var parameterId = identifierLink.get$head(); |
+ var element = this.elements.$index(parameterId); |
var parameterInstruction = new HParameter(parameterIndex++); |
this.definitions.$setindex(element, parameterInstruction); |
this.add(parameterInstruction); |
} |
} |
SsaBuilder.prototype.visitBlock = function(node) { |
- var $0; |
for (var link = node.statements.nodes; |
- !$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())) { |
+ !link.isEmpty(); link = link.get$tail()) { |
+ this.visit(link.get$head()); |
+ if (this.isAborted()) { |
if (!this.stack.isEmpty()) this.compiler.cancel('non-empty instruction stack'); |
return; |
} |
} |
- $assert(!$notnull_bool(this.current.isClosed()), "!current.isClosed()", "builder.dart", 138, 12); |
if (!this.stack.isEmpty()) this.compiler.cancel('non-empty instruction stack'); |
} |
SsaBuilder.prototype.visitClassNode = function(node) { |
@@ -8952,9 +8680,7 @@ SsaBuilder.prototype.visitExpressionStatement = function(node) { |
} |
SsaBuilder.prototype.visitFor = function(node) { |
var $this = this; // closure support |
- $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()); |
var initializerDefinitions = HashMapImplementation.HashMapImplementation$from$factory(this.definitions); |
var conditionBlock = this.graph.addNewBlock(); |
@@ -8974,7 +8700,7 @@ SsaBuilder.prototype.visitFor = function(node) { |
conditionExitBlock.addSuccessor(bodyBlock); |
this.open(bodyBlock); |
this.visit(node.body); |
- if ($notnull_bool(this.isAborted())) { |
+ if (this.isAborted()) { |
this.compiler.unimplemented("SsaBuilder for loop with aborting body"); |
} |
bodyBlock = this.close(new HGoto()); |
@@ -8982,20 +8708,17 @@ SsaBuilder.prototype.visitFor = function(node) { |
bodyBlock.addSuccessor(updateBlock); |
this.open(updateBlock); |
this.visit(node.update); |
- $assert(!$notnull_bool(this.isAborted()), "!isAborted()", "builder.dart", 195, 12); |
var updateInstruction = this.pop(); |
updateBlock = this.close(new HGoto()); |
updateBlock.addSuccessor(conditionBlock); |
conditionBlock.forEachPhi((function (phi) { |
- var $0; |
var element = phi.element; |
- var postBodyDefinition = (($0 = $this.definitions.$index(element)) && $0.is$HInstruction()); |
+ var postBodyDefinition = $this.definitions.$index(element); |
if (postBodyDefinition !== phi) { |
phi.addInput(postBodyDefinition); |
} |
else { |
- $assert(phi.inputs.length == 1, "phi.inputs.length == 1", "builder.dart", 212, 16); |
- var input = (($0 = phi.inputs.$index(0)) && $0.is$HInstruction()); |
+ var input = phi.inputs.$index(0); |
conditionBlock.rewrite(phi, input); |
conditionBlock.remove(phi); |
if (conditionDefinitions.$index(element) === phi) { |
@@ -9013,11 +8736,9 @@ SsaBuilder.prototype.visitFunctionExpression = function(node) { |
this.compiler.unimplemented('SsaBuilder.visitFunctionExpression'); |
} |
SsaBuilder.prototype.visitIdentifier = function(node) { |
- var $0; |
- var element = (($0 = this.elements.$index(node)) && $0.is$Element()); |
+ var element = this.elements.$index(node); |
this.compiler.ensure(element != null); |
- var def = (($0 = this.definitions.$index(element)) && $0.is$HInstruction()); |
- $assert(def != null, "def !== null", "builder.dart", 240, 12); |
+ var def = this.definitions.$index(element); |
this.stack.add(def); |
} |
SsaBuilder.prototype.joinDefinitions = function(joinBlock, incoming1, incoming2) { |
@@ -9025,10 +8746,8 @@ SsaBuilder.prototype.joinDefinitions = function(joinBlock, incoming1, incoming2) |
return this.joinDefinitions(joinBlock, incoming2, incoming1); |
} |
var joinedDefinitions = new HashMapImplementation(); |
- $assert(incoming1.get$length() <= incoming2.get$length(), "incoming1.length <= incoming2.length", "builder.dart", 259, 12); |
incoming1.forEach((function (element, instruction) { |
- var $0; |
- var other = (($0 = incoming2.$index(element)) && $0.is$HInstruction()); |
+ var other = incoming2.$index(element); |
if (other == null) return; |
if (instruction === other) { |
joinedDefinitions.$setindex(element, instruction); |
@@ -9055,21 +8774,21 @@ SsaBuilder.prototype.visitIf = function(node) { |
var thenDefinitions = this.definitions; |
this.definitions = conditionDefinitions; |
var elseBlock = null; |
- if ($notnull_bool(hasElse)) { |
+ if (hasElse) { |
elseBlock = this.graph.addNewBlock(); |
conditionBlock.addSuccessor(elseBlock); |
this.open(elseBlock); |
this.visit(node.elsePart); |
elseBlock = this.current; |
} |
- if (thenBlock == null && elseBlock == null && $notnull_bool(hasElse)) { |
+ if (thenBlock == null && elseBlock == null && hasElse) { |
this.current = null; |
} |
else { |
var joinBlock = this.graph.addNewBlock(); |
if (thenBlock != null) this.goto(thenBlock, joinBlock); |
if (elseBlock != null) this.goto(elseBlock, joinBlock); |
- else if (!$notnull_bool(hasElse)) conditionBlock.addSuccessor(joinBlock); |
+ else if (!hasElse) conditionBlock.addSuccessor(joinBlock); |
this.open(joinBlock); |
if (joinBlock.predecessors.length == 2) { |
this.definitions = this.joinDefinitions(joinBlock, this.definitions, thenDefinitions); |
@@ -9085,34 +8804,33 @@ SsaBuilder.prototype.unquote = function(literal) { |
return new StringWrapper(str.substring(quotes + 1, str.length - quotes)); |
} |
SsaBuilder.prototype.visitSend = function(node) { |
- var $0; |
- var element = (($0 = this.elements.$index(node)) && $0.is$Element()); |
+ var element = this.elements.$index(node); |
if ((node.selector instanceof Operator)) { |
this.visit(node.receiver); |
this.visit(node.argumentsNode); |
var right = this.pop(); |
var left = this.pop(); |
- var op = (($0 = node.selector) && $0.is$Operator()); |
- if ($notnull_bool($eq(const$287/*const SourceString("+")*/, op.get$source()))) { |
+ var op = node.selector; |
+ if ($eq(const$287/*const SourceString("+")*/, op.get$source())) { |
this.push(new HAdd(element, [left, right])); |
} |
- else if ($notnull_bool($eq(const$288/*const SourceString("-")*/, op.get$source()))) { |
+ else if ($eq(const$288/*const SourceString("-")*/, op.get$source())) { |
this.push(new HSubtract(element, [left, right])); |
} |
- else if ($notnull_bool($eq(const$289/*const SourceString("*")*/, op.get$source()))) { |
+ else if ($eq(const$289/*const SourceString("*")*/, op.get$source())) { |
this.push(new HMultiply(element, [left, right])); |
} |
- else if ($notnull_bool($eq(const$290/*const SourceString("/")*/, op.get$source()))) { |
+ else if ($eq(const$290/*const SourceString("/")*/, op.get$source())) { |
this.push(new HDivide(element, [left, right])); |
} |
- else if ($notnull_bool($eq(const$291/*const SourceString("~/")*/, op.get$source()))) { |
+ else if ($eq(const$291/*const SourceString("~/")*/, op.get$source())) { |
this.push(new HTruncatingDivide(element, [left, right])); |
} |
- else if ($notnull_bool($eq(const$292/*const SourceString("==")*/, op.get$source()))) { |
+ else if ($eq(const$292/*const SourceString("==")*/, op.get$source())) { |
this.push(new HEquals(element, [left, right])); |
} |
} |
- else if ($notnull_bool(node.get$isPropertyAccess())) { |
+ else if (node.get$isPropertyAccess()) { |
if (node.receiver != null) { |
this.compiler.unimplemented("SsaBuilder.visitSend with receiver"); |
} |
@@ -9121,20 +8839,20 @@ SsaBuilder.prototype.visitSend = function(node) { |
else { |
var link = node.get$arguments(); |
if (element.kind === const$242/*ElementKind.FOREIGN*/) { |
- link = (($0 = link.get$tail()) && $0.is$Link$Node()); |
+ link = link.get$tail(); |
} |
var arguments = []; |
- for (; !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link$Node())) { |
- this.visit((($0 = link.get$head()) && $0.is$Node())); |
+ for (; !link.isEmpty(); link = link.get$tail()) { |
+ this.visit(link.get$head()); |
arguments.add$1(this.pop()); |
} |
if (element.kind === const$242/*ElementKind.FOREIGN*/) { |
- var literal = (($0 = node.get$arguments().get$head()) && $0.is$LiteralString()); |
+ var literal = node.get$arguments().get$head(); |
this.compiler.ensure((literal instanceof LiteralString)); |
this.push(new HInvokeForeign(element, arguments, this.unquote(literal))); |
} |
else { |
- var selector = (($0 = node.selector) && $0.is$Identifier()); |
+ var selector = node.selector; |
this.push(new HInvoke(element, arguments)); |
} |
} |
@@ -9155,10 +8873,9 @@ SsaBuilder.prototype.visitLiteralString = function(node) { |
this.push(new HLiteral(node.get$value())); |
} |
SsaBuilder.prototype.visitNodeList = function(node) { |
- var $0; |
for (var link = node.nodes; |
- !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link$Node())) { |
- this.visit((($0 = link.get$head()) && $0.is$Node())); |
+ !link.isEmpty(); link = link.get$tail()) { |
+ this.visit(link.get$head()); |
} |
} |
SsaBuilder.prototype.visitOperator = function(node) { |
@@ -9183,36 +8900,32 @@ SsaBuilder.prototype.visitTypeAnnotation = function(node) { |
} |
SsaBuilder.prototype.updateDefinition = function(node) { |
- var $0; |
if (node.receiver != null) { |
this.compiler.unimplemented("SsaBuilder: property access"); |
} |
var link = node.get$arguments(); |
- $assert(!$notnull_bool(link.isEmpty()) && $notnull_bool(link.get$tail().isEmpty$0()), "!link.isEmpty() && link.tail.isEmpty()", "builder.dart", 443, 12); |
- this.visit((($0 = link.get$head()) && $0.is$Node())); |
+ this.visit(link.get$head()); |
var value = this.pop(); |
this.definitions.$setindex(this.elements.$index(node), value); |
return value; |
} |
SsaBuilder.prototype.visitVariableDefinitions = function(node) { |
- var $0; |
for (var link = node.definitions.nodes; |
- !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link$Node())) { |
- var definition = (($0 = link.get$head()) && $0.is$Node()); |
+ !link.isEmpty(); link = link.get$tail()) { |
+ var definition = link.get$head(); |
if ((definition instanceof Identifier)) { |
this.compiler.unimplemented("SsaBuilder.visitVariableDefinitions without initial value"); |
} |
else { |
- $assert((definition instanceof SendSet), "definition is SendSet", "builder.dart", 459, 16); |
- this.updateDefinition((definition && definition.is$SendSet())); |
+ this.updateDefinition(definition); |
} |
} |
} |
SsaBuilder.prototype.add$1 = function($0) { |
- return this.add(($0 && $0.is$HInstruction())); |
+ return this.add($0); |
}; |
SsaBuilder.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$Node())); |
+ return this.visit($0); |
}; |
// ********** Code for SsaCodeGeneratorTask ************** |
function SsaCodeGeneratorTask(compiler) { |
@@ -9225,17 +8938,16 @@ SsaCodeGeneratorTask.prototype.get$name = function() { |
} |
SsaCodeGeneratorTask.prototype.generate = function(tree, graph) { |
var $this = this; // closure support |
- return $assert_String(this.measure((function () { |
- var $0; |
- var function_ = (tree && tree.is$FunctionExpression()); |
- var name = (($0 = function_.name) && $0.is$Identifier()); |
+ return this.measure((function () { |
+ var function_ = tree; |
+ var name = function_.name; |
if (false/*null.GENERATE_SSA_TRACE*/) { |
HTracer.HTracer$singleton$factory().traceGraph("codegen", graph); |
} |
var code = $this.generateMethod(name.get$source(), SsaCodeGeneratorTask.countParameters(function_), graph); |
return code; |
}) |
- )); |
+ ); |
} |
SsaCodeGeneratorTask.prototype.generateMethod = function(methodName, parameterCount, graph) { |
var buffer = new StringBufferImpl(""); |
@@ -9251,10 +8963,9 @@ SsaCodeGeneratorTask.prototype.generateMethod = function(methodName, parameterCo |
return ('function ' + methodName + '(' + parameters + ') {\n' + buffer + '}\n'); |
} |
SsaCodeGeneratorTask.countParameters = function(function_) { |
- var $0; |
var result = 0; |
for (var link = function_.parameters.nodes; |
- !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link$Node())) { |
+ !link.isEmpty(); link = link.get$tail()) { |
result++; |
} |
return result; |
@@ -9266,7 +8977,6 @@ function SsaCodeGenerator(compiler, buffer) { |
this.buffer = buffer; |
// Initializers done |
} |
-SsaCodeGenerator.prototype.is$HVisitor = function(){return this;}; |
SsaCodeGenerator.prototype.visitGraph = function(graph) { |
this.currentGraph = graph; |
this.indent++; |
@@ -9279,20 +8989,18 @@ SsaCodeGenerator.parameter = function(index) { |
return ('p' + index + ''); |
} |
SsaCodeGenerator.prototype.invoke = function(element, arguments) { |
- var $0; |
this.buffer.add(('' + element.name + '(')); |
for (var i = 0; |
i < arguments.length; i++) { |
if (i != 0) this.buffer.add(', '); |
- this.use((($0 = arguments.$index(i)) && $0.is$HInstruction())); |
+ this.use(arguments.$index(i)); |
} |
this.buffer.add(")"); |
} |
SsaCodeGenerator.prototype.define = function(instruction) { |
- var $0; |
var usedBy = instruction.get$usedBy(); |
if (usedBy.length == 1 && (usedBy.$index(0) instanceof HPhi)) { |
- this.buffer.add(('var ' + SsaCodeGenerator.temporary((($0 = usedBy.$index(0)) && $0.is$HInstruction())) + ' = ')); |
+ this.buffer.add(('var ' + SsaCodeGenerator.temporary(usedBy.$index(0)) + ' = ')); |
this.visit(instruction); |
} |
else { |
@@ -9304,13 +9012,13 @@ SsaCodeGenerator.prototype.define = function(instruction) { |
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 + '')); |
+ this.buffer.add(('var ' + SsaCodeGenerator.temporary(usedBy.$index(i)) + ' = ' + instructionId + '')); |
} |
} |
} |
} |
SsaCodeGenerator.prototype.use = function(argument) { |
- if ($notnull_bool(argument.generateAtUseSite())) { |
+ if (argument.generateAtUseSite()) { |
this.visit(argument); |
} |
else { |
@@ -9321,14 +9029,14 @@ SsaCodeGenerator.prototype.visit = function(node) { |
return node.accept$1(this); |
} |
SsaCodeGenerator.prototype.visitBasicBlock = function(node) { |
- if ($notnull_bool(node.isLoopHeader)) { |
+ if (node.isLoopHeader) { |
this.buffer.add('while(true) {\n'); |
this.indent++; |
} |
this.currentBlock = node; |
var instruction = node.first; |
while (instruction != null) { |
- if (!$notnull_bool(instruction.generateAtUseSite())) { |
+ if (!instruction.generateAtUseSite()) { |
this.addIndentation(); |
if (instruction.get$usedBy().isEmpty() || (instruction instanceof HPhi)) { |
this.visit(instruction); |
@@ -9363,35 +9071,29 @@ SsaCodeGenerator.prototype.visitExit = function(node) { |
} |
SsaCodeGenerator.prototype.visitGoto = function(node) { |
- var $0; |
- $assert(this.currentBlock.successors.length == 1, "currentBlock.successors.length == 1", "codegen.dart", 150, 12); |
var dominated = this.currentBlock.dominatedBlocks; |
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", 162, 12); |
- this.visitBasicBlock((($0 = dominated.$index(0)) && $0.is$HBasicBlock())); |
+ this.visitBasicBlock(dominated.$index(0)); |
} |
SsaCodeGenerator.prototype.visitIf = function(node) { |
- var $0; |
var ifBlock = this.currentBlock; |
this.buffer.add('if ('); |
- this.use((($0 = node.inputs.$index(0)) && $0.is$HInstruction())); |
+ this.use(node.inputs.$index(0)); |
this.buffer.add(') {\n'); |
this.indent++; |
var dominated = this.currentBlock.dominatedBlocks; |
- $assert(dominated.$index(0) === ifBlock.successors.$index(0), "dominated[0] === ifBlock.successors[0]", "codegen.dart", 175, 12); |
- this.visitBasicBlock((($0 = ifBlock.successors.$index(0)) && $0.is$HBasicBlock())); |
+ this.visitBasicBlock(ifBlock.successors.$index(0)); |
this.indent--; |
this.addIndentation(); |
var nextDominatedIndex; |
- if ($notnull_bool(node.hasElse)) { |
- $assert(dominated.$index(1) === ifBlock.successors.$index(1), "dominated[1] === ifBlock.successors[1]", "codegen.dart", 181, 14); |
+ if (node.hasElse) { |
this.buffer.add('} else {\n'); |
this.indent++; |
- this.visitBasicBlock((($0 = ifBlock.successors.$index(1)) && $0.is$HBasicBlock())); |
+ this.visitBasicBlock(ifBlock.successors.$index(1)); |
this.indent--; |
nextDominatedIndex = 2; |
this.addIndentation(); |
@@ -9401,9 +9103,8 @@ SsaCodeGenerator.prototype.visitIf = function(node) { |
this.buffer.add("}\n"); |
nextDominatedIndex = 1; |
} |
- $assert(dominated.length <= nextDominatedIndex + 1, "dominated.length <= nextDominatedIndex + 1", "codegen.dart", 193, 12); |
if (dominated.length == nextDominatedIndex + 1) { |
- this.visitBasicBlock((($0 = dominated.$index(nextDominatedIndex)) && $0.is$HBasicBlock())); |
+ this.visitBasicBlock(dominated.$index(nextDominatedIndex)); |
} |
} |
SsaCodeGenerator.prototype.visitInvoke = function(node) { |
@@ -9411,7 +9112,6 @@ SsaCodeGenerator.prototype.visitInvoke = function(node) { |
this.invoke(node.element, node.inputs); |
} |
SsaCodeGenerator.prototype.visitInvokeForeign = function(node) { |
- var $0; |
if (!node.inputs.isEmpty()) { |
this.buffer.add("(function foreign(\$0"); |
for (var i = 1; |
@@ -9423,11 +9123,11 @@ SsaCodeGenerator.prototype.visitInvokeForeign = function(node) { |
this.buffer.add(node.code); |
if (!node.inputs.isEmpty()) { |
this.buffer.add('; }) ('); |
- this.use((($0 = node.inputs.$index(0)) && $0.is$HInstruction())); |
+ this.use(node.inputs.$index(0)); |
for (var i = 1; |
i < node.inputs.length; i++) { |
this.buffer.add(', '); |
- this.use((($0 = node.inputs.$index(1)) && $0.is$HInstruction())); |
+ this.use(node.inputs.$index(1)); |
} |
this.buffer.add(')'); |
} |
@@ -9436,49 +9136,42 @@ SsaCodeGenerator.prototype.visitLiteral = function(node) { |
this.buffer.add(node.value); |
} |
SsaCodeGenerator.prototype.visitLoopBranch = function(node) { |
- var $0; |
var branchBlock = this.currentBlock; |
this.buffer.add('if (!('); |
- this.use((($0 = node.inputs.$index(0)) && $0.is$HInstruction())); |
+ this.use(node.inputs.$index(0)); |
this.buffer.add(')) break;\n'); |
var dominated = this.currentBlock.dominatedBlocks; |
- $assert(dominated.length == 2, "dominated.length == 2", "codegen.dart", 238, 12); |
- $assert(dominated.$index(0) === branchBlock.successors.$index(0), "dominated[0] === branchBlock.successors[0]", "codegen.dart", 239, 12); |
this.visit(dominated.$index(0)); |
this.indent--; |
this.addIndentation(); |
this.buffer.add('}\n'); |
- $assert(dominated.$index(1) === branchBlock.successors.$index(1), "dominated[1] === branchBlock.successors[1]", "codegen.dart", 244, 12); |
this.visit(dominated.$index(1)); |
} |
SsaCodeGenerator.prototype.visitParameter = function(node) { |
this.buffer.add(SsaCodeGenerator.parameter(node.parameterIndex)); |
} |
SsaCodeGenerator.prototype.visitPhi = function(node) { |
- var $0; |
var usedBy = node.get$usedBy(); |
var firstPhi = true; |
for (var i = 0; |
i < usedBy.length; i++) { |
if ((usedBy.$index(i) instanceof HPhi)) { |
- if (!$notnull_bool(firstPhi)) { |
+ if (!firstPhi) { |
this.buffer.add(";\n"); |
this.addIndentation(); |
} |
- this.buffer.add(("var " + SsaCodeGenerator.temporary((($0 = usedBy.$index(i)) && $0.is$HInstruction())) + " = " + SsaCodeGenerator.temporary(node) + "")); |
+ this.buffer.add(("var " + SsaCodeGenerator.temporary(usedBy.$index(i)) + " = " + SsaCodeGenerator.temporary(node) + "")); |
firstPhi = false; |
} |
} |
} |
SsaCodeGenerator.prototype.visitReturn = function(node) { |
- var $0; |
this.buffer.add('return '); |
- this.use((($0 = node.inputs.$index(0)) && $0.is$HInstruction())); |
+ this.use(node.inputs.$index(0)); |
} |
SsaCodeGenerator.prototype.visitThrow = function(node) { |
- var $0; |
this.buffer.add('throw '); |
- this.use((($0 = node.inputs.$index(0)) && $0.is$HInstruction())); |
+ this.use(node.inputs.$index(0)); |
} |
SsaCodeGenerator.prototype.addIndentation = function() { |
for (var i = 0; |
@@ -9486,7 +9179,9 @@ SsaCodeGenerator.prototype.addIndentation = function() { |
this.buffer.add(' '); |
} |
} |
-SsaCodeGenerator.prototype.visit$1 = SsaCodeGenerator.prototype.visit; |
+SsaCodeGenerator.prototype.visit$1 = function($0) { |
+ return this.visit($0); |
+}; |
// ********** Code for HGraphVisitor ************** |
function HGraphVisitor() { |
// Initializers done |
@@ -9494,12 +9189,11 @@ function HGraphVisitor() { |
HGraphVisitor.prototype.visitDominatorTree = function(graph) { |
var $this = this; // closure support |
function visitBasicBlockAndSuccessors(block) { |
- var $0; |
$this.visitBasicBlock(block); |
var dominated = block.dominatedBlocks; |
for (var i = 0; |
i < dominated.length; i++) { |
- visitBasicBlockAndSuccessors((($0 = dominated.$index(i)) && $0.is$HBasicBlock())); |
+ visitBasicBlockAndSuccessors(dominated.$index(i)); |
} |
} |
visitBasicBlockAndSuccessors(graph.entry); |
@@ -9507,11 +9201,10 @@ HGraphVisitor.prototype.visitDominatorTree = function(graph) { |
HGraphVisitor.prototype.visitPostDominatorTree = function(graph) { |
var $this = this; // closure support |
function visitBasicBlockAndSuccessors(block) { |
- var $0; |
var dominated = block.dominatedBlocks; |
for (var i = dominated.length - 1; |
i >= 0; i--) { |
- visitBasicBlockAndSuccessors((($0 = dominated.$index(i)) && $0.is$HBasicBlock())); |
+ visitBasicBlockAndSuccessors(dominated.$index(i)); |
} |
$this.visitBasicBlock(block); |
} |
@@ -9538,12 +9231,10 @@ function HGraph() { |
this.entry = this.addNewBlock(); |
this.exit = new HBasicBlock(); |
} |
-HGraph.prototype.is$HGraph = function(){return this;}; |
HGraph.prototype.addBlock = function(block) { |
var id = this.blocks.length; |
block.id = id; |
this.blocks.add(block); |
- $assert(this.blocks.$index(id) === block, "blocks[id] === block", "nodes.dart", 85, 12); |
} |
HGraph.prototype.addNewBlock = function() { |
var result = new HBasicBlock(); |
@@ -9557,31 +9248,28 @@ HGraph.prototype.finalize = function() { |
this.assignDominators(); |
} |
HGraph.prototype.assignDominators = function() { |
- var $0; |
for (var i = 0, length = this.blocks.length; |
i < length; i++) { |
- var block = (($0 = this.blocks.$index(i)) && $0.is$HBasicBlock()); |
+ var block = this.blocks.$index(i); |
var predecessors = block.predecessors; |
- if ($notnull_bool(block.isLoopHeader)) { |
- $assert(predecessors.length >= 2, "predecessors.length >= 2", "nodes.dart", 109, 16); |
- block.assignCommonDominator((($0 = predecessors.$index(0)) && $0.is$HBasicBlock())); |
+ if (block.isLoopHeader) { |
+ block.assignCommonDominator(predecessors.$index(0)); |
} |
else { |
for (var j = predecessors.length - 1; |
j >= 0; j--) { |
- block.assignCommonDominator((($0 = predecessors.$index(j)) && $0.is$HBasicBlock())); |
+ block.assignCommonDominator(predecessors.$index(j)); |
} |
} |
} |
} |
HGraph.prototype.assignInstructionIds = function() { |
function handleDominatorTree(root, id) { |
- var $0; |
id = root.assignInstructionIds(id); |
var dominatedBlocks = root.dominatedBlocks; |
for (var i = 0, length = dominatedBlocks.length; |
i < length; i++) { |
- id = handleDominatorTree((($0 = dominatedBlocks.$index(i)) && $0.is$HBasicBlock()), id); |
+ id = handleDominatorTree(dominatedBlocks.$index(i), id); |
} |
return id; |
} |
@@ -9598,7 +9286,6 @@ function HBaseVisitor() { |
// Initializers done |
} |
$inherits(HBaseVisitor, HGraphVisitor); |
-HBaseVisitor.prototype.is$HVisitor = function(){return this;}; |
HBaseVisitor.prototype.visitBasicBlock = function(node) { |
this.currentBlock = node; |
var instruction = node.first; |
@@ -9677,7 +9364,6 @@ HInstructionList.prototype.isEmpty = function() { |
} |
HInstructionList.prototype.addAfter = function(cursor, instruction) { |
if (cursor == null) { |
- $assert(this.isEmpty(), "isEmpty()", "nodes.dart", 185, 14); |
this.first = this.last = instruction; |
} |
else if (cursor === this.last) { |
@@ -9694,9 +9380,6 @@ HInstructionList.prototype.addAfter = function(cursor, instruction) { |
instruction.notifyAddedToBlock(); |
} |
HInstructionList.prototype.remove = function(instruction) { |
- $assert(this.contains(instruction), "contains(instruction)", "nodes.dart", 201, 12); |
- $assert(instruction.isInBasicBlock(), "instruction.isInBasicBlock()", "nodes.dart", 202, 12); |
- $assert(instruction.get$usedBy().isEmpty(), "instruction.usedBy.isEmpty()", "nodes.dart", 203, 12); |
if (instruction.previous == null) { |
this.first = instruction.next; |
} |
@@ -9720,7 +9403,7 @@ HInstructionList.prototype.contains = function(instruction) { |
return false; |
} |
HInstructionList.prototype.contains$1 = function($0) { |
- return this.contains(($0 && $0.is$HInstruction())); |
+ return this.contains($0); |
}; |
HInstructionList.prototype.isEmpty$0 = function() { |
return this.isEmpty(); |
@@ -9748,7 +9431,6 @@ HBasicBlock.withId$ctor = function(id) { |
} |
HBasicBlock.withId$ctor.prototype = HBasicBlock.prototype; |
$inherits(HBasicBlock, HInstructionList); |
-HBasicBlock.prototype.is$HBasicBlock = function(){return this;}; |
HBasicBlock.prototype.isNew = function() { |
return this.status == 0/*HBasicBlock.STATUS_NEW*/; |
} |
@@ -9759,11 +9441,9 @@ HBasicBlock.prototype.isClosed = function() { |
return this.status == 2/*HBasicBlock.STATUS_CLOSED*/; |
} |
HBasicBlock.prototype.open = function() { |
- $assert(this.isNew(), "isNew()", "nodes.dart", 256, 12); |
this.status = 1/*HBasicBlock.STATUS_OPEN*/; |
} |
HBasicBlock.prototype.close = function(end) { |
- $assert(this.isOpen(), "isOpen()", "nodes.dart", 261, 12); |
this.addAfter(this.last, end); |
this.status = 2/*HBasicBlock.STATUS_CLOSED*/; |
} |
@@ -9779,11 +9459,9 @@ HBasicBlock.prototype.accept = function(visitor) { |
return visitor.visitBasicBlock(this); |
} |
HBasicBlock.prototype.add = function(instruction) { |
- $assert(!(instruction instanceof HControlFlow), "instruction is !HControlFlow", "nodes.dart", 289, 12); |
HInstructionList.prototype.addAfter.call(this, this.last, 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", 295, 12); |
if (this.successors.isEmpty()) { |
this.successors = [block]; |
} |
@@ -9793,11 +9471,9 @@ HBasicBlock.prototype.addSuccessor = function(block) { |
block.predecessors.add(this); |
} |
HBasicBlock.prototype.addAfter = function(cursor, instruction) { |
- $assert($notnull_bool(this.isOpen()) || $notnull_bool(this.isClosed()), "isOpen() || isClosed()", "nodes.dart", 305, 12); |
HInstructionList.prototype.addAfter.call(this, cursor, instruction); |
} |
HBasicBlock.prototype.remove = function(instruction) { |
- $assert($notnull_bool(this.isOpen()) || $notnull_bool(this.isClosed()), "isOpen() || isClosed()", "nodes.dart", 310, 12); |
HInstructionList.prototype.remove.call(this, instruction); |
} |
HBasicBlock.prototype.rewrite = function(from, to) { |
@@ -9820,9 +9496,6 @@ HBasicBlock.prototype.isExitBlock = function() { |
return this.first === this.last && (this.first instanceof HExit); |
} |
HBasicBlock.prototype.addDominatedBlock = function(block) { |
- $assert(this.isClosed(), "isClosed()", "nodes.dart", 340, 12); |
- $assert(this.id != null && block.id != null, "id !== null && block.id !== null", "nodes.dart", 341, 12); |
- $assert(this.dominatedBlocks.indexOf(block) < 0, "dominatedBlocks.indexOf(block) < 0", "nodes.dart", 342, 12); |
var index = this.dominatedBlocks.length; |
while (index > 0 && this.dominatedBlocks.$index(index - 1).id > block.id) { |
index--; |
@@ -9833,25 +9506,19 @@ HBasicBlock.prototype.addDominatedBlock = function(block) { |
else { |
this.dominatedBlocks.insertRange(index, 1, block); |
} |
- $assert(block.dominator == null, "block.dominator === null", "nodes.dart", 355, 12); |
block.dominator = this; |
} |
HBasicBlock.prototype.removeDominatedBlock = function(block) { |
- $assert(this.isClosed(), "isClosed()", "nodes.dart", 360, 12); |
- $assert(this.id != null && block.id != null, "id !== null && block.id !== null", "nodes.dart", 361, 12); |
var index = this.dominatedBlocks.indexOf(block); |
- $assert(index >= 0, "index >= 0", "nodes.dart", 363, 12); |
if (index == this.dominatedBlocks.length - 1) { |
this.dominatedBlocks.removeLast(); |
} |
else { |
this.dominatedBlocks.removeRange(index, 1); |
} |
- $assert(block.dominator === this, "block.dominator === this", "nodes.dart", 369, 12); |
block.dominator = null; |
} |
HBasicBlock.prototype.assignCommonDominator = function(predecessor) { |
- $assert(this.isClosed(), "isClosed()", "nodes.dart", 374, 12); |
if (this.dominator == null) { |
predecessor.addDominatedBlock(this); |
} |
@@ -9865,7 +9532,6 @@ HBasicBlock.prototype.assignCommonDominator = function(predecessor) { |
else { |
second = second.dominator; |
} |
- $assert(first != null && second != null, "first !== null && second !== null", "nodes.dart", 391, 16); |
} |
if (this.dominator !== first) { |
this.dominator.removeDominatedBlock(this); |
@@ -9876,15 +9542,15 @@ HBasicBlock.prototype.assignCommonDominator = function(predecessor) { |
HBasicBlock.prototype.forEachPhi = function(f) { |
var current = this.first; |
while (current != null && (current instanceof HPhi)) { |
- f((current && current.is$HPhi())); |
+ f(current); |
current = current.next; |
} |
} |
HBasicBlock.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$HVisitor())); |
+ return this.accept($0); |
}; |
HBasicBlock.prototype.add$1 = function($0) { |
- return this.add(($0 && $0.is$HInstruction())); |
+ return this.add($0); |
}; |
HBasicBlock.prototype.isExitBlock$0 = function() { |
return this.isExitBlock(); |
@@ -9899,7 +9565,6 @@ function HInstruction(inputs) { |
// Initializers done |
this.prepareGvn(); |
} |
-HInstruction.prototype.is$HInstruction = function(){return this;}; |
HInstruction.prototype.getFlag = function(position) { |
return (this.flags & (1 << position)) != 0; |
} |
@@ -9938,18 +9603,13 @@ HInstruction.prototype.isInBasicBlock = function() { |
return this._usedBy != null; |
} |
HInstruction.prototype.notifyAddedToBlock = function() { |
- $assert(!$notnull_bool(this.isInBasicBlock()), "!isInBasicBlock()", "nodes.dart", 507, 12); |
this._usedBy = []; |
for (var i = 0; |
i < this.inputs.length; i++) { |
- $assert(this.inputs.$index(i).isInBasicBlock$0(), "inputs[i].isInBasicBlock()", "nodes.dart", 511, 14); |
this.inputs.$index(i).get$usedBy().add(this); |
} |
- $assert(this.isValid(), "isValid()", "nodes.dart", 514, 12); |
} |
HInstruction.prototype.notifyRemovedFromBlock = function() { |
- $assert(this.isInBasicBlock(), "isInBasicBlock()", "nodes.dart", 518, 12); |
- $assert(this.get$usedBy().isEmpty(), "usedBy.isEmpty()", "nodes.dart", 519, 12); |
for (var i = 0; |
i < this.inputs.length; i++) { |
var inputUsedBy = this.inputs.$index(i).get$usedBy(); |
@@ -9963,7 +9623,6 @@ HInstruction.prototype.notifyRemovedFromBlock = function() { |
} |
} |
this._usedBy = null; |
- $assert(this.isValid(), "isValid()", "nodes.dart", 533, 12); |
} |
HInstruction.prototype.isLiteralNumber = function() { |
return false; |
@@ -9977,7 +9636,7 @@ HInstruction.prototype.isValid = function() { |
return validator.isValid; |
} |
HInstruction.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$HVisitor())); |
+ return this.accept($0); |
}; |
HInstruction.prototype.isInBasicBlock$0 = function() { |
return this.isInBasicBlock(); |
@@ -10027,7 +9686,7 @@ HInvoke.prototype.accept = function(visitor) { |
return visitor.visitInvoke(this); |
} |
HInvoke.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$HVisitor())); |
+ return this.accept($0); |
}; |
HInvoke.prototype.toString$0 = function() { |
return this.toString(); |
@@ -10043,7 +9702,7 @@ HInvokeForeign.prototype.accept = function(visitor) { |
return visitor.visitInvokeForeign(this); |
} |
HInvokeForeign.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$HVisitor())); |
+ return this.accept($0); |
}; |
// ********** Code for HArithmetic ************** |
function HArithmetic(element, inputs) { |
@@ -10063,7 +9722,7 @@ function HAdd(element, inputs) { |
} |
$inherits(HAdd, HArithmetic); |
HAdd.prototype.prepareGvn = function() { |
- if (!$notnull_bool(this.inputs.$index(0).isLiteralNumber$0())) return; |
+ if (!this.inputs.$index(0).isLiteralNumber$0()) return; |
this.clearAllSideEffects(); |
this.setUseGvn(); |
} |
@@ -10074,7 +9733,7 @@ HAdd.prototype.evaluate = function(a, b) { |
return a + b; |
} |
HAdd.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$HVisitor())); |
+ return this.accept($0); |
}; |
// ********** Code for HDivide ************** |
function HDivide(element, inputs) { |
@@ -10089,7 +9748,7 @@ HDivide.prototype.evaluate = function(a, b) { |
return a / b; |
} |
HDivide.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$HVisitor())); |
+ return this.accept($0); |
}; |
// ********** Code for HMultiply ************** |
function HMultiply(element, inputs) { |
@@ -10104,7 +9763,7 @@ HMultiply.prototype.evaluate = function(a, b) { |
return a * b; |
} |
HMultiply.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$HVisitor())); |
+ return this.accept($0); |
}; |
// ********** Code for HSubtract ************** |
function HSubtract(element, inputs) { |
@@ -10119,7 +9778,7 @@ HSubtract.prototype.evaluate = function(a, b) { |
return a - b; |
} |
HSubtract.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$HVisitor())); |
+ return this.accept($0); |
}; |
// ********** Code for HTruncatingDivide ************** |
function HTruncatingDivide(element, inputs) { |
@@ -10134,7 +9793,7 @@ HTruncatingDivide.prototype.evaluate = function(a, b) { |
return $truncdiv(a, b); |
} |
HTruncatingDivide.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$HVisitor())); |
+ return this.accept($0); |
}; |
// ********** Code for HEquals ************** |
function HEquals(element, inputs) { |
@@ -10151,7 +9810,7 @@ HEquals.prototype.accept = function(visitor) { |
return visitor.visitEquals(this); |
} |
HEquals.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$HVisitor())); |
+ return this.accept($0); |
}; |
// ********** Code for HExit ************** |
function HExit() { |
@@ -10166,7 +9825,7 @@ HExit.prototype.accept = function(visitor) { |
return visitor.visitExit(this); |
} |
HExit.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$HVisitor())); |
+ return this.accept($0); |
}; |
HExit.prototype.toString$0 = function() { |
return this.toString(); |
@@ -10184,7 +9843,7 @@ HGoto.prototype.accept = function(visitor) { |
return visitor.visitGoto(this); |
} |
HGoto.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$HVisitor())); |
+ return this.accept($0); |
}; |
HGoto.prototype.toString$0 = function() { |
return this.toString(); |
@@ -10203,7 +9862,7 @@ HIf.prototype.accept = function(visitor) { |
return visitor.visitIf(this); |
} |
HIf.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$HVisitor())); |
+ return this.accept($0); |
}; |
HIf.prototype.toString$0 = function() { |
return this.toString(); |
@@ -10221,7 +9880,7 @@ HLoopBranch.prototype.accept = function(visitor) { |
return visitor.visitLoopBranch(this); |
} |
HLoopBranch.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$HVisitor())); |
+ return this.accept($0); |
}; |
HLoopBranch.prototype.toString$0 = function() { |
return this.toString(); |
@@ -10233,7 +9892,6 @@ function HLiteral(value) { |
// Initializers done |
} |
$inherits(HLiteral, HInstruction); |
-HLiteral.prototype.is$HLiteral = function(){return this;}; |
HLiteral.prototype.get$value = function() { return this.value; }; |
HLiteral.prototype.prepareGvn = function() { |
this.clearAllSideEffects(); |
@@ -10253,7 +9911,7 @@ HLiteral.prototype.isLiteralString = function() { |
return !!(($0 = this.value) && $0.is$SourceString); |
} |
HLiteral.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$HVisitor())); |
+ return this.accept($0); |
}; |
HLiteral.prototype.isLiteralNumber$0 = function() { |
return this.isLiteralNumber(); |
@@ -10281,7 +9939,7 @@ HParameter.prototype.accept = function(visitor) { |
return visitor.visitParameter(this); |
} |
HParameter.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$HVisitor())); |
+ return this.accept($0); |
}; |
HParameter.prototype.toString$0 = function() { |
return this.toString(); |
@@ -10301,10 +9959,8 @@ HPhi.manyInputs$ctor = function(element, inputs) { |
} |
HPhi.manyInputs$ctor.prototype = HPhi.prototype; |
$inherits(HPhi, HInstruction); |
-HPhi.prototype.is$HPhi = function(){return this;}; |
HPhi.prototype.get$element = function() { return this.element; }; |
HPhi.prototype.addInput = function(input) { |
- $assert(this.isInBasicBlock(), "isInBasicBlock()", "nodes.dart", 701, 12); |
this.inputs.add(input); |
input.get$usedBy().add(this); |
} |
@@ -10315,7 +9971,7 @@ HPhi.prototype.accept = function(visitor) { |
return visitor.visitPhi(this); |
} |
HPhi.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$HVisitor())); |
+ return this.accept($0); |
}; |
HPhi.prototype.toString$0 = function() { |
return this.toString(); |
@@ -10333,7 +9989,7 @@ HReturn.prototype.accept = function(visitor) { |
return visitor.visitReturn(this); |
} |
HReturn.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$HVisitor())); |
+ return this.accept($0); |
}; |
HReturn.prototype.toString$0 = function() { |
return this.toString(); |
@@ -10351,7 +10007,7 @@ HThrow.prototype.accept = function(visitor) { |
return visitor.visitThrow(this); |
} |
HThrow.prototype.accept$1 = function($0) { |
- return this.accept(($0 && $0.is$HVisitor())); |
+ return this.accept($0); |
}; |
HThrow.prototype.toString$0 = function() { |
return this.toString(); |
@@ -10387,8 +10043,8 @@ SsaConstantFolder.prototype.visitBasicBlock = function(block) { |
while (instruction != null) { |
var replacement = instruction.accept(this); |
if (replacement !== instruction) { |
- block.addAfter(instruction, (replacement && replacement.is$HInstruction())); |
- block.rewrite(instruction, (replacement && replacement.is$HInstruction())); |
+ block.addAfter(instruction, replacement); |
+ block.rewrite(instruction, replacement); |
block.remove(instruction); |
} |
instruction = instruction.next; |
@@ -10398,24 +10054,21 @@ SsaConstantFolder.prototype.visitInstruction = function(node) { |
return node; |
} |
SsaConstantFolder.prototype.visitEquals = function(node) { |
- var $0; |
var inputs = node.inputs; |
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()); |
+ var op1 = inputs.$index(0); |
+ var op2 = inputs.$index(1); |
return new HLiteral($eq(op1.value, op2.value)); |
} |
return node; |
} |
SsaConstantFolder.prototype.visitArithmetic = function(node) { |
- var $0; |
var inputs = node.inputs; |
- $assert(inputs.length == 2, "inputs.length == 2", "optimize.dart", 57, 12); |
- if ($notnull_bool(inputs.$index(0).isLiteralNumber$0()) && $notnull_bool(inputs.$index(1).isLiteralNumber$0())) { |
- var op1 = (($0 = inputs.$index(0)) && $0.is$HLiteral()); |
- var op2 = (($0 = inputs.$index(1)) && $0.is$HLiteral()); |
+ if (inputs.$index(0).isLiteralNumber$0() && inputs.$index(1).isLiteralNumber$0()) { |
+ var op1 = inputs.$index(0); |
+ var op2 = inputs.$index(1); |
try { |
- var folded = node.evaluate($assert_num(op1.value), $assert_num(op2.value)); |
+ var folded = node.evaluate(op1.value, op2.value); |
return new HLiteral(folded); |
} catch (e) { |
e = $toDartException(e); |
@@ -10426,10 +10079,9 @@ SsaConstantFolder.prototype.visitArithmetic = function(node) { |
return node; |
} |
SsaConstantFolder.prototype.visitAdd = function(node) { |
- var $0; |
- if ($notnull_bool(node.inputs.$index(0).isLiteralString$0())) { |
- var op1 = (($0 = node.inputs.$index(0)) && $0.is$HLiteral()); |
- var op2 = (($0 = node.inputs.$index(1)) && $0.is$HLiteral()); |
+ if (node.inputs.$index(0).isLiteralString$0()) { |
+ var op1 = node.inputs.$index(0); |
+ var op2 = node.inputs.$index(1); |
return new HLiteral(new StringWrapper(("" + op1.value + " + " + op2.value + ""))); |
} |
return this.visitArithmetic(node); |
@@ -10441,7 +10093,7 @@ function SsaDeadCodeEliminator() { |
} |
$inherits(SsaDeadCodeEliminator, HGraphVisitor); |
SsaDeadCodeEliminator.isDeadCode = function(instruction) { |
- return !$notnull_bool(instruction.hasSideEffects()) && instruction.get$usedBy().isEmpty(); |
+ return !instruction.hasSideEffects() && instruction.get$usedBy().isEmpty(); |
} |
SsaDeadCodeEliminator.prototype.visitGraph = function(graph) { |
this.visitPostDominatorTree(graph); |
@@ -10450,8 +10102,8 @@ SsaDeadCodeEliminator.prototype.visitBasicBlock = function(block) { |
var instruction = block.last; |
while (instruction != null) { |
var previous = instruction.previous; |
- if ($notnull_bool(SsaDeadCodeEliminator.isDeadCode(instruction))) block.remove(instruction); |
- instruction = (previous && previous.is$HInstruction()); |
+ if (SsaDeadCodeEliminator.isDeadCode(instruction)) block.remove(instruction); |
+ instruction = previous; |
} |
} |
// ********** Code for SsaInstructionMerger ************** |
@@ -10545,13 +10197,12 @@ HTracer.prototype.addInstructions = function(block) { |
var uses = instruction.get$usedBy().length; |
this.addIndent(); |
var temporaryId = stringifier.temporaryId(instruction); |
- var instructionString = $assert_String(stringifier.visit(instruction)); |
+ var instructionString = stringifier.visit(instruction); |
this.add(("" + bci + " " + uses + " " + temporaryId + " " + instructionString + " <|@\n")); |
} |
} |
HTracer.prototype.visitBasicBlock = function(block) { |
var $this = this; // closure support |
- $assert(block.id != null, "block.id !== null", "tracer.dart", 75, 12); |
this.tag("block", (function () { |
$this.printProperty("name", ("B" + block.id + "")); |
$this.printProperty("from_bci", -1); |
@@ -10614,7 +10265,7 @@ HTracer.prototype.toString = function() { |
return this.output.toString(); |
} |
HTracer.prototype.add$1 = function($0) { |
- return this.add($assert_String($0)); |
+ return this.add($0); |
}; |
HTracer.prototype.toString$0 = function() { |
return this.toString(); |
@@ -10624,7 +10275,6 @@ function HInstructionStringifier(currentBlock) { |
this.currentBlock = currentBlock; |
// Initializers done |
} |
-HInstructionStringifier.prototype.is$HVisitor = function(){return this;}; |
HInstructionStringifier.prototype.visit = function(node) { |
return node.accept(this); |
} |
@@ -10647,24 +10297,21 @@ HInstructionStringifier.prototype.visitExit = function(node) { |
return "exit"; |
} |
HInstructionStringifier.prototype.visitGoto = function(node) { |
- var $0; |
- var target = (($0 = this.currentBlock.successors.$index(0)) && $0.is$HBasicBlock()); |
+ var target = this.currentBlock.successors.$index(0); |
return ("Goto: (B" + target.id + ")"); |
} |
HInstructionStringifier.prototype.visitIf = function(node) { |
- var $0; |
- var thenBlock = (($0 = this.currentBlock.successors.$index(0)) && $0.is$HBasicBlock()); |
- var elseBlock = (($0 = this.currentBlock.successors.$index(1)) && $0.is$HBasicBlock()); |
- var conditionId = this.temporaryId((($0 = node.inputs.$index(0)) && $0.is$HInstruction())); |
+ var thenBlock = this.currentBlock.successors.$index(0); |
+ var elseBlock = this.currentBlock.successors.$index(1); |
+ var conditionId = this.temporaryId(node.inputs.$index(0)); |
return ("If (" + conditionId + "): (B" + thenBlock.id + ") else (B" + elseBlock.id + ")"); |
} |
HInstructionStringifier.prototype.visitGenericInvoke = function(invokeType, invoke) { |
- var $0; |
var arguments = new StringBufferImpl(""); |
for (var i = 0; |
i < invoke.inputs.length; i++) { |
if (i != 0) arguments.add(", "); |
- arguments.add(this.temporaryId((($0 = invoke.inputs.$index(i)) && $0.is$HInstruction()))); |
+ arguments.add(this.temporaryId(invoke.inputs.$index(i))); |
} |
return ("" + invokeType + ": " + invoke.element.name + "(" + arguments + ")"); |
} |
@@ -10678,10 +10325,9 @@ HInstructionStringifier.prototype.visitLiteral = function(literal) { |
return ("Literal " + literal.value + ""); |
} |
HInstructionStringifier.prototype.visitLoopBranch = function(branch) { |
- var $0; |
- var bodyBlock = (($0 = this.currentBlock.successors.$index(0)) && $0.is$HBasicBlock()); |
- var exitBlock = (($0 = this.currentBlock.successors.$index(1)) && $0.is$HBasicBlock()); |
- var conditionId = this.temporaryId((($0 = branch.inputs.$index(0)) && $0.is$HInstruction())); |
+ var bodyBlock = this.currentBlock.successors.$index(0); |
+ var exitBlock = this.currentBlock.successors.$index(1); |
+ var conditionId = this.temporaryId(branch.inputs.$index(0)); |
return ("While (" + conditionId + "): (B" + bodyBlock.id + ") then (B" + exitBlock.id + ")"); |
} |
HInstructionStringifier.prototype.visitMultiply = function(node) { |
@@ -10691,25 +10337,22 @@ HInstructionStringifier.prototype.visitParameter = function(node) { |
return ("p" + node.parameterIndex + ""); |
} |
HInstructionStringifier.prototype.visitPhi = function(phi) { |
- var $0; |
- return ("Phi(" + this.temporaryId((($0 = phi.inputs.$index(0)) && $0.is$HInstruction())) + ", " + this.temporaryId((($0 = phi.inputs.$index(1)) && $0.is$HInstruction())) + ")"); |
+ return ("Phi(" + this.temporaryId(phi.inputs.$index(0)) + ", " + this.temporaryId(phi.inputs.$index(1)) + ")"); |
} |
HInstructionStringifier.prototype.visitReturn = function(node) { |
- var $0; |
- return ("Return " + this.temporaryId((($0 = node.inputs.$index(0)) && $0.is$HInstruction())) + ""); |
+ return ("Return " + this.temporaryId(node.inputs.$index(0)) + ""); |
} |
HInstructionStringifier.prototype.visitSubtract = function(node) { |
return this.visitInvoke(node); |
} |
HInstructionStringifier.prototype.visitThrow = function(node) { |
- var $0; |
- return ("Throw " + this.temporaryId((($0 = node.inputs.$index(0)) && $0.is$HInstruction())) + ""); |
+ return ("Throw " + this.temporaryId(node.inputs.$index(0)) + ""); |
} |
HInstructionStringifier.prototype.visitTruncatingDivide = function(node) { |
return this.visitInvoke(node); |
} |
HInstructionStringifier.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$HInstruction())); |
+ return this.visit($0); |
}; |
// ********** Code for HValidator ************** |
function HValidator() { |
@@ -10727,7 +10370,7 @@ HValidator.prototype.markInvalid = function(reason) { |
this.isValid = false; |
} |
HValidator.prototype.visitBasicBlock = function(block) { |
- if (!$notnull_bool(this.isValid)) return; |
+ if (!this.isValid) return; |
if (block.first == null || block.last == null) { |
this.markInvalid("empty block"); |
} |
@@ -10743,7 +10386,7 @@ HValidator.prototype.visitBasicBlock = function(block) { |
if ((block.last instanceof HGoto) && block.successors.length != 1) { |
this.markInvalid("Goto node without one successor"); |
} |
- if ((block.last instanceof HReturn) && (block.successors.length != 1 || !$notnull_bool(block.successors.$index(0).isExitBlock$0()))) { |
+ if ((block.last instanceof HReturn) && (block.successors.length != 1 || !block.successors.$index(0).isExitBlock$0())) { |
this.markInvalid("Return node with > 1 succesor or not going to exit-block"); |
} |
if ((block.last instanceof HExit) && !block.successors.isEmpty()) { |
@@ -10752,16 +10395,16 @@ HValidator.prototype.visitBasicBlock = function(block) { |
if ((block.last instanceof HThrow) && !block.successors.isEmpty()) { |
this.markInvalid("Throw block with successor"); |
} |
- if (block.successors.isEmpty() && !(block.last instanceof HThrow) && !$notnull_bool(block.isExitBlock())) { |
+ if (block.successors.isEmpty() && !(block.last instanceof HThrow) && !block.isExitBlock()) { |
this.markInvalid("Non-exit or throw block without successor"); |
} |
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(this.isValid)) break; |
+ if (!this.isValid) break; |
if (successor.id == null) this.markInvalid("successor without id"); |
- if (successor.id <= block.id && !$notnull_bool(successor.isLoopHeader)) { |
+ if (successor.id <= block.id && !successor.isLoopHeader) { |
this.markInvalid("successor with lower id, but not a loop-header"); |
} |
} |
@@ -10769,7 +10412,7 @@ 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(this.isValid)) break; |
+ if (!this.isValid) break; |
if (dominated.dominator !== block) { |
this.markInvalid("dominated block not pointing back"); |
} |
@@ -10778,7 +10421,7 @@ HValidator.prototype.visitBasicBlock = function(block) { |
} |
lastId = dominated.id; |
} |
- if (!$notnull_bool(this.isValid)) return; |
+ if (!this.isValid) return; |
HInstructionVisitor.prototype.visitBasicBlock.call(this, block); |
} |
HValidator.countInstruction = function(instructions, instruction) { |
@@ -10803,32 +10446,32 @@ HValidator.everyInstruction = function(instructions, f) { |
count++; |
} |
} |
- if (!$notnull_bool(f.call$2(current, count))) return false; |
+ if (!f.call$2(current, count)) return false; |
} |
return true; |
} |
HValidator.prototype.visitInstruction = function(instruction) { |
var $this = this; // closure support |
function hasCorrectInputs(instruction) { |
- var inBasicBlock = $assert_bool(instruction.isInBasicBlock$0()); |
+ var inBasicBlock = instruction.isInBasicBlock$0(); |
return HValidator.everyInstruction(instruction.inputs, (function (input, count) { |
- if ($notnull_bool(inBasicBlock)) { |
- return HValidator.countInstruction(input.get$usedBy(), (instruction && instruction.is$HInstruction())) == count; |
+ if (inBasicBlock) { |
+ return HValidator.countInstruction(input.get$usedBy(), instruction) == count; |
} |
else { |
- return HValidator.countInstruction(input.get$usedBy(), (instruction && instruction.is$HInstruction())) == 0; |
+ return HValidator.countInstruction(input.get$usedBy(), instruction) == 0; |
} |
}) |
); |
} |
function hasCorrectUses(instruction) { |
- if (!$notnull_bool(instruction.isInBasicBlock$0())) return true; |
+ if (!instruction.isInBasicBlock$0()) return true; |
return HValidator.everyInstruction(instruction.get$usedBy(), (function (use, count) { |
- return HValidator.countInstruction(use.inputs, (instruction && instruction.is$HInstruction())) == count; |
+ return HValidator.countInstruction(use.inputs, instruction) == count; |
}) |
); |
} |
- this.isValid = $notnull_bool(this.isValid) && $notnull_bool(hasCorrectInputs(instruction)) && $notnull_bool(hasCorrectUses(instruction)); |
+ this.isValid = this.isValid && hasCorrectInputs(instruction) && hasCorrectUses(instruction); |
} |
// ********** Code for top level ************** |
// ********** Library leg ************** |
@@ -10840,15 +10483,15 @@ function WorldCompiler(world, script) { |
} |
$inherits(WorldCompiler, Compiler); |
WorldCompiler.prototype.log = function(message) { |
- if ($notnull_bool(options.showInfo)) { |
+ if (options.showInfo) { |
this.world.info(('[leg] ' + message + '')); |
} |
} |
WorldCompiler.prototype.run = function() { |
var success = Compiler.prototype.run.call(this); |
- if ($notnull_bool(success)) { |
+ if (success) { |
var code = this.getGeneratedCode(); |
- this.world.legCode = $assert_String(code); |
+ this.world.legCode = code; |
this.world.jsBytesWritten = code.length; |
var $list = this.tasks; |
for (var $i0 = 0;$i0 < $list.length; $i0++) { |
@@ -10869,8 +10512,7 @@ WorldCompiler.prototype.spanFromNode = function(node) { |
return new SourceSpan(this.script.file, startOffset, endOffset); |
} |
WorldCompiler.prototype.reportWarning = function(node, message) { |
- var $0; |
- this.world.warning(('' + message + '.'), (($0 = this.spanFromNode(node)) && $0.is$SourceSpan())); |
+ this.world.warning(('' + message + '.'), this.spanFromNode(node)); |
} |
// ********** Code for Compiler ************** |
function Compiler(script) { |
@@ -10887,9 +10529,8 @@ function Compiler(script) { |
this.generator = new SsaCodeGeneratorTask(this); |
this.tasks = [this.scanner, this.parser, this.resolver, this.checker, this.builder, this.optimizer, this.generator]; |
} |
-Compiler.prototype.is$Compiler = function(){return this;}; |
Compiler.prototype.ensure = function(condition) { |
- if (!$notnull_bool(condition)) this.cancel('failed assertion in leg'); |
+ if (!condition) this.cancel('failed assertion in leg'); |
} |
Compiler.prototype.unimplemented = function(methodName) { |
this.cancel(("" + methodName + " not implemented")); |
@@ -10926,14 +10567,13 @@ Compiler.prototype.scanCoreLibrary = function() { |
this.universe.define(element); |
} |
Compiler.prototype.runCompiler = function() { |
- var $0; |
this.scanCoreLibrary(); |
this.scanner.scan(this.script); |
var element = this.universe.find(const$244/*Compiler.MAIN*/); |
if (element == null) this.cancel(('Could not find ' + const$244/*Compiler.MAIN*/ + '')); |
this.compileMethod(element); |
while (!this.worklist.isEmpty()) { |
- this.compileMethod((($0 = this.worklist.removeLast()) && $0.is$Element())); |
+ this.compileMethod(this.worklist.removeLast()); |
} |
} |
Compiler.prototype.compileMethod = function(element) { |
@@ -10950,9 +10590,8 @@ Compiler.prototype.resolveType = function(element) { |
this.resolver.resolveType(this.parser.parse(element)); |
} |
Compiler.prototype.getGeneratedCode = function() { |
- var $0; |
var buffer = new StringBufferImpl(""); |
- var codeBlocks = (($0 = this.universe.generatedCode.getValues()) && $0.is$List$String()); |
+ var codeBlocks = this.universe.generatedCode.getValues(); |
for (var i = codeBlocks.length - 1; |
i >= 0; i--) { |
buffer.add(codeBlocks.$index(i)); |
@@ -11005,8 +10644,7 @@ ResolverTask.prototype.get$name = function() { |
} |
ResolverTask.prototype.resolve = function(tree) { |
var $this = this; // closure support |
- var $0; |
- return (($0 = this.measure((function () { |
+ return this.measure((function () { |
var visitor = new ResolverVisitor($this.compiler); |
visitor.visit(tree); |
while (!$this.toResolve.isEmpty()) { |
@@ -11014,7 +10652,7 @@ ResolverTask.prototype.resolve = function(tree) { |
} |
return visitor.mapping; |
}) |
- )) && $0.is$Map$Node$Element()); |
+ ); |
} |
ResolverTask.prototype.resolveType = function(tree) { |
var $this = this; // closure support |
@@ -11025,7 +10663,7 @@ ResolverTask.prototype.resolveType = function(tree) { |
); |
} |
ResolverTask.prototype.resolve$1 = function($0) { |
- return this.resolve(($0 && $0.is$Node())); |
+ return this.resolve($0); |
}; |
// ********** Code for ErrorMessages ************** |
function ErrorMessages() {} |
@@ -11048,7 +10686,6 @@ function ResolverVisitor(compiler) { |
this.context = new Scope(new TopScope(compiler.universe)); |
// Initializers done |
} |
-ResolverVisitor.prototype.is$Visitor = function(){return this;}; |
ResolverVisitor.prototype.fail = function(node, message) { |
this.compiler.cancel(message); |
} |
@@ -11060,9 +10697,8 @@ ResolverVisitor.prototype.visit = function(node) { |
return node.accept(this); |
} |
ResolverVisitor.prototype.visitIn = function(node, scope) { |
- var $0; |
this.context = scope; |
- var element = (($0 = this.visit(node)) && $0.is$Element()); |
+ var element = this.visit(node); |
this.context = this.context.parent; |
return element; |
} |
@@ -11080,9 +10716,8 @@ ResolverVisitor.prototype.visitFor = function(node) { |
this.visitIn(node.body, scope); |
} |
ResolverVisitor.prototype.visitFunctionExpression = function(node) { |
- var $0; |
this.visit(node.returnType); |
- var enclosingElement = (($0 = this.visit(node.name)) && $0.is$Element()); |
+ var enclosingElement = this.visit(node.name); |
var newScope = new Scope.enclosing$ctor(this.context, enclosingElement); |
this.visitIn(node.parameters, newScope); |
this.visitIn(node.body, newScope); |
@@ -11099,19 +10734,18 @@ ResolverVisitor.prototype.visitIf = function(node) { |
this.visit(node.elsePart); |
} |
ResolverVisitor.prototype.potentiallyMapOperatorToMethodName = function(name) { |
- if ($notnull_bool($eq(name, const$247/*const SourceString('+')*/))) return const$248/*const SourceString('add')*/; |
- if ($notnull_bool($eq(name, const$249/*const SourceString('-')*/))) return const$250/*const SourceString('sub')*/; |
- if ($notnull_bool($eq(name, const$251/*const SourceString('*')*/))) return const$252/*const SourceString('mul')*/; |
- if ($notnull_bool($eq(name, const$253/*const SourceString('/')*/))) return const$254/*const SourceString('div')*/; |
- if ($notnull_bool($eq(name, const$255/*const SourceString('~/')*/))) return const$256/*const SourceString('tdiv')*/; |
- if ($notnull_bool($eq(name, const$257/*const SourceString('==')*/))) return const$258/*const SourceString('eq')*/; |
- if ($notnull_bool($eq(name, const$259/*const SourceString('<')*/))) return const$260/*const SourceString('lt')*/; |
+ if ($eq(name, const$247/*const SourceString('+')*/)) return const$248/*const SourceString('add')*/; |
+ if ($eq(name, const$249/*const SourceString('-')*/)) return const$250/*const SourceString('sub')*/; |
+ if ($eq(name, const$251/*const SourceString('*')*/)) return const$252/*const SourceString('mul')*/; |
+ if ($eq(name, const$253/*const SourceString('/')*/)) return const$254/*const SourceString('div')*/; |
+ if ($eq(name, const$255/*const SourceString('~/')*/)) return const$256/*const SourceString('tdiv')*/; |
+ if ($eq(name, const$257/*const SourceString('==')*/)) return const$258/*const SourceString('eq')*/; |
+ if ($eq(name, const$259/*const SourceString('<')*/)) return const$260/*const SourceString('lt')*/; |
return name; |
} |
ResolverVisitor.prototype.visitSend = function(node) { |
- var $0; |
this.visit(node.receiver); |
- var identifier = (($0 = node.selector) && $0.is$Identifier()); |
+ var identifier = node.selector; |
var name = this.potentiallyMapOperatorToMethodName(identifier.get$source()); |
var target = this.context.lookup(name); |
if (target == null) this.fail(node, ErrorMessages.cannotResolve(name)); |
@@ -11119,9 +10753,8 @@ ResolverVisitor.prototype.visitSend = function(node) { |
return this.useElement(node, target); |
} |
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()); |
+ var receiver = this.visit(node.receiver); |
+ var selector = node.selector; |
if (receiver != null) { |
this.compiler.unimplemented('Resolver: property access'); |
} |
@@ -11143,10 +10776,9 @@ ResolverVisitor.prototype.visitLiteralString = function(node) { |
} |
ResolverVisitor.prototype.visitNodeList = function(node) { |
- var $0; |
for (var link = node.nodes; |
- !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link$Node())) { |
- this.visit((($0 = link.get$head()) && $0.is$Node())); |
+ !link.isEmpty(); link = link.get$tail()) { |
+ this.visit(link.get$head()); |
} |
} |
ResolverVisitor.prototype.visitOperator = function(node) { |
@@ -11160,8 +10792,8 @@ ResolverVisitor.prototype.visitThrow = function(node) { |
} |
ResolverVisitor.prototype.visitTypeAnnotation = function(node) { |
var name = node.typeName; |
- if ($notnull_bool($eq(name.get$source(), const$261/*const SourceString('var')*/))) return null; |
- if ($notnull_bool($eq(name.get$source(), const$4/*const SourceString('void')*/))) return null; |
+ if ($eq(name.get$source(), const$261/*const SourceString('var')*/)) return null; |
+ if ($eq(name.get$source(), const$4/*const SourceString('void')*/)) return null; |
var element = this.context.lookup(name.get$source()); |
if (element == null) { |
this.warning(node, ErrorMessages.cannotResolveType(name)); |
@@ -11170,7 +10802,7 @@ ResolverVisitor.prototype.visitTypeAnnotation = function(node) { |
this.warning(node, ErrorMessages.notAType(name)); |
} |
else { |
- var cls = (element && element.is$ClassElement()); |
+ var cls = element; |
this.compiler.resolver.toResolve.add(element); |
} |
return this.useElement(node, element); |
@@ -11181,10 +10813,9 @@ ResolverVisitor.prototype.visitVariableDefinitions = function(node) { |
visitor.visit(node.definitions); |
} |
ResolverVisitor.prototype.defineElement = function(node, element) { |
- var $0; |
this.compiler.ensure(element != null); |
this.mapping.$setindex(node, element); |
- return (($0 = this.context.add(element)) && $0.is$Element()); |
+ return this.context.add(element); |
} |
ResolverVisitor.prototype.useElement = function(node, element) { |
if (element == null) return null; |
@@ -11192,7 +10823,7 @@ ResolverVisitor.prototype.useElement = function(node, element) { |
return element; |
} |
ResolverVisitor.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$Node())); |
+ return this.visit($0); |
}; |
// ********** Code for ClassResolverVisitor ************** |
function ClassResolverVisitor(compiler) { |
@@ -11200,21 +10831,18 @@ function ClassResolverVisitor(compiler) { |
this.context = new TopScope(compiler.universe); |
// Initializers done |
} |
-ClassResolverVisitor.prototype.is$Visitor = function(){return this;}; |
ClassResolverVisitor.prototype.visitClassNode = function(node) { |
- var $0; |
- var element = (($0 = this.context.lookup(node.name.get$source())) && $0.is$ClassElement()); |
+ var element = this.context.lookup(node.name.get$source()); |
this.compiler.ensure(element != null); |
- this.compiler.ensure(!$notnull_bool(element.isResolved)); |
+ this.compiler.ensure(!element.isResolved); |
element.supertype = this.visit(node.superclass); |
for (var link = node.interfaces.nodes; |
- !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link$Node())) { |
- element.interfaces = (($0 = element.interfaces.prepend(this.visit((($0 = link.get$head()) && $0.is$Node())))) && $0.is$Link$Type()); |
+ !link.isEmpty(); link = link.get$tail()) { |
+ element.interfaces = element.interfaces.prepend(this.visit(link.get$head())); |
} |
return element.computeType(this.compiler, null); |
} |
ClassResolverVisitor.prototype.visitTypeAnnotation = function(node) { |
- var $0; |
var name = node.typeName; |
var element = this.context.lookup(name.get$source()); |
if (element == null) { |
@@ -11225,17 +10853,16 @@ ClassResolverVisitor.prototype.visitTypeAnnotation = function(node) { |
} |
else { |
this.compiler.resolver.toResolve.add(element); |
- return (($0 = element.computeType(this.compiler, null)) && $0.is$Type()); |
+ return element.computeType(this.compiler, null); |
} |
return null; |
} |
ClassResolverVisitor.prototype.visit = function(node) { |
- var $0; |
if (node == null) return null; |
- return (($0 = node.accept(this)) && $0.is$Type()); |
+ return node.accept(this); |
} |
ClassResolverVisitor.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$Node())); |
+ return this.visit($0); |
}; |
// ********** Code for VariableDefinitionsVisitor ************** |
function VariableDefinitionsVisitor(definitions, resolver) { |
@@ -11243,27 +10870,23 @@ function VariableDefinitionsVisitor(definitions, resolver) { |
this.resolver = resolver; |
// Initializers done |
} |
-VariableDefinitionsVisitor.prototype.is$Visitor = function(){return this;}; |
VariableDefinitionsVisitor.prototype.visitSendSet = function(node) { |
- var $0; |
- $assert(node.get$arguments().get$tail().isEmpty$0(), "node.arguments.tail.isEmpty()", "resolver.dart", 269, 12); |
if (node.receiver != null) { |
this.resolver.compiler.unimplemented("receiver on a variable definition"); |
} |
- var selector = (($0 = node.selector) && $0.is$Identifier()); |
- this.resolver.visit((($0 = node.get$arguments().get$head()) && $0.is$Node())); |
- return (($0 = this.visit(node.selector)) && $0.is$SourceString()); |
+ var selector = node.selector; |
+ this.resolver.visit(node.get$arguments().get$head()); |
+ return this.visit(node.selector); |
} |
VariableDefinitionsVisitor.prototype.visitIdentifier = function(node) { |
return node.get$source(); |
} |
VariableDefinitionsVisitor.prototype.visitNodeList = function(node) { |
- var $0; |
for (var link = node.nodes; |
- !$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); |
+ !link.isEmpty(); link = link.get$tail()) { |
+ var name = this.visit(link.get$head()); |
+ var element = new VariableElement(link.get$head(), this.definitions.type, name, this.resolver.context.enclosingElement); |
+ var existing = this.resolver.defineElement(link.get$head(), element); |
if ($ne(existing, element)) { |
this.resolver.fail(node, ErrorMessages.duplicateDefinition(link.get$head())); |
} |
@@ -11273,7 +10896,7 @@ VariableDefinitionsVisitor.prototype.visit = function(node) { |
return node.accept(this); |
} |
VariableDefinitionsVisitor.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$Node())); |
+ return this.visit($0); |
}; |
// ********** Code for Scope ************** |
function Scope(parent) { |
@@ -11296,22 +10919,20 @@ Scope.enclosing$ctor = function(parent, enclosingElement) { |
Scope.enclosing$ctor.prototype = Scope.prototype; |
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()); |
+ var element = this.elements.$index(name); |
if (element != null) return element; |
return this.parent.lookup(name); |
} |
Scope.prototype.add = function(element) { |
- var $0; |
- if (this.elements.containsKey(element.name)) return (($0 = this.elements.$index(element.name)) && $0.is$Element()); |
+ if (this.elements.containsKey(element.name)) return this.elements.$index(element.name); |
this.elements.$setindex(element.name, element); |
return element; |
} |
Scope.prototype.add$1 = function($0) { |
- return this.add(($0 && $0.is$Element())); |
+ return this.add($0); |
}; |
Scope.prototype.lookup$1 = function($0) { |
- return this.lookup(($0 && $0.is$SourceString())); |
+ return this.lookup($0); |
}; |
// ********** Code for TopScope ************** |
function TopScope(universe) { |
@@ -11327,10 +10948,10 @@ TopScope.prototype.add = function(element) { |
$throw("Cannot add an element in the top scope"); |
} |
TopScope.prototype.add$1 = function($0) { |
- return this.add(($0 && $0.is$Element())); |
+ return this.add($0); |
}; |
TopScope.prototype.lookup$1 = function($0) { |
- return this.lookup(($0 && $0.is$SourceString())); |
+ return this.lookup($0); |
}; |
// ********** Code for leg_Script ************** |
function leg_Script(file) { |
@@ -11400,7 +11021,6 @@ SimpleType.named$ctor = function(name) { |
// Initializers done |
} |
SimpleType.named$ctor.prototype = SimpleType.prototype; |
-SimpleType.prototype.is$Type = function(){return this;}; |
SimpleType.prototype.get$name = function() { return this.name; }; |
SimpleType.prototype.get$element = function() { return this.element; }; |
SimpleType.prototype.toString = function() { |
@@ -11415,8 +11035,6 @@ function FunctionType(returnType, parameterTypes) { |
this.parameterTypes = parameterTypes; |
// Initializers done |
} |
-FunctionType.prototype.is$FunctionType = function(){return this;}; |
-FunctionType.prototype.is$Type = function(){return this;}; |
FunctionType.prototype.get$returnType = function() { return this.returnType; }; |
FunctionType.prototype.toString = function() { |
var sb = new StringBufferImpl(""); |
@@ -11437,18 +11055,17 @@ function Types() { |
this.stringType = new SimpleType.named$ctor(const$10/*Types.STRING*/); |
// Initializers done |
} |
-Types.prototype.is$Types = function(){return this;}; |
Types.prototype.lookup = function(s) { |
- if ($notnull_bool($eq(const$4/*Types.VOID*/, s))) { |
+ if ($eq(const$4/*Types.VOID*/, s)) { |
return this.voidType; |
} |
- else if ($notnull_bool($eq(const$6/*Types.INT*/, s))) { |
+ else if ($eq(const$6/*Types.INT*/, s)) { |
return this.intType; |
} |
- else if ($notnull_bool($eq(const$8/*Types.DYNAMIC*/, s)) || s.get$stringValue() === 'var') { |
+ else if ($eq(const$8/*Types.DYNAMIC*/, s) || s.get$stringValue() === 'var') { |
return this.dynamicType; |
} |
- else if ($notnull_bool($eq(const$10/*Types.STRING*/, s))) { |
+ else if ($eq(const$10/*Types.STRING*/, s)) { |
return this.stringType; |
} |
return null; |
@@ -11457,10 +11074,10 @@ Types.prototype.isSubtype = function(r, s) { |
return r === s || r === this.dynamicType || s === this.dynamicType; |
} |
Types.prototype.isAssignable = function(r, s) { |
- return $notnull_bool(this.isSubtype(r, s)) || $notnull_bool(this.isSubtype(s, r)); |
+ return this.isSubtype(r, s) || this.isSubtype(s, r); |
} |
Types.prototype.lookup$1 = function($0) { |
- return this.lookup(($0 && $0.is$SourceString())); |
+ return this.lookup($0); |
}; |
// ********** Code for CancelTypeCheckException ************** |
function CancelTypeCheckException(node, reason) { |
@@ -11475,7 +11092,6 @@ function TypeCheckerVisitor(compiler, elements, types) { |
this.types = types; |
// Initializers done |
} |
-TypeCheckerVisitor.prototype.is$Visitor = function(){return this;}; |
TypeCheckerVisitor.prototype.fail = function(node, reason) { |
var message = 'cannot type-check'; |
if (reason != null) { |
@@ -11497,16 +11113,12 @@ TypeCheckerVisitor.prototype.typeWithDefault = function(node, defaultValue) { |
return node != null ? this.type(node) : defaultValue; |
} |
TypeCheckerVisitor.prototype.type = function(node) { |
- var $0; |
if (node == null) this.fail(null, 'unexpected node: null'); |
- var result = (($0 = node.accept(this)) && $0.is$Type()); |
+ var result = node.accept(this); |
return result; |
} |
-TypeCheckerVisitor.prototype.get$type = function() { |
- return TypeCheckerVisitor.prototype.type.bind(this); |
-} |
TypeCheckerVisitor.prototype.checkAssignable = function(node, s, t) { |
- if (!$notnull_bool(this.types.isAssignable(s, t))) { |
+ if (!this.types.isAssignable(s, t)) { |
this.reportTypeWarning(node, const$270/*WarningKind.NOT_ASSIGNABLE*/, [s, t]); |
} |
} |
@@ -11524,8 +11136,7 @@ TypeCheckerVisitor.prototype.visitFor = function(node) { |
this.fail(node); |
} |
TypeCheckerVisitor.prototype.visitFunctionExpression = function(node) { |
- var $0; |
- var functionType = (($0 = this.elements.$index(node.name).computeType$2(this.compiler, this.types)) && $0.is$FunctionType()); |
+ var functionType = this.elements.$index(node.name).computeType$2(this.compiler, this.types); |
var returnType = functionType.returnType; |
var previous = this.expectedReturnType; |
this.expectedReturnType = returnType; |
@@ -11539,23 +11150,22 @@ TypeCheckerVisitor.prototype.visitIdentifier = function(node) { |
TypeCheckerVisitor.prototype.visitIf = function(node) { |
this.type(node.condition); |
this.type(node.thenPart); |
- if ($notnull_bool(node.get$hasElsePart())) this.type(node.elsePart); |
+ if (node.get$hasElsePart()) this.type(node.elsePart); |
return this.types.voidType; |
} |
TypeCheckerVisitor.prototype.visitSend = function(node) { |
- var $0; |
var target = this.elements.$index(node); |
- var selector = (($0 = node.selector) && $0.is$Identifier()); |
+ var selector = node.selector; |
if (target != null) { |
var name = selector.get$source(); |
- if ($notnull_bool($eq(name, const$247/*const SourceString('+')*/)) || $notnull_bool($eq(name, const$274/*const SourceString('=')*/)) || $notnull_bool($eq(name, const$249/*const SourceString('-')*/)) || $notnull_bool($eq(name, const$251/*const SourceString('*')*/)) || $notnull_bool($eq(name, const$253/*const SourceString('/')*/)) || $notnull_bool($eq(name, const$259/*const SourceString('<')*/)) || $notnull_bool($eq(name, const$255/*const SourceString('~/')*/))) { |
+ if ($eq(name, const$247/*const SourceString('+')*/) || $eq(name, const$274/*const SourceString('=')*/) || $eq(name, const$249/*const SourceString('-')*/) || $eq(name, const$251/*const SourceString('*')*/) || $eq(name, const$253/*const SourceString('/')*/) || $eq(name, const$259/*const SourceString('<')*/) || $eq(name, const$255/*const SourceString('~/')*/)) { |
return this.types.dynamicType; |
} |
var targetType = target.computeType$2(this.compiler, this.types); |
- if ($notnull_bool(node.get$isPropertyAccess())) { |
- return (targetType && targetType.is$Type()); |
+ if (node.get$isPropertyAccess()) { |
+ return targetType; |
} |
- else if ($notnull_bool(node.get$isFunctionObjectInvocation())) { |
+ else if (node.get$isFunctionObjectInvocation()) { |
this.fail(node); |
} |
else { |
@@ -11565,21 +11175,21 @@ TypeCheckerVisitor.prototype.visitSend = function(node) { |
} |
this.fail(node, 'can only handle function types'); |
} |
- var funType = (targetType && targetType.is$FunctionType()); |
+ var funType = targetType; |
var formals = funType.parameterTypes; |
var arguments = node.get$arguments(); |
- while ((!$notnull_bool(formals.isEmpty())) && (!$notnull_bool(arguments.isEmpty()))) { |
- var argument = (($0 = arguments.get$head()) && $0.is$Node()); |
+ while ((!formals.isEmpty()) && (!arguments.isEmpty())) { |
+ var argument = arguments.get$head(); |
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()); |
+ this.checkAssignable(argument, argumentType, formals.get$head()); |
+ formals = formals.get$tail(); |
+ arguments = arguments.get$tail(); |
} |
- if (!$notnull_bool(formals.isEmpty())) { |
+ if (!formals.isEmpty()) { |
this.compiler.reportWarning(node, 'missing argument'); |
} |
- if (!$notnull_bool(arguments.isEmpty())) { |
- this.compiler.reportWarning((($0 = arguments.get$head()) && $0.is$Node()), 'additional arguments'); |
+ if (!arguments.isEmpty()) { |
+ this.compiler.reportWarning(arguments.get$head(), 'additional arguments'); |
} |
return funType.returnType; |
} |
@@ -11589,10 +11199,9 @@ TypeCheckerVisitor.prototype.visitSend = function(node) { |
} |
} |
TypeCheckerVisitor.prototype.visitSendSet = function(node) { |
- var $0; |
- this.compiler.ensure(node.get$arguments() != null && !$notnull_bool(node.get$arguments().isEmpty())); |
- var targetType = (($0 = this.elements.$index(node).computeType$2(this.compiler, this.types)) && $0.is$Type()); |
- var value = (($0 = node.get$arguments().get$head()) && $0.is$Node()); |
+ this.compiler.ensure(node.get$arguments() != null && !node.get$arguments().isEmpty()); |
+ var targetType = this.elements.$index(node).computeType$2(this.compiler, this.types); |
+ var value = node.get$arguments().get$head(); |
this.checkAssignable(value, this.type(value), targetType); |
return targetType; |
} |
@@ -11609,10 +11218,9 @@ TypeCheckerVisitor.prototype.visitLiteralString = function(node) { |
return this.types.stringType; |
} |
TypeCheckerVisitor.prototype.visitNodeList = function(node) { |
- var $0; |
for (var link = node.nodes; |
- !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link$Node())) { |
- this.type((($0 = link.get$head()) && $0.is$Node())); |
+ !link.isEmpty(); link = link.get$tail()) { |
+ this.type(link.get$head()); |
} |
return null; |
} |
@@ -11624,14 +11232,14 @@ TypeCheckerVisitor.prototype.visitReturn = function(node) { |
var isVoidFunction = (this.expectedReturnType === this.types.voidType); |
if (expression != null) { |
var expressionType = this.type(expression); |
- if (isVoidFunction && !$notnull_bool(this.types.isAssignable(expressionType, this.types.voidType))) { |
+ if (isVoidFunction && !this.types.isAssignable(expressionType, this.types.voidType)) { |
this.reportTypeWarning(expression, const$268/*WarningKind.RETURN_VALUE_IN_VOID*/, const$13/*const []*/); |
} |
else { |
this.checkAssignable(expression, expressionType, this.expectedReturnType); |
} |
} |
- else if (!$notnull_bool(this.types.isAssignable(this.expectedReturnType, this.types.voidType))) { |
+ else if (!this.types.isAssignable(this.expectedReturnType, this.types.voidType)) { |
this.reportTypeWarning(node, const$272/*WarningKind.RETURN_NOTHING*/, [this.expectedReturnType]); |
} |
return null; |
@@ -11648,18 +11256,17 @@ TypeCheckerVisitor.prototype.visitTypeAnnotation = function(node) { |
return type; |
} |
TypeCheckerVisitor.prototype.visitVariableDefinitions = function(node) { |
- var $0; |
var type = this.typeWithDefault(node.type, this.types.dynamicType); |
if ($eq(type, this.types.voidType)) { |
this.reportTypeWarning(node.type, const$275/*WarningKind.VOID_VARIABLE*/, const$13/*const []*/); |
type = this.types.dynamicType; |
} |
for (var link = node.definitions.nodes; |
- !$notnull_bool(link.isEmpty()); link = (($0 = link.get$tail()) && $0.is$Link$Node())) { |
- var initialization = (($0 = link.get$head()) && $0.is$Node()); |
+ !link.isEmpty(); link = link.get$tail()) { |
+ var initialization = link.get$head(); |
this.compiler.ensure((initialization instanceof Identifier) || (initialization instanceof Send)); |
if ((initialization instanceof Send)) { |
- var initializer = this.nonVoidType((($0 = link.get$head()) && $0.is$Node())); |
+ var initializer = this.nonVoidType(link.get$head()); |
this.checkAssignable(node, type, initializer); |
} |
} |
@@ -11673,11 +11280,9 @@ function Universe() { |
// Initializers done |
} |
Universe.prototype.find = function(name) { |
- var $0; |
- return (($0 = this.elements.$index(name)) && $0.is$Element()); |
+ return this.elements.$index(name); |
} |
Universe.prototype.define = function(element) { |
- $assert(this.elements.$index(element.name) == null, "elements[element.name] == null", "universe.dart", 20, 12); |
this.elements.$setindex(element.name, element); |
} |
Universe.prototype.addGeneratedCode = function(element, code) { |
@@ -11702,7 +11307,6 @@ function CodeWriter() { |
this._buf = new StringBufferImpl(""); |
// Initializers done |
} |
-CodeWriter.prototype.is$CodeWriter = function(){return this;}; |
CodeWriter.prototype.get$text = function() { |
return this._buf.toString(); |
} |
@@ -11714,20 +11318,20 @@ CodeWriter.prototype._indent = function() { |
} |
} |
CodeWriter.prototype.comment = function(text) { |
- if ($notnull_bool(this.writeComments)) { |
+ if (this.writeComments) { |
this.writeln(text); |
} |
} |
CodeWriter.prototype.write = function(text) { |
if (text.length == 0) return; |
- if ($notnull_bool(this._pendingIndent)) this._indent(); |
+ if (this._pendingIndent) this._indent(); |
if (text.indexOf('\n', 0) != -1) { |
var lines = text.split('\n'); |
for (var i = 0; |
i < lines.length - 1; i++) { |
- this.writeln($assert_String(lines.$index(i))); |
+ this.writeln(lines.$index(i)); |
} |
- this.write($assert_String(lines.$index(lines.length - 1))); |
+ this.write(lines.$index(lines.length - 1)); |
} |
else { |
this._buf.add(text); |
@@ -11771,7 +11375,7 @@ function CoreJs() { |
// Initializers done |
} |
CoreJs.prototype.useOperator = function(name) { |
- if ($notnull_bool($ne(this._usedOperators.$index(name), null))) return; |
+ if ($ne(this._usedOperators.$index(name), null)) return; |
var code; |
switch (name) { |
case '\$ne': |
@@ -11820,54 +11424,54 @@ CoreJs.prototype.useOperator = function(name) { |
this._usedOperators.$setindex(name, code); |
} |
CoreJs.prototype.generate = function(w) { |
- if ($notnull_bool(this.useVarMethod)) { |
+ if (this.useVarMethod) { |
this.useTypeNameOf = true; |
w.writeln("function $varMethod(name, methods) {\n Object.prototype[name] = function() {\n $patchMethod(this, name, methods);\n return this[name].apply(this, Array.prototype.slice.call(arguments));\n };\n}\nfunction $patchMethod(obj, name, methods) {\n // Get the prototype to patch.\n // Don't overwrite an existing stub, like the one on Object.prototype\n var proto = Object.getPrototypeOf(obj);\n if (!proto || proto.hasOwnProperty(name)) proto = obj;\n var method;\n while (obj && !(method = methods[obj.$typeNameOf()])) {\n obj = Object.getPrototypeOf(obj);\n }\n obj[name] = method || methods['Object'];\n}"); |
} |
- if ($notnull_bool(this.useGenStub)) { |
+ if (this.useGenStub) { |
this.useThrow = true; |
w.writeln("/**\n * Generates a dynamic call stub for a function.\n * Our goal is to create a stub method like this on-the-fly:\n * function($0, $1, capture) { this($0, $1, true, capture); }\n *\n * This stub then replaces the dynamic one on Function, with one that is\n * specialized for that particular function, taking into account its default\n * arguments.\n */\nFunction.prototype.$genStub = function(argsLength, names) {\n // TODO(jmesserly): only emit $genStub if actually needed\n\n // Fast path: if no named arguments and arg count matches\n if (this.length == argsLength && !names) {\n return this;\n }\n\n function $throwArgMismatch() {\n // TODO(jmesserly): better error message\n $throw(new ClosureArgumentMismatchException());\n }\n\n var paramsNamed = this.$optional ? (this.$optional.length / 2) : 0;\n var paramsBare = this.length - paramsNamed;\n var argsNamed = names ? names.length : 0;\n var argsBare = argsLength - argsNamed;\n\n // Check we got the right number of arguments\n if (argsBare < paramsBare || argsLength > this.length ||\n argsNamed > paramsNamed) {\n return $throwArgMismatch;\n }\n\n // First, fill in all of the default values\n var p = new Array(paramsBare);\n if (paramsNamed) {\n p = p.concat(this.$optional.slice(paramsNamed));\n }\n // Fill in positional args\n var a = new Array(argsLength);\n for (var i = 0; i < argsBare; i++) {\n p[i] = a[i] = '$' + i;\n }\n // Then overwrite with supplied values for optional args\n var lastParameterIndex;\n var namesInOrder = true;\n for (var i = 0; i < argsNamed; i++) {\n var name = names[i];\n a[i + argsBare] = name;\n var j = this.$optional.indexOf(name, 0);\n if (j < 0 || j >= paramsNamed) {\n return $throwArgMismatch;\n } else if (lastParameterIndex && lastParameterIndex > j) {\n namesInOrder = false;\n }\n p[j + paramsBare] = name;\n lastParameterIndex = j;\n }\n\n if (this.length == argsLength && namesInOrder) {\n // Fast path #2: named arguments, but they're in order.\n return this;\n }\n\n // Note: using Function instead of 'eval' to get a clean scope.\n // TODO(jmesserly): evaluate the performance of these stubs.\n var f = 'function(' + a.join(',') + '){return $f(' + p.join(',') + ');}';\n return new Function('$f', 'return ' + f + '').call(null, this);\n}"); |
} |
- if ($notnull_bool(this.useStackTraceOf)) { |
+ if (this.useStackTraceOf) { |
w.writeln("function $stackTraceOf(e) {\n // TODO(jmesserly): we shouldn't be relying on the e.stack property.\n // Need to mangle it.\n return e.stack ? e.stack : null;\n}"); |
} |
- if ($notnull_bool(this.useToDartException)) { |
+ if (this.useToDartException) { |
w.writeln("// Translate a JavaScript exception to a Dart exception\n// TODO(jmesserly): cross browser support. This is Chrome specific.\nfunction $toDartException(e) {\n var res = e;\n if (e instanceof TypeError) {\n switch(e.type) {\n case 'property_not_function':\n case 'called_non_callable':\n if (e.arguments[0] == null) {\n res = new NullPointerException();\n } else {\n res = new ObjectNotClosureException();\n }\n break;\n case 'non_object_property_call':\n case 'non_object_property_load':\n res = new NullPointerException();\n break;\n case 'undefined_method':\n if (e.arguments[0] == 'call' || e.arguments[0] == 'apply') {\n res = new ObjectNotClosureException();\n } else {\n // TODO(jmesserly): can this ever happen?\n res = new NoSuchMethodException('', e.arguments[0], []);\n }\n break;\n }\n } else if (e instanceof RangeError) {\n if (e.message.indexOf('call stack') >= 0) {\n res = new StackOverflowException();\n }\n }\n // TODO(jmesserly): setting the stack property is not a long term solution.\n // Also it causes the exception to print as if it were a TypeError or\n // RangeError, instead of using the proper toString.\n res.stack = e.stack;\n return res;\n}"); |
} |
- if ($notnull_bool(this.useNotNullBool)) { |
+ if (this.useNotNullBool) { |
this.useThrow = true; |
w.writeln("function $notnull_bool(test) {\n return (test === true || test === false) ? test : test.is$bool(); // TypeError\n}"); |
} |
- if ($notnull_bool(this.useAssert)) { |
+ if (this.useAssert) { |
this.useThrow = true; |
w.writeln("function $assert(test, text, url, line, column) {\n if (typeof test == 'function') test = test();\n if (!test) $throw(new AssertError(text, url, line, column));\n}"); |
} |
- if ($notnull_bool(this.useThrow)) { |
+ if (this.useThrow) { |
w.writeln("function $throw(e) {\n // If e is not a value, we can use V8's captureStackTrace utility method.\n // TODO(jmesserly): capture the stack trace on other JS engines.\n if (e && (typeof e == 'object') && Error.captureStackTrace) {\n // TODO(jmesserly): this will clobber the e.stack property\n Error.captureStackTrace(e, $throw);\n }\n throw e;\n}"); |
} |
- if ($notnull_bool(this.useMap)) { |
+ if (this.useMap) { |
w.writeln("function $map(items) {\n var ret = new HashMapImplementation();\n for (var i=0; i < items.length;) {\n ret.$setindex(items[i++], items[i++]);\n }\n return ret;\n}"); |
} |
- if ($notnull_bool(this.useToString)) { |
+ if (this.useToString) { |
w.writeln("function $toString(o) {\n if (o == null) return 'null';\n var t = typeof(o);\n if (t == 'object') { return o.toString(); }\n else if (t == 'string') { return o; }\n else if (t == 'bool') { return ''+o; }\n else if (t == 'number') { return ''+o; }\n else return o.toString();\n}"); |
} |
- if ($notnull_bool(this.useTypeNameOf)) { |
+ if (this.useTypeNameOf) { |
w.writeln("Object.prototype.$typeNameOf = function() {\n if ((typeof(window) != 'undefined' && window.constructor.name == 'DOMWindow')\n || typeof(process) != 'undefined') { // fast-path for Chrome and Node\n return this.constructor.name;\n }\n var str = Object.prototype.toString.call(this);\n return str.substring(8, str.length - 1);\n}"); |
} |
- if ($notnull_bool(this.useIndex)) { |
+ if (this.useIndex) { |
w.writeln("Object.prototype.$index = function(i) { return this[i]; }\nArray.prototype.$index = function(i) { return this[i]; }\nString.prototype.$index = function(i) { return this[i]; }"); |
} |
- if ($notnull_bool(this.useSetIndex)) { |
+ if (this.useSetIndex) { |
w.writeln("Object.prototype.$setindex = function(i, value) { return this[i] = value; }\nArray.prototype.$setindex = function(i, value) { return this[i] = value; }"); |
} |
var $list = orderValuesByKeys(this._usedOperators); |
for (var $i = 0;$i < $list.length; $i++) { |
var opImpl = $list.$index($i); |
- w.writeln($assert_String(opImpl)); |
+ w.writeln(opImpl); |
} |
} |
CoreJs.prototype.generate$1 = function($0) { |
- return this.generate(($0 && $0.is$CodeWriter())); |
+ return this.generate($0); |
}; |
// ********** Code for WorldGenerator ************** |
function WorldGenerator(main, writer) { |
@@ -11879,15 +11483,14 @@ function WorldGenerator(main, writer) { |
// Initializers done |
} |
WorldGenerator.prototype.run = function() { |
- var $0; |
var metaGen = new MethodGenerator(this.main, null); |
- var mainCall = this.main.invoke((metaGen && metaGen.is$MethodGenerator()), null, null, Arguments.get$EMPTY(), false); |
+ var mainCall = this.main.invoke(metaGen, null, null, Arguments.get$EMPTY(), false); |
this.main.declaringType.markUsed(); |
world.corelib.types.$index('BadNumberFormatException').markUsed$0(); |
world.get$coreimpl().types.$index('NumImplementation').markUsed$0(); |
world.get$coreimpl().types.$index('StringImplementation').markUsed$0(); |
world.get$coreimpl().types.$index('MatchImplementation').markUsed$0(); |
- this.genMethod((($0 = world.get$coreimpl().types.$index('MatchImplementation').getConstructor$1('')) && $0.is$Member())); |
+ this.genMethod(world.get$coreimpl().types.$index('MatchImplementation').getConstructor$1('')); |
this.writeTypes(world.get$coreimpl()); |
this.writeTypes(world.corelib); |
this.writeTypes(this.main.declaringType.get$library()); |
@@ -11895,23 +11498,21 @@ WorldGenerator.prototype.run = function() { |
this.writer.writeln(('RunEntry(function() {' + mainCall.code + ';}, []);')); |
} |
WorldGenerator.prototype.globalForStaticField = function(field, fieldValue, dependencies) { |
- var $0; |
var fullname = ("" + field.declaringType.get$jsname() + "." + field.get$jsname() + ""); |
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()); |
+ return this.globals.$index(fullname); |
} |
WorldGenerator.prototype.globalForConst = function(exp, dependencies) { |
- var $0; |
var code = exp.canonicalCode; |
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()); |
+ return this.globals.$index(code); |
} |
WorldGenerator.prototype.writeTypes = function(lib) { |
- if ($notnull_bool(lib.isWritten)) return; |
+ if (lib.isWritten) return; |
lib.isWritten = true; |
var $list = lib.imports; |
for (var $i = 0;$i < $list.length; $i++) { |
@@ -11923,7 +11524,7 @@ WorldGenerator.prototype.writeTypes = function(lib) { |
lib.sources.$index(i).orderInLibrary = i; |
} |
this.writer.comment(('// ********** Library ' + lib.name + ' **************')); |
- if ($notnull_bool(lib.get$isCore())) { |
+ if (lib.get$isCore()) { |
this.writer.comment('// ********** Natives dart:core **************'); |
this.corejs.generate(this.writer); |
} |
@@ -11938,19 +11539,19 @@ WorldGenerator.prototype.writeTypes = function(lib) { |
var $list = this._orderValues(lib.types); |
for (var $i = 0;$i < $list.length; $i++) { |
var type = $list.$index($i); |
- if ($notnull_bool(type.get$isUsed()) && $notnull_bool(type.get$isClass())) { |
- this.writeType((type && type.is$lang_Type())); |
- if ($notnull_bool(type.get$isGeneric())) { |
+ if (type.get$isUsed() && type.get$isClass()) { |
+ this.writeType(type); |
+ if (type.get$isGeneric()) { |
var $list0 = this._orderValues(type._concreteTypes); |
for (var $i0 = 0;$i0 < $list0.length; $i0++) { |
var ct = $list0.$index($i0); |
- this.writeType((ct && ct.is$lang_Type())); |
+ this.writeType(ct); |
} |
} |
} |
- if ($notnull_bool(type.get$isFunction()) && type.varStubs != null) { |
+ if (type.get$isFunction() && type.varStubs != null) { |
this.writer.comment(('// ********** Code for ' + type.get$jsname() + ' **************')); |
- this._writeDynamicStubs((type && type.is$lang_Type())); |
+ this._writeDynamicStubs(type); |
} |
if (type.typeCheckCode != null) { |
this.writer.writeln(type.typeCheckCode); |
@@ -11958,46 +11559,45 @@ WorldGenerator.prototype.writeTypes = function(lib) { |
} |
} |
WorldGenerator.prototype.genMethod = function(meth, enclosingMethod) { |
- if (!$notnull_bool(meth.isGenerated) && !$notnull_bool(meth.get$isAbstract()) && $notnull_bool($ne(meth.get$definition(), null))) { |
+ if (!meth.isGenerated && !meth.get$isAbstract() && $ne(meth.get$definition(), null)) { |
new MethodGenerator(meth, enclosingMethod).run(); |
} |
} |
WorldGenerator.prototype._maybeIsTest = function(onType, checkType) { |
- if (!$notnull_bool(checkType.isTested)) return; |
+ if (!checkType.isTested) return; |
var value = 'false'; |
- if ($notnull_bool(onType.isSubtypeOf(checkType))) { |
+ if (onType.isSubtypeOf(checkType)) { |
value = 'function(){return this;}'; |
} |
this.writer.writeln(('' + onType.get$jsname() + '.prototype.is\$' + checkType.get$jsname() + ' = ') + ('' + value + ';')); |
} |
WorldGenerator.prototype.writeType = function(type) { |
- var $0; |
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 = 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())) { |
+ if (type.get$isNativeType() && !type.get$isTop()) { |
var nativeName = type.get$definition().get$nativeType(); |
- if ($notnull_bool($eq(nativeName, ''))) { |
+ if ($eq(nativeName, '')) { |
this.writer.writeln(('function ' + type.get$jsname() + '() {}')); |
} |
else if (type.get$jsname() != nativeName) { |
this.writer.writeln(('' + type.get$jsname() + ' = ' + nativeName + ';')); |
} |
} |
- if ($notnull_bool(type.get$isTop())) { |
+ if (type.get$isTop()) { |
} |
else if (type.get$constructors().get$length() == 0) { |
- if (!$notnull_bool(type.get$isNativeType())) { |
+ if (!type.get$isNativeType()) { |
this.writer.writeln(('function ' + type.get$jsname() + '() {}')); |
} |
} |
else { |
- var standardConstructor = (($0 = type.get$constructors().$index('')) && $0.is$Member()); |
+ var standardConstructor = type.get$constructors().$index(''); |
if (standardConstructor == null || standardConstructor.generator == null) { |
- if (!$notnull_bool(type.get$isNativeType())) { |
+ if (!type.get$isNativeType()) { |
this.writer.writeln(('function ' + type.get$jsname() + '() {}')); |
} |
} |
@@ -12007,18 +11607,18 @@ WorldGenerator.prototype.writeType = function(type) { |
var $list = type.get$constructors().getValues(); |
for (var $i = type.get$constructors().getValues().iterator$0(); $i.hasNext$0(); ) { |
var c = $i.next$0(); |
- if ($notnull_bool($ne(c.generator, null)) && $notnull_bool($ne(c, standardConstructor))) { |
+ if ($ne(c.generator, null) && $ne(c, standardConstructor)) { |
c.generator.writeDefinition$2(this.writer); |
} |
} |
} |
- if (!$notnull_bool(type.get$isTop())) { |
+ if (!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(type.get$isNativeType())) { |
- if (type.get$parent() != null && !$notnull_bool(type.get$parent().get$isObject())) { |
+ else if (!type.get$isNativeType()) { |
+ if (type.get$parent() != null && !type.get$parent().get$isObject()) { |
this._ensureInheritsHelper(); |
this.writer.writeln(('\$inherits(' + type.get$jsname() + ', ' + type.get$parent().get$jsname() + ');')); |
} |
@@ -12031,7 +11631,7 @@ WorldGenerator.prototype.writeType = function(type) { |
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())); |
+ this._maybeIsTest(type, ct); |
} |
} |
if (type.get$interfaces() != null) { |
@@ -12046,7 +11646,7 @@ WorldGenerator.prototype.writeType = function(type) { |
var $list = this._orderValues(interface_.get$genericType()._concreteTypes); |
for (var $i = 0;$i < $list.length; $i++) { |
var ct = $list.$index($i); |
- this._maybeIsTest(type, (ct && ct.is$lang_Type())); |
+ this._maybeIsTest(type, ct); |
} |
} |
var $list = interface_.get$interfaces(); |
@@ -12064,19 +11664,19 @@ WorldGenerator.prototype.writeType = function(type) { |
for (var $i = 0;$i < $list.length; $i++) { |
var member = $list.$index($i); |
if ((member instanceof FieldMember)) { |
- this._writeField((member && member.is$FieldMember())); |
+ this._writeField(member); |
} |
if ((member instanceof PropertyMember)) { |
- this._writeProperty((member && member.is$PropertyMember())); |
+ this._writeProperty(member); |
} |
- if ($notnull_bool(member.get$isMethod())) { |
- this._writeMethod((member && member.is$Member())); |
+ if (member.get$isMethod()) { |
+ this._writeMethod(member); |
} |
} |
this._writeDynamicStubs(type); |
} |
WorldGenerator.prototype._ensureInheritsHelper = function() { |
- if ($notnull_bool(this._inheritsGenerated)) return; |
+ if (this._inheritsGenerated) return; |
this._inheritsGenerated = true; |
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}"); |
} |
@@ -12090,11 +11690,11 @@ WorldGenerator.prototype._writeDynamicStubs = function(type) { |
} |
} |
WorldGenerator.prototype._writeStaticField = function(field) { |
- if ($notnull_bool(field.isFinal)) return; |
+ if (field.isFinal) return; |
var fullname = ("" + field.declaringType.get$jsname() + "." + field.get$jsname() + ""); |
if (this.globals.containsKey(fullname)) { |
var value = this.globals.$index(fullname); |
- if ($notnull_bool(field.declaringType.get$isTop()) && !$notnull_bool(field.isNative)) { |
+ if (field.declaringType.get$isTop() && !field.isNative) { |
this.writer.writeln(('var ' + field.get$jsname() + ' = ' + value.exp.code + ';')); |
} |
else { |
@@ -12103,12 +11703,12 @@ WorldGenerator.prototype._writeStaticField = function(field) { |
} |
} |
WorldGenerator.prototype._writeField = function(field) { |
- if ($notnull_bool(field.declaringType.get$isTop()) && !$notnull_bool(field.isNative) && field.value == null) { |
+ if (field.declaringType.get$isTop() && !field.isNative && field.value == null) { |
this.writer.writeln(('var ' + field.get$jsname() + ';')); |
} |
- if ($notnull_bool(field._providePropertySyntax)) { |
+ if (field._providePropertySyntax) { |
this.writer.writeln(('' + field.declaringType.get$jsname() + '.prototype.get\$' + field.get$jsname() + ' = ') + ('function() { return this.' + field.get$jsname() + '; };')); |
- if (!$notnull_bool(field.isFinal)) { |
+ if (!field.isFinal) { |
this.writer.writeln(('' + field.declaringType.get$jsname() + '.prototype.set\$' + field.get$jsname() + ' = ') + ('function(value) { return this.' + field.get$jsname() + ' = value; };')); |
} |
} |
@@ -12116,7 +11716,7 @@ WorldGenerator.prototype._writeField = function(field) { |
WorldGenerator.prototype._writeProperty = function(property) { |
if (property.getter != null) this._writeMethod(property.getter); |
if (property.setter != null) this._writeMethod(property.setter); |
- if ($notnull_bool(property._provideFieldSyntax)) { |
+ if (property._provideFieldSyntax) { |
this.writer.enterBlock('Object.defineProperty(' + ('' + property.declaringType.get$jsname() + '.prototype, "' + property.get$jsname() + '", {')); |
if (property.getter != null) { |
this.writer.write(('get: ' + property.declaringType.get$jsname() + '.prototype.' + property.getter.get$jsname() + '')); |
@@ -12156,8 +11756,7 @@ WorldGenerator.prototype._writeGlobals = function() { |
} |
} |
WorldGenerator.prototype._orderValues = function(map) { |
- var $0; |
- var values = (($0 = map.getValues()) && $0.is$List()); |
+ var values = map.getValues(); |
values.sort(this.get$_compareMembers()); |
return values; |
} |
@@ -12168,20 +11767,19 @@ WorldGenerator.prototype._compareMembers = function(x, y) { |
} |
if (x.get$span() == null) return 1; |
if (y.get$span() == null) return -1; |
- return $assert_num(x.get$name().compareTo$1(y.get$name())); |
+ return x.get$name().compareTo$1(y.get$name()); |
} |
WorldGenerator.prototype.get$_compareMembers = function() { |
return WorldGenerator.prototype._compareMembers.bind(this); |
} |
WorldGenerator.prototype.useMapFactory = function() { |
- var $0; |
this.corejs.useMap = true; |
var factType = world.get$coreimpl().types.$index('HashMapImplementation'); |
var m = factType.resolveMember$1('\$setindex'); |
- this.genMethod((($0 = m.get$members().$index(0)) && $0.is$Member())); |
+ this.genMethod(m.get$members().$index(0)); |
var c = factType.getConstructor$1(''); |
- this.genMethod((c && c.is$Member())); |
- return (factType && factType.is$lang_Type()); |
+ this.genMethod(c); |
+ return factType; |
} |
// ********** Code for BlockScope ************** |
function BlockScope(enclosingMethod, parent, reentrant) { |
@@ -12190,14 +11788,13 @@ function BlockScope(enclosingMethod, parent, reentrant) { |
this.reentrant = reentrant; |
this._vars = $map([]); |
// Initializers done |
- if ($notnull_bool(this.get$isMethodScope())) { |
+ if (this.get$isMethodScope()) { |
this._closedOver = new HashSetImplementation(); |
} |
else { |
- this.reentrant = $notnull_bool(this.reentrant) || $notnull_bool(this.parent.reentrant); |
+ this.reentrant = this.reentrant || this.parent.reentrant; |
} |
} |
-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() { |
@@ -12205,19 +11802,19 @@ BlockScope.prototype.get$isMethodScope = function() { |
} |
BlockScope.prototype.get$methodScope = function() { |
var s = this; |
- while (!$notnull_bool(s.get$isMethodScope())) s = s.get$parent(); |
- return (s && s.is$BlockScope()); |
+ while (!s.get$isMethodScope()) s = s.get$parent(); |
+ return s; |
} |
BlockScope.prototype.lookup = function(name) { |
var ret = this._vars.$index(name); |
- if ($notnull_bool($ne(ret, null))) return ret; |
+ if ($ne(ret, null)) return ret; |
for (var s = this.parent; |
- $notnull_bool($ne(s, null)); s = s.get$parent()) { |
+ $ne(s, null); s = s.get$parent()) { |
ret = s._vars.$index(name); |
- if ($notnull_bool($ne(ret, null))) { |
+ if ($ne(ret, null)) { |
if ($ne(s.enclosingMethod, this.enclosingMethod)) { |
s.get$methodScope()._closedOver.add(ret.code); |
- if (this.enclosingMethod.captures != null && $notnull_bool(s.reentrant)) { |
+ if (this.enclosingMethod.captures != null && s.reentrant) { |
this.enclosingMethod.captures.add(ret.code); |
} |
} |
@@ -12226,11 +11823,11 @@ BlockScope.prototype.lookup = function(name) { |
} |
} |
BlockScope.prototype._isDefinedInParent = function(name) { |
- if ($notnull_bool(this.get$isMethodScope()) && this._closedOver.contains(name)) return true; |
+ if (this.get$isMethodScope() && this._closedOver.contains(name)) return true; |
for (var s = this.parent; |
- $notnull_bool($ne(s, null)); s = s.get$parent()) { |
+ $ne(s, null); s = s.get$parent()) { |
if (s._vars.containsKey(name)) return true; |
- if ($notnull_bool(s.get$isMethodScope()) && s._closedOver.contains(name)) return true; |
+ if (s.get$isMethodScope() && s._closedOver.contains(name)) return true; |
} |
var type = this.enclosingMethod.method.declaringType; |
if (type.get$library().lookup(name, null) != null) return true; |
@@ -12241,36 +11838,35 @@ BlockScope.prototype.create = function(name, type, span, isParameter) { |
if (this._vars.containsKey(name)) { |
world.error(('duplicate name "' + name + '"'), span); |
} |
- if (!$notnull_bool(isParameter)) { |
+ if (!isParameter) { |
var index = 0; |
- while ($notnull_bool(this._isDefinedInParent($assert_String(jsName)))) { |
+ while (this._isDefinedInParent(jsName)) { |
jsName = ('' + name + '' + index++ + ''); |
} |
} |
var ret = new Value(type, jsName, span, false); |
this._vars.$setindex(name, ret); |
- return (ret && ret.is$Value()); |
+ return ret; |
} |
BlockScope.prototype.declareParameter = function(p) { |
return this.create(p.name, p.type, p.definition.span, true); |
} |
BlockScope.prototype.declare = function(id) { |
var type = this.enclosingMethod.method.resolveType(id.type, false); |
- return this.create(id.name.name, (type && type.is$lang_Type()), id.span, false); |
+ return this.create(id.name.name, type, id.span, false); |
} |
BlockScope.prototype.getRethrow = function() { |
var scope = this; |
- while (scope.rethrow == null && $notnull_bool($ne(scope.get$parent(), null))) { |
+ while (scope.rethrow == null && $ne(scope.get$parent(), null)) { |
scope = scope.get$parent(); |
} |
return scope.rethrow; |
} |
BlockScope.prototype.lookup$1 = function($0) { |
- return this.lookup($assert_String($0)); |
+ return this.lookup($0); |
}; |
// ********** Code for MethodGenerator ************** |
function MethodGenerator(method, enclosingMethod) { |
- var $0; |
this.method = method; |
this.enclosingMethod = enclosingMethod; |
this.writer = new CodeWriter(); |
@@ -12284,14 +11880,12 @@ function MethodGenerator(method, enclosingMethod) { |
this._scope = new BlockScope(this, null, false); |
} |
if (this.enclosingMethod != null && this.method.name != '') { |
- var m = (($0 = this.method) && $0.is$MethodMember()); |
+ var m = this.method; |
this._scope.create(m.name, m.get$functionType(), m.definition.span, false); |
} |
this._usedTemps = new HashSetImplementation(); |
this._freeTemps = []; |
} |
-MethodGenerator.prototype.is$MethodGenerator = function(){return this;}; |
-MethodGenerator.prototype.is$TreeVisitor = function(){return this;}; |
MethodGenerator.prototype.get$library = function() { |
return this.method.get$library(); |
} |
@@ -12305,12 +11899,12 @@ MethodGenerator.prototype.get$isStatic = function() { |
return this.method.get$isStatic(); |
} |
MethodGenerator.prototype.getTemp = function(value) { |
- return $notnull_bool(value.needsTemp) ? this.forceTemp(value) : value; |
+ return value.needsTemp ? this.forceTemp(value) : value; |
} |
MethodGenerator.prototype.forceTemp = function(value) { |
var name; |
if (this._freeTemps.length > 0) { |
- name = $assert_String(this._freeTemps.removeLast()); |
+ name = this._freeTemps.removeLast(); |
} |
else { |
name = '\$' + this._usedTemps.get$length(); |
@@ -12335,11 +11929,11 @@ MethodGenerator.prototype.freeTemp = function(value) { |
} |
} |
MethodGenerator.prototype.run = function() { |
- if ($notnull_bool(this.method.isGenerated)) return; |
+ if (this.method.isGenerated) return; |
this.method.isGenerated = true; |
this.method.generator = this; |
if ((this.method.get$definition().body instanceof NativeStatement)) { |
- if ($notnull_bool(this.method.get$definition().body.body == null)) { |
+ if (this.method.get$definition().body.body == null) { |
this.method.generator = null; |
} |
else { |
@@ -12347,7 +11941,7 @@ MethodGenerator.prototype.run = function() { |
return p.get$name(); |
}) |
); |
- this.writer.write($assert_String(this.method.get$definition().body.body)); |
+ this.writer.write(this.method.get$definition().body.body); |
} |
} |
else { |
@@ -12355,7 +11949,6 @@ MethodGenerator.prototype.run = function() { |
} |
} |
MethodGenerator.prototype.writeDefinition = function(defWriter, lambda) { |
- var $0; |
var paramCode = this._paramCode; |
var names = null; |
if (this.captures != null && this.captures.get$length() > 0) { |
@@ -12364,19 +11957,19 @@ MethodGenerator.prototype.writeDefinition = function(defWriter, lambda) { |
return x.compareTo$1(y); |
}) |
); |
- paramCode = ListFactory.ListFactory$from$factory((names && names.is$Iterable())); |
+ paramCode = ListFactory.ListFactory$from$factory(names); |
paramCode.addAll$1(this._paramCode); |
} |
var _params = ('(' + Strings.join(this._paramCode, ", ") + ')'); |
- var params = ('(' + Strings.join((paramCode && paramCode.is$List$String()), ", ") + ')'); |
- if ($notnull_bool(this.method.declaringType.get$isTop()) && !$notnull_bool(this.get$isClosure())) { |
+ var params = ('(' + Strings.join(paramCode, ", ") + ')'); |
+ if (this.method.declaringType.get$isTop() && !this.get$isClosure()) { |
defWriter.enterBlock(('function ' + this.method.get$jsname() + '' + params + ' {')); |
} |
- else if ($notnull_bool(this.get$isClosure())) { |
+ else if (this.get$isClosure()) { |
if (this.method.name == '') { |
defWriter.enterBlock(('(function ' + params + ' {')); |
} |
- else if ($notnull_bool($ne(names, null))) { |
+ else if ($ne(names, null)) { |
if (lambda == null) { |
defWriter.enterBlock(('var ' + this.method.get$jsname() + ' = (function' + params + ' {')); |
} |
@@ -12388,7 +11981,7 @@ MethodGenerator.prototype.writeDefinition = function(defWriter, lambda) { |
defWriter.enterBlock(('function ' + this.method.get$jsname() + '' + params + ' {')); |
} |
} |
- else if ($notnull_bool(this.method.get$isConstructor())) { |
+ else if (this.method.get$isConstructor()) { |
if (this.method.get$constructorName() == '') { |
defWriter.enterBlock(('function ' + this.method.declaringType.get$jsname() + '' + params + ' {')); |
} |
@@ -12396,20 +11989,19 @@ MethodGenerator.prototype.writeDefinition = function(defWriter, lambda) { |
defWriter.enterBlock(('' + this.method.declaringType.get$jsname() + '.' + this.method.get$constructorName() + '\$ctor = function' + params + ' {')); |
} |
} |
- else if ($notnull_bool(this.method.get$isFactory())) { |
+ else if (this.method.get$isFactory()) { |
defWriter.enterBlock(('' + this.method.get$generatedFactoryName() + ' = function' + _params + ' {')); |
} |
- else if ($notnull_bool(this.method.get$isStatic())) { |
+ else if (this.method.get$isStatic()) { |
defWriter.enterBlock(('' + this.method.declaringType.get$jsname() + '.' + this.method.get$jsname() + ' = function' + _params + ' {')); |
} |
else { |
defWriter.enterBlock(('' + this.method.declaringType.get$jsname() + '.prototype.') + ('' + this.method.get$jsname() + ' = function' + _params + ' {')); |
} |
- if ($notnull_bool(this.needsThis)) { |
+ if (this.needsThis) { |
defWriter.writeln('var \$this = this; // closure support'); |
} |
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) { |
return x.compareTo$1(y); |
@@ -12418,51 +12010,50 @@ MethodGenerator.prototype.writeDefinition = function(defWriter, lambda) { |
defWriter.writeln(('var ' + Strings.join(this._freeTemps, ", ") + ';')); |
} |
defWriter.writeln(this.writer.get$text()); |
- if ($notnull_bool($ne(names, null))) { |
- defWriter.exitBlock(('}).bind(null, ' + Strings.join((names && names.is$List$String()), ", ") + ')')); |
+ if ($ne(names, null)) { |
+ defWriter.exitBlock(('}).bind(null, ' + Strings.join(names, ", ") + ')')); |
} |
- else if ($notnull_bool(this.get$isClosure()) && this.method.name == '') { |
+ else if (this.get$isClosure() && this.method.name == '') { |
defWriter.exitBlock('})'); |
} |
else { |
defWriter.exitBlock('}'); |
} |
- if ($notnull_bool(this.method.get$isConstructor()) && this.method.get$constructorName() != '') { |
+ if (this.method.get$isConstructor() && this.method.get$constructorName() != '') { |
defWriter.writeln(('' + this.method.declaringType.get$jsname() + '.' + this.method.get$constructorName() + '\$ctor.prototype = ') + ('' + this.method.declaringType.get$jsname() + '.prototype;')); |
} |
this._provideOptionalParamInfo(defWriter); |
if ((this.method instanceof MethodMember)) { |
- var m = (($0 = this.method) && $0.is$MethodMember()); |
- if ($notnull_bool(m._providePropertySyntax)) { |
+ var m = this.method; |
+ if (m._providePropertySyntax) { |
defWriter.enterBlock(('' + m.declaringType.get$jsname() + '.prototype') + ('.get\$' + m.get$jsname() + ' = function() {')); |
defWriter.writeln(('return ' + m.declaringType.get$jsname() + '.prototype.') + ('' + m.get$jsname() + '.bind(this);')); |
defWriter.exitBlock('}'); |
- if ($notnull_bool(m._provideFieldSyntax)) { |
+ if (m._provideFieldSyntax) { |
world.internalError('bound m accessed with field syntax'); |
} |
} |
} |
} |
MethodGenerator.prototype._provideOptionalParamInfo = function(defWriter) { |
- var $0; |
if ((this.method instanceof MethodMember)) { |
- var meth = (($0 = this.method) && $0.is$MethodMember()); |
- if ($notnull_bool(meth._provideOptionalParamInfo)) { |
+ var meth = this.method; |
+ if (meth._provideOptionalParamInfo) { |
var optNames = []; |
var optValues = []; |
meth.genParameterValues(); |
var $list = meth.parameters; |
for (var $i = 0;$i < $list.length; $i++) { |
var param = $list.$index($i); |
- if ($notnull_bool(param.get$isOptional())) { |
+ if (param.get$isOptional()) { |
optNames.add$1(param.get$name()); |
- optValues.add$1(MethodGenerator._escapeString($assert_String(param.get$value().code))); |
+ optValues.add$1(MethodGenerator._escapeString(param.get$value().code)); |
} |
} |
if (optNames.length > 0) { |
var start = ''; |
- if ($notnull_bool(meth.isStatic)) { |
- if (!$notnull_bool(meth.declaringType.get$isTop())) { |
+ if (meth.isStatic) { |
+ if (!meth.declaringType.get$isTop()) { |
start = meth.declaringType.get$jsname() + '.'; |
} |
} |
@@ -12470,7 +12061,7 @@ MethodGenerator.prototype._provideOptionalParamInfo = function(defWriter) { |
start = meth.declaringType.get$jsname() + '.prototype.'; |
} |
optNames.addAll$1(optValues); |
- var optional = "['" + Strings.join((optNames && optNames.is$List$String()), "', '") + "']"; |
+ var optional = "['" + Strings.join(optNames, "', '") + "']"; |
defWriter.writeln(('' + start + '' + meth.get$jsname() + '.\$optional = ' + optional + '')); |
} |
} |
@@ -12479,15 +12070,15 @@ MethodGenerator.prototype._provideOptionalParamInfo = function(defWriter) { |
MethodGenerator.prototype.writeBody = function() { |
var initializers = null; |
var initializedFields = null; |
- if ($notnull_bool(this.method.get$isConstructor())) { |
+ if (this.method.get$isConstructor()) { |
initializers = []; |
initializedFields = new HashSetImplementation(); |
var $list = world.gen._orderValues(this.method.declaringType.getAllMembers()); |
for (var $i = 0;$i < $list.length; $i++) { |
var f = $list.$index($i); |
- if ((f instanceof FieldMember) && !$notnull_bool(f.get$isStatic())) { |
+ if ((f instanceof FieldMember) && !f.get$isStatic()) { |
var cv = f.computeValue$0(); |
- if ($notnull_bool($ne(cv, null))) { |
+ if ($ne(cv, null)) { |
initializers.add$1(('this.' + f.get$jsname() + ' = ' + cv.code + '')); |
initializedFields.add$1(f.get$name()); |
} |
@@ -12498,12 +12089,12 @@ MethodGenerator.prototype.writeBody = function() { |
var $list = this.method.get$parameters(); |
for (var $i = 0;$i < $list.length; $i++) { |
var p = $list.$index($i); |
- if ($notnull_bool($ne(initializers, null)) && $notnull_bool(p.isInitializer)) { |
- var field = this.method.declaringType.getMember($assert_String(p.get$name())); |
- if ($notnull_bool(field == null)) { |
+ if ($ne(initializers, null) && p.isInitializer) { |
+ var field = this.method.declaringType.getMember(p.get$name()); |
+ if (field == null) { |
world.error('bad this parameter - no matching field', p.get$definition().get$span()); |
} |
- if (!$notnull_bool(field.get$isField())) { |
+ if (!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); |
@@ -12512,18 +12103,18 @@ MethodGenerator.prototype.writeBody = function() { |
initializedFields.add$1(p.get$name()); |
} |
else { |
- var paramValue = this._scope.declareParameter((p && p.is$Parameter())); |
+ var paramValue = this._scope.declareParameter(p); |
this._paramCode.add(paramValue.code); |
} |
} |
var body = this.method.get$definition().body; |
- if ($notnull_bool(body == null) && !$notnull_bool(this.method.get$isConstructor())) { |
+ if (body == null && !this.method.get$isConstructor()) { |
world.error(('unexpected empty body for ' + this.method.name + ''), this.method.get$definition().get$span()); |
} |
- if ($notnull_bool($ne(initializers, null))) { |
+ if ($ne(initializers, null)) { |
for (var $i = initializers.iterator$0(); $i.hasNext$0(); ) { |
var i = $i.next$0(); |
- this.writer.writeln($assert_String(i)); |
+ this.writer.writeln(i); |
} |
var declaredInitializers = this.method.get$definition().initializers; |
if (declaredInitializers != null) { |
@@ -12531,7 +12122,7 @@ MethodGenerator.prototype.writeBody = function() { |
for (var $i = 0;$i < declaredInitializers.length; $i++) { |
var init = declaredInitializers.$index($i); |
if ((init instanceof CallExpression)) { |
- if ($notnull_bool($ne(initializerCall, null))) { |
+ if ($ne(initializerCall, null)) { |
world.error('only one initializer redirecting call is allowed', init.get$span()); |
} |
initializerCall = init; |
@@ -12542,12 +12133,12 @@ MethodGenerator.prototype.writeBody = function() { |
world.error('invalid left side of initializer', left.get$span()); |
continue; |
} |
- var f = this.method.declaringType.getMember($assert_String(left.get$name().get$name())); |
- if ($notnull_bool(f == null)) { |
+ var f = this.method.declaringType.getMember(left.get$name().get$name()); |
+ if (f == null) { |
world.error('bad initializer - no matching field', left.get$span()); |
continue; |
} |
- else if (!$notnull_bool(f.get$isField())) { |
+ else if (!f.get$isField()) { |
world.error(('"' + left.get$name().get$name() + '" does not refer to a field'), left.get$span()); |
continue; |
} |
@@ -12558,21 +12149,21 @@ MethodGenerator.prototype.writeBody = function() { |
world.error('invalid initializer', init.get$span()); |
} |
} |
- if ($notnull_bool($ne(initializerCall, null))) { |
- var target = this._writeInitializerCall((initializerCall && initializerCall.is$CallExpression())); |
- if (!$notnull_bool(target.isSuper)) { |
+ if ($ne(initializerCall, null)) { |
+ var target = this._writeInitializerCall(initializerCall); |
+ if (!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); |
- if ($notnull_bool(p.isInitializer)) { |
+ if (p.isInitializer) { |
world.error('no initialization allowed on redirecting constructors', p.get$definition().get$span()); |
break; |
} |
} |
} |
if (declaredInitializers.length > 1) { |
- var init = $notnull_bool($eq(declaredInitializers.$index(0), initializerCall)) ? declaredInitializers.$index(1) : declaredInitializers.$index(0); |
+ var init = $eq(declaredInitializers.$index(0), initializerCall) ? declaredInitializers.$index(1) : declaredInitializers.$index(0); |
world.error('no initialization allowed on redirecting constructors', init.get$span()); |
} |
initializedFields = null; |
@@ -12583,32 +12174,32 @@ MethodGenerator.prototype.writeBody = function() { |
} |
this.writer.comment('// Initializers done'); |
} |
- if ($notnull_bool($ne(initializedFields, null))) { |
+ if ($ne(initializedFields, null)) { |
var $list = this.method.declaringType.get$members().getKeys(); |
for (var $i = this.method.declaringType.get$members().getKeys().iterator$0(); $i.hasNext$0(); ) { |
var name = $i.next$0(); |
var member = this.method.declaringType.get$members().$index(name); |
- if ((member instanceof FieldMember) && $notnull_bool(member.isFinal) && !$notnull_bool(member.get$isStatic()) && !$notnull_bool(initializedFields.contains$1(name))) { |
+ if ((member instanceof FieldMember) && member.isFinal && !member.get$isStatic() && !initializedFields.contains$1(name)) { |
world.error(('Field "' + name + '" is final and was not initialized'), this.method.get$definition().get$span()); |
} |
} |
} |
- this.visitStatementsInBlock((body && body.is$lang_Statement())); |
+ this.visitStatementsInBlock(body); |
} |
MethodGenerator.prototype._writeInitializerCall = function(node) { |
var contructorName = ''; |
var targetExp = node.target; |
if ((targetExp instanceof DotExpression)) { |
- var dot = (targetExp && targetExp.is$DotExpression()); |
+ var dot = targetExp; |
targetExp = dot.self; |
contructorName = dot.name.name; |
} |
var target = null; |
if ((targetExp instanceof SuperExpression)) { |
- target = this._makeSuperValue((targetExp && targetExp.is$lang_Node())); |
+ target = this._makeSuperValue(targetExp); |
} |
else if ((targetExp instanceof ThisExpression)) { |
- target = this._makeThisValue((targetExp && targetExp.is$lang_Node())); |
+ target = this._makeThisValue(targetExp); |
} |
else { |
world.error('bad call in initializers', node.span); |
@@ -12616,22 +12207,21 @@ MethodGenerator.prototype._writeInitializerCall = function(node) { |
var m = target.type.getConstructor$1(contructorName); |
this.method.set$initDelegate(m); |
var other = m; |
- while ($notnull_bool($ne(other, null))) { |
- if ($notnull_bool($eq(other, this.method))) { |
+ while ($ne(other, null)) { |
+ if ($eq(other, this.method)) { |
world.error('initialization cycle', node.span); |
break; |
} |
other = other.get$initDelegate(); |
} |
- world.gen.genMethod((m && m.is$Member())); |
+ world.gen.genMethod(m); |
var value = m.invoke$4(this, node, target, this._makeArgs(node.arguments)); |
- if ($notnull_bool($ne(target.type, world.objectType))) { |
+ if ($ne(target.type, world.objectType)) { |
this.writer.writeln(('' + value.code + ';')); |
} |
- return (target && target.is$Value()); |
+ return target; |
} |
MethodGenerator.prototype._makeArgs = function(arguments) { |
- var $0; |
var args = []; |
var seenLabel = false; |
for (var $i = 0;$i < arguments.length; $i++) { |
@@ -12639,10 +12229,10 @@ MethodGenerator.prototype._makeArgs = function(arguments) { |
if (arg.label != null) { |
seenLabel = true; |
} |
- else if ($notnull_bool(seenLabel)) { |
+ else if (seenLabel) { |
world.error('bare argument can not follow named arguments', arg.get$span()); |
} |
- args.add$1(this.visitValue((($0 = arg.get$value()) && $0.is$lang_Expression()))); |
+ args.add$1(this.visitValue(arg.get$value())); |
} |
return new Arguments(arguments, args); |
} |
@@ -12651,7 +12241,7 @@ MethodGenerator._escapeString = function(text) { |
} |
MethodGenerator.prototype.visitStatementsInBlock = function(body) { |
if ((body instanceof BlockStatement)) { |
- var block = (body && body.is$BlockStatement()); |
+ var block = body; |
var $list = block.body; |
for (var $i = 0;$i < $list.length; $i++) { |
var stmt = $list.$index($i); |
@@ -12673,8 +12263,8 @@ MethodGenerator.prototype._makeLambdaMethod = function(name, func) { |
var meth = new MethodMember(name, this.method.declaringType, func); |
meth.isLambda = true; |
meth.resolve$1(this.method.declaringType); |
- world.gen.genMethod((meth && meth.is$Member()), this); |
- return (meth && meth.is$MethodMember()); |
+ world.gen.genMethod(meth, this); |
+ return meth; |
} |
MethodGenerator.prototype.visitBool = function(node) { |
return this.visitValue(node).convertTo$3(this, world.nonNullBool, node); |
@@ -12690,7 +12280,7 @@ MethodGenerator.prototype.visitTypedValue = function(node, expectedType) { |
} |
MethodGenerator.prototype.visitVoid = function(node) { |
if ((node instanceof PostfixExpression)) { |
- var value = this.visitPostfixExpression((node && node.is$PostfixExpression()), true); |
+ var value = this.visitPostfixExpression(node, true); |
value.checkFirstClass$1(node.span); |
return value; |
} |
@@ -12702,9 +12292,8 @@ MethodGenerator.prototype.visitDietStatement = function(node) { |
return false; |
} |
MethodGenerator.prototype.visitVariableDefinition = function(node) { |
- var $0; |
var isFinal = false; |
- if (node.modifiers != null && $notnull_bool($eq(node.modifiers.$index(0).kind, 97/*TokenKind.FINAL*/))) { |
+ if (node.modifiers != null && $eq(node.modifiers.$index(0).kind, 97/*TokenKind.FINAL*/)) { |
isFinal = true; |
} |
this.writer.write('var '); |
@@ -12716,17 +12305,17 @@ MethodGenerator.prototype.visitVariableDefinition = function(node) { |
this.writer.write(', '); |
} |
var name = node.names.$index(i).get$name(); |
- var value = this.visitValue((($0 = node.values.$index(i)) && $0.is$lang_Expression())); |
- if ($notnull_bool(isFinal)) { |
- if ($notnull_bool(value == null)) { |
+ var value = this.visitValue(node.values.$index(i)); |
+ if (isFinal) { |
+ if (value == null) { |
world.error('no value specified for final variable', node.span); |
} |
else { |
- if ($notnull_bool(thisType.get$isVar())) thisType = value.type; |
+ if (thisType.get$isVar()) thisType = value.type; |
} |
} |
- var val = this._scope.create($assert_String(name), (thisType && thisType.is$lang_Type()), node.names.$index(i).get$span(), false); |
- if ($notnull_bool(value == null)) { |
+ var val = this._scope.create(name, thisType, node.names.$index(i).get$span(), false); |
+ if (value == null) { |
this.writer.write(('' + val.code + '')); |
} |
else { |
@@ -12738,10 +12327,9 @@ MethodGenerator.prototype.visitVariableDefinition = function(node) { |
return false; |
} |
MethodGenerator.prototype.visitFunctionDefinition = function(node) { |
- var $0; |
var name = world.toJsIdentifier(node.name.name); |
- var meth = this._makeLambdaMethod($assert_String(name), node); |
- var funcValue = this._scope.create($assert_String(name), (($0 = meth.get$functionType()) && $0.is$lang_Type()), this.method.get$definition().get$span(), false); |
+ var meth = this._makeLambdaMethod(name, node); |
+ var funcValue = this._scope.create(name, meth.get$functionType(), this.method.get$definition().get$span(), false); |
meth.generator.writeDefinition$2(this.writer); |
return false; |
} |
@@ -12750,7 +12338,7 @@ MethodGenerator.prototype.visitReturnStatement = function(node) { |
this.writer.writeln('return;'); |
} |
else { |
- if ($notnull_bool(this.method.get$isConstructor())) { |
+ if (this.method.get$isConstructor()) { |
world.error('return of value not allowed from constructor', node.span); |
} |
var value = this.visitTypedValue(node.value, this.method.get$returnType()); |
@@ -12767,7 +12355,7 @@ MethodGenerator.prototype.visitThrowStatement = function(node) { |
} |
else { |
var rethrow = this._scope.getRethrow(); |
- if ($notnull_bool(rethrow == null)) { |
+ if (rethrow == null) { |
world.error('rethrow outside of catch', node.span); |
} |
else { |
@@ -12777,15 +12365,14 @@ MethodGenerator.prototype.visitThrowStatement = function(node) { |
return true; |
} |
MethodGenerator.prototype.visitAssertStatement = function(node) { |
- var $0; |
var test = this.visitValue(node.test); |
- if ($notnull_bool(options.enableAsserts)) { |
+ if (options.enableAsserts) { |
var err = world.corelib.types.$index('AssertError'); |
- world.gen.genMethod((($0 = err.getConstructor$1('')) && $0.is$Member())); |
- world.gen.genMethod((($0 = err.get$members().$index('toString')) && $0.is$Member())); |
+ world.gen.genMethod(err.getConstructor$1('')); |
+ world.gen.genMethod(err.get$members().$index('toString')); |
var span = node.test.span; |
var line = span.file.getLine(span.start); |
- var column = span.file.getColumn($assert_num(line), span.start); |
+ var column = span.file.getColumn(line, span.start); |
this.writer.writeln(('\$assert(' + test.code + ', "' + MethodGenerator._escapeString(span.get$text()) + '",') + (' "' + basename(span.file.filename) + '", ' + (line + 1) + ', ' + (column + 1) + ');')); |
world.gen.corejs.useAssert = true; |
} |
@@ -12815,7 +12402,7 @@ MethodGenerator.prototype.visitIfStatement = function(node) { |
var exit1 = node.trueBranch.visit(this); |
if (node.falseBranch != null) { |
this.writer.write('else '); |
- if ($notnull_bool(node.falseBranch.visit(this)) && $notnull_bool(exit1)) { |
+ if (node.falseBranch.visit(this) && exit1) { |
return true; |
} |
} |
@@ -12854,9 +12441,9 @@ MethodGenerator.prototype.visitForStatement = function(node) { |
var $list = node.step; |
for (var $i = 0;$i < $list.length; $i++) { |
var s = $list.$index($i); |
- if ($notnull_bool(needsComma)) this.writer.write(', '); |
- var sv = this.visitVoid((s && s.is$lang_Expression())); |
- this.writer.write($assert_String(sv.code)); |
+ if (needsComma) this.writer.write(', '); |
+ var sv = this.visitVoid(s); |
+ this.writer.write(sv.code); |
needsComma = true; |
} |
this.writer.write(') '); |
@@ -12867,18 +12454,17 @@ MethodGenerator.prototype.visitForStatement = function(node) { |
return false; |
} |
MethodGenerator.prototype.visitForInStatement = function(node) { |
- var $0; |
var itemType = this.method.resolveType(node.item.type, false); |
var itemName = node.item.name.name; |
var list = node.list.visit(this); |
this._pushBlock(true); |
- var item = this._scope.create($assert_String(itemName), (itemType && itemType.is$lang_Type()), node.item.name.span, false); |
- var listVar = (list && list.is$Value()); |
- if ($notnull_bool(list.needsTemp)) { |
- listVar = this._scope.create('\$list', (($0 = list.type) && $0.is$lang_Type()), null, false); |
+ var item = this._scope.create(itemName, itemType, node.item.name.span, false); |
+ var listVar = list; |
+ if (list.needsTemp) { |
+ listVar = this._scope.create('\$list', list.type, null, false); |
this.writer.writeln(('var ' + listVar.code + ' = ' + list.code + ';')); |
} |
- if ($notnull_bool(list.type.get$isList())) { |
+ if (list.type.get$isList()) { |
var tmpi = this._scope.create('\$i', world.numType, null, false); |
this.writer.enterBlock(('for (var ' + tmpi.code + ' = 0;') + ('' + tmpi.code + ' < ' + listVar.code + '.length; ' + tmpi.code + '++) {')); |
var value = listVar.invoke(this, '\$index', node.list, new Arguments(null, [tmpi]), false); |
@@ -12887,7 +12473,7 @@ MethodGenerator.prototype.visitForInStatement = function(node) { |
else { |
this._pushBlock(false); |
var iterator = list.invoke$4(this, 'iterator', node.list, Arguments.get$EMPTY()); |
- var tmpi = this._scope.create('\$i', (($0 = iterator.type) && $0.is$lang_Type()), null, false); |
+ var tmpi = this._scope.create('\$i', iterator.type, null, false); |
var hasNext = tmpi.invoke$4(this, 'hasNext', node.list, Arguments.get$EMPTY()); |
var next = tmpi.invoke$4(this, 'next', node.list, Arguments.get$EMPTY()); |
this.writer.enterBlock(('for (var ' + tmpi.code + ' = ' + iterator.code + '; ' + hasNext.code + '; ) {')); |
@@ -12912,7 +12498,6 @@ MethodGenerator.prototype._genToDartException = function(ex, node) { |
world.gen.corejs.useToDartException = true; |
} |
MethodGenerator.prototype.visitTryStatement = function(node) { |
- var $0; |
this.writer.enterBlock('try {'); |
this._pushBlock(false); |
this.visitStatementsInBlock(node.body); |
@@ -12920,26 +12505,26 @@ MethodGenerator.prototype.visitTryStatement = function(node) { |
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()); |
+ var ex = this._scope.declare(catch_.get$exception()); |
+ this._scope.rethrow = ex; |
this.writer.nextBlock(('} catch (' + ex.code + ') {')); |
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($assert_String(ex.code), node); |
- if (!$notnull_bool(ex.type.get$isVar())) { |
+ this._genToDartException(ex.code, node); |
+ if (!ex.type.get$isVar()) { |
var test = ex.instanceOf$3$isTrue$forceCheck(this, ex.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.visitStatementsInBlock(node.catches.$index(0).body); |
this._popBlock(); |
} |
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._scope.rethrow = ex; |
this.writer.nextBlock(('} catch (' + ex.code + ') {')); |
var trace = null; |
if (node.catches.some((function (c) { |
@@ -12950,14 +12535,14 @@ MethodGenerator.prototype.visitTryStatement = function(node) { |
this.writer.writeln(('var ' + trace.code + ' = \$stackTraceOf(' + ex.code + ');')); |
world.gen.corejs.useStackTraceOf = true; |
} |
- this._genToDartException($assert_String(ex.code), node); |
+ this._genToDartException(ex.code, node); |
var needsRethrow = true; |
for (var i = 0; |
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(tmp.type.get$isVar())) { |
+ var tmp = this._scope.declare(catch_.get$exception()); |
+ if (!tmp.type.get$isVar()) { |
var test = ex.instanceOf$3$isTrue$forceCheck(this, tmp.type, catch_.get$exception().get$span(), true, true); |
if (i == 0) { |
this.writer.enterBlock(('if (' + test.code + ') {')); |
@@ -12974,11 +12559,11 @@ MethodGenerator.prototype.visitTryStatement = function(node) { |
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.visitStatementsInBlock(catch_.body); |
this._popBlock(); |
- if ($notnull_bool(tmp.type.get$isVar())) { |
+ if (tmp.type.get$isVar()) { |
if (i + 1 < node.catches.length) { |
- world.warning('Unreachable catch clause', (($0 = node.catches.$index(i + 1)) && $0.is$SourceSpan())); |
+ world.warning('Unreachable catch clause', node.catches.$index(i + 1)); |
} |
if (i > 0) { |
this.writer.exitBlock('}'); |
@@ -12987,7 +12572,7 @@ MethodGenerator.prototype.visitTryStatement = function(node) { |
break; |
} |
} |
- if ($notnull_bool(needsRethrow)) { |
+ if (needsRethrow) { |
this.writer.nextBlock('} else {'); |
this.writer.writeln(('throw ' + ex.code + ';')); |
this.writer.exitBlock('}'); |
@@ -13016,20 +12601,20 @@ MethodGenerator.prototype.visitSwitchStatement = function(node) { |
for (var i = 0; |
i < case_.cases.length; i++) { |
var expr = case_.cases.$index(i); |
- if ($notnull_bool(expr == null)) { |
+ if (expr == null) { |
if (i < case_.cases.length - 1) { |
world.error('default clause must be the last case', case_.get$span()); |
} |
this.writer.writeln('default:'); |
} |
else { |
- var value = this.visitValue((expr && expr.is$lang_Expression())); |
+ var value = this.visitValue(expr); |
this.writer.writeln(('case ' + value.code + ':')); |
} |
} |
this.writer.enterBlock(''); |
var caseExits = this._visitAllStatements(case_.statements, false); |
- if ($notnull_bool($ne(case_, node.cases.$index(node.cases.length - 1))) && !$notnull_bool(caseExits)) { |
+ if ($ne(case_, node.cases.$index(node.cases.length - 1)) && !caseExits) { |
var span = case_.statements.$index(case_.statements.length - 1).get$span(); |
this.writer.writeln('\$throw(new FallThroughError());'); |
world.gen.corejs.useThrow = true; |
@@ -13045,11 +12630,11 @@ MethodGenerator.prototype._visitAllStatements = function(statementList, exits) { |
i < statementList.length; i++) { |
var stmt = statementList.$index(i); |
exits = stmt.visit$1(this); |
- if ($notnull_bool($ne(stmt, statementList.$index(statementList.length - 1))) && $notnull_bool(exits)) { |
+ if ($ne(stmt, statementList.$index(statementList.length - 1)) && exits) { |
world.warning('unreachable code', statementList.$index(i + 1).get$span()); |
} |
} |
- return $assert_bool(exits); |
+ return exits; |
} |
MethodGenerator.prototype.visitBlockStatement = function(node) { |
this._pushBlock(false); |
@@ -13057,7 +12642,7 @@ MethodGenerator.prototype.visitBlockStatement = function(node) { |
var exits = this._visitAllStatements(node.body, false); |
this.writer.exitBlock('}'); |
this._popBlock(); |
- return $assert_bool(exits); |
+ return exits; |
} |
MethodGenerator.prototype.visitLabeledStatement = function(node) { |
this.writer.writeln(('' + node.name.name + ':')); |
@@ -13077,14 +12662,14 @@ MethodGenerator.prototype.visitEmptyStatement = function(node) { |
return false; |
} |
MethodGenerator.prototype._checkNonStatic = function(node) { |
- if ($notnull_bool(this.get$isStatic())) { |
+ if (this.get$isStatic()) { |
world.warning('not allowed in static method', node.span); |
} |
} |
MethodGenerator.prototype._makeSuperValue = function(node) { |
var parentType = this.method.declaringType.get$parent(); |
this._checkNonStatic(node); |
- if ($notnull_bool(parentType == null)) { |
+ if (parentType == null) { |
world.error('no super class', node.span); |
} |
var ret = new Value(parentType, 'this', node.span, false); |
@@ -13124,27 +12709,26 @@ MethodGenerator.prototype.visitLambdaExpression = function(node) { |
if (node.func.name != null) { |
name = world.toJsIdentifier(node.func.name.name); |
} |
- var meth = this._makeLambdaMethod($assert_String(name), node.func); |
+ var meth = this._makeLambdaMethod(name, node.func); |
var w = new CodeWriter(); |
meth.generator.writeDefinition$2(w, node); |
return new Value(meth.get$functionType(), w.get$text(), node.span, true); |
} |
MethodGenerator.prototype.visitCallExpression = function(node) { |
- var $0; |
var target; |
var position = node.target; |
var name = '\$call'; |
if ((node.target instanceof DotExpression)) { |
- var dot = (($0 = node.target) && $0.is$DotExpression()); |
+ var dot = node.target; |
target = dot.self.visit(this); |
name = dot.name.name; |
position = dot.name; |
} |
else if ((node.target instanceof VarExpression)) { |
- var varExpr = (($0 = node.target) && $0.is$VarExpression()); |
+ var varExpr = node.target; |
name = varExpr.name.name; |
- target = this._scope.lookup($assert_String(name)); |
- if ($notnull_bool($ne(target, null))) { |
+ target = this._scope.lookup(name); |
+ if ($ne(target, null)) { |
return target.invoke$4(this, '\$call', node, this._makeArgs(node.arguments)); |
} |
target = this._makeThisOrType(varExpr.span); |
@@ -13166,8 +12750,8 @@ MethodGenerator.prototype.visitBinaryExpression = function(node) { |
var x = this.visitTypedValue(node.x, world.nonNullBool); |
var y = this.visitTypedValue(node.y, world.nonNullBool); |
var code = ('' + x.code + ' ' + node.op + ' ' + y.code + ''); |
- if ($notnull_bool(x.get$isConst()) && $notnull_bool(y.get$isConst())) { |
- var value = (kind == 35/*TokenKind.AND*/) ? $notnull_bool(x.get$actualValue()) && $notnull_bool(y.get$actualValue()) : $notnull_bool(x.get$actualValue()) || $notnull_bool(y.get$actualValue()); |
+ if (x.get$isConst() && y.get$isConst()) { |
+ var value = (kind == 35/*TokenKind.AND*/) ? x.get$actualValue() && y.get$actualValue() : x.get$actualValue() || y.get$actualValue(); |
return EvaluatedValue.EvaluatedValue$factory(world.nonNullBool, value, ('' + value + ''), node.span); |
} |
return new Value(world.nonNullBool, code, node.span, true); |
@@ -13175,11 +12759,11 @@ MethodGenerator.prototype.visitBinaryExpression = function(node) { |
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()) && $notnull_bool(y.get$isConst())) { |
+ if (x.get$isConst() && y.get$isConst()) { |
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($eq(x.code, 'null')) || $notnull_bool($eq(y.code, 'null'))) { |
+ if ($eq(x.code, 'null') || $eq(y.code, 'null')) { |
var op = node.op.toString().substring(0, 2); |
return new Value(world.nonNullBool, ('' + x.code + ' ' + op + ' ' + y.code + ''), node.span, true); |
} |
@@ -13195,7 +12779,7 @@ MethodGenerator.prototype.visitBinaryExpression = function(node) { |
if (node.op.kind == 49/*TokenKind.NE*/) { |
name = '\$ne'; |
} |
- if ($notnull_bool(name == null)) { |
+ if (name == null) { |
world.internalError(('unimplemented binary op ' + node.op + ''), node.span); |
return; |
} |
@@ -13213,13 +12797,13 @@ MethodGenerator.prototype._visitAssign = function(kind, xn, yn, position, captur |
; |
} |
if ((xn instanceof VarExpression)) { |
- return this._visitVarAssign(kind, (xn && xn.is$VarExpression()), yn, position, captureOriginal); |
+ return this._visitVarAssign(kind, xn, yn, position, captureOriginal); |
} |
else if ((xn instanceof IndexExpression)) { |
- return this._visitIndexAssign(kind, (xn && xn.is$IndexExpression()), yn, position, captureOriginal); |
+ return this._visitIndexAssign(kind, xn, yn, position, captureOriginal); |
} |
else if ((xn instanceof DotExpression)) { |
- return this._visitDotAssign(kind, (xn && xn.is$DotExpression()), yn, position, captureOriginal); |
+ return this._visitDotAssign(kind, xn, yn, position, captureOriginal); |
} |
else { |
world.error('illegal lhs', position.span); |
@@ -13229,16 +12813,16 @@ MethodGenerator.prototype._visitVarAssign = function(kind, xn, yn, position, cap |
var name = xn.name.name; |
var x = this._scope.lookup(name); |
var y = this.visitValue(yn); |
- if ($notnull_bool(x == null)) { |
+ if (x == null) { |
var members = this.method.declaringType.resolveMember(name); |
- if ($notnull_bool($ne(members, null))) { |
+ if ($ne(members, null)) { |
x = this._makeThisOrType(position.span); |
if (kind == 0) { |
return x.set_$4(this, name, position, y); |
} |
- else if (!$notnull_bool(members.get$treatAsField()) || $notnull_bool(members.get$containsMethods())) { |
+ else if (!members.get$treatAsField() || members.get$containsMethods()) { |
var right = x.get_$3(this, name, position); |
- right = captureOriginal((right && right.is$Value())); |
+ right = captureOriginal(right); |
y = right.invoke$4(this, TokenKind.binaryMethodName(kind), position, new Arguments(null, [y])); |
return x.set_$4(this, name, position, y); |
} |
@@ -13253,10 +12837,10 @@ MethodGenerator.prototype._visitVarAssign = function(kind, xn, yn, position, cap |
return this._makeMissingValue(name); |
} |
members = new MemberSet(member, false); |
- if (!$notnull_bool(members.get$treatAsField()) || $notnull_bool(members.get$containsMethods())) { |
+ if (!members.get$treatAsField() || members.get$containsMethods()) { |
if (kind != 0) { |
var right = members._get$3(this, position, x); |
- right = captureOriginal((right && right.is$Value())); |
+ right = captureOriginal(right); |
y = right.invoke$4(this, TokenKind.binaryMethodName(kind), position, new Arguments(null, [y])); |
} |
return members._set$4(this, position, x, y); |
@@ -13268,17 +12852,17 @@ MethodGenerator.prototype._visitVarAssign = function(kind, xn, yn, position, cap |
} |
y = y.convertTo$3(this, x.type, yn); |
if (kind == 0) { |
- x = captureOriginal((x && x.is$Value())); |
+ x = captureOriginal(x); |
return new Value(y.type, ('' + x.code + ' = ' + y.code + ''), position.span, true); |
} |
- else if ($notnull_bool(x.type.get$isNum()) && $notnull_bool(y.type.get$isNum()) && (kind != 46/*TokenKind.TRUNCDIV*/)) { |
- x = captureOriginal((x && x.is$Value())); |
+ else if (x.type.get$isNum() && y.type.get$isNum() && (kind != 46/*TokenKind.TRUNCDIV*/)) { |
+ x = captureOriginal(x); |
var op = TokenKind.kindToString(kind); |
return new Value(y.type, ('' + x.code + ' ' + op + '= ' + y.code + ''), position.span, true); |
} |
else { |
var right = x; |
- right = captureOriginal((right && right.is$Value())); |
+ right = captureOriginal(right); |
y = right.invoke$4(this, TokenKind.binaryMethodName(kind), position, new Arguments(null, [y])); |
return new Value(y.type, ('' + x.code + ' = ' + y.code + ''), position.span, true); |
} |
@@ -13290,16 +12874,16 @@ MethodGenerator.prototype._visitIndexAssign = function(kind, xn, yn, position, c |
var tmptarget = target; |
var tmpindex = index; |
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())); |
+ tmptarget = this.getTemp(target); |
+ tmpindex = this.getTemp(index); |
+ index = this.assignTemp(tmpindex, index); |
var right = tmptarget.invoke$4(this, '\$index', position, new Arguments(null, [tmpindex])); |
- right = captureOriginal((right && right.is$Value())); |
+ right = captureOriginal(right); |
y = right.invoke$4(this, TokenKind.binaryMethodName(kind), position, new Arguments(null, [y])); |
} |
- var ret = this.assignTemp((tmptarget && tmptarget.is$Value()), (target && target.is$Value())).invoke(this, '\$setindex', position, new Arguments(null, [index, y]), false); |
- if ($notnull_bool($ne(tmptarget, target))) this.freeTemp((tmptarget && tmptarget.is$Value())); |
- if ($notnull_bool($ne(tmpindex, index))) this.freeTemp((tmpindex && tmpindex.is$Value())); |
+ var ret = this.assignTemp(tmptarget, target).invoke(this, '\$setindex', position, new Arguments(null, [index, y]), false); |
+ if ($ne(tmptarget, target)) this.freeTemp(tmptarget); |
+ if ($ne(tmpindex, index)) this.freeTemp(tmpindex); |
return ret; |
} |
MethodGenerator.prototype._visitDotAssign = function(kind, xn, yn, position, captureOriginal) { |
@@ -13307,36 +12891,35 @@ MethodGenerator.prototype._visitDotAssign = function(kind, xn, yn, position, cap |
var y = this.visitValue(yn); |
var tmptarget = target; |
if (kind != 0) { |
- tmptarget = this.getTemp((target && target.is$Value())); |
+ tmptarget = this.getTemp(target); |
var right = tmptarget.get_$3(this, xn.name.name, xn.name); |
- right = captureOriginal((right && right.is$Value())); |
+ right = captureOriginal(right); |
y = right.invoke$4(this, TokenKind.binaryMethodName(kind), position, new Arguments(null, [y])); |
} |
- var ret = this.assignTemp((tmptarget && tmptarget.is$Value()), (target && target.is$Value())).set_(this, xn.name.name, xn.name, (y && y.is$Value()), false); |
- if ($notnull_bool($ne(tmptarget, target))) this.freeTemp((tmptarget && tmptarget.is$Value())); |
+ var ret = this.assignTemp(tmptarget, target).set_(this, xn.name.name, xn.name, y, false); |
+ if ($ne(tmptarget, target)) this.freeTemp(tmptarget); |
return ret; |
} |
MethodGenerator.prototype.visitUnaryExpression = function(node) { |
- var $0; |
var value = this.visitValue(node.self); |
switch (node.op.kind) { |
case 16/*TokenKind.INCR*/: |
case 17/*TokenKind.DECR*/: |
- if ($notnull_bool(value.type.get$isNum())) { |
+ if (value.type.get$isNum()) { |
return new Value(value.type, ('' + node.op + '' + value.code + ''), node.span, true); |
} |
else { |
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)); |
+ return this._visitAssign(kind, node.self, operand, node, to$call$1(null)); |
} |
case 19/*TokenKind.NOT*/: |
- if ($notnull_bool(value.type.get$isBool()) && $notnull_bool(value.get$isConst())) { |
- var newVal = !$notnull_bool(value.get$actualValue()); |
- return EvaluatedValue.EvaluatedValue$factory((($0 = value.type) && $0.is$lang_Type()), newVal, ('' + newVal + ''), node.span); |
+ if (value.type.get$isBool() && value.get$isConst()) { |
+ var newVal = !value.get$actualValue(); |
+ return EvaluatedValue.EvaluatedValue$factory(value.type, newVal, ('' + newVal + ''), node.span); |
} |
else { |
var newVal = value.convertTo$3(this, world.nonNullBool, node); |
@@ -13370,66 +12953,65 @@ MethodGenerator.prototype.visitUnaryExpression = function(node) { |
MethodGenerator.prototype.visitPostfixExpression = function(node, isVoid) { |
var $this = this; // closure support |
var value = this.visitValue(node.body); |
- if ($notnull_bool(value.type.get$isNum())) { |
+ if (value.type.get$isNum()) { |
return new Value(value.type, ('' + value.code + '' + node.op + ''), node.span, true); |
} |
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) { |
- if ($notnull_bool(isVoid)) { |
+ var ret = this._visitAssign(kind, node.body, operand, node, (function (l) { |
+ if (isVoid) { |
return l; |
} |
else { |
left = l; |
- tmpleft = $this.forceTemp((l && l.is$Value())); |
- return $this.assignTemp((tmpleft && tmpleft.is$Value()), (left && left.is$Value())); |
+ tmpleft = $this.forceTemp(l); |
+ return $this.assignTemp(tmpleft, left); |
} |
}) |
); |
- if ($notnull_bool($ne(tmpleft, null))) { |
+ if ($ne(tmpleft, null)) { |
ret = new Value(ret.type, ("(" + ret.code + ", " + tmpleft.code + ")"), node.span, true); |
} |
- if ($notnull_bool($ne(tmpleft, left))) { |
- this.freeTemp((tmpleft && tmpleft.is$Value())); |
+ if ($ne(tmpleft, left)) { |
+ this.freeTemp(tmpleft); |
} |
return ret; |
} |
MethodGenerator.prototype.visitNewExpression = function(node) { |
- var $0; |
var typeRef = node.type; |
var constructorName = ''; |
if (node.name != null) { |
constructorName = node.name.name; |
} |
- if ($notnull_bool($eq(constructorName, '')) && !(typeRef instanceof GenericTypeReference) && typeRef.names != null) { |
+ if ($eq(constructorName, '') && !(typeRef instanceof GenericTypeReference) && typeRef.names != null) { |
var names = ListFactory.ListFactory$from$factory(typeRef.names); |
constructorName = names.removeLast$0().get$name(); |
if (names.length == 0) names = null; |
typeRef = new NameTypeReference(typeRef.isFinal, typeRef.get$name(), names, typeRef.get$span()); |
} |
- var type = this.method.resolveType((typeRef && typeRef.is$TypeReference()), true); |
- if ($notnull_bool(type.get$isTop())) { |
- type = type.get$library().findTypeByName($assert_String(constructorName)); |
+ var type = this.method.resolveType(typeRef, true); |
+ if (type.get$isTop()) { |
+ type = type.get$library().findTypeByName(constructorName); |
constructorName = ''; |
} |
var m = type.getConstructor$1(constructorName); |
- if ($notnull_bool(m == null)) { |
+ if (m == null) { |
var name = type.get$jsname(); |
- if ($notnull_bool(type.get$isVar())) { |
+ if (type.get$isVar()) { |
name = typeRef.get$name().get$name(); |
} |
world.error(('no matching constructor for ' + name + ''), node.span); |
- return this._makeMissingValue($assert_String(name)); |
+ return this._makeMissingValue(name); |
} |
- if ($notnull_bool(node.isConst)) { |
- if (!$notnull_bool(m.get$isConst())) { |
+ if (node.isConst) { |
+ if (!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(this.visitValue((($0 = arg.get$value()) && $0.is$lang_Expression())).get$isConst())) { |
+ if (!this.visitValue(arg.get$value()).get$isConst()) { |
world.error('const constructor expects const arguments', arg.get$span()); |
} |
} |
@@ -13442,10 +13024,10 @@ MethodGenerator.prototype.visitListExpression = function(node) { |
var $list = node.values; |
for (var $i = 0;$i < $list.length; $i++) { |
var item = $list.$index($i); |
- var arg = this.visitValue((item && item.is$lang_Expression())); |
+ var arg = this.visitValue(item); |
argValues.add$1(arg); |
- if ($notnull_bool(node.isConst)) { |
- if (!$notnull_bool(arg.get$isConst())) { |
+ if (node.isConst) { |
+ if (!arg.get$isConst()) { |
world.error('const list can only contain const values', item.get$span()); |
argsCode.add$1(arg.code); |
} |
@@ -13458,30 +13040,29 @@ MethodGenerator.prototype.visitListExpression = function(node) { |
} |
} |
world.get$coreimpl().types.$index('ListFactory').markUsed$0(); |
- var code = ('[' + Strings.join((argsCode && argsCode.is$List$String()), ", ") + ']'); |
+ var code = ('[' + Strings.join(argsCode, ", ") + ']'); |
var value = new Value(world.listType, code, node.span, true); |
- if ($notnull_bool(node.isConst)) { |
+ if (node.isConst) { |
var immutableList = world.get$coreimpl().types.$index('ImmutableList'); |
var immutableListCtor = immutableList.getConstructor$1('from'); |
var result = immutableListCtor.invoke$4(this, node, null, new Arguments(null, [value])); |
- value = world.gen.globalForConst(ConstListValue.ConstListValue$factory((immutableList && immutableList.is$lang_Type()), (argValues && argValues.is$List$EvaluatedValue()), ('const ' + code + ''), $assert_String(result.code), node.span), (argValues && argValues.is$List$Value())); |
+ value = world.gen.globalForConst(ConstListValue.ConstListValue$factory(immutableList, argValues, ('const ' + code + ''), result.code, node.span), argValues); |
} |
return value; |
} |
MethodGenerator.prototype.visitMapExpression = function(node) { |
- var $0; |
var mapImplType = world.gen.useMapFactory(); |
var argValues = []; |
var argsCode = []; |
for (var i = 0; |
i < node.items.length; i += 2) { |
- var key = this.visitTypedValue((($0 = node.items.$index(i)) && $0.is$lang_Expression()), world.stringType); |
+ var key = this.visitTypedValue(node.items.$index(i), world.stringType); |
var valueItem = node.items.$index(i + 1); |
- var value = this.visitValue((valueItem && valueItem.is$lang_Expression())); |
+ var value = this.visitValue(valueItem); |
argValues.add$1(key); |
argValues.add$1(value); |
- if ($notnull_bool(node.isConst)) { |
- if (!$notnull_bool(key.get$isConst()) || !$notnull_bool(value.get$isConst())) { |
+ if (node.isConst) { |
+ if (!key.get$isConst() || !value.get$isConst()) { |
world.error('const map can only contain const values', valueItem.get$span()); |
argsCode.add$1(key.code); |
argsCode.add$1(value.code); |
@@ -13496,25 +13077,24 @@ MethodGenerator.prototype.visitMapExpression = function(node) { |
argsCode.add$1(value.code); |
} |
} |
- var argList = ('[' + Strings.join((argsCode && argsCode.is$List$String()), ", ") + ']'); |
+ var argList = ('[' + Strings.join(argsCode, ", ") + ']'); |
var code = ('\$map(' + argList + ')'); |
- if ($notnull_bool(node.isConst)) { |
+ if (node.isConst) { |
var immutableMap = world.get$coreimpl().types.$index('ImmutableMap'); |
var immutableMapCtor = immutableMap.getConstructor$1(''); |
var argsValue = new Value(world.listType, argList, node.span, true); |
var result = immutableMapCtor.invoke$4(this, node, null, new Arguments(null, [argsValue])); |
- var value = ConstMapValue.ConstMapValue$factory((immutableMap && immutableMap.is$lang_Type()), (argValues && argValues.is$List$EvaluatedValue()), code, $assert_String(result.code), node.span); |
- return world.gen.globalForConst(value, (argValues && argValues.is$List$Value())); |
+ var value = ConstMapValue.ConstMapValue$factory(immutableMap, argValues, code, result.code, node.span); |
+ return world.gen.globalForConst(value, argValues); |
} |
return new Value(mapImplType, code, node.span, true); |
} |
MethodGenerator.prototype.visitConditionalExpression = function(node) { |
- var $0; |
var test = this.visitBool(node.test); |
var trueBranch = this.visitValue(node.trueBranch); |
var falseBranch = this.visitValue(node.falseBranch); |
var code = ('' + test.code + ' ? ' + trueBranch.code + ' : ' + falseBranch.code + ''); |
- return new Value(lang_Type.union((($0 = trueBranch.type) && $0.is$lang_Type()), (($0 = falseBranch.type) && $0.is$lang_Type())), code, node.span, true); |
+ return new Value(lang_Type.union(trueBranch.type, falseBranch.type), code, node.span, true); |
} |
MethodGenerator.prototype.visitIsExpression = function(node) { |
var value = this.visitValue(node.x); |
@@ -13522,10 +13102,9 @@ MethodGenerator.prototype.visitIsExpression = function(node) { |
return value.instanceOf$4(this, type, node.span, node.isTrue); |
} |
MethodGenerator.prototype.visitParenExpression = function(node) { |
- var $0; |
var body = this.visitValue(node.body); |
- if ($notnull_bool(body.get$isConst())) { |
- return EvaluatedValue.EvaluatedValue$factory((($0 = body.type) && $0.is$lang_Type()), body.get$actualValue(), ('(' + body.get$canonicalCode() + ')'), node.span); |
+ if (body.get$isConst()) { |
+ return EvaluatedValue.EvaluatedValue$factory(body.type, body.get$actualValue(), ('(' + body.get$canonicalCode() + ')'), node.span); |
} |
return new Value(body.type, ('(' + body.code + ')'), node.span, true); |
} |
@@ -13536,15 +13115,14 @@ MethodGenerator.prototype.visitDotExpression = function(node) { |
MethodGenerator.prototype.visitVarExpression = function(node) { |
var name = node.name.name; |
var ret = this._scope.lookup(name); |
- if ($notnull_bool($ne(ret, null))) return ret; |
+ if ($ne(ret, null)) return ret; |
return this._makeThisOrType(node.span).get_$3(this, name, node); |
} |
MethodGenerator.prototype._makeMissingValue = function(name) { |
return new Value(world.varType, ('' + name + '()/*NotFound*/'), null, true); |
} |
MethodGenerator.prototype._makeThisOrType = function(span) { |
- var $0; |
- return new BareValue(this, (($0 = this._getOutermostMethod()) && $0.is$MethodGenerator()), span); |
+ return new BareValue(this, this._getOutermostMethod(), span); |
} |
MethodGenerator.prototype.visitThisExpression = function(node) { |
return this._makeThisValue(node); |
@@ -13558,13 +13136,12 @@ 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", 2083, 12); |
if (!!(($0 = node.value) && $0.is$List)) { |
var items = []; |
var $list = node.value; |
for (var $i = node.value.iterator$0(); $i.hasNext$0(); ) { |
var item = $i.next$0(); |
- var val = this.visitValue((item && item.is$lang_Expression())); |
+ var val = this.visitValue(item); |
val.invoke$4(this, 'toString', item, Arguments.get$EMPTY()); |
var code = val.code; |
if ((item instanceof BinaryExpression) || (item instanceof ConditionalExpression)) { |
@@ -13572,32 +13149,32 @@ MethodGenerator.prototype.visitLiteralExpression = function(node) { |
} |
items.add$1(code); |
} |
- return new Value(type, ('(' + Strings.join((items && items.is$List$String()), " + ") + ')'), node.span, true); |
+ return new Value(type, ('(' + Strings.join(items, " + ") + ')'), node.span, true); |
} |
var text = node.text; |
- if ($notnull_bool(type.get$isString())) { |
- if ($notnull_bool(text.startsWith$1('@'))) { |
- text = MethodGenerator._escapeString(parseStringLiteral($assert_String(text))); |
+ if (type.get$isString()) { |
+ if (text.startsWith$1('@')) { |
+ text = MethodGenerator._escapeString(parseStringLiteral(text)); |
text = ('"' + text + '"'); |
} |
- else if ($notnull_bool(isMultilineString($assert_String(text)))) { |
- text = parseStringLiteral($assert_String(text)); |
+ else if (isMultilineString(text)) { |
+ text = parseStringLiteral(text); |
text = text.replaceAll$2('\n', '\\n'); |
text = text.replaceAll$2('"', '\\"'); |
text = ('"' + text + '"'); |
} |
if (text !== node.text) { |
node.value = text; |
- node.text = $assert_String(text); |
+ node.text = text; |
} |
} |
- return EvaluatedValue.EvaluatedValue$factory((type && type.is$lang_Type()), node.value, node.text, null); |
+ return EvaluatedValue.EvaluatedValue$factory(type, node.value, node.text, null); |
} |
MethodGenerator.prototype.visitPostfixExpression$1 = function($0) { |
- return this.visitPostfixExpression(($0 && $0.is$PostfixExpression()), false); |
+ return this.visitPostfixExpression($0, false); |
}; |
MethodGenerator.prototype.writeDefinition$2 = function($0, $1) { |
- return this.writeDefinition(($0 && $0.is$CodeWriter()), ($1 && $1.is$LambdaExpression())); |
+ return this.writeDefinition($0, $1); |
}; |
// ********** Code for Arguments ************** |
function Arguments(nodes, values) { |
@@ -13605,7 +13182,6 @@ function Arguments(nodes, values) { |
this.values = values; |
// Initializers done |
} |
-Arguments.prototype.is$Arguments = function(){return this;}; |
Arguments.Arguments$bare$factory = function(arity) { |
var values = []; |
for (var i = 0; |
@@ -13645,9 +13221,8 @@ Arguments.prototype.getIndexOfName = function(name) { |
return -1; |
} |
Arguments.prototype.getValue = function(name) { |
- var $0; |
var i = this.getIndexOfName(name); |
- return (($0 = i >= 0 ? this.values.$index(i) : null) && $0.is$Value()); |
+ return i >= 0 ? this.values.$index(i) : null; |
} |
Arguments.prototype.get$bareCount = function() { |
if (this._bareCount == null) { |
@@ -13670,11 +13245,11 @@ Arguments.prototype.getCode = function() { |
i < this.get$length(); i++) { |
argsCode.add$1(this.values.$index(i).code); |
} |
- Arguments.removeTrailingNulls((argsCode && argsCode.is$List$Value())); |
- return Strings.join((argsCode && argsCode.is$List$String()), ", "); |
+ Arguments.removeTrailingNulls(argsCode); |
+ return Strings.join(argsCode, ", "); |
} |
Arguments.removeTrailingNulls = function(argsCode) { |
- while (argsCode.length > 0 && $notnull_bool($eq(argsCode.last(), 'null'))) { |
+ while (argsCode.length > 0 && $eq(argsCode.last(), 'null')) { |
argsCode.removeLast(); |
} |
} |
@@ -13684,7 +13259,7 @@ Arguments.prototype.getNames = function() { |
i < this.get$length(); i++) { |
names.add$1(this.getName(i)); |
} |
- return (names && names.is$List$String()); |
+ return names; |
} |
Arguments.prototype.toCallStubArgs = function() { |
var result = []; |
@@ -13695,7 +13270,7 @@ Arguments.prototype.toCallStubArgs = function() { |
for (var i = this.get$bareCount(); |
i < this.get$length(); i++) { |
var name = this.getName(i); |
- if ($notnull_bool(name == null)) name = ('\$' + i + ''); |
+ if (name == null) name = ('\$' + i + ''); |
result.add$1(new Value(world.varType, name, null, false)); |
} |
return new Arguments(this.nodes, result); |
@@ -13721,7 +13296,6 @@ function Library(baseSource) { |
this.sources = []; |
this._privateMembers = $map([]); |
} |
-Library.prototype.is$Library = function(){return this;}; |
Library.prototype.get$name = function() { return this.name; }; |
Library.prototype.set$name = function(value) { return this.name = value; }; |
Library.prototype.get$isCore = function() { |
@@ -13755,24 +13329,23 @@ Library.prototype.addNative = function(fullname) { |
this.natives.add(world.reader.readFile(fullname)); |
} |
Library.prototype._findMembers = function(name) { |
- var $0; |
if (name.startsWith('_')) { |
- return (($0 = this._privateMembers.$index(name)) && $0.is$MemberSet()); |
+ return this._privateMembers.$index(name); |
} |
else { |
- return (($0 = world._members.$index(name)) && $0.is$MemberSet()); |
+ return world._members.$index(name); |
} |
} |
Library.prototype._addMember = function(member) { |
- if ($notnull_bool(member.get$isPrivate())) { |
- if ($notnull_bool(member.get$isStatic())) { |
- if ($notnull_bool(member.declaringType.get$isTop())) { |
+ if (member.get$isPrivate()) { |
+ if (member.get$isStatic()) { |
+ if (member.declaringType.get$isTop()) { |
world._addTopName(member); |
} |
return; |
} |
var mset = this._privateMembers.$index(member.name); |
- if ($notnull_bool(mset == null)) { |
+ if (mset == null) { |
var $list = world.libraries.getValues(); |
for (var $i = world.libraries.getValues().iterator$0(); $i.hasNext$0(); ) { |
var lib = $i.next$0(); |
@@ -13801,10 +13374,9 @@ Library.prototype.getOrAddFunctionType = function(name, func, inType) { |
return type; |
} |
Library.prototype.addType = function(name, definition, isClass) { |
- var $0; |
if (this.types.containsKey(name)) { |
var existingType = this.types.$index(name); |
- if ($notnull_bool(this.get$isCore()) && $notnull_bool(existingType.get$definition() == null)) { |
+ if (this.get$isCore() && existingType.get$definition() == null) { |
existingType.setDefinition$1(definition); |
} |
else { |
@@ -13812,9 +13384,9 @@ Library.prototype.addType = function(name, definition, isClass) { |
} |
} |
else { |
- this.types.$setindex(name, new DefinedType(name, this, (definition && definition.is$Definition()), isClass)); |
+ this.types.$setindex(name, new DefinedType(name, this, definition, isClass)); |
} |
- return (($0 = this.types.$index(name)) && $0.is$DefinedType()); |
+ return this.types.$index(name); |
} |
Library.prototype.findType = function(type) { |
var result = this.findTypeByName(type.name.name); |
@@ -13823,10 +13395,10 @@ Library.prototype.findType = function(type) { |
if (type.names.length > 1) { |
return null; |
} |
- if (!$notnull_bool(result.get$isTop())) { |
+ if (!result.get$isTop()) { |
return null; |
} |
- return result.get$library().findTypeByName($assert_String(type.names.$index(0).get$name())); |
+ return result.get$library().findTypeByName(type.names.$index(0).get$name()); |
} |
return result; |
} |
@@ -13842,8 +13414,8 @@ Library.prototype.findTypeByName = function(name) { |
else if (imported.prefix == name) { |
newRet = imported.get$library().topType; |
} |
- if ($notnull_bool($ne(newRet, null))) { |
- if ($notnull_bool($ne(ret, null)) && $notnull_bool($ne(ret, newRet))) { |
+ if ($ne(newRet, null)) { |
+ if ($ne(ret, null) && $ne(ret, newRet)) { |
world.error(('conflicting types for "' + name + '"'), ret.get$span(), newRet.get$span()); |
} |
else { |
@@ -13851,17 +13423,17 @@ Library.prototype.findTypeByName = function(name) { |
} |
} |
} |
- return (ret && ret.is$lang_Type()); |
+ return ret; |
} |
Library.prototype.lookup = function(name, span) { |
var retType = this.findTypeByName(name); |
var ret = null; |
- if ($notnull_bool($ne(retType, null))) { |
+ if ($ne(retType, null)) { |
ret = retType.get$typeMember(); |
} |
var newRet = this.topType.getMember(name); |
- if ($notnull_bool($ne(newRet, null))) { |
- if ($notnull_bool($ne(ret, null)) && $notnull_bool($ne(ret, newRet))) { |
+ if ($ne(newRet, null)) { |
+ if ($ne(ret, null) && $ne(ret, newRet)) { |
world.error(('conflicting members for "' + name + '"'), span, ret.get$span(), newRet.get$span()); |
} |
else { |
@@ -13873,8 +13445,8 @@ Library.prototype.lookup = function(name, span) { |
var imported = $list.$index($i); |
if (imported.prefix == null) { |
newRet = imported.get$library().topType.getMember(name); |
- if ($notnull_bool($ne(newRet, null))) { |
- if ($notnull_bool($ne(ret, null)) && $notnull_bool($ne(ret, newRet))) { |
+ if ($ne(newRet, null)) { |
+ if ($ne(ret, null) && $ne(ret, newRet)) { |
world.error(('conflicting members for "' + name + '"'), span, ret.get$span(), newRet.get$span()); |
} |
else { |
@@ -13883,18 +13455,18 @@ Library.prototype.lookup = function(name, span) { |
} |
} |
} |
- return (ret && ret.is$Member()); |
+ return ret; |
} |
Library.prototype.resolve = function() { |
if (this.name == null) { |
this.name = this.baseSource.filename; |
var index = this.name.lastIndexOf('/', this.name.length); |
if (index >= 0) { |
- this.name = this.name.substring($assert_num(index + 1)); |
+ this.name = this.name.substring(index + 1); |
} |
index = this.name.indexOf('.', 0); |
if (index > 0) { |
- this.name = this.name.substring(0, $assert_num(index)); |
+ this.name = this.name.substring(0, index); |
} |
} |
var $list = this.types.getValues(); |
@@ -13930,18 +13502,17 @@ function _LibraryVisitor(library) { |
this.currentType = this.library.topType; |
this.sources = []; |
} |
-_LibraryVisitor.prototype.is$TreeVisitor = function(){return this;}; |
_LibraryVisitor.prototype.get$library = function() { return this.library; }; |
_LibraryVisitor.prototype.get$isTop = function() { return this.isTop; }; |
_LibraryVisitor.prototype.set$isTop = function(value) { return this.isTop = value; }; |
_LibraryVisitor.prototype.addSourceFromName = function(name, span) { |
var filename = this.library.makeFullPath(name); |
- if ($notnull_bool($eq(filename, this.library.baseSource.filename))) { |
+ if ($eq(filename, this.library.baseSource.filename)) { |
world.error('library can not source itself', span); |
return; |
} |
else if (this.sources.some((function (s) { |
- return $eq(s.filename, filename); |
+ return s.filename == filename; |
}) |
)) { |
world.error(('file "' + filename + '" has already been sourced'), span); |
@@ -13966,17 +13537,16 @@ _LibraryVisitor.prototype.addSource = function(source) { |
return def.visit$1($this); |
}) |
); |
- $assert(this.sources.length == 0 || $notnull_bool(this.isTop), "sources.length == 0 || isTop", "library.dart", 293, 12); |
this.isTop = false; |
var newSources = this.sources; |
this.sources = []; |
for (var $i = newSources.iterator$0(); $i.hasNext$0(); ) { |
var source0 = $i.next$0(); |
- this.addSource((source0 && source0.is$SourceFile())); |
+ this.addSource(source0); |
} |
} |
_LibraryVisitor.prototype.visitDirectiveDefinition = function(node) { |
- if (!$notnull_bool(this.isTop)) { |
+ if (!this.isTop) { |
world.error('directives not allowed in sourced file', node.span); |
return; |
} |
@@ -13986,11 +13556,11 @@ _LibraryVisitor.prototype.visitDirectiveDefinition = function(node) { |
name = this.getSingleStringArg(node); |
if (this.library.name == null) { |
- this.library.name = $assert_String(name); |
- if ($notnull_bool($eq(name, 'node')) || $notnull_bool($eq(name, 'dom'))) { |
+ this.library.name = name; |
+ if ($eq(name, 'node') || $eq(name, 'dom')) { |
this.library.topType.isNativeType = true; |
} |
- if ($notnull_bool(this.seenImport) || $notnull_bool(this.seenSource) || $notnull_bool(this.seenResource)) { |
+ if (this.seenImport || this.seenSource || this.seenResource) { |
world.error('#library must be first directive in file', node.span); |
} |
} |
@@ -14004,17 +13574,17 @@ _LibraryVisitor.prototype.visitDirectiveDefinition = function(node) { |
this.seenImport = true; |
name = this.getFirstStringArg(node); |
var prefix = this.tryGetNamedStringArg(node, 'prefix'); |
- if (node.arguments.length > 2 || node.arguments.length == 2 && $notnull_bool(prefix == null)) { |
+ if (node.arguments.length > 2 || 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$2('.', 0) >= 0) { |
+ else if ($ne(prefix, null) && prefix.indexOf$2('.', 0) >= 0) { |
world.error('library prefix canot contain "."', node.span); |
} |
- else if ($notnull_bool(this.seenSource) || $notnull_bool(this.seenResource)) { |
+ else if (this.seenSource || this.seenResource) { |
world.error('#imports must come before any #source or #resource', node.span); |
} |
- if ($notnull_bool($eq(prefix, ''))) prefix = null; |
- var filename = this.library.makeFullPath($assert_String(name)); |
+ if ($eq(prefix, '')) prefix = null; |
+ var filename = this.library.makeFullPath(name); |
if (this.library.imports.some((function (li) { |
return $eq(li.get$library().baseSource, filename); |
}) |
@@ -14022,15 +13592,15 @@ _LibraryVisitor.prototype.visitDirectiveDefinition = function(node) { |
world.error(('duplicate import of "' + name + '"'), node.span); |
return; |
} |
- var newLib = this.library.addImport($assert_String(filename), $assert_String(prefix)); |
+ var newLib = this.library.addImport(filename, prefix); |
break; |
case "source": |
this.seenSource = true; |
name = this.getSingleStringArg(node); |
- this.addSourceFromName($assert_String(name), node.span); |
- if ($notnull_bool(this.seenResource)) { |
+ this.addSourceFromName(name, node.span); |
+ if (this.seenResource) { |
world.error('#sources must come before any #resource', node.span); |
} |
break; |
@@ -14038,7 +13608,7 @@ _LibraryVisitor.prototype.visitDirectiveDefinition = function(node) { |
case "native": |
name = this.getSingleStringArg(node); |
- this.library.addNative(this.library.makeFullPath($assert_String(name))); |
+ this.library.addNative(this.library.makeFullPath(name)); |
break; |
case "resource": |
@@ -14067,7 +13637,7 @@ _LibraryVisitor.prototype.getFirstStringArg = function(node) { |
if (arg.label != null) { |
world.error('label not allowed for directive', node.span); |
} |
- return this._parseStringArgument((arg && arg.is$ArgumentNode())); |
+ return this._parseStringArgument(arg); |
} |
_LibraryVisitor.prototype.tryGetNamedStringArg = function(node, argName) { |
var args = node.arguments.filter((function (a) { |
@@ -14082,15 +13652,15 @@ _LibraryVisitor.prototype.tryGetNamedStringArg = function(node, argName) { |
} |
for (var $i = args.iterator$0(); $i.hasNext$0(); ) { |
var arg = $i.next$0(); |
- return this._parseStringArgument((arg && arg.is$ArgumentNode())); |
+ return this._parseStringArgument(arg); |
} |
} |
_LibraryVisitor.prototype._parseStringArgument = function(arg) { |
var expr = arg.value; |
- if (!(expr instanceof LiteralExpression) || !$notnull_bool(expr.type.type.get$isString())) { |
+ if (!(expr instanceof LiteralExpression) || !expr.type.type.get$isString()) { |
world.error('expected string', expr.get$span()); |
} |
- return parseStringLiteral($assert_String(expr.get$value())); |
+ return parseStringLiteral(expr.get$value()); |
} |
_LibraryVisitor.prototype.visitTypeDefinition = function(node) { |
var oldType = this.currentType; |
@@ -14100,7 +13670,7 @@ _LibraryVisitor.prototype.visitTypeDefinition = function(node) { |
var member = $list.$index($i); |
member.visit$1(this); |
} |
- this.currentType = (oldType && oldType.is$DefinedType()); |
+ this.currentType = oldType; |
} |
_LibraryVisitor.prototype.visitVariableDefinition = function(node) { |
this.currentType.addField(node); |
@@ -14113,7 +13683,7 @@ _LibraryVisitor.prototype.visitFunctionTypeDefinition = function(node) { |
type.addMethod$2('\$call', node.func); |
} |
_LibraryVisitor.prototype.addSource$1 = function($0) { |
- return this.addSource(($0 && $0.is$SourceFile())); |
+ return this.addSource($0); |
}; |
// ********** Code for Parameter ************** |
function Parameter(definition) { |
@@ -14121,13 +13691,10 @@ function Parameter(definition) { |
this.definition = definition; |
// Initializers done |
} |
-Parameter.prototype.is$Parameter = function(){return this;}; |
Parameter.prototype.get$definition = function() { return this.definition; }; |
Parameter.prototype.set$definition = function(value) { return this.definition = value; }; |
Parameter.prototype.get$name = function() { return this.name; }; |
Parameter.prototype.set$name = function(value) { return this.name = value; }; |
-Parameter.prototype.get$type = function() { return this.type; }; |
-Parameter.prototype.set$type = function(value) { return this.type = value; }; |
Parameter.prototype.get$value = function() { return this.value; }; |
Parameter.prototype.set$value = function(value) { return this.value = value; }; |
Parameter.prototype.resolve = function(method, inType) { |
@@ -14137,52 +13704,50 @@ Parameter.prototype.resolve = function(method, inType) { |
this.isInitializer = true; |
} |
this.type = inType.resolveType(this.definition.type, false); |
- if ($notnull_bool(method.get$isStatic()) && $notnull_bool(this.type.get$hasTypeParams())) { |
+ if (method.get$isStatic() && this.type.get$hasTypeParams()) { |
world.error('using type parameter in static context', this.definition.span); |
} |
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())) { |
+ if (method.get$isAbstract()) { |
world.error('default value not allowed on abstract methods', this.definition.span); |
} |
- else if (method.name == '\$call' && $notnull_bool(method.get$definition().body == null)) { |
+ else if (method.name == '\$call' && method.get$definition().body == null) { |
world.error('default value not allowed on function type', this.definition.span); |
} |
} |
- else if ($notnull_bool(this.isInitializer) && !$notnull_bool(method.get$isConstructor())) { |
+ else if (this.isInitializer && !method.get$isConstructor()) { |
world.error('initializer parameters only allowed on constructors', this.definition.span); |
} |
} |
Parameter.prototype.genValue = function(method, context) { |
- var $0; |
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()); |
+ this.value = this.definition.value.visit(context); |
this.value = this.value.convertTo(context, this.type, this.definition.value, false); |
} |
Parameter.prototype.copyWithNewType = function(newType) { |
- var $0; |
var ret = new Parameter(this.definition); |
- ret.set$type(newType); |
- ret.set$name(this.name); |
+ ret.type = newType; |
+ ret.name = this.name; |
ret.isInitializer = this.isInitializer; |
- return (ret && ret.is$Parameter()); |
+ return ret; |
} |
Parameter.prototype.get$isOptional = function() { |
return this.definition != null && this.definition.value != null; |
} |
Parameter.prototype.copyWithNewType$1 = function($0) { |
- return this.copyWithNewType(($0 && $0.is$lang_Type())); |
+ return this.copyWithNewType($0); |
}; |
Parameter.prototype.genValue$2 = function($0, $1) { |
- return this.genValue(($0 && $0.is$MethodMember()), ($1 && $1.is$MethodGenerator())); |
+ return this.genValue($0, $1); |
}; |
Parameter.prototype.resolve$2 = function($0, $1) { |
- return this.resolve(($0 && $0.is$Member()), ($1 && $1.is$lang_Type())); |
+ return this.resolve($0, $1); |
}; |
// ********** Code for Member ************** |
function Member(name, declaringType) { |
@@ -14191,8 +13756,6 @@ function Member(name, declaringType) { |
this.isGenerated = false; |
// Initializers done |
} |
-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 this._jsname == null ? this.name : this._jsname; |
@@ -14259,10 +13822,10 @@ Member.prototype.set$initDelegate = function(ctor) { |
} |
Member.prototype.get$inferredResult = function() { |
var t = this.get$returnType(); |
- if ($notnull_bool(t.get$isBool()) && ($notnull_bool(this.get$library().get$isCore()) || $notnull_bool(this.get$library().get$isCoreImpl()))) { |
+ if (t.get$isBool() && (this.get$library().get$isCore() || this.get$library().get$isCoreImpl())) { |
return world.nonNullBool; |
} |
- return (t && t.is$lang_Type()); |
+ return t; |
} |
Member.prototype.get$definition = function() { |
return null; |
@@ -14271,26 +13834,24 @@ Member.prototype.get$parameters = function() { |
return []; |
} |
Member.prototype.canInvoke = function(context, args) { |
- return $notnull_bool(this.get$canGet()) && $notnull_bool(new Value(this.get$returnType(), null, null, true).canInvoke(context, '\$call', args)); |
+ return this.get$canGet() && new Value(this.get$returnType(), null, null, true).canInvoke(context, '\$call', args); |
} |
Member.prototype.invoke = function(context, node, target, args, isDynamic) { |
- var $0; |
var newTarget = this._get(context, node, target, isDynamic); |
- return (($0 = newTarget.invoke$5(context, '\$call', node, args, isDynamic)) && $0.is$Value()); |
+ return newTarget.invoke$5(context, '\$call', node, args, isDynamic); |
} |
Member.prototype.override = function(other) { |
- if ($notnull_bool(this.get$isStatic())) { |
+ if (this.get$isStatic()) { |
world.error('static members can not hide parent members', this.get$span(), other.get$span()); |
return false; |
} |
- else if ($notnull_bool(other.get$isStatic())) { |
+ else if (other.get$isStatic()) { |
world.error('can not override static member', this.get$span(), other.get$span()); |
return false; |
} |
return true; |
} |
Member.prototype.get$generatedFactoryName = function() { |
- $assert(this.get$isFactory(), "this.isFactory", "member.dart", 195, 12); |
var prefix = ('' + this.declaringType.get$jsname() + '.' + this.get$constructorName() + '\$'); |
if (this.name == '') { |
return ('' + prefix + 'factory'); |
@@ -14301,28 +13862,28 @@ Member.prototype.get$generatedFactoryName = function() { |
} |
Member.prototype.resolveType = function(node, isRequired) { |
var type = this.declaringType.resolveType(node, isRequired); |
- if ($notnull_bool(this.get$isStatic()) && $notnull_bool(type.get$hasTypeParams())) { |
+ if (this.get$isStatic() && type.get$hasTypeParams()) { |
world.error('using type parameter in static context', node.span); |
} |
- return (type && type.is$lang_Type()); |
+ return type; |
} |
Member.prototype._get$3 = function($0, $1, $2) { |
- return this._get(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value())); |
+ return this._get($0, $1, $2); |
}; |
Member.prototype._set$4 = function($0, $1, $2, $3) { |
- return this._set(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Value())); |
+ return this._set($0, $1, $2, $3); |
}; |
Member.prototype.canInvoke$2 = function($0, $1) { |
- return this.canInvoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$Arguments())); |
+ return this.canInvoke($0, $1); |
}; |
Member.prototype.invoke$4 = function($0, $1, $2, $3) { |
- return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Arguments()), false); |
+ return this.invoke($0, $1, $2, $3, false); |
}; |
Member.prototype.invoke$4$isDynamic = function($0, $1, $2, $3, isDynamic) { |
- return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Arguments()), $assert_bool(isDynamic)); |
+ return this.invoke($0, $1, $2, $3, isDynamic); |
}; |
Member.prototype.invoke$5 = function($0, $1, $2, $3, $4) { |
- return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Arguments()), $assert_bool($4)); |
+ return this.invoke($0, $1, $2, $3, $4); |
}; |
Member.prototype.provideFieldSyntax$0 = function() { |
return this.provideFieldSyntax(); |
@@ -14331,7 +13892,7 @@ Member.prototype.providePropertySyntax$0 = function() { |
return this.providePropertySyntax(); |
}; |
Member.prototype.resolve$1 = function($0) { |
- return this.resolve(($0 && $0.is$lang_Type())); |
+ return this.resolve($0); |
}; |
// ********** Code for TypeMember ************** |
function TypeMember(type) { |
@@ -14340,8 +13901,6 @@ function TypeMember(type) { |
// Initializers done |
} |
$inherits(TypeMember, Member); |
-TypeMember.prototype.is$TypeMember = function(){return this;}; |
-TypeMember.prototype.get$type = function() { return this.type; }; |
TypeMember.prototype.get$span = function() { |
return this.type.definition.span; |
} |
@@ -14366,7 +13925,7 @@ TypeMember.prototype.resolve = function(inType) { |
TypeMember.prototype._get = function(context, node, target, isDynamic) { |
var ret = new Value(this.type, this.type.get$jsname(), node.span, false); |
ret.isType = true; |
- return (ret && ret.is$Value()); |
+ return ret; |
} |
TypeMember.prototype._set = function(context, node, target, value, isDynamic) { |
world.error('can not set type', this.type.definition.span); |
@@ -14375,25 +13934,25 @@ TypeMember.prototype.invoke = function(context, node, target, args, isDynamic) { |
world.error('can not invoke type', this.type.definition.span); |
} |
TypeMember.prototype._get$3 = function($0, $1, $2) { |
- return this._get(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), false); |
+ return this._get($0, $1, $2, false); |
}; |
TypeMember.prototype._set$4 = function($0, $1, $2, $3) { |
- return this._set(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Value()), false); |
+ return this._set($0, $1, $2, $3, false); |
}; |
TypeMember.prototype.canInvoke$2 = function($0, $1) { |
- return this.canInvoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$Arguments())); |
+ return this.canInvoke($0, $1); |
}; |
TypeMember.prototype.invoke$4 = function($0, $1, $2, $3) { |
- return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Arguments()), false); |
+ return this.invoke($0, $1, $2, $3, false); |
}; |
TypeMember.prototype.invoke$4$isDynamic = function($0, $1, $2, $3, isDynamic) { |
- return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Arguments()), $assert_bool(isDynamic)); |
+ return this.invoke($0, $1, $2, $3, isDynamic); |
}; |
TypeMember.prototype.invoke$5 = function($0, $1, $2, $3, $4) { |
- return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Arguments()), $assert_bool($4)); |
+ return this.invoke($0, $1, $2, $3, $4); |
}; |
TypeMember.prototype.resolve$1 = function($0) { |
- return this.resolve(($0 && $0.is$lang_Type())); |
+ return this.resolve($0); |
}; |
// ********** Code for FieldMember ************** |
function FieldMember(name, declaringType, definition, value) { |
@@ -14406,18 +13965,15 @@ function FieldMember(name, declaringType, definition, value) { |
// Initializers done |
} |
$inherits(FieldMember, Member); |
-FieldMember.prototype.is$FieldMember = function(){return this;}; |
FieldMember.prototype.get$definition = function() { return this.definition; }; |
FieldMember.prototype.get$value = function() { return this.value; }; |
-FieldMember.prototype.get$type = function() { return this.type; }; |
-FieldMember.prototype.set$type = function(value) { return this.type = value; }; |
FieldMember.prototype.get$isStatic = function() { return this.isStatic; }; |
FieldMember.prototype.set$isStatic = function(value) { return this.isStatic = value; }; |
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(Member.prototype.override.call(this, other))) return false; |
- if ($notnull_bool(other.get$isProperty())) { |
+ if (!Member.prototype.override.call(this, other)) return false; |
+ if (other.get$isProperty()) { |
return true; |
} |
else { |
@@ -14438,8 +13994,7 @@ FieldMember.prototype.providePropertySyntax = function() { |
this._providePropertySyntax = true; |
} |
FieldMember.prototype.get$span = function() { |
- var $0; |
- return (($0 = this.definition == null ? null : this.definition.span) && $0.is$SourceSpan()); |
+ return this.definition == null ? null : this.definition.span; |
} |
FieldMember.prototype.get$returnType = function() { |
return this.type; |
@@ -14448,7 +14003,7 @@ FieldMember.prototype.get$canGet = function() { |
return true; |
} |
FieldMember.prototype.get$canSet = function() { |
- return !$notnull_bool(this.isFinal); |
+ return !this.isFinal; |
} |
FieldMember.prototype.get$isField = function() { |
return true; |
@@ -14460,14 +14015,14 @@ FieldMember.prototype.resolve = function(inType) { |
var $list = this.definition.modifiers; |
for (var $i = 0;$i < $list.length; $i++) { |
var mod = $list.$index($i); |
- if ($notnull_bool($eq(mod.kind, 86/*TokenKind.STATIC*/))) { |
- if ($notnull_bool(this.isStatic)) { |
+ if ($eq(mod.kind, 86/*TokenKind.STATIC*/)) { |
+ if (this.isStatic) { |
world.error('duplicate static modifier', mod.get$span()); |
} |
this.isStatic = true; |
} |
- else if ($notnull_bool($eq(mod.kind, 97/*TokenKind.FINAL*/))) { |
- if ($notnull_bool(this.isFinal)) { |
+ else if ($eq(mod.kind, 97/*TokenKind.FINAL*/)) { |
+ if (this.isFinal) { |
world.error('duplicate final modifier', mod.get$span()); |
} |
this.isFinal = true; |
@@ -14478,19 +14033,18 @@ FieldMember.prototype.resolve = function(inType) { |
} |
} |
this.type = inType.resolveType(this.definition.type, false); |
- if ($notnull_bool(this.isStatic) && $notnull_bool(this.type.get$hasTypeParams())) { |
+ if (this.isStatic && this.type.get$hasTypeParams()) { |
world.error('using type parameter in static context', this.definition.type.span); |
} |
- if ($notnull_bool(this.isStatic) && $notnull_bool(this.isFinal) && this.value == null) { |
+ if (this.isStatic && this.isFinal && this.value == null) { |
world.error('static final field is missing initializer', this.get$span()); |
} |
this.get$library()._addMember(this); |
} |
FieldMember.prototype.computeValue = function() { |
- var $0; |
if (this.value == null) return null; |
if (this._computedValue == null) { |
- if ($notnull_bool(this._computing)) { |
+ if (this._computing) { |
world.error('circular reference', this.value.span); |
return null; |
} |
@@ -14498,16 +14052,16 @@ FieldMember.prototype.computeValue = function() { |
var finalMethod = new MethodMember('final_context', this.declaringType, null); |
finalMethod.isStatic = true; |
var finalGen = new MethodGenerator(finalMethod, null); |
- this._computedValue = (($0 = this.value.visit((finalGen && finalGen.is$TreeVisitor()))) && $0.is$Value()); |
- if (!$notnull_bool(this._computedValue.get$isConst())) { |
- if ($notnull_bool(this.isStatic)) { |
+ this._computedValue = this.value.visit(finalGen); |
+ if (!this._computedValue.get$isConst()) { |
+ if (this.isStatic) { |
world.error('non constant static field must be initialized in functions', this.value.span); |
} |
else { |
world.error('non constant field must be initialized in constructor', this.value.span); |
} |
} |
- if ($notnull_bool(this.isStatic)) { |
+ if (this.isStatic) { |
this._computedValue = world.gen.globalForStaticField(this, this._computedValue, [this._computedValue]); |
} |
this._computing = false; |
@@ -14515,28 +14069,27 @@ FieldMember.prototype.computeValue = function() { |
return this._computedValue; |
} |
FieldMember.prototype._get = function(context, node, target, isDynamic) { |
- var $0; |
- if (!$notnull_bool(isDynamic)) { |
+ if (!isDynamic) { |
this.declaringType.markUsed(); |
} |
- if ($notnull_bool(this.isStatic)) { |
+ if (this.isStatic) { |
var cv = this.computeValue(); |
- if ($notnull_bool(this.isFinal)) { |
- return (cv && cv.is$Value()); |
+ if (this.isFinal) { |
+ return cv; |
} |
- if ($notnull_bool(this.declaringType.get$isTop())) { |
+ if (this.declaringType.get$isTop()) { |
return new Value(this.type, ('' + this.get$jsname() + ''), node.span, true); |
} |
else { |
return new Value(this.type, ('' + this.declaringType.get$jsname() + '.' + this.get$jsname() + ''), node.span, true); |
} |
} |
- else if ($notnull_bool(target.get$isConst()) && $notnull_bool(this.isFinal)) { |
+ else if (target.get$isConst() && this.isFinal) { |
var constTarget = (target instanceof GlobalValue) ? target.get$dynamic().exp : target; |
if ((constTarget instanceof ConstObjectValue)) { |
- return (($0 = constTarget.fields.$index(this.name)) && $0.is$Value()); |
+ return constTarget.fields.$index(this.name); |
} |
- else if ($notnull_bool($eq(constTarget.type, world.stringType)) && this.name == 'length') { |
+ else if ($eq(constTarget.type, world.stringType) && this.name == 'length') { |
return new Value(this.type, ('' + constTarget.get$actualValue().length + ''), node.span, true); |
} |
} |
@@ -14548,10 +14101,10 @@ FieldMember.prototype._set = function(context, node, target, value, isDynamic) { |
return new Value(this.type, ('' + lhs.code + ' = ' + value.code + ''), node.span, true); |
} |
FieldMember.prototype._get$3 = function($0, $1, $2) { |
- return this._get(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), false); |
+ return this._get($0, $1, $2, false); |
}; |
FieldMember.prototype._set$4 = function($0, $1, $2, $3) { |
- return this._set(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Value()), false); |
+ return this._set($0, $1, $2, $3, false); |
}; |
FieldMember.prototype.computeValue$0 = function() { |
return this.computeValue(); |
@@ -14563,7 +14116,7 @@ FieldMember.prototype.providePropertySyntax$0 = function() { |
return this.providePropertySyntax(); |
}; |
FieldMember.prototype.resolve$1 = function($0) { |
- return this.resolve(($0 && $0.is$lang_Type())); |
+ return this.resolve($0); |
}; |
// ********** Code for PropertyMember ************** |
function PropertyMember(name, declaringType) { |
@@ -14572,10 +14125,8 @@ function PropertyMember(name, declaringType) { |
// Initializers done |
} |
$inherits(PropertyMember, Member); |
-PropertyMember.prototype.is$PropertyMember = function(){return this;}; |
PropertyMember.prototype.get$span = function() { |
- var $0; |
- return (($0 = this.getter != null ? this.getter.get$span() : null) && $0.is$SourceSpan()); |
+ return this.getter != null ? this.getter.get$span() : null; |
} |
PropertyMember.prototype.get$canGet = function() { |
return this.getter != null; |
@@ -14605,9 +14156,9 @@ PropertyMember.prototype.get$returnType = function() { |
return this.getter == null ? this.setter.returnType : this.getter.returnType; |
} |
PropertyMember.prototype.override = function(other) { |
- if (!$notnull_bool(Member.prototype.override.call(this, other))) return false; |
- if ($notnull_bool(other.get$isProperty()) || $notnull_bool(other.get$isField())) { |
- if ($notnull_bool(other.get$isProperty())) this.addFromParent(other); |
+ if (!Member.prototype.override.call(this, other)) return false; |
+ if (other.get$isProperty() || other.get$isField()) { |
+ if (other.get$isProperty()) this.addFromParent(other); |
else this._overriddenField = other; |
return true; |
} |
@@ -14635,14 +14186,13 @@ PropertyMember.prototype._set = function(context, node, target, value, isDynamic |
return this.setter.invoke(context, node, target, new Arguments(null, [value]), isDynamic); |
} |
PropertyMember.prototype.addFromParent = function(parentMember) { |
- var $0; |
var parent; |
if ((parentMember instanceof ConcreteMember)) { |
- var c = (parentMember && parentMember.is$ConcreteMember()); |
- parent = (($0 = c.baseMember) && $0.is$PropertyMember()); |
+ var c = parentMember; |
+ parent = c.baseMember; |
} |
else { |
- parent = (parentMember && parentMember.is$PropertyMember()); |
+ parent = parentMember; |
} |
if (this.getter == null) this.getter = parent.getter; |
if (this.setter == null) this.setter = parent.setter; |
@@ -14653,10 +14203,10 @@ PropertyMember.prototype.resolve = function(inType) { |
this.get$library()._addMember(this); |
} |
PropertyMember.prototype._get$3 = function($0, $1, $2) { |
- return this._get(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), false); |
+ return this._get($0, $1, $2, false); |
}; |
PropertyMember.prototype._set$4 = function($0, $1, $2, $3) { |
- return this._set(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Value()), false); |
+ return this._set($0, $1, $2, $3, false); |
}; |
PropertyMember.prototype.provideFieldSyntax$0 = function() { |
return this.provideFieldSyntax(); |
@@ -14665,7 +14215,7 @@ PropertyMember.prototype.providePropertySyntax$0 = function() { |
return this.providePropertySyntax(); |
}; |
PropertyMember.prototype.resolve$1 = function($0) { |
- return this.resolve(($0 && $0.is$lang_Type())); |
+ return this.resolve($0); |
}; |
// ********** Code for ConcreteMember ************** |
function ConcreteMember(name, declaringType, baseMember) { |
@@ -14678,7 +14228,7 @@ function ConcreteMember(name, declaringType, baseMember) { |
for (var $i = 0;$i < $list.length; $i++) { |
var p = $list.$index($i); |
var newType = p.type.resolveTypeParams$1(declaringType); |
- if ($notnull_bool($ne(newType, p.type))) { |
+ if ($ne(newType, p.type)) { |
this.parameters.add(p.copyWithNewType$1(newType)); |
} |
else { |
@@ -14687,7 +14237,6 @@ function ConcreteMember(name, declaringType, baseMember) { |
} |
} |
$inherits(ConcreteMember, Member); |
-ConcreteMember.prototype.is$ConcreteMember = function(){return this;}; |
ConcreteMember.prototype.get$returnType = function() { return this.returnType; }; |
ConcreteMember.prototype.set$returnType = function(value) { return this.returnType = value; }; |
ConcreteMember.prototype.get$parameters = function() { return this.parameters; }; |
@@ -14750,20 +14299,17 @@ ConcreteMember.prototype.get$constructorName = function() { |
return this.baseMember.get$constructorName(); |
} |
ConcreteMember.prototype.get$definition = function() { |
- var $0; |
- return (($0 = this.baseMember.get$definition()) && $0.is$Definition()); |
+ return this.baseMember.get$definition(); |
} |
ConcreteMember.prototype.get$initDelegate = function() { |
- var $0; |
- return (($0 = this.baseMember.get$initDelegate()) && $0.is$Definition()); |
+ return this.baseMember.get$initDelegate(); |
} |
ConcreteMember.prototype.set$initDelegate = function(ctor) { |
this.baseMember.set$initDelegate(ctor); |
} |
ConcreteMember.prototype.resolveType = function(node, isRequired) { |
- var $0; |
var type = this.baseMember.resolveType(node, isRequired); |
- return (($0 = type.resolveTypeParams$1(this.declaringType)) && $0.is$lang_Type()); |
+ return type.resolveTypeParams$1(this.declaringType); |
} |
ConcreteMember.prototype.override = function(other) { |
return this.baseMember.override(other); |
@@ -14779,29 +14325,29 @@ ConcreteMember.prototype._set = function(context, node, target, value, isDynamic |
ConcreteMember.prototype.invoke = function(context, node, target, args, isDynamic) { |
var ret = this.baseMember.invoke(context, node, target, args, isDynamic); |
var code = ret.code; |
- if ($notnull_bool(this.get$isConstructor())) { |
+ if (this.get$isConstructor()) { |
code = code.replaceFirst$2(this.declaringType.get$genericType().get$jsname(), this.declaringType.get$jsname()); |
} |
this.declaringType.genMethod(this); |
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); |
+ return this._get($0, $1, $2, false); |
}; |
ConcreteMember.prototype._set$4 = function($0, $1, $2, $3) { |
- return this._set(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Value()), false); |
+ return this._set($0, $1, $2, $3, false); |
}; |
ConcreteMember.prototype.canInvoke$2 = function($0, $1) { |
- return this.canInvoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$Arguments())); |
+ return this.canInvoke($0, $1); |
}; |
ConcreteMember.prototype.invoke$4 = function($0, $1, $2, $3) { |
- return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Arguments()), false); |
+ return this.invoke($0, $1, $2, $3, false); |
}; |
ConcreteMember.prototype.invoke$4$isDynamic = function($0, $1, $2, $3, isDynamic) { |
- return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Arguments()), $assert_bool(isDynamic)); |
+ return this.invoke($0, $1, $2, $3, isDynamic); |
}; |
ConcreteMember.prototype.invoke$5 = function($0, $1, $2, $3, $4) { |
- return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Arguments()), $assert_bool($4)); |
+ return this.invoke($0, $1, $2, $3, $4); |
}; |
ConcreteMember.prototype.provideFieldSyntax$0 = function() { |
return this.provideFieldSyntax(); |
@@ -14824,7 +14370,6 @@ function MethodMember(name, declaringType, definition) { |
// Initializers done |
} |
$inherits(MethodMember, Member); |
-MethodMember.prototype.is$MethodMember = function(){return this;}; |
MethodMember.prototype.get$definition = function() { return this.definition; }; |
MethodMember.prototype.set$definition = function(value) { return this.definition = value; }; |
MethodMember.prototype.get$returnType = function() { return this.returnType; }; |
@@ -14845,7 +14390,7 @@ MethodMember.prototype.get$isConstructor = function() { |
return this.name == this.declaringType.name; |
} |
MethodMember.prototype.get$isMethod = function() { |
- return !$notnull_bool(this.get$isConstructor()); |
+ return !this.get$isConstructor(); |
} |
MethodMember.prototype.get$isNative = function() { |
return (this.definition.body instanceof NativeStatement); |
@@ -14857,15 +14402,13 @@ MethodMember.prototype.get$canSet = function() { |
return false; |
} |
MethodMember.prototype.get$span = function() { |
- var $0; |
- return (($0 = this.definition == null ? null : this.definition.span) && $0.is$SourceSpan()); |
+ return this.definition == null ? null : this.definition.span; |
} |
MethodMember.prototype.get$constructorName = function() { |
- var $0; |
- var returnType = (($0 = this.definition.returnType) && $0.is$NameTypeReference()); |
+ var returnType = this.definition.returnType; |
if (returnType == null) return ''; |
if (returnType.names != null) { |
- return $assert_String(returnType.names.$index(0).get$name()); |
+ return returnType.names.$index(0).get$name(); |
} |
else if (returnType.name != null) { |
return returnType.name.name; |
@@ -14882,8 +14425,8 @@ MethodMember.prototype.get$functionType = function() { |
return this._functionType; |
} |
MethodMember.prototype.override = function(other) { |
- if (!$notnull_bool(Member.prototype.override.call(this, other))) return false; |
- if ($notnull_bool(other.get$isMethod())) { |
+ if (!Member.prototype.override.call(this, other)) return false; |
+ if (other.get$isMethod()) { |
return true; |
} |
else { |
@@ -14898,7 +14441,7 @@ MethodMember.prototype.canInvoke = function(context, args) { |
if (bareCount != args.get$length()) return false; |
} |
else { |
- if (!$notnull_bool(this.parameters.$index(bareCount).get$isOptional())) return false; |
+ if (!this.parameters.$index(bareCount).get$isOptional()) return false; |
for (var i = bareCount; |
i < args.get$length(); i++) { |
if (this.indexOfParameter(args.getName(i)) < 0) { |
@@ -14912,7 +14455,7 @@ MethodMember.prototype.indexOfParameter = function(name) { |
for (var i = 0; |
i < this.parameters.length; i++) { |
var p = this.parameters.$index(i); |
- if ($notnull_bool(p.get$isOptional()) && $notnull_bool($eq(p.get$name(), name))) { |
+ if (p.get$isOptional() && $eq(p.get$name(), name)) { |
return i; |
} |
} |
@@ -14936,24 +14479,24 @@ MethodMember.prototype._set = function(context, Node, target, value, isDynamic) |
MethodMember.prototype._get = function(context, node, target, isDynamic) { |
this.declaringType.genMethod(this); |
this._provideOptionalParamInfo = true; |
- if ($notnull_bool(this.isStatic)) { |
- var type = $notnull_bool(this.declaringType.get$isTop()) ? '' : ('' + this.declaringType.get$jsname() + '.'); |
+ if (this.isStatic) { |
+ var type = this.declaringType.get$isTop() ? '' : ('' + this.declaringType.get$jsname() + '.'); |
return new Value(this.get$functionType(), ('' + type + '' + this.get$jsname() + ''), node.span, true); |
} |
this._providePropertySyntax = true; |
return new Value(this.get$functionType(), ('' + target.code + '.get\$' + this.get$jsname() + '()'), node.span, true); |
} |
MethodMember.prototype.namesInOrder = function(args) { |
- if (!$notnull_bool(args.get$hasNames())) return true; |
+ if (!args.get$hasNames()) return true; |
var lastParameter = null; |
for (var i = args.get$bareCount(); |
i < this.parameters.length; i++) { |
- var p = args.getIndexOfName($assert_String(this.parameters.$index(i).get$name())); |
- if (p >= 0 && $notnull_bool(args.values.$index(p).needsTemp)) { |
- if (lastParameter != null && lastParameter > $assert_num(p)) { |
+ var p = args.getIndexOfName(this.parameters.$index(i).get$name()); |
+ if (p >= 0 && args.values.$index(p).needsTemp) { |
+ if (lastParameter != null && lastParameter > p) { |
return false; |
} |
- lastParameter = $assert_num(p); |
+ lastParameter = p; |
} |
} |
return true; |
@@ -14963,7 +14506,7 @@ MethodMember.prototype.needsArgumentConversion = function(args) { |
for (var i = 0; |
i < bareCount; i++) { |
var arg = args.values.$index(i); |
- if ($notnull_bool(arg.needsConversion$1(this.parameters.$index(i).type))) { |
+ if (arg.needsConversion$1(this.parameters.$index(i).type)) { |
return false; |
} |
} |
@@ -14971,8 +14514,8 @@ MethodMember.prototype.needsArgumentConversion = function(args) { |
this.genParameterValues(); |
for (var i = bareCount; |
i < this.parameters.length; i++) { |
- var arg = args.getValue($assert_String(this.parameters.$index(i).get$name())); |
- if ($notnull_bool($ne(arg, null)) && $notnull_bool(arg.needsConversion$1(this.parameters.$index(i).type))) { |
+ var arg = args.getValue(this.parameters.$index(i).get$name()); |
+ if ($ne(arg, null) && arg.needsConversion$1(this.parameters.$index(i).type)) { |
return false; |
} |
} |
@@ -14980,10 +14523,10 @@ MethodMember.prototype.needsArgumentConversion = function(args) { |
return true; |
} |
MethodMember._argCountMsg = function(actual, expected, atLeast) { |
- return 'wrong number of arguments, expected ' + ('' + ($notnull_bool(atLeast) ? "at least " : "") + '' + expected + ' but found ' + actual + ''); |
+ return 'wrong number of arguments, expected ' + ('' + (atLeast ? "at least " : "") + '' + expected + ' but found ' + actual + ''); |
} |
MethodMember.prototype._argError = function(context, node, target, args, msg) { |
- if ($notnull_bool(this.isStatic) || $notnull_bool(this.get$isConstructor())) { |
+ if (this.isStatic || this.get$isConstructor()) { |
world.error(msg, node.span); |
} |
else { |
@@ -15004,15 +14547,15 @@ MethodMember.prototype.invoke = function(context, node, target, args, isDynamic) |
this.resolve(this.declaringType); |
} |
this.declaringType.genMethod(this); |
- if ($notnull_bool(this.isStatic) || $notnull_bool(this.isFactory)) { |
+ if (this.isStatic || this.isFactory) { |
this.declaringType.markUsed(); |
} |
- if ($notnull_bool(this.get$isNative()) && this.returnType != null) this.returnType.markUsed(); |
- if (!$notnull_bool(this.namesInOrder(args))) { |
+ if (this.get$isNative() && this.returnType != null) this.returnType.markUsed(); |
+ if (!this.namesInOrder(args)) { |
return context.findMembers(this.name).invokeOnVar(context, node, target, args); |
} |
var argsCode = []; |
- if (target != null && ($notnull_bool(this.get$isConstructor()) || $notnull_bool(target.isSuper))) { |
+ if (target != null && (this.get$isConstructor() || target.isSuper)) { |
argsCode.add$1('this'); |
} |
var bareCount = args.get$bareCount(); |
@@ -15021,10 +14564,10 @@ MethodMember.prototype.invoke = function(context, node, target, args, isDynamic) |
var arg = args.values.$index(i); |
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)); |
+ return this._argError(context, node, target, args, msg); |
} |
arg = arg.convertTo$4(context, this.parameters.$index(i).type, node, isDynamic); |
- if ($notnull_bool(this.isConst) && $notnull_bool(arg.get$isConst())) { |
+ if (this.isConst && arg.get$isConst()) { |
argsCode.add$1(arg.get$canonicalCode()); |
} |
else { |
@@ -15036,20 +14579,20 @@ MethodMember.prototype.invoke = function(context, node, target, args, isDynamic) |
var namedArgsUsed = 0; |
for (var i = bareCount; |
i < this.parameters.length; i++) { |
- var arg = args.getValue($assert_String(this.parameters.$index(i).get$name())); |
- if ($notnull_bool(arg == null)) { |
+ var arg = args.getValue(this.parameters.$index(i).get$name()); |
+ if (arg == null) { |
arg = this.parameters.$index(i).get$value(); |
} |
else { |
arg = arg.convertTo$4(context, this.parameters.$index(i).type, node, isDynamic); |
namedArgsUsed++; |
} |
- if ($notnull_bool(arg == null) || !$notnull_bool(this.parameters.$index(i).get$isOptional())) { |
+ if (arg == null || !this.parameters.$index(i).get$isOptional()) { |
var msg = MethodMember._argCountMsg(Math.min(i, args.get$length()), i + 1, true); |
- return this._argError(context, node, target, args, $assert_String(msg)); |
+ return this._argError(context, node, target, args, msg); |
} |
else { |
- argsCode.add$1($notnull_bool(this.isConst) && $notnull_bool(arg.get$isConst()) ? arg.get$canonicalCode() : arg.code); |
+ argsCode.add$1(this.isConst && arg.get$isConst() ? arg.get$canonicalCode() : arg.code); |
} |
} |
if (namedArgsUsed < args.get$nameCount()) { |
@@ -15057,11 +14600,11 @@ MethodMember.prototype.invoke = function(context, node, target, args, isDynamic) |
for (var i = bareCount; |
i < args.get$length(); i++) { |
var name = args.getName(i); |
- if ($notnull_bool(seen.contains$1(name))) { |
+ if (seen.contains$1(name)) { |
return this._argError(context, node, target, args, ('duplicate argument "' + name + '"')); |
} |
seen.add$1(name); |
- var p = this.indexOfParameter($assert_String(name)); |
+ var p = this.indexOfParameter(name); |
if (p < 0) { |
return this._argError(context, node, target, args, ('method does not have optional parameter "' + name + '"')); |
} |
@@ -15071,29 +14614,29 @@ MethodMember.prototype.invoke = function(context, node, target, args, isDynamic) |
} |
world.internalError(('wrong named arguments calling ' + this.name + ''), node.span); |
} |
- Arguments.removeTrailingNulls((argsCode && argsCode.is$List$Value())); |
+ Arguments.removeTrailingNulls(argsCode); |
} |
- var argsString = Strings.join((argsCode && argsCode.is$List$String()), ', '); |
- if ($notnull_bool(this.get$isConstructor())) { |
+ var argsString = Strings.join(argsCode, ', '); |
+ if (this.get$isConstructor()) { |
return this._invokeConstructor(context, node, target, args, argsString); |
} |
- if (target != null && $notnull_bool(target.isSuper)) { |
+ if (target != null && target.isSuper) { |
return new Value(this.get$inferredResult(), ('' + this.declaringType.get$jsname() + '.prototype.' + this.get$jsname() + '.call(' + argsString + ')'), node.span, true); |
} |
- if ($notnull_bool(this.get$isOperator())) { |
+ if (this.get$isOperator()) { |
return this._invokeBuiltin(context, node, target, args, argsCode, isDynamic); |
} |
- if ($notnull_bool(this.isFactory)) { |
+ if (this.isFactory) { |
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())) { |
+ if (this.isStatic) { |
+ if (this.declaringType.get$isTop()) { |
return new Value(this.get$inferredResult(), ('' + this.get$jsname() + '(' + argsString + ')'), node != null ? node.span : node, 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 (target.get$isConst()) { |
if ((target instanceof GlobalValue)) { |
target = target.get$dynamic().exp; |
} |
@@ -15121,8 +14664,8 @@ MethodMember.prototype._invokeConstructor = function(context, node, target, args |
} |
else { |
var code = (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) && $notnull_bool(node.get$dynamic().get$isConst())) { |
- return this._invokeConstConstructor(node, $assert_String(code), target, args); |
+ if (this.isConst && (node instanceof lang_NewExpression) && node.get$dynamic().get$isConst()) { |
+ return this._invokeConstConstructor(node, code, target, args); |
} |
else { |
return new Value(this.declaringType, code, node.span, true); |
@@ -15130,19 +14673,18 @@ MethodMember.prototype._invokeConstructor = function(context, node, target, args |
} |
} |
MethodMember.prototype._invokeConstConstructor = function(node, code, target, args) { |
- var $0; |
var fields = new HashMapImplementation(); |
for (var i = 0; |
i < this.parameters.length; i++) { |
var param = this.parameters.$index(i); |
- if ($notnull_bool(param.isInitializer)) { |
+ if (param.isInitializer) { |
var value = null; |
if (i < args.get$length()) { |
value = args.values.$index(i); |
} |
else { |
- value = args.getValue($assert_String(param.get$name())); |
- if ($notnull_bool(value == null)) { |
+ value = args.getValue(param.get$name()); |
+ if (value == null) { |
value = param.get$value(); |
} |
} |
@@ -15159,8 +14701,8 @@ MethodMember.prototype._invokeConstConstructor = function(node, code, target, ar |
value = args.values.$index(j); |
} |
else { |
- value = args.getValue($assert_String(this.parameters.$index(j).get$name())); |
- if ($notnull_bool(value == null)) { |
+ value = args.getValue(this.parameters.$index(j).get$name()); |
+ if (value == null) { |
value = this.parameters.$index(j).get$value(); |
} |
} |
@@ -15170,10 +14712,10 @@ MethodMember.prototype._invokeConstConstructor = function(node, code, target, ar |
for (var $i = 0;$i < $list.length; $i++) { |
var init = $list.$index($i); |
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 && delegateArgs.is$Arguments()), false); |
+ var delegateArgs = this.generator._makeArgs(init.get$arguments()); |
+ var value = this.initDelegate.invoke(this.generator, node, target, delegateArgs, false); |
if ((init.target instanceof ThisExpression)) { |
- return (value && value.is$Value()); |
+ return value; |
} |
else { |
if ((value instanceof GlobalValue)) { |
@@ -15187,8 +14729,8 @@ MethodMember.prototype._invokeConstConstructor = function(node, code, target, ar |
} |
} |
else { |
- var assign = (init && init.is$BinaryExpression()); |
- var x = (($0 = assign.x) && $0.is$VarExpression()); |
+ var assign = init; |
+ var x = assign.x; |
var fname = x.name.name; |
var val = this.generator.visitValue(assign.y); |
fields.$setindex(fname, val); |
@@ -15199,19 +14741,19 @@ MethodMember.prototype._invokeConstConstructor = function(node, code, target, ar |
var $list = this.declaringType.get$members().getValues(); |
for (var $i = this.declaringType.get$members().getValues().iterator$0(); $i.hasNext$0(); ) { |
var f = $i.next$0(); |
- if ((f instanceof FieldMember) && !$notnull_bool(f.get$isStatic()) && $notnull_bool($ne(f.get$value(), null)) && !fields.containsKey(f.get$name())) { |
+ if ((f instanceof FieldMember) && !f.get$isStatic() && $ne(f.get$value(), null) && !fields.containsKey(f.get$name())) { |
fields.$setindex(f.get$name(), f.computeValue$0()); |
} |
} |
return world.gen.globalForConst(ConstObjectValue.ConstObjectValue$factory(this.declaringType, fields, code, node.span), args.values); |
} |
MethodMember.prototype._invokeBuiltin = function(context, node, target, args, argsCode, isDynamic) { |
- var allConst = $notnull_bool(target.get$isConst()) && args.values.every((function (arg) { |
+ var allConst = target.get$isConst() && args.values.every((function (arg) { |
return arg.get$isConst(); |
}) |
); |
- if ($notnull_bool(this.declaringType.get$isNum())) { |
- if (!$notnull_bool(allConst)) { |
+ if (this.declaringType.get$isNum()) { |
+ if (!allConst) { |
var code; |
if (this.name == '\$negate') { |
code = ('-' + target.code + ''); |
@@ -15232,10 +14774,10 @@ MethodMember.prototype._invokeBuiltin = function(context, node, target, args, ar |
else { |
var value; |
var val0, val1, ival0, ival1; |
- val0 = $assert_num(target.get$dynamic().get$actualValue()); |
+ val0 = target.get$dynamic().get$actualValue(); |
ival0 = val0.toInt(); |
if (args.values.length > 0) { |
- val1 = $assert_num(args.values.$index(0).get$dynamic().get$actualValue()); |
+ val1 = args.values.$index(0).get$dynamic().get$actualValue(); |
ival1 = val1.toInt(); |
} |
switch (this.name) { |
@@ -15343,27 +14885,27 @@ MethodMember.prototype._invokeBuiltin = function(context, node, target, args, ar |
return EvaluatedValue.EvaluatedValue$factory(this.get$inferredResult(), value, ("" + value + ""), node.span); |
} |
} |
- else if ($notnull_bool(this.declaringType.get$isString())) { |
+ else if (this.declaringType.get$isString()) { |
if (this.name == '\$index') { |
return new Value(this.declaringType, ('' + target.code + '[' + argsCode.$index(0) + ']'), node.span, true); |
} |
else if (this.name == '\$add') { |
- if ($notnull_bool(allConst)) { |
+ if (allConst) { |
var val0 = target.get$dynamic().get$actualValue(); |
val0 = val0.substring$2(1, val0.length - 1); |
var val1 = args.values.$index(0).get$dynamic().get$actualValue(); |
- if ($notnull_bool(args.values.$index(0).type.get$isString())) { |
+ if (args.values.$index(0).type.get$isString()) { |
val1 = val1.substring$2(1, val1.length - 1); |
} |
var value = ('' + val0 + '' + val1 + ''); |
value = '"' + value.replaceAll$2('"', '\\"') + '"'; |
- return EvaluatedValue.EvaluatedValue$factory(world.stringType, value, $assert_String(value), node.span); |
+ return EvaluatedValue.EvaluatedValue$factory(world.stringType, value, value, node.span); |
} |
args.values.$index(0).invoke$4(context, 'toString', node, Arguments.get$EMPTY()); |
return new Value(this.declaringType, ('' + target.code + ' + ' + argsCode.$index(0) + ''), node.span, true); |
} |
} |
- else if ($notnull_bool(this.declaringType.get$isNativeType())) { |
+ else if (this.declaringType.get$isNativeType()) { |
if (this.name == '\$index') { |
return new Value(this.returnType, ('' + target.code + '[' + argsCode.$index(0) + ']'), node.span, true); |
} |
@@ -15376,24 +14918,24 @@ MethodMember.prototype._invokeBuiltin = function(context, node, target, args, ar |
if (this.name == '\$ne') { |
target.invoke(context, '\$eq', node, args, isDynamic); |
} |
- if ($notnull_bool(allConst)) { |
+ if (allConst) { |
var val0 = target.get$dynamic().get$actualValue(); |
var val1 = args.values.$index(0).get$dynamic().get$actualValue(); |
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'))) { |
+ if ($eq(argsCode.$index(0), 'null')) { |
return new Value(this.get$inferredResult(), ('' + target.code + ' ' + op + ' null'), node.span, true); |
} |
- else if ($notnull_bool(target.type.get$isNum()) || $notnull_bool(target.type.get$isString())) { |
+ else if (target.type.get$isNum() || target.type.get$isString()) { |
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.get$inferredResult(), ('' + this.name + '(' + target.code + ', ' + argsCode.$index(0) + ')'), node.span, true); |
} |
- if ($notnull_bool(this.get$isCallMethod())) { |
+ if (this.get$isCallMethod()) { |
this.declaringType.markUsed(); |
- return new Value(this.get$inferredResult(), ('' + target.code + '(' + Strings.join((argsCode && argsCode.is$List$String()), ", ") + ')'), node.span, true); |
+ return new Value(this.get$inferredResult(), ('' + target.code + '(' + Strings.join(argsCode, ", ") + ')'), node.span, true); |
} |
if (this.name == '\$index') { |
world.gen.corejs.useIndex = true; |
@@ -15401,39 +14943,39 @@ MethodMember.prototype._invokeBuiltin = function(context, node, target, args, ar |
else if (this.name == '\$setindex') { |
world.gen.corejs.useSetIndex = true; |
} |
- var argsString = Strings.join((argsCode && argsCode.is$List$String()), ', '); |
+ var argsString = Strings.join(argsCode, ', '); |
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()); |
+ this.isAbstract = !this.declaringType.get$isClass(); |
if (this.definition.modifiers != null) { |
var $list = this.definition.modifiers; |
for (var $i = 0;$i < $list.length; $i++) { |
var mod = $list.$index($i); |
- if ($notnull_bool($eq(mod.kind, 86/*TokenKind.STATIC*/))) { |
- if ($notnull_bool(this.isStatic)) { |
+ if ($eq(mod.kind, 86/*TokenKind.STATIC*/)) { |
+ if (this.isStatic) { |
world.error('duplicate static modifier', mod.get$span()); |
} |
this.isStatic = true; |
} |
- else if ($notnull_bool(this.get$isConstructor()) && $notnull_bool($eq(mod.kind, 91/*TokenKind.CONST*/))) { |
- if ($notnull_bool(this.isConst)) { |
+ else if (this.get$isConstructor() && $eq(mod.kind, 91/*TokenKind.CONST*/)) { |
+ if (this.isConst) { |
world.error('duplicate const modifier', mod.get$span()); |
} |
this.isConst = true; |
} |
- else if ($notnull_bool($eq(mod.kind, 75/*TokenKind.FACTORY*/))) { |
- if ($notnull_bool(this.isFactory)) { |
+ else if ($eq(mod.kind, 75/*TokenKind.FACTORY*/)) { |
+ if (this.isFactory) { |
world.error('duplicate factory modifier', mod.get$span()); |
} |
this.isFactory = true; |
} |
- else if ($notnull_bool($eq(mod.kind, 71/*TokenKind.ABSTRACT*/))) { |
- if ($notnull_bool(this.isAbstract)) { |
- if ($notnull_bool(this.declaringType.get$isClass())) { |
+ else if ($eq(mod.kind, 71/*TokenKind.ABSTRACT*/)) { |
+ if (this.isAbstract) { |
+ if (this.declaringType.get$isClass()) { |
world.error('duplicate abstract modifier', mod.get$span()); |
} |
else { |
@@ -15447,31 +14989,31 @@ MethodMember.prototype.resolve = function(inType) { |
} |
} |
} |
- if ($notnull_bool(this.isFactory)) { |
+ if (this.isFactory) { |
this.isStatic = true; |
} |
- if ($notnull_bool(this.get$isOperator()) && $notnull_bool(this.isStatic) && !$notnull_bool(this.get$isCallMethod())) { |
+ if (this.get$isOperator() && this.isStatic && !this.get$isCallMethod()) { |
world.error(('operator method may not be static "' + this.name + '"'), this.get$span()); |
} |
- if ($notnull_bool(this.isAbstract)) { |
+ if (this.isAbstract) { |
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)) { |
+ if (this.isStatic && !(this.declaringType.get$definition() instanceof FunctionTypeDefinition)) { |
world.error('static method can not be abstract', this.get$span()); |
} |
} |
else { |
- if (this.definition.body == null && !$notnull_bool(this.get$isConstructor())) { |
+ if (this.definition.body == null && !this.get$isConstructor()) { |
world.error('method needs a body', this.get$span()); |
} |
} |
- if ($notnull_bool(this.get$isConstructor())) { |
+ if (this.get$isConstructor()) { |
this.returnType = this.declaringType; |
} |
else { |
this.returnType = inType.resolveType(this.definition.returnType, false); |
- if ($notnull_bool(this.isStatic) && $notnull_bool(this.returnType.get$hasTypeParams())) { |
+ if (this.isStatic && this.returnType.get$hasTypeParams()) { |
world.error('using type parameter in static context', this.definition.returnType.span); |
} |
} |
@@ -15483,30 +15025,30 @@ MethodMember.prototype.resolve = function(inType) { |
param.resolve$2(this, inType); |
this.parameters.add(param); |
} |
- if (!$notnull_bool(this.isLambda)) { |
+ if (!this.isLambda) { |
this.get$library()._addMember(this); |
} |
} |
MethodMember.prototype._get$3 = function($0, $1, $2) { |
- return this._get(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), false); |
+ return this._get($0, $1, $2, false); |
}; |
MethodMember.prototype._set$4 = function($0, $1, $2, $3) { |
- return this._set(($0 && $0.is$MethodGenerator()), $1, ($2 && $2.is$Value()), ($3 && $3.is$Value()), false); |
+ return this._set($0, $1, $2, $3, false); |
}; |
MethodMember.prototype.canInvoke$2 = function($0, $1) { |
- return this.canInvoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$Arguments())); |
+ return this.canInvoke($0, $1); |
}; |
MethodMember.prototype.invoke$4 = function($0, $1, $2, $3) { |
- return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Arguments()), false); |
+ return this.invoke($0, $1, $2, $3, false); |
}; |
MethodMember.prototype.invoke$4$isDynamic = function($0, $1, $2, $3, isDynamic) { |
- return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Arguments()), $assert_bool(isDynamic)); |
+ return this.invoke($0, $1, $2, $3, isDynamic); |
}; |
MethodMember.prototype.invoke$5 = function($0, $1, $2, $3, $4) { |
- return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Arguments()), $assert_bool($4)); |
+ return this.invoke($0, $1, $2, $3, $4); |
}; |
MethodMember.prototype.namesInOrder$1 = function($0) { |
- return this.namesInOrder(($0 && $0.is$Arguments())); |
+ return this.namesInOrder($0); |
}; |
MethodMember.prototype.provideFieldSyntax$0 = function() { |
return this.provideFieldSyntax(); |
@@ -15515,7 +15057,7 @@ MethodMember.prototype.providePropertySyntax$0 = function() { |
return this.providePropertySyntax(); |
}; |
MethodMember.prototype.resolve$1 = function($0) { |
- return this.resolve(($0 && $0.is$lang_Type())); |
+ return this.resolve($0); |
}; |
// ********** Code for MemberSet ************** |
function MemberSet(member, isVar) { |
@@ -15525,7 +15067,6 @@ function MemberSet(member, isVar) { |
this.isVar = isVar; |
// Initializers done |
} |
-MemberSet.prototype.is$MemberSet = function(){return this;}; |
MemberSet.prototype.get$name = function() { return this.name; }; |
MemberSet.prototype.get$members = function() { return this.members; }; |
MemberSet.prototype.get$jsname = function() { return this.jsname; }; |
@@ -15543,7 +15084,7 @@ MemberSet.prototype.add = function(member) { |
return this.members.add(member); |
} |
MemberSet.prototype.get$isStatic = function() { |
- return this.members.length == 1 && $notnull_bool(this.members.$index(0).get$isStatic()); |
+ return this.members.length == 1 && this.members.$index(0).get$isStatic(); |
} |
MemberSet.prototype.get$isOperator = function() { |
return this.members.$index(0).get$isOperator(); |
@@ -15555,7 +15096,7 @@ MemberSet.prototype.canInvoke = function(context, args) { |
); |
} |
MemberSet.prototype._makeError = function(node, target, action) { |
- if (!$notnull_bool(target.type.get$isVar())) { |
+ if (!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); |
@@ -15566,18 +15107,18 @@ MemberSet.prototype.get$treatAsField = function() { |
var $list = this.members; |
for (var $i = 0;$i < $list.length; $i++) { |
var member = $list.$index($i); |
- if ($notnull_bool(member.get$requiresFieldSyntax())) { |
+ if (member.get$requiresFieldSyntax()) { |
this._treatAsField = true; |
break; |
} |
- if ($notnull_bool(member.get$prefersPropertySyntax())) { |
+ if (member.get$prefersPropertySyntax()) { |
this._treatAsField = false; |
} |
} |
var $list = this.members; |
for (var $i = 0;$i < $list.length; $i++) { |
var member = $list.$index($i); |
- if ($notnull_bool(this._treatAsField)) { |
+ if (this._treatAsField) { |
member.provideFieldSyntax$0(); |
} |
else { |
@@ -15608,7 +15149,7 @@ MemberSet.prototype._get = function(context, node, target, isDynamic) { |
return this._makeError(node, target, 'getter'); |
} |
if (returnValue.code == null) { |
- if ($notnull_bool(this.get$treatAsField())) { |
+ if (this.get$treatAsField()) { |
return new Value(returnValue.type, ('' + target.code + '.' + this.jsname + ''), node.span, true); |
} |
else { |
@@ -15638,7 +15179,7 @@ MemberSet.prototype._set = function(context, node, target, value, isDynamic) { |
return this._makeError(node, target, 'setter'); |
} |
if (returnValue.code == null) { |
- if ($notnull_bool(this.get$treatAsField())) { |
+ if (this.get$treatAsField()) { |
return new Value(returnValue.type, ('' + target.code + '.' + this.jsname + ' = ' + value.code + ''), node.span, true); |
} |
else { |
@@ -15648,25 +15189,24 @@ MemberSet.prototype._set = function(context, node, target, value, isDynamic) { |
return returnValue; |
} |
MemberSet.prototype.invoke = function(context, node, target, args, isDynamic) { |
- var $0; |
- if ($notnull_bool(this.isVar) && !$notnull_bool(this.get$isOperator())) { |
+ if (this.isVar && !this.get$isOperator()) { |
return this.invokeOnVar(context, node, target, args); |
} |
if (this.members.length == 1) { |
- return (($0 = this.members.$index(0).invoke$5(context, node, target, args, isDynamic)) && $0.is$Value()); |
+ return this.members.$index(0).invoke$5(context, node, target, args, isDynamic); |
} |
var targets = this.members.filter((function (m) { |
return m.canInvoke$2(context, args); |
}) |
); |
if (targets.length == 1) { |
- return (($0 = targets.$index(0).invoke$5(context, node, target, args, isDynamic)) && $0.is$Value()); |
+ return targets.$index(0).invoke$5(context, node, target, args, isDynamic); |
} |
var returnValue = null; |
for (var $i = targets.iterator$0(); $i.hasNext$0(); ) { |
var member = $i.next$0(); |
var res = member.invoke$4$isDynamic(context, node, target, args, true); |
- returnValue = this._tryUnion(returnValue, (res && res.is$Value()), node); |
+ returnValue = this._tryUnion(returnValue, res, node); |
} |
if (returnValue == null) { |
return this._makeError(node, target, 'method'); |
@@ -15675,7 +15215,7 @@ MemberSet.prototype.invoke = function(context, node, target, args, isDynamic) { |
if (this.name == '\$call') { |
return target._varCall(context, args); |
} |
- else if ($notnull_bool(this.get$isOperator())) { |
+ else if (this.get$isOperator()) { |
return target.invokeSpecial(this.name, args, returnValue.type); |
} |
else { |
@@ -15692,18 +15232,18 @@ MemberSet.prototype._tryUnion = function(x, y, node) { |
if (x == null) return y; |
var type = lang_Type.union(x.type, y.type); |
if (x.code == y.code) { |
- if ($notnull_bool($eq(type, x.type))) { |
+ if ($eq(type, x.type)) { |
return x; |
} |
- else if ($notnull_bool(x.get$isConst()) || $notnull_bool(y.get$isConst())) { |
+ else if (x.get$isConst() || y.get$isConst()) { |
world.internalError("unexpected: union of const values "); |
} |
else { |
var ret = new Value(type, x.code, node.span, true); |
- ret.isSuper = $notnull_bool(x.isSuper) && $notnull_bool(y.isSuper); |
- ret.needsTemp = $notnull_bool(x.needsTemp) || $notnull_bool(y.needsTemp); |
- ret.isType = $notnull_bool(x.isType) && $notnull_bool(y.isType); |
- return (ret && ret.is$Value()); |
+ ret.isSuper = x.isSuper && y.isSuper; |
+ ret.needsTemp = x.needsTemp || y.needsTemp; |
+ ret.isType = x.isType && y.isType; |
+ return ret; |
} |
} |
else { |
@@ -15716,41 +15256,41 @@ MemberSet.prototype.getVarMember = function(context, node, args) { |
} |
var stubName = _getCallStubName(this.name, args); |
var stub = world.objectType.varStubs.$index(stubName); |
- if ($notnull_bool(stub == null)) { |
+ if (stub == null) { |
var mset = context.findMembers(this.name).members; |
var targets = mset.filter((function (m) { |
return m.canInvoke$2(context, args); |
}) |
); |
- var returnType = reduce(map((targets && targets.is$Iterable()), (function (t) { |
+ var returnType = reduce(map(targets, (function (t) { |
return t.get$returnType(); |
}) |
), lang_Type.union); |
- stub = new VarMethodSet($assert_String(stubName), targets, args, returnType); |
+ stub = new VarMethodSet(stubName, targets, args, returnType); |
world.objectType.varStubs.$setindex(stubName, stub); |
} |
- return (stub && stub.is$VarMember()); |
+ return stub; |
} |
MemberSet.prototype._get$3 = function($0, $1, $2) { |
- return this._get(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), false); |
+ return this._get($0, $1, $2, false); |
}; |
MemberSet.prototype._set$4 = function($0, $1, $2, $3) { |
- return this._set(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Value()), false); |
+ return this._set($0, $1, $2, $3, false); |
}; |
MemberSet.prototype.add$1 = function($0) { |
- return this.add(($0 && $0.is$Member())); |
+ return this.add($0); |
}; |
MemberSet.prototype.canInvoke$2 = function($0, $1) { |
- return this.canInvoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$Arguments())); |
+ return this.canInvoke($0, $1); |
}; |
MemberSet.prototype.invoke$4 = function($0, $1, $2, $3) { |
- return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Arguments()), false); |
+ return this.invoke($0, $1, $2, $3, false); |
}; |
MemberSet.prototype.invoke$4$isDynamic = function($0, $1, $2, $3, isDynamic) { |
- return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Arguments()), $assert_bool(isDynamic)); |
+ return this.invoke($0, $1, $2, $3, isDynamic); |
}; |
MemberSet.prototype.invoke$5 = function($0, $1, $2, $3, $4) { |
- return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Arguments()), $assert_bool($4)); |
+ return this.invoke($0, $1, $2, $3, $4); |
}; |
MemberSet.prototype.toString$0 = function() { |
return this.toString(); |
@@ -15762,18 +15302,17 @@ function FactoryMap() { |
} |
FactoryMap.prototype.getFactoriesFor = function(typeName) { |
var ret = this.factories.$index(typeName); |
- if ($notnull_bool(ret == null)) { |
+ if (ret == null) { |
ret = $map([]); |
this.factories.$setindex(typeName, ret); |
} |
- return (ret && ret.is$Map$String$Member()); |
+ return ret; |
} |
FactoryMap.prototype.addFactory = function(typeName, name, member) { |
this.getFactoriesFor(typeName).$setindex(name, member); |
} |
FactoryMap.prototype.getFactory = function(typeName, name) { |
- var $0; |
- return (($0 = this.getFactoriesFor(typeName).$index(name)) && $0.is$Member()); |
+ return this.getFactoriesFor(typeName).$index(name); |
} |
FactoryMap.prototype.forEach = function(f) { |
this.factories.forEach((function (_, constructors) { |
@@ -15785,7 +15324,7 @@ FactoryMap.prototype.forEach = function(f) { |
); |
} |
FactoryMap.prototype.getFactory$2 = function($0, $1) { |
- return this.getFactory($assert_String($0), $assert_String($1)); |
+ return this.getFactory($0, $1); |
}; |
// ********** Code for lang_Token ************** |
function lang_Token(kind, source, start, end) { |
@@ -15801,14 +15340,14 @@ lang_Token.prototype.get$text = function() { |
lang_Token.prototype.toString = function() { |
var kindText = TokenKind.kindToString(this.kind); |
var actualText = this.get$text(); |
- if ($notnull_bool($ne(kindText, actualText))) { |
+ if ($ne(kindText, actualText)) { |
if (actualText.length > 10) { |
actualText = actualText.substring$2(0, 8) + '...'; |
} |
return ('' + kindText + '(' + actualText + ')'); |
} |
else { |
- return $assert_String(kindText); |
+ return kindText; |
} |
} |
lang_Token.prototype.get$span = function() { |
@@ -15823,8 +15362,6 @@ function SourceFile(filename, _text) { |
this._text = _text; |
// Initializers done |
} |
-SourceFile.prototype.is$SourceFile = function(){return this;}; |
-SourceFile.prototype.is$Comparable = function(){return this;}; |
SourceFile.prototype.get$text = function() { |
return this._text; |
} |
@@ -15833,12 +15370,12 @@ SourceFile.prototype.get$lineStarts = function() { |
var starts = [0]; |
var index = 0; |
while (index < this.get$text().length) { |
- index = this.get$text().indexOf('\n', $assert_num(index)) + 1; |
+ index = this.get$text().indexOf('\n', index) + 1; |
if (index <= 0) break; |
starts.add$1(index); |
} |
starts.add$1(this.get$text().length + 1); |
- this._lineStarts = (starts && starts.is$List$int()); |
+ this._lineStarts = starts; |
} |
return this._lineStarts; |
} |
@@ -15851,27 +15388,27 @@ SourceFile.prototype.getLine = function(position) { |
world.internalError('bad position'); |
} |
SourceFile.prototype.getColumn = function(line, position) { |
- return position - $assert_num(this.get$lineStarts().$index(line)); |
+ return position - this.get$lineStarts().$index(line); |
} |
SourceFile.prototype.getLocationMessage = function(message, start, end, includeText) { |
var line = this.getLine(start); |
- var column = this.getColumn($assert_num(line), start); |
+ var column = this.getColumn(line, start); |
var buf = new StringBufferImpl(('' + this.filename + ':' + (line + 1) + ':' + (column + 1) + ': ' + message + '')); |
- if ($notnull_bool(includeText)) { |
+ if (includeText) { |
buf.add$1('\n'); |
var textLine; |
if ((line + 2) < this._lineStarts.length) { |
- textLine = this.get$text().substring($assert_num(this._lineStarts.$index(line)), $assert_num(this._lineStarts.$index(line + 1))); |
+ textLine = this.get$text().substring(this._lineStarts.$index(line), this._lineStarts.$index(line + 1)); |
} |
else { |
- textLine = this.get$text().substring($assert_num(this._lineStarts.$index(line))) + '\n'; |
+ textLine = this.get$text().substring(this._lineStarts.$index(line)) + '\n'; |
} |
buf.add$1(textLine); |
var i = 0; |
- for (; i < $assert_num(column); i++) { |
+ for (; i < column; i++) { |
buf.add$1(' '); |
} |
- var toColumn = Math.min($assert_num(column + (end - start)), textLine.length); |
+ var toColumn = Math.min(column + (end - start), textLine.length); |
for (; i < toColumn; i++) { |
buf.add$1('^'); |
} |
@@ -15887,7 +15424,7 @@ SourceFile.prototype.compareTo = function(other) { |
} |
} |
SourceFile.prototype.compareTo$1 = function($0) { |
- return this.compareTo(($0 && $0.is$SourceFile())); |
+ return this.compareTo($0); |
}; |
// ********** Code for SourceSpan ************** |
function SourceSpan(file, start, end) { |
@@ -15896,8 +15433,6 @@ function SourceSpan(file, start, end) { |
this.end = end; |
// Initializers done |
} |
-SourceSpan.prototype.is$SourceSpan = function(){return this;}; |
-SourceSpan.prototype.is$Comparable = function(){return this;}; |
SourceSpan.prototype.get$text = function() { |
return this.file.get$text().substring(this.start, this.end); |
} |
@@ -15906,7 +15441,7 @@ SourceSpan.prototype.toMessageString = function(message) { |
} |
SourceSpan.prototype.get$locationText = function() { |
var line = this.file.getLine(this.start); |
- var column = this.file.getColumn($assert_num(line), this.start); |
+ var column = this.file.getColumn(line, this.start); |
return ('' + this.file.filename + ':' + (line + 1) + ':' + (column + 1) + ''); |
} |
SourceSpan.prototype.compareTo = function(other) { |
@@ -15917,7 +15452,7 @@ SourceSpan.prototype.compareTo = function(other) { |
return this.file.compareTo(other.file); |
} |
SourceSpan.prototype.compareTo$1 = function($0) { |
- return this.compareTo(($0 && $0.is$SourceSpan())); |
+ return this.compareTo($0); |
}; |
// ********** Code for InterpStack ************** |
function InterpStack(previous, quote, isMultiline) { |
@@ -15927,14 +15462,13 @@ function InterpStack(previous, quote, isMultiline) { |
this.depth = -1; |
// Initializers done |
} |
-InterpStack.prototype.is$InterpStack = function(){return this;}; |
InterpStack.prototype.pop = function() { |
return this.previous; |
} |
InterpStack.push = function(stack, quote, isMultiline) { |
var newStack = new InterpStack(stack, quote, isMultiline); |
if (stack != null) newStack.previous = stack; |
- return (newStack && newStack.is$InterpStack()); |
+ return newStack; |
} |
InterpStack.prototype.next$0 = function() { |
return this.next(); |
@@ -15986,9 +15520,9 @@ TokenizerBase.prototype._errorToken = function() { |
} |
TokenizerBase.prototype.finishWhitespace = function() { |
while (this._lang_index < this._text.length) { |
- if (!$notnull_bool(TokenizerHelpers.isWhitespace(this._text.charCodeAt(this._lang_index++)))) { |
+ if (!TokenizerHelpers.isWhitespace(this._text.charCodeAt(this._lang_index++))) { |
this._lang_index--; |
- if ($notnull_bool(this._skipWhitespace)) { |
+ if (this._skipWhitespace) { |
return this.next(); |
} |
else { |
@@ -16010,7 +15544,7 @@ TokenizerBase.prototype.finishSingleLineComment = function() { |
while (true) { |
var ch = this._nextChar(); |
if (ch == 0 || ch == 10 || ch == 13) { |
- if ($notnull_bool(this._skipWhitespace)) { |
+ if (this._skipWhitespace) { |
return this.next(); |
} |
else { |
@@ -16026,8 +15560,8 @@ TokenizerBase.prototype.finishMultiLineComment = function() { |
return this._finishToken(67/*TokenKind.INCOMPLETE_COMMENT*/); |
} |
else if (ch == 42) { |
- if ($notnull_bool(this._maybeEatChar(47))) { |
- if ($notnull_bool(this._skipWhitespace)) { |
+ if (this._maybeEatChar(47)) { |
+ if (this._skipWhitespace) { |
return this.next(); |
} |
else { |
@@ -16040,7 +15574,7 @@ TokenizerBase.prototype.finishMultiLineComment = function() { |
} |
TokenizerBase.prototype.eatDigits = function() { |
while (this._lang_index < this._text.length) { |
- if ($notnull_bool(TokenizerHelpers.isDigit(this._text.charCodeAt(this._lang_index)))) { |
+ if (TokenizerHelpers.isDigit(this._text.charCodeAt(this._lang_index))) { |
this._lang_index++; |
} |
else { |
@@ -16050,7 +15584,7 @@ TokenizerBase.prototype.eatDigits = function() { |
} |
TokenizerBase.prototype.eatHexDigits = function() { |
while (this._lang_index < this._text.length) { |
- if ($notnull_bool(TokenizerHelpers.isHexDigit(this._text.charCodeAt(this._lang_index)))) { |
+ if (TokenizerHelpers.isHexDigit(this._text.charCodeAt(this._lang_index))) { |
this._lang_index++; |
} |
else { |
@@ -16059,7 +15593,7 @@ TokenizerBase.prototype.eatHexDigits = function() { |
} |
} |
TokenizerBase.prototype.maybeEatHexDigit = function() { |
- if (this._lang_index < this._text.length && $notnull_bool(TokenizerHelpers.isHexDigit(this._text.charCodeAt(this._lang_index)))) { |
+ if (this._lang_index < this._text.length && TokenizerHelpers.isHexDigit(this._text.charCodeAt(this._lang_index))) { |
this._lang_index++; |
return true; |
} |
@@ -16073,7 +15607,7 @@ TokenizerBase.prototype.finishNumber = function() { |
this.eatDigits(); |
if (this._peekChar() == 46) { |
this._nextChar(); |
- if ($notnull_bool(TokenizerHelpers.isDigit(this._peekChar()))) { |
+ if (TokenizerHelpers.isDigit(this._peekChar())) { |
this.eatDigits(); |
return this.finishNumberExtra(62/*TokenKind.DOUBLE*/); |
} |
@@ -16084,13 +15618,13 @@ TokenizerBase.prototype.finishNumber = function() { |
return this.finishNumberExtra(60/*TokenKind.INTEGER*/); |
} |
TokenizerBase.prototype.finishNumberExtra = function(kind) { |
- if ($notnull_bool(this._maybeEatChar(101)) || $notnull_bool(this._maybeEatChar(69))) { |
+ if (this._maybeEatChar(101) || this._maybeEatChar(69)) { |
kind = 62/*TokenKind.DOUBLE*/; |
this._maybeEatChar(45); |
this._maybeEatChar(43); |
this.eatDigits(); |
} |
- if (this._peekChar() != 0 && $notnull_bool(TokenizerHelpers.isIdentifierStart(this._peekChar()))) { |
+ if (this._peekChar() != 0 && TokenizerHelpers.isIdentifierStart(this._peekChar())) { |
this._nextChar(); |
return this._errorToken(); |
} |
@@ -16104,8 +15638,8 @@ TokenizerBase.prototype.finishMultilineString = function(quote) { |
return this._finishToken(kind); |
} |
else if (ch == quote) { |
- if ($notnull_bool(this._maybeEatChar(quote))) { |
- if ($notnull_bool(this._maybeEatChar(quote))) { |
+ if (this._maybeEatChar(quote)) { |
+ if (this._maybeEatChar(quote)) { |
return this._finishToken(58/*TokenKind.STRING*/); |
} |
} |
@@ -16115,7 +15649,7 @@ TokenizerBase.prototype.finishMultilineString = function(quote) { |
return this._finishToken(66/*TokenKind.INCOMPLETE_STRING*/); |
} |
else if (ch == 92) { |
- if (!$notnull_bool(this.eatEscapeSequence())) { |
+ if (!this.eatEscapeSequence()) { |
return this._errorToken(); |
} |
} |
@@ -16128,7 +15662,6 @@ TokenizerBase.prototype._finishOpenBrace = function() { |
this._interpStack.depth = 1; |
} |
else { |
- $assert(this._interpStack.depth >= 0, "_interpStack.depth >= 0", "tokenizer.dart", 261, 16); |
($0 = this._interpStack).depth = $0.depth + 1; |
} |
} |
@@ -16138,13 +15671,12 @@ TokenizerBase.prototype._finishCloseBrace = function() { |
var $0; |
if (this._interpStack != null) { |
($0 = this._interpStack).depth = $0.depth - 1; |
- $assert(this._interpStack.depth >= 0, "_interpStack.depth >= 0", "tokenizer.dart", 271, 14); |
} |
return this._finishToken(7/*TokenKind.RBRACE*/); |
} |
TokenizerBase.prototype.finishString = function(quote) { |
- if ($notnull_bool(this._maybeEatChar(quote))) { |
- if ($notnull_bool(this._maybeEatChar(quote))) { |
+ if (this._maybeEatChar(quote)) { |
+ if (this._maybeEatChar(quote)) { |
return this.finishMultilineString(quote); |
} |
else { |
@@ -16154,8 +15686,8 @@ TokenizerBase.prototype.finishString = function(quote) { |
return this.finishStringBody(quote); |
} |
TokenizerBase.prototype.finishRawString = function(quote) { |
- if ($notnull_bool(this._maybeEatChar(quote))) { |
- if ($notnull_bool(this._maybeEatChar(quote))) { |
+ if (this._maybeEatChar(quote)) { |
+ if (this._maybeEatChar(quote)) { |
return this.finishMultilineRawString(quote); |
} |
else { |
@@ -16179,7 +15711,7 @@ TokenizerBase.prototype.finishMultilineRawString = function(quote) { |
var kind = quote == 34 ? 68/*TokenKind.INCOMPLETE_MULTILINE_STRING_DQ*/ : 69/*TokenKind.INCOMPLETE_MULTILINE_STRING_SQ*/; |
return this._finishToken(kind); |
} |
- else if (ch == quote && $notnull_bool(this._maybeEatChar(quote)) && $notnull_bool(this._maybeEatChar(quote))) { |
+ else if (ch == quote && this._maybeEatChar(quote) && this._maybeEatChar(quote)) { |
return this._finishToken(58/*TokenKind.STRING*/); |
} |
} |
@@ -16198,7 +15730,7 @@ TokenizerBase.prototype.finishStringBody = function(quote) { |
return this._finishToken(66/*TokenKind.INCOMPLETE_STRING*/); |
} |
else if (ch == 92) { |
- if (!$notnull_bool(this.eatEscapeSequence())) { |
+ if (!this.eatEscapeSequence()) { |
return this._errorToken(); |
} |
} |
@@ -16209,15 +15741,15 @@ TokenizerBase.prototype.eatEscapeSequence = function() { |
switch (this._nextChar()) { |
case 120: |
- return $notnull_bool(this.maybeEatHexDigit()) && $notnull_bool(this.maybeEatHexDigit()); |
+ return this.maybeEatHexDigit() && this.maybeEatHexDigit(); |
case 117: |
- if ($notnull_bool(this._maybeEatChar(123))) { |
+ if (this._maybeEatChar(123)) { |
var start = this._lang_index; |
this.eatHexDigits(); |
var chars = this._lang_index - start; |
- if (chars > 0 && chars <= 6 && $notnull_bool(this._maybeEatChar(125))) { |
+ if (chars > 0 && chars <= 6 && this._maybeEatChar(125)) { |
hex = this._text.substring(start, start + chars); |
break; |
} |
@@ -16226,7 +15758,7 @@ TokenizerBase.prototype.eatEscapeSequence = function() { |
} |
} |
else { |
- if ($notnull_bool(this.maybeEatHexDigit()) && $notnull_bool(this.maybeEatHexDigit()) && $notnull_bool(this.maybeEatHexDigit()) && $notnull_bool(this.maybeEatHexDigit())) { |
+ if (this.maybeEatHexDigit() && this.maybeEatHexDigit() && this.maybeEatHexDigit() && this.maybeEatHexDigit()) { |
hex = this._text.substring(this._lang_index - 4, this._lang_index); |
break; |
} |
@@ -16244,7 +15776,7 @@ TokenizerBase.prototype.eatEscapeSequence = function() { |
return n < 0xD800 || n > 0xDFFF && n <= 0x10FFFF; |
} |
TokenizerBase.prototype.finishDot = function() { |
- if ($notnull_bool(TokenizerHelpers.isDigit(this._peekChar()))) { |
+ if (TokenizerHelpers.isDigit(this._peekChar())) { |
this.eatDigits(); |
return this.finishNumberExtra(62/*TokenKind.DOUBLE*/); |
} |
@@ -16254,7 +15786,7 @@ TokenizerBase.prototype.finishDot = function() { |
} |
TokenizerBase.prototype.finishIdentifier = function() { |
while (this._lang_index < this._text.length) { |
- if (!$notnull_bool(TokenizerHelpers.isIdentifierPart(this._text.charCodeAt(this._lang_index++)))) { |
+ if (!TokenizerHelpers.isIdentifierPart(this._text.charCodeAt(this._lang_index++))) { |
this._lang_index--; |
break; |
} |
@@ -16284,7 +15816,7 @@ Tokenizer.prototype.next = function() { |
if (this._interpStack != null && this._interpStack.depth == 0) { |
var istack = this._interpStack; |
this._interpStack = this._interpStack.pop(); |
- if ($notnull_bool(istack.isMultiline)) { |
+ if (istack.isMultiline) { |
return this.finishMultilineString(istack.quote); |
} |
else { |
@@ -16307,8 +15839,8 @@ Tokenizer.prototype.next = function() { |
case 33: |
- if ($notnull_bool(this._maybeEatChar(61))) { |
- if ($notnull_bool(this._maybeEatChar(61))) { |
+ if (this._maybeEatChar(61)) { |
+ if (this._maybeEatChar(61)) { |
return this._finishToken(51/*TokenKind.NE_STRICT*/); |
} |
else { |
@@ -16325,7 +15857,7 @@ Tokenizer.prototype.next = function() { |
case 35: |
- if ($notnull_bool(this._maybeEatChar(33))) { |
+ if (this._maybeEatChar(33)) { |
return this.finishHashBang(); |
} |
else { |
@@ -16334,10 +15866,10 @@ Tokenizer.prototype.next = function() { |
case 36: |
- if ($notnull_bool(this._maybeEatChar(34))) { |
+ if (this._maybeEatChar(34)) { |
return this.finishString(34); |
} |
- else if ($notnull_bool(this._maybeEatChar(39))) { |
+ else if (this._maybeEatChar(39)) { |
return this.finishString(39); |
} |
else { |
@@ -16346,7 +15878,7 @@ Tokenizer.prototype.next = function() { |
case 37: |
- if ($notnull_bool(this._maybeEatChar(61))) { |
+ if (this._maybeEatChar(61)) { |
return this._finishToken(32/*TokenKind.ASSIGN_MOD*/); |
} |
else { |
@@ -16355,10 +15887,10 @@ Tokenizer.prototype.next = function() { |
case 38: |
- if ($notnull_bool(this._maybeEatChar(38))) { |
+ if (this._maybeEatChar(38)) { |
return this._finishToken(35/*TokenKind.AND*/); |
} |
- else if ($notnull_bool(this._maybeEatChar(61))) { |
+ else if (this._maybeEatChar(61)) { |
return this._finishToken(23/*TokenKind.ASSIGN_AND*/); |
} |
else { |
@@ -16379,7 +15911,7 @@ Tokenizer.prototype.next = function() { |
case 42: |
- if ($notnull_bool(this._maybeEatChar(61))) { |
+ if (this._maybeEatChar(61)) { |
return this._finishToken(29/*TokenKind.ASSIGN_MUL*/); |
} |
else { |
@@ -16388,10 +15920,10 @@ Tokenizer.prototype.next = function() { |
case 43: |
- if ($notnull_bool(this._maybeEatChar(43))) { |
+ if (this._maybeEatChar(43)) { |
return this._finishToken(16/*TokenKind.INCR*/); |
} |
- else if ($notnull_bool(this._maybeEatChar(61))) { |
+ else if (this._maybeEatChar(61)) { |
return this._finishToken(27/*TokenKind.ASSIGN_ADD*/); |
} |
else { |
@@ -16404,10 +15936,10 @@ Tokenizer.prototype.next = function() { |
case 45: |
- if ($notnull_bool(this._maybeEatChar(45))) { |
+ if (this._maybeEatChar(45)) { |
return this._finishToken(17/*TokenKind.DECR*/); |
} |
- else if ($notnull_bool(this._maybeEatChar(61))) { |
+ else if (this._maybeEatChar(61)) { |
return this._finishToken(28/*TokenKind.ASSIGN_SUB*/); |
} |
else { |
@@ -16416,8 +15948,8 @@ Tokenizer.prototype.next = function() { |
case 46: |
- if ($notnull_bool(this._maybeEatChar(46))) { |
- if ($notnull_bool(this._maybeEatChar(46))) { |
+ if (this._maybeEatChar(46)) { |
+ if (this._maybeEatChar(46)) { |
return this._finishToken(15/*TokenKind.ELLIPSIS*/); |
} |
else { |
@@ -16430,13 +15962,13 @@ Tokenizer.prototype.next = function() { |
case 47: |
- if ($notnull_bool(this._maybeEatChar(42))) { |
+ if (this._maybeEatChar(42)) { |
return this.finishMultiLineComment(); |
} |
- else if ($notnull_bool(this._maybeEatChar(47))) { |
+ else if (this._maybeEatChar(47)) { |
return this.finishSingleLineComment(); |
} |
- else if ($notnull_bool(this._maybeEatChar(61))) { |
+ else if (this._maybeEatChar(61)) { |
return this._finishToken(30/*TokenKind.ASSIGN_DIV*/); |
} |
else { |
@@ -16445,10 +15977,10 @@ Tokenizer.prototype.next = function() { |
case 48: |
- if ($notnull_bool(this._maybeEatChar(88))) { |
+ if (this._maybeEatChar(88)) { |
return this.finishHex(); |
} |
- else if ($notnull_bool(this._maybeEatChar(120))) { |
+ else if (this._maybeEatChar(120)) { |
return this.finishHex(); |
} |
else { |
@@ -16465,15 +15997,15 @@ Tokenizer.prototype.next = function() { |
case 60: |
- if ($notnull_bool(this._maybeEatChar(60))) { |
- if ($notnull_bool(this._maybeEatChar(61))) { |
+ if (this._maybeEatChar(60)) { |
+ if (this._maybeEatChar(61)) { |
return this._finishToken(24/*TokenKind.ASSIGN_SHL*/); |
} |
else { |
return this._finishToken(39/*TokenKind.SHL*/); |
} |
} |
- else if ($notnull_bool(this._maybeEatChar(61))) { |
+ else if (this._maybeEatChar(61)) { |
return this._finishToken(54/*TokenKind.LTE*/); |
} |
else { |
@@ -16482,15 +16014,15 @@ Tokenizer.prototype.next = function() { |
case 61: |
- if ($notnull_bool(this._maybeEatChar(61))) { |
- if ($notnull_bool(this._maybeEatChar(61))) { |
+ if (this._maybeEatChar(61)) { |
+ if (this._maybeEatChar(61)) { |
return this._finishToken(50/*TokenKind.EQ_STRICT*/); |
} |
else { |
return this._finishToken(48/*TokenKind.EQ*/); |
} |
} |
- else if ($notnull_bool(this._maybeEatChar(62))) { |
+ else if (this._maybeEatChar(62)) { |
return this._finishToken(9/*TokenKind.ARROW*/); |
} |
else { |
@@ -16499,15 +16031,15 @@ Tokenizer.prototype.next = function() { |
case 62: |
- if ($notnull_bool(this._maybeEatChar(61))) { |
+ if (this._maybeEatChar(61)) { |
return this._finishToken(55/*TokenKind.GTE*/); |
} |
- else if ($notnull_bool(this._maybeEatChar(62))) { |
- if ($notnull_bool(this._maybeEatChar(61))) { |
+ else if (this._maybeEatChar(62)) { |
+ if (this._maybeEatChar(61)) { |
return this._finishToken(25/*TokenKind.ASSIGN_SAR*/); |
} |
- else if ($notnull_bool(this._maybeEatChar(62))) { |
- if ($notnull_bool(this._maybeEatChar(61))) { |
+ else if (this._maybeEatChar(62)) { |
+ if (this._maybeEatChar(61)) { |
return this._finishToken(26/*TokenKind.ASSIGN_SHR*/); |
} |
else { |
@@ -16528,10 +16060,10 @@ Tokenizer.prototype.next = function() { |
case 64: |
- if ($notnull_bool(this._maybeEatChar(34))) { |
+ if (this._maybeEatChar(34)) { |
return this.finishRawString(34); |
} |
- else if ($notnull_bool(this._maybeEatChar(39))) { |
+ else if (this._maybeEatChar(39)) { |
return this.finishRawString(39); |
} |
else { |
@@ -16540,8 +16072,8 @@ Tokenizer.prototype.next = function() { |
case 91: |
- if ($notnull_bool(this._maybeEatChar(93))) { |
- if ($notnull_bool(this._maybeEatChar(61))) { |
+ if (this._maybeEatChar(93)) { |
+ if (this._maybeEatChar(61)) { |
return this._finishToken(57/*TokenKind.SETINDEX*/); |
} |
else { |
@@ -16558,7 +16090,7 @@ Tokenizer.prototype.next = function() { |
case 94: |
- if ($notnull_bool(this._maybeEatChar(61))) { |
+ if (this._maybeEatChar(61)) { |
return this._finishToken(22/*TokenKind.ASSIGN_XOR*/); |
} |
else { |
@@ -16571,10 +16103,10 @@ Tokenizer.prototype.next = function() { |
case 124: |
- if ($notnull_bool(this._maybeEatChar(61))) { |
+ if (this._maybeEatChar(61)) { |
return this._finishToken(21/*TokenKind.ASSIGN_OR*/); |
} |
- else if ($notnull_bool(this._maybeEatChar(124))) { |
+ else if (this._maybeEatChar(124)) { |
return this._finishToken(34/*TokenKind.OR*/); |
} |
else { |
@@ -16587,8 +16119,8 @@ Tokenizer.prototype.next = function() { |
case 126: |
- if ($notnull_bool(this._maybeEatChar(47))) { |
- if ($notnull_bool(this._maybeEatChar(61))) { |
+ if (this._maybeEatChar(47)) { |
+ if (this._maybeEatChar(61)) { |
return this._finishToken(31/*TokenKind.ASSIGN_TRUNCDIV*/); |
} |
else { |
@@ -16601,10 +16133,10 @@ Tokenizer.prototype.next = function() { |
default: |
- if ($notnull_bool(TokenizerHelpers.isIdentifierStart(ch))) { |
+ if (TokenizerHelpers.isIdentifierStart(ch)) { |
return this.finishIdentifier(); |
} |
- else if ($notnull_bool(TokenizerHelpers.isDigit(ch))) { |
+ else if (TokenizerHelpers.isDigit(ch)) { |
return this.finishNumber(); |
} |
else { |
@@ -16812,13 +16344,13 @@ TokenizerHelpers.isDigit = function(c) { |
return (c >= 48 && c <= 57); |
} |
TokenizerHelpers.isHexDigit = function(c) { |
- return ($notnull_bool(TokenizerHelpers.isDigit(c)) || (c >= 97 && c <= 102) || (c >= 65 && c <= 70)); |
+ return (TokenizerHelpers.isDigit(c) || (c >= 97 && c <= 102) || (c >= 65 && c <= 70)); |
} |
TokenizerHelpers.isWhitespace = function(c) { |
return (c == 32 || c == 9 || c == 10 || c == 13); |
} |
TokenizerHelpers.isIdentifierPart = function(c) { |
- return ($notnull_bool(TokenizerHelpers.isIdentifierStart(c)) || $notnull_bool(TokenizerHelpers.isDigit(c))); |
+ return (TokenizerHelpers.isIdentifierStart(c) || TokenizerHelpers.isDigit(c)); |
} |
// ********** Code for TokenKind ************** |
function TokenKind() {} |
@@ -17637,10 +17169,10 @@ function lang_Parser(source, diet, throwOnIncomplete, optionalSemicolons, startO |
this._inInitializers = false; |
} |
lang_Parser.prototype.isPrematureEndOfFile = function() { |
- if ($notnull_bool(this.throwOnIncomplete) && $notnull_bool(this._maybeEat(1/*TokenKind.END_OF_FILE*/)) || $notnull_bool(this._maybeEat(68/*TokenKind.INCOMPLETE_MULTILINE_STRING_DQ*/)) || $notnull_bool(this._maybeEat(69/*TokenKind.INCOMPLETE_MULTILINE_STRING_SQ*/))) { |
+ if (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*/))) { |
+ else if (this._maybeEat(1/*TokenKind.END_OF_FILE*/)) { |
this._lang_error('unexpected end of file', this._peekToken.get$span()); |
return true; |
} |
@@ -17673,19 +17205,19 @@ lang_Parser.prototype._maybeEat = function(kind) { |
} |
} |
lang_Parser.prototype._eat = function(kind) { |
- if (!$notnull_bool(this._maybeEat(kind))) { |
+ if (!this._maybeEat(kind)) { |
this._errorExpected(TokenKind.kindToString(kind)); |
} |
} |
lang_Parser.prototype._eatSemicolon = function() { |
- if ($notnull_bool(this.optionalSemicolons) && $notnull_bool(this._peekKind(1/*TokenKind.END_OF_FILE*/))) return; |
+ if (this.optionalSemicolons && this._peekKind(1/*TokenKind.END_OF_FILE*/)) return; |
this._eat(10/*TokenKind.SEMICOLON*/); |
} |
lang_Parser.prototype._errorExpected = function(expected) { |
- if ($notnull_bool(this.throwOnIncomplete)) this.isPrematureEndOfFile(); |
+ if (this.throwOnIncomplete) this.isPrematureEndOfFile(); |
var tok = this._lang_next(); |
var message = ('expected ' + expected + ', but found ' + tok + ''); |
- this._lang_error($assert_String(message), tok.get$span()); |
+ this._lang_error(message, tok.get$span()); |
} |
lang_Parser.prototype._lang_error = function(message, location) { |
if (location == null) { |
@@ -17698,14 +17230,14 @@ lang_Parser.prototype._skipBlock = function() { |
this._eat(6/*TokenKind.LBRACE*/); |
while (true) { |
var tok = this._lang_next(); |
- if ($notnull_bool($eq(tok.kind, 6/*TokenKind.LBRACE*/))) { |
+ if ($eq(tok.kind, 6/*TokenKind.LBRACE*/)) { |
depth += 1; |
} |
- else if ($notnull_bool($eq(tok.kind, 7/*TokenKind.RBRACE*/))) { |
+ else if ($eq(tok.kind, 7/*TokenKind.RBRACE*/)) { |
depth -= 1; |
if (depth == 0) return; |
} |
- else if ($notnull_bool($eq(tok.kind, 1/*TokenKind.END_OF_FILE*/))) { |
+ else if ($eq(tok.kind, 1/*TokenKind.END_OF_FILE*/)) { |
this._lang_error('unexpected end of file during diet parse', tok.get$span()); |
return; |
} |
@@ -17717,13 +17249,13 @@ lang_Parser.prototype._makeSpan = function(start) { |
lang_Parser.prototype.compilationUnit = function() { |
var ret = []; |
this._maybeEat(13/*TokenKind.HASHBANG*/); |
- while ($notnull_bool(this._peekKind(12/*TokenKind.HASH*/))) { |
+ while (this._peekKind(12/*TokenKind.HASH*/)) { |
ret.add$1(this.directive()); |
} |
- while (!$notnull_bool(this._maybeEat(1/*TokenKind.END_OF_FILE*/))) { |
+ while (!this._maybeEat(1/*TokenKind.END_OF_FILE*/)) { |
ret.add$1(this.topLevelDefinition()); |
} |
- return (ret && ret.is$List$Definition()); |
+ return ret; |
} |
lang_Parser.prototype.directive = function() { |
var start = this._peekToken.start; |
@@ -17758,29 +17290,29 @@ lang_Parser.prototype.classDefinition = function(kind) { |
this._eat(kind); |
var name = this.identifier(); |
var typeParams = null; |
- if ($notnull_bool(this._peekKind(52/*TokenKind.LT*/))) { |
+ if (this._peekKind(52/*TokenKind.LT*/)) { |
typeParams = this.typeParameters(); |
} |
var _extends = null; |
- if ($notnull_bool(this._maybeEat(74/*TokenKind.EXTENDS*/))) { |
+ if (this._maybeEat(74/*TokenKind.EXTENDS*/)) { |
_extends = this.typeList(); |
} |
var _implements = null; |
- if ($notnull_bool(this._maybeEat(77/*TokenKind.IMPLEMENTS*/))) { |
+ if (this._maybeEat(77/*TokenKind.IMPLEMENTS*/)) { |
_implements = this.typeList(); |
} |
var _native = null; |
- if ($notnull_bool(this._maybeEat(81/*TokenKind.NATIVE*/))) { |
+ if (this._maybeEat(81/*TokenKind.NATIVE*/)) { |
_native = this.maybeStringLiteral(); |
} |
var _factory = null; |
- if ($notnull_bool(this._maybeEat(75/*TokenKind.FACTORY*/))) { |
+ if (this._maybeEat(75/*TokenKind.FACTORY*/)) { |
_factory = this.type(0); |
} |
var body = []; |
- if ($notnull_bool(this._maybeEat(6/*TokenKind.LBRACE*/))) { |
- while (!$notnull_bool(this._maybeEat(7/*TokenKind.RBRACE*/))) { |
- if ($notnull_bool(this.isPrematureEndOfFile())) break; |
+ if (this._maybeEat(6/*TokenKind.LBRACE*/)) { |
+ while (!this._maybeEat(7/*TokenKind.RBRACE*/)) { |
+ if (this.isPrematureEndOfFile()) break; |
body.add$1(this.declaration(true)); |
} |
} |
@@ -17794,7 +17326,7 @@ lang_Parser.prototype.functionTypeAlias = function() { |
this._eat(87/*TokenKind.TYPEDEF*/); |
var di = this.declaredIdentifier(false); |
var typeParams = null; |
- if ($notnull_bool(this._peekKind(52/*TokenKind.LT*/))) { |
+ if (this._peekKind(52/*TokenKind.LT*/)) { |
typeParams = this.typeParameters(); |
} |
var formals = this.formalParameterList(); |
@@ -17808,21 +17340,21 @@ lang_Parser.prototype.initializers = function() { |
do { |
ret.add$1(this.expression()); |
} |
- while ($notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) |
+ while (this._maybeEat(11/*TokenKind.COMMA*/)) |
this._inInitializers = false; |
return ret; |
} |
lang_Parser.prototype.functionBody = function(inExpression) { |
var start = this._peekToken.start; |
- if ($notnull_bool(this._maybeEat(9/*TokenKind.ARROW*/))) { |
+ if (this._maybeEat(9/*TokenKind.ARROW*/)) { |
var expr = this.expression(); |
- if (!$notnull_bool(inExpression)) { |
+ if (!inExpression) { |
this._eatSemicolon(); |
} |
return new ReturnStatement(expr, this._makeSpan(start)); |
} |
- else if ($notnull_bool(this._peekKind(6/*TokenKind.LBRACE*/))) { |
- if ($notnull_bool(this.diet)) { |
+ else if (this._peekKind(6/*TokenKind.LBRACE*/)) { |
+ if (this.diet) { |
this._skipBlock(); |
return new DietStatement(this._makeSpan(start)); |
} |
@@ -17830,13 +17362,13 @@ lang_Parser.prototype.functionBody = function(inExpression) { |
return this.block(); |
} |
} |
- else if (!$notnull_bool(inExpression)) { |
- if ($notnull_bool(this._maybeEat(10/*TokenKind.SEMICOLON*/))) { |
+ else if (!inExpression) { |
+ if (this._maybeEat(10/*TokenKind.SEMICOLON*/)) { |
return null; |
} |
- else if ($notnull_bool(this._maybeEat(81/*TokenKind.NATIVE*/))) { |
+ else if (this._maybeEat(81/*TokenKind.NATIVE*/)) { |
var nativeBody = this.maybeStringLiteral(); |
- if ($notnull_bool(this._peekKind(10/*TokenKind.SEMICOLON*/))) { |
+ if (this._peekKind(10/*TokenKind.SEMICOLON*/)) { |
this._eatSemicolon(); |
return new NativeStatement(nativeBody, this._makeSpan(start)); |
} |
@@ -17850,9 +17382,9 @@ lang_Parser.prototype.functionBody = function(inExpression) { |
lang_Parser.prototype.finishField = function(start, modifiers, type, name, value) { |
var names = [name]; |
var values = [value]; |
- while ($notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) { |
+ while (this._maybeEat(11/*TokenKind.COMMA*/)) { |
names.add$1(this.identifier()); |
- if ($notnull_bool(this._maybeEat(20/*TokenKind.ASSIGN*/))) { |
+ if (this._maybeEat(20/*TokenKind.ASSIGN*/)) { |
values.add$1(this.expression()); |
} |
else { |
@@ -17860,23 +17392,22 @@ lang_Parser.prototype.finishField = function(start, modifiers, type, name, value |
} |
} |
this._eatSemicolon(); |
- return new VariableDefinition(modifiers, type, names, values, this._makeSpan($assert_num(start))); |
+ return new VariableDefinition(modifiers, type, names, values, this._makeSpan(start)); |
} |
lang_Parser.prototype.finishDefinition = function(start, modifiers, di) { |
- var $0; |
switch (this._peek()) { |
case 2/*TokenKind.LPAREN*/: |
var formals = this.formalParameterList(); |
var inits = null; |
- if ($notnull_bool(this._maybeEat(8/*TokenKind.COLON*/))) { |
+ if (this._maybeEat(8/*TokenKind.COLON*/)) { |
inits = this.initializers(); |
} |
var body = this.functionBody(false); |
- if ($notnull_bool(di.get$name() == null)) { |
- di.set$name(di.type.get$name()); |
+ if (di.get$name() == null) { |
+ di.name = di.type.get$name(); |
} |
- return new FunctionDefinition(modifiers, di.type, di.get$name(), formals, inits, body, this._makeSpan($assert_num(start))); |
+ return new FunctionDefinition(modifiers, di.type, di.get$name(), formals, inits, body, this._makeSpan(start)); |
case 20/*TokenKind.ASSIGN*/: |
@@ -17898,7 +17429,7 @@ lang_Parser.prototype.finishDefinition = function(start, modifiers, di) { |
} |
lang_Parser.prototype.declaration = function(includeOperators) { |
var start = this._peekToken.start; |
- if ($notnull_bool(this._peekKind(75/*TokenKind.FACTORY*/))) { |
+ if (this._peekKind(75/*TokenKind.FACTORY*/)) { |
return this.factoryConstructorDeclaration(); |
} |
var modifiers = this._readModifiers(); |
@@ -17908,19 +17439,19 @@ lang_Parser.prototype.factoryConstructorDeclaration = function() { |
var start = this._peekToken.start; |
var factoryToken = this._lang_next(); |
var names = [this.identifier()]; |
- while ($notnull_bool(this._maybeEat(14/*TokenKind.DOT*/))) { |
+ while (this._maybeEat(14/*TokenKind.DOT*/)) { |
names.add$1(this.identifier()); |
} |
var typeParams = null; |
- if ($notnull_bool(this._peekKind(52/*TokenKind.LT*/))) { |
+ if (this._peekKind(52/*TokenKind.LT*/)) { |
typeParams = this.typeParameters(); |
} |
var name = null; |
var type = null; |
- if ($notnull_bool(this._maybeEat(14/*TokenKind.DOT*/))) { |
+ if (this._maybeEat(14/*TokenKind.DOT*/)) { |
name = this.identifier(); |
} |
- else if ($notnull_bool(typeParams == null)) { |
+ else if (typeParams == null) { |
if (names.length > 1) { |
name = names.removeLast$0(); |
} |
@@ -17939,27 +17470,26 @@ lang_Parser.prototype.factoryConstructorDeclaration = function() { |
return this.finishDefinition(start, [factoryToken], di); |
} |
lang_Parser.prototype.statement = function() { |
- var $0; |
switch (this._peek()) { |
case 88/*TokenKind.BREAK*/: |
- return (($0 = this.breakStatement()) && $0.is$lang_Statement()); |
+ return this.breakStatement(); |
case 92/*TokenKind.CONTINUE*/: |
- return (($0 = this.continueStatement()) && $0.is$lang_Statement()); |
+ return this.continueStatement(); |
case 105/*TokenKind.RETURN*/: |
- return (($0 = this.returnStatement()) && $0.is$lang_Statement()); |
+ return this.returnStatement(); |
case 109/*TokenKind.THROW*/: |
- return (($0 = this.throwStatement()) && $0.is$lang_Statement()); |
+ return this.throwStatement(); |
case 72/*TokenKind.ASSERT*/: |
- return (($0 = this.assertStatement()) && $0.is$lang_Statement()); |
+ return this.assertStatement(); |
case 114/*TokenKind.WHILE*/: |
@@ -17971,7 +17501,7 @@ lang_Parser.prototype.statement = function() { |
case 99/*TokenKind.FOR*/: |
- return (($0 = this.forStatement()) && $0.is$lang_Statement()); |
+ return this.forStatement(); |
case 100/*TokenKind.IF*/: |
@@ -17979,11 +17509,11 @@ lang_Parser.prototype.statement = function() { |
case 107/*TokenKind.SWITCH*/: |
- return (($0 = this.switchStatement()) && $0.is$lang_Statement()); |
+ return this.switchStatement(); |
case 111/*TokenKind.TRY*/: |
- return (($0 = this.tryStatement()) && $0.is$lang_Statement()); |
+ return this.tryStatement(); |
case 6/*TokenKind.LBRACE*/: |
@@ -17995,22 +17525,21 @@ lang_Parser.prototype.statement = function() { |
case 97/*TokenKind.FINAL*/: |
- return (($0 = this.declaration(false)) && $0.is$lang_Statement()); |
+ return this.declaration(false); |
case 112/*TokenKind.VAR*/: |
- return (($0 = this.declaration(false)) && $0.is$lang_Statement()); |
+ return this.declaration(false); |
default: |
- return (($0 = this.finishExpressionAsStatement(this.expression())) && $0.is$lang_Statement()); |
+ return this.finishExpressionAsStatement(this.expression()); |
} |
} |
lang_Parser.prototype.finishExpressionAsStatement = function(expr) { |
- var $0; |
var start = expr.get$span().start; |
- if ($notnull_bool(this._maybeEat(8/*TokenKind.COLON*/))) { |
+ if (this._maybeEat(8/*TokenKind.COLON*/)) { |
var label = this._makeLabel(expr); |
return new LabeledStatement(label, this.statement(), this._makeSpan(start)); |
} |
@@ -18023,22 +17552,22 @@ lang_Parser.prototype.finishExpressionAsStatement = function(expr) { |
} |
else if ((expr instanceof DeclaredIdentifier)) { |
var value = null; |
- if ($notnull_bool(this._maybeEat(20/*TokenKind.ASSIGN*/))) { |
+ if (this._maybeEat(20/*TokenKind.ASSIGN*/)) { |
value = this.expression(); |
} |
return this.finishField(start, null, expr.type, expr.get$name(), value); |
} |
- else if ($notnull_bool(this._isBin(expr, 20/*TokenKind.ASSIGN*/)) && ((expr.x instanceof DeclaredIdentifier))) { |
- var di = (($0 = expr.x) && $0.is$DeclaredIdentifier()); |
+ else if (this._isBin(expr, 20/*TokenKind.ASSIGN*/) && ((expr.x instanceof DeclaredIdentifier))) { |
+ var di = expr.x; |
return this.finishField(start, null, di.type, di.name, expr.y); |
} |
- else if ($notnull_bool(this._isBin(expr, 52/*TokenKind.LT*/)) && $notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) { |
+ else if (this._isBin(expr, 52/*TokenKind.LT*/) && this._maybeEat(11/*TokenKind.COMMA*/)) { |
var baseType = this._makeType(expr.x); |
var typeArgs = [this._makeType(expr.y)]; |
- var gt = this._finishTypeArguments((baseType && baseType.is$TypeReference()), 0, typeArgs); |
+ var gt = this._finishTypeArguments(baseType, 0, typeArgs); |
var name = this.identifier(); |
var value = null; |
- if ($notnull_bool(this._maybeEat(20/*TokenKind.ASSIGN*/))) { |
+ if (this._maybeEat(20/*TokenKind.ASSIGN*/)) { |
value = this.expression(); |
} |
return this.finishField(expr.get$span().start, null, gt, name, value); |
@@ -18052,14 +17581,14 @@ lang_Parser.prototype.testCondition = function() { |
this._eat(2/*TokenKind.LPAREN*/); |
var ret = this.expression(); |
this._eat(3/*TokenKind.RPAREN*/); |
- return (ret && ret.is$lang_Expression()); |
+ return ret; |
} |
lang_Parser.prototype.block = function() { |
var start = this._peekToken.start; |
this._eat(6/*TokenKind.LBRACE*/); |
var stmts = []; |
- while (!$notnull_bool(this._maybeEat(7/*TokenKind.RBRACE*/))) { |
- if ($notnull_bool(this.isPrematureEndOfFile())) break; |
+ while (!this._maybeEat(7/*TokenKind.RBRACE*/)) { |
+ if (this.isPrematureEndOfFile()) break; |
stmts.add$1(this.statement()); |
} |
return new BlockStatement(stmts, this._makeSpan(start)); |
@@ -18075,7 +17604,7 @@ lang_Parser.prototype.ifStatement = function() { |
var test = this.testCondition(); |
var trueBranch = this.statement(); |
var falseBranch = null; |
- if ($notnull_bool(this._maybeEat(95/*TokenKind.ELSE*/))) { |
+ if (this._maybeEat(95/*TokenKind.ELSE*/)) { |
falseBranch = this.statement(); |
} |
return new IfStatement(test, trueBranch, falseBranch, this._makeSpan(start)); |
@@ -18105,14 +17634,14 @@ lang_Parser.prototype.forStatement = function() { |
return init; |
} |
var test = null; |
- if (!$notnull_bool(this._maybeEat(10/*TokenKind.SEMICOLON*/))) { |
+ if (!this._maybeEat(10/*TokenKind.SEMICOLON*/)) { |
test = this.expression(); |
this._eatSemicolon(); |
} |
var step = []; |
- if (!$notnull_bool(this._maybeEat(3/*TokenKind.RPAREN*/))) { |
+ if (!this._maybeEat(3/*TokenKind.RPAREN*/)) { |
step.add$1(this.expression()); |
- while ($notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) { |
+ while (this._maybeEat(11/*TokenKind.COMMA*/)) { |
step.add$1(this.expression()); |
} |
this._eat(3/*TokenKind.RPAREN*/); |
@@ -18121,22 +17650,21 @@ lang_Parser.prototype.forStatement = function() { |
return new ForStatement(init, test, step, body, this._makeSpan(start)); |
} |
lang_Parser.prototype.forInitializerStatement = function(start) { |
- var $0; |
- if ($notnull_bool(this._maybeEat(10/*TokenKind.SEMICOLON*/))) { |
+ if (this._maybeEat(10/*TokenKind.SEMICOLON*/)) { |
return null; |
} |
else { |
var init = this.expression(); |
- if ($notnull_bool(this._peekKind(11/*TokenKind.COMMA*/)) && $notnull_bool(this._isBin(init, 52/*TokenKind.LT*/))) { |
+ if (this._peekKind(11/*TokenKind.COMMA*/) && this._isBin(init, 52/*TokenKind.LT*/)) { |
this._eat(11/*TokenKind.COMMA*/); |
var baseType = this._makeType(init.x); |
var typeArgs = [this._makeType(init.y)]; |
- var gt = this._finishTypeArguments((baseType && baseType.is$TypeReference()), 0, typeArgs); |
+ var gt = this._finishTypeArguments(baseType, 0, typeArgs); |
var name = this.identifier(); |
init = new DeclaredIdentifier(gt, name, this._makeSpan(init.get$span().start)); |
} |
- if ($notnull_bool(this._maybeEat(101/*TokenKind.IN*/))) { |
- return this._finishForIn(start, (($0 = this._makeDeclaredIdentifier(init)) && $0.is$DeclaredIdentifier())); |
+ if (this._maybeEat(101/*TokenKind.IN*/)) { |
+ return this._finishForIn(start, this._makeDeclaredIdentifier(init)); |
} |
else { |
return this.finishExpressionAsStatement(init); |
@@ -18154,11 +17682,11 @@ lang_Parser.prototype.tryStatement = function() { |
this._eat(111/*TokenKind.TRY*/); |
var body = this.block(); |
var catches = []; |
- while ($notnull_bool(this._peekKind(90/*TokenKind.CATCH*/))) { |
+ while (this._peekKind(90/*TokenKind.CATCH*/)) { |
catches.add$1(this.catchNode()); |
} |
var finallyBlock = null; |
- if ($notnull_bool(this._maybeEat(98/*TokenKind.FINALLY*/))) { |
+ if (this._maybeEat(98/*TokenKind.FINALLY*/)) { |
finallyBlock = this.block(); |
} |
return new TryStatement(body, catches, finallyBlock, this._makeSpan(start)); |
@@ -18169,7 +17697,7 @@ lang_Parser.prototype.catchNode = function() { |
this._eat(2/*TokenKind.LPAREN*/); |
var exc = this.declaredIdentifier(false); |
var trace = null; |
- if ($notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) { |
+ if (this._maybeEat(11/*TokenKind.COMMA*/)) { |
trace = this.declaredIdentifier(false); |
} |
this._eat(3/*TokenKind.RPAREN*/); |
@@ -18182,29 +17710,29 @@ lang_Parser.prototype.switchStatement = function() { |
var test = this.testCondition(); |
var cases = []; |
this._eat(6/*TokenKind.LBRACE*/); |
- while (!$notnull_bool(this._maybeEat(7/*TokenKind.RBRACE*/))) { |
+ while (!this._maybeEat(7/*TokenKind.RBRACE*/)) { |
cases.add$1(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*/)) || $notnull_bool($eq(kind, 89/*TokenKind.CASE*/)) || $notnull_bool($eq(kind, 93/*TokenKind.DEFAULT*/)); |
+ return $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; |
var label = null; |
- if ($notnull_bool(this._peekIdentifier())) { |
+ if (this._peekIdentifier()) { |
label = this.identifier(); |
this._eat(8/*TokenKind.COLON*/); |
} |
var cases = []; |
while (true) { |
- if ($notnull_bool(this._maybeEat(89/*TokenKind.CASE*/))) { |
+ if (this._maybeEat(89/*TokenKind.CASE*/)) { |
cases.add$1(this.expression()); |
this._eat(8/*TokenKind.COLON*/); |
} |
- else if ($notnull_bool(this._maybeEat(93/*TokenKind.DEFAULT*/))) { |
+ else if (this._maybeEat(93/*TokenKind.DEFAULT*/)) { |
cases.add$1(); |
this._eat(8/*TokenKind.COLON*/); |
} |
@@ -18216,8 +17744,8 @@ lang_Parser.prototype.caseNode = function() { |
this._lang_error('case or default'); |
} |
var stmts = []; |
- while (!$notnull_bool(this._peekCaseEnd())) { |
- if ($notnull_bool(this.isPrematureEndOfFile())) break; |
+ while (!this._peekCaseEnd()) { |
+ if (this.isPrematureEndOfFile()) break; |
stmts.add$1(this.statement()); |
} |
return new CaseNode(label, cases, stmts, this._makeSpan(start)); |
@@ -18226,7 +17754,7 @@ lang_Parser.prototype.returnStatement = function() { |
var start = this._peekToken.start; |
this._eat(105/*TokenKind.RETURN*/); |
var expr; |
- if ($notnull_bool(this._maybeEat(10/*TokenKind.SEMICOLON*/))) { |
+ if (this._maybeEat(10/*TokenKind.SEMICOLON*/)) { |
expr = null; |
} |
else { |
@@ -18239,7 +17767,7 @@ lang_Parser.prototype.throwStatement = function() { |
var start = this._peekToken.start; |
this._eat(109/*TokenKind.THROW*/); |
var expr; |
- if ($notnull_bool(this._maybeEat(10/*TokenKind.SEMICOLON*/))) { |
+ if (this._maybeEat(10/*TokenKind.SEMICOLON*/)) { |
expr = null; |
} |
else { |
@@ -18261,7 +17789,7 @@ lang_Parser.prototype.breakStatement = function() { |
var start = this._peekToken.start; |
this._eat(88/*TokenKind.BREAK*/); |
var name = null; |
- if ($notnull_bool(this._peekIdentifier())) { |
+ if (this._peekIdentifier()) { |
name = this.identifier(); |
} |
this._eatSemicolon(); |
@@ -18271,7 +17799,7 @@ lang_Parser.prototype.continueStatement = function() { |
var start = this._peekToken.start; |
this._eat(92/*TokenKind.CONTINUE*/); |
var name = null; |
- if ($notnull_bool(this._peekIdentifier())) { |
+ if (this._peekIdentifier()) { |
name = this.identifier(); |
} |
this._eatSemicolon(); |
@@ -18301,32 +17829,29 @@ lang_Parser.prototype._makeType = function(expr) { |
} |
} |
lang_Parser.prototype.infixExpression = function(precedence) { |
- var $0; |
- return this.finishInfixExpression((($0 = this.unaryExpression()) && $0.is$lang_Expression()), precedence); |
+ return this.finishInfixExpression(this.unaryExpression(), precedence); |
} |
lang_Parser.prototype._finishDeclaredId = function(type) { |
var name = this.identifier(); |
return this.finishPostfixExpression(new DeclaredIdentifier(type, name, this._makeSpan(type.get$span().start))); |
} |
lang_Parser.prototype._fixAsType = function(x) { |
- $assert(this._isBin(x, 52/*TokenKind.LT*/), "_isBin(x, TokenKind.LT)", "parser.dart", 790, 12); |
- if ($notnull_bool(this._maybeEat(53/*TokenKind.GT*/))) { |
+ if (this._maybeEat(53/*TokenKind.GT*/)) { |
var base = this._makeType(x.x); |
var typeParam = this._makeType(x.y); |
var type = new GenericTypeReference(base, [typeParam], 0, this._makeSpan(x.span.start)); |
return this._finishDeclaredId(type); |
} |
else { |
- $assert(this._peekKind(52/*TokenKind.LT*/), "_peekKind(TokenKind.LT)", "parser.dart", 801, 14); |
var base = this._makeType(x.x); |
var paramBase = this._makeType(x.y); |
- var firstParam = this.addTypeArguments((paramBase && paramBase.is$TypeReference()), 1); |
+ var firstParam = this.addTypeArguments(paramBase, 1); |
var type; |
if (firstParam.depth <= 0) { |
type = new GenericTypeReference(base, [firstParam], 0, this._makeSpan(x.span.start)); |
} |
- else if ($notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) { |
- type = this._finishTypeArguments((base && base.is$TypeReference()), 0, [firstParam]); |
+ else if (this._maybeEat(11/*TokenKind.COMMA*/)) { |
+ type = this._finishTypeArguments(base, 0, [firstParam]); |
} |
else { |
this._eat(53/*TokenKind.GT*/); |
@@ -18341,21 +17866,21 @@ lang_Parser.prototype.finishInfixExpression = function(x, precedence) { |
var prec = TokenKind.infixPrecedence(this._peek()); |
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())); |
+ if (this._isBin(x, 52/*TokenKind.LT*/)) { |
+ return this._fixAsType(x); |
} |
} |
var op = this._lang_next(); |
- if ($notnull_bool($eq(op.kind, 102/*TokenKind.IS*/))) { |
- var isTrue = !$notnull_bool(this._maybeEat(19/*TokenKind.NOT*/)); |
+ if ($eq(op.kind, 102/*TokenKind.IS*/)) { |
+ var isTrue = !this._maybeEat(19/*TokenKind.NOT*/); |
var typeRef = this.type(0); |
x = new IsExpression(isTrue, x, typeRef, this._makeSpan(x.span.start)); |
continue; |
} |
- var y = this.infixExpression($assert_num($notnull_bool($eq(prec, 2)) ? prec : prec + 1)); |
- if ($notnull_bool($eq(op.kind, 33/*TokenKind.CONDITIONAL*/))) { |
+ var y = this.infixExpression($eq(prec, 2) ? prec : prec + 1); |
+ if ($eq(op.kind, 33/*TokenKind.CONDITIONAL*/)) { |
this._eat(8/*TokenKind.COLON*/); |
- var z = this.infixExpression($assert_num(prec)); |
+ var z = this.infixExpression(prec); |
x = new ConditionalExpression(x, y, z, this._makeSpan(x.span.start)); |
} |
else { |
@@ -18387,7 +17912,7 @@ lang_Parser.prototype._isPrefixUnaryOperator = function(kind) { |
} |
lang_Parser.prototype.unaryExpression = function() { |
var start = this._peekToken.start; |
- if ($notnull_bool(this._isPrefixUnaryOperator(this._peek()))) { |
+ if (this._isPrefixUnaryOperator(this._peek())) { |
var tok = this._lang_next(); |
var expr = this.unaryExpression(); |
return new UnaryExpression(tok, expr, this._makeSpan(start)); |
@@ -18398,11 +17923,11 @@ lang_Parser.prototype.argument = function() { |
var start = this._peekToken.start; |
var expr; |
var label = null; |
- if ($notnull_bool(this._maybeEat(15/*TokenKind.ELLIPSIS*/))) { |
+ if (this._maybeEat(15/*TokenKind.ELLIPSIS*/)) { |
label = new lang_Identifier('...', this._makeSpan(start)); |
} |
expr = this.expression(); |
- if (label == null && $notnull_bool(this._maybeEat(8/*TokenKind.COLON*/))) { |
+ if (label == null && this._maybeEat(8/*TokenKind.COLON*/)) { |
label = this._makeLabel(expr); |
expr = this.expression(); |
} |
@@ -18411,11 +17936,11 @@ lang_Parser.prototype.argument = function() { |
lang_Parser.prototype.arguments = function() { |
var args = []; |
this._eat(2/*TokenKind.LPAREN*/); |
- if (!$notnull_bool(this._maybeEat(3/*TokenKind.RPAREN*/))) { |
+ if (!this._maybeEat(3/*TokenKind.RPAREN*/)) { |
do { |
args.add$1(this.argument()); |
} |
- while ($notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) |
+ while (this._maybeEat(11/*TokenKind.COMMA*/)) |
this._eat(3/*TokenKind.RPAREN*/); |
} |
return args; |
@@ -18452,13 +17977,13 @@ lang_Parser.prototype.finishPostfixExpression = function(expr) { |
case 9/*TokenKind.ARROW*/: |
case 6/*TokenKind.LBRACE*/: |
- if ($notnull_bool(this._inInitializers)) return expr; |
+ if (this._inInitializers) return expr; |
var body = this.functionBody(true); |
return this._makeFunction(expr, body); |
default: |
- if ($notnull_bool(this._peekIdentifier())) { |
+ if (this._peekIdentifier()) { |
return this.finishPostfixExpression(new DeclaredIdentifier(this._makeType(expr), this.identifier(), this._makeSpan(expr.get$span().start))); |
} |
else { |
@@ -18498,13 +18023,13 @@ lang_Parser.prototype.primary = function() { |
case 91/*TokenKind.CONST*/: |
this._eat(91/*TokenKind.CONST*/); |
- if ($notnull_bool(this._peekKind(4/*TokenKind.LBRACK*/)) || $notnull_bool(this._peekKind(56/*TokenKind.INDEX*/))) { |
+ if (this._peekKind(4/*TokenKind.LBRACK*/) || this._peekKind(56/*TokenKind.INDEX*/)) { |
return this.finishListLiteral(start, true, null); |
} |
- else if ($notnull_bool(this._peekKind(6/*TokenKind.LBRACE*/))) { |
+ else if (this._peekKind(6/*TokenKind.LBRACE*/)) { |
return this.finishMapLiteral(start, true, null); |
} |
- else if ($notnull_bool(this._peekKind(52/*TokenKind.LT*/))) { |
+ else if (this._peekKind(52/*TokenKind.LT*/)) { |
return this.finishTypedLiteral(start, true); |
} |
else { |
@@ -18579,7 +18104,7 @@ lang_Parser.prototype.primary = function() { |
default: |
- if (!$notnull_bool(this._peekIdentifier())) { |
+ if (!this._peekIdentifier()) { |
this._errorExpected('expression'); |
} |
return new VarExpression(this.identifier(), this._makeSpan(start)); |
@@ -18590,24 +18115,24 @@ lang_Parser.prototype.stringInterpolation = function() { |
var start = this._peekToken.start; |
var lits = []; |
var startQuote = null, endQuote = null; |
- while ($notnull_bool(this._peekKind(66/*TokenKind.INCOMPLETE_STRING*/))) { |
+ while (this._peekKind(66/*TokenKind.INCOMPLETE_STRING*/)) { |
var token = this._lang_next(); |
var text = token.get$text(); |
- if ($notnull_bool(startQuote == null)) { |
- if ($notnull_bool(isMultilineString($assert_String(text)))) { |
+ if (startQuote == null) { |
+ if (isMultilineString(text)) { |
endQuote = text.substring$2(0, 3); |
- startQuote = $add(endQuote, '\n'); |
+ startQuote = endQuote + '\n'; |
} |
else { |
startQuote = endQuote = text.$index(0); |
} |
- text = $add(text.substring$2(0, text.length - 1), endQuote); |
+ text = text.substring$2(0, text.length - 1) + endQuote; |
} |
else { |
- text = $add($add(startQuote, text.substring$2(0, text.length - 1)), endQuote); |
+ text = startQuote + text.substring$2(0, text.length - 1) + endQuote; |
} |
- lits.add$1(this.makeStringLiteral($assert_String(text), token.get$span())); |
- if ($notnull_bool(this._maybeEat(6/*TokenKind.LBRACE*/))) { |
+ lits.add$1(this.makeStringLiteral(text, token.get$span())); |
+ if (this._maybeEat(6/*TokenKind.LBRACE*/)) { |
lits.add$1(this.expression()); |
this._eat(7/*TokenKind.RBRACE*/); |
} |
@@ -18617,13 +18142,13 @@ lang_Parser.prototype.stringInterpolation = function() { |
} |
} |
var tok = this._lang_next(); |
- if ($notnull_bool($ne(tok.kind, 58/*TokenKind.STRING*/))) { |
+ if ($ne(tok.kind, 58/*TokenKind.STRING*/)) { |
this._errorExpected('interpolated string'); |
} |
- var text = $add(startQuote, tok.get$text()); |
- lits.add$1(this.makeStringLiteral($assert_String(text), tok.get$span())); |
+ var text = startQuote + tok.get$text(); |
+ lits.add$1(this.makeStringLiteral(text, tok.get$span())); |
var span = this._makeSpan(start); |
- return new LiteralExpression(lits, this._stringTypeRef((span && span.is$SourceSpan())), '\$\$\$', (span && span.is$SourceSpan())); |
+ return new LiteralExpression(lits, this._stringTypeRef(span), '\$\$\$', span); |
} |
lang_Parser.prototype.makeStringLiteral = function(text, span) { |
return new LiteralExpression(text, this._stringTypeRef(span), text, span); |
@@ -18634,14 +18159,14 @@ lang_Parser.prototype.stringLiteralExpr = function() { |
} |
lang_Parser.prototype.maybeStringLiteral = function() { |
var kind = this._peek(); |
- if ($notnull_bool($eq(kind, 58/*TokenKind.STRING*/))) { |
+ if ($eq(kind, 58/*TokenKind.STRING*/)) { |
return parseStringLiteral(this._lang_next().get$text()); |
} |
- else if ($notnull_bool($eq(kind, 59/*TokenKind.STRING_PART*/))) { |
+ else if ($eq(kind, 59/*TokenKind.STRING_PART*/)) { |
this._lang_next(); |
this._errorExpected('string literal, but found interpolated string start'); |
} |
- else if ($notnull_bool($eq(kind, 66/*TokenKind.INCOMPLETE_STRING*/))) { |
+ else if ($eq(kind, 66/*TokenKind.INCOMPLETE_STRING*/)) { |
this._lang_next(); |
this._errorExpected('string literal, but found incomplete string'); |
} |
@@ -18650,7 +18175,7 @@ lang_Parser.prototype.maybeStringLiteral = function() { |
lang_Parser.prototype._parenOrLambda = function() { |
var start = this._peekToken.start; |
var args = this.arguments(); |
- if (!$notnull_bool(this._inInitializers) && ($notnull_bool(this._peekKind(9/*TokenKind.ARROW*/)) || $notnull_bool(this._peekKind(6/*TokenKind.LBRACE*/)))) { |
+ if (!this._inInitializers && (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)); |
@@ -18677,7 +18202,7 @@ lang_Parser.prototype._specialIdentifier = function(includeOperators) { |
this._eat(15/*TokenKind.ELLIPSIS*/); |
this._lang_error('rest no longer supported', this._previousToken.get$span()); |
- name = $assert_String(this.identifier().get$name()); |
+ name = this.identifier().get$name(); |
break; |
case 108/*TokenKind.THIS*/: |
@@ -18689,9 +18214,9 @@ lang_Parser.prototype._specialIdentifier = function(includeOperators) { |
case 76/*TokenKind.GET*/: |
- if (!$notnull_bool(includeOperators)) return null; |
+ if (!includeOperators) return null; |
this._eat(76/*TokenKind.GET*/); |
- if ($notnull_bool(this._peekIdentifier())) { |
+ if (this._peekIdentifier()) { |
name = ('get\$' + this.identifier().get$name() + ''); |
} |
else { |
@@ -18701,9 +18226,9 @@ lang_Parser.prototype._specialIdentifier = function(includeOperators) { |
case 84/*TokenKind.SET*/: |
- if (!$notnull_bool(includeOperators)) return null; |
+ if (!includeOperators) return null; |
this._eat(84/*TokenKind.SET*/); |
- if ($notnull_bool(this._peekIdentifier())) { |
+ if (this._peekIdentifier()) { |
name = ('set\$' + this.identifier().get$name() + ''); |
} |
else { |
@@ -18713,15 +18238,15 @@ lang_Parser.prototype._specialIdentifier = function(includeOperators) { |
case 83/*TokenKind.OPERATOR*/: |
- if (!$notnull_bool(includeOperators)) return null; |
+ if (!includeOperators) return null; |
this._eat(83/*TokenKind.OPERATOR*/); |
var kind = this._peek(); |
- if ($notnull_bool($eq(kind, 82/*TokenKind.NEGATE*/))) { |
+ if ($eq(kind, 82/*TokenKind.NEGATE*/)) { |
name = '\$negate'; |
this._lang_next(); |
} |
else { |
- name = TokenKind.binaryMethodName($assert_num(kind)); |
+ name = TokenKind.binaryMethodName(kind); |
if (name == null) { |
name = 'operator'; |
} |
@@ -18746,7 +18271,7 @@ lang_Parser.prototype.declaredIdentifier = function(includeOperators) { |
myType = this.type(0); |
name = this._specialIdentifier(includeOperators); |
if (name == null) { |
- if ($notnull_bool(this._peekIdentifier())) { |
+ if (this._peekIdentifier()) { |
name = this.identifier(); |
} |
else if ((myType instanceof NameTypeReference) && myType.names == null) { |
@@ -18778,30 +18303,29 @@ lang_Parser.parseHex = function(hex) { |
for (var i = 0; |
i < hex.length; i++) { |
var digit = lang_Parser._hexDigit(hex.charCodeAt(i)); |
- $assert($ne(digit, -1), "digit != -1", "parser.dart", 1259, 14); |
- result = (result << 4) + $assert_num(digit); |
+ result = (result << 4) + digit; |
} |
- return $assert_num(result); |
+ return result; |
} |
lang_Parser.prototype.finishNewExpression = function(start, isConst) { |
var type = this.type(0); |
var name = null; |
- if ($notnull_bool(this._maybeEat(14/*TokenKind.DOT*/))) { |
+ if (this._maybeEat(14/*TokenKind.DOT*/)) { |
name = this.identifier(); |
} |
var args = this.arguments(); |
return new lang_NewExpression(isConst, type, name, args, this._makeSpan(start)); |
} |
lang_Parser.prototype.finishListLiteral = function(start, isConst, type) { |
- if ($notnull_bool(this._maybeEat(56/*TokenKind.INDEX*/))) { |
+ if (this._maybeEat(56/*TokenKind.INDEX*/)) { |
return new ListExpression(isConst, type, [], this._makeSpan(start)); |
} |
var values = []; |
this._eat(4/*TokenKind.LBRACK*/); |
- while (!$notnull_bool(this._maybeEat(5/*TokenKind.RBRACK*/))) { |
- if ($notnull_bool(this.isPrematureEndOfFile())) break; |
+ while (!this._maybeEat(5/*TokenKind.RBRACK*/)) { |
+ if (this.isPrematureEndOfFile()) break; |
values.add$1(this.expression()); |
- if (!$notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) { |
+ if (!this._maybeEat(11/*TokenKind.COMMA*/)) { |
this._eat(5/*TokenKind.RBRACK*/); |
break; |
} |
@@ -18811,12 +18335,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(this._maybeEat(7/*TokenKind.RBRACE*/))) { |
- if ($notnull_bool(this.isPrematureEndOfFile())) break; |
+ while (!this._maybeEat(7/*TokenKind.RBRACE*/)) { |
+ if (this.isPrematureEndOfFile()) break; |
items.add$1(this.expression()); |
this._eat(8/*TokenKind.COLON*/); |
items.add$1(this.expression()); |
- if (!$notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) { |
+ if (!this._maybeEat(11/*TokenKind.COMMA*/)) { |
this._eat(7/*TokenKind.RBRACE*/); |
break; |
} |
@@ -18825,13 +18349,13 @@ lang_Parser.prototype.finishMapLiteral = function(start, isConst, type) { |
} |
lang_Parser.prototype.finishTypedLiteral = function(start, isConst) { |
var span = this._makeSpan(start); |
- var typeToBeNamedLater = new NameTypeReference(false, null, null, (span && span.is$SourceSpan())); |
- var genericType = this.addTypeArguments((typeToBeNamedLater && typeToBeNamedLater.is$TypeReference()), 0); |
- if ($notnull_bool(this._peekKind(4/*TokenKind.LBRACK*/)) || $notnull_bool(this._peekKind(56/*TokenKind.INDEX*/))) { |
- return this.finishListLiteral(start, isConst, (genericType && genericType.is$TypeReference())); |
+ var typeToBeNamedLater = new NameTypeReference(false, null, null, span); |
+ var genericType = this.addTypeArguments(typeToBeNamedLater, 0); |
+ if (this._peekKind(4/*TokenKind.LBRACK*/) || this._peekKind(56/*TokenKind.INDEX*/)) { |
+ return this.finishListLiteral(start, isConst, genericType); |
} |
- else if ($notnull_bool(this._peekKind(6/*TokenKind.LBRACE*/))) { |
- return this.finishMapLiteral(start, isConst, (genericType && genericType.is$TypeReference())); |
+ else if (this._peekKind(6/*TokenKind.LBRACE*/)) { |
+ return this.finishMapLiteral(start, isConst, genericType); |
} |
else { |
this._errorExpected('array or map literal'); |
@@ -18863,7 +18387,7 @@ lang_Parser.prototype.typeParameter = function() { |
var start = this._peekToken.start; |
var name = this.identifier(); |
var myType = null; |
- if ($notnull_bool(this._maybeEat(74/*TokenKind.EXTENDS*/))) { |
+ if (this._maybeEat(74/*TokenKind.EXTENDS*/)) { |
myType = this.type(1); |
} |
return new TypeParameter(name, myType, this._makeSpan(start)); |
@@ -18880,8 +18404,8 @@ lang_Parser.prototype.typeParameters = function() { |
break; |
} |
} |
- while ($notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) |
- if (!$notnull_bool(closed)) { |
+ while (this._maybeEat(11/*TokenKind.COMMA*/)) |
+ if (!closed) { |
this._eat(53/*TokenKind.GT*/); |
} |
return ret; |
@@ -18890,13 +18414,13 @@ lang_Parser.prototype.get$typeParameters = function() { |
return lang_Parser.prototype.typeParameters.bind(this); |
} |
lang_Parser.prototype._eatClosingAngle = function(depth) { |
- if ($notnull_bool(this._maybeEat(53/*TokenKind.GT*/))) { |
+ if (this._maybeEat(53/*TokenKind.GT*/)) { |
return depth; |
} |
- else if (depth > 0 && $notnull_bool(this._maybeEat(40/*TokenKind.SAR*/))) { |
+ else if (depth > 0 && this._maybeEat(40/*TokenKind.SAR*/)) { |
return depth - 1; |
} |
- else if (depth > 1 && $notnull_bool(this._maybeEat(41/*TokenKind.SHR*/))) { |
+ else if (depth > 1 && this._maybeEat(41/*TokenKind.SHR*/)) { |
return depth - 2; |
} |
else { |
@@ -18918,22 +18442,22 @@ lang_Parser.prototype._finishTypeArguments = function(baseType, depth, types) { |
break; |
} |
} |
- while ($notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) |
+ while (this._maybeEat(11/*TokenKind.COMMA*/)) |
if (delta >= 0) { |
- depth -= $assert_num(delta); |
+ depth = depth - delta; |
} |
else { |
depth = this._eatClosingAngle(depth); |
} |
var span = this._makeSpan(baseType.span.start); |
- return new GenericTypeReference(baseType, types, depth, (span && span.is$SourceSpan())); |
+ return new GenericTypeReference(baseType, types, depth, span); |
} |
lang_Parser.prototype.typeList = function() { |
var types = []; |
do { |
types.add$1(this.type(0)); |
} |
- while ($notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) |
+ while (this._maybeEat(11/*TokenKind.COMMA*/)) |
return types; |
} |
lang_Parser.prototype.type = function(depth) { |
@@ -18964,21 +18488,18 @@ lang_Parser.prototype.type = function(depth) { |
break; |
} |
- while ($notnull_bool(this._maybeEat(14/*TokenKind.DOT*/))) { |
+ while (this._maybeEat(14/*TokenKind.DOT*/)) { |
if (names == null) names = []; |
names.add$1(this.identifier()); |
} |
var typeRef = new NameTypeReference(isFinal, name, names, this._makeSpan(start)); |
- if ($notnull_bool(this._peekKind(52/*TokenKind.LT*/))) { |
- return this.addTypeArguments((typeRef && typeRef.is$TypeReference()), depth); |
+ if (this._peekKind(52/*TokenKind.LT*/)) { |
+ return this.addTypeArguments(typeRef, depth); |
} |
else { |
return typeRef; |
} |
} |
-lang_Parser.prototype.get$type = function() { |
- return lang_Parser.prototype.type.bind(this); |
-} |
lang_Parser.prototype.formalParameter = function(inOptionalBlock) { |
var start = this._peekToken.start; |
var isThis = false; |
@@ -18987,18 +18508,18 @@ lang_Parser.prototype.formalParameter = function(inOptionalBlock) { |
var type = di.type; |
var name = di.get$name(); |
var value = null; |
- if ($notnull_bool(this._maybeEat(20/*TokenKind.ASSIGN*/))) { |
- if (!$notnull_bool(inOptionalBlock)) { |
+ if (this._maybeEat(20/*TokenKind.ASSIGN*/)) { |
+ if (!inOptionalBlock) { |
this._lang_error('default values only allowed inside [optional] section'); |
} |
value = this.expression(); |
} |
- else if ($notnull_bool(this._peekKind(2/*TokenKind.LPAREN*/))) { |
+ else if (this._peekKind(2/*TokenKind.LPAREN*/)) { |
var formals = this.formalParameterList(); |
var func = new FunctionDefinition(null, type, name, formals, null, null, this._makeSpan(start)); |
type = new FunctionTypeReference(false, func, func.get$span()); |
} |
- if ($notnull_bool(inOptionalBlock) && $notnull_bool(value == null)) { |
+ if (inOptionalBlock && value == null) { |
value = new NullExpression(this._makeSpan(start)); |
} |
return new FormalNode(isThis, isRest, type, name, value, this._makeSpan(start)); |
@@ -19007,21 +18528,21 @@ lang_Parser.prototype.formalParameterList = function() { |
this._eat(2/*TokenKind.LPAREN*/); |
var formals = []; |
var inOptionalBlock = false; |
- if (!$notnull_bool(this._maybeEat(3/*TokenKind.RPAREN*/))) { |
- if ($notnull_bool(this._maybeEat(4/*TokenKind.LBRACK*/))) { |
+ if (!this._maybeEat(3/*TokenKind.RPAREN*/)) { |
+ if (this._maybeEat(4/*TokenKind.LBRACK*/)) { |
inOptionalBlock = true; |
} |
- formals.add$1(this.formalParameter($assert_bool(inOptionalBlock))); |
- while ($notnull_bool(this._maybeEat(11/*TokenKind.COMMA*/))) { |
- if ($notnull_bool(this._maybeEat(4/*TokenKind.LBRACK*/))) { |
- if ($notnull_bool(inOptionalBlock)) { |
+ formals.add$1(this.formalParameter(inOptionalBlock)); |
+ while (this._maybeEat(11/*TokenKind.COMMA*/)) { |
+ if (this._maybeEat(4/*TokenKind.LBRACK*/)) { |
+ if (inOptionalBlock) { |
this._lang_error('already inside an optional block', this._previousToken.get$span()); |
} |
inOptionalBlock = true; |
} |
- formals.add$1(this.formalParameter($assert_bool(inOptionalBlock))); |
+ formals.add$1(this.formalParameter(inOptionalBlock)); |
} |
- if ($notnull_bool(inOptionalBlock)) { |
+ if (inOptionalBlock) { |
this._eat(5/*TokenKind.RBRACK*/); |
} |
this._eat(3/*TokenKind.RPAREN*/); |
@@ -19030,7 +18551,7 @@ lang_Parser.prototype.formalParameterList = function() { |
} |
lang_Parser.prototype.identifier = function() { |
var tok = this._lang_next(); |
- if (!$notnull_bool(TokenKind.isIdentifier($assert_num(tok.kind)))) { |
+ if (!TokenKind.isIdentifier(tok.kind)) { |
this._lang_error(('expected identifier, but found ' + tok + ''), tok.get$span()); |
} |
return new lang_Identifier(tok.get$text(), this._makeSpan(tok.start)); |
@@ -19051,7 +18572,7 @@ lang_Parser.prototype._makeFunction = function(expr, body) { |
} |
var formals = this._makeFormals(expr.get$arguments()); |
var span = new SourceSpan(expr.get$span().file, expr.get$span().start, body.get$span().end); |
- var func = new FunctionDefinition(null, type, name, formals, null, body, (span && span.is$SourceSpan())); |
+ var func = new FunctionDefinition(null, type, name, formals, null, body, span); |
return new LambdaExpression(func, func.get$span()); |
} |
else { |
@@ -19059,18 +18580,17 @@ lang_Parser.prototype._makeFunction = function(expr, body) { |
} |
} |
lang_Parser.prototype._makeFormal = function(expr) { |
- var $0; |
if ((expr instanceof VarExpression)) { |
return new FormalNode(false, false, null, expr.get$name(), null, expr.get$span()); |
} |
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))) { |
- var di = (($0 = expr.x) && $0.is$DeclaredIdentifier()); |
+ else if (this._isBin(expr, 20/*TokenKind.ASSIGN*/) && ((expr.x instanceof DeclaredIdentifier))) { |
+ var di = expr.x; |
return new FormalNode(false, false, di.type, di.name, expr.y, expr.get$span()); |
} |
- else if ($notnull_bool(this._isBin(expr, 52/*TokenKind.LT*/))) { |
+ else if (this._isBin(expr, 52/*TokenKind.LT*/)) { |
return null; |
} |
else if ((expr instanceof ListExpression)) { |
@@ -19081,10 +18601,10 @@ lang_Parser.prototype._makeFormal = function(expr) { |
} |
} |
lang_Parser.prototype._makeFormalsFromList = function(expr) { |
- if ($notnull_bool(expr.get$isConst())) { |
+ if (expr.get$isConst()) { |
this._lang_error('expected formal, but found "const"', expr.get$span()); |
} |
- else if ($notnull_bool($ne(expr.type, null))) { |
+ else if ($ne(expr.type, null)) { |
this._lang_error('expected formal, but found generic type arguments', expr.type.get$span()); |
} |
return this._makeFormalsFromExpressions(expr.values, false); |
@@ -19102,23 +18622,22 @@ lang_Parser.prototype._makeFormals = function(arguments) { |
return this._makeFormalsFromExpressions(expressions, true); |
} |
lang_Parser.prototype._makeFormalsFromExpressions = function(expressions, allowOptional) { |
- var $0; |
var formals = []; |
for (var i = 0; |
i < expressions.length; i++) { |
var formal = this._makeFormal(expressions.$index(i)); |
- if ($notnull_bool(formal == null)) { |
+ if (formal == null) { |
var baseType = this._makeType(expressions.$index(i).x); |
var typeParams = [this._makeType(expressions.$index(i).y)]; |
i++; |
while (i < expressions.length) { |
var expr = expressions.$index(i++); |
- if ($notnull_bool(this._isBin(expr, 53/*TokenKind.GT*/))) { |
+ if (this._isBin(expr, 53/*TokenKind.GT*/)) { |
typeParams.add$1(this._makeType(expr.x)); |
var type = new GenericTypeReference(baseType, typeParams, 0, this._makeSpan(baseType.get$span().start)); |
var name = null; |
if ((expr.y instanceof VarExpression)) { |
- var ve = (($0 = expr.y) && $0.is$VarExpression()); |
+ var ve = expr.y; |
name = ve.name; |
} |
else { |
@@ -19135,7 +18654,7 @@ lang_Parser.prototype._makeFormalsFromExpressions = function(expressions, allowO |
} |
else if (!!(formal && formal.is$List)) { |
formals.addAll$1(formal); |
- if (!$notnull_bool(allowOptional)) { |
+ if (!allowOptional) { |
this._lang_error('unexpected nested optional formal', expressions.$index(i).get$span()); |
} |
} |
@@ -19176,7 +18695,7 @@ function IncompleteSourceException(token) { |
} |
IncompleteSourceException.prototype.toString = function() { |
if (this.token.get$span() == null) return ('Unexpected ' + this.token + ''); |
- return $assert_String(this.token.get$span().toMessageString(('Unexpected ' + this.token + ''))); |
+ return this.token.get$span().toMessageString(('Unexpected ' + this.token + '')); |
} |
IncompleteSourceException.prototype.toString$0 = function() { |
return this.toString(); |
@@ -19186,11 +18705,10 @@ function lang_Node(span) { |
this.span = span; |
// Initializers done |
} |
-lang_Node.prototype.is$lang_Node = function(){return this;}; |
lang_Node.prototype.get$span = function() { return this.span; }; |
lang_Node.prototype.set$span = function(value) { return this.span = value; }; |
lang_Node.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for Definition ************** |
function Definition(span) { |
@@ -19198,7 +18716,6 @@ function Definition(span) { |
// Initializers done |
} |
$inherits(Definition, lang_Statement); |
-Definition.prototype.is$Definition = function(){return this;}; |
Definition.prototype.get$typeParameters = function() { |
return null; |
} |
@@ -19211,14 +18728,12 @@ function lang_Statement(span) { |
// Initializers done |
} |
$inherits(lang_Statement, lang_Node); |
-lang_Statement.prototype.is$lang_Statement = function(){return this;}; |
// ********** Code for lang_Expression ************** |
function lang_Expression(span) { |
lang_Node.call(this, span); |
// Initializers done |
} |
$inherits(lang_Expression, lang_Node); |
-lang_Expression.prototype.is$lang_Expression = function(){return this;}; |
// ********** Code for TypeReference ************** |
function TypeReference(span, type) { |
this.type = type; |
@@ -19226,14 +18741,11 @@ function TypeReference(span, type) { |
// Initializers done |
} |
$inherits(TypeReference, lang_Node); |
-TypeReference.prototype.is$TypeReference = function(){return this;}; |
-TypeReference.prototype.get$type = function() { return this.type; }; |
-TypeReference.prototype.set$type = function(value) { return this.type = value; }; |
TypeReference.prototype.visit = function(visitor) { |
return visitor.visitTypeReference(this); |
} |
TypeReference.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for DirectiveDefinition ************** |
function DirectiveDefinition(name, arguments, span) { |
@@ -19251,7 +18763,7 @@ DirectiveDefinition.prototype.visit = function(visitor) { |
return visitor.visitDirectiveDefinition(this); |
} |
DirectiveDefinition.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for TypeDefinition ************** |
function TypeDefinition(isClass, name, typeParameters, extendsTypes, implementsTypes, nativeType, factoryType, body, span) { |
@@ -19267,7 +18779,6 @@ function TypeDefinition(isClass, name, typeParameters, extendsTypes, implementsT |
// Initializers done |
} |
$inherits(TypeDefinition, Definition); |
-TypeDefinition.prototype.is$TypeDefinition = function(){return this;}; |
TypeDefinition.prototype.get$isClass = function() { return this.isClass; }; |
TypeDefinition.prototype.set$isClass = function(value) { return this.isClass = value; }; |
TypeDefinition.prototype.get$name = function() { return this.name; }; |
@@ -19280,7 +18791,7 @@ TypeDefinition.prototype.visit = function(visitor) { |
return visitor.visitTypeDefinition(this); |
} |
TypeDefinition.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for FunctionTypeDefinition ************** |
function FunctionTypeDefinition(func, typeParameters, span) { |
@@ -19296,7 +18807,7 @@ FunctionTypeDefinition.prototype.visit = function(visitor) { |
return visitor.visitFunctionTypeDefinition(this); |
} |
FunctionTypeDefinition.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for VariableDefinition ************** |
function VariableDefinition(modifiers, type, names, values, span) { |
@@ -19308,13 +18819,11 @@ function VariableDefinition(modifiers, type, names, values, span) { |
// Initializers done |
} |
$inherits(VariableDefinition, Definition); |
-VariableDefinition.prototype.get$type = function() { return this.type; }; |
-VariableDefinition.prototype.set$type = function(value) { return this.type = value; }; |
VariableDefinition.prototype.visit = function(visitor) { |
return visitor.visitVariableDefinition(this); |
} |
VariableDefinition.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for FunctionDefinition ************** |
function FunctionDefinition(modifiers, returnType, name, formals, initializers, body, span) { |
@@ -19328,7 +18837,6 @@ function FunctionDefinition(modifiers, returnType, name, formals, initializers, |
// Initializers done |
} |
$inherits(FunctionDefinition, Definition); |
-FunctionDefinition.prototype.is$FunctionDefinition = function(){return this;}; |
FunctionDefinition.prototype.get$returnType = function() { return this.returnType; }; |
FunctionDefinition.prototype.set$returnType = function(value) { return this.returnType = value; }; |
FunctionDefinition.prototype.get$name = function() { return this.name; }; |
@@ -19337,7 +18845,7 @@ FunctionDefinition.prototype.visit = function(visitor) { |
return visitor.visitFunctionDefinition(this); |
} |
FunctionDefinition.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for ReturnStatement ************** |
function ReturnStatement(value, span) { |
@@ -19352,7 +18860,7 @@ ReturnStatement.prototype.visit = function(visitor) { |
return visitor.visitReturnStatement(this); |
} |
ReturnStatement.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for ThrowStatement ************** |
function ThrowStatement(value, span) { |
@@ -19367,7 +18875,7 @@ ThrowStatement.prototype.visit = function(visitor) { |
return visitor.visitThrowStatement(this); |
} |
ThrowStatement.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for AssertStatement ************** |
function AssertStatement(test, span) { |
@@ -19380,7 +18888,7 @@ AssertStatement.prototype.visit = function(visitor) { |
return visitor.visitAssertStatement(this); |
} |
AssertStatement.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for BreakStatement ************** |
function BreakStatement(label, span) { |
@@ -19393,7 +18901,7 @@ BreakStatement.prototype.visit = function(visitor) { |
return visitor.visitBreakStatement(this); |
} |
BreakStatement.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for ContinueStatement ************** |
function ContinueStatement(label, span) { |
@@ -19406,7 +18914,7 @@ ContinueStatement.prototype.visit = function(visitor) { |
return visitor.visitContinueStatement(this); |
} |
ContinueStatement.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for IfStatement ************** |
function IfStatement(test, trueBranch, falseBranch, span) { |
@@ -19421,7 +18929,7 @@ IfStatement.prototype.visit = function(visitor) { |
return visitor.visitIfStatement(this); |
} |
IfStatement.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for WhileStatement ************** |
function WhileStatement(test, body, span) { |
@@ -19435,7 +18943,7 @@ WhileStatement.prototype.visit = function(visitor) { |
return visitor.visitWhileStatement(this); |
} |
WhileStatement.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for DoStatement ************** |
function DoStatement(body, test, span) { |
@@ -19449,7 +18957,7 @@ DoStatement.prototype.visit = function(visitor) { |
return visitor.visitDoStatement(this); |
} |
DoStatement.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for ForStatement ************** |
function ForStatement(init, test, step, body, span) { |
@@ -19465,7 +18973,7 @@ ForStatement.prototype.visit = function(visitor) { |
return visitor.visitForStatement(this); |
} |
ForStatement.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for ForInStatement ************** |
function ForInStatement(item, list, body, span) { |
@@ -19480,7 +18988,7 @@ ForInStatement.prototype.visit = function(visitor) { |
return visitor.visitForInStatement(this); |
} |
ForInStatement.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for TryStatement ************** |
function TryStatement(body, catches, finallyBlock, span) { |
@@ -19495,7 +19003,7 @@ TryStatement.prototype.visit = function(visitor) { |
return visitor.visitTryStatement(this); |
} |
TryStatement.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for SwitchStatement ************** |
function SwitchStatement(test, cases, span) { |
@@ -19509,7 +19017,7 @@ SwitchStatement.prototype.visit = function(visitor) { |
return visitor.visitSwitchStatement(this); |
} |
SwitchStatement.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for BlockStatement ************** |
function BlockStatement(body, span) { |
@@ -19518,12 +19026,11 @@ function BlockStatement(body, span) { |
// Initializers done |
} |
$inherits(BlockStatement, lang_Statement); |
-BlockStatement.prototype.is$BlockStatement = function(){return this;}; |
BlockStatement.prototype.visit = function(visitor) { |
return visitor.visitBlockStatement(this); |
} |
BlockStatement.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for LabeledStatement ************** |
function LabeledStatement(name, body, span) { |
@@ -19539,7 +19046,7 @@ LabeledStatement.prototype.visit = function(visitor) { |
return visitor.visitLabeledStatement(this); |
} |
LabeledStatement.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for lang_ExpressionStatement ************** |
function lang_ExpressionStatement(body, span) { |
@@ -19552,7 +19059,7 @@ lang_ExpressionStatement.prototype.visit = function(visitor) { |
return visitor.visitExpressionStatement(this); |
} |
lang_ExpressionStatement.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for EmptyStatement ************** |
function EmptyStatement(span) { |
@@ -19564,7 +19071,7 @@ EmptyStatement.prototype.visit = function(visitor) { |
return visitor.visitEmptyStatement(this); |
} |
EmptyStatement.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for DietStatement ************** |
function DietStatement(span) { |
@@ -19576,7 +19083,7 @@ DietStatement.prototype.visit = function(visitor) { |
return visitor.visitDietStatement(this); |
} |
DietStatement.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for NativeStatement ************** |
function NativeStatement(body, span) { |
@@ -19589,7 +19096,7 @@ NativeStatement.prototype.visit = function(visitor) { |
return visitor.visitNativeStatement(this); |
} |
NativeStatement.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for LambdaExpression ************** |
function LambdaExpression(func, span) { |
@@ -19598,12 +19105,11 @@ function LambdaExpression(func, span) { |
// Initializers done |
} |
$inherits(LambdaExpression, lang_Expression); |
-LambdaExpression.prototype.is$LambdaExpression = function(){return this;}; |
LambdaExpression.prototype.visit = function(visitor) { |
return visitor.visitLambdaExpression(this); |
} |
LambdaExpression.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for CallExpression ************** |
function CallExpression(target, arguments, span) { |
@@ -19613,14 +19119,13 @@ function CallExpression(target, arguments, span) { |
// Initializers done |
} |
$inherits(CallExpression, lang_Expression); |
-CallExpression.prototype.is$CallExpression = function(){return this;}; |
CallExpression.prototype.get$arguments = function() { return this.arguments; }; |
CallExpression.prototype.set$arguments = function(value) { return this.arguments = value; }; |
CallExpression.prototype.visit = function(visitor) { |
return visitor.visitCallExpression(this); |
} |
CallExpression.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for IndexExpression ************** |
function IndexExpression(target, index, span) { |
@@ -19630,12 +19135,11 @@ function IndexExpression(target, index, span) { |
// Initializers done |
} |
$inherits(IndexExpression, lang_Expression); |
-IndexExpression.prototype.is$IndexExpression = function(){return this;}; |
IndexExpression.prototype.visit = function(visitor) { |
return visitor.visitIndexExpression(this); |
} |
IndexExpression.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for BinaryExpression ************** |
function BinaryExpression(op, x, y, span) { |
@@ -19646,12 +19150,11 @@ function BinaryExpression(op, x, y, span) { |
// Initializers done |
} |
$inherits(BinaryExpression, lang_Expression); |
-BinaryExpression.prototype.is$BinaryExpression = function(){return this;}; |
BinaryExpression.prototype.visit = function(visitor) { |
return visitor.visitBinaryExpression(this); |
} |
BinaryExpression.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for UnaryExpression ************** |
function UnaryExpression(op, self, span) { |
@@ -19665,7 +19168,7 @@ UnaryExpression.prototype.visit = function(visitor) { |
return visitor.visitUnaryExpression(this); |
} |
UnaryExpression.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for PostfixExpression ************** |
function PostfixExpression(body, op, span) { |
@@ -19675,12 +19178,11 @@ function PostfixExpression(body, op, span) { |
// Initializers done |
} |
$inherits(PostfixExpression, lang_Expression); |
-PostfixExpression.prototype.is$PostfixExpression = function(){return this;}; |
PostfixExpression.prototype.visit = function(visitor) { |
return visitor.visitPostfixExpression$1(this); |
} |
PostfixExpression.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for lang_NewExpression ************** |
function lang_NewExpression(isConst, type, name, arguments, span) { |
@@ -19694,8 +19196,6 @@ function lang_NewExpression(isConst, type, name, arguments, span) { |
$inherits(lang_NewExpression, lang_Expression); |
lang_NewExpression.prototype.get$isConst = function() { return this.isConst; }; |
lang_NewExpression.prototype.set$isConst = function(value) { return this.isConst = value; }; |
-lang_NewExpression.prototype.get$type = function() { return this.type; }; |
-lang_NewExpression.prototype.set$type = function(value) { return this.type = value; }; |
lang_NewExpression.prototype.get$name = function() { return this.name; }; |
lang_NewExpression.prototype.set$name = function(value) { return this.name = value; }; |
lang_NewExpression.prototype.get$arguments = function() { return this.arguments; }; |
@@ -19704,7 +19204,7 @@ lang_NewExpression.prototype.visit = function(visitor) { |
return visitor.visitNewExpression(this); |
} |
lang_NewExpression.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for ListExpression ************** |
function ListExpression(isConst, type, values, span) { |
@@ -19717,13 +19217,11 @@ function ListExpression(isConst, type, values, span) { |
$inherits(ListExpression, lang_Expression); |
ListExpression.prototype.get$isConst = function() { return this.isConst; }; |
ListExpression.prototype.set$isConst = function(value) { return this.isConst = value; }; |
-ListExpression.prototype.get$type = function() { return this.type; }; |
-ListExpression.prototype.set$type = function(value) { return this.type = value; }; |
ListExpression.prototype.visit = function(visitor) { |
return visitor.visitListExpression(this); |
} |
ListExpression.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for MapExpression ************** |
function MapExpression(isConst, type, items, span) { |
@@ -19736,13 +19234,11 @@ function MapExpression(isConst, type, items, span) { |
$inherits(MapExpression, lang_Expression); |
MapExpression.prototype.get$isConst = function() { return this.isConst; }; |
MapExpression.prototype.set$isConst = function(value) { return this.isConst = value; }; |
-MapExpression.prototype.get$type = function() { return this.type; }; |
-MapExpression.prototype.set$type = function(value) { return this.type = value; }; |
MapExpression.prototype.visit = function(visitor) { |
return visitor.visitMapExpression(this); |
} |
MapExpression.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for ConditionalExpression ************** |
function ConditionalExpression(test, trueBranch, falseBranch, span) { |
@@ -19757,7 +19253,7 @@ ConditionalExpression.prototype.visit = function(visitor) { |
return visitor.visitConditionalExpression(this); |
} |
ConditionalExpression.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for IsExpression ************** |
function IsExpression(isTrue, x, type, span) { |
@@ -19768,13 +19264,11 @@ function IsExpression(isTrue, x, type, span) { |
// Initializers done |
} |
$inherits(IsExpression, lang_Expression); |
-IsExpression.prototype.get$type = function() { return this.type; }; |
-IsExpression.prototype.set$type = function(value) { return this.type = value; }; |
IsExpression.prototype.visit = function(visitor) { |
return visitor.visitIsExpression(this); |
} |
IsExpression.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for ParenExpression ************** |
function ParenExpression(body, span) { |
@@ -19787,7 +19281,7 @@ ParenExpression.prototype.visit = function(visitor) { |
return visitor.visitParenExpression(this); |
} |
ParenExpression.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for DotExpression ************** |
function DotExpression(self, name, span) { |
@@ -19797,14 +19291,13 @@ function DotExpression(self, name, span) { |
// Initializers done |
} |
$inherits(DotExpression, lang_Expression); |
-DotExpression.prototype.is$DotExpression = function(){return this;}; |
DotExpression.prototype.get$name = function() { return this.name; }; |
DotExpression.prototype.set$name = function(value) { return this.name = value; }; |
DotExpression.prototype.visit = function(visitor) { |
return visitor.visitDotExpression(this); |
} |
DotExpression.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for VarExpression ************** |
function VarExpression(name, span) { |
@@ -19813,14 +19306,13 @@ function VarExpression(name, span) { |
// Initializers done |
} |
$inherits(VarExpression, lang_Expression); |
-VarExpression.prototype.is$VarExpression = function(){return this;}; |
VarExpression.prototype.get$name = function() { return this.name; }; |
VarExpression.prototype.set$name = function(value) { return this.name = value; }; |
VarExpression.prototype.visit = function(visitor) { |
return visitor.visitVarExpression(this); |
} |
VarExpression.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for ThisExpression ************** |
function ThisExpression(span) { |
@@ -19832,7 +19324,7 @@ ThisExpression.prototype.visit = function(visitor) { |
return visitor.visitThisExpression(this); |
} |
ThisExpression.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for SuperExpression ************** |
function SuperExpression(span) { |
@@ -19844,7 +19336,7 @@ SuperExpression.prototype.visit = function(visitor) { |
return visitor.visitSuperExpression(this); |
} |
SuperExpression.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for NullExpression ************** |
function NullExpression(span) { |
@@ -19856,7 +19348,7 @@ NullExpression.prototype.visit = function(visitor) { |
return visitor.visitNullExpression(this); |
} |
NullExpression.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for LiteralExpression ************** |
function LiteralExpression(value, type, text, span) { |
@@ -19869,15 +19361,13 @@ function LiteralExpression(value, type, text, span) { |
$inherits(LiteralExpression, lang_Expression); |
LiteralExpression.prototype.get$value = function() { return this.value; }; |
LiteralExpression.prototype.set$value = function(value) { return this.value = value; }; |
-LiteralExpression.prototype.get$type = function() { return this.type; }; |
-LiteralExpression.prototype.set$type = function(value) { return this.type = value; }; |
LiteralExpression.prototype.get$text = function() { return this.text; }; |
LiteralExpression.prototype.set$text = function(value) { return this.text = value; }; |
LiteralExpression.prototype.visit = function(visitor) { |
return visitor.visitLiteralExpression(this); |
} |
LiteralExpression.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for NameTypeReference ************** |
function NameTypeReference(isFinal, name, names, span) { |
@@ -19888,14 +19378,13 @@ function NameTypeReference(isFinal, name, names, span) { |
// Initializers done |
} |
$inherits(NameTypeReference, TypeReference); |
-NameTypeReference.prototype.is$NameTypeReference = function(){return this;}; |
NameTypeReference.prototype.get$name = function() { return this.name; }; |
NameTypeReference.prototype.set$name = function(value) { return this.name = value; }; |
NameTypeReference.prototype.visit = function(visitor) { |
return visitor.visitNameTypeReference(this); |
} |
NameTypeReference.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for GenericTypeReference ************** |
function GenericTypeReference(baseType, typeArguments, depth, span) { |
@@ -19906,12 +19395,11 @@ function GenericTypeReference(baseType, typeArguments, depth, span) { |
// Initializers done |
} |
$inherits(GenericTypeReference, TypeReference); |
-GenericTypeReference.prototype.is$GenericTypeReference = function(){return this;}; |
GenericTypeReference.prototype.visit = function(visitor) { |
return visitor.visitGenericTypeReference(this); |
} |
GenericTypeReference.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for FunctionTypeReference ************** |
function FunctionTypeReference(isFinal, func, span) { |
@@ -19921,12 +19409,11 @@ function FunctionTypeReference(isFinal, func, span) { |
// Initializers done |
} |
$inherits(FunctionTypeReference, TypeReference); |
-FunctionTypeReference.prototype.is$FunctionTypeReference = function(){return this;}; |
FunctionTypeReference.prototype.visit = function(visitor) { |
return visitor.visitFunctionTypeReference(this); |
} |
FunctionTypeReference.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for ArgumentNode ************** |
function ArgumentNode(label, value, span) { |
@@ -19936,14 +19423,13 @@ function ArgumentNode(label, value, span) { |
// Initializers done |
} |
$inherits(ArgumentNode, lang_Node); |
-ArgumentNode.prototype.is$ArgumentNode = function(){return this;}; |
ArgumentNode.prototype.get$value = function() { return this.value; }; |
ArgumentNode.prototype.set$value = function(value) { return this.value = value; }; |
ArgumentNode.prototype.visit = function(visitor) { |
return visitor.visitArgumentNode(this); |
} |
ArgumentNode.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for FormalNode ************** |
function FormalNode(isThis, isRest, type, name, value, span) { |
@@ -19956,8 +19442,6 @@ function FormalNode(isThis, isRest, type, name, value, span) { |
// Initializers done |
} |
$inherits(FormalNode, lang_Node); |
-FormalNode.prototype.get$type = function() { return this.type; }; |
-FormalNode.prototype.set$type = function(value) { return this.type = value; }; |
FormalNode.prototype.get$name = function() { return this.name; }; |
FormalNode.prototype.set$name = function(value) { return this.name = value; }; |
FormalNode.prototype.get$value = function() { return this.value; }; |
@@ -19966,7 +19450,7 @@ FormalNode.prototype.visit = function(visitor) { |
return visitor.visitFormalNode(this); |
} |
FormalNode.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for CatchNode ************** |
function CatchNode(exception, trace, body, span) { |
@@ -19983,7 +19467,7 @@ CatchNode.prototype.visit = function(visitor) { |
return visitor.visitCatchNode(this); |
} |
CatchNode.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for CaseNode ************** |
function CaseNode(label, cases, statements, span) { |
@@ -19998,7 +19482,7 @@ CaseNode.prototype.visit = function(visitor) { |
return visitor.visitCaseNode(this); |
} |
CaseNode.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for TypeParameter ************** |
function TypeParameter(name, extendsType, span) { |
@@ -20014,7 +19498,7 @@ TypeParameter.prototype.visit = function(visitor) { |
return visitor.visitTypeParameter(this); |
} |
TypeParameter.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for lang_Identifier ************** |
function lang_Identifier(name, span) { |
@@ -20023,14 +19507,13 @@ function lang_Identifier(name, span) { |
// Initializers done |
} |
$inherits(lang_Identifier, lang_Node); |
-lang_Identifier.prototype.is$lang_Identifier = function(){return this;}; |
lang_Identifier.prototype.get$name = function() { return this.name; }; |
lang_Identifier.prototype.set$name = function(value) { return this.name = value; }; |
lang_Identifier.prototype.visit = function(visitor) { |
return visitor.visitIdentifier(this); |
} |
lang_Identifier.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for DeclaredIdentifier ************** |
function DeclaredIdentifier(type, name, span) { |
@@ -20040,16 +19523,13 @@ function DeclaredIdentifier(type, name, span) { |
// Initializers done |
} |
$inherits(DeclaredIdentifier, lang_Expression); |
-DeclaredIdentifier.prototype.is$DeclaredIdentifier = function(){return this;}; |
-DeclaredIdentifier.prototype.get$type = function() { return this.type; }; |
-DeclaredIdentifier.prototype.set$type = function(value) { return this.type = value; }; |
DeclaredIdentifier.prototype.get$name = function() { return this.name; }; |
DeclaredIdentifier.prototype.set$name = function(value) { return this.name = value; }; |
DeclaredIdentifier.prototype.visit = function(visitor) { |
return visitor.visitDeclaredIdentifier(this); |
} |
DeclaredIdentifier.prototype.visit$1 = function($0) { |
- return this.visit(($0 && $0.is$TreeVisitor())); |
+ return this.visit($0); |
}; |
// ********** Code for lang_Type ************** |
function lang_Type(name) { |
@@ -20057,18 +19537,15 @@ function lang_Type(name) { |
this.isTested = false; |
// Initializers done |
} |
-lang_Type.prototype.is$lang_Type = function(){return this;}; |
-lang_Type.prototype.is$Named = function(){return this;}; |
lang_Type.prototype.get$name = function() { return this.name; }; |
lang_Type.prototype.markUsed = function() { |
} |
lang_Type.prototype.get$typeMember = function() { |
- var $0; |
if (this._typeMember == null) { |
- this._typeMember = new TypeMember((this && this.is$DefinedType())); |
+ this._typeMember = new TypeMember(this); |
} |
- return (($0 = this._typeMember) && $0.is$TypeMember()); |
+ return this._typeMember; |
} |
lang_Type.prototype.getMember = function(name) { |
return null; |
@@ -20104,13 +19581,13 @@ lang_Type.prototype.get$isNullable = function() { |
return true; |
} |
lang_Type.prototype.get$isVarOrFunction = function() { |
- return $notnull_bool(this.get$isVar()) || $notnull_bool(this.get$isFunction()); |
+ return this.get$isVar() || this.get$isFunction(); |
} |
lang_Type.prototype.getCallMethod = function() { |
return null; |
} |
lang_Type.prototype.get$isClosed = function() { |
- return $notnull_bool(this.get$isString()) || $notnull_bool(this.get$isBool()) || $notnull_bool(this.get$isNum()) || $notnull_bool(this.get$isFunction()) || $notnull_bool(this.get$isVar()); |
+ return this.get$isString() || this.get$isBool() || this.get$isNum() || this.get$isFunction() || this.get$isVar(); |
} |
lang_Type.prototype.get$isUsed = function() { |
return false; |
@@ -20149,7 +19626,7 @@ lang_Type.prototype.get$typeArgsInOrder = function() { |
return null; |
} |
lang_Type.prototype.get$genericType = function() { |
- return (this && this.is$DefinedType()); |
+ return this; |
} |
lang_Type.prototype.get$interfaces = function() { |
return null; |
@@ -20164,23 +19641,23 @@ lang_Type.prototype.hashCode = function() { |
return this.name.hashCode(); |
} |
lang_Type.prototype.ensureSubtypeOf = function(other, span, typeErrors) { |
- if (!$notnull_bool(this.isSubtypeOf(other))) { |
+ if (!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); |
+ if (typeErrors) { |
+ world.error(msg, span); |
} |
else { |
- world.warning($assert_String(msg), span); |
+ world.warning(msg, span); |
} |
} |
} |
lang_Type.prototype.needsVarCall = function(args) { |
- if ($notnull_bool(this.get$isVarOrFunction())) { |
+ if (this.get$isVarOrFunction()) { |
return true; |
} |
var call = this.getCallMethod(); |
- if ($notnull_bool($ne(call, null))) { |
- if (args.get$length() != call.get$parameters().length || !$notnull_bool(call.namesInOrder$1(args))) { |
+ if ($ne(call, null)) { |
+ if (args.get$length() != call.get$parameters().length || !call.namesInOrder$1(args)) { |
return true; |
} |
} |
@@ -20188,17 +19665,17 @@ lang_Type.prototype.needsVarCall = function(args) { |
} |
lang_Type.union = function(x, y) { |
if ($eq(x, y)) return x; |
- if ($notnull_bool(x.get$isNum()) && $notnull_bool(y.get$isNum())) return world.numType; |
- if ($notnull_bool(x.get$isString()) && $notnull_bool(y.get$isString())) return world.stringType; |
+ if (x.get$isNum() && y.get$isNum()) return world.numType; |
+ if (x.get$isString() && y.get$isString()) return world.stringType; |
return world.varType; |
} |
lang_Type.prototype.isAssignable = function(other) { |
- return $notnull_bool(this.isSubtypeOf(other)) || $notnull_bool(other.isSubtypeOf(this)); |
+ return this.isSubtypeOf(other) || other.isSubtypeOf(this); |
} |
lang_Type.prototype._isDirectSupertypeOf = function(other) { |
var $this = this; // closure support |
- if ($notnull_bool(other.get$isClass())) { |
- return $eq(other.get$parent(), this) || $notnull_bool(this.get$isObject()) && other.get$parent() == null; |
+ if (other.get$isClass()) { |
+ return $eq(other.get$parent(), this) || this.get$isObject() && other.get$parent() == null; |
} |
else { |
if (other.get$interfaces() == null || other.get$interfaces().isEmpty()) { |
@@ -20217,23 +19694,23 @@ lang_Type.prototype.isSubtypeOf = function(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; |
+ if (this.get$isVar()) return true; |
+ if (other.get$isVar()) return true; |
+ if (other._isDirectSupertypeOf(this)) return true; |
var call = this.getCallMethod(); |
var otherCall = other.getCallMethod(); |
- if ($notnull_bool($ne(call, null)) && $notnull_bool($ne(otherCall, null))) { |
- return lang_Type._isFunctionSubtypeOf((call && call.is$MethodMember()), (otherCall && otherCall.is$MethodMember())); |
+ if ($ne(call, null) && $ne(otherCall, null)) { |
+ return lang_Type._isFunctionSubtypeOf(call, otherCall); |
} |
- if ($eq(this.get$genericType(), other.get$genericType()) && $notnull_bool($ne(this.get$typeArgsInOrder(), null)) && $notnull_bool($ne(other.get$typeArgsInOrder(), null)) && this.get$typeArgsInOrder().length == other.get$typeArgsInOrder().length) { |
+ if ($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$0(); |
var s = other.get$typeArgsInOrder().iterator$0(); |
- while ($notnull_bool(t.hasNext$0())) { |
- if (!$notnull_bool(t.next$0().isSubtypeOf$1(s.next$0()))) return false; |
+ while (t.hasNext$0()) { |
+ if (!t.next$0().isSubtypeOf$1(s.next$0())) return false; |
} |
return true; |
} |
- if (this.get$parent() != null && $notnull_bool(this.get$parent().isSubtypeOf(other))) { |
+ if (this.get$parent() != null && this.get$parent().isSubtypeOf(other)) { |
return true; |
} |
if (this.get$interfaces() != null && this.get$interfaces().some((function (i) { |
@@ -20245,7 +19722,7 @@ lang_Type.prototype.isSubtypeOf = function(other) { |
return false; |
} |
lang_Type._isFunctionSubtypeOf = function(t, s) { |
- if (!$notnull_bool(s.returnType.get$isVoid()) && !$notnull_bool(s.returnType.isAssignable(t.returnType))) { |
+ if (!s.returnType.get$isVoid() && !s.returnType.isAssignable(t.returnType)) { |
return false; |
} |
var tp = t.parameters; |
@@ -20254,47 +19731,47 @@ lang_Type._isFunctionSubtypeOf = function(t, s) { |
for (var i = 0; |
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()) && $notnull_bool($ne(tp.$index(i).get$name(), sp.$index(i).get$name()))) return false; |
- if (!$notnull_bool(tp.$index(i).type.isAssignable$1(sp.$index(i).type))) return false; |
+ if (tp.$index(i).get$isOptional() && $ne(tp.$index(i).get$name(), sp.$index(i).get$name())) return false; |
+ if (!tp.$index(i).type.isAssignable$1(sp.$index(i).type)) return false; |
} |
- if (tp.length > sp.length && !$notnull_bool(tp.$index(sp.length).get$isOptional())) return false; |
+ if (tp.length > sp.length && !tp.$index(sp.length).get$isOptional()) return false; |
return true; |
} |
lang_Type.prototype.addDirectSubtype$1 = function($0) { |
- return this.addDirectSubtype(($0 && $0.is$lang_Type())); |
+ return this.addDirectSubtype($0); |
}; |
lang_Type.prototype.ensureSubtypeOf$3 = function($0, $1, $2) { |
- return this.ensureSubtypeOf(($0 && $0.is$lang_Type()), ($1 && $1.is$SourceSpan()), $assert_bool($2)); |
+ return this.ensureSubtypeOf($0, $1, $2); |
}; |
lang_Type.prototype.getConstructor$1 = function($0) { |
- return this.getConstructor($assert_String($0)); |
+ return this.getConstructor($0); |
}; |
lang_Type.prototype.getFactory$2 = function($0, $1) { |
- return this.getFactory(($0 && $0.is$lang_Type()), $assert_String($1)); |
+ return this.getFactory($0, $1); |
}; |
lang_Type.prototype.getMember$1 = function($0) { |
- return this.getMember($assert_String($0)); |
+ return this.getMember($0); |
}; |
lang_Type.prototype.getOrMakeConcreteType$1 = function($0) { |
- return this.getOrMakeConcreteType(($0 && $0.is$List$Type())); |
+ return this.getOrMakeConcreteType($0); |
}; |
lang_Type.prototype.hashCode$0 = function() { |
return this.hashCode(); |
}; |
lang_Type.prototype.isAssignable$1 = function($0) { |
- return this.isAssignable(($0 && $0.is$lang_Type())); |
+ return this.isAssignable($0); |
}; |
lang_Type.prototype.isSubtypeOf$1 = function($0) { |
- return this.isSubtypeOf(($0 && $0.is$lang_Type())); |
+ return this.isSubtypeOf($0); |
}; |
lang_Type.prototype.markUsed$0 = function() { |
return this.markUsed(); |
}; |
lang_Type.prototype.resolveMember$1 = function($0) { |
- return this.resolveMember($assert_String($0)); |
+ return this.resolveMember($0); |
}; |
lang_Type.prototype.resolveTypeParams$1 = function($0) { |
- return this.resolveTypeParams(($0 && $0.is$ConcreteType())); |
+ return this.resolveTypeParams($0); |
}; |
// ********** Code for ParameterType ************** |
function ParameterType(name, typeParameter) { |
@@ -20303,7 +19780,6 @@ function ParameterType(name, typeParameter) { |
// Initializers done |
} |
$inherits(ParameterType, lang_Type); |
-ParameterType.prototype.is$ParameterType = function(){return this;}; |
ParameterType.prototype.get$isClass = function() { |
return false; |
} |
@@ -20335,8 +19811,7 @@ ParameterType.prototype.getOrMakeConcreteType = function(typeArgs) { |
world.internalError('no concrete types of type parameters yet', this.get$span()); |
} |
ParameterType.prototype.resolveTypeParams = function(inType) { |
- var $0; |
- return (($0 = inType.typeArguments.$index(this.name)) && $0.is$lang_Type()); |
+ return inType.typeArguments.$index(this.name); |
} |
ParameterType.prototype.addDirectSubtype = function(type) { |
world.internalError('no subtypes of type parameters yet', this.get$span()); |
@@ -20350,25 +19825,25 @@ ParameterType.prototype.resolve = function(inType) { |
} |
} |
ParameterType.prototype.addDirectSubtype$1 = function($0) { |
- return this.addDirectSubtype(($0 && $0.is$lang_Type())); |
+ return this.addDirectSubtype($0); |
}; |
ParameterType.prototype.getConstructor$1 = function($0) { |
- return this.getConstructor($assert_String($0)); |
+ return this.getConstructor($0); |
}; |
ParameterType.prototype.getOrMakeConcreteType$1 = function($0) { |
- return this.getOrMakeConcreteType(($0 && $0.is$List$Type())); |
+ return this.getOrMakeConcreteType($0); |
}; |
ParameterType.prototype.isSubtypeOf$1 = function($0) { |
- return this.isSubtypeOf(($0 && $0.is$lang_Type())); |
+ return this.isSubtypeOf($0); |
}; |
ParameterType.prototype.resolve$1 = function($0) { |
- return this.resolve(($0 && $0.is$lang_Type())); |
+ return this.resolve($0); |
}; |
ParameterType.prototype.resolveMember$1 = function($0) { |
- return this.resolveMember($assert_String($0)); |
+ return this.resolveMember($0); |
}; |
ParameterType.prototype.resolveTypeParams$1 = function($0) { |
- return this.resolveTypeParams(($0 && $0.is$ConcreteType())); |
+ return this.resolveTypeParams($0); |
}; |
// ********** Code for NonNullableType ************** |
function NonNullableType(type) { |
@@ -20377,7 +19852,6 @@ function NonNullableType(type) { |
// Initializers done |
} |
$inherits(NonNullableType, lang_Type); |
-NonNullableType.prototype.get$type = function() { return this.type; }; |
NonNullableType.prototype.get$isNullable = function() { |
return false; |
} |
@@ -20388,7 +19862,7 @@ NonNullableType.prototype.get$isUsed = function() { |
return false; |
} |
NonNullableType.prototype.isSubtypeOf = function(other) { |
- return $eq(this, other) || $eq(this.type, other) || $notnull_bool(this.type.isSubtypeOf(other)); |
+ return $eq(this, other) || $eq(this.type, other) || this.type.isSubtypeOf(other); |
} |
NonNullableType.prototype.resolveType = function(node, isRequired) { |
return this.type.resolveType(node, isRequired); |
@@ -20415,12 +19889,10 @@ 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()); |
+ return this.type.getConstructor(name); |
} |
NonNullableType.prototype.getFactory = function(t, name) { |
- var $0; |
- return (($0 = this.type.getFactory(t, name)) && $0.is$MethodMember()); |
+ return this.type.getFactory(t, name); |
} |
NonNullableType.prototype.getOrMakeConcreteType = function(typeArgs) { |
return this.type.getOrMakeConcreteType(typeArgs); |
@@ -20462,8 +19934,7 @@ 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()); |
+ return this.type.get$typeArgsInOrder(); |
} |
NonNullableType.prototype.get$genericType = function() { |
return this.type.get$genericType(); |
@@ -20481,31 +19952,31 @@ NonNullableType.prototype.get$isNativeType = function() { |
return this.type.get$isNativeType(); |
} |
NonNullableType.prototype.addDirectSubtype$1 = function($0) { |
- return this.addDirectSubtype(($0 && $0.is$lang_Type())); |
+ return this.addDirectSubtype($0); |
}; |
NonNullableType.prototype.getConstructor$1 = function($0) { |
- return this.getConstructor($assert_String($0)); |
+ return this.getConstructor($0); |
}; |
NonNullableType.prototype.getFactory$2 = function($0, $1) { |
- return this.getFactory(($0 && $0.is$lang_Type()), $assert_String($1)); |
+ return this.getFactory($0, $1); |
}; |
NonNullableType.prototype.getMember$1 = function($0) { |
- return this.getMember($assert_String($0)); |
+ return this.getMember($0); |
}; |
NonNullableType.prototype.getOrMakeConcreteType$1 = function($0) { |
- return this.getOrMakeConcreteType(($0 && $0.is$List$Type())); |
+ return this.getOrMakeConcreteType($0); |
}; |
NonNullableType.prototype.isSubtypeOf$1 = function($0) { |
- return this.isSubtypeOf(($0 && $0.is$lang_Type())); |
+ return this.isSubtypeOf($0); |
}; |
NonNullableType.prototype.markUsed$0 = function() { |
return this.markUsed(); |
}; |
NonNullableType.prototype.resolveMember$1 = function($0) { |
- return this.resolveMember($assert_String($0)); |
+ return this.resolveMember($0); |
}; |
NonNullableType.prototype.resolveTypeParams$1 = function($0) { |
- return this.resolveTypeParams(($0 && $0.is$ConcreteType())); |
+ return this.resolveTypeParams($0); |
}; |
// ********** Code for ConcreteType ************** |
function ConcreteType(name, genericType, typeArguments, typeArgsInOrder) { |
@@ -20519,7 +19990,6 @@ function ConcreteType(name, genericType, typeArguments, typeArgsInOrder) { |
// Initializers done |
} |
$inherits(ConcreteType, lang_Type); |
-ConcreteType.prototype.is$ConcreteType = function(){return this;}; |
ConcreteType.prototype.get$genericType = function() { return this.genericType; }; |
ConcreteType.prototype.get$typeArgsInOrder = function() { return this.typeArgsInOrder; }; |
ConcreteType.prototype.set$typeArgsInOrder = function(value) { return this.typeArgsInOrder = value; }; |
@@ -20554,11 +20024,11 @@ ConcreteType.prototype.resolveTypeParams = function(inType) { |
for (var $i = 0;$i < $list.length; $i++) { |
var t = $list.$index($i); |
var newType = t.resolveTypeParams$1(inType); |
- if ($notnull_bool($ne(newType, t))) needsNewType = true; |
+ if ($ne(newType, t)) needsNewType = true; |
newTypeArgs.add$1(newType); |
} |
- if (!$notnull_bool(needsNewType)) return this; |
- return this.genericType.getOrMakeConcreteType((newTypeArgs && newTypeArgs.is$List$Type())); |
+ if (!needsNewType) return this; |
+ return this.genericType.getOrMakeConcreteType(newTypeArgs); |
} |
ConcreteType.prototype.getOrMakeConcreteType = function(typeArgs) { |
return this.genericType.getOrMakeConcreteType(typeArgs); |
@@ -20586,11 +20056,11 @@ ConcreteType.prototype.getAllMembers = function() { |
for (var $i = result.getKeys$0().iterator(); $i.hasNext$0(); ) { |
var memberName = $i.next$0(); |
var myMember = this.members.$index(memberName); |
- if ($notnull_bool($ne(myMember, null))) { |
+ if ($ne(myMember, null)) { |
result.$setindex(memberName, myMember); |
} |
} |
- return (result && result.is$Map$String$Member()); |
+ return result; |
} |
ConcreteType.prototype.markUsed = function() { |
this.genericType.markUsed(); |
@@ -20603,21 +20073,21 @@ ConcreteType.prototype.getFactory = function(type, constructorName) { |
} |
ConcreteType.prototype.getConstructor = function(constructorName) { |
var ret = this.constructors.$index(constructorName); |
- if ($notnull_bool($ne(ret, null))) return ret; |
+ if ($ne(ret, null)) return ret; |
ret = this.factories.getFactory(this.name, constructorName); |
- if ($notnull_bool($ne(ret, null))) return ret; |
+ if ($ne(ret, null)) return ret; |
var genericMember = this.genericType.getConstructor(constructorName); |
- if ($notnull_bool(genericMember == null)) return null; |
+ if (genericMember == null) return null; |
if ($ne(genericMember.declaringType, this.genericType)) { |
- if (!$notnull_bool(genericMember.declaringType.get$isGeneric())) return genericMember; |
+ if (!genericMember.declaringType.get$isGeneric()) return genericMember; |
var newDeclaringType = genericMember.declaringType.getOrMakeConcreteType(this.typeArgsInOrder); |
var factory = newDeclaringType.getFactory$2(this.genericType, constructorName); |
if (factory != null) return factory; |
return newDeclaringType.getConstructor$1(constructorName); |
} |
- if ($notnull_bool(genericMember.get$isFactory())) { |
- ret = new ConcreteMember($assert_String(genericMember.get$name()), this, genericMember); |
- this.factories.addFactory(this.name, constructorName, (ret && ret.is$Member())); |
+ if (genericMember.get$isFactory()) { |
+ ret = new ConcreteMember(genericMember.get$name(), this, genericMember); |
+ this.factories.addFactory(this.name, constructorName, ret); |
} |
else { |
ret = new ConcreteMember(this.name, this, genericMember); |
@@ -20627,56 +20097,56 @@ ConcreteType.prototype.getConstructor = function(constructorName) { |
} |
ConcreteType.prototype.getMember = function(memberName) { |
var ret = this.members.$index(memberName); |
- if ($notnull_bool($ne(ret, null))) return (ret && ret.is$Member()); |
+ if ($ne(ret, null)) return ret; |
var genericMember = this.genericType.getMember(memberName); |
- if ($notnull_bool(genericMember == null)) return null; |
- ret = new ConcreteMember($assert_String(genericMember.get$name()), this, genericMember); |
+ if (genericMember == null) return null; |
+ ret = new ConcreteMember(genericMember.get$name(), this, genericMember); |
this.members.$setindex(memberName, ret); |
- return (ret && ret.is$Member()); |
+ return ret; |
} |
ConcreteType.prototype.resolveMember = function(memberName) { |
var mem = this.getMember(memberName); |
- if ($notnull_bool(mem == null)) return null; |
- var ret = new MemberSet((mem && mem.is$Member()), false); |
- if ($notnull_bool(mem.get$isStatic())) return (ret && ret.is$MemberSet()); |
+ if (mem == null) return null; |
+ var ret = new MemberSet(mem, false); |
+ if (mem.get$isStatic()) return ret; |
var $list = this.genericType.get$subtypes(); |
for (var $i = this.genericType.get$subtypes().iterator(); $i.hasNext$0(); ) { |
var t = $i.next$0(); |
var m = t.get$members().$index(memberName); |
- if ($notnull_bool($ne(m, null))) ret.add$1(m); |
+ if ($ne(m, null)) ret.add$1(m); |
} |
- return (ret && ret.is$MemberSet()); |
+ return ret; |
} |
ConcreteType.prototype.resolveType = function(node, isRequired) { |
var ret = this.genericType.resolveType(node, isRequired); |
- return (ret && ret.is$lang_Type()); |
+ return ret; |
} |
ConcreteType.prototype.addDirectSubtype = function(type) { |
this.genericType.addDirectSubtype(type); |
} |
ConcreteType.prototype.addDirectSubtype$1 = function($0) { |
- return this.addDirectSubtype(($0 && $0.is$lang_Type())); |
+ return this.addDirectSubtype($0); |
}; |
ConcreteType.prototype.getConstructor$1 = function($0) { |
- return this.getConstructor($assert_String($0)); |
+ return this.getConstructor($0); |
}; |
ConcreteType.prototype.getFactory$2 = function($0, $1) { |
- return this.getFactory(($0 && $0.is$lang_Type()), $assert_String($1)); |
+ return this.getFactory($0, $1); |
}; |
ConcreteType.prototype.getMember$1 = function($0) { |
- return this.getMember($assert_String($0)); |
+ return this.getMember($0); |
}; |
ConcreteType.prototype.getOrMakeConcreteType$1 = function($0) { |
- return this.getOrMakeConcreteType(($0 && $0.is$List$Type())); |
+ return this.getOrMakeConcreteType($0); |
}; |
ConcreteType.prototype.markUsed$0 = function() { |
return this.markUsed(); |
}; |
ConcreteType.prototype.resolveMember$1 = function($0) { |
- return this.resolveMember($assert_String($0)); |
+ return this.resolveMember($0); |
}; |
ConcreteType.prototype.resolveTypeParams$1 = function($0) { |
- return this.resolveTypeParams(($0 && $0.is$ConcreteType())); |
+ return this.resolveTypeParams($0); |
}; |
// ********** Code for DefinedType ************** |
function DefinedType(name, library, definition, isClass) { |
@@ -20694,7 +20164,6 @@ function DefinedType(name, library, definition, isClass) { |
this.setDefinition(definition); |
} |
$inherits(DefinedType, lang_Type); |
-DefinedType.prototype.is$DefinedType = function(){return this;}; |
DefinedType.prototype.get$definition = function() { return this.definition; }; |
DefinedType.prototype.set$definition = function(value) { return this.definition = value; }; |
DefinedType.prototype.get$library = function() { return this.library; }; |
@@ -20720,7 +20189,6 @@ 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", 630, 12); |
this.definition = def; |
if ((this.definition instanceof TypeDefinition) && this.definition.get$nativeType() != null) { |
this.isNativeType = true; |
@@ -20732,7 +20200,7 @@ DefinedType.prototype.setDefinition = function(def) { |
for (var $i = 0;$i < $list.length; $i++) { |
var tp = $list.$index($i); |
var paramName = tp.get$name().get$name(); |
- this.typeParameters.add(new ParameterType($assert_String(paramName), tp)); |
+ this.typeParameters.add(new ParameterType(paramName, tp)); |
} |
} |
} |
@@ -20753,63 +20221,61 @@ DefinedType.prototype.get$isTop = function() { |
return this.name == null; |
} |
DefinedType.prototype.get$isObject = function() { |
- return $notnull_bool(this.library.get$isCore()) && this.name == 'Object'; |
+ return this.library.get$isCore() && this.name == 'Object'; |
} |
DefinedType.prototype.get$isString = function() { |
- return $notnull_bool(this.library.get$isCore()) && this.name == 'String' || $notnull_bool(this.library.get$isCoreImpl()) && this.name == 'StringImplementation'; |
+ return this.library.get$isCore() && this.name == 'String' || this.library.get$isCoreImpl() && this.name == 'StringImplementation'; |
} |
DefinedType.prototype.get$isBool = function() { |
- return $notnull_bool(this.library.get$isCore()) && this.name == 'bool'; |
+ return this.library.get$isCore() && this.name == 'bool'; |
} |
DefinedType.prototype.get$isFunction = function() { |
- return $notnull_bool(this.library.get$isCore()) && this.name == 'Function'; |
+ return this.library.get$isCore() && this.name == 'Function'; |
} |
DefinedType.prototype.get$isList = function() { |
- return $notnull_bool(this.library.get$isCore()) && this.name == 'List'; |
+ return this.library.get$isCore() && this.name == 'List'; |
} |
DefinedType.prototype.get$isGeneric = function() { |
return this.typeParameters != null; |
} |
DefinedType.prototype.get$span = function() { |
- var $0; |
- return (($0 = this.definition == null ? null : this.definition.span) && $0.is$SourceSpan()); |
+ return this.definition == null ? null : this.definition.span; |
} |
DefinedType.prototype.get$typeofName = function() { |
- 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'; |
- else if ($notnull_bool(this.get$isFunction())) return 'function'; |
+ if (!this.library.get$isCore()) return null; |
+ if (this.get$isBool()) return 'boolean'; |
+ else if (this.get$isNum()) return 'number'; |
+ else if (this.get$isString()) return 'string'; |
+ else if (this.get$isFunction()) return 'function'; |
else return null; |
} |
DefinedType.prototype.get$isNum = function() { |
- return this.library != null && $notnull_bool(this.library.get$isCore()) && (this.name == 'num' || this.name == 'int' || this.name == 'double'); |
+ return this.library != null && this.library.get$isCore() && (this.name == 'num' || this.name == 'int' || this.name == 'double'); |
} |
DefinedType.prototype.getCallMethod = function() { |
- var $0; |
- return (($0 = this.members.$index('\$call')) && $0.is$MethodMember()); |
+ return this.members.$index('\$call'); |
} |
DefinedType.prototype.getAllMembers = function() { |
return HashMapImplementation.HashMapImplementation$from$factory(this.members); |
} |
DefinedType.prototype.markUsed = function() { |
- if ($notnull_bool(this.isUsed)) return; |
+ if (this.isUsed) return; |
this.isUsed = true; |
if (this._lazyGenMethods != null) { |
var $list = orderValuesByKeys(this._lazyGenMethods); |
for (var $i = 0;$i < $list.length; $i++) { |
var method = $list.$index($i); |
- world.gen.genMethod((method && method.is$Member())); |
+ world.gen.genMethod(method); |
} |
this._lazyGenMethods = null; |
} |
if (this.get$parent() != null) this.get$parent().markUsed(); |
} |
DefinedType.prototype.genMethod = function(method) { |
- if ($notnull_bool(this.isUsed)) { |
+ if (this.isUsed) { |
world.gen.genMethod(method); |
} |
- else if ($notnull_bool(this.isClass)) { |
+ else if (this.isClass) { |
if (this._lazyGenMethods == null) this._lazyGenMethods = $map([]); |
this._lazyGenMethods.$setindex(method.name, method); |
} |
@@ -20819,17 +20285,16 @@ DefinedType.prototype._resolveInterfaces = function(types) { |
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(this.library.get$isCore()) || $notnull_bool(this.library.get$isCoreImpl()))) { |
+ var resolvedInterface = this.resolveType(type, true); |
+ if (resolvedInterface.get$isClosed() && !(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$1(this); |
interfaces.add$1(resolvedInterface); |
} |
- return (interfaces && interfaces.is$List$Type()); |
+ return interfaces; |
} |
DefinedType.prototype.addDirectSubtype = function(type) { |
- $assert(this._subtypes == null, "_subtypes == null", "type.dart", 746, 12); |
this.directSubtypes.add(type); |
} |
DefinedType.prototype.get$subtypes = function() { |
@@ -20848,7 +20313,7 @@ DefinedType.prototype._cycleInClassExtends = function() { |
var seen = new HashSetImplementation(); |
seen.add(this); |
var ancestor = this.get$parent(); |
- while ($notnull_bool($ne(ancestor, null))) { |
+ while ($ne(ancestor, null)) { |
if (ancestor === this) { |
return true; |
} |
@@ -20865,53 +20330,52 @@ DefinedType.prototype._cycleInInterfaceExtends = function() { |
var seen = new HashSetImplementation(); |
seen.add(this); |
function _helper(ancestor) { |
- if ($notnull_bool(ancestor == null)) return false; |
+ if (ancestor == null) return false; |
if (ancestor === $this) return true; |
if (seen.contains(ancestor)) { |
return false; |
} |
seen.add(ancestor); |
- if ($notnull_bool($ne(ancestor.get$interfaces(), null))) { |
+ if ($ne(ancestor.get$interfaces(), null)) { |
var $list = ancestor.get$interfaces(); |
for (var $i = ancestor.get$interfaces().iterator$0(); $i.hasNext$0(); ) { |
var parent = $i.next$0(); |
- if ($notnull_bool(_helper(parent))) return true; |
+ if (_helper(parent)) return true; |
} |
} |
return false; |
} |
for (var i = 0; |
i < this.interfaces.length; i++) { |
- if ($notnull_bool(_helper(this.interfaces.$index(i)))) return i; |
+ if (_helper(this.interfaces.$index(i))) return i; |
} |
return -1; |
} |
DefinedType.prototype.resolve = function() { |
var $this = this; // closure support |
- var $0; |
if ((this.definition instanceof TypeDefinition)) { |
- var typeDef = (($0 = this.definition) && $0.is$TypeDefinition()); |
- if ($notnull_bool(this.isClass)) { |
+ var typeDef = this.definition; |
+ if (this.isClass) { |
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 ((extendsTypeRef instanceof GenericTypeReference)) { |
- var g = (extendsTypeRef && extendsTypeRef.is$GenericTypeReference()); |
+ var g = extendsTypeRef; |
this.set$parent(this.resolveType(g.baseType, true)); |
} |
- this.set$parent(this.resolveType((extendsTypeRef && extendsTypeRef.is$TypeReference()), true)); |
- if (!$notnull_bool(this.get$parent().get$isClass())) { |
+ this.set$parent(this.resolveType(extendsTypeRef, true)); |
+ if (!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); |
- if ($notnull_bool(this._cycleInClassExtends())) { |
+ if (this._cycleInClassExtends()) { |
world.error(('class "' + this.name + '" has a cycle in its inheritance chain'), extendsTypeRef.get$span()); |
} |
} |
else { |
- if (!$notnull_bool(this.get$isObject())) { |
+ if (!this.get$isObject()) { |
this.set$parent(world.objectType); |
this.get$parent().addDirectSubtype(this); |
} |
@@ -20967,7 +20431,7 @@ DefinedType.prototype.resolve = function() { |
DefinedType.prototype.addMethod = function(methodName, definition) { |
if (methodName == null) methodName = definition.name.name; |
var method = new MethodMember(methodName, this, definition); |
- if ($notnull_bool(method.get$isConstructor())) { |
+ if (method.get$isConstructor()) { |
if (this.constructors.containsKey(method.get$constructorName())) { |
world.error(('duplicate constructor definition of ' + method.get$name() + ''), definition.span); |
return; |
@@ -20975,19 +20439,19 @@ DefinedType.prototype.addMethod = function(methodName, definition) { |
this.constructors.$setindex(method.get$constructorName(), method); |
return; |
} |
- if (definition.modifiers != null && definition.modifiers.length == 1 && $notnull_bool($eq(definition.modifiers.$index(0).kind, 75/*TokenKind.FACTORY*/))) { |
- if (this.factories.getFactory(method.get$constructorName(), $assert_String(method.get$name())) != null) { |
+ if (definition.modifiers != null && definition.modifiers.length == 1 && $eq(definition.modifiers.$index(0).kind, 75/*TokenKind.FACTORY*/)) { |
+ if (this.factories.getFactory(method.get$constructorName(), 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())); |
+ this.factories.addFactory(method.get$constructorName(), method.get$name(), method); |
return; |
} |
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); |
+ if (prop == null) { |
+ prop = new PropertyMember(propName, this); |
this.members.$setindex(propName, prop); |
} |
if (!(prop instanceof PropertyMember)) { |
@@ -20998,13 +20462,13 @@ DefinedType.prototype.addMethod = function(methodName, definition) { |
if (prop.getter != null) { |
world.error(('duplicate getter definition for "' + propName + '"'), definition.span); |
} |
- prop.getter = (method && method.is$MethodMember()); |
+ prop.getter = method; |
} |
else { |
if (prop.setter != null) { |
world.error(('duplicate setter definition for "' + propName + '"'), definition.span); |
} |
- prop.setter = (method && method.is$MethodMember()); |
+ prop.setter = method; |
} |
return; |
} |
@@ -21026,85 +20490,83 @@ DefinedType.prototype.addField = function(definition) { |
if (definition.values != null) { |
value = definition.values.$index(i); |
} |
- var field = new FieldMember($assert_String(name), this, definition, value); |
+ var field = new FieldMember(name, this, definition, value); |
this.members.$setindex(name, field); |
- if ($notnull_bool(this.isNativeType)) { |
+ if (this.isNativeType) { |
field.isNative = true; |
} |
} |
} |
DefinedType.prototype.getFactory = function(type, constructorName) { |
var ret = this.factories.getFactory(type.name, constructorName); |
- if ($notnull_bool($ne(ret, null))) return ret; |
+ if ($ne(ret, null)) return ret; |
ret = this.factories.getFactory(this.name, constructorName); |
- if ($notnull_bool($ne(ret, null))) return ret; |
+ if ($ne(ret, null)) return ret; |
ret = this.constructors.$index(constructorName); |
- if ($notnull_bool($ne(ret, null))) return ret; |
+ if ($ne(ret, null)) return ret; |
return this._tryCreateDefaultConstructor(constructorName); |
} |
DefinedType.prototype.getConstructor = function(constructorName) { |
var ret = this.constructors.$index(constructorName); |
- if ($notnull_bool($ne(ret, null))) { |
+ if ($ne(ret, null)) { |
if (this.factory_ != null) { |
return this.factory_.getFactory(this, constructorName); |
} |
return ret; |
} |
ret = this.factories.getFactory(this.name, constructorName); |
- if ($notnull_bool($ne(ret, null))) return ret; |
+ if ($ne(ret, null)) return ret; |
return this._tryCreateDefaultConstructor(constructorName); |
} |
DefinedType.prototype._tryCreateDefaultConstructor = function(name) { |
- var $0; |
- if (name == '' && this.definition != null && $notnull_bool(this.isClass) && this.constructors.get$length() == 0) { |
+ if (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)) { |
- body = new NativeStatement(null, (span && span.is$SourceSpan())); |
+ if (this.isNativeType) { |
+ body = new NativeStatement(null, span); |
inits = null; |
} |
else { |
body = null; |
- inits = [new CallExpression(new SuperExpression((span && span.is$SourceSpan())), [], (span && span.is$SourceSpan()))]; |
+ inits = [new CallExpression(new SuperExpression(span), [], span)]; |
} |
- var typeDef = (($0 = this.definition) && $0.is$TypeDefinition()); |
- var c = new FunctionDefinition(null, null, typeDef.name, [], inits, body, (span && span.is$SourceSpan())); |
- this.addMethod(null, (c && c.is$FunctionDefinition())); |
+ var typeDef = this.definition; |
+ var c = new FunctionDefinition(null, null, typeDef.name, [], inits, body, span); |
+ this.addMethod(null, c); |
this.constructors.$index('').resolve$1(this); |
return this.constructors.$index(''); |
} |
return null; |
} |
DefinedType.prototype.getMember = function(memberName) { |
- var $0; |
- var member = (($0 = this.members.$index(memberName)) && $0.is$Member()); |
+ var member = this.members.$index(memberName); |
if (member != null) { |
var parentMember = this.getMemberInParents(memberName); |
- if ($notnull_bool($ne(parentMember, null))) { |
- if (!$notnull_bool(member.get$isPrivate()) || $eq(member.get$library(), parentMember.get$library())) { |
- member.override((parentMember && parentMember.is$Member())); |
+ if ($ne(parentMember, null)) { |
+ if (!member.get$isPrivate() || $eq(member.get$library(), parentMember.get$library())) { |
+ member.override(parentMember); |
} |
} |
return member; |
} |
- if ($notnull_bool(this.get$isTop())) { |
+ if (this.get$isTop()) { |
var libType = this.library.findTypeByName(memberName); |
- if ($notnull_bool($ne(libType, null))) { |
+ if ($ne(libType, null)) { |
return libType.get$typeMember(); |
} |
} |
return this.getMemberInParents(memberName); |
} |
DefinedType.prototype.getMemberInParents = function(memberName) { |
- if ($notnull_bool(this.isClass)) { |
+ if (this.isClass) { |
if (this.get$parent() != null) { |
return this.get$parent().getMember(memberName); |
} |
- else if ($notnull_bool(this.get$isObject())) { |
+ else if (this.get$isObject()) { |
if (memberName == '\$ne') { |
var ret = this._createNotEqualMember(); |
this.members.$setindex(memberName, ret); |
- return (ret && ret.is$Member()); |
+ return ret; |
} |
return null; |
} |
@@ -21115,8 +20577,8 @@ DefinedType.prototype.getMemberInParents = function(memberName) { |
for (var $i = 0;$i < $list.length; $i++) { |
var i = $list.$index($i); |
var ret = i.getMember$1(memberName); |
- if ($notnull_bool($ne(ret, null))) { |
- return (ret && ret.is$Member()); |
+ if ($ne(ret, null)) { |
+ return ret; |
} |
} |
return null; |
@@ -21127,8 +20589,7 @@ DefinedType.prototype.getMemberInParents = function(memberName) { |
} |
} |
DefinedType.prototype.resolveMember = function(memberName) { |
- var $0; |
- var ret = (($0 = this._resolvedMembers.$index(memberName)) && $0.is$MemberSet()); |
+ var ret = this._resolvedMembers.$index(memberName); |
if (ret != null) return ret; |
var member = this.getMember(memberName); |
if (member == null) { |
@@ -21136,7 +20597,7 @@ DefinedType.prototype.resolveMember = function(memberName) { |
} |
ret = new MemberSet(member, false); |
this._resolvedMembers.$setindex(memberName, ret); |
- if ($notnull_bool(member.get$isStatic())) { |
+ if (member.get$isStatic()) { |
return ret; |
} |
else { |
@@ -21144,20 +20605,19 @@ DefinedType.prototype.resolveMember = function(memberName) { |
for (var $i = this.get$subtypes().iterator(); $i.hasNext$0(); ) { |
var t = $i.next$0(); |
var m; |
- if (!$notnull_bool(this.isClass) && $notnull_bool(t.get$isClass())) { |
+ if (!this.isClass && t.get$isClass()) { |
m = t.getMember$1(memberName); |
} |
else { |
m = t.get$members().$index(memberName); |
} |
- if ($notnull_bool($ne(m, null))) ret.add((m && m.is$Member())); |
+ if ($ne(m, null)) ret.add(m); |
} |
return ret; |
} |
} |
DefinedType.prototype._createNotEqualMember = function() { |
- var $0; |
- var eq = (($0 = this.members.$index('\$eq')) && $0.is$MethodMember()); |
+ var eq = this.members.$index('\$eq'); |
if (eq == null) { |
world.internalError('INTERNAL: object does not define ==', this.definition.span); |
} |
@@ -21175,21 +20635,20 @@ DefinedType._getDottedName = function(type) { |
return n.get$name(); |
}) |
); |
- return type.name.name + '.' + Strings.join((names && names.is$List$String()), '.'); |
+ return type.name.name + '.' + Strings.join(names, '.'); |
} |
else { |
return type.name.name; |
} |
} |
DefinedType.prototype.resolveType = function(node, typeErrors) { |
- var $0; |
if (node == null) return world.varType; |
if (node.type != null) return node.type; |
if ((node instanceof NameTypeReference)) { |
- var typeRef = (node && node.is$NameTypeReference()); |
+ var typeRef = node; |
var name; |
if (typeRef.names != null) { |
- name = $assert_String(typeRef.names.last().get$name()); |
+ name = typeRef.names.last().get$name(); |
} |
else { |
name = typeRef.name.name; |
@@ -21198,8 +20657,8 @@ DefinedType.prototype.resolveType = function(node, typeErrors) { |
var $list = this.typeParameters; |
for (var $i = 0;$i < $list.length; $i++) { |
var tp = $list.$index($i); |
- if ($notnull_bool($eq(tp.get$name(), name))) { |
- typeRef.type = (tp && tp.is$lang_Type()); |
+ if ($eq(tp.get$name(), name)) { |
+ typeRef.type = tp; |
} |
} |
} |
@@ -21208,20 +20667,20 @@ DefinedType.prototype.resolveType = function(node, typeErrors) { |
} |
if (typeRef.type == null) { |
var message = ('can not find type ' + DefinedType._getDottedName(typeRef) + ''); |
- if ($notnull_bool(typeErrors)) { |
- world.error($assert_String(message), typeRef.span); |
+ if (typeErrors) { |
+ world.error(message, typeRef.span); |
typeRef.type = world.objectType; |
} |
else { |
- world.warning($assert_String(message), typeRef.span); |
+ world.warning(message, typeRef.span); |
typeRef.type = world.varType; |
} |
} |
} |
else if ((node instanceof GenericTypeReference)) { |
- var typeRef = (node && node.is$GenericTypeReference()); |
+ var typeRef = node; |
var baseType = this.resolveType(typeRef.baseType, typeErrors); |
- if (!$notnull_bool(baseType.get$isGeneric())) { |
+ if (!baseType.get$isGeneric()) { |
world.error(('' + baseType.get$name() + ' is not generic'), typeRef.span); |
return null; |
} |
@@ -21233,19 +20692,19 @@ DefinedType.prototype.resolveType = function(node, typeErrors) { |
for (var i = 0; |
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); |
+ var typeArg = this.resolveType(typeRef.typeArguments.$index(i), typeErrors); |
typeArgs.add$1(typeArg); |
- if ($notnull_bool($ne(extendsType, null)) && !(typeArg instanceof ParameterType)) { |
+ if ($ne(extendsType, null) && !(typeArg instanceof ParameterType)) { |
typeArg.ensureSubtypeOf$3(extendsType, typeRef.typeArguments.$index(i).get$span(), typeErrors); |
} |
} |
typeRef.type = baseType.getOrMakeConcreteType$1(typeArgs); |
} |
else if ((node instanceof FunctionTypeReference)) { |
- var typeRef = (node && node.is$FunctionTypeReference()); |
+ var typeRef = node; |
var name = ''; |
if (typeRef.func.name != null) name = typeRef.func.name.name; |
- typeRef.type = this.library.getOrAddFunctionType($assert_String(name), typeRef.func, this); |
+ typeRef.type = this.library.getOrAddFunctionType(name, typeRef.func, this); |
} |
else { |
world.internalError('unknown type reference', node.span); |
@@ -21256,7 +20715,6 @@ DefinedType.prototype.resolveTypeParams = function(inType) { |
return this; |
} |
DefinedType.prototype.getOrMakeConcreteType = function(typeArgs) { |
- $assert(this.get$isGeneric(), "isGeneric", "type.dart", 1229, 12); |
var names = [this.name]; |
var typeMap = $map([]); |
for (var i = 0; |
@@ -21265,42 +20723,41 @@ DefinedType.prototype.getOrMakeConcreteType = function(typeArgs) { |
typeMap.$setindex(paramName, typeArgs.$index(i)); |
names.add$1(typeArgs.$index(i).get$name()); |
} |
- var concreteName = Strings.join((names && names.is$List$String()), '\$'); |
+ var concreteName = Strings.join(names, '\$'); |
var ret = this._concreteTypes.$index(concreteName); |
- if ($notnull_bool(ret == null)) { |
- ret = new ConcreteType($assert_String(concreteName), this, typeMap, typeArgs); |
+ if (ret == null) { |
+ ret = new ConcreteType(concreteName, this, typeMap, typeArgs); |
this._concreteTypes.$setindex(concreteName, ret); |
} |
- return (ret && ret.is$lang_Type()); |
+ return ret; |
} |
DefinedType.prototype.getCallStub = function(args) { |
- $assert(this.get$isFunction(), "isFunction", "type.dart", 1249, 12); |
var name = _getCallStubName('call', args); |
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); |
+ if (stub == null) { |
+ stub = new VarFunctionStub(name, args); |
this.varStubs.$setindex(name, stub); |
} |
- return (stub && stub.is$VarFunctionStub()); |
+ return stub; |
} |
DefinedType.prototype.addDirectSubtype$1 = function($0) { |
- return this.addDirectSubtype(($0 && $0.is$lang_Type())); |
+ return this.addDirectSubtype($0); |
}; |
DefinedType.prototype.addMethod$2 = function($0, $1) { |
- return this.addMethod($assert_String($0), ($1 && $1.is$FunctionDefinition())); |
+ return this.addMethod($0, $1); |
}; |
DefinedType.prototype.getConstructor$1 = function($0) { |
- return this.getConstructor($assert_String($0)); |
+ return this.getConstructor($0); |
}; |
DefinedType.prototype.getFactory$2 = function($0, $1) { |
- return this.getFactory(($0 && $0.is$lang_Type()), $assert_String($1)); |
+ return this.getFactory($0, $1); |
}; |
DefinedType.prototype.getMember$1 = function($0) { |
- return this.getMember($assert_String($0)); |
+ return this.getMember($0); |
}; |
DefinedType.prototype.getOrMakeConcreteType$1 = function($0) { |
- return this.getOrMakeConcreteType(($0 && $0.is$List$Type())); |
+ return this.getOrMakeConcreteType($0); |
}; |
DefinedType.prototype.markUsed$0 = function() { |
return this.markUsed(); |
@@ -21309,13 +20766,13 @@ DefinedType.prototype.resolve$0 = function() { |
return this.resolve(); |
}; |
DefinedType.prototype.resolveMember$1 = function($0) { |
- return this.resolveMember($assert_String($0)); |
+ return this.resolveMember($0); |
}; |
DefinedType.prototype.resolveTypeParams$1 = function($0) { |
- return this.resolveTypeParams(($0 && $0.is$ConcreteType())); |
+ return this.resolveTypeParams($0); |
}; |
DefinedType.prototype.setDefinition$1 = function($0) { |
- return this.setDefinition(($0 && $0.is$Definition())); |
+ return this.setDefinition($0); |
}; |
// ********** Code for FixedCollection ************** |
function FixedCollection(value, length) { |
@@ -21323,10 +20780,6 @@ function FixedCollection(value, length) { |
this.length = length; |
// Initializers done |
} |
-FixedCollection.prototype.is$Collection$E = function(){return this;}; |
-FixedCollection.prototype.is$Collection$Object = function(){return this;}; |
-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() { |
return new FixedIterator$E(this.value, this.length); |
@@ -21358,10 +20811,6 @@ function FixedCollection$Type(value, length) { |
// Initializers done |
} |
$inherits(FixedCollection$Type, FixedCollection); |
-FixedCollection$Type.prototype.is$Collection$E = function(){return this;}; |
-FixedCollection$Type.prototype.is$Collection$Object = function(){return this;}; |
-FixedCollection$Type.prototype.is$Collection$Type = function(){return this;}; |
-FixedCollection$Type.prototype.is$Iterable = function(){return this;}; |
// ********** Code for FixedIterator ************** |
function FixedIterator(value, length) { |
this._index = 0 |
@@ -21369,7 +20818,6 @@ function FixedIterator(value, length) { |
this.length = length; |
// Initializers done |
} |
-FixedIterator.prototype.is$Iterator$T = function(){return this;}; |
FixedIterator.prototype.get$value = function() { return this.value; }; |
FixedIterator.prototype.hasNext = function() { |
return this._index < this.length; |
@@ -21392,7 +20840,6 @@ function FixedIterator$E(value, length) { |
// Initializers done |
} |
$inherits(FixedIterator$E, FixedIterator); |
-FixedIterator$E.prototype.is$Iterator$T = function(){return this;}; |
// ********** Code for Value ************** |
function Value(type, code, span, needsTemp) { |
this.isSuper = false |
@@ -21404,13 +20851,10 @@ function Value(type, code, span, needsTemp) { |
// Initializers done |
if (this.type == null) world.internalError('type passed as null', this.span); |
} |
-Value.prototype.is$Value = function(){return this;}; |
-Value.prototype.get$type = function() { return this.type; }; |
-Value.prototype.set$type = function(value) { return this.type = value; }; |
Value.prototype.get$span = function() { return this.span; }; |
Value.prototype.set$span = function(value) { return this.span = value; }; |
Value.prototype.get$_typeIsVarOrParameterType = function() { |
- return $notnull_bool(this.type.get$isVar()) || (this.type instanceof ParameterType); |
+ return this.type.get$isVar() || (this.type instanceof ParameterType); |
} |
Value.prototype.get$isConst = function() { |
return false; |
@@ -21420,7 +20864,7 @@ Value.prototype.get$canonicalCode = function() { |
} |
Value.prototype.get_ = function(context, name, node) { |
var member = this._resolveMember(context, name, node, false); |
- if ($notnull_bool($ne(member, null))) { |
+ if ($ne(member, null)) { |
return member._get$3(context, node, this); |
} |
else { |
@@ -21429,7 +20873,7 @@ Value.prototype.get_ = function(context, name, node) { |
} |
Value.prototype.set_ = function(context, name, node, value, isDynamic) { |
var member = this._resolveMember(context, name, node, isDynamic); |
- if ($notnull_bool($ne(member, null))) { |
+ if ($ne(member, null)) { |
return member._set(context, node, this, value, isDynamic); |
} |
else { |
@@ -21437,7 +20881,7 @@ 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 (this.get$_typeIsVarOrParameterType() && name == '\$ne') { |
if (args.values.length != 1) { |
world.warning('wrong number of arguments for !=', node.span); |
} |
@@ -21446,15 +20890,15 @@ Value.prototype.invoke = function(context, name, node, args, isDynamic) { |
return new Value(eq.type, ('\$ne(' + this.code + ', ' + args.values.$index(0).code + ')'), node.span, true); |
} |
if (name == '\$call') { |
- if ($notnull_bool(this.isType)) { |
+ if (this.isType) { |
world.error('must use "new" or "const" to construct a new instance', node.span); |
} |
- if ($notnull_bool(this.type.needsVarCall(args))) { |
+ if (this.type.needsVarCall(args)) { |
return this._varCall(context, args); |
} |
} |
var member = this._resolveMember(context, name, node, isDynamic); |
- if ($notnull_bool(member == null)) { |
+ if (member == null) { |
return this.invokeNoSuchMethod(context, name, node, args); |
} |
else { |
@@ -21462,26 +20906,26 @@ Value.prototype.invoke = function(context, name, node, args, isDynamic) { |
} |
} |
Value.prototype.canInvoke = function(context, name, args) { |
- if ($notnull_bool(this.get$_typeIsVarOrParameterType()) && name == '\$ne') { |
+ if (this.get$_typeIsVarOrParameterType() && name == '\$ne') { |
return true; |
} |
- if ($notnull_bool(this.type.get$isVarOrFunction()) && name == '\$call') { |
+ if (this.type.get$isVarOrFunction() && name == '\$call') { |
return true; |
} |
var member = this._resolveMember(context, name, null, true); |
- return $notnull_bool($ne(member, null)) && $notnull_bool(member.canInvoke$2(context, args)); |
+ return $ne(member, null) && member.canInvoke$2(context, args); |
} |
Value.prototype._hasOverriddenNoSuchMethod = function() { |
- if ($notnull_bool(this.isSuper)) { |
+ if (this.isSuper) { |
var m = this.type.getMember('noSuchMethod'); |
- return $notnull_bool($ne(m, null)) && !$notnull_bool(m.declaringType.get$isObject()); |
+ return $ne(m, null) && !m.declaringType.get$isObject(); |
} |
else { |
return this.type.resolveMember('noSuchMethod').members.length > 1; |
} |
} |
Value.prototype._tryResolveMember = function(context, name) { |
- if ($notnull_bool(this.isSuper)) { |
+ if (this.isSuper) { |
return this.type.getMember(name); |
} |
else { |
@@ -21490,35 +20934,35 @@ Value.prototype._tryResolveMember = function(context, name) { |
} |
Value.prototype._resolveMember = function(context, name, node, isDynamic) { |
var member; |
- if (!$notnull_bool(this.get$_typeIsVarOrParameterType())) { |
+ if (!this.get$_typeIsVarOrParameterType()) { |
member = this._tryResolveMember(context, name); |
- if ($notnull_bool($ne(member, null)) && $notnull_bool(this.isType) && !$notnull_bool(member.get$isStatic())) { |
- if (!$notnull_bool(isDynamic)) { |
+ if ($ne(member, null) && this.isType && !member.get$isStatic()) { |
+ if (!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())) { |
+ if (member == null && !isDynamic && !this._hasOverriddenNoSuchMethod()) { |
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); |
+ if (this.isType) { |
+ world.error(message, node.span); |
} |
else { |
- world.warning($assert_String(message), node.span); |
+ world.warning(message, node.span); |
} |
} |
} |
- if ($notnull_bool(member == null) && !$notnull_bool(this.isSuper) && !$notnull_bool(this.isType)) { |
+ if (member == null && !this.isSuper && !this.isType) { |
member = context.findMembers(name); |
- if ($notnull_bool(member == null) && !$notnull_bool(isDynamic)) { |
+ if (member == null && !isDynamic) { |
world.warning(('' + name + ' is not defined anywhere in the world.'), node.span); |
} |
} |
return member; |
} |
Value.prototype.checkFirstClass = function(span) { |
- if ($notnull_bool(this.isType)) { |
+ if (this.isType) { |
world.error('Types are not first class', span); |
} |
} |
@@ -21528,54 +20972,53 @@ Value.prototype._varCall = function(context, args) { |
} |
Value.prototype.needsConversion = function(toType) { |
var callMethod = toType.getCallMethod(); |
- if ($notnull_bool($ne(callMethod, null))) { |
+ if ($ne(callMethod, null)) { |
var arity = callMethod.get$parameters().length; |
var myCall = this.type.getCallMethod(); |
- if ($notnull_bool(myCall == null) || myCall.get$parameters().length != arity) { |
+ if (myCall == null || myCall.get$parameters().length != arity) { |
return true; |
} |
} |
- if ($notnull_bool(options.enableTypeChecks)) { |
+ if (options.enableTypeChecks) { |
var fromType = this.type; |
- if ($notnull_bool(this.type.get$isVar()) && (this.code != 'null' || !$notnull_bool(toType.get$isNullable()))) { |
+ if (this.type.get$isVar() && (this.code != 'null' || !toType.get$isNullable())) { |
fromType = world.objectType; |
} |
- var bothNum = $notnull_bool(this.type.get$isNum()) && $notnull_bool(toType.get$isNum()); |
- return $notnull_bool(fromType.isSubtypeOf(toType)) || $notnull_bool(bothNum); |
+ var bothNum = this.type.get$isNum() && toType.get$isNum(); |
+ return fromType.isSubtypeOf(toType) || bothNum; |
} |
return false; |
} |
Value.prototype.convertTo = function(context, toType, node, isDynamic) { |
- var $0; |
- var checked = !$notnull_bool(isDynamic); |
+ var checked = !isDynamic; |
var callMethod = toType.getCallMethod(); |
- if ($notnull_bool($ne(callMethod, null))) { |
- if ($notnull_bool(checked) && !$notnull_bool(toType.isAssignable(this.type))) { |
+ if ($ne(callMethod, null)) { |
+ if (checked && !toType.isAssignable(this.type)) { |
this.convertWarning(toType, node); |
} |
var arity = callMethod.get$parameters().length; |
var myCall = this.type.getCallMethod(); |
- if ($notnull_bool(myCall == null) || myCall.get$parameters().length != arity) { |
+ if (myCall == null || myCall.get$parameters().length != arity) { |
var stub = world.functionType.getCallStub(Arguments.Arguments$bare$factory(arity)); |
var val = new Value(toType, ('to\$' + stub.name + '(' + this.code + ')'), node.span, true); |
- return (($0 = $notnull_bool(this._isDomCallback(toType)) && !$notnull_bool(this._isDomCallback(this.type)) ? val._wrapDomCallback(toType, arity) : val) && $0.is$Value()); |
+ return this._isDomCallback(toType) && !this._isDomCallback(this.type) ? val._wrapDomCallback(toType, arity) : val; |
} |
- else if ($notnull_bool(this._isDomCallback(toType)) && !$notnull_bool(this._isDomCallback(this.type))) { |
+ else if (this._isDomCallback(toType) && !this._isDomCallback(this.type)) { |
return this._wrapDomCallback(toType, arity); |
} |
} |
var fromType = this.type; |
- if ($notnull_bool(this.type.get$isVar()) && (this.code != 'null' || !$notnull_bool(toType.get$isNullable()))) { |
+ if (this.type.get$isVar() && (this.code != 'null' || !toType.get$isNullable())) { |
fromType = world.objectType; |
} |
- var bothNum = $notnull_bool(this.type.get$isNum()) && $notnull_bool(toType.get$isNum()); |
- if ($notnull_bool(fromType.isSubtypeOf(toType)) || $notnull_bool(bothNum)) { |
+ var bothNum = this.type.get$isNum() && toType.get$isNum(); |
+ if (fromType.isSubtypeOf(toType) || bothNum) { |
return this; |
} |
- if ($notnull_bool(checked) && !$notnull_bool(toType.isSubtypeOf(this.type))) { |
+ if (checked && !toType.isSubtypeOf(this.type)) { |
this.convertWarning(toType, node); |
} |
- if ($notnull_bool(options.enableTypeChecks)) { |
+ if (options.enableTypeChecks) { |
return this._typeAssert(context, toType, node); |
} |
else { |
@@ -21590,18 +21033,18 @@ Value.prototype._wrapDomCallback = function(toType, arity) { |
} |
Value.prototype._typeAssert = function(context, toType, node) { |
if ((toType instanceof ParameterType)) { |
- var p = (toType && toType.is$ParameterType()); |
+ var p = toType; |
toType = p.extendsType; |
} |
if (toType.getCallMethod() != null) { |
return this; |
} |
- if ($notnull_bool(toType.get$isObject()) || $notnull_bool(toType.get$isVar())) { |
+ if (toType.get$isObject() || toType.get$isVar()) { |
world.internalError(('We thought ' + this.type.name + ' is not a subtype of ' + toType.name + '?')); |
} |
- if ($notnull_bool(toType.get$isNum())) toType = world.numType; |
+ if (toType.get$isNum()) toType = world.numType; |
var check; |
- if ($notnull_bool(toType.get$isVoid())) { |
+ if (toType.get$isVoid()) { |
check = ('\$assert_void(' + this.code + ')'); |
if (toType.typeCheckCode == null) { |
toType.typeCheckCode = "function $assert_void(x) {\n return x == null ? x : x.is$void(); // throws TypeError\n}"; |
@@ -21611,7 +21054,7 @@ Value.prototype._typeAssert = function(context, toType, node) { |
world.gen.corejs.useNotNullBool = true; |
check = ('\$notnull_bool(' + this.code + ')'); |
} |
- else if ($notnull_bool(toType.get$library().get$isCore()) && toType.get$typeofName() != null) { |
+ else if (toType.get$library().get$isCore() && toType.get$typeofName() != null) { |
check = ('\$assert_' + toType.name + '(' + this.code + ')'); |
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}"); |
@@ -21620,14 +21063,14 @@ Value.prototype._typeAssert = function(context, toType, node) { |
else { |
toType.isTested = true; |
var temp = context.getTemp(this); |
- check = ('(' + context.assignTemp((temp && temp.is$Value()), this).code + ' &&'); |
+ check = ('(' + context.assignTemp(temp, this).code + ' &&'); |
check = check + (' ' + temp.code + '.is\$' + toType.get$jsname() + '())'); |
- if ($ne(this, temp)) context.freeTemp((temp && temp.is$Value())); |
+ if ($ne(this, temp)) context.freeTemp(temp); |
} |
return new Value(toType, check, this.span, true); |
} |
Value.prototype.instanceOf = function(context, toType, span, isTrue, forceCheck) { |
- if ($notnull_bool(toType.get$isVar())) { |
+ if (toType.get$isVar()) { |
world.error('can not resolve type', span); |
return EvaluatedValue.EvaluatedValue$factory(world.nonNullBool, true, 'true', null); |
} |
@@ -21635,31 +21078,31 @@ Value.prototype.instanceOf = function(context, toType, span, isTrue, forceCheck) |
return EvaluatedValue.EvaluatedValue$factory(world.nonNullBool, true, 'true', null); |
} |
var testCode = null; |
- if ($notnull_bool(toType.get$library().get$isCore())) { |
+ if (toType.get$library().get$isCore()) { |
var typeofName = toType.get$typeofName(); |
- if ($notnull_bool($ne(typeofName, null))) { |
- testCode = ("(typeof(" + this.code + ") " + ($notnull_bool(isTrue) ? '==' : '!=') + " '" + typeofName + "')"); |
+ if ($ne(typeofName, null)) { |
+ testCode = ("(typeof(" + this.code + ") " + (isTrue ? '==' : '!=') + " '" + typeofName + "')"); |
} |
} |
- if ($notnull_bool(toType.get$isClass()) && !(toType instanceof ConcreteType)) { |
+ if (toType.get$isClass() && !(toType instanceof ConcreteType)) { |
toType.markUsed(); |
testCode = ('(' + this.code + ' instanceof ' + toType.get$jsname() + ')'); |
- if (!$notnull_bool(isTrue)) { |
+ if (!isTrue) { |
testCode = '!' + testCode; |
} |
} |
if (testCode == null) { |
toType.isTested = true; |
var temp = context.getTemp(this); |
- testCode = ('(' + context.assignTemp((temp && temp.is$Value()), this).code + ' &&'); |
+ testCode = ('(' + context.assignTemp(temp, this).code + ' &&'); |
testCode = testCode + (' ' + temp.code + '.is\$' + toType.get$jsname() + ')'); |
- if ($notnull_bool(isTrue)) { |
+ if (isTrue) { |
testCode = '!!' + testCode; |
} |
else { |
testCode = '!' + testCode; |
} |
- if ($ne(this, temp)) context.freeTemp((temp && temp.is$Value())); |
+ if ($ne(this, temp)) context.freeTemp(temp); |
} |
return new Value(world.nonNullBool, testCode, span, true); |
} |
@@ -21674,14 +21117,12 @@ Value.prototype.invokeNoSuchMethod = function(context, name, node, args) { |
i < args.get$length(); i++) { |
argsCode.add$1(args.values.$index(i).code); |
} |
- pos = Strings.join((argsCode && argsCode.is$List$String()), ", "); |
+ pos = Strings.join(argsCode, ", "); |
} |
var noSuchArgs = [new Value(world.stringType, ('"' + name + '"'), node.span, true), new Value(world.listType, ('[' + pos + ']'), node.span, true)]; |
return this._resolveMember(context, 'noSuchMethod', node, false).invoke$4(context, node, this, new Arguments(null, noSuchArgs)); |
} |
Value.prototype.invokeSpecial = function(name, args, returnType) { |
- $assert(name.startsWith('\$'), "name.startsWith('\\$')", "value.dart", 455, 12); |
- $assert(!$notnull_bool(args.get$hasNames()), "!args.hasNames", "value.dart", 456, 12); |
var argsString = args.getCode(); |
if (name == '\$index' || name == '\$setindex') { |
return new Value(returnType, ('' + this.code + '.' + name + '(' + argsString + ')'), this.span, true); |
@@ -21693,37 +21134,37 @@ Value.prototype.invokeSpecial = function(name, args, returnType) { |
} |
} |
Value.prototype.checkFirstClass$1 = function($0) { |
- return this.checkFirstClass(($0 && $0.is$SourceSpan())); |
+ return this.checkFirstClass($0); |
}; |
Value.prototype.convertTo$3 = function($0, $1, $2) { |
- return this.convertTo(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Type()), ($2 && $2.is$lang_Node()), false); |
+ return this.convertTo($0, $1, $2, false); |
}; |
Value.prototype.convertTo$4 = function($0, $1, $2, $3) { |
- return this.convertTo(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Type()), ($2 && $2.is$lang_Node()), $assert_bool($3)); |
+ return this.convertTo($0, $1, $2, $3); |
}; |
Value.prototype.get_$3 = function($0, $1, $2) { |
- return this.get_(($0 && $0.is$MethodGenerator()), $assert_String($1), ($2 && $2.is$lang_Node())); |
+ return this.get_($0, $1, $2); |
}; |
Value.prototype.instanceOf$3$isTrue$forceCheck = function($0, $1, $2, isTrue, forceCheck) { |
- return this.instanceOf(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Type()), ($2 && $2.is$SourceSpan()), $assert_bool(isTrue), $assert_bool(forceCheck)); |
+ return this.instanceOf($0, $1, $2, isTrue, forceCheck); |
}; |
Value.prototype.instanceOf$4 = function($0, $1, $2, $3) { |
- return this.instanceOf(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Type()), ($2 && $2.is$SourceSpan()), $assert_bool($3), false); |
+ return this.instanceOf($0, $1, $2, $3, false); |
}; |
Value.prototype.invoke$4 = function($0, $1, $2, $3) { |
- return this.invoke(($0 && $0.is$MethodGenerator()), $assert_String($1), ($2 && $2.is$lang_Node()), ($3 && $3.is$Arguments()), false); |
+ return this.invoke($0, $1, $2, $3, false); |
}; |
Value.prototype.invoke$4$isDynamic = function($0, $1, $2, $3, isDynamic) { |
- return this.invoke(($0 && $0.is$MethodGenerator()), $assert_String($1), ($2 && $2.is$lang_Node()), ($3 && $3.is$Arguments()), $assert_bool(isDynamic)); |
+ return this.invoke($0, $1, $2, $3, isDynamic); |
}; |
Value.prototype.invoke$5 = function($0, $1, $2, $3, $4) { |
- return this.invoke(($0 && $0.is$MethodGenerator()), $assert_String($1), ($2 && $2.is$lang_Node()), ($3 && $3.is$Arguments()), $assert_bool($4)); |
+ return this.invoke($0, $1, $2, $3, $4); |
}; |
Value.prototype.needsConversion$1 = function($0) { |
- return this.needsConversion(($0 && $0.is$lang_Type())); |
+ return this.needsConversion($0); |
}; |
Value.prototype.set_$4 = function($0, $1, $2, $3) { |
- return this.set_(($0 && $0.is$MethodGenerator()), $assert_String($1), ($2 && $2.is$lang_Node()), ($3 && $3.is$Value()), false); |
+ return this.set_($0, $1, $2, $3, false); |
}; |
// ********** Code for EvaluatedValue ************** |
function EvaluatedValue() {} |
@@ -21752,7 +21193,7 @@ EvaluatedValue.codeWithComments = function(canonicalCode, span) { |
function ConstListValue() {} |
ConstListValue._internal$ctor = function(type, values, actualValue, canonicalCode, span, code) { |
this.values = values; |
- EvaluatedValue._internal$ctor.call(this, (type && type.is$lang_Type()), actualValue, canonicalCode, (span && span.is$SourceSpan()), $assert_String(code)); |
+ EvaluatedValue._internal$ctor.call(this, type, actualValue, canonicalCode, span, code); |
// Initializers done |
} |
ConstListValue._internal$ctor.prototype = ConstListValue.prototype; |
@@ -21764,7 +21205,7 @@ ConstListValue.ConstListValue$factory = function(type, values, actualValue, cano |
function ConstMapValue() {} |
ConstMapValue._internal$ctor = function(type, values, actualValue, canonicalCode, span, code) { |
this.values = values; |
- EvaluatedValue._internal$ctor.call(this, (type && type.is$lang_Type()), actualValue, canonicalCode, (span && span.is$SourceSpan()), $assert_String(code)); |
+ EvaluatedValue._internal$ctor.call(this, type, actualValue, canonicalCode, span, code); |
// Initializers done |
} |
ConstMapValue._internal$ctor.prototype = ConstMapValue.prototype; |
@@ -21781,7 +21222,7 @@ ConstMapValue.ConstMapValue$factory = function(type, keyValuePairs, actualValue, |
function ConstObjectValue() {} |
ConstObjectValue._internal$ctor = function(type, fields, actualValue, canonicalCode, span, code) { |
this.fields = fields; |
- EvaluatedValue._internal$ctor.call(this, (type && type.is$lang_Type()), actualValue, canonicalCode, (span && span.is$SourceSpan()), $assert_String(code)); |
+ EvaluatedValue._internal$ctor.call(this, type, actualValue, canonicalCode, span, code); |
// Initializers done |
} |
ConstObjectValue._internal$ctor.prototype = ConstObjectValue.prototype; |
@@ -21807,16 +21248,14 @@ function GlobalValue(type, code, isConst, field, name, exp, canonicalCode, span, |
this.exp = exp; |
this.canonicalCode = canonicalCode; |
this.dependencies = dependencies; |
- Value.call(this, type, code, span, !$notnull_bool(isConst)); |
+ Value.call(this, type, code, span, !isConst); |
// Initializers done |
} |
$inherits(GlobalValue, Value); |
-GlobalValue.prototype.is$GlobalValue = function(){return this;}; |
-GlobalValue.prototype.is$Comparable = function(){return this;}; |
GlobalValue.GlobalValue$fromStatic$factory = function(field, exp, dependencies) { |
- var code = ($notnull_bool(exp.get$isConst()) ? exp.get$canonicalCode() : exp.code); |
+ var code = (exp.get$isConst() ? exp.get$canonicalCode() : exp.code); |
var codeWithComment = ('' + code + '/*' + field.declaringType.name + '.' + field.get$name() + '*/'); |
- return new GlobalValue(exp.type, $assert_String(codeWithComment), field.isFinal, field, null, exp, code, exp.span, dependencies.filter$1((function (d) { |
+ return new GlobalValue(exp.type, codeWithComment, field.isFinal, field, null, exp, code, exp.span, dependencies.filter$1((function (d) { |
return (d instanceof GlobalValue); |
}) |
)); |
@@ -21824,7 +21263,7 @@ GlobalValue.GlobalValue$fromStatic$factory = function(field, exp, dependencies) |
GlobalValue.GlobalValue$fromConst$factory = function(uniqueId, exp, dependencies) { |
var name = ("const\$" + uniqueId + ""); |
var codeWithComment = ("" + name + "/*" + exp.span.get$text() + "*/"); |
- return new GlobalValue(exp.type, $assert_String(codeWithComment), true, null, name, exp, name, exp.span, dependencies.filter$1((function (d) { |
+ return new GlobalValue(exp.type, codeWithComment, true, null, name, exp, name, exp.span, dependencies.filter$1((function (d) { |
return (d instanceof GlobalValue); |
}) |
)); |
@@ -21834,7 +21273,7 @@ GlobalValue.prototype.set$name = function(value) { return this.name = value; }; |
GlobalValue.prototype.get$canonicalCode = function() { return this.canonicalCode; }; |
GlobalValue.prototype.set$canonicalCode = function(value) { return this.canonicalCode = value; }; |
GlobalValue.prototype.get$isConst = function() { |
- return $notnull_bool(this.exp.get$isConst()) && (this.field == null || $notnull_bool(this.field.isFinal)); |
+ return this.exp.get$isConst() && (this.field == null || this.field.isFinal); |
} |
GlobalValue.prototype.get$actualValue = function() { |
return this.exp.get$dynamic().get$actualValue(); |
@@ -21869,7 +21308,7 @@ GlobalValue.prototype.compareTo = function(other) { |
} |
} |
GlobalValue.prototype.compareTo$1 = function($0) { |
- return this.compareTo(($0 && $0.is$GlobalValue())); |
+ return this.compareTo($0); |
}; |
// ********** Code for BareValue ************** |
function BareValue(home, outermost, span) { |
@@ -21880,11 +21319,9 @@ function BareValue(home, outermost, span) { |
} |
$inherits(BareValue, Value); |
BareValue.prototype._tryResolveMember = function(context, name) { |
- $assert($eq(context, this.home), "context == home", "value.dart", 660, 12); |
var member = this.type.resolveMember(name); |
- if ($notnull_bool($ne(member, null))) { |
- $assert(this.code == null, "code == null", "value.dart", 665, 14); |
- if ($notnull_bool(this.isType)) { |
+ if ($ne(member, null)) { |
+ if (this.isType) { |
this.code = this.type.get$jsname(); |
} |
else { |
@@ -21893,7 +21330,7 @@ BareValue.prototype._tryResolveMember = function(context, name) { |
return member; |
} |
member = this.home.get$library().lookup(name, this.span); |
- if ($notnull_bool($ne(member, null))) { |
+ if ($ne(member, null)) { |
return member; |
} |
return null; |
@@ -21931,44 +21368,40 @@ function World(files) { |
// Initializers done |
} |
World.prototype.get$coreimpl = function() { |
- var $0; |
- return (($0 = this.libraries.$index('dart:coreimpl')) && $0.is$Library()); |
+ return this.libraries.$index('dart:coreimpl'); |
} |
World.prototype.get$dom = function() { |
- var $0; |
- return (($0 = this.libraries.$index('dart:dom')) && $0.is$Library()); |
+ return this.libraries.$index('dart:dom'); |
} |
World.prototype.get$functionType = function() { return this.functionType; }; |
World.prototype.set$functionType = function(value) { return this.functionType = value; }; |
World.prototype.init = function() { |
- var $0; |
this.corelib = new Library(this.readFile('dart:core')); |
this.libraries.$setindex('dart:core', this.corelib); |
this._todo.add(this.corelib); |
- this.voidType = (($0 = this._addToCoreLib('void', false)) && $0.is$DefinedType()); |
- this.dynamicType = (($0 = this._addToCoreLib('Dynamic', false)) && $0.is$DefinedType()); |
+ this.voidType = this._addToCoreLib('void', false); |
+ this.dynamicType = this._addToCoreLib('Dynamic', false); |
this.varType = this.dynamicType; |
- this.objectType = (($0 = this._addToCoreLib('Object', true)) && $0.is$DefinedType()); |
- this.numType = (($0 = this._addToCoreLib('num', false)) && $0.is$DefinedType()); |
- this.intType = (($0 = this._addToCoreLib('int', false)) && $0.is$DefinedType()); |
- this.doubleType = (($0 = this._addToCoreLib('double', false)) && $0.is$DefinedType()); |
- this.boolType = (($0 = this._addToCoreLib('bool', false)) && $0.is$DefinedType()); |
- this.stringType = (($0 = this._addToCoreLib('String', false)) && $0.is$DefinedType()); |
- 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.objectType = this._addToCoreLib('Object', true); |
+ this.numType = this._addToCoreLib('num', false); |
+ this.intType = this._addToCoreLib('int', false); |
+ this.doubleType = this._addToCoreLib('double', false); |
+ this.boolType = this._addToCoreLib('bool', false); |
+ this.stringType = this._addToCoreLib('String', false); |
+ this.listType = this._addToCoreLib('List', false); |
+ this.mapType = this._addToCoreLib('Map', false); |
+ this.functionType = this._addToCoreLib('Function', false); |
this.nonNullBool = new NonNullableType(this.boolType); |
} |
World.prototype._addMember = function(member) { |
- $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())) { |
+ if (member.get$isStatic()) { |
+ if (member.declaringType.get$isTop()) { |
this._addTopName(member); |
} |
return; |
} |
var mset = this._members.$index(member.name); |
- if ($notnull_bool(mset == null)) { |
+ if (mset == null) { |
mset = new MemberSet(member, true); |
this._members.$setindex(mset.get$name(), mset); |
} |
@@ -21978,24 +21411,24 @@ World.prototype._addMember = function(member) { |
} |
World.prototype._addTopName = function(named) { |
var existing = this._topNames.$index(named.get$name()); |
- if ($notnull_bool($ne(existing, null))) { |
+ if ($ne(existing, null)) { |
this.info(('mangling matching top level name "' + named.get$name() + '" in ') + ('both "' + named.get$library().name + '" and "' + existing.get$library().name + '"')); |
- if ($notnull_bool(named.get$isNative())) { |
- if ($notnull_bool(existing.get$isNative())) { |
+ if (named.get$isNative()) { |
+ if (existing.get$isNative()) { |
world.internalError(('conflicting native names "' + named.get$name() + '" ') + ('(already defined in ' + existing.get$span().get$locationText() + ')'), named.get$span()); |
} |
else { |
this._topNames.$setindex(named.get$name(), named); |
- this._addJavascriptTopName((existing && existing.is$Named())); |
+ this._addJavascriptTopName(existing); |
} |
} |
- else if ($notnull_bool(named.get$library().get$isCore())) { |
- if ($notnull_bool(existing.get$library().get$isCore())) { |
+ else if (named.get$library().get$isCore()) { |
+ if (existing.get$library().get$isCore()) { |
world.internalError(('conflicting top-level names in core "' + named.get$name() + '" ') + ('(previously defined in ' + existing.get$span().get$locationText() + ')'), named.get$span()); |
} |
else { |
this._topNames.$setindex(named.get$name(), named); |
- this._addJavascriptTopName((existing && existing.is$Named())); |
+ this._addJavascriptTopName(existing); |
} |
} |
else { |
@@ -22009,13 +21442,13 @@ World.prototype._addTopName = function(named) { |
World.prototype._addJavascriptTopName = function(named) { |
named.set$jsname(('' + named.get$library().get$jsname() + '_' + named.get$name() + '')); |
var existing = this._topNames.$index(named.get$jsname()); |
- if ($notnull_bool($ne(existing, null)) && $notnull_bool($ne(existing, named))) { |
+ if ($ne(existing, null) && $ne(existing, named)) { |
world.internalError(('name mangling failed for "' + named.get$jsname() + '" ') + ('("' + named.get$jsname() + '" defined also in ' + existing.get$span().get$locationText() + ')'), named.get$span()); |
} |
this._topNames.$setindex(named.get$jsname(), named); |
} |
World.prototype._addType = function(type) { |
- if (!$notnull_bool(type.get$isTop())) this._addTopName(type); |
+ if (!type.get$isTop()) this._addTopName(type); |
} |
World.prototype._addToCoreLib = function(name, isClass) { |
var ret = new DefinedType(name, this.corelib, null, isClass); |
@@ -22040,26 +21473,26 @@ World.prototype.compile = function() { |
} |
try { |
this.info(('compiling ' + options.dartScript + ' with corelib ' + this.corelib + '')); |
- if (!$notnull_bool(this.runLeg())) this.runCompilationPhases(); |
+ if (!this.runLeg()) this.runCompilationPhases(); |
} catch (exc) { |
exc = $toDartException(exc); |
- if ($notnull_bool(this.get$hasErrors()) && !$notnull_bool(options.throwOnErrors)) { |
+ if (this.get$hasErrors() && !options.throwOnErrors) { |
} |
else { |
throw exc; |
} |
} |
this.printStatus(); |
- return !$notnull_bool(this.get$hasErrors()); |
+ return !this.get$hasErrors(); |
} |
World.prototype.runLeg = function() { |
var $this = this; // closure support |
- if (!$notnull_bool(options.enableLeg)) return false; |
- var res = $assert_bool(this.withTiming('try leg compile', (function () { |
+ if (!options.enableLeg) return false; |
+ var res = this.withTiming('try leg compile', (function () { |
return compile($this); |
}) |
- )); |
- if (!$notnull_bool(res) && $notnull_bool(options.legOnly)) { |
+ ); |
+ if (!res && options.legOnly) { |
this.fatal(("Leg could not compile " + options.dartScript + "")); |
return true; |
} |
@@ -22078,7 +21511,7 @@ World.prototype.runCompilationPhases = function() { |
this.withTiming('generate code', (function () { |
var mainMembers = lib.topType.resolveMember('main'); |
var main = null; |
- if ($notnull_bool(mainMembers == null) || mainMembers.get$members().length == 0) { |
+ if (mainMembers == null || mainMembers.get$members().length == 0) { |
$this.fatal('no main method specified'); |
} |
else if (mainMembers.get$members().length > 1) { |
@@ -22101,7 +21534,6 @@ World.prototype.runCompilationPhases = function() { |
} |
World.prototype.getGeneratedCode = function() { |
if (this.legCode != null) { |
- $assert(options.enableLeg, "options.enableLeg", "world.dart", 310, 14); |
return this.legCode; |
} |
else { |
@@ -22120,12 +21552,11 @@ World.prototype.readFile = function(filename) { |
} |
} |
World.prototype.getOrAddLibrary = function(filename) { |
- var $0; |
- var library = (($0 = this.libraries.$index(filename)) && $0.is$Library()); |
+ var library = this.libraries.$index(filename); |
if (library == null) { |
library = new Library(this.readFile(filename)); |
this.info(('read library ' + filename + '')); |
- if (!$notnull_bool(library.get$isCore()) && !library.imports.some((function (li) { |
+ if (!library.get$isCore() && !library.imports.some((function (li) { |
return li.get$library().get$isCore(); |
}) |
)) { |
@@ -22170,7 +21601,7 @@ World.prototype._message = function(message, span, span1, span2, throwing) { |
if (span2 != null) { |
print(span2.toMessageString(message)); |
} |
- if ($notnull_bool(throwing)) { |
+ if (throwing) { |
$throw(new CompilerException(message, span)); |
} |
} |
@@ -22180,20 +21611,20 @@ World.prototype.error = function(message, span, span1, span2) { |
} |
World.prototype.warning = function(message, span, span1, span2) { |
this.warnings++; |
- if ($notnull_bool(options.showWarnings)) { |
+ if (options.showWarnings) { |
this._message(('warning: ' + message + ''), span, span1, span2, options.throwOnWarnings); |
} |
} |
World.prototype.fatal = function(message, span, span1, span2) { |
this.errors++; |
this.seenFatal = true; |
- this._message(('fatal: ' + message + ''), span, span1, span2, $notnull_bool(options.throwOnFatal) || $notnull_bool(options.throwOnErrors)); |
+ this._message(('fatal: ' + message + ''), span, span1, span2, options.throwOnFatal || options.throwOnErrors); |
} |
World.prototype.internalError = function(message, span, span1, span2) { |
this._message(('We are sorry, but... ' + message + ''), span, span1, span2, true); |
} |
World.prototype.info = function(message, span, span1, span2) { |
- if ($notnull_bool(options.showInfo)) { |
+ if (options.showInfo) { |
this._message(('info: ' + message + ''), span, span1, span2, false); |
} |
} |
@@ -22202,7 +21633,7 @@ World.prototype.get$hasErrors = function() { |
} |
World.prototype.printStatus = function() { |
this.info(('compiled ' + this.dartBytesRead + ' bytes Dart -> ' + this.jsBytesWritten + ' bytes JS')); |
- if ($notnull_bool(this.get$hasErrors())) { |
+ if (this.get$hasErrors()) { |
print(('compilation failed with ' + this.errors + ' errors')); |
} |
else { |
@@ -22224,7 +21655,6 @@ World.prototype.withTiming = function(name, f) { |
} |
// ********** Code for FrogOptions ************** |
function FrogOptions(homedir, args, files) { |
- var $0; |
this.enableLeg = false |
this.legOnly = false |
this.enableAsserts = false |
@@ -22317,30 +21747,30 @@ function FrogOptions(homedir, args, files) { |
default: |
- if ($notnull_bool(arg.endsWith$1('.dart'))) { |
- this.dartScript = $assert_String(arg); |
- this.childArgs = (($0 = args.getRange(i + 1, args.length - i - 1)) && $0.is$List$String()); |
+ if (arg.endsWith$1('.dart')) { |
+ this.dartScript = arg; |
+ this.childArgs = args.getRange(i + 1, args.length - i - 1); |
break loop; |
} |
- else if ($notnull_bool(arg.startsWith$1('--out='))) { |
+ else if (arg.startsWith$1('--out=')) { |
this.outfile = arg.substring$1('--out='.length); |
} |
- else if ($notnull_bool(arg.startsWith$1('--libdir='))) { |
- this.libDir = $assert_String(arg.substring$1('--libdir='.length)); |
+ else if (arg.startsWith$1('--libdir=')) { |
+ this.libDir = arg.substring$1('--libdir='.length); |
passedLibDir = true; |
} |
else { |
- if (!$notnull_bool(ignoreUnrecognizedFlags)) { |
+ if (!ignoreUnrecognizedFlags) { |
print(('unrecognized flag: "' + arg + '"')); |
} |
} |
} |
} |
- if (!$notnull_bool(passedLibDir) && !$notnull_bool(files.fileExists(this.libDir))) { |
+ if (!passedLibDir && !files.fileExists(this.libDir)) { |
var temp = 'frog/lib'; |
- if ($notnull_bool(files.fileExists($assert_String(temp)))) { |
- this.libDir = $assert_String(temp); |
+ if (files.fileExists(temp)) { |
+ this.libDir = temp; |
} |
else { |
this.libDir = 'lib'; |
@@ -22354,11 +21784,11 @@ function LibraryReader() { |
} |
LibraryReader.prototype.readFile = function(fullname) { |
var filename = this._specialLibs.$index(fullname); |
- if ($notnull_bool(filename == null)) { |
+ if (filename == null) { |
filename = fullname; |
} |
- if ($notnull_bool(world.files.fileExists($assert_String(filename)))) { |
- return new SourceFile(filename, world.files.readAll($assert_String(filename))); |
+ if (world.files.fileExists(filename)) { |
+ return new SourceFile(filename, world.files.readAll(filename)); |
} |
else { |
world.error(('File not found: ' + filename + '')); |
@@ -22370,7 +21800,6 @@ function VarMember(name) { |
this.name = name; |
// Initializers done |
} |
-VarMember.prototype.is$VarMember = function(){return this;}; |
VarMember.prototype.get$name = function() { return this.name; }; |
VarMember.prototype.get$returnType = function() { |
return world.varType; |
@@ -22379,10 +21808,10 @@ VarMember.prototype.invoke = function(context, node, target, args) { |
return new Value(this.get$returnType(), ('' + target.code + '.' + this.name + '(' + args.getCode() + ')'), node.span, true); |
} |
VarMember.prototype.generate$1 = function($0) { |
- return this.generate(($0 && $0.is$CodeWriter())); |
+ return this.generate($0); |
}; |
VarMember.prototype.invoke$4 = function($0, $1, $2, $3) { |
- return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Arguments())); |
+ return this.invoke($0, $1, $2, $3); |
}; |
// ********** Code for VarFunctionStub ************** |
function VarFunctionStub(name, callArgs) { |
@@ -22392,9 +21821,8 @@ function VarFunctionStub(name, callArgs) { |
world.gen.corejs.useGenStub = true; |
} |
$inherits(VarFunctionStub, VarMember); |
-VarFunctionStub.prototype.is$VarFunctionStub = function(){return this;}; |
VarFunctionStub.prototype.generate = function(code) { |
- if ($notnull_bool(this.args.get$hasNames())) { |
+ if (this.args.get$hasNames()) { |
this.generateNamed(code); |
} |
else { |
@@ -22423,7 +21851,7 @@ VarFunctionStub.prototype.generateNamed = function(w) { |
w.exitBlock('}'); |
} |
VarFunctionStub.prototype.generate$1 = function($0) { |
- return this.generate(($0 && $0.is$CodeWriter())); |
+ return this.generate($0); |
}; |
// ********** Code for VarMethodStub ************** |
function VarMethodStub(name, member, args, body) { |
@@ -22435,8 +21863,7 @@ function VarMethodStub(name, member, args, body) { |
} |
$inherits(VarMethodStub, VarMember); |
VarMethodStub.prototype.get$returnType = function() { |
- var $0; |
- return (($0 = this.member != null ? this.member.get$returnType() : world.varType) && $0.is$lang_Type()); |
+ return this.member != null ? this.member.get$returnType() : world.varType; |
} |
VarMethodStub.prototype.get$typeName = function() { |
return this.member != null ? this.member.declaringType.get$jsname() : 'Object'; |
@@ -22446,7 +21873,7 @@ VarMethodStub.prototype.generate = function(code) { |
this.generateBody(code, ';'); |
} |
VarMethodStub.prototype.generateBody = function(code, end) { |
- if ($notnull_bool(this._useDirectCall(this.member, this.args))) { |
+ if (this._useDirectCall(this.member, this.args)) { |
code.writeln(('' + this.get$typeName() + '.prototype.' + this.member.get$jsname() + '' + end + '')); |
} |
else { |
@@ -22457,13 +21884,13 @@ VarMethodStub.prototype.generateBody = function(code, end) { |
} |
VarMethodStub.prototype._useDirectCall = function(member, args) { |
if ((member instanceof MethodMember) && $ne(member.declaringType.get$library(), world.get$dom())) { |
- var method = (member && member.is$MethodMember()); |
- if ($notnull_bool(method.needsArgumentConversion(args))) { |
+ var method = member; |
+ if (method.needsArgumentConversion(args)) { |
return false; |
} |
for (var i = args.get$length(); |
i < method.parameters.length; i++) { |
- if ($notnull_bool($ne(method.parameters.$index(i).get$value().code, 'null'))) { |
+ if ($ne(method.parameters.$index(i).get$value().code, 'null')) { |
return false; |
} |
} |
@@ -22474,10 +21901,10 @@ VarMethodStub.prototype._useDirectCall = function(member, args) { |
} |
} |
VarMethodStub.prototype.generate$1 = function($0) { |
- return this.generate(($0 && $0.is$CodeWriter())); |
+ return this.generate($0); |
}; |
VarMethodStub.prototype.generateBody$2 = function($0, $1) { |
- return this.generateBody(($0 && $0.is$CodeWriter()), $assert_String($1)); |
+ return this.generateBody($0, $1); |
}; |
// ********** Code for VarMethodSet ************** |
function VarMethodSet(name, members, callArgs, returnType) { |
@@ -22491,7 +21918,7 @@ $inherits(VarMethodSet, VarMember); |
VarMethodSet.prototype.get$members = function() { return this.members; }; |
VarMethodSet.prototype.get$returnType = function() { return this.returnType; }; |
VarMethodSet.prototype.get$baseName = function() { |
- return $assert_String(this.members.$index(0).get$name()); |
+ return this.members.$index(0).get$name(); |
} |
VarMethodSet.prototype.invoke = function(context, node, target, args) { |
this._invokeMembers(context, node); |
@@ -22508,23 +21935,23 @@ VarMethodSet.prototype._invokeMembers = function(context, node) { |
var result = member.invoke$4$isDynamic(context, node, target, this.args, true); |
var stub = new VarMethodStub(this.name, member, this.args, result); |
var type = member.declaringType; |
- if ($notnull_bool(type.get$isObject())) { |
+ if (type.get$isObject()) { |
objectStub = stub; |
} |
else if ($ne(type.get$library(), world.get$dom())) { |
- VarMethodSet._addVarStub((type && type.is$lang_Type()), (stub && stub.is$VarMember())); |
+ VarMethodSet._addVarStub(type, stub); |
} |
else { |
this._fallbackStubs.add(stub); |
} |
} |
- if ($notnull_bool(objectStub == null)) { |
+ if (objectStub == null) { |
var target = new Value(world.objectType, 'this', node.span, true); |
var result = target.invokeNoSuchMethod(context, this.get$baseName(), node, this.args); |
objectStub = new VarMethodStub(this.name, null, this.args, result); |
} |
if (this._fallbackStubs.length == 0) { |
- VarMethodSet._addVarStub(world.objectType, (objectStub && objectStub.is$VarMember())); |
+ VarMethodSet._addVarStub(world.objectType, objectStub); |
} |
else { |
this._fallbackStubs.add(objectStub); |
@@ -22543,21 +21970,21 @@ VarMethodSet.prototype.generate = function(code) { |
for (var $i = 0;$i < $list.length; $i++) { |
var stub = $list.$index($i); |
code.write(('"' + stub.get$typeName() + '": ')); |
- stub.generateBody$2(code, $notnull_bool($eq(stub, lastOne)) ? '' : ','); |
+ stub.generateBody$2(code, $eq(stub, lastOne) ? '' : ','); |
} |
code.exitBlock('});'); |
} |
VarMethodSet.prototype.generate$1 = function($0) { |
- return this.generate(($0 && $0.is$CodeWriter())); |
+ return this.generate($0); |
}; |
VarMethodSet.prototype.invoke$4 = function($0, $1, $2, $3) { |
- return this.invoke(($0 && $0.is$MethodGenerator()), ($1 && $1.is$lang_Node()), ($2 && $2.is$Value()), ($3 && $3.is$Arguments())); |
+ return this.invoke($0, $1, $2, $3); |
}; |
// ********** Code for top level ************** |
function map(source, mapper) { |
var result = new ListFactory(); |
if (!!(source && source.is$List)) { |
- var list = (source && source.is$List()); |
+ var list = source; |
result.length = list.length; |
for (var i = 0; |
i < list.length; i++) { |
@@ -22575,17 +22002,16 @@ function map(source, mapper) { |
function reduce(source, callback, initialValue) { |
var i = source.iterator(); |
var current = initialValue; |
- if ($notnull_bool(current == null) && $notnull_bool(i.hasNext$0())) { |
+ if (current == null && i.hasNext$0()) { |
current = i.next$0(); |
} |
- while ($notnull_bool(i.hasNext$0())) { |
+ while (i.hasNext$0()) { |
current = callback.call$2(current, i.next$0()); |
} |
return current; |
} |
function orderValuesByKeys(map) { |
- var $0; |
- var keys = (($0 = map.getKeys()) && $0.is$List()); |
+ var keys = map.getKeys(); |
keys.sort((function (x, y) { |
return x.compareTo$1(y); |
}) |
@@ -22605,14 +22031,14 @@ function isRawMultilineString(text) { |
} |
function parseStringLiteral(lit) { |
if (lit.startsWith('@')) { |
- if ($notnull_bool(isRawMultilineString(lit))) { |
+ if (isRawMultilineString(lit)) { |
return stripLeadingNewline(lit.substring(4, lit.length - 3)); |
} |
else { |
return lit.substring(2, lit.length - 1); |
} |
} |
- else if ($notnull_bool(isMultilineString(lit))) { |
+ else if (isMultilineString(lit)) { |
lit = lit.substring(3, lit.length - 3).replaceAll('\\\$', '\$'); |
return stripLeadingNewline(lit); |
} |
@@ -22638,7 +22064,6 @@ function stripLeadingNewline(text) { |
} |
var world; |
function initializeWorld(files) { |
- $assert(world == null, "world == null", "world.dart", 13, 10); |
world = new World(files); |
world.init(); |
} |
@@ -22647,22 +22072,21 @@ function lang_compile(homedir, args, files) { |
initializeWorld(files); |
var success = world.compile(); |
if (options.outfile != null) { |
- if ($notnull_bool(success)) { |
+ if (success) { |
var code = world.getGeneratedCode(); |
if (!options.outfile.endsWith('.js')) { |
code = '#!/usr/bin/env node\n' + code; |
} |
- world.files.writeString(options.outfile, $assert_String(code)); |
+ world.files.writeString(options.outfile, code); |
} |
else { |
world.files.writeString(options.outfile, "throw 'Sorry, but I could not generate reasonable code to run.\\n';"); |
} |
} |
- return $assert_bool(success); |
+ return success; |
} |
var options; |
function parseOptions(homedir, args, files) { |
- $assert(options == null, "options == null", "frog_options.dart", 10, 10); |
options = new FrogOptions(homedir, args, files); |
} |
function _getCallStubName(name, args) { |
@@ -22676,14 +22100,14 @@ function _getCallStubName(name, args) { |
// ********** Library frog ************** |
// ********** Code for top level ************** |
function main() { |
- var homedir = path.dirname(fs.realpathSync($assert_String(process.argv.$index(1)))); |
+ var homedir = path.dirname(fs.realpathSync(process.argv.$index(1))); |
var argv = ListFactory.ListFactory$from$factory(process.argv); |
- if ($notnull_bool(lang_compile($assert_String(homedir), (argv && argv.is$List$String()), new NodeFileSystem()))) { |
+ if (lang_compile(homedir, argv, new NodeFileSystem())) { |
var code = world.getGeneratedCode(); |
- if (!$notnull_bool(options.compileOnly)) { |
+ if (!options.compileOnly) { |
process.argv = [argv.$index(0), argv.$index(1)]; |
process.argv.addAll(options.childArgs); |
- vm.runInNewContext($assert_String(code), createSandbox()); |
+ vm.runInNewContext(code, createSandbox()); |
} |
} |
else { |