| OLD | NEW |
| 1 #!/usr/bin/env node | 1 #!/usr/bin/env node |
| 2 // ********** Library dart:core ************** | 2 // ********** Library dart:core ************** |
| 3 // ********** Natives dart:core ************** | 3 // ********** Natives dart:core ************** |
| 4 /** | 4 /** |
| 5 * Generates a dynamic call stub for a function. | 5 * Generates a dynamic call stub for a function. |
| 6 * Our goal is to create a stub method like this on-the-fly: | 6 * Our goal is to create a stub method like this on-the-fly: |
| 7 * function($0, $1, capture) { return this($0, $1, true, capture); } | 7 * function($0, $1, capture) { return this($0, $1, true, capture); } |
| 8 * | 8 * |
| 9 * This stub then replaces the dynamic one on Function, with one that is | 9 * This stub then replaces the dynamic one on Function, with one that is |
| 10 * specialized for that particular function, taking into account its default | 10 * specialized for that particular function, taking into account its default |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 } | 117 } |
| 118 function $truncdiv(x, y) { | 118 function $truncdiv(x, y) { |
| 119 if (typeof(x) == 'number' && typeof(y) == 'number') { | 119 if (typeof(x) == 'number' && typeof(y) == 'number') { |
| 120 if (y == 0) $throw(new IntegerDivisionByZeroException()); | 120 if (y == 0) $throw(new IntegerDivisionByZeroException()); |
| 121 var tmp = x / y; | 121 var tmp = x / y; |
| 122 return (tmp < 0) ? Math.ceil(tmp) : Math.floor(tmp); | 122 return (tmp < 0) ? Math.ceil(tmp) : Math.floor(tmp); |
| 123 } else { | 123 } else { |
| 124 return x.$truncdiv(y); | 124 return x.$truncdiv(y); |
| 125 } | 125 } |
| 126 } | 126 } |
| 127 // ********** Code for Clock ************** | |
| 128 function Clock() {} | |
| 129 Clock.now = function() { | |
| 130 return new Date().getTime(); | |
| 131 } | |
| 132 Clock.frequency = function() { | |
| 133 return 1000; | |
| 134 } | |
| 135 // ********** Code for Object ************** | 127 // ********** Code for Object ************** |
| 136 Object.prototype.get$dynamic = function() { | 128 Object.prototype.get$dynamic = function() { |
| 137 return this; | 129 return this; |
| 138 } | 130 } |
| 139 Object.prototype.noSuchMethod = function(name, args) { | 131 Object.prototype.noSuchMethod = function(name, args) { |
| 140 $throw(new NoSuchMethodException(this, name, args)); | 132 $throw(new NoSuchMethodException(this, name, args)); |
| 141 } | 133 } |
| 142 Object.prototype._checkExtends$0 = function() { | 134 Object.prototype._checkExtends$0 = function() { |
| 143 return this.noSuchMethod("_checkExtends", []); | 135 return this.noSuchMethod("_checkExtends", []); |
| 144 }; | 136 }; |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 }; | 370 }; |
| 379 Object.prototype.visitPostfixExpression$1 = function($0) { | 371 Object.prototype.visitPostfixExpression$1 = function($0) { |
| 380 return this.noSuchMethod("visitPostfixExpression", [$0]); | 372 return this.noSuchMethod("visitPostfixExpression", [$0]); |
| 381 }; | 373 }; |
| 382 Object.prototype.visitSources$0 = function() { | 374 Object.prototype.visitSources$0 = function() { |
| 383 return this.noSuchMethod("visitSources", []); | 375 return this.noSuchMethod("visitSources", []); |
| 384 }; | 376 }; |
| 385 Object.prototype.writeDefinition$2 = function($0, $1) { | 377 Object.prototype.writeDefinition$2 = function($0, $1) { |
| 386 return this.noSuchMethod("writeDefinition", [$0, $1]); | 378 return this.noSuchMethod("writeDefinition", [$0, $1]); |
| 387 }; | 379 }; |
| 380 // ********** Code for Clock ************** |
| 381 function Clock() {} |
| 382 Clock.now = function() { |
| 383 return new Date().getTime(); |
| 384 } |
| 385 Clock.frequency = function() { |
| 386 return 1000; |
| 387 } |
| 388 // ********** Code for NoSuchMethodException ************** | 388 // ********** Code for NoSuchMethodException ************** |
| 389 function NoSuchMethodException(_receiver, _functionName, _arguments) { | 389 function NoSuchMethodException(_receiver, _functionName, _arguments) { |
| 390 this._receiver = _receiver; | 390 this._receiver = _receiver; |
| 391 this._functionName = _functionName; | 391 this._functionName = _functionName; |
| 392 this._arguments = _arguments; | 392 this._arguments = _arguments; |
| 393 // Initializers done | 393 // Initializers done |
| 394 } | 394 } |
| 395 NoSuchMethodException.prototype.toString = function() { | 395 NoSuchMethodException.prototype.toString = function() { |
| 396 var sb = new StringBufferImpl(""); | 396 var sb = new StringBufferImpl(""); |
| 397 for (var i = 0; | 397 for (var i = 0; |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 641 ListFactory.prototype.sort$1 = function($0) { | 641 ListFactory.prototype.sort$1 = function($0) { |
| 642 return this.sort(to$call$2($0)); | 642 return this.sort(to$call$2($0)); |
| 643 }; | 643 }; |
| 644 ListFactory_E = ListFactory; | 644 ListFactory_E = ListFactory; |
| 645 ListFactory_K = ListFactory; | 645 ListFactory_K = ListFactory; |
| 646 ListFactory_String = ListFactory; | 646 ListFactory_String = ListFactory; |
| 647 ListFactory_V = ListFactory; | 647 ListFactory_V = ListFactory; |
| 648 // ********** Code for ListIterator ************** | 648 // ********** Code for ListIterator ************** |
| 649 function ListIterator(array) { | 649 function ListIterator(array) { |
| 650 this._array = array; | 650 this._array = array; |
| 651 this._dart_coreimpl_pos = 0; | 651 this._pos = 0; |
| 652 // Initializers done | 652 // Initializers done |
| 653 } | 653 } |
| 654 ListIterator.prototype.hasNext = function() { | 654 ListIterator.prototype.hasNext = function() { |
| 655 return this._array.length > this._dart_coreimpl_pos; | 655 return this._array.length > this._pos; |
| 656 } | 656 } |
| 657 ListIterator.prototype.next = function() { | 657 ListIterator.prototype.next = function() { |
| 658 if (!this.hasNext()) { | 658 if (!this.hasNext()) { |
| 659 $throw(const$8/*const NoMoreElementsException()*/); | 659 $throw(const$8/*const NoMoreElementsException()*/); |
| 660 } | 660 } |
| 661 return this._array.$index(this._dart_coreimpl_pos++); | 661 return this._array.$index(this._pos++); |
| 662 } | 662 } |
| 663 ListIterator.prototype.hasNext$0 = ListIterator.prototype.hasNext; | 663 ListIterator.prototype.hasNext$0 = ListIterator.prototype.hasNext; |
| 664 ListIterator.prototype.next$0 = ListIterator.prototype.next; | 664 ListIterator.prototype.next$0 = ListIterator.prototype.next; |
| 665 // ********** Code for NumImplementation ************** | 665 // ********** Code for NumImplementation ************** |
| 666 NumImplementation = Number; | 666 NumImplementation = Number; |
| 667 NumImplementation.prototype.isNaN = function() { | 667 NumImplementation.prototype.isNaN = function() { |
| 668 return isNaN(this); | 668 return isNaN(this); |
| 669 } | 669 } |
| 670 NumImplementation.prototype.isNegative = function() { | 670 NumImplementation.prototype.isNegative = function() { |
| 671 return this == 0 ? (1 / this) < 0 : this < 0; | 671 return this == 0 ? (1 / this) < 0 : this < 0; |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 875 return (this._probeForLookup(key) != -1); | 875 return (this._probeForLookup(key) != -1); |
| 876 } | 876 } |
| 877 HashMapImplementation.prototype.containsKey$1 = HashMapImplementation.prototype.
containsKey; | 877 HashMapImplementation.prototype.containsKey$1 = HashMapImplementation.prototype.
containsKey; |
| 878 HashMapImplementation.prototype.forEach$1 = function($0) { | 878 HashMapImplementation.prototype.forEach$1 = function($0) { |
| 879 return this.forEach(to$call$2($0)); | 879 return this.forEach(to$call$2($0)); |
| 880 }; | 880 }; |
| 881 HashMapImplementation.prototype.getKeys$0 = HashMapImplementation.prototype.getK
eys; | 881 HashMapImplementation.prototype.getKeys$0 = HashMapImplementation.prototype.getK
eys; |
| 882 HashMapImplementation.prototype.getValues$0 = HashMapImplementation.prototype.ge
tValues; | 882 HashMapImplementation.prototype.getValues$0 = HashMapImplementation.prototype.ge
tValues; |
| 883 HashMapImplementation.prototype.isEmpty$0 = HashMapImplementation.prototype.isEm
pty; | 883 HashMapImplementation.prototype.isEmpty$0 = HashMapImplementation.prototype.isEm
pty; |
| 884 // ********** Code for HashMapImplementation_E$E ************** | 884 // ********** Code for HashMapImplementation_E$E ************** |
| 885 function HashMapImplementation_E$E() { | |
| 886 // Initializers done | |
| 887 this._numberOfEntries = 0; | |
| 888 this._numberOfDeleted = 0; | |
| 889 this._loadLimit = HashMapImplementation._computeLoadLimit(8/*HashMapImplementa
tion._INITIAL_CAPACITY*/); | |
| 890 this._keys = new ListFactory(8/*HashMapImplementation._INITIAL_CAPACITY*/); | |
| 891 this._values = new ListFactory(8/*HashMapImplementation._INITIAL_CAPACITY*/); | |
| 892 } | |
| 893 /** Implements extends for Dart classes on JavaScript prototypes. */ | 885 /** Implements extends for Dart classes on JavaScript prototypes. */ |
| 894 function $inherits(child, parent) { | 886 function $inherits(child, parent) { |
| 895 if (child.prototype.__proto__) { | 887 if (child.prototype.__proto__) { |
| 896 child.prototype.__proto__ = parent.prototype; | 888 child.prototype.__proto__ = parent.prototype; |
| 897 } else { | 889 } else { |
| 898 function tmp() {}; | 890 function tmp() {}; |
| 899 tmp.prototype = parent.prototype; | 891 tmp.prototype = parent.prototype; |
| 900 child.prototype = new tmp(); | 892 child.prototype = new tmp(); |
| 901 child.prototype.constructor = child; | 893 child.prototype.constructor = child; |
| 902 } | 894 } |
| 903 } | 895 } |
| 904 $inherits(HashMapImplementation_E$E, HashMapImplementation); | 896 $inherits(HashMapImplementation_E$E, HashMapImplementation); |
| 897 function HashMapImplementation_E$E() { |
| 898 // Initializers done |
| 899 this._numberOfEntries = 0; |
| 900 this._numberOfDeleted = 0; |
| 901 this._loadLimit = HashMapImplementation._computeLoadLimit(8/*HashMapImplementa
tion._INITIAL_CAPACITY*/); |
| 902 this._keys = new ListFactory(8/*HashMapImplementation._INITIAL_CAPACITY*/); |
| 903 this._values = new ListFactory(8/*HashMapImplementation._INITIAL_CAPACITY*/); |
| 904 } |
| 905 HashMapImplementation_E$E._computeLoadLimit = function(capacity) { | 905 HashMapImplementation_E$E._computeLoadLimit = function(capacity) { |
| 906 return $truncdiv((capacity * 3), 4); | 906 return $truncdiv((capacity * 3), 4); |
| 907 } | 907 } |
| 908 HashMapImplementation_E$E._firstProbe = function(hashCode, length) { | 908 HashMapImplementation_E$E._firstProbe = function(hashCode, length) { |
| 909 return hashCode & (length - 1); | 909 return hashCode & (length - 1); |
| 910 } | 910 } |
| 911 HashMapImplementation_E$E._nextProbe = function(currentProbe, numberOfProbes, le
ngth) { | 911 HashMapImplementation_E$E._nextProbe = function(currentProbe, numberOfProbes, le
ngth) { |
| 912 return (currentProbe + numberOfProbes) & (length - 1); | 912 return (currentProbe + numberOfProbes) & (length - 1); |
| 913 } | 913 } |
| 914 HashMapImplementation_E$E.prototype._probeForAdding = function(key) { | 914 HashMapImplementation_E$E.prototype._probeForAdding = function(key) { |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1017 this.forEach(function _(key, value) { | 1017 this.forEach(function _(key, value) { |
| 1018 list.$setindex(i++, key); | 1018 list.$setindex(i++, key); |
| 1019 } | 1019 } |
| 1020 ); | 1020 ); |
| 1021 return list; | 1021 return list; |
| 1022 } | 1022 } |
| 1023 HashMapImplementation_E$E.prototype.containsKey = function(key) { | 1023 HashMapImplementation_E$E.prototype.containsKey = function(key) { |
| 1024 return (this._probeForLookup(key) != -1); | 1024 return (this._probeForLookup(key) != -1); |
| 1025 } | 1025 } |
| 1026 // ********** Code for HashMapImplementation_K$DoubleLinkedQueueEntry_KeyValuePa
ir_K$V ************** | 1026 // ********** Code for HashMapImplementation_K$DoubleLinkedQueueEntry_KeyValuePa
ir_K$V ************** |
| 1027 $inherits(HashMapImplementation_K$DoubleLinkedQueueEntry_KeyValuePair_K$V, HashM
apImplementation); |
| 1027 function HashMapImplementation_K$DoubleLinkedQueueEntry_KeyValuePair_K$V() {} | 1028 function HashMapImplementation_K$DoubleLinkedQueueEntry_KeyValuePair_K$V() {} |
| 1028 $inherits(HashMapImplementation_K$DoubleLinkedQueueEntry_KeyValuePair_K$V, HashM
apImplementation); | |
| 1029 // ********** Code for HashMapImplementation_String$EvaluatedValue *************
* | 1029 // ********** Code for HashMapImplementation_String$EvaluatedValue *************
* |
| 1030 $inherits(HashMapImplementation_String$EvaluatedValue, HashMapImplementation); |
| 1030 function HashMapImplementation_String$EvaluatedValue() {} | 1031 function HashMapImplementation_String$EvaluatedValue() {} |
| 1031 $inherits(HashMapImplementation_String$EvaluatedValue, HashMapImplementation); | |
| 1032 // ********** Code for HashSetImplementation ************** | 1032 // ********** Code for HashSetImplementation ************** |
| 1033 function HashSetImplementation() { | 1033 function HashSetImplementation() { |
| 1034 // Initializers done | 1034 // Initializers done |
| 1035 this._backingMap = new HashMapImplementation_E$E(); | 1035 this._backingMap = new HashMapImplementation_E$E(); |
| 1036 } | 1036 } |
| 1037 HashSetImplementation.HashSetImplementation$from$factory = function(other) { | 1037 HashSetImplementation.HashSetImplementation$from$factory = function(other) { |
| 1038 var set = new HashSetImplementation(); | 1038 var set = new HashSetImplementation(); |
| 1039 for (var $$i = other.iterator(); $$i.hasNext$0(); ) { | 1039 for (var $$i = other.iterator(); $$i.hasNext$0(); ) { |
| 1040 var e = $$i.next$0(); | 1040 var e = $$i.next$0(); |
| 1041 set.add(e); | 1041 set.add(e); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1105 }; | 1105 }; |
| 1106 HashSetImplementation.prototype.forEach$1 = function($0) { | 1106 HashSetImplementation.prototype.forEach$1 = function($0) { |
| 1107 return this.forEach(to$call$1($0)); | 1107 return this.forEach(to$call$1($0)); |
| 1108 }; | 1108 }; |
| 1109 HashSetImplementation.prototype.isEmpty$0 = HashSetImplementation.prototype.isEm
pty; | 1109 HashSetImplementation.prototype.isEmpty$0 = HashSetImplementation.prototype.isEm
pty; |
| 1110 HashSetImplementation.prototype.iterator$0 = HashSetImplementation.prototype.ite
rator; | 1110 HashSetImplementation.prototype.iterator$0 = HashSetImplementation.prototype.ite
rator; |
| 1111 HashSetImplementation.prototype.some$1 = function($0) { | 1111 HashSetImplementation.prototype.some$1 = function($0) { |
| 1112 return this.some(to$call$1($0)); | 1112 return this.some(to$call$1($0)); |
| 1113 }; | 1113 }; |
| 1114 // ********** Code for HashSetImplementation_E ************** | 1114 // ********** Code for HashSetImplementation_E ************** |
| 1115 $inherits(HashSetImplementation_E, HashSetImplementation); |
| 1115 function HashSetImplementation_E() {} | 1116 function HashSetImplementation_E() {} |
| 1116 $inherits(HashSetImplementation_E, HashSetImplementation); | |
| 1117 // ********** Code for HashSetImplementation_String ************** | 1117 // ********** Code for HashSetImplementation_String ************** |
| 1118 $inherits(HashSetImplementation_String, HashSetImplementation); |
| 1118 function HashSetImplementation_String() {} | 1119 function HashSetImplementation_String() {} |
| 1119 $inherits(HashSetImplementation_String, HashSetImplementation); | |
| 1120 // ********** Code for HashSetImplementation_Type ************** | 1120 // ********** Code for HashSetImplementation_Type ************** |
| 1121 $inherits(HashSetImplementation_Type, HashSetImplementation); |
| 1121 function HashSetImplementation_Type() {} | 1122 function HashSetImplementation_Type() {} |
| 1122 $inherits(HashSetImplementation_Type, HashSetImplementation); | |
| 1123 // ********** Code for HashSetIterator ************** | 1123 // ********** Code for HashSetIterator ************** |
| 1124 function HashSetIterator(set_) { | 1124 function HashSetIterator(set_) { |
| 1125 this._nextValidIndex = -1; | 1125 this._nextValidIndex = -1; |
| 1126 this._entries = set_._backingMap._keys; | 1126 this._entries = set_._backingMap._keys; |
| 1127 // Initializers done | 1127 // Initializers done |
| 1128 this._advance(); | 1128 this._advance(); |
| 1129 } | 1129 } |
| 1130 HashSetIterator.prototype.hasNext = function() { | 1130 HashSetIterator.prototype.hasNext = function() { |
| 1131 if (this._nextValidIndex >= this._entries.length) return false; | 1131 if (this._nextValidIndex >= this._entries.length) return false; |
| 1132 if (this._entries.$index(this._nextValidIndex) === const$3/*HashMapImplementat
ion._DELETED_KEY*/) { | 1132 if (this._entries.$index(this._nextValidIndex) === const$3/*HashMapImplementat
ion._DELETED_KEY*/) { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1148 var deletedKey = const$3/*HashMapImplementation._DELETED_KEY*/; | 1148 var deletedKey = const$3/*HashMapImplementation._DELETED_KEY*/; |
| 1149 do { | 1149 do { |
| 1150 if (++this._nextValidIndex >= length) break; | 1150 if (++this._nextValidIndex >= length) break; |
| 1151 entry = this._entries.$index(this._nextValidIndex); | 1151 entry = this._entries.$index(this._nextValidIndex); |
| 1152 } | 1152 } |
| 1153 while ((entry == null) || (entry === deletedKey)) | 1153 while ((entry == null) || (entry === deletedKey)) |
| 1154 } | 1154 } |
| 1155 HashSetIterator.prototype.hasNext$0 = HashSetIterator.prototype.hasNext; | 1155 HashSetIterator.prototype.hasNext$0 = HashSetIterator.prototype.hasNext; |
| 1156 HashSetIterator.prototype.next$0 = HashSetIterator.prototype.next; | 1156 HashSetIterator.prototype.next$0 = HashSetIterator.prototype.next; |
| 1157 // ********** Code for HashSetIterator_E ************** | 1157 // ********** Code for HashSetIterator_E ************** |
| 1158 $inherits(HashSetIterator_E, HashSetIterator); |
| 1158 function HashSetIterator_E(set_) { | 1159 function HashSetIterator_E(set_) { |
| 1159 this._nextValidIndex = -1; | 1160 this._nextValidIndex = -1; |
| 1160 this._entries = set_._backingMap._keys; | 1161 this._entries = set_._backingMap._keys; |
| 1161 // Initializers done | 1162 // Initializers done |
| 1162 this._advance(); | 1163 this._advance(); |
| 1163 } | 1164 } |
| 1164 $inherits(HashSetIterator_E, HashSetIterator); | |
| 1165 HashSetIterator_E.prototype._advance = function() { | 1165 HashSetIterator_E.prototype._advance = function() { |
| 1166 var length = this._entries.length; | 1166 var length = this._entries.length; |
| 1167 var entry; | 1167 var entry; |
| 1168 var deletedKey = const$3/*HashMapImplementation._DELETED_KEY*/; | 1168 var deletedKey = const$3/*HashMapImplementation._DELETED_KEY*/; |
| 1169 do { | 1169 do { |
| 1170 if (++this._nextValidIndex >= length) break; | 1170 if (++this._nextValidIndex >= length) break; |
| 1171 entry = this._entries.$index(this._nextValidIndex); | 1171 entry = this._entries.$index(this._nextValidIndex); |
| 1172 } | 1172 } |
| 1173 while ((entry == null) || (entry === deletedKey)) | 1173 while ((entry == null) || (entry === deletedKey)) |
| 1174 } | 1174 } |
| 1175 // ********** Code for _DeletedKeySentinel ************** | 1175 // ********** Code for _DeletedKeySentinel ************** |
| 1176 function _DeletedKeySentinel() { | 1176 function _DeletedKeySentinel() { |
| 1177 // Initializers done | 1177 // Initializers done |
| 1178 } | 1178 } |
| 1179 // ********** Code for KeyValuePair ************** | 1179 // ********** Code for KeyValuePair ************** |
| 1180 function KeyValuePair(key, value) { | 1180 function KeyValuePair(key, value) { |
| 1181 this.key = key; | 1181 this.key = key; |
| 1182 this.value = value; | 1182 this.value = value; |
| 1183 // Initializers done | 1183 // Initializers done |
| 1184 } | 1184 } |
| 1185 KeyValuePair.prototype.get$value = function() { return this.value; }; | 1185 KeyValuePair.prototype.get$value = function() { return this.value; }; |
| 1186 KeyValuePair.prototype.set$value = function(value) { return this.value = value;
}; | 1186 KeyValuePair.prototype.set$value = function(value) { return this.value = value;
}; |
| 1187 // ********** Code for KeyValuePair_K$V ************** | 1187 // ********** Code for KeyValuePair_K$V ************** |
| 1188 $inherits(KeyValuePair_K$V, KeyValuePair); |
| 1188 function KeyValuePair_K$V(key, value) { | 1189 function KeyValuePair_K$V(key, value) { |
| 1189 this.key = key; | 1190 this.key = key; |
| 1190 this.value = value; | 1191 this.value = value; |
| 1191 // Initializers done | 1192 // Initializers done |
| 1192 } | 1193 } |
| 1193 $inherits(KeyValuePair_K$V, KeyValuePair); | |
| 1194 // ********** Code for LinkedHashMapImplementation ************** | 1194 // ********** Code for LinkedHashMapImplementation ************** |
| 1195 function LinkedHashMapImplementation() { | 1195 function LinkedHashMapImplementation() { |
| 1196 // Initializers done | 1196 // Initializers done |
| 1197 this._map = new HashMapImplementation(); | 1197 this._map = new HashMapImplementation(); |
| 1198 this._list = new DoubleLinkedQueue_KeyValuePair_K$V(); | 1198 this._list = new DoubleLinkedQueue_KeyValuePair_K$V(); |
| 1199 } | 1199 } |
| 1200 LinkedHashMapImplementation.prototype.$setindex = function(key, value) { | 1200 LinkedHashMapImplementation.prototype.$setindex = function(key, value) { |
| 1201 if (this._map.containsKey(key)) { | 1201 if (this._map.containsKey(key)) { |
| 1202 this._map.$index(key).get$element().set$value(value); | 1202 this._map.$index(key).get$element().set$value(value); |
| 1203 } | 1203 } |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1278 DoubleLinkedQueueEntry.prototype._asNonSentinelEntry = function() { | 1278 DoubleLinkedQueueEntry.prototype._asNonSentinelEntry = function() { |
| 1279 return this; | 1279 return this; |
| 1280 } | 1280 } |
| 1281 DoubleLinkedQueueEntry.prototype.previousEntry = function() { | 1281 DoubleLinkedQueueEntry.prototype.previousEntry = function() { |
| 1282 return this._previous._asNonSentinelEntry(); | 1282 return this._previous._asNonSentinelEntry(); |
| 1283 } | 1283 } |
| 1284 DoubleLinkedQueueEntry.prototype.get$element = function() { | 1284 DoubleLinkedQueueEntry.prototype.get$element = function() { |
| 1285 return this._element; | 1285 return this._element; |
| 1286 } | 1286 } |
| 1287 // ********** Code for DoubleLinkedQueueEntry_E ************** | 1287 // ********** Code for DoubleLinkedQueueEntry_E ************** |
| 1288 $inherits(DoubleLinkedQueueEntry_E, DoubleLinkedQueueEntry); |
| 1288 function DoubleLinkedQueueEntry_E(e) { | 1289 function DoubleLinkedQueueEntry_E(e) { |
| 1289 // Initializers done | 1290 // Initializers done |
| 1290 this._element = e; | 1291 this._element = e; |
| 1291 } | 1292 } |
| 1292 $inherits(DoubleLinkedQueueEntry_E, DoubleLinkedQueueEntry); | |
| 1293 DoubleLinkedQueueEntry_E.prototype._link = function(p, n) { | 1293 DoubleLinkedQueueEntry_E.prototype._link = function(p, n) { |
| 1294 this._next = n; | 1294 this._next = n; |
| 1295 this._previous = p; | 1295 this._previous = p; |
| 1296 p._next = this; | 1296 p._next = this; |
| 1297 n._previous = this; | 1297 n._previous = this; |
| 1298 } | 1298 } |
| 1299 DoubleLinkedQueueEntry_E.prototype.prepend = function(e) { | 1299 DoubleLinkedQueueEntry_E.prototype.prepend = function(e) { |
| 1300 new DoubleLinkedQueueEntry_E(e)._link(this._previous, this); | 1300 new DoubleLinkedQueueEntry_E(e)._link(this._previous, this); |
| 1301 } | 1301 } |
| 1302 DoubleLinkedQueueEntry_E.prototype.remove = function() { | 1302 DoubleLinkedQueueEntry_E.prototype.remove = function() { |
| 1303 this._previous._next = this._next; | 1303 this._previous._next = this._next; |
| 1304 this._next._previous = this._previous; | 1304 this._next._previous = this._previous; |
| 1305 this._next = null; | 1305 this._next = null; |
| 1306 this._previous = null; | 1306 this._previous = null; |
| 1307 return this._element; | 1307 return this._element; |
| 1308 } | 1308 } |
| 1309 DoubleLinkedQueueEntry_E.prototype._asNonSentinelEntry = function() { | 1309 DoubleLinkedQueueEntry_E.prototype._asNonSentinelEntry = function() { |
| 1310 return this; | 1310 return this; |
| 1311 } | 1311 } |
| 1312 DoubleLinkedQueueEntry_E.prototype.previousEntry = function() { | 1312 DoubleLinkedQueueEntry_E.prototype.previousEntry = function() { |
| 1313 return this._previous._asNonSentinelEntry(); | 1313 return this._previous._asNonSentinelEntry(); |
| 1314 } | 1314 } |
| 1315 // ********** Code for DoubleLinkedQueueEntry_KeyValuePair_K$V ************** | 1315 // ********** Code for DoubleLinkedQueueEntry_KeyValuePair_K$V ************** |
| 1316 $inherits(DoubleLinkedQueueEntry_KeyValuePair_K$V, DoubleLinkedQueueEntry); |
| 1316 function DoubleLinkedQueueEntry_KeyValuePair_K$V(e) { | 1317 function DoubleLinkedQueueEntry_KeyValuePair_K$V(e) { |
| 1317 // Initializers done | 1318 // Initializers done |
| 1318 this._element = e; | 1319 this._element = e; |
| 1319 } | 1320 } |
| 1320 $inherits(DoubleLinkedQueueEntry_KeyValuePair_K$V, DoubleLinkedQueueEntry); | |
| 1321 DoubleLinkedQueueEntry_KeyValuePair_K$V.prototype._link = function(p, n) { | 1321 DoubleLinkedQueueEntry_KeyValuePair_K$V.prototype._link = function(p, n) { |
| 1322 this._next = n; | 1322 this._next = n; |
| 1323 this._previous = p; | 1323 this._previous = p; |
| 1324 p._next = this; | 1324 p._next = this; |
| 1325 n._previous = this; | 1325 n._previous = this; |
| 1326 } | 1326 } |
| 1327 DoubleLinkedQueueEntry_KeyValuePair_K$V.prototype.prepend = function(e) { | 1327 DoubleLinkedQueueEntry_KeyValuePair_K$V.prototype.prepend = function(e) { |
| 1328 new DoubleLinkedQueueEntry_KeyValuePair_K$V(e)._link(this._previous, this); | 1328 new DoubleLinkedQueueEntry_KeyValuePair_K$V(e)._link(this._previous, this); |
| 1329 } | 1329 } |
| 1330 DoubleLinkedQueueEntry_KeyValuePair_K$V.prototype._asNonSentinelEntry = function
() { | 1330 DoubleLinkedQueueEntry_KeyValuePair_K$V.prototype._asNonSentinelEntry = function
() { |
| 1331 return this; | 1331 return this; |
| 1332 } | 1332 } |
| 1333 DoubleLinkedQueueEntry_KeyValuePair_K$V.prototype.previousEntry = function() { | 1333 DoubleLinkedQueueEntry_KeyValuePair_K$V.prototype.previousEntry = function() { |
| 1334 return this._previous._asNonSentinelEntry(); | 1334 return this._previous._asNonSentinelEntry(); |
| 1335 } | 1335 } |
| 1336 // ********** Code for _DoubleLinkedQueueEntrySentinel ************** | 1336 // ********** Code for _DoubleLinkedQueueEntrySentinel ************** |
| 1337 $inherits(_DoubleLinkedQueueEntrySentinel, DoubleLinkedQueueEntry_E); |
| 1337 function _DoubleLinkedQueueEntrySentinel() { | 1338 function _DoubleLinkedQueueEntrySentinel() { |
| 1338 // Initializers done | 1339 // Initializers done |
| 1339 DoubleLinkedQueueEntry_E.call(this, null); | 1340 DoubleLinkedQueueEntry_E.call(this, null); |
| 1340 this._link(this, this); | 1341 this._link(this, this); |
| 1341 } | 1342 } |
| 1342 $inherits(_DoubleLinkedQueueEntrySentinel, DoubleLinkedQueueEntry_E); | |
| 1343 _DoubleLinkedQueueEntrySentinel.prototype.remove = function() { | 1343 _DoubleLinkedQueueEntrySentinel.prototype.remove = function() { |
| 1344 $throw(const$2/*const EmptyQueueException()*/); | 1344 $throw(const$2/*const EmptyQueueException()*/); |
| 1345 } | 1345 } |
| 1346 _DoubleLinkedQueueEntrySentinel.prototype._asNonSentinelEntry = function() { | 1346 _DoubleLinkedQueueEntrySentinel.prototype._asNonSentinelEntry = function() { |
| 1347 return null; | 1347 return null; |
| 1348 } | 1348 } |
| 1349 _DoubleLinkedQueueEntrySentinel.prototype.get$element = function() { | 1349 _DoubleLinkedQueueEntrySentinel.prototype.get$element = function() { |
| 1350 $throw(const$2/*const EmptyQueueException()*/); | 1350 $throw(const$2/*const EmptyQueueException()*/); |
| 1351 } | 1351 } |
| 1352 // ********** Code for _DoubleLinkedQueueEntrySentinel_E ************** | 1352 // ********** Code for _DoubleLinkedQueueEntrySentinel_E ************** |
| 1353 $inherits(_DoubleLinkedQueueEntrySentinel_E, _DoubleLinkedQueueEntrySentinel); |
| 1353 function _DoubleLinkedQueueEntrySentinel_E() { | 1354 function _DoubleLinkedQueueEntrySentinel_E() { |
| 1354 // Initializers done | 1355 // Initializers done |
| 1355 DoubleLinkedQueueEntry_E.call(this, null); | 1356 DoubleLinkedQueueEntry_E.call(this, null); |
| 1356 this._link(this, this); | 1357 this._link(this, this); |
| 1357 } | 1358 } |
| 1358 $inherits(_DoubleLinkedQueueEntrySentinel_E, _DoubleLinkedQueueEntrySentinel); | |
| 1359 // ********** Code for _DoubleLinkedQueueEntrySentinel_KeyValuePair_K$V ********
****** | 1359 // ********** Code for _DoubleLinkedQueueEntrySentinel_KeyValuePair_K$V ********
****** |
| 1360 $inherits(_DoubleLinkedQueueEntrySentinel_KeyValuePair_K$V, _DoubleLinkedQueueEn
trySentinel); |
| 1360 function _DoubleLinkedQueueEntrySentinel_KeyValuePair_K$V() { | 1361 function _DoubleLinkedQueueEntrySentinel_KeyValuePair_K$V() { |
| 1361 // Initializers done | 1362 // Initializers done |
| 1362 DoubleLinkedQueueEntry_KeyValuePair_K$V.call(this, null); | 1363 DoubleLinkedQueueEntry_KeyValuePair_K$V.call(this, null); |
| 1363 this._link(this, this); | 1364 this._link(this, this); |
| 1364 } | 1365 } |
| 1365 $inherits(_DoubleLinkedQueueEntrySentinel_KeyValuePair_K$V, _DoubleLinkedQueueEn
trySentinel); | |
| 1366 // ********** Code for DoubleLinkedQueue ************** | 1366 // ********** Code for DoubleLinkedQueue ************** |
| 1367 function DoubleLinkedQueue() { | 1367 function DoubleLinkedQueue() { |
| 1368 // Initializers done | 1368 // Initializers done |
| 1369 this._sentinel = new _DoubleLinkedQueueEntrySentinel_E(); | 1369 this._sentinel = new _DoubleLinkedQueueEntrySentinel_E(); |
| 1370 } | 1370 } |
| 1371 DoubleLinkedQueue.prototype.addLast = function(value) { | 1371 DoubleLinkedQueue.prototype.addLast = function(value) { |
| 1372 this._sentinel.prepend(value); | 1372 this._sentinel.prepend(value); |
| 1373 } | 1373 } |
| 1374 DoubleLinkedQueue.prototype.add = function(value) { | 1374 DoubleLinkedQueue.prototype.add = function(value) { |
| 1375 this.addLast(value); | 1375 this.addLast(value); |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1454 return this.forEach(to$call$1($0)); | 1454 return this.forEach(to$call$1($0)); |
| 1455 }; | 1455 }; |
| 1456 DoubleLinkedQueue.prototype.isEmpty$0 = DoubleLinkedQueue.prototype.isEmpty; | 1456 DoubleLinkedQueue.prototype.isEmpty$0 = DoubleLinkedQueue.prototype.isEmpty; |
| 1457 DoubleLinkedQueue.prototype.iterator$0 = DoubleLinkedQueue.prototype.iterator; | 1457 DoubleLinkedQueue.prototype.iterator$0 = DoubleLinkedQueue.prototype.iterator; |
| 1458 DoubleLinkedQueue.prototype.last$0 = DoubleLinkedQueue.prototype.last; | 1458 DoubleLinkedQueue.prototype.last$0 = DoubleLinkedQueue.prototype.last; |
| 1459 DoubleLinkedQueue.prototype.removeLast$0 = DoubleLinkedQueue.prototype.removeLas
t; | 1459 DoubleLinkedQueue.prototype.removeLast$0 = DoubleLinkedQueue.prototype.removeLas
t; |
| 1460 DoubleLinkedQueue.prototype.some$1 = function($0) { | 1460 DoubleLinkedQueue.prototype.some$1 = function($0) { |
| 1461 return this.some(to$call$1($0)); | 1461 return this.some(to$call$1($0)); |
| 1462 }; | 1462 }; |
| 1463 // ********** Code for DoubleLinkedQueue_E ************** | 1463 // ********** Code for DoubleLinkedQueue_E ************** |
| 1464 $inherits(DoubleLinkedQueue_E, DoubleLinkedQueue); |
| 1464 function DoubleLinkedQueue_E() {} | 1465 function DoubleLinkedQueue_E() {} |
| 1465 $inherits(DoubleLinkedQueue_E, DoubleLinkedQueue); | |
| 1466 // ********** Code for DoubleLinkedQueue_KeyValuePair_K$V ************** | 1466 // ********** Code for DoubleLinkedQueue_KeyValuePair_K$V ************** |
| 1467 $inherits(DoubleLinkedQueue_KeyValuePair_K$V, DoubleLinkedQueue); |
| 1467 function DoubleLinkedQueue_KeyValuePair_K$V() { | 1468 function DoubleLinkedQueue_KeyValuePair_K$V() { |
| 1468 // Initializers done | 1469 // Initializers done |
| 1469 this._sentinel = new _DoubleLinkedQueueEntrySentinel_KeyValuePair_K$V(); | 1470 this._sentinel = new _DoubleLinkedQueueEntrySentinel_KeyValuePair_K$V(); |
| 1470 } | 1471 } |
| 1471 $inherits(DoubleLinkedQueue_KeyValuePair_K$V, DoubleLinkedQueue); | |
| 1472 DoubleLinkedQueue_KeyValuePair_K$V.prototype.addLast = function(value) { | 1472 DoubleLinkedQueue_KeyValuePair_K$V.prototype.addLast = function(value) { |
| 1473 this._sentinel.prepend(value); | 1473 this._sentinel.prepend(value); |
| 1474 } | 1474 } |
| 1475 DoubleLinkedQueue_KeyValuePair_K$V.prototype.lastEntry = function() { | 1475 DoubleLinkedQueue_KeyValuePair_K$V.prototype.lastEntry = function() { |
| 1476 return this._sentinel.previousEntry(); | 1476 return this._sentinel.previousEntry(); |
| 1477 } | 1477 } |
| 1478 DoubleLinkedQueue_KeyValuePair_K$V.prototype.forEach = function(f) { | 1478 DoubleLinkedQueue_KeyValuePair_K$V.prototype.forEach = function(f) { |
| 1479 var entry = this._sentinel._next; | 1479 var entry = this._sentinel._next; |
| 1480 while (entry !== this._sentinel) { | 1480 while (entry !== this._sentinel) { |
| 1481 var nextEntry = entry._next; | 1481 var nextEntry = entry._next; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1495 _DoubleLinkedQueueIterator.prototype.next = function() { | 1495 _DoubleLinkedQueueIterator.prototype.next = function() { |
| 1496 if (!this.hasNext()) { | 1496 if (!this.hasNext()) { |
| 1497 $throw(const$8/*const NoMoreElementsException()*/); | 1497 $throw(const$8/*const NoMoreElementsException()*/); |
| 1498 } | 1498 } |
| 1499 this._currentEntry = this._currentEntry._next; | 1499 this._currentEntry = this._currentEntry._next; |
| 1500 return this._currentEntry.get$element(); | 1500 return this._currentEntry.get$element(); |
| 1501 } | 1501 } |
| 1502 _DoubleLinkedQueueIterator.prototype.hasNext$0 = _DoubleLinkedQueueIterator.prot
otype.hasNext; | 1502 _DoubleLinkedQueueIterator.prototype.hasNext$0 = _DoubleLinkedQueueIterator.prot
otype.hasNext; |
| 1503 _DoubleLinkedQueueIterator.prototype.next$0 = _DoubleLinkedQueueIterator.prototy
pe.next; | 1503 _DoubleLinkedQueueIterator.prototype.next$0 = _DoubleLinkedQueueIterator.prototy
pe.next; |
| 1504 // ********** Code for _DoubleLinkedQueueIterator_E ************** | 1504 // ********** Code for _DoubleLinkedQueueIterator_E ************** |
| 1505 $inherits(_DoubleLinkedQueueIterator_E, _DoubleLinkedQueueIterator); |
| 1505 function _DoubleLinkedQueueIterator_E(_sentinel) { | 1506 function _DoubleLinkedQueueIterator_E(_sentinel) { |
| 1506 this._sentinel = _sentinel; | 1507 this._sentinel = _sentinel; |
| 1507 // Initializers done | 1508 // Initializers done |
| 1508 this._currentEntry = this._sentinel; | 1509 this._currentEntry = this._sentinel; |
| 1509 } | 1510 } |
| 1510 $inherits(_DoubleLinkedQueueIterator_E, _DoubleLinkedQueueIterator); | |
| 1511 // ********** Code for StopwatchImplementation ************** | 1511 // ********** Code for StopwatchImplementation ************** |
| 1512 function StopwatchImplementation() { | 1512 function StopwatchImplementation() { |
| 1513 this._start = null; | 1513 this._start = null; |
| 1514 this._stop = null; | 1514 this._stop = null; |
| 1515 // Initializers done | 1515 // Initializers done |
| 1516 } | 1516 } |
| 1517 StopwatchImplementation.prototype.start = function() { | 1517 StopwatchImplementation.prototype.start = function() { |
| 1518 if (this._start == null) { | 1518 if (this._start == null) { |
| 1519 this._start = Clock.now(); | 1519 this._start = Clock.now(); |
| 1520 } | 1520 } |
| (...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2231 if (!isSubtype) { | 2231 if (!isSubtype) { |
| 2232 body = $globals.world.objectType.varStubs.$index(checkName).get$body(); | 2232 body = $globals.world.objectType.varStubs.$index(checkName).get$body(); |
| 2233 } | 2233 } |
| 2234 else if (onType.name == 'StringImplementation' || onType.name == 'NumImpleme
ntation') { | 2234 else if (onType.name == 'StringImplementation' || onType.name == 'NumImpleme
ntation') { |
| 2235 body = ('return ' + onType.get$nativeType().name + '(this)'); | 2235 body = ('return ' + onType.get$nativeType().name + '(this)'); |
| 2236 } | 2236 } |
| 2237 this.writer.writeln(this._prototypeOf(onType, checkName) + (' = function(){'
+ body + '};')); | 2237 this.writer.writeln(this._prototypeOf(onType, checkName) + (' = function(){'
+ body + '};')); |
| 2238 } | 2238 } |
| 2239 } | 2239 } |
| 2240 WorldGenerator.prototype.writeType = function(type) { | 2240 WorldGenerator.prototype.writeType = function(type) { |
| 2241 if (type.isWritten) return; |
| 2242 type.isWritten = true; |
| 2243 if (type.get$parent() != null && !type.get$isNative()) { |
| 2244 this.writeType(type.get$parent()); |
| 2245 } |
| 2241 if (type.name != null && (type instanceof ConcreteType) && $eq(type.get$librar
y(), $globals.world.get$coreimpl()) && type.name.startsWith('ListFactory')) { | 2246 if (type.name != null && (type instanceof ConcreteType) && $eq(type.get$librar
y(), $globals.world.get$coreimpl()) && type.name.startsWith('ListFactory')) { |
| 2242 this.writer.writeln(('' + type.get$jsname() + ' = ' + type.get$genericType()
.get$jsname() + ';')); | 2247 this.writer.writeln(('' + type.get$jsname() + ' = ' + type.get$genericType()
.get$jsname() + ';')); |
| 2243 return; | 2248 return; |
| 2244 } | 2249 } |
| 2245 var typeName = type.get$jsname() != null ? type.get$jsname() : 'top level'; | 2250 var typeName = type.get$jsname() != null ? type.get$jsname() : 'top level'; |
| 2246 this.writer.comment(('// ********** Code for ' + typeName + ' **************')
); | 2251 this.writer.comment(('// ********** Code for ' + typeName + ' **************')
); |
| 2247 if (type.get$isNative() && !type.get$isTop()) { | 2252 if (type.get$isNative() && !type.get$isTop()) { |
| 2248 var nativeName = type.get$definition().get$nativeType().get$name(); | 2253 var nativeName = type.get$definition().get$nativeType().get$name(); |
| 2249 if ($eq(nativeName, '')) { | 2254 if ($eq(nativeName, '')) { |
| 2250 this.writer.writeln(('function ' + type.get$jsname() + '() {}')); | 2255 this.writer.writeln(('function ' + type.get$jsname() + '() {}')); |
| 2251 } | 2256 } |
| 2252 else if (type.get$jsname() != nativeName) { | 2257 else if (type.get$jsname() != nativeName) { |
| 2253 this.writer.writeln(('' + type.get$jsname() + ' = ' + nativeName + ';')); | 2258 this.writer.writeln(('' + type.get$jsname() + ' = ' + nativeName + ';')); |
| 2254 } | 2259 } |
| 2255 } | 2260 } |
| 2261 if (!type.get$isTop()) { |
| 2262 if ((type instanceof ConcreteType)) { |
| 2263 var c = type; |
| 2264 this.corejs.ensureInheritsHelper(); |
| 2265 this.writer.writeln(('\$inherits(' + c.get$jsname() + ', ' + c.genericType
.get$jsname() + ');')); |
| 2266 for (var p = c._parent; |
| 2267 (p instanceof ConcreteType); p = p.get$_parent()) { |
| 2268 this._ensureInheritMembersHelper(); |
| 2269 this._mixins.writeln(('\$inheritsMembers(' + c.get$jsname() + ', ' + p.g
et$jsname() + ');')); |
| 2270 } |
| 2271 } |
| 2272 else if (!type.get$isNative()) { |
| 2273 if (type.get$parent() != null && !type.get$parent().get$isObject()) { |
| 2274 this.corejs.ensureInheritsHelper(); |
| 2275 this.writer.writeln(('\$inherits(' + type.get$jsname() + ', ' + type.get
$parent().get$jsname() + ');')); |
| 2276 } |
| 2277 } |
| 2278 } |
| 2256 if (type.get$isTop()) { | 2279 if (type.get$isTop()) { |
| 2257 } | 2280 } |
| 2258 else if (type.get$constructors().get$length() == 0) { | 2281 else if (type.get$constructors().get$length() == 0) { |
| 2259 if (!type.get$isNative()) { | 2282 if (!type.get$isNative()) { |
| 2260 this.writer.writeln(('function ' + type.get$jsname() + '() {}')); | 2283 this.writer.writeln(('function ' + type.get$jsname() + '() {}')); |
| 2261 } | 2284 } |
| 2262 } | 2285 } |
| 2263 else { | 2286 else { |
| 2264 var standardConstructor = type.get$constructors().$index(''); | 2287 var standardConstructor = type.get$constructors().$index(''); |
| 2265 if (standardConstructor == null || standardConstructor.generator == null) { | 2288 if (standardConstructor == null || standardConstructor.generator == null) { |
| 2266 if (!type.get$isNative()) { | 2289 if (!type.get$isNative()) { |
| 2267 this.writer.writeln(('function ' + type.get$jsname() + '() {}')); | 2290 this.writer.writeln(('function ' + type.get$jsname() + '() {}')); |
| 2268 } | 2291 } |
| 2269 } | 2292 } |
| 2270 else { | 2293 else { |
| 2271 standardConstructor.generator.writeDefinition(this.writer, null); | 2294 standardConstructor.generator.writeDefinition(this.writer, null); |
| 2272 } | 2295 } |
| 2273 var $$list = type.get$constructors().getValues(); | 2296 var $$list = type.get$constructors().getValues(); |
| 2274 for (var $$i = type.get$constructors().getValues().iterator$0(); $$i.hasNext
$0(); ) { | 2297 for (var $$i = type.get$constructors().getValues().iterator$0(); $$i.hasNext
$0(); ) { |
| 2275 var c = $$i.next$0(); | 2298 var c = $$i.next$0(); |
| 2276 if (c.get$generator() != null && $ne(c, standardConstructor)) { | 2299 if (c.get$generator() != null && $ne(c, standardConstructor)) { |
| 2277 c.get$generator().writeDefinition$2(this.writer); | 2300 c.get$generator().writeDefinition$2(this.writer); |
| 2278 } | 2301 } |
| 2279 } | 2302 } |
| 2280 } | 2303 } |
| 2281 if (!type.get$isTop()) { | |
| 2282 if ((type instanceof ConcreteType)) { | |
| 2283 var c = type; | |
| 2284 this.corejs.ensureInheritsHelper(); | |
| 2285 this.writer.writeln(('\$inherits(' + c.get$jsname() + ', ' + c.genericType
.get$jsname() + ');')); | |
| 2286 for (var p = c._parent; | |
| 2287 (p instanceof ConcreteType); p = p.get$_parent()) { | |
| 2288 this._ensureInheritMembersHelper(); | |
| 2289 this._mixins.writeln(('\$inheritsMembers(' + c.get$jsname() + ', ' + p.g
et$jsname() + ');')); | |
| 2290 } | |
| 2291 } | |
| 2292 else if (!type.get$isNative()) { | |
| 2293 if (type.get$parent() != null && !type.get$parent().get$isObject()) { | |
| 2294 this.corejs.ensureInheritsHelper(); | |
| 2295 this.writer.writeln(('\$inherits(' + type.get$jsname() + ', ' + type.get
$parent().get$jsname() + ');')); | |
| 2296 } | |
| 2297 } | |
| 2298 } | |
| 2299 if (!(type instanceof ConcreteType)) { | 2304 if (!(type instanceof ConcreteType)) { |
| 2300 this._maybeIsTest(type, type); | 2305 this._maybeIsTest(type, type); |
| 2301 } | 2306 } |
| 2302 if (type.get$genericType()._concreteTypes != null) { | 2307 if (type.get$genericType()._concreteTypes != null) { |
| 2303 var $$list = this._orderValues(type.get$genericType()._concreteTypes); | 2308 var $$list = this._orderValues(type.get$genericType()._concreteTypes); |
| 2304 for (var $$i = 0;$$i < $$list.length; $$i++) { | 2309 for (var $$i = 0;$$i < $$list.length; $$i++) { |
| 2305 var ct = $$list.$index($$i); | 2310 var ct = $$list.$index($$i); |
| 2306 this._maybeIsTest(type, ct); | 2311 this._maybeIsTest(type, ct); |
| 2307 } | 2312 } |
| 2308 } | 2313 } |
| (...skipping 1748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4057 function LibraryImport(library, prefix) { | 4062 function LibraryImport(library, prefix) { |
| 4058 this.library = library; | 4063 this.library = library; |
| 4059 this.prefix = prefix; | 4064 this.prefix = prefix; |
| 4060 // Initializers done | 4065 // Initializers done |
| 4061 } | 4066 } |
| 4062 LibraryImport.prototype.get$prefix = function() { return this.prefix; }; | 4067 LibraryImport.prototype.get$prefix = function() { return this.prefix; }; |
| 4063 LibraryImport.prototype.set$prefix = function(value) { return this.prefix = valu
e; }; | 4068 LibraryImport.prototype.set$prefix = function(value) { return this.prefix = valu
e; }; |
| 4064 LibraryImport.prototype.get$library = function() { return this.library; }; | 4069 LibraryImport.prototype.get$library = function() { return this.library; }; |
| 4065 LibraryImport.prototype.set$library = function(value) { return this.library = va
lue; }; | 4070 LibraryImport.prototype.set$library = function(value) { return this.library = va
lue; }; |
| 4066 // ********** Code for Library ************** | 4071 // ********** Code for Library ************** |
| 4072 $inherits(Library, Element); |
| 4067 function Library(baseSource) { | 4073 function Library(baseSource) { |
| 4068 this.isWritten = false | 4074 this.isWritten = false |
| 4069 this.isMarked = false | 4075 this.isMarked = false |
| 4070 this.baseSource = baseSource; | 4076 this.baseSource = baseSource; |
| 4071 // Initializers done | 4077 // Initializers done |
| 4072 Element.call(this, null, null); | 4078 Element.call(this, null, null); |
| 4073 this.sourceDir = dirname(this.baseSource.filename); | 4079 this.sourceDir = dirname(this.baseSource.filename); |
| 4074 this.topType = new DefinedType(null, this, null, true); | 4080 this.topType = new DefinedType(null, this, null, true); |
| 4075 this.types = _map(['', this.topType]); | 4081 this.types = _map(['', this.topType]); |
| 4076 this.imports = []; | 4082 this.imports = []; |
| 4077 this.natives = []; | 4083 this.natives = []; |
| 4078 this.sources = []; | 4084 this.sources = []; |
| 4079 this._privateMembers = new HashMapImplementation(); | 4085 this._privateMembers = new HashMapImplementation(); |
| 4080 } | 4086 } |
| 4081 $inherits(Library, Element); | |
| 4082 Library.prototype.get$baseSource = function() { return this.baseSource; }; | 4087 Library.prototype.get$baseSource = function() { return this.baseSource; }; |
| 4083 Library.prototype.get$types = function() { return this.types; }; | 4088 Library.prototype.get$types = function() { return this.types; }; |
| 4084 Library.prototype.set$types = function(value) { return this.types = value; }; | 4089 Library.prototype.set$types = function(value) { return this.types = value; }; |
| 4085 Library.prototype.get$_privateMembers = function() { return this._privateMembers
; }; | 4090 Library.prototype.get$_privateMembers = function() { return this._privateMembers
; }; |
| 4086 Library.prototype.set$_privateMembers = function(value) { return this._privateMe
mbers = value; }; | 4091 Library.prototype.set$_privateMembers = function(value) { return this._privateMe
mbers = value; }; |
| 4087 Library.prototype.get$topType = function() { return this.topType; }; | 4092 Library.prototype.get$topType = function() { return this.topType; }; |
| 4088 Library.prototype.set$topType = function(value) { return this.topType = value; }
; | 4093 Library.prototype.set$topType = function(value) { return this.topType = value; }
; |
| 4089 Library.prototype.get$enclosingElement = function() { | 4094 Library.prototype.get$enclosingElement = function() { |
| 4090 return null; | 4095 return null; |
| 4091 } | 4096 } |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4568 Parameter.prototype.get$isOptional = function() { | 4573 Parameter.prototype.get$isOptional = function() { |
| 4569 return this.definition != null && this.definition.value != null; | 4574 return this.definition != null && this.definition.value != null; |
| 4570 } | 4575 } |
| 4571 Parameter.prototype.get$hasDefaultValue = function() { | 4576 Parameter.prototype.get$hasDefaultValue = function() { |
| 4572 return !(this.definition.value instanceof NullExpression) || (this.definition.
value.span.start != this.definition.span.start); | 4577 return !(this.definition.value instanceof NullExpression) || (this.definition.
value.span.start != this.definition.span.start); |
| 4573 } | 4578 } |
| 4574 Parameter.prototype.copyWithNewType$2 = Parameter.prototype.copyWithNewType; | 4579 Parameter.prototype.copyWithNewType$2 = Parameter.prototype.copyWithNewType; |
| 4575 Parameter.prototype.genValue$2 = Parameter.prototype.genValue; | 4580 Parameter.prototype.genValue$2 = Parameter.prototype.genValue; |
| 4576 Parameter.prototype.resolve$0 = Parameter.prototype.resolve; | 4581 Parameter.prototype.resolve$0 = Parameter.prototype.resolve; |
| 4577 // ********** Code for Member ************** | 4582 // ********** Code for Member ************** |
| 4583 $inherits(Member, Element); |
| 4578 function Member(name, declaringType) { | 4584 function Member(name, declaringType) { |
| 4579 this.isGenerated = false; | 4585 this.isGenerated = false; |
| 4580 this.declaringType = declaringType; | 4586 this.declaringType = declaringType; |
| 4581 // Initializers done | 4587 // Initializers done |
| 4582 Element.call(this, name, declaringType); | 4588 Element.call(this, name, declaringType); |
| 4583 } | 4589 } |
| 4584 $inherits(Member, Element); | |
| 4585 Member.prototype.get$declaringType = function() { return this.declaringType; }; | 4590 Member.prototype.get$declaringType = function() { return this.declaringType; }; |
| 4586 Member.prototype.get$generator = function() { return this.generator; }; | 4591 Member.prototype.get$generator = function() { return this.generator; }; |
| 4587 Member.prototype.set$generator = function(value) { return this.generator = value
; }; | 4592 Member.prototype.set$generator = function(value) { return this.generator = value
; }; |
| 4588 Member.prototype.get$library = function() { | 4593 Member.prototype.get$library = function() { |
| 4589 return this.declaringType.get$library(); | 4594 return this.declaringType.get$library(); |
| 4590 } | 4595 } |
| 4591 Member.prototype.get$isPrivate = function() { | 4596 Member.prototype.get$isPrivate = function() { |
| 4592 return this.name.startsWith('_'); | 4597 return this.name.startsWith('_'); |
| 4593 } | 4598 } |
| 4594 Member.prototype.get$isConstructor = function() { | 4599 Member.prototype.get$isConstructor = function() { |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4706 Member.prototype.computeValue$0 = Member.prototype.computeValue; | 4711 Member.prototype.computeValue$0 = Member.prototype.computeValue; |
| 4707 Member.prototype.hashCode$0 = Member.prototype.hashCode; | 4712 Member.prototype.hashCode$0 = Member.prototype.hashCode; |
| 4708 Member.prototype.invoke$4 = function($0, $1, $2, $3) { | 4713 Member.prototype.invoke$4 = function($0, $1, $2, $3) { |
| 4709 return this.invoke($0, $1, $2, $3, false); | 4714 return this.invoke($0, $1, $2, $3, false); |
| 4710 }; | 4715 }; |
| 4711 Member.prototype.invoke$4$isDynamic = Member.prototype.invoke; | 4716 Member.prototype.invoke$4$isDynamic = Member.prototype.invoke; |
| 4712 Member.prototype.invoke$5 = Member.prototype.invoke; | 4717 Member.prototype.invoke$5 = Member.prototype.invoke; |
| 4713 Member.prototype.provideFieldSyntax$0 = Member.prototype.provideFieldSyntax; | 4718 Member.prototype.provideFieldSyntax$0 = Member.prototype.provideFieldSyntax; |
| 4714 Member.prototype.providePropertySyntax$0 = Member.prototype.providePropertySynta
x; | 4719 Member.prototype.providePropertySyntax$0 = Member.prototype.providePropertySynta
x; |
| 4715 // ********** Code for TypeMember ************** | 4720 // ********** Code for TypeMember ************** |
| 4721 $inherits(TypeMember, Member); |
| 4716 function TypeMember(type) { | 4722 function TypeMember(type) { |
| 4717 this.type = type; | 4723 this.type = type; |
| 4718 // Initializers done | 4724 // Initializers done |
| 4719 Member.call(this, type.name, type.library.topType); | 4725 Member.call(this, type.name, type.library.topType); |
| 4720 } | 4726 } |
| 4721 $inherits(TypeMember, Member); | |
| 4722 TypeMember.prototype.get$type = function() { return this.type; }; | 4727 TypeMember.prototype.get$type = function() { return this.type; }; |
| 4723 TypeMember.prototype.get$span = function() { | 4728 TypeMember.prototype.get$span = function() { |
| 4724 return this.type.definition.span; | 4729 return this.type.definition.span; |
| 4725 } | 4730 } |
| 4726 TypeMember.prototype.get$isStatic = function() { | 4731 TypeMember.prototype.get$isStatic = function() { |
| 4727 return true; | 4732 return true; |
| 4728 } | 4733 } |
| 4729 TypeMember.prototype.get$returnType = function() { | 4734 TypeMember.prototype.get$returnType = function() { |
| 4730 return $globals.world.varType; | 4735 return $globals.world.varType; |
| 4731 } | 4736 } |
| (...skipping 28 matching lines...) Expand all Loading... |
| 4760 }; | 4765 }; |
| 4761 TypeMember.prototype._set$4$isDynamic = TypeMember.prototype._set; | 4766 TypeMember.prototype._set$4$isDynamic = TypeMember.prototype._set; |
| 4762 TypeMember.prototype._set$5 = TypeMember.prototype._set; | 4767 TypeMember.prototype._set$5 = TypeMember.prototype._set; |
| 4763 TypeMember.prototype.canInvoke$2 = TypeMember.prototype.canInvoke; | 4768 TypeMember.prototype.canInvoke$2 = TypeMember.prototype.canInvoke; |
| 4764 TypeMember.prototype.invoke$4 = function($0, $1, $2, $3) { | 4769 TypeMember.prototype.invoke$4 = function($0, $1, $2, $3) { |
| 4765 return this.invoke($0, $1, $2, $3, false); | 4770 return this.invoke($0, $1, $2, $3, false); |
| 4766 }; | 4771 }; |
| 4767 TypeMember.prototype.invoke$4$isDynamic = TypeMember.prototype.invoke; | 4772 TypeMember.prototype.invoke$4$isDynamic = TypeMember.prototype.invoke; |
| 4768 TypeMember.prototype.invoke$5 = TypeMember.prototype.invoke; | 4773 TypeMember.prototype.invoke$5 = TypeMember.prototype.invoke; |
| 4769 // ********** Code for FieldMember ************** | 4774 // ********** Code for FieldMember ************** |
| 4775 $inherits(FieldMember, Member); |
| 4770 function FieldMember(name, declaringType, definition, value) { | 4776 function FieldMember(name, declaringType, definition, value) { |
| 4771 this._providePropertySyntax = false | 4777 this._providePropertySyntax = false |
| 4772 this._computing = false | 4778 this._computing = false |
| 4773 this.definition = definition; | 4779 this.definition = definition; |
| 4774 this.value = value; | 4780 this.value = value; |
| 4775 this.isNative = false; | 4781 this.isNative = false; |
| 4776 // Initializers done | 4782 // Initializers done |
| 4777 Member.call(this, name, declaringType); | 4783 Member.call(this, name, declaringType); |
| 4778 } | 4784 } |
| 4779 $inherits(FieldMember, Member); | |
| 4780 FieldMember.prototype.get$definition = function() { return this.definition; }; | 4785 FieldMember.prototype.get$definition = function() { return this.definition; }; |
| 4781 FieldMember.prototype.get$value = function() { return this.value; }; | 4786 FieldMember.prototype.get$value = function() { return this.value; }; |
| 4782 FieldMember.prototype.get$type = function() { return this.type; }; | 4787 FieldMember.prototype.get$type = function() { return this.type; }; |
| 4783 FieldMember.prototype.set$type = function(value) { return this.type = value; }; | 4788 FieldMember.prototype.set$type = function(value) { return this.type = value; }; |
| 4784 FieldMember.prototype.get$isStatic = function() { return this.isStatic; }; | 4789 FieldMember.prototype.get$isStatic = function() { return this.isStatic; }; |
| 4785 FieldMember.prototype.set$isStatic = function(value) { return this.isStatic = va
lue; }; | 4790 FieldMember.prototype.set$isStatic = function(value) { return this.isStatic = va
lue; }; |
| 4786 FieldMember.prototype.get$isFinal = function() { return this.isFinal; }; | 4791 FieldMember.prototype.get$isFinal = function() { return this.isFinal; }; |
| 4787 FieldMember.prototype.set$isFinal = function(value) { return this.isFinal = valu
e; }; | 4792 FieldMember.prototype.set$isFinal = function(value) { return this.isFinal = valu
e; }; |
| 4788 FieldMember.prototype.get$isNative = function() { return this.isNative; }; | 4793 FieldMember.prototype.get$isNative = function() { return this.isNative; }; |
| 4789 FieldMember.prototype.set$isNative = function(value) { return this.isNative = va
lue; }; | 4794 FieldMember.prototype.set$isNative = function(value) { return this.isNative = va
lue; }; |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4943 FieldMember.prototype._set$4 = function($0, $1, $2, $3) { | 4948 FieldMember.prototype._set$4 = function($0, $1, $2, $3) { |
| 4944 return this._set($0, $1, $2, $3, false); | 4949 return this._set($0, $1, $2, $3, false); |
| 4945 }; | 4950 }; |
| 4946 FieldMember.prototype._set$4$isDynamic = FieldMember.prototype._set; | 4951 FieldMember.prototype._set$4$isDynamic = FieldMember.prototype._set; |
| 4947 FieldMember.prototype._set$5 = FieldMember.prototype._set; | 4952 FieldMember.prototype._set$5 = FieldMember.prototype._set; |
| 4948 FieldMember.prototype.computeValue$0 = FieldMember.prototype.computeValue; | 4953 FieldMember.prototype.computeValue$0 = FieldMember.prototype.computeValue; |
| 4949 FieldMember.prototype.provideFieldSyntax$0 = FieldMember.prototype.provideFieldS
yntax; | 4954 FieldMember.prototype.provideFieldSyntax$0 = FieldMember.prototype.provideFieldS
yntax; |
| 4950 FieldMember.prototype.providePropertySyntax$0 = FieldMember.prototype.providePro
pertySyntax; | 4955 FieldMember.prototype.providePropertySyntax$0 = FieldMember.prototype.providePro
pertySyntax; |
| 4951 FieldMember.prototype.resolve$0 = FieldMember.prototype.resolve; | 4956 FieldMember.prototype.resolve$0 = FieldMember.prototype.resolve; |
| 4952 // ********** Code for PropertyMember ************** | 4957 // ********** Code for PropertyMember ************** |
| 4958 $inherits(PropertyMember, Member); |
| 4953 function PropertyMember(name, declaringType) { | 4959 function PropertyMember(name, declaringType) { |
| 4954 this._provideFieldSyntax = false | 4960 this._provideFieldSyntax = false |
| 4955 // Initializers done | 4961 // Initializers done |
| 4956 Member.call(this, name, declaringType); | 4962 Member.call(this, name, declaringType); |
| 4957 } | 4963 } |
| 4958 $inherits(PropertyMember, Member); | |
| 4959 PropertyMember.prototype.get$getter = function() { return this.getter; }; | 4964 PropertyMember.prototype.get$getter = function() { return this.getter; }; |
| 4960 PropertyMember.prototype.set$getter = function(value) { return this.getter = val
ue; }; | 4965 PropertyMember.prototype.set$getter = function(value) { return this.getter = val
ue; }; |
| 4961 PropertyMember.prototype.get$setter = function() { return this.setter; }; | 4966 PropertyMember.prototype.get$setter = function() { return this.setter; }; |
| 4962 PropertyMember.prototype.set$setter = function(value) { return this.setter = val
ue; }; | 4967 PropertyMember.prototype.set$setter = function(value) { return this.setter = val
ue; }; |
| 4963 PropertyMember.prototype.get$span = function() { | 4968 PropertyMember.prototype.get$span = function() { |
| 4964 return this.getter != null ? this.getter.get$span() : null; | 4969 return this.getter != null ? this.getter.get$span() : null; |
| 4965 } | 4970 } |
| 4966 PropertyMember.prototype.get$canGet = function() { | 4971 PropertyMember.prototype.get$canGet = function() { |
| 4967 return this.getter != null; | 4972 return this.getter != null; |
| 4968 } | 4973 } |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5054 PropertyMember.prototype._get$4 = PropertyMember.prototype._get; | 5059 PropertyMember.prototype._get$4 = PropertyMember.prototype._get; |
| 5055 PropertyMember.prototype._set$4 = function($0, $1, $2, $3) { | 5060 PropertyMember.prototype._set$4 = function($0, $1, $2, $3) { |
| 5056 return this._set($0, $1, $2, $3, false); | 5061 return this._set($0, $1, $2, $3, false); |
| 5057 }; | 5062 }; |
| 5058 PropertyMember.prototype._set$4$isDynamic = PropertyMember.prototype._set; | 5063 PropertyMember.prototype._set$4$isDynamic = PropertyMember.prototype._set; |
| 5059 PropertyMember.prototype._set$5 = PropertyMember.prototype._set; | 5064 PropertyMember.prototype._set$5 = PropertyMember.prototype._set; |
| 5060 PropertyMember.prototype.provideFieldSyntax$0 = PropertyMember.prototype.provide
FieldSyntax; | 5065 PropertyMember.prototype.provideFieldSyntax$0 = PropertyMember.prototype.provide
FieldSyntax; |
| 5061 PropertyMember.prototype.providePropertySyntax$0 = PropertyMember.prototype.prov
idePropertySyntax; | 5066 PropertyMember.prototype.providePropertySyntax$0 = PropertyMember.prototype.prov
idePropertySyntax; |
| 5062 PropertyMember.prototype.resolve$0 = PropertyMember.prototype.resolve; | 5067 PropertyMember.prototype.resolve$0 = PropertyMember.prototype.resolve; |
| 5063 // ********** Code for ConcreteMember ************** | 5068 // ********** Code for ConcreteMember ************** |
| 5069 $inherits(ConcreteMember, Member); |
| 5064 function ConcreteMember(name, declaringType, baseMember) { | 5070 function ConcreteMember(name, declaringType, baseMember) { |
| 5065 this.baseMember = baseMember; | 5071 this.baseMember = baseMember; |
| 5066 // Initializers done | 5072 // Initializers done |
| 5067 Member.call(this, name, declaringType); | 5073 Member.call(this, name, declaringType); |
| 5068 this.parameters = []; | 5074 this.parameters = []; |
| 5069 this.returnType = this.baseMember.get$returnType().resolveTypeParams(declaring
Type); | 5075 this.returnType = this.baseMember.get$returnType().resolveTypeParams(declaring
Type); |
| 5070 var $$list = this.baseMember.get$parameters(); | 5076 var $$list = this.baseMember.get$parameters(); |
| 5071 for (var $$i = 0;$$i < $$list.length; $$i++) { | 5077 for (var $$i = 0;$$i < $$list.length; $$i++) { |
| 5072 var p = $$list.$index($$i); | 5078 var p = $$list.$index($$i); |
| 5073 var newType = p.get$type().resolveTypeParams$1(declaringType); | 5079 var newType = p.get$type().resolveTypeParams$1(declaringType); |
| 5074 if ($ne(newType, p.get$type())) { | 5080 if ($ne(newType, p.get$type())) { |
| 5075 this.parameters.add(p.copyWithNewType$2(this, newType)); | 5081 this.parameters.add(p.copyWithNewType$2(this, newType)); |
| 5076 } | 5082 } |
| 5077 else { | 5083 else { |
| 5078 this.parameters.add(p); | 5084 this.parameters.add(p); |
| 5079 } | 5085 } |
| 5080 } | 5086 } |
| 5081 } | 5087 } |
| 5082 $inherits(ConcreteMember, Member); | |
| 5083 ConcreteMember.prototype.get$returnType = function() { return this.returnType; }
; | 5088 ConcreteMember.prototype.get$returnType = function() { return this.returnType; }
; |
| 5084 ConcreteMember.prototype.set$returnType = function(value) { return this.returnTy
pe = value; }; | 5089 ConcreteMember.prototype.set$returnType = function(value) { return this.returnTy
pe = value; }; |
| 5085 ConcreteMember.prototype.get$parameters = function() { return this.parameters; }
; | 5090 ConcreteMember.prototype.get$parameters = function() { return this.parameters; }
; |
| 5086 ConcreteMember.prototype.set$parameters = function(value) { return this.paramete
rs = value; }; | 5091 ConcreteMember.prototype.set$parameters = function(value) { return this.paramete
rs = value; }; |
| 5087 ConcreteMember.prototype.get$span = function() { | 5092 ConcreteMember.prototype.get$span = function() { |
| 5088 return this.baseMember.get$span(); | 5093 return this.baseMember.get$span(); |
| 5089 } | 5094 } |
| 5090 ConcreteMember.prototype.get$isStatic = function() { | 5095 ConcreteMember.prototype.get$isStatic = function() { |
| 5091 return this.baseMember.get$isStatic(); | 5096 return this.baseMember.get$isStatic(); |
| 5092 } | 5097 } |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5195 ConcreteMember.prototype.canInvoke$2 = ConcreteMember.prototype.canInvoke; | 5200 ConcreteMember.prototype.canInvoke$2 = ConcreteMember.prototype.canInvoke; |
| 5196 ConcreteMember.prototype.computeValue$0 = ConcreteMember.prototype.computeValue; | 5201 ConcreteMember.prototype.computeValue$0 = ConcreteMember.prototype.computeValue; |
| 5197 ConcreteMember.prototype.invoke$4 = function($0, $1, $2, $3) { | 5202 ConcreteMember.prototype.invoke$4 = function($0, $1, $2, $3) { |
| 5198 return this.invoke($0, $1, $2, $3, false); | 5203 return this.invoke($0, $1, $2, $3, false); |
| 5199 }; | 5204 }; |
| 5200 ConcreteMember.prototype.invoke$4$isDynamic = ConcreteMember.prototype.invoke; | 5205 ConcreteMember.prototype.invoke$4$isDynamic = ConcreteMember.prototype.invoke; |
| 5201 ConcreteMember.prototype.invoke$5 = ConcreteMember.prototype.invoke; | 5206 ConcreteMember.prototype.invoke$5 = ConcreteMember.prototype.invoke; |
| 5202 ConcreteMember.prototype.provideFieldSyntax$0 = ConcreteMember.prototype.provide
FieldSyntax; | 5207 ConcreteMember.prototype.provideFieldSyntax$0 = ConcreteMember.prototype.provide
FieldSyntax; |
| 5203 ConcreteMember.prototype.providePropertySyntax$0 = ConcreteMember.prototype.prov
idePropertySyntax; | 5208 ConcreteMember.prototype.providePropertySyntax$0 = ConcreteMember.prototype.prov
idePropertySyntax; |
| 5204 // ********** Code for MethodMember ************** | 5209 // ********** Code for MethodMember ************** |
| 5210 $inherits(MethodMember, Member); |
| 5205 function MethodMember(name, declaringType, definition) { | 5211 function MethodMember(name, declaringType, definition) { |
| 5206 this.isStatic = false | 5212 this.isStatic = false |
| 5207 this.isAbstract = false | 5213 this.isAbstract = false |
| 5208 this.isConst = false | 5214 this.isConst = false |
| 5209 this.isFactory = false | 5215 this.isFactory = false |
| 5210 this.isLambda = false | 5216 this.isLambda = false |
| 5211 this._providePropertySyntax = false | 5217 this._providePropertySyntax = false |
| 5212 this._provideFieldSyntax = false | 5218 this._provideFieldSyntax = false |
| 5213 this._provideOptionalParamInfo = false | 5219 this._provideOptionalParamInfo = false |
| 5214 this.definition = definition; | 5220 this.definition = definition; |
| 5215 // Initializers done | 5221 // Initializers done |
| 5216 Member.call(this, name, declaringType); | 5222 Member.call(this, name, declaringType); |
| 5217 } | 5223 } |
| 5218 $inherits(MethodMember, Member); | |
| 5219 MethodMember.prototype.get$definition = function() { return this.definition; }; | 5224 MethodMember.prototype.get$definition = function() { return this.definition; }; |
| 5220 MethodMember.prototype.set$definition = function(value) { return this.definition
= value; }; | 5225 MethodMember.prototype.set$definition = function(value) { return this.definition
= value; }; |
| 5221 MethodMember.prototype.get$returnType = function() { return this.returnType; }; | 5226 MethodMember.prototype.get$returnType = function() { return this.returnType; }; |
| 5222 MethodMember.prototype.set$returnType = function(value) { return this.returnType
= value; }; | 5227 MethodMember.prototype.set$returnType = function(value) { return this.returnType
= value; }; |
| 5223 MethodMember.prototype.get$parameters = function() { return this.parameters; }; | 5228 MethodMember.prototype.get$parameters = function() { return this.parameters; }; |
| 5224 MethodMember.prototype.set$parameters = function(value) { return this.parameters
= value; }; | 5229 MethodMember.prototype.set$parameters = function(value) { return this.parameters
= value; }; |
| 5225 MethodMember.prototype.get$typeParameters = function() { return this.typeParamet
ers; }; | 5230 MethodMember.prototype.get$typeParameters = function() { return this.typeParamet
ers; }; |
| 5226 MethodMember.prototype.set$typeParameters = function(value) { return this.typePa
rameters = value; }; | 5231 MethodMember.prototype.set$typeParameters = function(value) { return this.typePa
rameters = value; }; |
| 5227 MethodMember.prototype.get$isStatic = function() { return this.isStatic; }; | 5232 MethodMember.prototype.get$isStatic = function() { return this.isStatic; }; |
| 5228 MethodMember.prototype.set$isStatic = function(value) { return this.isStatic = v
alue; }; | 5233 MethodMember.prototype.set$isStatic = function(value) { return this.isStatic = v
alue; }; |
| (...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6262 return new SourceSpan(this.source, this.start, this.end); | 6267 return new SourceSpan(this.source, this.start, this.end); |
| 6263 } | 6268 } |
| 6264 Token.prototype.end$0 = function() { | 6269 Token.prototype.end$0 = function() { |
| 6265 return this.end(); | 6270 return this.end(); |
| 6266 }; | 6271 }; |
| 6267 Token.prototype.start$0 = function() { | 6272 Token.prototype.start$0 = function() { |
| 6268 return this.start(); | 6273 return this.start(); |
| 6269 }; | 6274 }; |
| 6270 Token.prototype.toString$0 = Token.prototype.toString; | 6275 Token.prototype.toString$0 = Token.prototype.toString; |
| 6271 // ********** Code for ErrorToken ************** | 6276 // ********** Code for ErrorToken ************** |
| 6277 $inherits(ErrorToken, Token); |
| 6272 function ErrorToken(kind, source, start, end, message) { | 6278 function ErrorToken(kind, source, start, end, message) { |
| 6273 this.message = message; | 6279 this.message = message; |
| 6274 // Initializers done | 6280 // Initializers done |
| 6275 Token.call(this, kind, source, start, end); | 6281 Token.call(this, kind, source, start, end); |
| 6276 } | 6282 } |
| 6277 $inherits(ErrorToken, Token); | |
| 6278 ErrorToken.prototype.get$message = function() { return this.message; }; | 6283 ErrorToken.prototype.get$message = function() { return this.message; }; |
| 6279 ErrorToken.prototype.set$message = function(value) { return this.message = value
; }; | 6284 ErrorToken.prototype.set$message = function(value) { return this.message = value
; }; |
| 6280 // ********** Code for SourceFile ************** | 6285 // ********** Code for SourceFile ************** |
| 6281 function SourceFile(filename, _text) { | 6286 function SourceFile(filename, _text) { |
| 6282 this.filename = filename; | 6287 this.filename = filename; |
| 6283 this._text = _text; | 6288 this._text = _text; |
| 6284 // Initializers done | 6289 // Initializers done |
| 6285 } | 6290 } |
| 6286 SourceFile.prototype.get$filename = function() { return this.filename; }; | 6291 SourceFile.prototype.get$filename = function() { return this.filename; }; |
| 6287 SourceFile.prototype.get$orderInLibrary = function() { return this.orderInLibrar
y; }; | 6292 SourceFile.prototype.get$orderInLibrary = function() { return this.orderInLibrar
y; }; |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6414 return this.previous; | 6419 return this.previous; |
| 6415 } | 6420 } |
| 6416 InterpStack.push = function(stack, quote, isMultiline) { | 6421 InterpStack.push = function(stack, quote, isMultiline) { |
| 6417 var newStack = new InterpStack(stack, quote, isMultiline); | 6422 var newStack = new InterpStack(stack, quote, isMultiline); |
| 6418 if (stack != null) newStack.set$previous(stack); | 6423 if (stack != null) newStack.set$previous(stack); |
| 6419 return newStack; | 6424 return newStack; |
| 6420 } | 6425 } |
| 6421 InterpStack.prototype.next$0 = function() { | 6426 InterpStack.prototype.next$0 = function() { |
| 6422 return this.next(); | 6427 return this.next(); |
| 6423 }; | 6428 }; |
| 6429 // ********** Code for TokenizerHelpers ************** |
| 6430 function TokenizerHelpers() { |
| 6431 // Initializers done |
| 6432 } |
| 6433 TokenizerHelpers.isIdentifierStart = function(c) { |
| 6434 return ((c >= 97 && c <= 122) || (c >= 65 && c <= 90) || c == 95); |
| 6435 } |
| 6436 TokenizerHelpers.isDigit = function(c) { |
| 6437 return (c >= 48 && c <= 57); |
| 6438 } |
| 6439 TokenizerHelpers.isHexDigit = function(c) { |
| 6440 return (TokenizerHelpers.isDigit(c) || (c >= 97 && c <= 102) || (c >= 65 && c
<= 70)); |
| 6441 } |
| 6442 TokenizerHelpers.isIdentifierPart = function(c) { |
| 6443 return (TokenizerHelpers.isIdentifierStart(c) || TokenizerHelpers.isDigit(c) |
| c == 36); |
| 6444 } |
| 6445 TokenizerHelpers.isInterpIdentifierPart = function(c) { |
| 6446 return (TokenizerHelpers.isIdentifierStart(c) || TokenizerHelpers.isDigit(c)); |
| 6447 } |
| 6424 // ********** Code for TokenizerBase ************** | 6448 // ********** Code for TokenizerBase ************** |
| 6449 $inherits(TokenizerBase, TokenizerHelpers); |
| 6425 function TokenizerBase(_source, _skipWhitespace, index) { | 6450 function TokenizerBase(_source, _skipWhitespace, index) { |
| 6426 this._source = _source; | 6451 this._source = _source; |
| 6427 this._skipWhitespace = _skipWhitespace; | 6452 this._skipWhitespace = _skipWhitespace; |
| 6428 this._index = index; | 6453 this._lang_index = index; |
| 6429 // Initializers done | 6454 // Initializers done |
| 6430 TokenizerHelpers.call(this); | 6455 TokenizerHelpers.call(this); |
| 6431 this._text = this._source.get$text(); | 6456 this._text = this._source.get$text(); |
| 6432 } | 6457 } |
| 6433 $inherits(TokenizerBase, TokenizerHelpers); | |
| 6434 TokenizerBase.prototype._nextChar = function() { | 6458 TokenizerBase.prototype._nextChar = function() { |
| 6435 if (this._index < this._text.length) { | 6459 if (this._lang_index < this._text.length) { |
| 6436 return this._text.charCodeAt(this._index++); | 6460 return this._text.charCodeAt(this._lang_index++); |
| 6437 } | 6461 } |
| 6438 else { | 6462 else { |
| 6439 return 0; | 6463 return 0; |
| 6440 } | 6464 } |
| 6441 } | 6465 } |
| 6442 TokenizerBase.prototype._peekChar = function() { | 6466 TokenizerBase.prototype._peekChar = function() { |
| 6443 if (this._index < this._text.length) { | 6467 if (this._lang_index < this._text.length) { |
| 6444 return this._text.charCodeAt(this._index); | 6468 return this._text.charCodeAt(this._lang_index); |
| 6445 } | 6469 } |
| 6446 else { | 6470 else { |
| 6447 return 0; | 6471 return 0; |
| 6448 } | 6472 } |
| 6449 } | 6473 } |
| 6450 TokenizerBase.prototype._maybeEatChar = function(ch) { | 6474 TokenizerBase.prototype._maybeEatChar = function(ch) { |
| 6451 if (this._index < this._text.length) { | 6475 if (this._lang_index < this._text.length) { |
| 6452 if (this._text.charCodeAt(this._index) == ch) { | 6476 if (this._text.charCodeAt(this._lang_index) == ch) { |
| 6453 this._index++; | 6477 this._lang_index++; |
| 6454 return true; | 6478 return true; |
| 6455 } | 6479 } |
| 6456 else { | 6480 else { |
| 6457 return false; | 6481 return false; |
| 6458 } | 6482 } |
| 6459 } | 6483 } |
| 6460 else { | 6484 else { |
| 6461 return false; | 6485 return false; |
| 6462 } | 6486 } |
| 6463 } | 6487 } |
| 6464 TokenizerBase.prototype._finishToken = function(kind) { | 6488 TokenizerBase.prototype._finishToken = function(kind) { |
| 6465 return new Token(kind, this._source, this._startIndex, this._index); | 6489 return new Token(kind, this._source, this._startIndex, this._lang_index); |
| 6466 } | 6490 } |
| 6467 TokenizerBase.prototype._errorToken = function(message) { | 6491 TokenizerBase.prototype._errorToken = function(message) { |
| 6468 return new ErrorToken(65/*TokenKind.ERROR*/, this._source, this._startIndex, t
his._index, message); | 6492 return new ErrorToken(65/*TokenKind.ERROR*/, this._source, this._startIndex, t
his._lang_index, message); |
| 6469 } | 6493 } |
| 6470 TokenizerBase.prototype.finishWhitespace = function() { | 6494 TokenizerBase.prototype.finishWhitespace = function() { |
| 6471 this._index--; | 6495 this._lang_index--; |
| 6472 while (this._index < this._text.length) { | 6496 while (this._lang_index < this._text.length) { |
| 6473 var ch = this._text.charCodeAt(this._index++); | 6497 var ch = this._text.charCodeAt(this._lang_index++); |
| 6474 if (ch == 32 || ch == 9 || ch == 13) { | 6498 if (ch == 32 || ch == 9 || ch == 13) { |
| 6475 } | 6499 } |
| 6476 else if (ch == 10) { | 6500 else if (ch == 10) { |
| 6477 if (!this._skipWhitespace) { | 6501 if (!this._skipWhitespace) { |
| 6478 return this._finishToken(63/*TokenKind.WHITESPACE*/); | 6502 return this._finishToken(63/*TokenKind.WHITESPACE*/); |
| 6479 } | 6503 } |
| 6480 } | 6504 } |
| 6481 else { | 6505 else { |
| 6482 this._index--; | 6506 this._lang_index--; |
| 6483 if (this._skipWhitespace) { | 6507 if (this._skipWhitespace) { |
| 6484 return this.next(); | 6508 return this.next(); |
| 6485 } | 6509 } |
| 6486 else { | 6510 else { |
| 6487 return this._finishToken(63/*TokenKind.WHITESPACE*/); | 6511 return this._finishToken(63/*TokenKind.WHITESPACE*/); |
| 6488 } | 6512 } |
| 6489 } | 6513 } |
| 6490 } | 6514 } |
| 6491 return this._finishToken(1/*TokenKind.END_OF_FILE*/); | 6515 return this._finishToken(1/*TokenKind.END_OF_FILE*/); |
| 6492 } | 6516 } |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6524 } | 6548 } |
| 6525 else { | 6549 else { |
| 6526 return this._finishToken(64/*TokenKind.COMMENT*/); | 6550 return this._finishToken(64/*TokenKind.COMMENT*/); |
| 6527 } | 6551 } |
| 6528 } | 6552 } |
| 6529 } | 6553 } |
| 6530 } | 6554 } |
| 6531 return this._errorToken(); | 6555 return this._errorToken(); |
| 6532 } | 6556 } |
| 6533 TokenizerBase.prototype.eatDigits = function() { | 6557 TokenizerBase.prototype.eatDigits = function() { |
| 6534 while (this._index < this._text.length) { | 6558 while (this._lang_index < this._text.length) { |
| 6535 if (TokenizerHelpers.isDigit(this._text.charCodeAt(this._index))) { | 6559 if (TokenizerHelpers.isDigit(this._text.charCodeAt(this._lang_index))) { |
| 6536 this._index++; | 6560 this._lang_index++; |
| 6537 } | 6561 } |
| 6538 else { | 6562 else { |
| 6539 return; | 6563 return; |
| 6540 } | 6564 } |
| 6541 } | 6565 } |
| 6542 } | 6566 } |
| 6543 TokenizerBase.prototype.eatHexDigits = function() { | 6567 TokenizerBase.prototype.eatHexDigits = function() { |
| 6544 while (this._index < this._text.length) { | 6568 while (this._lang_index < this._text.length) { |
| 6545 if (TokenizerHelpers.isHexDigit(this._text.charCodeAt(this._index))) { | 6569 if (TokenizerHelpers.isHexDigit(this._text.charCodeAt(this._lang_index))) { |
| 6546 this._index++; | 6570 this._lang_index++; |
| 6547 } | 6571 } |
| 6548 else { | 6572 else { |
| 6549 return; | 6573 return; |
| 6550 } | 6574 } |
| 6551 } | 6575 } |
| 6552 } | 6576 } |
| 6553 TokenizerBase.prototype.maybeEatHexDigit = function() { | 6577 TokenizerBase.prototype.maybeEatHexDigit = function() { |
| 6554 if (this._index < this._text.length && TokenizerHelpers.isHexDigit(this._text.
charCodeAt(this._index))) { | 6578 if (this._lang_index < this._text.length && TokenizerHelpers.isHexDigit(this._
text.charCodeAt(this._lang_index))) { |
| 6555 this._index++; | 6579 this._lang_index++; |
| 6556 return true; | 6580 return true; |
| 6557 } | 6581 } |
| 6558 return false; | 6582 return false; |
| 6559 } | 6583 } |
| 6560 TokenizerBase.prototype.finishHex = function() { | 6584 TokenizerBase.prototype.finishHex = function() { |
| 6561 this.eatHexDigits(); | 6585 this.eatHexDigits(); |
| 6562 return this._finishToken(61/*TokenKind.HEX_INTEGER*/); | 6586 return this._finishToken(61/*TokenKind.HEX_INTEGER*/); |
| 6563 } | 6587 } |
| 6564 TokenizerBase.prototype.finishNumber = function() { | 6588 TokenizerBase.prototype.finishNumber = function() { |
| 6565 this.eatDigits(); | 6589 this.eatDigits(); |
| 6566 if (this._peekChar() == 46) { | 6590 if (this._peekChar() == 46) { |
| 6567 this._nextChar(); | 6591 this._nextChar(); |
| 6568 if (TokenizerHelpers.isDigit(this._peekChar())) { | 6592 if (TokenizerHelpers.isDigit(this._peekChar())) { |
| 6569 this.eatDigits(); | 6593 this.eatDigits(); |
| 6570 return this.finishNumberExtra(62/*TokenKind.DOUBLE*/); | 6594 return this.finishNumberExtra(62/*TokenKind.DOUBLE*/); |
| 6571 } | 6595 } |
| 6572 else { | 6596 else { |
| 6573 this._index--; | 6597 this._lang_index--; |
| 6574 } | 6598 } |
| 6575 } | 6599 } |
| 6576 return this.finishNumberExtra(60/*TokenKind.INTEGER*/); | 6600 return this.finishNumberExtra(60/*TokenKind.INTEGER*/); |
| 6577 } | 6601 } |
| 6578 TokenizerBase.prototype.finishNumberExtra = function(kind) { | 6602 TokenizerBase.prototype.finishNumberExtra = function(kind) { |
| 6579 if (this._maybeEatChar(101) || this._maybeEatChar(69)) { | 6603 if (this._maybeEatChar(101) || this._maybeEatChar(69)) { |
| 6580 kind = 62/*TokenKind.DOUBLE*/; | 6604 kind = 62/*TokenKind.DOUBLE*/; |
| 6581 this._maybeEatChar(45); | 6605 this._maybeEatChar(45); |
| 6582 this._maybeEatChar(43); | 6606 this._maybeEatChar(43); |
| 6583 this.eatDigits(); | 6607 this.eatDigits(); |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6697 TokenizerBase.prototype.eatEscapeSequence = function() { | 6721 TokenizerBase.prototype.eatEscapeSequence = function() { |
| 6698 var hex; | 6722 var hex; |
| 6699 switch (this._nextChar()) { | 6723 switch (this._nextChar()) { |
| 6700 case 120: | 6724 case 120: |
| 6701 | 6725 |
| 6702 return this.maybeEatHexDigit() && this.maybeEatHexDigit(); | 6726 return this.maybeEatHexDigit() && this.maybeEatHexDigit(); |
| 6703 | 6727 |
| 6704 case 117: | 6728 case 117: |
| 6705 | 6729 |
| 6706 if (this._maybeEatChar(123)) { | 6730 if (this._maybeEatChar(123)) { |
| 6707 var start = this._index; | 6731 var start = this._lang_index; |
| 6708 this.eatHexDigits(); | 6732 this.eatHexDigits(); |
| 6709 var chars = this._index - start; | 6733 var chars = this._lang_index - start; |
| 6710 if (chars > 0 && chars <= 6 && this._maybeEatChar(125)) { | 6734 if (chars > 0 && chars <= 6 && this._maybeEatChar(125)) { |
| 6711 hex = this._text.substring(start, start + chars); | 6735 hex = this._text.substring(start, start + chars); |
| 6712 break; | 6736 break; |
| 6713 } | 6737 } |
| 6714 else { | 6738 else { |
| 6715 return false; | 6739 return false; |
| 6716 } | 6740 } |
| 6717 } | 6741 } |
| 6718 else { | 6742 else { |
| 6719 if (this.maybeEatHexDigit() && this.maybeEatHexDigit() && this.maybeEatH
exDigit() && this.maybeEatHexDigit()) { | 6743 if (this.maybeEatHexDigit() && this.maybeEatHexDigit() && this.maybeEatH
exDigit() && this.maybeEatHexDigit()) { |
| 6720 hex = this._text.substring(this._index - 4, this._index); | 6744 hex = this._text.substring(this._lang_index - 4, this._lang_index); |
| 6721 break; | 6745 break; |
| 6722 } | 6746 } |
| 6723 else { | 6747 else { |
| 6724 return false; | 6748 return false; |
| 6725 } | 6749 } |
| 6726 } | 6750 } |
| 6727 | 6751 |
| 6728 default: | 6752 default: |
| 6729 | 6753 |
| 6730 return true; | 6754 return true; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 6741 else { | 6765 else { |
| 6742 return this._finishToken(14/*TokenKind.DOT*/); | 6766 return this._finishToken(14/*TokenKind.DOT*/); |
| 6743 } | 6767 } |
| 6744 } | 6768 } |
| 6745 TokenizerBase.prototype.finishIdentifier = function(ch) { | 6769 TokenizerBase.prototype.finishIdentifier = function(ch) { |
| 6746 if (this._interpStack != null && this._interpStack.depth == -1) { | 6770 if (this._interpStack != null && this._interpStack.depth == -1) { |
| 6747 this._interpStack.depth = 0; | 6771 this._interpStack.depth = 0; |
| 6748 if (ch == 36) { | 6772 if (ch == 36) { |
| 6749 return this._errorToken("illegal character after $ in string interpolation
"); | 6773 return this._errorToken("illegal character after $ in string interpolation
"); |
| 6750 } | 6774 } |
| 6751 while (this._index < this._text.length) { | 6775 while (this._lang_index < this._text.length) { |
| 6752 if (!TokenizerHelpers.isInterpIdentifierPart(this._text.charCodeAt(this._i
ndex++))) { | 6776 if (!TokenizerHelpers.isInterpIdentifierPart(this._text.charCodeAt(this._l
ang_index++))) { |
| 6753 this._index--; | 6777 this._lang_index--; |
| 6754 break; | 6778 break; |
| 6755 } | 6779 } |
| 6756 } | 6780 } |
| 6757 } | 6781 } |
| 6758 else { | 6782 else { |
| 6759 while (this._index < this._text.length) { | 6783 while (this._lang_index < this._text.length) { |
| 6760 if (!TokenizerHelpers.isIdentifierPart(this._text.charCodeAt(this._index++
))) { | 6784 if (!TokenizerHelpers.isIdentifierPart(this._text.charCodeAt(this._lang_in
dex++))) { |
| 6761 this._index--; | 6785 this._lang_index--; |
| 6762 break; | 6786 break; |
| 6763 } | 6787 } |
| 6764 } | 6788 } |
| 6765 } | 6789 } |
| 6766 var kind = this.getIdentifierKind(); | 6790 var kind = this.getIdentifierKind(); |
| 6767 if (kind == 70/*TokenKind.IDENTIFIER*/) { | 6791 if (kind == 70/*TokenKind.IDENTIFIER*/) { |
| 6768 return this._finishToken(70/*TokenKind.IDENTIFIER*/); | 6792 return this._finishToken(70/*TokenKind.IDENTIFIER*/); |
| 6769 } | 6793 } |
| 6770 else { | 6794 else { |
| 6771 return this._finishToken(kind); | 6795 return this._finishToken(kind); |
| 6772 } | 6796 } |
| 6773 } | 6797 } |
| 6774 TokenizerBase.prototype.next$0 = TokenizerBase.prototype.next; | 6798 TokenizerBase.prototype.next$0 = TokenizerBase.prototype.next; |
| 6775 // ********** Code for Tokenizer ************** | 6799 // ********** Code for Tokenizer ************** |
| 6800 $inherits(Tokenizer, TokenizerBase); |
| 6776 function Tokenizer(source, skipWhitespace, index) { | 6801 function Tokenizer(source, skipWhitespace, index) { |
| 6777 // Initializers done | 6802 // Initializers done |
| 6778 TokenizerBase.call(this, source, skipWhitespace, index); | 6803 TokenizerBase.call(this, source, skipWhitespace, index); |
| 6779 } | 6804 } |
| 6780 $inherits(Tokenizer, TokenizerBase); | |
| 6781 Tokenizer.prototype.next = function() { | 6805 Tokenizer.prototype.next = function() { |
| 6782 this._startIndex = this._index; | 6806 this._startIndex = this._lang_index; |
| 6783 if (this._interpStack != null && this._interpStack.depth == 0) { | 6807 if (this._interpStack != null && this._interpStack.depth == 0) { |
| 6784 var istack = this._interpStack; | 6808 var istack = this._interpStack; |
| 6785 this._interpStack = this._interpStack.pop(); | 6809 this._interpStack = this._interpStack.pop(); |
| 6786 if (istack.get$isMultiline()) { | 6810 if (istack.get$isMultiline()) { |
| 6787 return this.finishMultilineString(istack.get$quote()); | 6811 return this.finishMultilineString(istack.get$quote()); |
| 6788 } | 6812 } |
| 6789 else { | 6813 else { |
| 6790 return this.finishStringBody(istack.get$quote()); | 6814 return this.finishStringBody(istack.get$quote()); |
| 6791 } | 6815 } |
| 6792 } | 6816 } |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7107 return this.finishNumber(); | 7131 return this.finishNumber(); |
| 7108 } | 7132 } |
| 7109 else { | 7133 else { |
| 7110 return this._errorToken(); | 7134 return this._errorToken(); |
| 7111 } | 7135 } |
| 7112 | 7136 |
| 7113 } | 7137 } |
| 7114 } | 7138 } |
| 7115 Tokenizer.prototype.getIdentifierKind = function() { | 7139 Tokenizer.prototype.getIdentifierKind = function() { |
| 7116 var i0 = this._startIndex; | 7140 var i0 = this._startIndex; |
| 7117 switch (this._index - i0) { | 7141 switch (this._lang_index - i0) { |
| 7118 case 2: | 7142 case 2: |
| 7119 | 7143 |
| 7120 if (this._text.charCodeAt(i0) == 100) { | 7144 if (this._text.charCodeAt(i0) == 100) { |
| 7121 if (this._text.charCodeAt(i0 + 1) == 111) return 95/*TokenKind.DO*/; | 7145 if (this._text.charCodeAt(i0 + 1) == 111) return 95/*TokenKind.DO*/; |
| 7122 } | 7146 } |
| 7123 else if (this._text.charCodeAt(i0) == 105) { | 7147 else if (this._text.charCodeAt(i0) == 105) { |
| 7124 if (this._text.charCodeAt(i0 + 1) == 102) { | 7148 if (this._text.charCodeAt(i0 + 1) == 102) { |
| 7125 return 101/*TokenKind.IF*/; | 7149 return 101/*TokenKind.IF*/; |
| 7126 } | 7150 } |
| 7127 else if (this._text.charCodeAt(i0 + 1) == 110) { | 7151 else if (this._text.charCodeAt(i0 + 1) == 110) { |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7296 if (this._text.charCodeAt(i0) == 105 && this._text.charCodeAt(i0 + 1) == 1
09 && this._text.charCodeAt(i0 + 2) == 112 && this._text.charCodeAt(i0 + 3) == 1
08 && this._text.charCodeAt(i0 + 4) == 101 && this._text.charCodeAt(i0 + 5) == 1
09 && this._text.charCodeAt(i0 + 6) == 101 && this._text.charCodeAt(i0 + 7) == 1
10 && this._text.charCodeAt(i0 + 8) == 116 && this._text.charCodeAt(i0 + 9) == 1
15) return 77/*TokenKind.IMPLEMENTS*/; | 7320 if (this._text.charCodeAt(i0) == 105 && this._text.charCodeAt(i0 + 1) == 1
09 && this._text.charCodeAt(i0 + 2) == 112 && this._text.charCodeAt(i0 + 3) == 1
08 && this._text.charCodeAt(i0 + 4) == 101 && this._text.charCodeAt(i0 + 5) == 1
09 && this._text.charCodeAt(i0 + 6) == 101 && this._text.charCodeAt(i0 + 7) == 1
10 && this._text.charCodeAt(i0 + 8) == 116 && this._text.charCodeAt(i0 + 9) == 1
15) return 77/*TokenKind.IMPLEMENTS*/; |
| 7297 return 70/*TokenKind.IDENTIFIER*/; | 7321 return 70/*TokenKind.IDENTIFIER*/; |
| 7298 | 7322 |
| 7299 default: | 7323 default: |
| 7300 | 7324 |
| 7301 return 70/*TokenKind.IDENTIFIER*/; | 7325 return 70/*TokenKind.IDENTIFIER*/; |
| 7302 | 7326 |
| 7303 } | 7327 } |
| 7304 } | 7328 } |
| 7305 Tokenizer.prototype.next$0 = Tokenizer.prototype.next; | 7329 Tokenizer.prototype.next$0 = Tokenizer.prototype.next; |
| 7306 // ********** Code for TokenizerHelpers ************** | |
| 7307 function TokenizerHelpers() { | |
| 7308 // Initializers done | |
| 7309 } | |
| 7310 TokenizerHelpers.isIdentifierStart = function(c) { | |
| 7311 return ((c >= 97 && c <= 122) || (c >= 65 && c <= 90) || c == 95); | |
| 7312 } | |
| 7313 TokenizerHelpers.isDigit = function(c) { | |
| 7314 return (c >= 48 && c <= 57); | |
| 7315 } | |
| 7316 TokenizerHelpers.isHexDigit = function(c) { | |
| 7317 return (TokenizerHelpers.isDigit(c) || (c >= 97 && c <= 102) || (c >= 65 && c
<= 70)); | |
| 7318 } | |
| 7319 TokenizerHelpers.isIdentifierPart = function(c) { | |
| 7320 return (TokenizerHelpers.isIdentifierStart(c) || TokenizerHelpers.isDigit(c) |
| c == 36); | |
| 7321 } | |
| 7322 TokenizerHelpers.isInterpIdentifierPart = function(c) { | |
| 7323 return (TokenizerHelpers.isIdentifierStart(c) || TokenizerHelpers.isDigit(c)); | |
| 7324 } | |
| 7325 // ********** Code for TokenKind ************** | 7330 // ********** Code for TokenKind ************** |
| 7326 function TokenKind() {} | 7331 function TokenKind() {} |
| 7327 TokenKind.kindToString = function(kind) { | 7332 TokenKind.kindToString = function(kind) { |
| 7328 switch (kind) { | 7333 switch (kind) { |
| 7329 case 1/*TokenKind.END_OF_FILE*/: | 7334 case 1/*TokenKind.END_OF_FILE*/: |
| 7330 | 7335 |
| 7331 return "end of file"; | 7336 return "end of file"; |
| 7332 | 7337 |
| 7333 case 2/*TokenKind.LPAREN*/: | 7338 case 2/*TokenKind.LPAREN*/: |
| 7334 | 7339 |
| (...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8145 this._afterParens = []; | 8150 this._afterParens = []; |
| 8146 } | 8151 } |
| 8147 Parser.prototype.get$enableAwait = function() { | 8152 Parser.prototype.get$enableAwait = function() { |
| 8148 return $globals.experimentalAwaitPhase != null; | 8153 return $globals.experimentalAwaitPhase != null; |
| 8149 } | 8154 } |
| 8150 Parser.prototype.isPrematureEndOfFile = function() { | 8155 Parser.prototype.isPrematureEndOfFile = function() { |
| 8151 if (this.throwOnIncomplete && this._maybeEat(1/*TokenKind.END_OF_FILE*/) || th
is._maybeEat(68/*TokenKind.INCOMPLETE_MULTILINE_STRING_DQ*/) || this._maybeEat(6
9/*TokenKind.INCOMPLETE_MULTILINE_STRING_SQ*/)) { | 8156 if (this.throwOnIncomplete && this._maybeEat(1/*TokenKind.END_OF_FILE*/) || th
is._maybeEat(68/*TokenKind.INCOMPLETE_MULTILINE_STRING_DQ*/) || this._maybeEat(6
9/*TokenKind.INCOMPLETE_MULTILINE_STRING_SQ*/)) { |
| 8152 $throw(new IncompleteSourceException(this._previousToken)); | 8157 $throw(new IncompleteSourceException(this._previousToken)); |
| 8153 } | 8158 } |
| 8154 else if (this._maybeEat(1/*TokenKind.END_OF_FILE*/)) { | 8159 else if (this._maybeEat(1/*TokenKind.END_OF_FILE*/)) { |
| 8155 this._error('unexpected end of file', this._peekToken.get$span()); | 8160 this._lang_error('unexpected end of file', this._peekToken.get$span()); |
| 8156 return true; | 8161 return true; |
| 8157 } | 8162 } |
| 8158 else { | 8163 else { |
| 8159 return false; | 8164 return false; |
| 8160 } | 8165 } |
| 8161 } | 8166 } |
| 8162 Parser.prototype._recoverTo = function(kind1, kind2, kind3) { | 8167 Parser.prototype._recoverTo = function(kind1, kind2, kind3) { |
| 8163 while (!this.isPrematureEndOfFile()) { | 8168 while (!this.isPrematureEndOfFile()) { |
| 8164 var kind = this._peek(); | 8169 var kind = this._peek(); |
| 8165 if (kind == kind1 || kind == kind2 || kind == kind3) { | 8170 if (kind == kind1 || kind == kind2 || kind == kind3) { |
| 8166 this._recover = false; | 8171 this._recover = false; |
| 8167 return true; | 8172 return true; |
| 8168 } | 8173 } |
| 8169 this._next(); | 8174 this._lang_next(); |
| 8170 } | 8175 } |
| 8171 return false; | 8176 return false; |
| 8172 } | 8177 } |
| 8173 Parser.prototype._peek = function() { | 8178 Parser.prototype._peek = function() { |
| 8174 return this._peekToken.kind; | 8179 return this._peekToken.kind; |
| 8175 } | 8180 } |
| 8176 Parser.prototype._next = function() { | 8181 Parser.prototype._lang_next = function() { |
| 8177 this._previousToken = this._peekToken; | 8182 this._previousToken = this._peekToken; |
| 8178 this._peekToken = this.tokenizer.next(); | 8183 this._peekToken = this.tokenizer.next(); |
| 8179 return this._previousToken; | 8184 return this._previousToken; |
| 8180 } | 8185 } |
| 8181 Parser.prototype._peekKind = function(kind) { | 8186 Parser.prototype._peekKind = function(kind) { |
| 8182 return this._peekToken.kind == kind; | 8187 return this._peekToken.kind == kind; |
| 8183 } | 8188 } |
| 8184 Parser.prototype._peekIdentifier = function() { | 8189 Parser.prototype._peekIdentifier = function() { |
| 8185 return this._isIdentifier(this._peekToken.kind); | 8190 return this._isIdentifier(this._peekToken.kind); |
| 8186 } | 8191 } |
| (...skipping 14 matching lines...) Expand all Loading... |
| 8201 if (!this._maybeEat(kind)) { | 8206 if (!this._maybeEat(kind)) { |
| 8202 this._errorExpected(TokenKind.kindToString(kind)); | 8207 this._errorExpected(TokenKind.kindToString(kind)); |
| 8203 } | 8208 } |
| 8204 } | 8209 } |
| 8205 Parser.prototype._eatSemicolon = function() { | 8210 Parser.prototype._eatSemicolon = function() { |
| 8206 if (this.optionalSemicolons && this._peekKind(1/*TokenKind.END_OF_FILE*/)) ret
urn; | 8211 if (this.optionalSemicolons && this._peekKind(1/*TokenKind.END_OF_FILE*/)) ret
urn; |
| 8207 this._eat(10/*TokenKind.SEMICOLON*/); | 8212 this._eat(10/*TokenKind.SEMICOLON*/); |
| 8208 } | 8213 } |
| 8209 Parser.prototype._errorExpected = function(expected) { | 8214 Parser.prototype._errorExpected = function(expected) { |
| 8210 if (this.throwOnIncomplete) this.isPrematureEndOfFile(); | 8215 if (this.throwOnIncomplete) this.isPrematureEndOfFile(); |
| 8211 var tok = this._next(); | 8216 var tok = this._lang_next(); |
| 8212 if ((tok instanceof ErrorToken) && tok.get$message() != null) { | 8217 if ((tok instanceof ErrorToken) && tok.get$message() != null) { |
| 8213 this._error(tok.get$message(), tok.get$span()); | 8218 this._lang_error(tok.get$message(), tok.get$span()); |
| 8214 } | 8219 } |
| 8215 else { | 8220 else { |
| 8216 this._error(('expected ' + expected + ', but found ' + tok), tok.get$span())
; | 8221 this._lang_error(('expected ' + expected + ', but found ' + tok), tok.get$sp
an()); |
| 8217 } | 8222 } |
| 8218 } | 8223 } |
| 8219 Parser.prototype._error = function(message, location) { | 8224 Parser.prototype._lang_error = function(message, location) { |
| 8220 if (this._recover) return; | 8225 if (this._recover) return; |
| 8221 if (location == null) { | 8226 if (location == null) { |
| 8222 location = this._peekToken.get$span(); | 8227 location = this._peekToken.get$span(); |
| 8223 } | 8228 } |
| 8224 $globals.world.fatal(message, location); | 8229 $globals.world.fatal(message, location); |
| 8225 this._recover = true; | 8230 this._recover = true; |
| 8226 } | 8231 } |
| 8227 Parser.prototype._skipBlock = function() { | 8232 Parser.prototype._skipBlock = function() { |
| 8228 var depth = 1; | 8233 var depth = 1; |
| 8229 this._eat(6/*TokenKind.LBRACE*/); | 8234 this._eat(6/*TokenKind.LBRACE*/); |
| 8230 while (true) { | 8235 while (true) { |
| 8231 var tok = this._next(); | 8236 var tok = this._lang_next(); |
| 8232 if ($eq(tok.get$kind(), 6/*TokenKind.LBRACE*/)) { | 8237 if ($eq(tok.get$kind(), 6/*TokenKind.LBRACE*/)) { |
| 8233 depth += 1; | 8238 depth += 1; |
| 8234 } | 8239 } |
| 8235 else if ($eq(tok.get$kind(), 7/*TokenKind.RBRACE*/)) { | 8240 else if ($eq(tok.get$kind(), 7/*TokenKind.RBRACE*/)) { |
| 8236 depth -= 1; | 8241 depth -= 1; |
| 8237 if (depth == 0) return; | 8242 if (depth == 0) return; |
| 8238 } | 8243 } |
| 8239 else if ($eq(tok.get$kind(), 1/*TokenKind.END_OF_FILE*/)) { | 8244 else if ($eq(tok.get$kind(), 1/*TokenKind.END_OF_FILE*/)) { |
| 8240 this._error('unexpected end of file during diet parse', tok.get$span()); | 8245 this._lang_error('unexpected end of file during diet parse', tok.get$span(
)); |
| 8241 return; | 8246 return; |
| 8242 } | 8247 } |
| 8243 } | 8248 } |
| 8244 } | 8249 } |
| 8245 Parser.prototype._makeSpan = function(start) { | 8250 Parser.prototype._makeSpan = function(start) { |
| 8246 return new SourceSpan(this.source, start, this._previousToken.end); | 8251 return new SourceSpan(this.source, start, this._previousToken.end); |
| 8247 } | 8252 } |
| 8248 Parser.prototype.compilationUnit = function() { | 8253 Parser.prototype.compilationUnit = function() { |
| 8249 var ret = []; | 8254 var ret = []; |
| 8250 this._maybeEat(13/*TokenKind.HASHBANG*/); | 8255 this._maybeEat(13/*TokenKind.HASHBANG*/); |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8371 } | 8376 } |
| 8372 else { | 8377 else { |
| 8373 return this.block(); | 8378 return this.block(); |
| 8374 } | 8379 } |
| 8375 } | 8380 } |
| 8376 else if (!inExpression) { | 8381 else if (!inExpression) { |
| 8377 if (this._maybeEat(10/*TokenKind.SEMICOLON*/)) { | 8382 if (this._maybeEat(10/*TokenKind.SEMICOLON*/)) { |
| 8378 return null; | 8383 return null; |
| 8379 } | 8384 } |
| 8380 } | 8385 } |
| 8381 this._error('Expected function body (neither { nor => found)'); | 8386 this._lang_error('Expected function body (neither { nor => found)'); |
| 8382 } | 8387 } |
| 8383 Parser.prototype.finishField = function(start, modifiers, typeParams, type, name
, value) { | 8388 Parser.prototype.finishField = function(start, modifiers, typeParams, type, name
, value) { |
| 8384 if (typeParams != null) { | 8389 if (typeParams != null) { |
| 8385 $globals.world.internalError('trying to create a generic field', this._makeS
pan(start)); | 8390 $globals.world.internalError('trying to create a generic field', this._makeS
pan(start)); |
| 8386 } | 8391 } |
| 8387 var names = [name]; | 8392 var names = [name]; |
| 8388 var values = [value]; | 8393 var values = [value]; |
| 8389 while (this._maybeEat(11/*TokenKind.COMMA*/)) { | 8394 while (this._maybeEat(11/*TokenKind.COMMA*/)) { |
| 8390 names.add$1(this.identifier()); | 8395 names.add$1(this.identifier()); |
| 8391 if (this._maybeEat(20/*TokenKind.ASSIGN*/)) { | 8396 if (this._maybeEat(20/*TokenKind.ASSIGN*/)) { |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8438 Parser.prototype.declaration = function(includeOperators) { | 8443 Parser.prototype.declaration = function(includeOperators) { |
| 8439 var start = this._peekToken.start; | 8444 var start = this._peekToken.start; |
| 8440 if (this._peekKind(75/*TokenKind.FACTORY*/)) { | 8445 if (this._peekKind(75/*TokenKind.FACTORY*/)) { |
| 8441 return this.factoryConstructorDeclaration(); | 8446 return this.factoryConstructorDeclaration(); |
| 8442 } | 8447 } |
| 8443 var modifiers = this._readModifiers(); | 8448 var modifiers = this._readModifiers(); |
| 8444 return this.finishDefinition(start, modifiers, this.declaredIdentifier(include
Operators), null); | 8449 return this.finishDefinition(start, modifiers, this.declaredIdentifier(include
Operators), null); |
| 8445 } | 8450 } |
| 8446 Parser.prototype.factoryConstructorDeclaration = function() { | 8451 Parser.prototype.factoryConstructorDeclaration = function() { |
| 8447 var start = this._peekToken.start; | 8452 var start = this._peekToken.start; |
| 8448 var factoryToken = this._next(); | 8453 var factoryToken = this._lang_next(); |
| 8449 var names = [this.identifier()]; | 8454 var names = [this.identifier()]; |
| 8450 while (this._maybeEat(14/*TokenKind.DOT*/)) { | 8455 while (this._maybeEat(14/*TokenKind.DOT*/)) { |
| 8451 names.add$1(this.identifier()); | 8456 names.add$1(this.identifier()); |
| 8452 } | 8457 } |
| 8453 var typeParams = null; | 8458 var typeParams = null; |
| 8454 if (this._peekKind(52/*TokenKind.LT*/)) { | 8459 if (this._peekKind(52/*TokenKind.LT*/)) { |
| 8455 typeParams = this.typeParameters(); | 8460 typeParams = this.typeParameters(); |
| 8456 } | 8461 } |
| 8457 var name = null; | 8462 var name = null; |
| 8458 var type = null; | 8463 var type = null; |
| 8459 if (this._maybeEat(14/*TokenKind.DOT*/)) { | 8464 if (this._maybeEat(14/*TokenKind.DOT*/)) { |
| 8460 name = this.identifier(); | 8465 name = this.identifier(); |
| 8461 } | 8466 } |
| 8462 else if (typeParams == null) { | 8467 else if (typeParams == null) { |
| 8463 if (names.length > 1) { | 8468 if (names.length > 1) { |
| 8464 name = names.removeLast$0(); | 8469 name = names.removeLast$0(); |
| 8465 } | 8470 } |
| 8466 else { | 8471 else { |
| 8467 name = new Identifier('', names.$index(0).get$span()); | 8472 name = new Identifier('', names.$index(0).get$span()); |
| 8468 } | 8473 } |
| 8469 } | 8474 } |
| 8470 else { | 8475 else { |
| 8471 name = new Identifier('', names.$index(0).get$span()); | 8476 name = new Identifier('', names.$index(0).get$span()); |
| 8472 } | 8477 } |
| 8473 if (names.length > 1) { | 8478 if (names.length > 1) { |
| 8474 this._error('unsupported qualified name for factory', names.$index(0).get$sp
an()); | 8479 this._lang_error('unsupported qualified name for factory', names.$index(0).g
et$span()); |
| 8475 } | 8480 } |
| 8476 type = new NameTypeReference(false, names.$index(0), null, names.$index(0).get
$span()); | 8481 type = new NameTypeReference(false, names.$index(0), null, names.$index(0).get
$span()); |
| 8477 var di = new DeclaredIdentifier(type, name, this._makeSpan(start)); | 8482 var di = new DeclaredIdentifier(type, name, this._makeSpan(start)); |
| 8478 return this.finishDefinition(start, [factoryToken], di, typeParams); | 8483 return this.finishDefinition(start, [factoryToken], di, typeParams); |
| 8479 } | 8484 } |
| 8480 Parser.prototype.statement = function() { | 8485 Parser.prototype.statement = function() { |
| 8481 switch (this._peek()) { | 8486 switch (this._peek()) { |
| 8482 case 89/*TokenKind.BREAK*/: | 8487 case 89/*TokenKind.BREAK*/: |
| 8483 | 8488 |
| 8484 return this.breakStatement(); | 8489 return this.breakStatement(); |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8743 } | 8748 } |
| 8744 else if (this._maybeEat(94/*TokenKind.DEFAULT*/)) { | 8749 else if (this._maybeEat(94/*TokenKind.DEFAULT*/)) { |
| 8745 cases.add$1(); | 8750 cases.add$1(); |
| 8746 this._eat(8/*TokenKind.COLON*/); | 8751 this._eat(8/*TokenKind.COLON*/); |
| 8747 } | 8752 } |
| 8748 else { | 8753 else { |
| 8749 break; | 8754 break; |
| 8750 } | 8755 } |
| 8751 } | 8756 } |
| 8752 if ($eq(cases.length, 0)) { | 8757 if ($eq(cases.length, 0)) { |
| 8753 this._error('case or default'); | 8758 this._lang_error('case or default'); |
| 8754 } | 8759 } |
| 8755 var stmts = []; | 8760 var stmts = []; |
| 8756 while (!this._peekCaseEnd()) { | 8761 while (!this._peekCaseEnd()) { |
| 8757 stmts.add$1(this.statement()); | 8762 stmts.add$1(this.statement()); |
| 8758 if (this._recover && !this._recoverTo(7/*TokenKind.RBRACE*/, 90/*TokenKind.C
ASE*/, 94/*TokenKind.DEFAULT*/)) { | 8763 if (this._recover && !this._recoverTo(7/*TokenKind.RBRACE*/, 90/*TokenKind.C
ASE*/, 94/*TokenKind.DEFAULT*/)) { |
| 8759 break; | 8764 break; |
| 8760 } | 8765 } |
| 8761 } | 8766 } |
| 8762 return new CaseNode(label, cases, stmts, this._makeSpan(start)); | 8767 return new CaseNode(label, cases, stmts, this._makeSpan(start)); |
| 8763 } | 8768 } |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8828 if (type.get$names() == null) { | 8833 if (type.get$names() == null) { |
| 8829 type.set$names([expr.get$name()]); | 8834 type.set$names([expr.get$name()]); |
| 8830 } | 8835 } |
| 8831 else { | 8836 else { |
| 8832 type.get$names().add$1(expr.get$name()); | 8837 type.get$names().add$1(expr.get$name()); |
| 8833 } | 8838 } |
| 8834 type.set$span(expr.get$span()); | 8839 type.set$span(expr.get$span()); |
| 8835 return type; | 8840 return type; |
| 8836 } | 8841 } |
| 8837 else { | 8842 else { |
| 8838 this._error('expected type reference'); | 8843 this._lang_error('expected type reference'); |
| 8839 return null; | 8844 return null; |
| 8840 } | 8845 } |
| 8841 } | 8846 } |
| 8842 Parser.prototype.infixExpression = function(precedence) { | 8847 Parser.prototype.infixExpression = function(precedence) { |
| 8843 return this.finishInfixExpression(this.unaryExpression(), precedence); | 8848 return this.finishInfixExpression(this.unaryExpression(), precedence); |
| 8844 } | 8849 } |
| 8845 Parser.prototype._finishDeclaredId = function(type) { | 8850 Parser.prototype._finishDeclaredId = function(type) { |
| 8846 var name = this.identifier(); | 8851 var name = this.identifier(); |
| 8847 return this.finishPostfixExpression(new DeclaredIdentifier(type, name, this._m
akeSpan(type.get$span().get$start()))); | 8852 return this.finishPostfixExpression(new DeclaredIdentifier(type, name, this._m
akeSpan(type.get$span().get$start()))); |
| 8848 } | 8853 } |
| (...skipping 25 matching lines...) Expand all Loading... |
| 8874 Parser.prototype.finishInfixExpression = function(x, precedence) { | 8879 Parser.prototype.finishInfixExpression = function(x, precedence) { |
| 8875 while (true) { | 8880 while (true) { |
| 8876 var kind = this._peek(); | 8881 var kind = this._peek(); |
| 8877 var prec = TokenKind.infixPrecedence(this._peek()); | 8882 var prec = TokenKind.infixPrecedence(this._peek()); |
| 8878 if (prec >= precedence) { | 8883 if (prec >= precedence) { |
| 8879 if (kind == 52/*TokenKind.LT*/ || kind == 53/*TokenKind.GT*/) { | 8884 if (kind == 52/*TokenKind.LT*/ || kind == 53/*TokenKind.GT*/) { |
| 8880 if (this._isBin(x, 52/*TokenKind.LT*/)) { | 8885 if (this._isBin(x, 52/*TokenKind.LT*/)) { |
| 8881 return this._fixAsType(x); | 8886 return this._fixAsType(x); |
| 8882 } | 8887 } |
| 8883 } | 8888 } |
| 8884 var op = this._next(); | 8889 var op = this._lang_next(); |
| 8885 if ($eq(op.get$kind(), 103/*TokenKind.IS*/)) { | 8890 if ($eq(op.get$kind(), 103/*TokenKind.IS*/)) { |
| 8886 var isTrue = !this._maybeEat(19/*TokenKind.NOT*/); | 8891 var isTrue = !this._maybeEat(19/*TokenKind.NOT*/); |
| 8887 var typeRef = this.type(0); | 8892 var typeRef = this.type(0); |
| 8888 x = new IsExpression(isTrue, x, typeRef, this._makeSpan(x.span.start)); | 8893 x = new IsExpression(isTrue, x, typeRef, this._makeSpan(x.span.start)); |
| 8889 continue; | 8894 continue; |
| 8890 } | 8895 } |
| 8891 var y = this.infixExpression($eq(prec, 2) ? prec : prec + 1); | 8896 var y = this.infixExpression($eq(prec, 2) ? prec : prec + 1); |
| 8892 if ($eq(op.get$kind(), 33/*TokenKind.CONDITIONAL*/)) { | 8897 if ($eq(op.get$kind(), 33/*TokenKind.CONDITIONAL*/)) { |
| 8893 this._eat(8/*TokenKind.COLON*/); | 8898 this._eat(8/*TokenKind.COLON*/); |
| 8894 var z = this.infixExpression(prec); | 8899 var z = this.infixExpression(prec); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 8917 | 8922 |
| 8918 default: | 8923 default: |
| 8919 | 8924 |
| 8920 return false; | 8925 return false; |
| 8921 | 8926 |
| 8922 } | 8927 } |
| 8923 } | 8928 } |
| 8924 Parser.prototype.unaryExpression = function() { | 8929 Parser.prototype.unaryExpression = function() { |
| 8925 var start = this._peekToken.start; | 8930 var start = this._peekToken.start; |
| 8926 if (this._isPrefixUnaryOperator(this._peek())) { | 8931 if (this._isPrefixUnaryOperator(this._peek())) { |
| 8927 var tok = this._next(); | 8932 var tok = this._lang_next(); |
| 8928 var expr = this.unaryExpression(); | 8933 var expr = this.unaryExpression(); |
| 8929 return new UnaryExpression(tok, expr, this._makeSpan(start)); | 8934 return new UnaryExpression(tok, expr, this._makeSpan(start)); |
| 8930 } | 8935 } |
| 8931 else if (this.get$enableAwait() && this._maybeEat(88/*TokenKind.AWAIT*/)) { | 8936 else if (this.get$enableAwait() && this._maybeEat(88/*TokenKind.AWAIT*/)) { |
| 8932 var expr = this.unaryExpression(); | 8937 var expr = this.unaryExpression(); |
| 8933 return new AwaitExpression(expr, this._makeSpan(start)); | 8938 return new AwaitExpression(expr, this._makeSpan(start)); |
| 8934 } | 8939 } |
| 8935 return this.finishPostfixExpression(this.primary()); | 8940 return this.finishPostfixExpression(this.primary()); |
| 8936 } | 8941 } |
| 8937 Parser.prototype.argument = function() { | 8942 Parser.prototype.argument = function() { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8982 case 14/*TokenKind.DOT*/: | 8987 case 14/*TokenKind.DOT*/: |
| 8983 | 8988 |
| 8984 this._eat(14/*TokenKind.DOT*/); | 8989 this._eat(14/*TokenKind.DOT*/); |
| 8985 var name = this.identifier(); | 8990 var name = this.identifier(); |
| 8986 var ret = new DotExpression(expr, name, this._makeSpan(expr.get$span().get
$start())); | 8991 var ret = new DotExpression(expr, name, this._makeSpan(expr.get$span().get
$start())); |
| 8987 return this.finishPostfixExpression(ret); | 8992 return this.finishPostfixExpression(ret); |
| 8988 | 8993 |
| 8989 case 16/*TokenKind.INCR*/: | 8994 case 16/*TokenKind.INCR*/: |
| 8990 case 17/*TokenKind.DECR*/: | 8995 case 17/*TokenKind.DECR*/: |
| 8991 | 8996 |
| 8992 var tok = this._next(); | 8997 var tok = this._lang_next(); |
| 8993 return new PostfixExpression(expr, tok, this._makeSpan(expr.get$span().get
$start())); | 8998 return new PostfixExpression(expr, tok, this._makeSpan(expr.get$span().get
$start())); |
| 8994 | 8999 |
| 8995 case 9/*TokenKind.ARROW*/: | 9000 case 9/*TokenKind.ARROW*/: |
| 8996 case 6/*TokenKind.LBRACE*/: | 9001 case 6/*TokenKind.LBRACE*/: |
| 8997 | 9002 |
| 8998 return expr; | 9003 return expr; |
| 8999 | 9004 |
| 9000 default: | 9005 default: |
| 9001 | 9006 |
| 9002 if (this._peekIdentifier()) { | 9007 if (this._peekIdentifier()) { |
| 9003 return this.finishPostfixExpression(new DeclaredIdentifier(this._makeTyp
e(expr), this.identifier(), this._makeSpan(expr.get$span().get$start()))); | 9008 return this.finishPostfixExpression(new DeclaredIdentifier(this._makeTyp
e(expr), this.identifier(), this._makeSpan(expr.get$span().get$start()))); |
| 9004 } | 9009 } |
| 9005 else { | 9010 else { |
| 9006 return expr; | 9011 return expr; |
| 9007 } | 9012 } |
| 9008 | 9013 |
| 9009 } | 9014 } |
| 9010 } | 9015 } |
| 9011 Parser.prototype.finishCallOrLambdaExpression = function(expr) { | 9016 Parser.prototype.finishCallOrLambdaExpression = function(expr) { |
| 9012 if (this._atClosureParameters()) { | 9017 if (this._atClosureParameters()) { |
| 9013 var formals = this.formalParameterList(); | 9018 var formals = this.formalParameterList(); |
| 9014 var body = this.functionBody(true); | 9019 var body = this.functionBody(true); |
| 9015 return this._makeFunction(expr, formals, body); | 9020 return this._makeFunction(expr, formals, body); |
| 9016 } | 9021 } |
| 9017 else { | 9022 else { |
| 9018 if ((expr instanceof DeclaredIdentifier)) { | 9023 if ((expr instanceof DeclaredIdentifier)) { |
| 9019 this._error('illegal target for call, did you mean to declare a function?'
, expr.get$span()); | 9024 this._lang_error('illegal target for call, did you mean to declare a funct
ion?', expr.get$span()); |
| 9020 } | 9025 } |
| 9021 var args = this.arguments(); | 9026 var args = this.arguments(); |
| 9022 return this.finishPostfixExpression(new CallExpression(expr, args, this._mak
eSpan(expr.get$span().get$start()))); | 9027 return this.finishPostfixExpression(new CallExpression(expr, args, this._mak
eSpan(expr.get$span().get$start()))); |
| 9023 } | 9028 } |
| 9024 } | 9029 } |
| 9025 Parser.prototype._isBin = function(expr, kind) { | 9030 Parser.prototype._isBin = function(expr, kind) { |
| 9026 return (expr instanceof BinaryExpression) && $eq(expr.get$op().get$kind(), kin
d); | 9031 return (expr instanceof BinaryExpression) && $eq(expr.get$op().get$kind(), kin
d); |
| 9027 } | 9032 } |
| 9028 Parser.prototype._boolTypeRef = function(span) { | 9033 Parser.prototype._boolTypeRef = function(span) { |
| 9029 return new TypeReference(span, $globals.world.nonNullBool); | 9034 return new TypeReference(span, $globals.world.nonNullBool); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9094 this._eat(111/*TokenKind.TRUE*/); | 9099 this._eat(111/*TokenKind.TRUE*/); |
| 9095 return new LiteralExpression(true, this._boolTypeRef(this._makeSpan(start)
), 'true', this._makeSpan(start)); | 9100 return new LiteralExpression(true, this._boolTypeRef(this._makeSpan(start)
), 'true', this._makeSpan(start)); |
| 9096 | 9101 |
| 9097 case 97/*TokenKind.FALSE*/: | 9102 case 97/*TokenKind.FALSE*/: |
| 9098 | 9103 |
| 9099 this._eat(97/*TokenKind.FALSE*/); | 9104 this._eat(97/*TokenKind.FALSE*/); |
| 9100 return new LiteralExpression(false, this._boolTypeRef(this._makeSpan(start
)), 'false', this._makeSpan(start)); | 9105 return new LiteralExpression(false, this._boolTypeRef(this._makeSpan(start
)), 'false', this._makeSpan(start)); |
| 9101 | 9106 |
| 9102 case 61/*TokenKind.HEX_INTEGER*/: | 9107 case 61/*TokenKind.HEX_INTEGER*/: |
| 9103 | 9108 |
| 9104 var t = this._next(); | 9109 var t = this._lang_next(); |
| 9105 return new LiteralExpression(Parser.parseHex(t.get$text().substring$1(2)),
this._intTypeRef(this._makeSpan(start)), t.get$text(), this._makeSpan(start)); | 9110 return new LiteralExpression(Parser.parseHex(t.get$text().substring$1(2)),
this._intTypeRef(this._makeSpan(start)), t.get$text(), this._makeSpan(start)); |
| 9106 | 9111 |
| 9107 case 60/*TokenKind.INTEGER*/: | 9112 case 60/*TokenKind.INTEGER*/: |
| 9108 | 9113 |
| 9109 var t = this._next(); | 9114 var t = this._lang_next(); |
| 9110 return new LiteralExpression(Math.parseInt(t.get$text()), this._intTypeRef
(this._makeSpan(start)), t.get$text(), this._makeSpan(start)); | 9115 return new LiteralExpression(Math.parseInt(t.get$text()), this._intTypeRef
(this._makeSpan(start)), t.get$text(), this._makeSpan(start)); |
| 9111 | 9116 |
| 9112 case 62/*TokenKind.DOUBLE*/: | 9117 case 62/*TokenKind.DOUBLE*/: |
| 9113 | 9118 |
| 9114 var t = this._next(); | 9119 var t = this._lang_next(); |
| 9115 return new LiteralExpression(Math.parseDouble(t.get$text()), this._doubleT
ypeRef(this._makeSpan(start)), t.get$text(), this._makeSpan(start)); | 9120 return new LiteralExpression(Math.parseDouble(t.get$text()), this._doubleT
ypeRef(this._makeSpan(start)), t.get$text(), this._makeSpan(start)); |
| 9116 | 9121 |
| 9117 case 58/*TokenKind.STRING*/: | 9122 case 58/*TokenKind.STRING*/: |
| 9118 | 9123 |
| 9119 return this.stringLiteralExpr(); | 9124 return this.stringLiteralExpr(); |
| 9120 | 9125 |
| 9121 case 66/*TokenKind.INCOMPLETE_STRING*/: | 9126 case 66/*TokenKind.INCOMPLETE_STRING*/: |
| 9122 | 9127 |
| 9123 return this.stringInterpolation(); | 9128 return this.stringInterpolation(); |
| 9124 | 9129 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 9139 } | 9144 } |
| 9140 return new VarExpression(this.identifier(), this._makeSpan(start)); | 9145 return new VarExpression(this.identifier(), this._makeSpan(start)); |
| 9141 | 9146 |
| 9142 } | 9147 } |
| 9143 } | 9148 } |
| 9144 Parser.prototype.stringInterpolation = function() { | 9149 Parser.prototype.stringInterpolation = function() { |
| 9145 var start = this._peekToken.start; | 9150 var start = this._peekToken.start; |
| 9146 var lits = []; | 9151 var lits = []; |
| 9147 var startQuote = null, endQuote = null; | 9152 var startQuote = null, endQuote = null; |
| 9148 while (this._peekKind(66/*TokenKind.INCOMPLETE_STRING*/)) { | 9153 while (this._peekKind(66/*TokenKind.INCOMPLETE_STRING*/)) { |
| 9149 var token = this._next(); | 9154 var token = this._lang_next(); |
| 9150 var text = token.get$text(); | 9155 var text = token.get$text(); |
| 9151 if (startQuote == null) { | 9156 if (startQuote == null) { |
| 9152 if (isMultilineString(text)) { | 9157 if (isMultilineString(text)) { |
| 9153 endQuote = text.substring$2(0, 3); | 9158 endQuote = text.substring$2(0, 3); |
| 9154 startQuote = endQuote + '\n'; | 9159 startQuote = endQuote + '\n'; |
| 9155 } | 9160 } |
| 9156 else { | 9161 else { |
| 9157 startQuote = endQuote = text.$index(0); | 9162 startQuote = endQuote = text.$index(0); |
| 9158 } | 9163 } |
| 9159 text = text.substring$2(0, text.length - 1) + endQuote; | 9164 text = text.substring$2(0, text.length - 1) + endQuote; |
| 9160 } | 9165 } |
| 9161 else { | 9166 else { |
| 9162 text = startQuote + text.substring$2(0, text.length - 1) + endQuote; | 9167 text = startQuote + text.substring$2(0, text.length - 1) + endQuote; |
| 9163 } | 9168 } |
| 9164 lits.add$1(this.makeStringLiteral(text, token.get$span())); | 9169 lits.add$1(this.makeStringLiteral(text, token.get$span())); |
| 9165 if (this._maybeEat(6/*TokenKind.LBRACE*/)) { | 9170 if (this._maybeEat(6/*TokenKind.LBRACE*/)) { |
| 9166 lits.add$1(this.expression()); | 9171 lits.add$1(this.expression()); |
| 9167 this._eat(7/*TokenKind.RBRACE*/); | 9172 this._eat(7/*TokenKind.RBRACE*/); |
| 9168 } | 9173 } |
| 9169 else if (this._maybeEat(109/*TokenKind.THIS*/)) { | 9174 else if (this._maybeEat(109/*TokenKind.THIS*/)) { |
| 9170 lits.add$1(new ThisExpression(this._previousToken.get$span())); | 9175 lits.add$1(new ThisExpression(this._previousToken.get$span())); |
| 9171 } | 9176 } |
| 9172 else { | 9177 else { |
| 9173 var id = this.identifier(); | 9178 var id = this.identifier(); |
| 9174 lits.add$1(new VarExpression(id, id.get$span())); | 9179 lits.add$1(new VarExpression(id, id.get$span())); |
| 9175 } | 9180 } |
| 9176 } | 9181 } |
| 9177 var tok = this._next(); | 9182 var tok = this._lang_next(); |
| 9178 if ($ne(tok.get$kind(), 58/*TokenKind.STRING*/)) { | 9183 if ($ne(tok.get$kind(), 58/*TokenKind.STRING*/)) { |
| 9179 this._errorExpected('interpolated string'); | 9184 this._errorExpected('interpolated string'); |
| 9180 } | 9185 } |
| 9181 var text = startQuote + tok.get$text(); | 9186 var text = startQuote + tok.get$text(); |
| 9182 lits.add$1(this.makeStringLiteral(text, tok.get$span())); | 9187 lits.add$1(this.makeStringLiteral(text, tok.get$span())); |
| 9183 var span = this._makeSpan(start); | 9188 var span = this._makeSpan(start); |
| 9184 return new LiteralExpression(lits, this._stringTypeRef(span), '\$\$\$', span); | 9189 return new LiteralExpression(lits, this._stringTypeRef(span), '\$\$\$', span); |
| 9185 } | 9190 } |
| 9186 Parser.prototype.makeStringLiteral = function(text, span) { | 9191 Parser.prototype.makeStringLiteral = function(text, span) { |
| 9187 return new LiteralExpression(text, this._stringTypeRef(span), text, span); | 9192 return new LiteralExpression(text, this._stringTypeRef(span), text, span); |
| 9188 } | 9193 } |
| 9189 Parser.prototype.stringLiteralExpr = function() { | 9194 Parser.prototype.stringLiteralExpr = function() { |
| 9190 var token = this._next(); | 9195 var token = this._lang_next(); |
| 9191 return this.makeStringLiteral(token.get$text(), token.get$span()); | 9196 return this.makeStringLiteral(token.get$text(), token.get$span()); |
| 9192 } | 9197 } |
| 9193 Parser.prototype.maybeStringLiteral = function() { | 9198 Parser.prototype.maybeStringLiteral = function() { |
| 9194 var kind = this._peek(); | 9199 var kind = this._peek(); |
| 9195 if ($eq(kind, 58/*TokenKind.STRING*/)) { | 9200 if ($eq(kind, 58/*TokenKind.STRING*/)) { |
| 9196 return parseStringLiteral(this._next().get$text()); | 9201 return parseStringLiteral(this._lang_next().get$text()); |
| 9197 } | 9202 } |
| 9198 else if ($eq(kind, 59/*TokenKind.STRING_PART*/)) { | 9203 else if ($eq(kind, 59/*TokenKind.STRING_PART*/)) { |
| 9199 this._next(); | 9204 this._lang_next(); |
| 9200 this._errorExpected('string literal, but found interpolated string start'); | 9205 this._errorExpected('string literal, but found interpolated string start'); |
| 9201 } | 9206 } |
| 9202 else if ($eq(kind, 66/*TokenKind.INCOMPLETE_STRING*/)) { | 9207 else if ($eq(kind, 66/*TokenKind.INCOMPLETE_STRING*/)) { |
| 9203 this._next(); | 9208 this._lang_next(); |
| 9204 this._errorExpected('string literal, but found incomplete string'); | 9209 this._errorExpected('string literal, but found incomplete string'); |
| 9205 } | 9210 } |
| 9206 return null; | 9211 return null; |
| 9207 } | 9212 } |
| 9208 Parser.prototype._parenOrLambda = function() { | 9213 Parser.prototype._parenOrLambda = function() { |
| 9209 var start = this._peekToken.start; | 9214 var start = this._peekToken.start; |
| 9210 if (this._atClosureParameters()) { | 9215 if (this._atClosureParameters()) { |
| 9211 var formals = this.formalParameterList(); | 9216 var formals = this.formalParameterList(); |
| 9212 var body = this.functionBody(true); | 9217 var body = this.functionBody(true); |
| 9213 var func = new FunctionDefinition(null, null, null, formals, null, null, nul
l, body, this._makeSpan(start)); | 9218 var func = new FunctionDefinition(null, null, null, formals, null, null, nul
l, body, this._makeSpan(start)); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 9231 Parser.prototype._eatLeftParen = function() { | 9236 Parser.prototype._eatLeftParen = function() { |
| 9232 this._eat(2/*TokenKind.LPAREN*/); | 9237 this._eat(2/*TokenKind.LPAREN*/); |
| 9233 this._afterParensIndex++; | 9238 this._afterParensIndex++; |
| 9234 } | 9239 } |
| 9235 Parser.prototype._peekAfterCloseParen = function() { | 9240 Parser.prototype._peekAfterCloseParen = function() { |
| 9236 if (this._afterParensIndex < this._afterParens.length) { | 9241 if (this._afterParensIndex < this._afterParens.length) { |
| 9237 return this._afterParens.$index(this._afterParensIndex); | 9242 return this._afterParens.$index(this._afterParensIndex); |
| 9238 } | 9243 } |
| 9239 this._afterParensIndex = 0; | 9244 this._afterParensIndex = 0; |
| 9240 this._afterParens.clear(); | 9245 this._afterParens.clear(); |
| 9241 var tokens = [this._next()]; | 9246 var tokens = [this._lang_next()]; |
| 9242 this._lookaheadAfterParens(tokens); | 9247 this._lookaheadAfterParens(tokens); |
| 9243 var after = this._peekToken; | 9248 var after = this._peekToken; |
| 9244 tokens.add$1(after); | 9249 tokens.add$1(after); |
| 9245 this.tokenizer = new DivertedTokenSource(tokens, this, this.tokenizer); | 9250 this.tokenizer = new DivertedTokenSource(tokens, this, this.tokenizer); |
| 9246 this._next(); | 9251 this._lang_next(); |
| 9247 return after; | 9252 return after; |
| 9248 } | 9253 } |
| 9249 Parser.prototype._lookaheadAfterParens = function(tokens) { | 9254 Parser.prototype._lookaheadAfterParens = function(tokens) { |
| 9250 var saved = this._afterParens.length; | 9255 var saved = this._afterParens.length; |
| 9251 this._afterParens.add(null); | 9256 this._afterParens.add(null); |
| 9252 while (true) { | 9257 while (true) { |
| 9253 var token = this._next(); | 9258 var token = this._lang_next(); |
| 9254 tokens.add(token); | 9259 tokens.add(token); |
| 9255 var kind = token.kind; | 9260 var kind = token.kind; |
| 9256 if (kind == 3/*TokenKind.RPAREN*/ || kind == 1/*TokenKind.END_OF_FILE*/) { | 9261 if (kind == 3/*TokenKind.RPAREN*/ || kind == 1/*TokenKind.END_OF_FILE*/) { |
| 9257 this._afterParens.$setindex(saved, this._peekToken); | 9262 this._afterParens.$setindex(saved, this._peekToken); |
| 9258 return; | 9263 return; |
| 9259 } | 9264 } |
| 9260 else if (kind == 2/*TokenKind.LPAREN*/) { | 9265 else if (kind == 2/*TokenKind.LPAREN*/) { |
| 9261 this._lookaheadAfterParens(tokens); | 9266 this._lookaheadAfterParens(tokens); |
| 9262 } | 9267 } |
| 9263 } | 9268 } |
| 9264 } | 9269 } |
| 9265 Parser.prototype._typeAsIdentifier = function(type) { | 9270 Parser.prototype._typeAsIdentifier = function(type) { |
| 9266 return type.get$name(); | 9271 return type.get$name(); |
| 9267 } | 9272 } |
| 9268 Parser.prototype._specialIdentifier = function(includeOperators) { | 9273 Parser.prototype._specialIdentifier = function(includeOperators) { |
| 9269 var start = this._peekToken.start; | 9274 var start = this._peekToken.start; |
| 9270 var name; | 9275 var name; |
| 9271 switch (this._peek()) { | 9276 switch (this._peek()) { |
| 9272 case 15/*TokenKind.ELLIPSIS*/: | 9277 case 15/*TokenKind.ELLIPSIS*/: |
| 9273 | 9278 |
| 9274 this._eat(15/*TokenKind.ELLIPSIS*/); | 9279 this._eat(15/*TokenKind.ELLIPSIS*/); |
| 9275 this._error('rest no longer supported', this._previousToken.get$span()); | 9280 this._lang_error('rest no longer supported', this._previousToken.get$span(
)); |
| 9276 name = this.identifier().get$name(); | 9281 name = this.identifier().get$name(); |
| 9277 break; | 9282 break; |
| 9278 | 9283 |
| 9279 case 109/*TokenKind.THIS*/: | 9284 case 109/*TokenKind.THIS*/: |
| 9280 | 9285 |
| 9281 this._eat(109/*TokenKind.THIS*/); | 9286 this._eat(109/*TokenKind.THIS*/); |
| 9282 this._eat(14/*TokenKind.DOT*/); | 9287 this._eat(14/*TokenKind.DOT*/); |
| 9283 name = ('this.' + this.identifier().get$name()); | 9288 name = ('this.' + this.identifier().get$name()); |
| 9284 break; | 9289 break; |
| 9285 | 9290 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 9307 } | 9312 } |
| 9308 break; | 9313 break; |
| 9309 | 9314 |
| 9310 case 83/*TokenKind.OPERATOR*/: | 9315 case 83/*TokenKind.OPERATOR*/: |
| 9311 | 9316 |
| 9312 if (!includeOperators) return null; | 9317 if (!includeOperators) return null; |
| 9313 this._eat(83/*TokenKind.OPERATOR*/); | 9318 this._eat(83/*TokenKind.OPERATOR*/); |
| 9314 var kind = this._peek(); | 9319 var kind = this._peek(); |
| 9315 if ($eq(kind, 82/*TokenKind.NEGATE*/)) { | 9320 if ($eq(kind, 82/*TokenKind.NEGATE*/)) { |
| 9316 name = ':negate'; | 9321 name = ':negate'; |
| 9317 this._next(); | 9322 this._lang_next(); |
| 9318 } | 9323 } |
| 9319 else { | 9324 else { |
| 9320 name = TokenKind.binaryMethodName(kind); | 9325 name = TokenKind.binaryMethodName(kind); |
| 9321 if (name == null) { | 9326 if (name == null) { |
| 9322 name = 'operator'; | 9327 name = 'operator'; |
| 9323 } | 9328 } |
| 9324 else { | 9329 else { |
| 9325 this._next(); | 9330 this._lang_next(); |
| 9326 } | 9331 } |
| 9327 } | 9332 } |
| 9328 break; | 9333 break; |
| 9329 | 9334 |
| 9330 default: | 9335 default: |
| 9331 | 9336 |
| 9332 return null; | 9337 return null; |
| 9333 | 9338 |
| 9334 } | 9339 } |
| 9335 return new Identifier(name, this._makeSpan(start)); | 9340 return new Identifier(name, this._makeSpan(start)); |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9450 var modifiers = null; | 9455 var modifiers = null; |
| 9451 while (true) { | 9456 while (true) { |
| 9452 switch (this._peek()) { | 9457 switch (this._peek()) { |
| 9453 case 86/*TokenKind.STATIC*/: | 9458 case 86/*TokenKind.STATIC*/: |
| 9454 case 98/*TokenKind.FINAL*/: | 9459 case 98/*TokenKind.FINAL*/: |
| 9455 case 92/*TokenKind.CONST*/: | 9460 case 92/*TokenKind.CONST*/: |
| 9456 case 71/*TokenKind.ABSTRACT*/: | 9461 case 71/*TokenKind.ABSTRACT*/: |
| 9457 case 75/*TokenKind.FACTORY*/: | 9462 case 75/*TokenKind.FACTORY*/: |
| 9458 | 9463 |
| 9459 if (modifiers == null) modifiers = []; | 9464 if (modifiers == null) modifiers = []; |
| 9460 modifiers.add$1(this._next()); | 9465 modifiers.add$1(this._lang_next()); |
| 9461 break; | 9466 break; |
| 9462 | 9467 |
| 9463 default: | 9468 default: |
| 9464 | 9469 |
| 9465 return modifiers; | 9470 return modifiers; |
| 9466 | 9471 |
| 9467 } | 9472 } |
| 9468 } | 9473 } |
| 9469 return null; | 9474 return null; |
| 9470 } | 9475 } |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9551 } | 9556 } |
| 9552 Parser.prototype.nameTypeReference = function() { | 9557 Parser.prototype.nameTypeReference = function() { |
| 9553 var start = this._peekToken.start; | 9558 var start = this._peekToken.start; |
| 9554 var name; | 9559 var name; |
| 9555 var names = null; | 9560 var names = null; |
| 9556 var typeArgs = null; | 9561 var typeArgs = null; |
| 9557 var isFinal = false; | 9562 var isFinal = false; |
| 9558 switch (this._peek()) { | 9563 switch (this._peek()) { |
| 9559 case 114/*TokenKind.VOID*/: | 9564 case 114/*TokenKind.VOID*/: |
| 9560 | 9565 |
| 9561 return new TypeReference(this._next().get$span(), $globals.world.voidType)
; | 9566 return new TypeReference(this._lang_next().get$span(), $globals.world.void
Type); |
| 9562 | 9567 |
| 9563 case 113/*TokenKind.VAR*/: | 9568 case 113/*TokenKind.VAR*/: |
| 9564 | 9569 |
| 9565 return new TypeReference(this._next().get$span(), $globals.world.varType); | 9570 return new TypeReference(this._lang_next().get$span(), $globals.world.varT
ype); |
| 9566 | 9571 |
| 9567 case 98/*TokenKind.FINAL*/: | 9572 case 98/*TokenKind.FINAL*/: |
| 9568 | 9573 |
| 9569 this._eat(98/*TokenKind.FINAL*/); | 9574 this._eat(98/*TokenKind.FINAL*/); |
| 9570 isFinal = true; | 9575 isFinal = true; |
| 9571 name = this.identifier(); | 9576 name = this.identifier(); |
| 9572 break; | 9577 break; |
| 9573 | 9578 |
| 9574 default: | 9579 default: |
| 9575 | 9580 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 9598 Parser.prototype.formalParameter = function(inOptionalBlock) { | 9603 Parser.prototype.formalParameter = function(inOptionalBlock) { |
| 9599 var start = this._peekToken.start; | 9604 var start = this._peekToken.start; |
| 9600 var isThis = false; | 9605 var isThis = false; |
| 9601 var isRest = false; | 9606 var isRest = false; |
| 9602 var di = this.declaredIdentifier(false); | 9607 var di = this.declaredIdentifier(false); |
| 9603 var type = di.get$type(); | 9608 var type = di.get$type(); |
| 9604 var name = di.get$name(); | 9609 var name = di.get$name(); |
| 9605 var value = null; | 9610 var value = null; |
| 9606 if (this._maybeEat(20/*TokenKind.ASSIGN*/)) { | 9611 if (this._maybeEat(20/*TokenKind.ASSIGN*/)) { |
| 9607 if (!inOptionalBlock) { | 9612 if (!inOptionalBlock) { |
| 9608 this._error('default values only allowed inside [optional] section'); | 9613 this._lang_error('default values only allowed inside [optional] section'); |
| 9609 } | 9614 } |
| 9610 value = this.expression(); | 9615 value = this.expression(); |
| 9611 } | 9616 } |
| 9612 else if (this._peekKind(2/*TokenKind.LPAREN*/)) { | 9617 else if (this._peekKind(2/*TokenKind.LPAREN*/)) { |
| 9613 var formals = this.formalParameterList(); | 9618 var formals = this.formalParameterList(); |
| 9614 var func = new FunctionDefinition(null, type, name, formals, null, null, nul
l, null, this._makeSpan(start)); | 9619 var func = new FunctionDefinition(null, type, name, formals, null, null, nul
l, null, this._makeSpan(start)); |
| 9615 type = new FunctionTypeReference(false, func, func.get$span()); | 9620 type = new FunctionTypeReference(false, func, func.get$span()); |
| 9616 } | 9621 } |
| 9617 if (inOptionalBlock && value == null) { | 9622 if (inOptionalBlock && value == null) { |
| 9618 value = new NullExpression(this._makeSpan(start)); | 9623 value = new NullExpression(this._makeSpan(start)); |
| 9619 } | 9624 } |
| 9620 return new FormalNode(isThis, isRest, type, name, value, this._makeSpan(start)
); | 9625 return new FormalNode(isThis, isRest, type, name, value, this._makeSpan(start)
); |
| 9621 } | 9626 } |
| 9622 Parser.prototype.formalParameterList = function() { | 9627 Parser.prototype.formalParameterList = function() { |
| 9623 this._eatLeftParen(); | 9628 this._eatLeftParen(); |
| 9624 var formals = []; | 9629 var formals = []; |
| 9625 var inOptionalBlock = false; | 9630 var inOptionalBlock = false; |
| 9626 if (!this._maybeEat(3/*TokenKind.RPAREN*/)) { | 9631 if (!this._maybeEat(3/*TokenKind.RPAREN*/)) { |
| 9627 if (this._maybeEat(4/*TokenKind.LBRACK*/)) { | 9632 if (this._maybeEat(4/*TokenKind.LBRACK*/)) { |
| 9628 inOptionalBlock = true; | 9633 inOptionalBlock = true; |
| 9629 } | 9634 } |
| 9630 formals.add$1(this.formalParameter(inOptionalBlock)); | 9635 formals.add$1(this.formalParameter(inOptionalBlock)); |
| 9631 while (this._maybeEat(11/*TokenKind.COMMA*/)) { | 9636 while (this._maybeEat(11/*TokenKind.COMMA*/)) { |
| 9632 if (this._maybeEat(4/*TokenKind.LBRACK*/)) { | 9637 if (this._maybeEat(4/*TokenKind.LBRACK*/)) { |
| 9633 if (inOptionalBlock) { | 9638 if (inOptionalBlock) { |
| 9634 this._error('already inside an optional block', this._previousToken.ge
t$span()); | 9639 this._lang_error('already inside an optional block', this._previousTok
en.get$span()); |
| 9635 } | 9640 } |
| 9636 inOptionalBlock = true; | 9641 inOptionalBlock = true; |
| 9637 } | 9642 } |
| 9638 formals.add$1(this.formalParameter(inOptionalBlock)); | 9643 formals.add$1(this.formalParameter(inOptionalBlock)); |
| 9639 } | 9644 } |
| 9640 if (inOptionalBlock) { | 9645 if (inOptionalBlock) { |
| 9641 this._eat(5/*TokenKind.RBRACK*/); | 9646 this._eat(5/*TokenKind.RBRACK*/); |
| 9642 } | 9647 } |
| 9643 this._eat(3/*TokenKind.RPAREN*/); | 9648 this._eat(3/*TokenKind.RPAREN*/); |
| 9644 } | 9649 } |
| 9645 return formals; | 9650 return formals; |
| 9646 } | 9651 } |
| 9647 Parser.prototype.identifier = function() { | 9652 Parser.prototype.identifier = function() { |
| 9648 var tok = this._next(); | 9653 var tok = this._lang_next(); |
| 9649 if (!this._isIdentifier(tok.get$kind())) { | 9654 if (!this._isIdentifier(tok.get$kind())) { |
| 9650 this._error(('expected identifier, but found ' + tok), tok.get$span()); | 9655 this._lang_error(('expected identifier, but found ' + tok), tok.get$span()); |
| 9651 } | 9656 } |
| 9652 return new Identifier(tok.get$text(), this._makeSpan(tok.get$start())); | 9657 return new Identifier(tok.get$text(), this._makeSpan(tok.get$start())); |
| 9653 } | 9658 } |
| 9654 Parser.prototype._makeFunction = function(expr, formals, body) { | 9659 Parser.prototype._makeFunction = function(expr, formals, body) { |
| 9655 var name, type; | 9660 var name, type; |
| 9656 if ((expr instanceof VarExpression)) { | 9661 if ((expr instanceof VarExpression)) { |
| 9657 name = expr.get$name(); | 9662 name = expr.get$name(); |
| 9658 type = null; | 9663 type = null; |
| 9659 } | 9664 } |
| 9660 else if ((expr instanceof DeclaredIdentifier)) { | 9665 else if ((expr instanceof DeclaredIdentifier)) { |
| 9661 name = expr.get$name(); | 9666 name = expr.get$name(); |
| 9662 type = expr.get$type(); | 9667 type = expr.get$type(); |
| 9663 } | 9668 } |
| 9664 else { | 9669 else { |
| 9665 this._error('bad function body', expr.get$span()); | 9670 this._lang_error('bad function body', expr.get$span()); |
| 9666 } | 9671 } |
| 9667 var span = new SourceSpan(expr.get$span().get$file(), expr.get$span().get$star
t(), body.get$span().get$end()); | 9672 var span = new SourceSpan(expr.get$span().get$file(), expr.get$span().get$star
t(), body.get$span().get$end()); |
| 9668 var func = new FunctionDefinition(null, type, name, formals, null, null, null,
body, span); | 9673 var func = new FunctionDefinition(null, type, name, formals, null, null, null,
body, span); |
| 9669 return new LambdaExpression(func, func.get$span()); | 9674 return new LambdaExpression(func, func.get$span()); |
| 9670 } | 9675 } |
| 9671 Parser.prototype._makeDeclaredIdentifier = function(e) { | 9676 Parser.prototype._makeDeclaredIdentifier = function(e) { |
| 9672 if ((e instanceof VarExpression)) { | 9677 if ((e instanceof VarExpression)) { |
| 9673 return new DeclaredIdentifier(null, e.get$name(), e.get$span()); | 9678 return new DeclaredIdentifier(null, e.get$name(), e.get$span()); |
| 9674 } | 9679 } |
| 9675 else if ((e instanceof DeclaredIdentifier)) { | 9680 else if ((e instanceof DeclaredIdentifier)) { |
| 9676 return e; | 9681 return e; |
| 9677 } | 9682 } |
| 9678 else { | 9683 else { |
| 9679 this._error('expected declared identifier'); | 9684 this._lang_error('expected declared identifier'); |
| 9680 return new DeclaredIdentifier(null, null, e.get$span()); | 9685 return new DeclaredIdentifier(null, null, e.get$span()); |
| 9681 } | 9686 } |
| 9682 } | 9687 } |
| 9683 Parser.prototype._makeLabel = function(expr) { | 9688 Parser.prototype._makeLabel = function(expr) { |
| 9684 if ((expr instanceof VarExpression)) { | 9689 if ((expr instanceof VarExpression)) { |
| 9685 return expr.get$name(); | 9690 return expr.get$name(); |
| 9686 } | 9691 } |
| 9687 else { | 9692 else { |
| 9688 this._errorExpected('label'); | 9693 this._errorExpected('label'); |
| 9689 return null; | 9694 return null; |
| 9690 } | 9695 } |
| 9691 } | 9696 } |
| 9692 Parser.prototype.block$0 = Parser.prototype.block; | 9697 Parser.prototype.block$0 = Parser.prototype.block; |
| 9693 // ********** Code for IncompleteSourceException ************** | 9698 // ********** Code for IncompleteSourceException ************** |
| 9694 function IncompleteSourceException(token) { | 9699 function IncompleteSourceException(token) { |
| 9695 this.token = token; | 9700 this.token = token; |
| 9696 // Initializers done | 9701 // Initializers done |
| 9697 } | 9702 } |
| 9698 IncompleteSourceException.prototype.toString = function() { | 9703 IncompleteSourceException.prototype.toString = function() { |
| 9699 if (this.token.get$span() == null) return ('Unexpected ' + this.token); | 9704 if (this.token.get$span() == null) return ('Unexpected ' + this.token); |
| 9700 return this.token.get$span().toMessageString(('Unexpected ' + this.token)); | 9705 return this.token.get$span().toMessageString(('Unexpected ' + this.token)); |
| 9701 } | 9706 } |
| 9702 IncompleteSourceException.prototype.toString$0 = IncompleteSourceException.proto
type.toString; | 9707 IncompleteSourceException.prototype.toString$0 = IncompleteSourceException.proto
type.toString; |
| 9703 // ********** Code for DivertedTokenSource ************** | 9708 // ********** Code for DivertedTokenSource ************** |
| 9704 function DivertedTokenSource(tokens, parser, previousTokenizer) { | 9709 function DivertedTokenSource(tokens, parser, previousTokenizer) { |
| 9705 this._pos = 0 | 9710 this._lang_pos = 0 |
| 9706 this.tokens = tokens; | 9711 this.tokens = tokens; |
| 9707 this.parser = parser; | 9712 this.parser = parser; |
| 9708 this.previousTokenizer = previousTokenizer; | 9713 this.previousTokenizer = previousTokenizer; |
| 9709 // Initializers done | 9714 // Initializers done |
| 9710 } | 9715 } |
| 9711 DivertedTokenSource.prototype.next = function() { | 9716 DivertedTokenSource.prototype.next = function() { |
| 9712 var token = this.tokens.$index(this._pos); | 9717 var token = this.tokens.$index(this._lang_pos); |
| 9713 ++this._pos; | 9718 ++this._lang_pos; |
| 9714 if (this._pos == this.tokens.length) { | 9719 if (this._lang_pos == this.tokens.length) { |
| 9715 this.parser.tokenizer = this.previousTokenizer; | 9720 this.parser.tokenizer = this.previousTokenizer; |
| 9716 } | 9721 } |
| 9717 return token; | 9722 return token; |
| 9718 } | 9723 } |
| 9719 DivertedTokenSource.prototype.next$0 = DivertedTokenSource.prototype.next; | 9724 DivertedTokenSource.prototype.next$0 = DivertedTokenSource.prototype.next; |
| 9720 // ********** Code for Node ************** | 9725 // ********** Code for Node ************** |
| 9721 function Node(span) { | 9726 function Node(span) { |
| 9722 this.span = span; | 9727 this.span = span; |
| 9723 // Initializers done | 9728 // Initializers done |
| 9724 } | 9729 } |
| 9725 Node.prototype.get$span = function() { return this.span; }; | 9730 Node.prototype.get$span = function() { return this.span; }; |
| 9726 Node.prototype.set$span = function(value) { return this.span = value; }; | 9731 Node.prototype.set$span = function(value) { return this.span = value; }; |
| 9727 Node.prototype.visit$1 = Node.prototype.visit; | 9732 Node.prototype.visit$1 = Node.prototype.visit; |
| 9733 // ********** Code for Statement ************** |
| 9734 $inherits(Statement, Node); |
| 9735 function Statement(span) { |
| 9736 // Initializers done |
| 9737 Node.call(this, span); |
| 9738 } |
| 9728 // ********** Code for Definition ************** | 9739 // ********** Code for Definition ************** |
| 9740 $inherits(Definition, Statement); |
| 9729 function Definition(span) { | 9741 function Definition(span) { |
| 9730 // Initializers done | 9742 // Initializers done |
| 9731 Statement.call(this, span); | 9743 Statement.call(this, span); |
| 9732 } | 9744 } |
| 9733 $inherits(Definition, Statement); | |
| 9734 Definition.prototype.get$typeParameters = function() { | 9745 Definition.prototype.get$typeParameters = function() { |
| 9735 return null; | 9746 return null; |
| 9736 } | 9747 } |
| 9737 Definition.prototype.get$nativeType = function() { | 9748 Definition.prototype.get$nativeType = function() { |
| 9738 return null; | 9749 return null; |
| 9739 } | 9750 } |
| 9740 // ********** Code for Statement ************** | |
| 9741 function Statement(span) { | |
| 9742 // Initializers done | |
| 9743 Node.call(this, span); | |
| 9744 } | |
| 9745 $inherits(Statement, Node); | |
| 9746 // ********** Code for Expression ************** | 9751 // ********** Code for Expression ************** |
| 9752 $inherits(Expression, Node); |
| 9747 function Expression(span) { | 9753 function Expression(span) { |
| 9748 // Initializers done | 9754 // Initializers done |
| 9749 Node.call(this, span); | 9755 Node.call(this, span); |
| 9750 } | 9756 } |
| 9751 $inherits(Expression, Node); | |
| 9752 // ********** Code for TypeReference ************** | 9757 // ********** Code for TypeReference ************** |
| 9758 $inherits(TypeReference, Node); |
| 9753 function TypeReference(span, type) { | 9759 function TypeReference(span, type) { |
| 9754 this.type = type; | 9760 this.type = type; |
| 9755 // Initializers done | 9761 // Initializers done |
| 9756 Node.call(this, span); | 9762 Node.call(this, span); |
| 9757 } | 9763 } |
| 9758 $inherits(TypeReference, Node); | |
| 9759 TypeReference.prototype.get$type = function() { return this.type; }; | 9764 TypeReference.prototype.get$type = function() { return this.type; }; |
| 9760 TypeReference.prototype.set$type = function(value) { return this.type = value; }
; | 9765 TypeReference.prototype.set$type = function(value) { return this.type = value; }
; |
| 9761 TypeReference.prototype.visit = function(visitor) { | 9766 TypeReference.prototype.visit = function(visitor) { |
| 9762 return visitor.visitTypeReference(this); | 9767 return visitor.visitTypeReference(this); |
| 9763 } | 9768 } |
| 9764 TypeReference.prototype.get$isFinal = function() { | 9769 TypeReference.prototype.get$isFinal = function() { |
| 9765 return false; | 9770 return false; |
| 9766 } | 9771 } |
| 9767 TypeReference.prototype.visit$1 = TypeReference.prototype.visit; | 9772 TypeReference.prototype.visit$1 = TypeReference.prototype.visit; |
| 9768 // ********** Code for DirectiveDefinition ************** | 9773 // ********** Code for DirectiveDefinition ************** |
| 9774 $inherits(DirectiveDefinition, Definition); |
| 9769 function DirectiveDefinition(name, arguments, span) { | 9775 function DirectiveDefinition(name, arguments, span) { |
| 9770 this.name = name; | 9776 this.name = name; |
| 9771 this.arguments = arguments; | 9777 this.arguments = arguments; |
| 9772 // Initializers done | 9778 // Initializers done |
| 9773 Definition.call(this, span); | 9779 Definition.call(this, span); |
| 9774 } | 9780 } |
| 9775 $inherits(DirectiveDefinition, Definition); | |
| 9776 DirectiveDefinition.prototype.get$name = function() { return this.name; }; | 9781 DirectiveDefinition.prototype.get$name = function() { return this.name; }; |
| 9777 DirectiveDefinition.prototype.set$name = function(value) { return this.name = va
lue; }; | 9782 DirectiveDefinition.prototype.set$name = function(value) { return this.name = va
lue; }; |
| 9778 DirectiveDefinition.prototype.get$arguments = function() { return this.arguments
; }; | 9783 DirectiveDefinition.prototype.get$arguments = function() { return this.arguments
; }; |
| 9779 DirectiveDefinition.prototype.set$arguments = function(value) { return this.argu
ments = value; }; | 9784 DirectiveDefinition.prototype.set$arguments = function(value) { return this.argu
ments = value; }; |
| 9780 DirectiveDefinition.prototype.visit = function(visitor) { | 9785 DirectiveDefinition.prototype.visit = function(visitor) { |
| 9781 return visitor.visitDirectiveDefinition(this); | 9786 return visitor.visitDirectiveDefinition(this); |
| 9782 } | 9787 } |
| 9783 DirectiveDefinition.prototype.visit$1 = DirectiveDefinition.prototype.visit; | 9788 DirectiveDefinition.prototype.visit$1 = DirectiveDefinition.prototype.visit; |
| 9784 // ********** Code for TypeDefinition ************** | 9789 // ********** Code for TypeDefinition ************** |
| 9790 $inherits(TypeDefinition, Definition); |
| 9785 function TypeDefinition(isClass, name, typeParameters, extendsTypes, implementsT
ypes, nativeType, factoryType, body, span) { | 9791 function TypeDefinition(isClass, name, typeParameters, extendsTypes, implementsT
ypes, nativeType, factoryType, body, span) { |
| 9786 this.isClass = isClass; | 9792 this.isClass = isClass; |
| 9787 this.name = name; | 9793 this.name = name; |
| 9788 this.typeParameters = typeParameters; | 9794 this.typeParameters = typeParameters; |
| 9789 this.extendsTypes = extendsTypes; | 9795 this.extendsTypes = extendsTypes; |
| 9790 this.implementsTypes = implementsTypes; | 9796 this.implementsTypes = implementsTypes; |
| 9791 this.nativeType = nativeType; | 9797 this.nativeType = nativeType; |
| 9792 this.factoryType = factoryType; | 9798 this.factoryType = factoryType; |
| 9793 this.body = body; | 9799 this.body = body; |
| 9794 // Initializers done | 9800 // Initializers done |
| 9795 Definition.call(this, span); | 9801 Definition.call(this, span); |
| 9796 } | 9802 } |
| 9797 $inherits(TypeDefinition, Definition); | |
| 9798 TypeDefinition.prototype.get$isClass = function() { return this.isClass; }; | 9803 TypeDefinition.prototype.get$isClass = function() { return this.isClass; }; |
| 9799 TypeDefinition.prototype.set$isClass = function(value) { return this.isClass = v
alue; }; | 9804 TypeDefinition.prototype.set$isClass = function(value) { return this.isClass = v
alue; }; |
| 9800 TypeDefinition.prototype.get$name = function() { return this.name; }; | 9805 TypeDefinition.prototype.get$name = function() { return this.name; }; |
| 9801 TypeDefinition.prototype.set$name = function(value) { return this.name = value;
}; | 9806 TypeDefinition.prototype.set$name = function(value) { return this.name = value;
}; |
| 9802 TypeDefinition.prototype.get$typeParameters = function() { return this.typeParam
eters; }; | 9807 TypeDefinition.prototype.get$typeParameters = function() { return this.typeParam
eters; }; |
| 9803 TypeDefinition.prototype.set$typeParameters = function(value) { return this.type
Parameters = value; }; | 9808 TypeDefinition.prototype.set$typeParameters = function(value) { return this.type
Parameters = value; }; |
| 9804 TypeDefinition.prototype.get$nativeType = function() { return this.nativeType; }
; | 9809 TypeDefinition.prototype.get$nativeType = function() { return this.nativeType; }
; |
| 9805 TypeDefinition.prototype.set$nativeType = function(value) { return this.nativeTy
pe = value; }; | 9810 TypeDefinition.prototype.set$nativeType = function(value) { return this.nativeTy
pe = value; }; |
| 9806 TypeDefinition.prototype.get$body = function() { return this.body; }; | 9811 TypeDefinition.prototype.get$body = function() { return this.body; }; |
| 9807 TypeDefinition.prototype.set$body = function(value) { return this.body = value;
}; | 9812 TypeDefinition.prototype.set$body = function(value) { return this.body = value;
}; |
| 9808 TypeDefinition.prototype.visit = function(visitor) { | 9813 TypeDefinition.prototype.visit = function(visitor) { |
| 9809 return visitor.visitTypeDefinition(this); | 9814 return visitor.visitTypeDefinition(this); |
| 9810 } | 9815 } |
| 9811 TypeDefinition.prototype.visit$1 = TypeDefinition.prototype.visit; | 9816 TypeDefinition.prototype.visit$1 = TypeDefinition.prototype.visit; |
| 9812 // ********** Code for FunctionTypeDefinition ************** | 9817 // ********** Code for FunctionTypeDefinition ************** |
| 9818 $inherits(FunctionTypeDefinition, Definition); |
| 9813 function FunctionTypeDefinition(func, typeParameters, span) { | 9819 function FunctionTypeDefinition(func, typeParameters, span) { |
| 9814 this.func = func; | 9820 this.func = func; |
| 9815 this.typeParameters = typeParameters; | 9821 this.typeParameters = typeParameters; |
| 9816 // Initializers done | 9822 // Initializers done |
| 9817 Definition.call(this, span); | 9823 Definition.call(this, span); |
| 9818 } | 9824 } |
| 9819 $inherits(FunctionTypeDefinition, Definition); | |
| 9820 FunctionTypeDefinition.prototype.get$func = function() { return this.func; }; | 9825 FunctionTypeDefinition.prototype.get$func = function() { return this.func; }; |
| 9821 FunctionTypeDefinition.prototype.set$func = function(value) { return this.func =
value; }; | 9826 FunctionTypeDefinition.prototype.set$func = function(value) { return this.func =
value; }; |
| 9822 FunctionTypeDefinition.prototype.get$typeParameters = function() { return this.t
ypeParameters; }; | 9827 FunctionTypeDefinition.prototype.get$typeParameters = function() { return this.t
ypeParameters; }; |
| 9823 FunctionTypeDefinition.prototype.set$typeParameters = function(value) { return t
his.typeParameters = value; }; | 9828 FunctionTypeDefinition.prototype.set$typeParameters = function(value) { return t
his.typeParameters = value; }; |
| 9824 FunctionTypeDefinition.prototype.visit = function(visitor) { | 9829 FunctionTypeDefinition.prototype.visit = function(visitor) { |
| 9825 return visitor.visitFunctionTypeDefinition(this); | 9830 return visitor.visitFunctionTypeDefinition(this); |
| 9826 } | 9831 } |
| 9827 FunctionTypeDefinition.prototype.visit$1 = FunctionTypeDefinition.prototype.visi
t; | 9832 FunctionTypeDefinition.prototype.visit$1 = FunctionTypeDefinition.prototype.visi
t; |
| 9828 // ********** Code for VariableDefinition ************** | 9833 // ********** Code for VariableDefinition ************** |
| 9834 $inherits(VariableDefinition, Definition); |
| 9829 function VariableDefinition(modifiers, type, names, values, span) { | 9835 function VariableDefinition(modifiers, type, names, values, span) { |
| 9830 this.modifiers = modifiers; | 9836 this.modifiers = modifiers; |
| 9831 this.type = type; | 9837 this.type = type; |
| 9832 this.names = names; | 9838 this.names = names; |
| 9833 this.values = values; | 9839 this.values = values; |
| 9834 // Initializers done | 9840 // Initializers done |
| 9835 Definition.call(this, span); | 9841 Definition.call(this, span); |
| 9836 } | 9842 } |
| 9837 $inherits(VariableDefinition, Definition); | |
| 9838 VariableDefinition.prototype.get$type = function() { return this.type; }; | 9843 VariableDefinition.prototype.get$type = function() { return this.type; }; |
| 9839 VariableDefinition.prototype.set$type = function(value) { return this.type = val
ue; }; | 9844 VariableDefinition.prototype.set$type = function(value) { return this.type = val
ue; }; |
| 9840 VariableDefinition.prototype.get$names = function() { return this.names; }; | 9845 VariableDefinition.prototype.get$names = function() { return this.names; }; |
| 9841 VariableDefinition.prototype.set$names = function(value) { return this.names = v
alue; }; | 9846 VariableDefinition.prototype.set$names = function(value) { return this.names = v
alue; }; |
| 9842 VariableDefinition.prototype.get$values = function() { return this.values; }; | 9847 VariableDefinition.prototype.get$values = function() { return this.values; }; |
| 9843 VariableDefinition.prototype.set$values = function(value) { return this.values =
value; }; | 9848 VariableDefinition.prototype.set$values = function(value) { return this.values =
value; }; |
| 9844 VariableDefinition.prototype.visit = function(visitor) { | 9849 VariableDefinition.prototype.visit = function(visitor) { |
| 9845 return visitor.visitVariableDefinition(this); | 9850 return visitor.visitVariableDefinition(this); |
| 9846 } | 9851 } |
| 9847 VariableDefinition.prototype.visit$1 = VariableDefinition.prototype.visit; | 9852 VariableDefinition.prototype.visit$1 = VariableDefinition.prototype.visit; |
| 9848 // ********** Code for FunctionDefinition ************** | 9853 // ********** Code for FunctionDefinition ************** |
| 9854 $inherits(FunctionDefinition, Definition); |
| 9849 function FunctionDefinition(modifiers, returnType, name, formals, typeParameters
, initializers, nativeBody, body, span) { | 9855 function FunctionDefinition(modifiers, returnType, name, formals, typeParameters
, initializers, nativeBody, body, span) { |
| 9850 this.modifiers = modifiers; | 9856 this.modifiers = modifiers; |
| 9851 this.returnType = returnType; | 9857 this.returnType = returnType; |
| 9852 this.name = name; | 9858 this.name = name; |
| 9853 this.formals = formals; | 9859 this.formals = formals; |
| 9854 this.typeParameters = typeParameters; | 9860 this.typeParameters = typeParameters; |
| 9855 this.initializers = initializers; | 9861 this.initializers = initializers; |
| 9856 this.nativeBody = nativeBody; | 9862 this.nativeBody = nativeBody; |
| 9857 this.body = body; | 9863 this.body = body; |
| 9858 // Initializers done | 9864 // Initializers done |
| 9859 Definition.call(this, span); | 9865 Definition.call(this, span); |
| 9860 } | 9866 } |
| 9861 $inherits(FunctionDefinition, Definition); | |
| 9862 FunctionDefinition.prototype.get$returnType = function() { return this.returnTyp
e; }; | 9867 FunctionDefinition.prototype.get$returnType = function() { return this.returnTyp
e; }; |
| 9863 FunctionDefinition.prototype.set$returnType = function(value) { return this.retu
rnType = value; }; | 9868 FunctionDefinition.prototype.set$returnType = function(value) { return this.retu
rnType = value; }; |
| 9864 FunctionDefinition.prototype.get$name = function() { return this.name; }; | 9869 FunctionDefinition.prototype.get$name = function() { return this.name; }; |
| 9865 FunctionDefinition.prototype.set$name = function(value) { return this.name = val
ue; }; | 9870 FunctionDefinition.prototype.set$name = function(value) { return this.name = val
ue; }; |
| 9866 FunctionDefinition.prototype.get$typeParameters = function() { return this.typeP
arameters; }; | 9871 FunctionDefinition.prototype.get$typeParameters = function() { return this.typeP
arameters; }; |
| 9867 FunctionDefinition.prototype.set$typeParameters = function(value) { return this.
typeParameters = value; }; | 9872 FunctionDefinition.prototype.set$typeParameters = function(value) { return this.
typeParameters = value; }; |
| 9868 FunctionDefinition.prototype.get$initializers = function() { return this.initial
izers; }; | 9873 FunctionDefinition.prototype.get$initializers = function() { return this.initial
izers; }; |
| 9869 FunctionDefinition.prototype.set$initializers = function(value) { return this.in
itializers = value; }; | 9874 FunctionDefinition.prototype.set$initializers = function(value) { return this.in
itializers = value; }; |
| 9870 FunctionDefinition.prototype.get$nativeBody = function() { return this.nativeBod
y; }; | 9875 FunctionDefinition.prototype.get$nativeBody = function() { return this.nativeBod
y; }; |
| 9871 FunctionDefinition.prototype.set$nativeBody = function(value) { return this.nati
veBody = value; }; | 9876 FunctionDefinition.prototype.set$nativeBody = function(value) { return this.nati
veBody = value; }; |
| 9872 FunctionDefinition.prototype.get$body = function() { return this.body; }; | 9877 FunctionDefinition.prototype.get$body = function() { return this.body; }; |
| 9873 FunctionDefinition.prototype.set$body = function(value) { return this.body = val
ue; }; | 9878 FunctionDefinition.prototype.set$body = function(value) { return this.body = val
ue; }; |
| 9874 FunctionDefinition.prototype.visit = function(visitor) { | 9879 FunctionDefinition.prototype.visit = function(visitor) { |
| 9875 return visitor.visitFunctionDefinition(this); | 9880 return visitor.visitFunctionDefinition(this); |
| 9876 } | 9881 } |
| 9877 FunctionDefinition.prototype.visit$1 = FunctionDefinition.prototype.visit; | 9882 FunctionDefinition.prototype.visit$1 = FunctionDefinition.prototype.visit; |
| 9878 // ********** Code for ReturnStatement ************** | 9883 // ********** Code for ReturnStatement ************** |
| 9884 $inherits(ReturnStatement, Statement); |
| 9879 function ReturnStatement(value, span) { | 9885 function ReturnStatement(value, span) { |
| 9880 this.value = value; | 9886 this.value = value; |
| 9881 // Initializers done | 9887 // Initializers done |
| 9882 Statement.call(this, span); | 9888 Statement.call(this, span); |
| 9883 } | 9889 } |
| 9884 $inherits(ReturnStatement, Statement); | |
| 9885 ReturnStatement.prototype.get$value = function() { return this.value; }; | 9890 ReturnStatement.prototype.get$value = function() { return this.value; }; |
| 9886 ReturnStatement.prototype.set$value = function(value) { return this.value = valu
e; }; | 9891 ReturnStatement.prototype.set$value = function(value) { return this.value = valu
e; }; |
| 9887 ReturnStatement.prototype.visit = function(visitor) { | 9892 ReturnStatement.prototype.visit = function(visitor) { |
| 9888 return visitor.visitReturnStatement(this); | 9893 return visitor.visitReturnStatement(this); |
| 9889 } | 9894 } |
| 9890 ReturnStatement.prototype.visit$1 = ReturnStatement.prototype.visit; | 9895 ReturnStatement.prototype.visit$1 = ReturnStatement.prototype.visit; |
| 9891 // ********** Code for ThrowStatement ************** | 9896 // ********** Code for ThrowStatement ************** |
| 9897 $inherits(ThrowStatement, Statement); |
| 9892 function ThrowStatement(value, span) { | 9898 function ThrowStatement(value, span) { |
| 9893 this.value = value; | 9899 this.value = value; |
| 9894 // Initializers done | 9900 // Initializers done |
| 9895 Statement.call(this, span); | 9901 Statement.call(this, span); |
| 9896 } | 9902 } |
| 9897 $inherits(ThrowStatement, Statement); | |
| 9898 ThrowStatement.prototype.get$value = function() { return this.value; }; | 9903 ThrowStatement.prototype.get$value = function() { return this.value; }; |
| 9899 ThrowStatement.prototype.set$value = function(value) { return this.value = value
; }; | 9904 ThrowStatement.prototype.set$value = function(value) { return this.value = value
; }; |
| 9900 ThrowStatement.prototype.visit = function(visitor) { | 9905 ThrowStatement.prototype.visit = function(visitor) { |
| 9901 return visitor.visitThrowStatement(this); | 9906 return visitor.visitThrowStatement(this); |
| 9902 } | 9907 } |
| 9903 ThrowStatement.prototype.visit$1 = ThrowStatement.prototype.visit; | 9908 ThrowStatement.prototype.visit$1 = ThrowStatement.prototype.visit; |
| 9904 // ********** Code for AssertStatement ************** | 9909 // ********** Code for AssertStatement ************** |
| 9910 $inherits(AssertStatement, Statement); |
| 9905 function AssertStatement(test, span) { | 9911 function AssertStatement(test, span) { |
| 9906 this.test = test; | 9912 this.test = test; |
| 9907 // Initializers done | 9913 // Initializers done |
| 9908 Statement.call(this, span); | 9914 Statement.call(this, span); |
| 9909 } | 9915 } |
| 9910 $inherits(AssertStatement, Statement); | |
| 9911 AssertStatement.prototype.visit = function(visitor) { | 9916 AssertStatement.prototype.visit = function(visitor) { |
| 9912 return visitor.visitAssertStatement(this); | 9917 return visitor.visitAssertStatement(this); |
| 9913 } | 9918 } |
| 9914 AssertStatement.prototype.visit$1 = AssertStatement.prototype.visit; | 9919 AssertStatement.prototype.visit$1 = AssertStatement.prototype.visit; |
| 9915 // ********** Code for BreakStatement ************** | 9920 // ********** Code for BreakStatement ************** |
| 9921 $inherits(BreakStatement, Statement); |
| 9916 function BreakStatement(label, span) { | 9922 function BreakStatement(label, span) { |
| 9917 this.label = label; | 9923 this.label = label; |
| 9918 // Initializers done | 9924 // Initializers done |
| 9919 Statement.call(this, span); | 9925 Statement.call(this, span); |
| 9920 } | 9926 } |
| 9921 $inherits(BreakStatement, Statement); | |
| 9922 BreakStatement.prototype.get$label = function() { return this.label; }; | 9927 BreakStatement.prototype.get$label = function() { return this.label; }; |
| 9923 BreakStatement.prototype.set$label = function(value) { return this.label = value
; }; | 9928 BreakStatement.prototype.set$label = function(value) { return this.label = value
; }; |
| 9924 BreakStatement.prototype.visit = function(visitor) { | 9929 BreakStatement.prototype.visit = function(visitor) { |
| 9925 return visitor.visitBreakStatement(this); | 9930 return visitor.visitBreakStatement(this); |
| 9926 } | 9931 } |
| 9927 BreakStatement.prototype.visit$1 = BreakStatement.prototype.visit; | 9932 BreakStatement.prototype.visit$1 = BreakStatement.prototype.visit; |
| 9928 // ********** Code for ContinueStatement ************** | 9933 // ********** Code for ContinueStatement ************** |
| 9934 $inherits(ContinueStatement, Statement); |
| 9929 function ContinueStatement(label, span) { | 9935 function ContinueStatement(label, span) { |
| 9930 this.label = label; | 9936 this.label = label; |
| 9931 // Initializers done | 9937 // Initializers done |
| 9932 Statement.call(this, span); | 9938 Statement.call(this, span); |
| 9933 } | 9939 } |
| 9934 $inherits(ContinueStatement, Statement); | |
| 9935 ContinueStatement.prototype.get$label = function() { return this.label; }; | 9940 ContinueStatement.prototype.get$label = function() { return this.label; }; |
| 9936 ContinueStatement.prototype.set$label = function(value) { return this.label = va
lue; }; | 9941 ContinueStatement.prototype.set$label = function(value) { return this.label = va
lue; }; |
| 9937 ContinueStatement.prototype.visit = function(visitor) { | 9942 ContinueStatement.prototype.visit = function(visitor) { |
| 9938 return visitor.visitContinueStatement(this); | 9943 return visitor.visitContinueStatement(this); |
| 9939 } | 9944 } |
| 9940 ContinueStatement.prototype.visit$1 = ContinueStatement.prototype.visit; | 9945 ContinueStatement.prototype.visit$1 = ContinueStatement.prototype.visit; |
| 9941 // ********** Code for IfStatement ************** | 9946 // ********** Code for IfStatement ************** |
| 9947 $inherits(IfStatement, Statement); |
| 9942 function IfStatement(test, trueBranch, falseBranch, span) { | 9948 function IfStatement(test, trueBranch, falseBranch, span) { |
| 9943 this.test = test; | 9949 this.test = test; |
| 9944 this.trueBranch = trueBranch; | 9950 this.trueBranch = trueBranch; |
| 9945 this.falseBranch = falseBranch; | 9951 this.falseBranch = falseBranch; |
| 9946 // Initializers done | 9952 // Initializers done |
| 9947 Statement.call(this, span); | 9953 Statement.call(this, span); |
| 9948 } | 9954 } |
| 9949 $inherits(IfStatement, Statement); | |
| 9950 IfStatement.prototype.visit = function(visitor) { | 9955 IfStatement.prototype.visit = function(visitor) { |
| 9951 return visitor.visitIfStatement(this); | 9956 return visitor.visitIfStatement(this); |
| 9952 } | 9957 } |
| 9953 IfStatement.prototype.visit$1 = IfStatement.prototype.visit; | 9958 IfStatement.prototype.visit$1 = IfStatement.prototype.visit; |
| 9954 // ********** Code for WhileStatement ************** | 9959 // ********** Code for WhileStatement ************** |
| 9960 $inherits(WhileStatement, Statement); |
| 9955 function WhileStatement(test, body, span) { | 9961 function WhileStatement(test, body, span) { |
| 9956 this.test = test; | 9962 this.test = test; |
| 9957 this.body = body; | 9963 this.body = body; |
| 9958 // Initializers done | 9964 // Initializers done |
| 9959 Statement.call(this, span); | 9965 Statement.call(this, span); |
| 9960 } | 9966 } |
| 9961 $inherits(WhileStatement, Statement); | |
| 9962 WhileStatement.prototype.get$body = function() { return this.body; }; | 9967 WhileStatement.prototype.get$body = function() { return this.body; }; |
| 9963 WhileStatement.prototype.set$body = function(value) { return this.body = value;
}; | 9968 WhileStatement.prototype.set$body = function(value) { return this.body = value;
}; |
| 9964 WhileStatement.prototype.visit = function(visitor) { | 9969 WhileStatement.prototype.visit = function(visitor) { |
| 9965 return visitor.visitWhileStatement(this); | 9970 return visitor.visitWhileStatement(this); |
| 9966 } | 9971 } |
| 9967 WhileStatement.prototype.visit$1 = WhileStatement.prototype.visit; | 9972 WhileStatement.prototype.visit$1 = WhileStatement.prototype.visit; |
| 9968 // ********** Code for DoStatement ************** | 9973 // ********** Code for DoStatement ************** |
| 9974 $inherits(DoStatement, Statement); |
| 9969 function DoStatement(body, test, span) { | 9975 function DoStatement(body, test, span) { |
| 9970 this.body = body; | 9976 this.body = body; |
| 9971 this.test = test; | 9977 this.test = test; |
| 9972 // Initializers done | 9978 // Initializers done |
| 9973 Statement.call(this, span); | 9979 Statement.call(this, span); |
| 9974 } | 9980 } |
| 9975 $inherits(DoStatement, Statement); | |
| 9976 DoStatement.prototype.get$body = function() { return this.body; }; | 9981 DoStatement.prototype.get$body = function() { return this.body; }; |
| 9977 DoStatement.prototype.set$body = function(value) { return this.body = value; }; | 9982 DoStatement.prototype.set$body = function(value) { return this.body = value; }; |
| 9978 DoStatement.prototype.visit = function(visitor) { | 9983 DoStatement.prototype.visit = function(visitor) { |
| 9979 return visitor.visitDoStatement(this); | 9984 return visitor.visitDoStatement(this); |
| 9980 } | 9985 } |
| 9981 DoStatement.prototype.visit$1 = DoStatement.prototype.visit; | 9986 DoStatement.prototype.visit$1 = DoStatement.prototype.visit; |
| 9982 // ********** Code for ForStatement ************** | 9987 // ********** Code for ForStatement ************** |
| 9988 $inherits(ForStatement, Statement); |
| 9983 function ForStatement(init, test, step, body, span) { | 9989 function ForStatement(init, test, step, body, span) { |
| 9984 this.init = init; | 9990 this.init = init; |
| 9985 this.test = test; | 9991 this.test = test; |
| 9986 this.step = step; | 9992 this.step = step; |
| 9987 this.body = body; | 9993 this.body = body; |
| 9988 // Initializers done | 9994 // Initializers done |
| 9989 Statement.call(this, span); | 9995 Statement.call(this, span); |
| 9990 } | 9996 } |
| 9991 $inherits(ForStatement, Statement); | |
| 9992 ForStatement.prototype.get$body = function() { return this.body; }; | 9997 ForStatement.prototype.get$body = function() { return this.body; }; |
| 9993 ForStatement.prototype.set$body = function(value) { return this.body = value; }; | 9998 ForStatement.prototype.set$body = function(value) { return this.body = value; }; |
| 9994 ForStatement.prototype.visit = function(visitor) { | 9999 ForStatement.prototype.visit = function(visitor) { |
| 9995 return visitor.visitForStatement(this); | 10000 return visitor.visitForStatement(this); |
| 9996 } | 10001 } |
| 9997 ForStatement.prototype.visit$1 = ForStatement.prototype.visit; | 10002 ForStatement.prototype.visit$1 = ForStatement.prototype.visit; |
| 9998 // ********** Code for ForInStatement ************** | 10003 // ********** Code for ForInStatement ************** |
| 10004 $inherits(ForInStatement, Statement); |
| 9999 function ForInStatement(item, list, body, span) { | 10005 function ForInStatement(item, list, body, span) { |
| 10000 this.item = item; | 10006 this.item = item; |
| 10001 this.list = list; | 10007 this.list = list; |
| 10002 this.body = body; | 10008 this.body = body; |
| 10003 // Initializers done | 10009 // Initializers done |
| 10004 Statement.call(this, span); | 10010 Statement.call(this, span); |
| 10005 } | 10011 } |
| 10006 $inherits(ForInStatement, Statement); | |
| 10007 ForInStatement.prototype.get$body = function() { return this.body; }; | 10012 ForInStatement.prototype.get$body = function() { return this.body; }; |
| 10008 ForInStatement.prototype.set$body = function(value) { return this.body = value;
}; | 10013 ForInStatement.prototype.set$body = function(value) { return this.body = value;
}; |
| 10009 ForInStatement.prototype.visit = function(visitor) { | 10014 ForInStatement.prototype.visit = function(visitor) { |
| 10010 return visitor.visitForInStatement(this); | 10015 return visitor.visitForInStatement(this); |
| 10011 } | 10016 } |
| 10012 ForInStatement.prototype.visit$1 = ForInStatement.prototype.visit; | 10017 ForInStatement.prototype.visit$1 = ForInStatement.prototype.visit; |
| 10013 // ********** Code for TryStatement ************** | 10018 // ********** Code for TryStatement ************** |
| 10019 $inherits(TryStatement, Statement); |
| 10014 function TryStatement(body, catches, finallyBlock, span) { | 10020 function TryStatement(body, catches, finallyBlock, span) { |
| 10015 this.body = body; | 10021 this.body = body; |
| 10016 this.catches = catches; | 10022 this.catches = catches; |
| 10017 this.finallyBlock = finallyBlock; | 10023 this.finallyBlock = finallyBlock; |
| 10018 // Initializers done | 10024 // Initializers done |
| 10019 Statement.call(this, span); | 10025 Statement.call(this, span); |
| 10020 } | 10026 } |
| 10021 $inherits(TryStatement, Statement); | |
| 10022 TryStatement.prototype.get$body = function() { return this.body; }; | 10027 TryStatement.prototype.get$body = function() { return this.body; }; |
| 10023 TryStatement.prototype.set$body = function(value) { return this.body = value; }; | 10028 TryStatement.prototype.set$body = function(value) { return this.body = value; }; |
| 10024 TryStatement.prototype.visit = function(visitor) { | 10029 TryStatement.prototype.visit = function(visitor) { |
| 10025 return visitor.visitTryStatement(this); | 10030 return visitor.visitTryStatement(this); |
| 10026 } | 10031 } |
| 10027 TryStatement.prototype.visit$1 = TryStatement.prototype.visit; | 10032 TryStatement.prototype.visit$1 = TryStatement.prototype.visit; |
| 10028 // ********** Code for SwitchStatement ************** | 10033 // ********** Code for SwitchStatement ************** |
| 10034 $inherits(SwitchStatement, Statement); |
| 10029 function SwitchStatement(test, cases, span) { | 10035 function SwitchStatement(test, cases, span) { |
| 10030 this.test = test; | 10036 this.test = test; |
| 10031 this.cases = cases; | 10037 this.cases = cases; |
| 10032 // Initializers done | 10038 // Initializers done |
| 10033 Statement.call(this, span); | 10039 Statement.call(this, span); |
| 10034 } | 10040 } |
| 10035 $inherits(SwitchStatement, Statement); | |
| 10036 SwitchStatement.prototype.get$cases = function() { return this.cases; }; | 10041 SwitchStatement.prototype.get$cases = function() { return this.cases; }; |
| 10037 SwitchStatement.prototype.set$cases = function(value) { return this.cases = valu
e; }; | 10042 SwitchStatement.prototype.set$cases = function(value) { return this.cases = valu
e; }; |
| 10038 SwitchStatement.prototype.visit = function(visitor) { | 10043 SwitchStatement.prototype.visit = function(visitor) { |
| 10039 return visitor.visitSwitchStatement(this); | 10044 return visitor.visitSwitchStatement(this); |
| 10040 } | 10045 } |
| 10041 SwitchStatement.prototype.visit$1 = SwitchStatement.prototype.visit; | 10046 SwitchStatement.prototype.visit$1 = SwitchStatement.prototype.visit; |
| 10042 // ********** Code for BlockStatement ************** | 10047 // ********** Code for BlockStatement ************** |
| 10048 $inherits(BlockStatement, Statement); |
| 10043 function BlockStatement(body, span) { | 10049 function BlockStatement(body, span) { |
| 10044 this.body = body; | 10050 this.body = body; |
| 10045 // Initializers done | 10051 // Initializers done |
| 10046 Statement.call(this, span); | 10052 Statement.call(this, span); |
| 10047 } | 10053 } |
| 10048 $inherits(BlockStatement, Statement); | |
| 10049 BlockStatement.prototype.get$body = function() { return this.body; }; | 10054 BlockStatement.prototype.get$body = function() { return this.body; }; |
| 10050 BlockStatement.prototype.set$body = function(value) { return this.body = value;
}; | 10055 BlockStatement.prototype.set$body = function(value) { return this.body = value;
}; |
| 10051 BlockStatement.prototype.visit = function(visitor) { | 10056 BlockStatement.prototype.visit = function(visitor) { |
| 10052 return visitor.visitBlockStatement(this); | 10057 return visitor.visitBlockStatement(this); |
| 10053 } | 10058 } |
| 10054 BlockStatement.prototype.visit$1 = BlockStatement.prototype.visit; | 10059 BlockStatement.prototype.visit$1 = BlockStatement.prototype.visit; |
| 10055 // ********** Code for LabeledStatement ************** | 10060 // ********** Code for LabeledStatement ************** |
| 10061 $inherits(LabeledStatement, Statement); |
| 10056 function LabeledStatement(name, body, span) { | 10062 function LabeledStatement(name, body, span) { |
| 10057 this.name = name; | 10063 this.name = name; |
| 10058 this.body = body; | 10064 this.body = body; |
| 10059 // Initializers done | 10065 // Initializers done |
| 10060 Statement.call(this, span); | 10066 Statement.call(this, span); |
| 10061 } | 10067 } |
| 10062 $inherits(LabeledStatement, Statement); | |
| 10063 LabeledStatement.prototype.get$name = function() { return this.name; }; | 10068 LabeledStatement.prototype.get$name = function() { return this.name; }; |
| 10064 LabeledStatement.prototype.set$name = function(value) { return this.name = value
; }; | 10069 LabeledStatement.prototype.set$name = function(value) { return this.name = value
; }; |
| 10065 LabeledStatement.prototype.get$body = function() { return this.body; }; | 10070 LabeledStatement.prototype.get$body = function() { return this.body; }; |
| 10066 LabeledStatement.prototype.set$body = function(value) { return this.body = value
; }; | 10071 LabeledStatement.prototype.set$body = function(value) { return this.body = value
; }; |
| 10067 LabeledStatement.prototype.visit = function(visitor) { | 10072 LabeledStatement.prototype.visit = function(visitor) { |
| 10068 return visitor.visitLabeledStatement(this); | 10073 return visitor.visitLabeledStatement(this); |
| 10069 } | 10074 } |
| 10070 LabeledStatement.prototype.visit$1 = LabeledStatement.prototype.visit; | 10075 LabeledStatement.prototype.visit$1 = LabeledStatement.prototype.visit; |
| 10071 // ********** Code for ExpressionStatement ************** | 10076 // ********** Code for ExpressionStatement ************** |
| 10077 $inherits(ExpressionStatement, Statement); |
| 10072 function ExpressionStatement(body, span) { | 10078 function ExpressionStatement(body, span) { |
| 10073 this.body = body; | 10079 this.body = body; |
| 10074 // Initializers done | 10080 // Initializers done |
| 10075 Statement.call(this, span); | 10081 Statement.call(this, span); |
| 10076 } | 10082 } |
| 10077 $inherits(ExpressionStatement, Statement); | |
| 10078 ExpressionStatement.prototype.get$body = function() { return this.body; }; | 10083 ExpressionStatement.prototype.get$body = function() { return this.body; }; |
| 10079 ExpressionStatement.prototype.set$body = function(value) { return this.body = va
lue; }; | 10084 ExpressionStatement.prototype.set$body = function(value) { return this.body = va
lue; }; |
| 10080 ExpressionStatement.prototype.visit = function(visitor) { | 10085 ExpressionStatement.prototype.visit = function(visitor) { |
| 10081 return visitor.visitExpressionStatement(this); | 10086 return visitor.visitExpressionStatement(this); |
| 10082 } | 10087 } |
| 10083 ExpressionStatement.prototype.visit$1 = ExpressionStatement.prototype.visit; | 10088 ExpressionStatement.prototype.visit$1 = ExpressionStatement.prototype.visit; |
| 10084 // ********** Code for EmptyStatement ************** | 10089 // ********** Code for EmptyStatement ************** |
| 10090 $inherits(EmptyStatement, Statement); |
| 10085 function EmptyStatement(span) { | 10091 function EmptyStatement(span) { |
| 10086 // Initializers done | 10092 // Initializers done |
| 10087 Statement.call(this, span); | 10093 Statement.call(this, span); |
| 10088 } | 10094 } |
| 10089 $inherits(EmptyStatement, Statement); | |
| 10090 EmptyStatement.prototype.visit = function(visitor) { | 10095 EmptyStatement.prototype.visit = function(visitor) { |
| 10091 return visitor.visitEmptyStatement(this); | 10096 return visitor.visitEmptyStatement(this); |
| 10092 } | 10097 } |
| 10093 EmptyStatement.prototype.visit$1 = EmptyStatement.prototype.visit; | 10098 EmptyStatement.prototype.visit$1 = EmptyStatement.prototype.visit; |
| 10094 // ********** Code for DietStatement ************** | 10099 // ********** Code for DietStatement ************** |
| 10100 $inherits(DietStatement, Statement); |
| 10095 function DietStatement(span) { | 10101 function DietStatement(span) { |
| 10096 // Initializers done | 10102 // Initializers done |
| 10097 Statement.call(this, span); | 10103 Statement.call(this, span); |
| 10098 } | 10104 } |
| 10099 $inherits(DietStatement, Statement); | |
| 10100 DietStatement.prototype.visit = function(visitor) { | 10105 DietStatement.prototype.visit = function(visitor) { |
| 10101 return visitor.visitDietStatement(this); | 10106 return visitor.visitDietStatement(this); |
| 10102 } | 10107 } |
| 10103 DietStatement.prototype.visit$1 = DietStatement.prototype.visit; | 10108 DietStatement.prototype.visit$1 = DietStatement.prototype.visit; |
| 10104 // ********** Code for LambdaExpression ************** | 10109 // ********** Code for LambdaExpression ************** |
| 10110 $inherits(LambdaExpression, Expression); |
| 10105 function LambdaExpression(func, span) { | 10111 function LambdaExpression(func, span) { |
| 10106 this.func = func; | 10112 this.func = func; |
| 10107 // Initializers done | 10113 // Initializers done |
| 10108 Expression.call(this, span); | 10114 Expression.call(this, span); |
| 10109 } | 10115 } |
| 10110 $inherits(LambdaExpression, Expression); | |
| 10111 LambdaExpression.prototype.get$func = function() { return this.func; }; | 10116 LambdaExpression.prototype.get$func = function() { return this.func; }; |
| 10112 LambdaExpression.prototype.set$func = function(value) { return this.func = value
; }; | 10117 LambdaExpression.prototype.set$func = function(value) { return this.func = value
; }; |
| 10113 LambdaExpression.prototype.visit = function(visitor) { | 10118 LambdaExpression.prototype.visit = function(visitor) { |
| 10114 return visitor.visitLambdaExpression(this); | 10119 return visitor.visitLambdaExpression(this); |
| 10115 } | 10120 } |
| 10116 LambdaExpression.prototype.visit$1 = LambdaExpression.prototype.visit; | 10121 LambdaExpression.prototype.visit$1 = LambdaExpression.prototype.visit; |
| 10117 // ********** Code for CallExpression ************** | 10122 // ********** Code for CallExpression ************** |
| 10123 $inherits(CallExpression, Expression); |
| 10118 function CallExpression(target, arguments, span) { | 10124 function CallExpression(target, arguments, span) { |
| 10119 this.target = target; | 10125 this.target = target; |
| 10120 this.arguments = arguments; | 10126 this.arguments = arguments; |
| 10121 // Initializers done | 10127 // Initializers done |
| 10122 Expression.call(this, span); | 10128 Expression.call(this, span); |
| 10123 } | 10129 } |
| 10124 $inherits(CallExpression, Expression); | |
| 10125 CallExpression.prototype.get$target = function() { return this.target; }; | 10130 CallExpression.prototype.get$target = function() { return this.target; }; |
| 10126 CallExpression.prototype.set$target = function(value) { return this.target = val
ue; }; | 10131 CallExpression.prototype.set$target = function(value) { return this.target = val
ue; }; |
| 10127 CallExpression.prototype.get$arguments = function() { return this.arguments; }; | 10132 CallExpression.prototype.get$arguments = function() { return this.arguments; }; |
| 10128 CallExpression.prototype.set$arguments = function(value) { return this.arguments
= value; }; | 10133 CallExpression.prototype.set$arguments = function(value) { return this.arguments
= value; }; |
| 10129 CallExpression.prototype.visit = function(visitor) { | 10134 CallExpression.prototype.visit = function(visitor) { |
| 10130 return visitor.visitCallExpression(this); | 10135 return visitor.visitCallExpression(this); |
| 10131 } | 10136 } |
| 10132 CallExpression.prototype.visit$1 = CallExpression.prototype.visit; | 10137 CallExpression.prototype.visit$1 = CallExpression.prototype.visit; |
| 10133 // ********** Code for IndexExpression ************** | 10138 // ********** Code for IndexExpression ************** |
| 10139 $inherits(IndexExpression, Expression); |
| 10134 function IndexExpression(target, index, span) { | 10140 function IndexExpression(target, index, span) { |
| 10135 this.target = target; | 10141 this.target = target; |
| 10136 this.index = index; | 10142 this.index = index; |
| 10137 // Initializers done | 10143 // Initializers done |
| 10138 Expression.call(this, span); | 10144 Expression.call(this, span); |
| 10139 } | 10145 } |
| 10140 $inherits(IndexExpression, Expression); | |
| 10141 IndexExpression.prototype.get$target = function() { return this.target; }; | 10146 IndexExpression.prototype.get$target = function() { return this.target; }; |
| 10142 IndexExpression.prototype.set$target = function(value) { return this.target = va
lue; }; | 10147 IndexExpression.prototype.set$target = function(value) { return this.target = va
lue; }; |
| 10143 IndexExpression.prototype.visit = function(visitor) { | 10148 IndexExpression.prototype.visit = function(visitor) { |
| 10144 return visitor.visitIndexExpression(this); | 10149 return visitor.visitIndexExpression(this); |
| 10145 } | 10150 } |
| 10146 IndexExpression.prototype.visit$1 = IndexExpression.prototype.visit; | 10151 IndexExpression.prototype.visit$1 = IndexExpression.prototype.visit; |
| 10147 // ********** Code for BinaryExpression ************** | 10152 // ********** Code for BinaryExpression ************** |
| 10153 $inherits(BinaryExpression, Expression); |
| 10148 function BinaryExpression(op, x, y, span) { | 10154 function BinaryExpression(op, x, y, span) { |
| 10149 this.op = op; | 10155 this.op = op; |
| 10150 this.x = x; | 10156 this.x = x; |
| 10151 this.y = y; | 10157 this.y = y; |
| 10152 // Initializers done | 10158 // Initializers done |
| 10153 Expression.call(this, span); | 10159 Expression.call(this, span); |
| 10154 } | 10160 } |
| 10155 $inherits(BinaryExpression, Expression); | |
| 10156 BinaryExpression.prototype.get$op = function() { return this.op; }; | 10161 BinaryExpression.prototype.get$op = function() { return this.op; }; |
| 10157 BinaryExpression.prototype.set$op = function(value) { return this.op = value; }; | 10162 BinaryExpression.prototype.set$op = function(value) { return this.op = value; }; |
| 10158 BinaryExpression.prototype.get$x = function() { return this.x; }; | 10163 BinaryExpression.prototype.get$x = function() { return this.x; }; |
| 10159 BinaryExpression.prototype.set$x = function(value) { return this.x = value; }; | 10164 BinaryExpression.prototype.set$x = function(value) { return this.x = value; }; |
| 10160 BinaryExpression.prototype.get$y = function() { return this.y; }; | 10165 BinaryExpression.prototype.get$y = function() { return this.y; }; |
| 10161 BinaryExpression.prototype.set$y = function(value) { return this.y = value; }; | 10166 BinaryExpression.prototype.set$y = function(value) { return this.y = value; }; |
| 10162 BinaryExpression.prototype.visit = function(visitor) { | 10167 BinaryExpression.prototype.visit = function(visitor) { |
| 10163 return visitor.visitBinaryExpression$1(this); | 10168 return visitor.visitBinaryExpression$1(this); |
| 10164 } | 10169 } |
| 10165 BinaryExpression.prototype.visit$1 = BinaryExpression.prototype.visit; | 10170 BinaryExpression.prototype.visit$1 = BinaryExpression.prototype.visit; |
| 10166 // ********** Code for UnaryExpression ************** | 10171 // ********** Code for UnaryExpression ************** |
| 10172 $inherits(UnaryExpression, Expression); |
| 10167 function UnaryExpression(op, self, span) { | 10173 function UnaryExpression(op, self, span) { |
| 10168 this.op = op; | 10174 this.op = op; |
| 10169 this.self = self; | 10175 this.self = self; |
| 10170 // Initializers done | 10176 // Initializers done |
| 10171 Expression.call(this, span); | 10177 Expression.call(this, span); |
| 10172 } | 10178 } |
| 10173 $inherits(UnaryExpression, Expression); | |
| 10174 UnaryExpression.prototype.get$op = function() { return this.op; }; | 10179 UnaryExpression.prototype.get$op = function() { return this.op; }; |
| 10175 UnaryExpression.prototype.set$op = function(value) { return this.op = value; }; | 10180 UnaryExpression.prototype.set$op = function(value) { return this.op = value; }; |
| 10176 UnaryExpression.prototype.get$self = function() { return this.self; }; | 10181 UnaryExpression.prototype.get$self = function() { return this.self; }; |
| 10177 UnaryExpression.prototype.set$self = function(value) { return this.self = value;
}; | 10182 UnaryExpression.prototype.set$self = function(value) { return this.self = value;
}; |
| 10178 UnaryExpression.prototype.visit = function(visitor) { | 10183 UnaryExpression.prototype.visit = function(visitor) { |
| 10179 return visitor.visitUnaryExpression(this); | 10184 return visitor.visitUnaryExpression(this); |
| 10180 } | 10185 } |
| 10181 UnaryExpression.prototype.visit$1 = UnaryExpression.prototype.visit; | 10186 UnaryExpression.prototype.visit$1 = UnaryExpression.prototype.visit; |
| 10182 // ********** Code for PostfixExpression ************** | 10187 // ********** Code for PostfixExpression ************** |
| 10188 $inherits(PostfixExpression, Expression); |
| 10183 function PostfixExpression(body, op, span) { | 10189 function PostfixExpression(body, op, span) { |
| 10184 this.body = body; | 10190 this.body = body; |
| 10185 this.op = op; | 10191 this.op = op; |
| 10186 // Initializers done | 10192 // Initializers done |
| 10187 Expression.call(this, span); | 10193 Expression.call(this, span); |
| 10188 } | 10194 } |
| 10189 $inherits(PostfixExpression, Expression); | |
| 10190 PostfixExpression.prototype.get$body = function() { return this.body; }; | 10195 PostfixExpression.prototype.get$body = function() { return this.body; }; |
| 10191 PostfixExpression.prototype.set$body = function(value) { return this.body = valu
e; }; | 10196 PostfixExpression.prototype.set$body = function(value) { return this.body = valu
e; }; |
| 10192 PostfixExpression.prototype.get$op = function() { return this.op; }; | 10197 PostfixExpression.prototype.get$op = function() { return this.op; }; |
| 10193 PostfixExpression.prototype.set$op = function(value) { return this.op = value; }
; | 10198 PostfixExpression.prototype.set$op = function(value) { return this.op = value; }
; |
| 10194 PostfixExpression.prototype.visit = function(visitor) { | 10199 PostfixExpression.prototype.visit = function(visitor) { |
| 10195 return visitor.visitPostfixExpression$1(this); | 10200 return visitor.visitPostfixExpression$1(this); |
| 10196 } | 10201 } |
| 10197 PostfixExpression.prototype.visit$1 = PostfixExpression.prototype.visit; | 10202 PostfixExpression.prototype.visit$1 = PostfixExpression.prototype.visit; |
| 10198 // ********** Code for NewExpression ************** | 10203 // ********** Code for NewExpression ************** |
| 10204 $inherits(NewExpression, Expression); |
| 10199 function NewExpression(isConst, type, name, arguments, span) { | 10205 function NewExpression(isConst, type, name, arguments, span) { |
| 10200 this.isConst = isConst; | 10206 this.isConst = isConst; |
| 10201 this.type = type; | 10207 this.type = type; |
| 10202 this.name = name; | 10208 this.name = name; |
| 10203 this.arguments = arguments; | 10209 this.arguments = arguments; |
| 10204 // Initializers done | 10210 // Initializers done |
| 10205 Expression.call(this, span); | 10211 Expression.call(this, span); |
| 10206 } | 10212 } |
| 10207 $inherits(NewExpression, Expression); | |
| 10208 NewExpression.prototype.get$isConst = function() { return this.isConst; }; | 10213 NewExpression.prototype.get$isConst = function() { return this.isConst; }; |
| 10209 NewExpression.prototype.set$isConst = function(value) { return this.isConst = va
lue; }; | 10214 NewExpression.prototype.set$isConst = function(value) { return this.isConst = va
lue; }; |
| 10210 NewExpression.prototype.get$type = function() { return this.type; }; | 10215 NewExpression.prototype.get$type = function() { return this.type; }; |
| 10211 NewExpression.prototype.set$type = function(value) { return this.type = value; }
; | 10216 NewExpression.prototype.set$type = function(value) { return this.type = value; }
; |
| 10212 NewExpression.prototype.get$name = function() { return this.name; }; | 10217 NewExpression.prototype.get$name = function() { return this.name; }; |
| 10213 NewExpression.prototype.set$name = function(value) { return this.name = value; }
; | 10218 NewExpression.prototype.set$name = function(value) { return this.name = value; }
; |
| 10214 NewExpression.prototype.get$arguments = function() { return this.arguments; }; | 10219 NewExpression.prototype.get$arguments = function() { return this.arguments; }; |
| 10215 NewExpression.prototype.set$arguments = function(value) { return this.arguments
= value; }; | 10220 NewExpression.prototype.set$arguments = function(value) { return this.arguments
= value; }; |
| 10216 NewExpression.prototype.visit = function(visitor) { | 10221 NewExpression.prototype.visit = function(visitor) { |
| 10217 return visitor.visitNewExpression(this); | 10222 return visitor.visitNewExpression(this); |
| 10218 } | 10223 } |
| 10219 NewExpression.prototype.visit$1 = NewExpression.prototype.visit; | 10224 NewExpression.prototype.visit$1 = NewExpression.prototype.visit; |
| 10220 // ********** Code for ListExpression ************** | 10225 // ********** Code for ListExpression ************** |
| 10226 $inherits(ListExpression, Expression); |
| 10221 function ListExpression(isConst, type, values, span) { | 10227 function ListExpression(isConst, type, values, span) { |
| 10222 this.isConst = isConst; | 10228 this.isConst = isConst; |
| 10223 this.type = type; | 10229 this.type = type; |
| 10224 this.values = values; | 10230 this.values = values; |
| 10225 // Initializers done | 10231 // Initializers done |
| 10226 Expression.call(this, span); | 10232 Expression.call(this, span); |
| 10227 } | 10233 } |
| 10228 $inherits(ListExpression, Expression); | |
| 10229 ListExpression.prototype.get$isConst = function() { return this.isConst; }; | 10234 ListExpression.prototype.get$isConst = function() { return this.isConst; }; |
| 10230 ListExpression.prototype.set$isConst = function(value) { return this.isConst = v
alue; }; | 10235 ListExpression.prototype.set$isConst = function(value) { return this.isConst = v
alue; }; |
| 10231 ListExpression.prototype.get$type = function() { return this.type; }; | 10236 ListExpression.prototype.get$type = function() { return this.type; }; |
| 10232 ListExpression.prototype.set$type = function(value) { return this.type = value;
}; | 10237 ListExpression.prototype.set$type = function(value) { return this.type = value;
}; |
| 10233 ListExpression.prototype.get$values = function() { return this.values; }; | 10238 ListExpression.prototype.get$values = function() { return this.values; }; |
| 10234 ListExpression.prototype.set$values = function(value) { return this.values = val
ue; }; | 10239 ListExpression.prototype.set$values = function(value) { return this.values = val
ue; }; |
| 10235 ListExpression.prototype.visit = function(visitor) { | 10240 ListExpression.prototype.visit = function(visitor) { |
| 10236 return visitor.visitListExpression(this); | 10241 return visitor.visitListExpression(this); |
| 10237 } | 10242 } |
| 10238 ListExpression.prototype.visit$1 = ListExpression.prototype.visit; | 10243 ListExpression.prototype.visit$1 = ListExpression.prototype.visit; |
| 10239 // ********** Code for MapExpression ************** | 10244 // ********** Code for MapExpression ************** |
| 10245 $inherits(MapExpression, Expression); |
| 10240 function MapExpression(isConst, type, items, span) { | 10246 function MapExpression(isConst, type, items, span) { |
| 10241 this.isConst = isConst; | 10247 this.isConst = isConst; |
| 10242 this.type = type; | 10248 this.type = type; |
| 10243 this.items = items; | 10249 this.items = items; |
| 10244 // Initializers done | 10250 // Initializers done |
| 10245 Expression.call(this, span); | 10251 Expression.call(this, span); |
| 10246 } | 10252 } |
| 10247 $inherits(MapExpression, Expression); | |
| 10248 MapExpression.prototype.get$isConst = function() { return this.isConst; }; | 10253 MapExpression.prototype.get$isConst = function() { return this.isConst; }; |
| 10249 MapExpression.prototype.set$isConst = function(value) { return this.isConst = va
lue; }; | 10254 MapExpression.prototype.set$isConst = function(value) { return this.isConst = va
lue; }; |
| 10250 MapExpression.prototype.get$type = function() { return this.type; }; | 10255 MapExpression.prototype.get$type = function() { return this.type; }; |
| 10251 MapExpression.prototype.set$type = function(value) { return this.type = value; }
; | 10256 MapExpression.prototype.set$type = function(value) { return this.type = value; }
; |
| 10252 MapExpression.prototype.visit = function(visitor) { | 10257 MapExpression.prototype.visit = function(visitor) { |
| 10253 return visitor.visitMapExpression(this); | 10258 return visitor.visitMapExpression(this); |
| 10254 } | 10259 } |
| 10255 MapExpression.prototype.visit$1 = MapExpression.prototype.visit; | 10260 MapExpression.prototype.visit$1 = MapExpression.prototype.visit; |
| 10256 // ********** Code for ConditionalExpression ************** | 10261 // ********** Code for ConditionalExpression ************** |
| 10262 $inherits(ConditionalExpression, Expression); |
| 10257 function ConditionalExpression(test, trueBranch, falseBranch, span) { | 10263 function ConditionalExpression(test, trueBranch, falseBranch, span) { |
| 10258 this.test = test; | 10264 this.test = test; |
| 10259 this.trueBranch = trueBranch; | 10265 this.trueBranch = trueBranch; |
| 10260 this.falseBranch = falseBranch; | 10266 this.falseBranch = falseBranch; |
| 10261 // Initializers done | 10267 // Initializers done |
| 10262 Expression.call(this, span); | 10268 Expression.call(this, span); |
| 10263 } | 10269 } |
| 10264 $inherits(ConditionalExpression, Expression); | |
| 10265 ConditionalExpression.prototype.visit = function(visitor) { | 10270 ConditionalExpression.prototype.visit = function(visitor) { |
| 10266 return visitor.visitConditionalExpression(this); | 10271 return visitor.visitConditionalExpression(this); |
| 10267 } | 10272 } |
| 10268 ConditionalExpression.prototype.visit$1 = ConditionalExpression.prototype.visit; | 10273 ConditionalExpression.prototype.visit$1 = ConditionalExpression.prototype.visit; |
| 10269 // ********** Code for IsExpression ************** | 10274 // ********** Code for IsExpression ************** |
| 10275 $inherits(IsExpression, Expression); |
| 10270 function IsExpression(isTrue, x, type, span) { | 10276 function IsExpression(isTrue, x, type, span) { |
| 10271 this.isTrue = isTrue; | 10277 this.isTrue = isTrue; |
| 10272 this.x = x; | 10278 this.x = x; |
| 10273 this.type = type; | 10279 this.type = type; |
| 10274 // Initializers done | 10280 // Initializers done |
| 10275 Expression.call(this, span); | 10281 Expression.call(this, span); |
| 10276 } | 10282 } |
| 10277 $inherits(IsExpression, Expression); | |
| 10278 IsExpression.prototype.get$x = function() { return this.x; }; | 10283 IsExpression.prototype.get$x = function() { return this.x; }; |
| 10279 IsExpression.prototype.set$x = function(value) { return this.x = value; }; | 10284 IsExpression.prototype.set$x = function(value) { return this.x = value; }; |
| 10280 IsExpression.prototype.get$type = function() { return this.type; }; | 10285 IsExpression.prototype.get$type = function() { return this.type; }; |
| 10281 IsExpression.prototype.set$type = function(value) { return this.type = value; }; | 10286 IsExpression.prototype.set$type = function(value) { return this.type = value; }; |
| 10282 IsExpression.prototype.visit = function(visitor) { | 10287 IsExpression.prototype.visit = function(visitor) { |
| 10283 return visitor.visitIsExpression(this); | 10288 return visitor.visitIsExpression(this); |
| 10284 } | 10289 } |
| 10285 IsExpression.prototype.visit$1 = IsExpression.prototype.visit; | 10290 IsExpression.prototype.visit$1 = IsExpression.prototype.visit; |
| 10286 // ********** Code for ParenExpression ************** | 10291 // ********** Code for ParenExpression ************** |
| 10292 $inherits(ParenExpression, Expression); |
| 10287 function ParenExpression(body, span) { | 10293 function ParenExpression(body, span) { |
| 10288 this.body = body; | 10294 this.body = body; |
| 10289 // Initializers done | 10295 // Initializers done |
| 10290 Expression.call(this, span); | 10296 Expression.call(this, span); |
| 10291 } | 10297 } |
| 10292 $inherits(ParenExpression, Expression); | |
| 10293 ParenExpression.prototype.get$body = function() { return this.body; }; | 10298 ParenExpression.prototype.get$body = function() { return this.body; }; |
| 10294 ParenExpression.prototype.set$body = function(value) { return this.body = value;
}; | 10299 ParenExpression.prototype.set$body = function(value) { return this.body = value;
}; |
| 10295 ParenExpression.prototype.visit = function(visitor) { | 10300 ParenExpression.prototype.visit = function(visitor) { |
| 10296 return visitor.visitParenExpression(this); | 10301 return visitor.visitParenExpression(this); |
| 10297 } | 10302 } |
| 10298 ParenExpression.prototype.visit$1 = ParenExpression.prototype.visit; | 10303 ParenExpression.prototype.visit$1 = ParenExpression.prototype.visit; |
| 10299 // ********** Code for AwaitExpression ************** | 10304 // ********** Code for AwaitExpression ************** |
| 10305 $inherits(AwaitExpression, Expression); |
| 10300 function AwaitExpression(body, span) { | 10306 function AwaitExpression(body, span) { |
| 10301 this.body = body; | 10307 this.body = body; |
| 10302 // Initializers done | 10308 // Initializers done |
| 10303 Expression.call(this, span); | 10309 Expression.call(this, span); |
| 10304 } | 10310 } |
| 10305 $inherits(AwaitExpression, Expression); | |
| 10306 AwaitExpression.prototype.get$body = function() { return this.body; }; | 10311 AwaitExpression.prototype.get$body = function() { return this.body; }; |
| 10307 AwaitExpression.prototype.set$body = function(value) { return this.body = value;
}; | 10312 AwaitExpression.prototype.set$body = function(value) { return this.body = value;
}; |
| 10308 AwaitExpression.prototype.visit = function(visitor) { | 10313 AwaitExpression.prototype.visit = function(visitor) { |
| 10309 return visitor.visitAwaitExpression(this); | 10314 return visitor.visitAwaitExpression(this); |
| 10310 } | 10315 } |
| 10311 AwaitExpression.prototype.visit$1 = AwaitExpression.prototype.visit; | 10316 AwaitExpression.prototype.visit$1 = AwaitExpression.prototype.visit; |
| 10312 // ********** Code for DotExpression ************** | 10317 // ********** Code for DotExpression ************** |
| 10318 $inherits(DotExpression, Expression); |
| 10313 function DotExpression(self, name, span) { | 10319 function DotExpression(self, name, span) { |
| 10314 this.self = self; | 10320 this.self = self; |
| 10315 this.name = name; | 10321 this.name = name; |
| 10316 // Initializers done | 10322 // Initializers done |
| 10317 Expression.call(this, span); | 10323 Expression.call(this, span); |
| 10318 } | 10324 } |
| 10319 $inherits(DotExpression, Expression); | |
| 10320 DotExpression.prototype.get$self = function() { return this.self; }; | 10325 DotExpression.prototype.get$self = function() { return this.self; }; |
| 10321 DotExpression.prototype.set$self = function(value) { return this.self = value; }
; | 10326 DotExpression.prototype.set$self = function(value) { return this.self = value; }
; |
| 10322 DotExpression.prototype.get$name = function() { return this.name; }; | 10327 DotExpression.prototype.get$name = function() { return this.name; }; |
| 10323 DotExpression.prototype.set$name = function(value) { return this.name = value; }
; | 10328 DotExpression.prototype.set$name = function(value) { return this.name = value; }
; |
| 10324 DotExpression.prototype.visit = function(visitor) { | 10329 DotExpression.prototype.visit = function(visitor) { |
| 10325 return visitor.visitDotExpression(this); | 10330 return visitor.visitDotExpression(this); |
| 10326 } | 10331 } |
| 10327 DotExpression.prototype.visit$1 = DotExpression.prototype.visit; | 10332 DotExpression.prototype.visit$1 = DotExpression.prototype.visit; |
| 10328 // ********** Code for VarExpression ************** | 10333 // ********** Code for VarExpression ************** |
| 10334 $inherits(VarExpression, Expression); |
| 10329 function VarExpression(name, span) { | 10335 function VarExpression(name, span) { |
| 10330 this.name = name; | 10336 this.name = name; |
| 10331 // Initializers done | 10337 // Initializers done |
| 10332 Expression.call(this, span); | 10338 Expression.call(this, span); |
| 10333 } | 10339 } |
| 10334 $inherits(VarExpression, Expression); | |
| 10335 VarExpression.prototype.get$name = function() { return this.name; }; | 10340 VarExpression.prototype.get$name = function() { return this.name; }; |
| 10336 VarExpression.prototype.set$name = function(value) { return this.name = value; }
; | 10341 VarExpression.prototype.set$name = function(value) { return this.name = value; }
; |
| 10337 VarExpression.prototype.visit = function(visitor) { | 10342 VarExpression.prototype.visit = function(visitor) { |
| 10338 return visitor.visitVarExpression(this); | 10343 return visitor.visitVarExpression(this); |
| 10339 } | 10344 } |
| 10340 VarExpression.prototype.visit$1 = VarExpression.prototype.visit; | 10345 VarExpression.prototype.visit$1 = VarExpression.prototype.visit; |
| 10341 // ********** Code for ThisExpression ************** | 10346 // ********** Code for ThisExpression ************** |
| 10347 $inherits(ThisExpression, Expression); |
| 10342 function ThisExpression(span) { | 10348 function ThisExpression(span) { |
| 10343 // Initializers done | 10349 // Initializers done |
| 10344 Expression.call(this, span); | 10350 Expression.call(this, span); |
| 10345 } | 10351 } |
| 10346 $inherits(ThisExpression, Expression); | |
| 10347 ThisExpression.prototype.visit = function(visitor) { | 10352 ThisExpression.prototype.visit = function(visitor) { |
| 10348 return visitor.visitThisExpression(this); | 10353 return visitor.visitThisExpression(this); |
| 10349 } | 10354 } |
| 10350 ThisExpression.prototype.visit$1 = ThisExpression.prototype.visit; | 10355 ThisExpression.prototype.visit$1 = ThisExpression.prototype.visit; |
| 10351 // ********** Code for SuperExpression ************** | 10356 // ********** Code for SuperExpression ************** |
| 10357 $inherits(SuperExpression, Expression); |
| 10352 function SuperExpression(span) { | 10358 function SuperExpression(span) { |
| 10353 // Initializers done | 10359 // Initializers done |
| 10354 Expression.call(this, span); | 10360 Expression.call(this, span); |
| 10355 } | 10361 } |
| 10356 $inherits(SuperExpression, Expression); | |
| 10357 SuperExpression.prototype.visit = function(visitor) { | 10362 SuperExpression.prototype.visit = function(visitor) { |
| 10358 return visitor.visitSuperExpression(this); | 10363 return visitor.visitSuperExpression(this); |
| 10359 } | 10364 } |
| 10360 SuperExpression.prototype.visit$1 = SuperExpression.prototype.visit; | 10365 SuperExpression.prototype.visit$1 = SuperExpression.prototype.visit; |
| 10361 // ********** Code for NullExpression ************** | 10366 // ********** Code for NullExpression ************** |
| 10367 $inherits(NullExpression, Expression); |
| 10362 function NullExpression(span) { | 10368 function NullExpression(span) { |
| 10363 // Initializers done | 10369 // Initializers done |
| 10364 Expression.call(this, span); | 10370 Expression.call(this, span); |
| 10365 } | 10371 } |
| 10366 $inherits(NullExpression, Expression); | |
| 10367 NullExpression.prototype.visit = function(visitor) { | 10372 NullExpression.prototype.visit = function(visitor) { |
| 10368 return visitor.visitNullExpression(this); | 10373 return visitor.visitNullExpression(this); |
| 10369 } | 10374 } |
| 10370 NullExpression.prototype.visit$1 = NullExpression.prototype.visit; | 10375 NullExpression.prototype.visit$1 = NullExpression.prototype.visit; |
| 10371 // ********** Code for LiteralExpression ************** | 10376 // ********** Code for LiteralExpression ************** |
| 10377 $inherits(LiteralExpression, Expression); |
| 10372 function LiteralExpression(value, type, text, span) { | 10378 function LiteralExpression(value, type, text, span) { |
| 10373 this.value = value; | 10379 this.value = value; |
| 10374 this.type = type; | 10380 this.type = type; |
| 10375 this.text = text; | 10381 this.text = text; |
| 10376 // Initializers done | 10382 // Initializers done |
| 10377 Expression.call(this, span); | 10383 Expression.call(this, span); |
| 10378 } | 10384 } |
| 10379 $inherits(LiteralExpression, Expression); | |
| 10380 LiteralExpression.prototype.get$value = function() { return this.value; }; | 10385 LiteralExpression.prototype.get$value = function() { return this.value; }; |
| 10381 LiteralExpression.prototype.set$value = function(value) { return this.value = va
lue; }; | 10386 LiteralExpression.prototype.set$value = function(value) { return this.value = va
lue; }; |
| 10382 LiteralExpression.prototype.get$type = function() { return this.type; }; | 10387 LiteralExpression.prototype.get$type = function() { return this.type; }; |
| 10383 LiteralExpression.prototype.set$type = function(value) { return this.type = valu
e; }; | 10388 LiteralExpression.prototype.set$type = function(value) { return this.type = valu
e; }; |
| 10384 LiteralExpression.prototype.get$text = function() { return this.text; }; | 10389 LiteralExpression.prototype.get$text = function() { return this.text; }; |
| 10385 LiteralExpression.prototype.set$text = function(value) { return this.text = valu
e; }; | 10390 LiteralExpression.prototype.set$text = function(value) { return this.text = valu
e; }; |
| 10386 LiteralExpression.prototype.visit = function(visitor) { | 10391 LiteralExpression.prototype.visit = function(visitor) { |
| 10387 return visitor.visitLiteralExpression(this); | 10392 return visitor.visitLiteralExpression(this); |
| 10388 } | 10393 } |
| 10389 LiteralExpression.prototype.visit$1 = LiteralExpression.prototype.visit; | 10394 LiteralExpression.prototype.visit$1 = LiteralExpression.prototype.visit; |
| 10390 // ********** Code for NameTypeReference ************** | 10395 // ********** Code for NameTypeReference ************** |
| 10396 $inherits(NameTypeReference, TypeReference); |
| 10391 function NameTypeReference(isFinal, name, names, span) { | 10397 function NameTypeReference(isFinal, name, names, span) { |
| 10392 this.isFinal = isFinal; | 10398 this.isFinal = isFinal; |
| 10393 this.name = name; | 10399 this.name = name; |
| 10394 this.names = names; | 10400 this.names = names; |
| 10395 // Initializers done | 10401 // Initializers done |
| 10396 TypeReference.call(this, span); | 10402 TypeReference.call(this, span); |
| 10397 } | 10403 } |
| 10398 $inherits(NameTypeReference, TypeReference); | |
| 10399 NameTypeReference.prototype.get$isFinal = function() { return this.isFinal; }; | 10404 NameTypeReference.prototype.get$isFinal = function() { return this.isFinal; }; |
| 10400 NameTypeReference.prototype.set$isFinal = function(value) { return this.isFinal
= value; }; | 10405 NameTypeReference.prototype.set$isFinal = function(value) { return this.isFinal
= value; }; |
| 10401 NameTypeReference.prototype.get$name = function() { return this.name; }; | 10406 NameTypeReference.prototype.get$name = function() { return this.name; }; |
| 10402 NameTypeReference.prototype.set$name = function(value) { return this.name = valu
e; }; | 10407 NameTypeReference.prototype.set$name = function(value) { return this.name = valu
e; }; |
| 10403 NameTypeReference.prototype.get$names = function() { return this.names; }; | 10408 NameTypeReference.prototype.get$names = function() { return this.names; }; |
| 10404 NameTypeReference.prototype.set$names = function(value) { return this.names = va
lue; }; | 10409 NameTypeReference.prototype.set$names = function(value) { return this.names = va
lue; }; |
| 10405 NameTypeReference.prototype.visit = function(visitor) { | 10410 NameTypeReference.prototype.visit = function(visitor) { |
| 10406 return visitor.visitNameTypeReference(this); | 10411 return visitor.visitNameTypeReference(this); |
| 10407 } | 10412 } |
| 10408 NameTypeReference.prototype.visit$1 = NameTypeReference.prototype.visit; | 10413 NameTypeReference.prototype.visit$1 = NameTypeReference.prototype.visit; |
| 10409 // ********** Code for GenericTypeReference ************** | 10414 // ********** Code for GenericTypeReference ************** |
| 10415 $inherits(GenericTypeReference, TypeReference); |
| 10410 function GenericTypeReference(baseType, typeArguments, depth, span) { | 10416 function GenericTypeReference(baseType, typeArguments, depth, span) { |
| 10411 this.baseType = baseType; | 10417 this.baseType = baseType; |
| 10412 this.typeArguments = typeArguments; | 10418 this.typeArguments = typeArguments; |
| 10413 this.depth = depth; | 10419 this.depth = depth; |
| 10414 // Initializers done | 10420 // Initializers done |
| 10415 TypeReference.call(this, span); | 10421 TypeReference.call(this, span); |
| 10416 } | 10422 } |
| 10417 $inherits(GenericTypeReference, TypeReference); | |
| 10418 GenericTypeReference.prototype.get$baseType = function() { return this.baseType;
}; | 10423 GenericTypeReference.prototype.get$baseType = function() { return this.baseType;
}; |
| 10419 GenericTypeReference.prototype.set$baseType = function(value) { return this.base
Type = value; }; | 10424 GenericTypeReference.prototype.set$baseType = function(value) { return this.base
Type = value; }; |
| 10420 GenericTypeReference.prototype.get$typeArguments = function() { return this.type
Arguments; }; | 10425 GenericTypeReference.prototype.get$typeArguments = function() { return this.type
Arguments; }; |
| 10421 GenericTypeReference.prototype.set$typeArguments = function(value) { return this
.typeArguments = value; }; | 10426 GenericTypeReference.prototype.set$typeArguments = function(value) { return this
.typeArguments = value; }; |
| 10422 GenericTypeReference.prototype.get$depth = function() { return this.depth; }; | 10427 GenericTypeReference.prototype.get$depth = function() { return this.depth; }; |
| 10423 GenericTypeReference.prototype.set$depth = function(value) { return this.depth =
value; }; | 10428 GenericTypeReference.prototype.set$depth = function(value) { return this.depth =
value; }; |
| 10424 GenericTypeReference.prototype.visit = function(visitor) { | 10429 GenericTypeReference.prototype.visit = function(visitor) { |
| 10425 return visitor.visitGenericTypeReference(this); | 10430 return visitor.visitGenericTypeReference(this); |
| 10426 } | 10431 } |
| 10427 GenericTypeReference.prototype.visit$1 = GenericTypeReference.prototype.visit; | 10432 GenericTypeReference.prototype.visit$1 = GenericTypeReference.prototype.visit; |
| 10428 // ********** Code for FunctionTypeReference ************** | 10433 // ********** Code for FunctionTypeReference ************** |
| 10434 $inherits(FunctionTypeReference, TypeReference); |
| 10429 function FunctionTypeReference(isFinal, func, span) { | 10435 function FunctionTypeReference(isFinal, func, span) { |
| 10430 this.isFinal = isFinal; | 10436 this.isFinal = isFinal; |
| 10431 this.func = func; | 10437 this.func = func; |
| 10432 // Initializers done | 10438 // Initializers done |
| 10433 TypeReference.call(this, span); | 10439 TypeReference.call(this, span); |
| 10434 } | 10440 } |
| 10435 $inherits(FunctionTypeReference, TypeReference); | |
| 10436 FunctionTypeReference.prototype.get$isFinal = function() { return this.isFinal;
}; | 10441 FunctionTypeReference.prototype.get$isFinal = function() { return this.isFinal;
}; |
| 10437 FunctionTypeReference.prototype.set$isFinal = function(value) { return this.isFi
nal = value; }; | 10442 FunctionTypeReference.prototype.set$isFinal = function(value) { return this.isFi
nal = value; }; |
| 10438 FunctionTypeReference.prototype.get$func = function() { return this.func; }; | 10443 FunctionTypeReference.prototype.get$func = function() { return this.func; }; |
| 10439 FunctionTypeReference.prototype.set$func = function(value) { return this.func =
value; }; | 10444 FunctionTypeReference.prototype.set$func = function(value) { return this.func =
value; }; |
| 10440 FunctionTypeReference.prototype.visit = function(visitor) { | 10445 FunctionTypeReference.prototype.visit = function(visitor) { |
| 10441 return visitor.visitFunctionTypeReference(this); | 10446 return visitor.visitFunctionTypeReference(this); |
| 10442 } | 10447 } |
| 10443 FunctionTypeReference.prototype.visit$1 = FunctionTypeReference.prototype.visit; | 10448 FunctionTypeReference.prototype.visit$1 = FunctionTypeReference.prototype.visit; |
| 10444 // ********** Code for ArgumentNode ************** | 10449 // ********** Code for ArgumentNode ************** |
| 10450 $inherits(ArgumentNode, Node); |
| 10445 function ArgumentNode(label, value, span) { | 10451 function ArgumentNode(label, value, span) { |
| 10446 this.label = label; | 10452 this.label = label; |
| 10447 this.value = value; | 10453 this.value = value; |
| 10448 // Initializers done | 10454 // Initializers done |
| 10449 Node.call(this, span); | 10455 Node.call(this, span); |
| 10450 } | 10456 } |
| 10451 $inherits(ArgumentNode, Node); | |
| 10452 ArgumentNode.prototype.get$label = function() { return this.label; }; | 10457 ArgumentNode.prototype.get$label = function() { return this.label; }; |
| 10453 ArgumentNode.prototype.set$label = function(value) { return this.label = value;
}; | 10458 ArgumentNode.prototype.set$label = function(value) { return this.label = value;
}; |
| 10454 ArgumentNode.prototype.get$value = function() { return this.value; }; | 10459 ArgumentNode.prototype.get$value = function() { return this.value; }; |
| 10455 ArgumentNode.prototype.set$value = function(value) { return this.value = value;
}; | 10460 ArgumentNode.prototype.set$value = function(value) { return this.value = value;
}; |
| 10456 ArgumentNode.prototype.visit = function(visitor) { | 10461 ArgumentNode.prototype.visit = function(visitor) { |
| 10457 return visitor.visitArgumentNode(this); | 10462 return visitor.visitArgumentNode(this); |
| 10458 } | 10463 } |
| 10459 ArgumentNode.prototype.visit$1 = ArgumentNode.prototype.visit; | 10464 ArgumentNode.prototype.visit$1 = ArgumentNode.prototype.visit; |
| 10460 // ********** Code for FormalNode ************** | 10465 // ********** Code for FormalNode ************** |
| 10466 $inherits(FormalNode, Node); |
| 10461 function FormalNode(isThis, isRest, type, name, value, span) { | 10467 function FormalNode(isThis, isRest, type, name, value, span) { |
| 10462 this.isThis = isThis; | 10468 this.isThis = isThis; |
| 10463 this.isRest = isRest; | 10469 this.isRest = isRest; |
| 10464 this.type = type; | 10470 this.type = type; |
| 10465 this.name = name; | 10471 this.name = name; |
| 10466 this.value = value; | 10472 this.value = value; |
| 10467 // Initializers done | 10473 // Initializers done |
| 10468 Node.call(this, span); | 10474 Node.call(this, span); |
| 10469 } | 10475 } |
| 10470 $inherits(FormalNode, Node); | |
| 10471 FormalNode.prototype.get$type = function() { return this.type; }; | 10476 FormalNode.prototype.get$type = function() { return this.type; }; |
| 10472 FormalNode.prototype.set$type = function(value) { return this.type = value; }; | 10477 FormalNode.prototype.set$type = function(value) { return this.type = value; }; |
| 10473 FormalNode.prototype.get$name = function() { return this.name; }; | 10478 FormalNode.prototype.get$name = function() { return this.name; }; |
| 10474 FormalNode.prototype.set$name = function(value) { return this.name = value; }; | 10479 FormalNode.prototype.set$name = function(value) { return this.name = value; }; |
| 10475 FormalNode.prototype.get$value = function() { return this.value; }; | 10480 FormalNode.prototype.get$value = function() { return this.value; }; |
| 10476 FormalNode.prototype.set$value = function(value) { return this.value = value; }; | 10481 FormalNode.prototype.set$value = function(value) { return this.value = value; }; |
| 10477 FormalNode.prototype.visit = function(visitor) { | 10482 FormalNode.prototype.visit = function(visitor) { |
| 10478 return visitor.visitFormalNode(this); | 10483 return visitor.visitFormalNode(this); |
| 10479 } | 10484 } |
| 10480 FormalNode.prototype.visit$1 = FormalNode.prototype.visit; | 10485 FormalNode.prototype.visit$1 = FormalNode.prototype.visit; |
| 10481 // ********** Code for CatchNode ************** | 10486 // ********** Code for CatchNode ************** |
| 10487 $inherits(CatchNode, Node); |
| 10482 function CatchNode(exception, trace, body, span) { | 10488 function CatchNode(exception, trace, body, span) { |
| 10483 this.exception = exception; | 10489 this.exception = exception; |
| 10484 this.trace = trace; | 10490 this.trace = trace; |
| 10485 this.body = body; | 10491 this.body = body; |
| 10486 // Initializers done | 10492 // Initializers done |
| 10487 Node.call(this, span); | 10493 Node.call(this, span); |
| 10488 } | 10494 } |
| 10489 $inherits(CatchNode, Node); | |
| 10490 CatchNode.prototype.get$exception = function() { return this.exception; }; | 10495 CatchNode.prototype.get$exception = function() { return this.exception; }; |
| 10491 CatchNode.prototype.set$exception = function(value) { return this.exception = va
lue; }; | 10496 CatchNode.prototype.set$exception = function(value) { return this.exception = va
lue; }; |
| 10492 CatchNode.prototype.get$trace = function() { return this.trace; }; | 10497 CatchNode.prototype.get$trace = function() { return this.trace; }; |
| 10493 CatchNode.prototype.set$trace = function(value) { return this.trace = value; }; | 10498 CatchNode.prototype.set$trace = function(value) { return this.trace = value; }; |
| 10494 CatchNode.prototype.get$body = function() { return this.body; }; | 10499 CatchNode.prototype.get$body = function() { return this.body; }; |
| 10495 CatchNode.prototype.set$body = function(value) { return this.body = value; }; | 10500 CatchNode.prototype.set$body = function(value) { return this.body = value; }; |
| 10496 CatchNode.prototype.visit = function(visitor) { | 10501 CatchNode.prototype.visit = function(visitor) { |
| 10497 return visitor.visitCatchNode(this); | 10502 return visitor.visitCatchNode(this); |
| 10498 } | 10503 } |
| 10499 CatchNode.prototype.visit$1 = CatchNode.prototype.visit; | 10504 CatchNode.prototype.visit$1 = CatchNode.prototype.visit; |
| 10500 // ********** Code for CaseNode ************** | 10505 // ********** Code for CaseNode ************** |
| 10506 $inherits(CaseNode, Node); |
| 10501 function CaseNode(label, cases, statements, span) { | 10507 function CaseNode(label, cases, statements, span) { |
| 10502 this.label = label; | 10508 this.label = label; |
| 10503 this.cases = cases; | 10509 this.cases = cases; |
| 10504 this.statements = statements; | 10510 this.statements = statements; |
| 10505 // Initializers done | 10511 // Initializers done |
| 10506 Node.call(this, span); | 10512 Node.call(this, span); |
| 10507 } | 10513 } |
| 10508 $inherits(CaseNode, Node); | |
| 10509 CaseNode.prototype.get$label = function() { return this.label; }; | 10514 CaseNode.prototype.get$label = function() { return this.label; }; |
| 10510 CaseNode.prototype.set$label = function(value) { return this.label = value; }; | 10515 CaseNode.prototype.set$label = function(value) { return this.label = value; }; |
| 10511 CaseNode.prototype.get$cases = function() { return this.cases; }; | 10516 CaseNode.prototype.get$cases = function() { return this.cases; }; |
| 10512 CaseNode.prototype.set$cases = function(value) { return this.cases = value; }; | 10517 CaseNode.prototype.set$cases = function(value) { return this.cases = value; }; |
| 10513 CaseNode.prototype.get$statements = function() { return this.statements; }; | 10518 CaseNode.prototype.get$statements = function() { return this.statements; }; |
| 10514 CaseNode.prototype.set$statements = function(value) { return this.statements = v
alue; }; | 10519 CaseNode.prototype.set$statements = function(value) { return this.statements = v
alue; }; |
| 10515 CaseNode.prototype.visit = function(visitor) { | 10520 CaseNode.prototype.visit = function(visitor) { |
| 10516 return visitor.visitCaseNode(this); | 10521 return visitor.visitCaseNode(this); |
| 10517 } | 10522 } |
| 10518 CaseNode.prototype.visit$1 = CaseNode.prototype.visit; | 10523 CaseNode.prototype.visit$1 = CaseNode.prototype.visit; |
| 10519 // ********** Code for TypeParameter ************** | 10524 // ********** Code for TypeParameter ************** |
| 10525 $inherits(TypeParameter, Node); |
| 10520 function TypeParameter(name, extendsType, span) { | 10526 function TypeParameter(name, extendsType, span) { |
| 10521 this.name = name; | 10527 this.name = name; |
| 10522 this.extendsType = extendsType; | 10528 this.extendsType = extendsType; |
| 10523 // Initializers done | 10529 // Initializers done |
| 10524 Node.call(this, span); | 10530 Node.call(this, span); |
| 10525 } | 10531 } |
| 10526 $inherits(TypeParameter, Node); | |
| 10527 TypeParameter.prototype.get$name = function() { return this.name; }; | 10532 TypeParameter.prototype.get$name = function() { return this.name; }; |
| 10528 TypeParameter.prototype.set$name = function(value) { return this.name = value; }
; | 10533 TypeParameter.prototype.set$name = function(value) { return this.name = value; }
; |
| 10529 TypeParameter.prototype.get$extendsType = function() { return this.extendsType;
}; | 10534 TypeParameter.prototype.get$extendsType = function() { return this.extendsType;
}; |
| 10530 TypeParameter.prototype.set$extendsType = function(value) { return this.extendsT
ype = value; }; | 10535 TypeParameter.prototype.set$extendsType = function(value) { return this.extendsT
ype = value; }; |
| 10531 TypeParameter.prototype.visit = function(visitor) { | 10536 TypeParameter.prototype.visit = function(visitor) { |
| 10532 return visitor.visitTypeParameter(this); | 10537 return visitor.visitTypeParameter(this); |
| 10533 } | 10538 } |
| 10534 TypeParameter.prototype.visit$1 = TypeParameter.prototype.visit; | 10539 TypeParameter.prototype.visit$1 = TypeParameter.prototype.visit; |
| 10535 // ********** Code for Identifier ************** | 10540 // ********** Code for Identifier ************** |
| 10541 $inherits(Identifier, Node); |
| 10536 function Identifier(name, span) { | 10542 function Identifier(name, span) { |
| 10537 this.name = name; | 10543 this.name = name; |
| 10538 // Initializers done | 10544 // Initializers done |
| 10539 Node.call(this, span); | 10545 Node.call(this, span); |
| 10540 } | 10546 } |
| 10541 $inherits(Identifier, Node); | |
| 10542 Identifier.prototype.get$name = function() { return this.name; }; | 10547 Identifier.prototype.get$name = function() { return this.name; }; |
| 10543 Identifier.prototype.set$name = function(value) { return this.name = value; }; | 10548 Identifier.prototype.set$name = function(value) { return this.name = value; }; |
| 10544 Identifier.prototype.visit = function(visitor) { | 10549 Identifier.prototype.visit = function(visitor) { |
| 10545 return visitor.visitIdentifier(this); | 10550 return visitor.visitIdentifier(this); |
| 10546 } | 10551 } |
| 10547 Identifier.prototype.visit$1 = Identifier.prototype.visit; | 10552 Identifier.prototype.visit$1 = Identifier.prototype.visit; |
| 10548 // ********** Code for DeclaredIdentifier ************** | 10553 // ********** Code for DeclaredIdentifier ************** |
| 10554 $inherits(DeclaredIdentifier, Expression); |
| 10549 function DeclaredIdentifier(type, name, span) { | 10555 function DeclaredIdentifier(type, name, span) { |
| 10550 this.type = type; | 10556 this.type = type; |
| 10551 this.name = name; | 10557 this.name = name; |
| 10552 // Initializers done | 10558 // Initializers done |
| 10553 Expression.call(this, span); | 10559 Expression.call(this, span); |
| 10554 } | 10560 } |
| 10555 $inherits(DeclaredIdentifier, Expression); | |
| 10556 DeclaredIdentifier.prototype.get$type = function() { return this.type; }; | 10561 DeclaredIdentifier.prototype.get$type = function() { return this.type; }; |
| 10557 DeclaredIdentifier.prototype.set$type = function(value) { return this.type = val
ue; }; | 10562 DeclaredIdentifier.prototype.set$type = function(value) { return this.type = val
ue; }; |
| 10558 DeclaredIdentifier.prototype.get$name = function() { return this.name; }; | 10563 DeclaredIdentifier.prototype.get$name = function() { return this.name; }; |
| 10559 DeclaredIdentifier.prototype.set$name = function(value) { return this.name = val
ue; }; | 10564 DeclaredIdentifier.prototype.set$name = function(value) { return this.name = val
ue; }; |
| 10560 DeclaredIdentifier.prototype.visit = function(visitor) { | 10565 DeclaredIdentifier.prototype.visit = function(visitor) { |
| 10561 return visitor.visitDeclaredIdentifier(this); | 10566 return visitor.visitDeclaredIdentifier(this); |
| 10562 } | 10567 } |
| 10563 DeclaredIdentifier.prototype.visit$1 = DeclaredIdentifier.prototype.visit; | 10568 DeclaredIdentifier.prototype.visit$1 = DeclaredIdentifier.prototype.visit; |
| 10564 // ********** Code for Type ************** | 10569 // ********** Code for Type ************** |
| 10570 $inherits(Type, Element); |
| 10565 function Type(name) { | 10571 function Type(name) { |
| 10566 this.isTested = false | 10572 this.isTested = false |
| 10567 this.isChecked = false | 10573 this.isChecked = false |
| 10574 this.isWritten = false |
| 10568 this._resolvedMembers = new HashMapImplementation(); | 10575 this._resolvedMembers = new HashMapImplementation(); |
| 10569 this.varStubs = new HashMapImplementation(); | 10576 this.varStubs = new HashMapImplementation(); |
| 10570 // Initializers done | 10577 // Initializers done |
| 10571 Element.call(this, name, null); | 10578 Element.call(this, name, null); |
| 10572 } | 10579 } |
| 10573 $inherits(Type, Element); | |
| 10574 Type.prototype.get$isTested = function() { return this.isTested; }; | 10580 Type.prototype.get$isTested = function() { return this.isTested; }; |
| 10575 Type.prototype.set$isTested = function(value) { return this.isTested = value; }; | 10581 Type.prototype.set$isTested = function(value) { return this.isTested = value; }; |
| 10576 Type.prototype.get$typeCheckCode = function() { return this.typeCheckCode; }; | 10582 Type.prototype.get$typeCheckCode = function() { return this.typeCheckCode; }; |
| 10577 Type.prototype.set$typeCheckCode = function(value) { return this.typeCheckCode =
value; }; | 10583 Type.prototype.set$typeCheckCode = function(value) { return this.typeCheckCode =
value; }; |
| 10578 Type.prototype.get$varStubs = function() { return this.varStubs; }; | 10584 Type.prototype.get$varStubs = function() { return this.varStubs; }; |
| 10579 Type.prototype.set$varStubs = function(value) { return this.varStubs = value; }; | 10585 Type.prototype.set$varStubs = function(value) { return this.varStubs = value; }; |
| 10580 Type.prototype.markUsed = function() { | 10586 Type.prototype.markUsed = function() { |
| 10581 | 10587 |
| 10582 } | 10588 } |
| 10583 Type.prototype.get$typeMember = function() { | 10589 Type.prototype.get$typeMember = function() { |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10897 Type.prototype.getConstructor$1 = Type.prototype.getConstructor; | 10903 Type.prototype.getConstructor$1 = Type.prototype.getConstructor; |
| 10898 Type.prototype.getFactory$2 = Type.prototype.getFactory; | 10904 Type.prototype.getFactory$2 = Type.prototype.getFactory; |
| 10899 Type.prototype.getMember$1 = Type.prototype.getMember; | 10905 Type.prototype.getMember$1 = Type.prototype.getMember; |
| 10900 Type.prototype.getOrMakeConcreteType$1 = Type.prototype.getOrMakeConcreteType; | 10906 Type.prototype.getOrMakeConcreteType$1 = Type.prototype.getOrMakeConcreteType; |
| 10901 Type.prototype.hashCode$0 = Type.prototype.hashCode; | 10907 Type.prototype.hashCode$0 = Type.prototype.hashCode; |
| 10902 Type.prototype.isAssignable$1 = Type.prototype.isAssignable; | 10908 Type.prototype.isAssignable$1 = Type.prototype.isAssignable; |
| 10903 Type.prototype.isSubtypeOf$1 = Type.prototype.isSubtypeOf; | 10909 Type.prototype.isSubtypeOf$1 = Type.prototype.isSubtypeOf; |
| 10904 Type.prototype.markUsed$0 = Type.prototype.markUsed; | 10910 Type.prototype.markUsed$0 = Type.prototype.markUsed; |
| 10905 Type.prototype.resolveTypeParams$1 = Type.prototype.resolveTypeParams; | 10911 Type.prototype.resolveTypeParams$1 = Type.prototype.resolveTypeParams; |
| 10906 // ********** Code for ParameterType ************** | 10912 // ********** Code for ParameterType ************** |
| 10913 $inherits(ParameterType, Type); |
| 10907 function ParameterType(name, typeParameter) { | 10914 function ParameterType(name, typeParameter) { |
| 10908 this.typeParameter = typeParameter; | 10915 this.typeParameter = typeParameter; |
| 10909 // Initializers done | 10916 // Initializers done |
| 10910 Type.call(this, name); | 10917 Type.call(this, name); |
| 10911 } | 10918 } |
| 10912 $inherits(ParameterType, Type); | |
| 10913 ParameterType.prototype.get$typeParameter = function() { return this.typeParamet
er; }; | 10919 ParameterType.prototype.get$typeParameter = function() { return this.typeParamet
er; }; |
| 10914 ParameterType.prototype.set$typeParameter = function(value) { return this.typePa
rameter = value; }; | 10920 ParameterType.prototype.set$typeParameter = function(value) { return this.typePa
rameter = value; }; |
| 10915 ParameterType.prototype.get$extendsType = function() { return this.extendsType;
}; | 10921 ParameterType.prototype.get$extendsType = function() { return this.extendsType;
}; |
| 10916 ParameterType.prototype.set$extendsType = function(value) { return this.extendsT
ype = value; }; | 10922 ParameterType.prototype.set$extendsType = function(value) { return this.extendsT
ype = value; }; |
| 10917 ParameterType.prototype.get$isClass = function() { | 10923 ParameterType.prototype.get$isClass = function() { |
| 10918 return false; | 10924 return false; |
| 10919 } | 10925 } |
| 10920 ParameterType.prototype.get$library = function() { | 10926 ParameterType.prototype.get$library = function() { |
| 10921 return null; | 10927 return null; |
| 10922 } | 10928 } |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10958 this.extendsType = $globals.world.objectType; | 10964 this.extendsType = $globals.world.objectType; |
| 10959 } | 10965 } |
| 10960 } | 10966 } |
| 10961 ParameterType.prototype.addDirectSubtype$1 = ParameterType.prototype.addDirectSu
btype; | 10967 ParameterType.prototype.addDirectSubtype$1 = ParameterType.prototype.addDirectSu
btype; |
| 10962 ParameterType.prototype.getConstructor$1 = ParameterType.prototype.getConstructo
r; | 10968 ParameterType.prototype.getConstructor$1 = ParameterType.prototype.getConstructo
r; |
| 10963 ParameterType.prototype.getOrMakeConcreteType$1 = ParameterType.prototype.getOrM
akeConcreteType; | 10969 ParameterType.prototype.getOrMakeConcreteType$1 = ParameterType.prototype.getOrM
akeConcreteType; |
| 10964 ParameterType.prototype.isSubtypeOf$1 = ParameterType.prototype.isSubtypeOf; | 10970 ParameterType.prototype.isSubtypeOf$1 = ParameterType.prototype.isSubtypeOf; |
| 10965 ParameterType.prototype.resolve$0 = ParameterType.prototype.resolve; | 10971 ParameterType.prototype.resolve$0 = ParameterType.prototype.resolve; |
| 10966 ParameterType.prototype.resolveTypeParams$1 = ParameterType.prototype.resolveTyp
eParams; | 10972 ParameterType.prototype.resolveTypeParams$1 = ParameterType.prototype.resolveTyp
eParams; |
| 10967 // ********** Code for NonNullableType ************** | 10973 // ********** Code for NonNullableType ************** |
| 10974 $inherits(NonNullableType, Type); |
| 10968 function NonNullableType(type) { | 10975 function NonNullableType(type) { |
| 10969 this.type = type; | 10976 this.type = type; |
| 10970 // Initializers done | 10977 // Initializers done |
| 10971 Type.call(this, type.name); | 10978 Type.call(this, type.name); |
| 10972 } | 10979 } |
| 10973 $inherits(NonNullableType, Type); | |
| 10974 NonNullableType.prototype.get$type = function() { return this.type; }; | 10980 NonNullableType.prototype.get$type = function() { return this.type; }; |
| 10975 NonNullableType.prototype.get$isNullable = function() { | 10981 NonNullableType.prototype.get$isNullable = function() { |
| 10976 return false; | 10982 return false; |
| 10977 } | 10983 } |
| 10978 NonNullableType.prototype.get$isBool = function() { | 10984 NonNullableType.prototype.get$isBool = function() { |
| 10979 return this.type.get$isBool(); | 10985 return this.type.get$isBool(); |
| 10980 } | 10986 } |
| 10981 NonNullableType.prototype.get$isUsed = function() { | 10987 NonNullableType.prototype.get$isUsed = function() { |
| 10982 return false; | 10988 return false; |
| 10983 } | 10989 } |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11070 } | 11076 } |
| 11071 NonNullableType.prototype.addDirectSubtype$1 = NonNullableType.prototype.addDire
ctSubtype; | 11077 NonNullableType.prototype.addDirectSubtype$1 = NonNullableType.prototype.addDire
ctSubtype; |
| 11072 NonNullableType.prototype.getConstructor$1 = NonNullableType.prototype.getConstr
uctor; | 11078 NonNullableType.prototype.getConstructor$1 = NonNullableType.prototype.getConstr
uctor; |
| 11073 NonNullableType.prototype.getFactory$2 = NonNullableType.prototype.getFactory; | 11079 NonNullableType.prototype.getFactory$2 = NonNullableType.prototype.getFactory; |
| 11074 NonNullableType.prototype.getMember$1 = NonNullableType.prototype.getMember; | 11080 NonNullableType.prototype.getMember$1 = NonNullableType.prototype.getMember; |
| 11075 NonNullableType.prototype.getOrMakeConcreteType$1 = NonNullableType.prototype.ge
tOrMakeConcreteType; | 11081 NonNullableType.prototype.getOrMakeConcreteType$1 = NonNullableType.prototype.ge
tOrMakeConcreteType; |
| 11076 NonNullableType.prototype.isSubtypeOf$1 = NonNullableType.prototype.isSubtypeOf; | 11082 NonNullableType.prototype.isSubtypeOf$1 = NonNullableType.prototype.isSubtypeOf; |
| 11077 NonNullableType.prototype.markUsed$0 = NonNullableType.prototype.markUsed; | 11083 NonNullableType.prototype.markUsed$0 = NonNullableType.prototype.markUsed; |
| 11078 NonNullableType.prototype.resolveTypeParams$1 = NonNullableType.prototype.resolv
eTypeParams; | 11084 NonNullableType.prototype.resolveTypeParams$1 = NonNullableType.prototype.resolv
eTypeParams; |
| 11079 // ********** Code for ConcreteType ************** | 11085 // ********** Code for ConcreteType ************** |
| 11086 $inherits(ConcreteType, Type); |
| 11080 function ConcreteType(name, genericType, typeArguments, typeArgsInOrder) { | 11087 function ConcreteType(name, genericType, typeArguments, typeArgsInOrder) { |
| 11081 this.isUsed = false | 11088 this.isUsed = false |
| 11082 this.genericType = genericType; | 11089 this.genericType = genericType; |
| 11083 this.typeArguments = typeArguments; | 11090 this.typeArguments = typeArguments; |
| 11084 this.typeArgsInOrder = typeArgsInOrder; | 11091 this.typeArgsInOrder = typeArgsInOrder; |
| 11085 this.constructors = new HashMapImplementation(); | 11092 this.constructors = new HashMapImplementation(); |
| 11086 this.members = new HashMapImplementation(); | 11093 this.members = new HashMapImplementation(); |
| 11087 this.factories = new FactoryMap(); | 11094 this.factories = new FactoryMap(); |
| 11088 // Initializers done | 11095 // Initializers done |
| 11089 Type.call(this, name); | 11096 Type.call(this, name); |
| 11090 } | 11097 } |
| 11091 $inherits(ConcreteType, Type); | |
| 11092 ConcreteType.prototype.get$genericType = function() { return this.genericType; }
; | 11098 ConcreteType.prototype.get$genericType = function() { return this.genericType; }
; |
| 11093 ConcreteType.prototype.get$typeArguments = function() { return this.typeArgument
s; }; | 11099 ConcreteType.prototype.get$typeArguments = function() { return this.typeArgument
s; }; |
| 11094 ConcreteType.prototype.set$typeArguments = function(value) { return this.typeArg
uments = value; }; | 11100 ConcreteType.prototype.set$typeArguments = function(value) { return this.typeArg
uments = value; }; |
| 11095 ConcreteType.prototype.get$_parent = function() { return this._parent; }; | 11101 ConcreteType.prototype.get$_parent = function() { return this._parent; }; |
| 11096 ConcreteType.prototype.set$_parent = function(value) { return this._parent = val
ue; }; | 11102 ConcreteType.prototype.set$_parent = function(value) { return this._parent = val
ue; }; |
| 11097 ConcreteType.prototype.get$typeArgsInOrder = function() { return this.typeArgsIn
Order; }; | 11103 ConcreteType.prototype.get$typeArgsInOrder = function() { return this.typeArgsIn
Order; }; |
| 11098 ConcreteType.prototype.set$typeArgsInOrder = function(value) { return this.typeA
rgsInOrder = value; }; | 11104 ConcreteType.prototype.set$typeArgsInOrder = function(value) { return this.typeA
rgsInOrder = value; }; |
| 11099 ConcreteType.prototype.get$isList = function() { | 11105 ConcreteType.prototype.get$isList = function() { |
| 11100 return this.genericType.get$isList(); | 11106 return this.genericType.get$isList(); |
| 11101 } | 11107 } |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11239 this.genericType.addDirectSubtype(type); | 11245 this.genericType.addDirectSubtype(type); |
| 11240 } | 11246 } |
| 11241 ConcreteType.prototype.addDirectSubtype$1 = ConcreteType.prototype.addDirectSubt
ype; | 11247 ConcreteType.prototype.addDirectSubtype$1 = ConcreteType.prototype.addDirectSubt
ype; |
| 11242 ConcreteType.prototype.getConstructor$1 = ConcreteType.prototype.getConstructor; | 11248 ConcreteType.prototype.getConstructor$1 = ConcreteType.prototype.getConstructor; |
| 11243 ConcreteType.prototype.getFactory$2 = ConcreteType.prototype.getFactory; | 11249 ConcreteType.prototype.getFactory$2 = ConcreteType.prototype.getFactory; |
| 11244 ConcreteType.prototype.getMember$1 = ConcreteType.prototype.getMember; | 11250 ConcreteType.prototype.getMember$1 = ConcreteType.prototype.getMember; |
| 11245 ConcreteType.prototype.getOrMakeConcreteType$1 = ConcreteType.prototype.getOrMak
eConcreteType; | 11251 ConcreteType.prototype.getOrMakeConcreteType$1 = ConcreteType.prototype.getOrMak
eConcreteType; |
| 11246 ConcreteType.prototype.markUsed$0 = ConcreteType.prototype.markUsed; | 11252 ConcreteType.prototype.markUsed$0 = ConcreteType.prototype.markUsed; |
| 11247 ConcreteType.prototype.resolveTypeParams$1 = ConcreteType.prototype.resolveTypeP
arams; | 11253 ConcreteType.prototype.resolveTypeParams$1 = ConcreteType.prototype.resolveTypeP
arams; |
| 11248 // ********** Code for DefinedType ************** | 11254 // ********** Code for DefinedType ************** |
| 11255 $inherits(DefinedType, Type); |
| 11249 function DefinedType(name, library, definition, isClass) { | 11256 function DefinedType(name, library, definition, isClass) { |
| 11250 this.isUsed = false | 11257 this.isUsed = false |
| 11251 this.isNative = false | 11258 this.isNative = false |
| 11252 this.library = library; | 11259 this.library = library; |
| 11253 this.isClass = isClass; | 11260 this.isClass = isClass; |
| 11254 this.directSubtypes = new HashSetImplementation(); | 11261 this.directSubtypes = new HashSetImplementation(); |
| 11255 this.constructors = new HashMapImplementation(); | 11262 this.constructors = new HashMapImplementation(); |
| 11256 this.members = new HashMapImplementation(); | 11263 this.members = new HashMapImplementation(); |
| 11257 this.factories = new FactoryMap(); | 11264 this.factories = new FactoryMap(); |
| 11258 // Initializers done | 11265 // Initializers done |
| 11259 Type.call(this, name); | 11266 Type.call(this, name); |
| 11260 this.setDefinition(definition); | 11267 this.setDefinition(definition); |
| 11261 } | 11268 } |
| 11262 $inherits(DefinedType, Type); | |
| 11263 DefinedType.prototype.get$definition = function() { return this.definition; }; | 11269 DefinedType.prototype.get$definition = function() { return this.definition; }; |
| 11264 DefinedType.prototype.set$definition = function(value) { return this.definition
= value; }; | 11270 DefinedType.prototype.set$definition = function(value) { return this.definition
= value; }; |
| 11265 DefinedType.prototype.get$library = function() { return this.library; }; | 11271 DefinedType.prototype.get$library = function() { return this.library; }; |
| 11266 DefinedType.prototype.get$isClass = function() { return this.isClass; }; | 11272 DefinedType.prototype.get$isClass = function() { return this.isClass; }; |
| 11267 DefinedType.prototype.get$_parent = function() { return this._parent; }; | 11273 DefinedType.prototype.get$_parent = function() { return this._parent; }; |
| 11268 DefinedType.prototype.set$_parent = function(value) { return this._parent = valu
e; }; | 11274 DefinedType.prototype.set$_parent = function(value) { return this._parent = valu
e; }; |
| 11269 DefinedType.prototype.get$parent = function() { | 11275 DefinedType.prototype.get$parent = function() { |
| 11270 return this._parent; | 11276 return this._parent; |
| 11271 } | 11277 } |
| 11272 DefinedType.prototype.set$parent = function(p) { | 11278 DefinedType.prototype.set$parent = function(p) { |
| (...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11757 }; | 11763 }; |
| 11758 FixedCollection.prototype.forEach$1 = function($0) { | 11764 FixedCollection.prototype.forEach$1 = function($0) { |
| 11759 return this.forEach(to$call$1($0)); | 11765 return this.forEach(to$call$1($0)); |
| 11760 }; | 11766 }; |
| 11761 FixedCollection.prototype.isEmpty$0 = FixedCollection.prototype.isEmpty; | 11767 FixedCollection.prototype.isEmpty$0 = FixedCollection.prototype.isEmpty; |
| 11762 FixedCollection.prototype.iterator$0 = FixedCollection.prototype.iterator; | 11768 FixedCollection.prototype.iterator$0 = FixedCollection.prototype.iterator; |
| 11763 FixedCollection.prototype.some$1 = function($0) { | 11769 FixedCollection.prototype.some$1 = function($0) { |
| 11764 return this.some(to$call$1($0)); | 11770 return this.some(to$call$1($0)); |
| 11765 }; | 11771 }; |
| 11766 // ********** Code for FixedCollection_Type ************** | 11772 // ********** Code for FixedCollection_Type ************** |
| 11773 $inherits(FixedCollection_Type, FixedCollection); |
| 11767 function FixedCollection_Type(value, length) { | 11774 function FixedCollection_Type(value, length) { |
| 11768 this.value = value; | 11775 this.value = value; |
| 11769 this.length = length; | 11776 this.length = length; |
| 11770 // Initializers done | 11777 // Initializers done |
| 11771 } | 11778 } |
| 11772 $inherits(FixedCollection_Type, FixedCollection); | |
| 11773 // ********** Code for FixedIterator ************** | 11779 // ********** Code for FixedIterator ************** |
| 11774 function FixedIterator(value, length) { | 11780 function FixedIterator(value, length) { |
| 11775 this._index = 0 | 11781 this._index = 0 |
| 11776 this.value = value; | 11782 this.value = value; |
| 11777 this.length = length; | 11783 this.length = length; |
| 11778 // Initializers done | 11784 // Initializers done |
| 11779 } | 11785 } |
| 11780 FixedIterator.prototype.get$value = function() { return this.value; }; | 11786 FixedIterator.prototype.get$value = function() { return this.value; }; |
| 11781 FixedIterator.prototype.hasNext = function() { | 11787 FixedIterator.prototype.hasNext = function() { |
| 11782 return this._index < this.length; | 11788 return this._index < this.length; |
| 11783 } | 11789 } |
| 11784 FixedIterator.prototype.next = function() { | 11790 FixedIterator.prototype.next = function() { |
| 11785 this._index++; | 11791 this._index++; |
| 11786 return this.value; | 11792 return this.value; |
| 11787 } | 11793 } |
| 11788 FixedIterator.prototype.hasNext$0 = FixedIterator.prototype.hasNext; | 11794 FixedIterator.prototype.hasNext$0 = FixedIterator.prototype.hasNext; |
| 11789 FixedIterator.prototype.next$0 = FixedIterator.prototype.next; | 11795 FixedIterator.prototype.next$0 = FixedIterator.prototype.next; |
| 11790 // ********** Code for FixedIterator_E ************** | 11796 // ********** Code for FixedIterator_E ************** |
| 11797 $inherits(FixedIterator_E, FixedIterator); |
| 11791 function FixedIterator_E(value, length) { | 11798 function FixedIterator_E(value, length) { |
| 11792 this._index = 0 | 11799 this._index = 0 |
| 11793 this.value = value; | 11800 this.value = value; |
| 11794 this.length = length; | 11801 this.length = length; |
| 11795 // Initializers done | 11802 // Initializers done |
| 11796 } | 11803 } |
| 11797 $inherits(FixedIterator_E, FixedIterator); | |
| 11798 // ********** Code for Value ************** | 11804 // ********** Code for Value ************** |
| 11799 function Value(_type, code, span, needsTemp) { | 11805 function Value(_type, code, span, needsTemp) { |
| 11800 this.isSuper = false | 11806 this.isSuper = false |
| 11801 this.isType = false | 11807 this.isType = false |
| 11802 this.isInitializerTarget = false | 11808 this.isInitializerTarget = false |
| 11803 this.isFinal = false | 11809 this.isFinal = false |
| 11804 this._type = _type; | 11810 this._type = _type; |
| 11805 this.code = code; | 11811 this.code = code; |
| 11806 this.span = span; | 11812 this.span = span; |
| 11807 this.needsTemp = needsTemp; | 11813 this.needsTemp = needsTemp; |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12147 Value.prototype.invoke$4 = function($0, $1, $2, $3) { | 12153 Value.prototype.invoke$4 = function($0, $1, $2, $3) { |
| 12148 return this.invoke($0, $1, $2, $3, false); | 12154 return this.invoke($0, $1, $2, $3, false); |
| 12149 }; | 12155 }; |
| 12150 Value.prototype.invoke$4$isDynamic = Value.prototype.invoke; | 12156 Value.prototype.invoke$4$isDynamic = Value.prototype.invoke; |
| 12151 Value.prototype.invoke$5 = Value.prototype.invoke; | 12157 Value.prototype.invoke$5 = Value.prototype.invoke; |
| 12152 Value.prototype.needsConversion$1 = Value.prototype.needsConversion; | 12158 Value.prototype.needsConversion$1 = Value.prototype.needsConversion; |
| 12153 Value.prototype.set_$4 = function($0, $1, $2, $3) { | 12159 Value.prototype.set_$4 = function($0, $1, $2, $3) { |
| 12154 return this.set_($0, $1, $2, $3, false); | 12160 return this.set_($0, $1, $2, $3, false); |
| 12155 }; | 12161 }; |
| 12156 // ********** Code for EvaluatedValue ************** | 12162 // ********** Code for EvaluatedValue ************** |
| 12163 $inherits(EvaluatedValue, Value); |
| 12157 function EvaluatedValue() {} | 12164 function EvaluatedValue() {} |
| 12158 EvaluatedValue._internal$ctor = function(type, actualValue, canonicalCode, span,
code) { | 12165 EvaluatedValue._internal$ctor = function(type, actualValue, canonicalCode, span,
code) { |
| 12159 this.actualValue = actualValue; | 12166 this.actualValue = actualValue; |
| 12160 this.canonicalCode = canonicalCode; | 12167 this.canonicalCode = canonicalCode; |
| 12161 // Initializers done | 12168 // Initializers done |
| 12162 Value.call(this, type, code, span, false); | 12169 Value.call(this, type, code, span, false); |
| 12163 } | 12170 } |
| 12164 EvaluatedValue._internal$ctor.prototype = EvaluatedValue.prototype; | 12171 EvaluatedValue._internal$ctor.prototype = EvaluatedValue.prototype; |
| 12165 $inherits(EvaluatedValue, Value); | |
| 12166 EvaluatedValue.EvaluatedValue$factory = function(type, actualValue, canonicalCod
e, span) { | 12172 EvaluatedValue.EvaluatedValue$factory = function(type, actualValue, canonicalCod
e, span) { |
| 12167 return new EvaluatedValue._internal$ctor(type, actualValue, canonicalCode, spa
n, EvaluatedValue.codeWithComments(canonicalCode, span)); | 12173 return new EvaluatedValue._internal$ctor(type, actualValue, canonicalCode, spa
n, EvaluatedValue.codeWithComments(canonicalCode, span)); |
| 12168 } | 12174 } |
| 12169 EvaluatedValue.prototype.get$actualValue = function() { return this.actualValue;
}; | 12175 EvaluatedValue.prototype.get$actualValue = function() { return this.actualValue;
}; |
| 12170 EvaluatedValue.prototype.set$actualValue = function(value) { return this.actualV
alue = value; }; | 12176 EvaluatedValue.prototype.set$actualValue = function(value) { return this.actualV
alue = value; }; |
| 12171 EvaluatedValue.prototype.get$isConst = function() { | 12177 EvaluatedValue.prototype.get$isConst = function() { |
| 12172 return true; | 12178 return true; |
| 12173 } | 12179 } |
| 12174 EvaluatedValue.prototype.get$canonicalCode = function() { return this.canonicalC
ode; }; | 12180 EvaluatedValue.prototype.get$canonicalCode = function() { return this.canonicalC
ode; }; |
| 12175 EvaluatedValue.prototype.set$canonicalCode = function(value) { return this.canon
icalCode = value; }; | 12181 EvaluatedValue.prototype.set$canonicalCode = function(value) { return this.canon
icalCode = value; }; |
| 12176 EvaluatedValue.codeWithComments = function(canonicalCode, span) { | 12182 EvaluatedValue.codeWithComments = function(canonicalCode, span) { |
| 12177 return (span != null && span.get$text() != canonicalCode) ? ('' + canonicalCod
e + '/*' + _escapeForComment(span.get$text()) + '*/') : canonicalCode; | 12183 return (span != null && span.get$text() != canonicalCode) ? ('' + canonicalCod
e + '/*' + _escapeForComment(span.get$text()) + '*/') : canonicalCode; |
| 12178 } | 12184 } |
| 12179 // ********** Code for ConstListValue ************** | 12185 // ********** Code for ConstListValue ************** |
| 12186 $inherits(ConstListValue, EvaluatedValue); |
| 12180 function ConstListValue() {} | 12187 function ConstListValue() {} |
| 12181 ConstListValue._internal$ctor = function(type, values, actualValue, canonicalCod
e, span, code) { | 12188 ConstListValue._internal$ctor = function(type, values, actualValue, canonicalCod
e, span, code) { |
| 12182 this.values = values; | 12189 this.values = values; |
| 12183 // Initializers done | 12190 // Initializers done |
| 12184 EvaluatedValue._internal$ctor.call(this, type, actualValue, canonicalCode, spa
n, code); | 12191 EvaluatedValue._internal$ctor.call(this, type, actualValue, canonicalCode, spa
n, code); |
| 12185 } | 12192 } |
| 12186 ConstListValue._internal$ctor.prototype = ConstListValue.prototype; | 12193 ConstListValue._internal$ctor.prototype = ConstListValue.prototype; |
| 12187 $inherits(ConstListValue, EvaluatedValue); | |
| 12188 ConstListValue.ConstListValue$factory = function(type, values, actualValue, cano
nicalCode, span) { | 12194 ConstListValue.ConstListValue$factory = function(type, values, actualValue, cano
nicalCode, span) { |
| 12189 return new ConstListValue._internal$ctor(type, values, actualValue, canonicalC
ode, span, EvaluatedValue.codeWithComments(canonicalCode, span)); | 12195 return new ConstListValue._internal$ctor(type, values, actualValue, canonicalC
ode, span, EvaluatedValue.codeWithComments(canonicalCode, span)); |
| 12190 } | 12196 } |
| 12191 ConstListValue.prototype.get$values = function() { return this.values; }; | 12197 ConstListValue.prototype.get$values = function() { return this.values; }; |
| 12192 ConstListValue.prototype.set$values = function(value) { return this.values = val
ue; }; | 12198 ConstListValue.prototype.set$values = function(value) { return this.values = val
ue; }; |
| 12193 // ********** Code for ConstMapValue ************** | 12199 // ********** Code for ConstMapValue ************** |
| 12200 $inherits(ConstMapValue, EvaluatedValue); |
| 12194 function ConstMapValue() {} | 12201 function ConstMapValue() {} |
| 12195 ConstMapValue._internal$ctor = function(type, values, actualValue, canonicalCode
, span, code) { | 12202 ConstMapValue._internal$ctor = function(type, values, actualValue, canonicalCode
, span, code) { |
| 12196 this.values = values; | 12203 this.values = values; |
| 12197 // Initializers done | 12204 // Initializers done |
| 12198 EvaluatedValue._internal$ctor.call(this, type, actualValue, canonicalCode, spa
n, code); | 12205 EvaluatedValue._internal$ctor.call(this, type, actualValue, canonicalCode, spa
n, code); |
| 12199 } | 12206 } |
| 12200 ConstMapValue._internal$ctor.prototype = ConstMapValue.prototype; | 12207 ConstMapValue._internal$ctor.prototype = ConstMapValue.prototype; |
| 12201 $inherits(ConstMapValue, EvaluatedValue); | |
| 12202 ConstMapValue.ConstMapValue$factory = function(type, keyValuePairs, actualValue,
canonicalCode, span) { | 12208 ConstMapValue.ConstMapValue$factory = function(type, keyValuePairs, actualValue,
canonicalCode, span) { |
| 12203 var values = new HashMapImplementation(); | 12209 var values = new HashMapImplementation(); |
| 12204 for (var i = 0; | 12210 for (var i = 0; |
| 12205 i < keyValuePairs.length; i += 2) { | 12211 i < keyValuePairs.length; i += 2) { |
| 12206 values.$setindex(keyValuePairs.$index(i).get$actualValue(), keyValuePairs.$i
ndex(i + 1)); | 12212 values.$setindex(keyValuePairs.$index(i).get$actualValue(), keyValuePairs.$i
ndex(i + 1)); |
| 12207 } | 12213 } |
| 12208 return new ConstMapValue._internal$ctor(type, values, actualValue, canonicalCo
de, span, EvaluatedValue.codeWithComments(canonicalCode, span)); | 12214 return new ConstMapValue._internal$ctor(type, values, actualValue, canonicalCo
de, span, EvaluatedValue.codeWithComments(canonicalCode, span)); |
| 12209 } | 12215 } |
| 12210 ConstMapValue.prototype.get$values = function() { return this.values; }; | 12216 ConstMapValue.prototype.get$values = function() { return this.values; }; |
| 12211 ConstMapValue.prototype.set$values = function(value) { return this.values = valu
e; }; | 12217 ConstMapValue.prototype.set$values = function(value) { return this.values = valu
e; }; |
| 12212 // ********** Code for ConstObjectValue ************** | 12218 // ********** Code for ConstObjectValue ************** |
| 12219 $inherits(ConstObjectValue, EvaluatedValue); |
| 12213 function ConstObjectValue() {} | 12220 function ConstObjectValue() {} |
| 12214 ConstObjectValue._internal$ctor = function(type, fields, actualValue, canonicalC
ode, span, code) { | 12221 ConstObjectValue._internal$ctor = function(type, fields, actualValue, canonicalC
ode, span, code) { |
| 12215 this.fields = fields; | 12222 this.fields = fields; |
| 12216 // Initializers done | 12223 // Initializers done |
| 12217 EvaluatedValue._internal$ctor.call(this, type, actualValue, canonicalCode, spa
n, code); | 12224 EvaluatedValue._internal$ctor.call(this, type, actualValue, canonicalCode, spa
n, code); |
| 12218 } | 12225 } |
| 12219 ConstObjectValue._internal$ctor.prototype = ConstObjectValue.prototype; | 12226 ConstObjectValue._internal$ctor.prototype = ConstObjectValue.prototype; |
| 12220 $inherits(ConstObjectValue, EvaluatedValue); | |
| 12221 ConstObjectValue.ConstObjectValue$factory = function(type, fields, canonicalCode
, span) { | 12227 ConstObjectValue.ConstObjectValue$factory = function(type, fields, canonicalCode
, span) { |
| 12222 var fieldValues = []; | 12228 var fieldValues = []; |
| 12223 var $$list = fields.getKeys(); | 12229 var $$list = fields.getKeys(); |
| 12224 for (var $$i = fields.getKeys().iterator$0(); $$i.hasNext$0(); ) { | 12230 for (var $$i = fields.getKeys().iterator$0(); $$i.hasNext$0(); ) { |
| 12225 var f = $$i.next$0(); | 12231 var f = $$i.next$0(); |
| 12226 fieldValues.add(('' + f + ' = ' + fields.$index(f).get$actualValue())); | 12232 fieldValues.add(('' + f + ' = ' + fields.$index(f).get$actualValue())); |
| 12227 } | 12233 } |
| 12228 fieldValues.sort((function (a, b) { | 12234 fieldValues.sort((function (a, b) { |
| 12229 return a.compareTo$1(b); | 12235 return a.compareTo$1(b); |
| 12230 }) | 12236 }) |
| 12231 ); | 12237 ); |
| 12232 var actualValue = ('const ' + type.get$jsname() + ' [') + Strings.join(fieldVa
lues, ',') + ']'; | 12238 var actualValue = ('const ' + type.get$jsname() + ' [') + Strings.join(fieldVa
lues, ',') + ']'; |
| 12233 return new ConstObjectValue._internal$ctor(type, fields, actualValue, canonica
lCode, span, EvaluatedValue.codeWithComments(canonicalCode, span)); | 12239 return new ConstObjectValue._internal$ctor(type, fields, actualValue, canonica
lCode, span, EvaluatedValue.codeWithComments(canonicalCode, span)); |
| 12234 } | 12240 } |
| 12235 ConstObjectValue.prototype.get$fields = function() { return this.fields; }; | 12241 ConstObjectValue.prototype.get$fields = function() { return this.fields; }; |
| 12236 ConstObjectValue.prototype.set$fields = function(value) { return this.fields = v
alue; }; | 12242 ConstObjectValue.prototype.set$fields = function(value) { return this.fields = v
alue; }; |
| 12237 // ********** Code for GlobalValue ************** | 12243 // ********** Code for GlobalValue ************** |
| 12244 $inherits(GlobalValue, Value); |
| 12238 function GlobalValue(type, code, isConst, field, name, exp, canonicalCode, span,
_dependencies) { | 12245 function GlobalValue(type, code, isConst, field, name, exp, canonicalCode, span,
_dependencies) { |
| 12239 this.field = field; | 12246 this.field = field; |
| 12240 this.name = name; | 12247 this.name = name; |
| 12241 this.exp = exp; | 12248 this.exp = exp; |
| 12242 this.canonicalCode = canonicalCode; | 12249 this.canonicalCode = canonicalCode; |
| 12243 this.dependencies = []; | 12250 this.dependencies = []; |
| 12244 // Initializers done | 12251 // Initializers done |
| 12245 Value.call(this, type, code, span, !isConst); | 12252 Value.call(this, type, code, span, !isConst); |
| 12246 for (var $$i = 0;$$i < _dependencies.length; $$i++) { | 12253 for (var $$i = 0;$$i < _dependencies.length; $$i++) { |
| 12247 var dep = _dependencies.$index($$i); | 12254 var dep = _dependencies.$index($$i); |
| 12248 this.dependencies.add(dep); | 12255 this.dependencies.add(dep); |
| 12249 this.dependencies.addAll(dep.get$dependencies()); | 12256 this.dependencies.addAll(dep.get$dependencies()); |
| 12250 } | 12257 } |
| 12251 } | 12258 } |
| 12252 $inherits(GlobalValue, Value); | |
| 12253 GlobalValue.GlobalValue$fromStatic$factory = function(field, exp, dependencies)
{ | 12259 GlobalValue.GlobalValue$fromStatic$factory = function(field, exp, dependencies)
{ |
| 12254 var code = (exp.get$isConst() ? exp.get$canonicalCode() : exp.code); | 12260 var code = (exp.get$isConst() ? exp.get$canonicalCode() : exp.code); |
| 12255 var codeWithComment = ('' + code + '/*' + field.get$declaringType().get$name()
+ '.' + field.get$name() + '*/'); | 12261 var codeWithComment = ('' + code + '/*' + field.get$declaringType().get$name()
+ '.' + field.get$name() + '*/'); |
| 12256 return new GlobalValue(exp.get$type(), codeWithComment, field.get$isFinal(), f
ield, null, exp, code, exp.span, dependencies.filter$1((function (d) { | 12262 return new GlobalValue(exp.get$type(), codeWithComment, field.get$isFinal(), f
ield, null, exp, code, exp.span, dependencies.filter$1((function (d) { |
| 12257 return (d instanceof GlobalValue); | 12263 return (d instanceof GlobalValue); |
| 12258 }) | 12264 }) |
| 12259 )); | 12265 )); |
| 12260 } | 12266 } |
| 12261 GlobalValue.GlobalValue$fromConst$factory = function(uniqueId, exp, dependencies
) { | 12267 GlobalValue.GlobalValue$fromConst$factory = function(uniqueId, exp, dependencies
) { |
| 12262 var name = ("const\$" + uniqueId); | 12268 var name = ("const\$" + uniqueId); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12306 } | 12312 } |
| 12307 else if (this.name != null) { | 12313 else if (this.name != null) { |
| 12308 return this.name.compareTo(other.name); | 12314 return this.name.compareTo(other.name); |
| 12309 } | 12315 } |
| 12310 else { | 12316 else { |
| 12311 return this.field.name.compareTo(other.field.name); | 12317 return this.field.name.compareTo(other.field.name); |
| 12312 } | 12318 } |
| 12313 } | 12319 } |
| 12314 GlobalValue.prototype.compareTo$1 = GlobalValue.prototype.compareTo; | 12320 GlobalValue.prototype.compareTo$1 = GlobalValue.prototype.compareTo; |
| 12315 // ********** Code for BareValue ************** | 12321 // ********** Code for BareValue ************** |
| 12322 $inherits(BareValue, Value); |
| 12316 function BareValue(home, outermost, span) { | 12323 function BareValue(home, outermost, span) { |
| 12317 this.home = home; | 12324 this.home = home; |
| 12318 // Initializers done | 12325 // Initializers done |
| 12319 Value.call(this, outermost.method.declaringType, null, span, false); | 12326 Value.call(this, outermost.method.declaringType, null, span, false); |
| 12320 this.isType = outermost.get$isStatic(); | 12327 this.isType = outermost.get$isStatic(); |
| 12321 } | 12328 } |
| 12322 $inherits(BareValue, Value); | |
| 12323 BareValue.prototype.get$type = function() { | 12329 BareValue.prototype.get$type = function() { |
| 12324 return this._type; | 12330 return this._type; |
| 12325 } | 12331 } |
| 12326 BareValue.prototype._ensureCode = function() { | 12332 BareValue.prototype._ensureCode = function() { |
| 12327 if (this.code != null) return; | 12333 if (this.code != null) return; |
| 12328 if (this.isType) { | 12334 if (this.isType) { |
| 12329 this.code = this.get$type().get$jsname(); | 12335 this.code = this.get$type().get$jsname(); |
| 12330 } | 12336 } |
| 12331 else { | 12337 else { |
| 12332 this.code = this.home._makeThisCode(); | 12338 this.code = this.home._makeThisCode(); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 12343 } | 12349 } |
| 12344 member = this.home.get$library().lookup(name, this.span); | 12350 member = this.home.get$library().lookup(name, this.span); |
| 12345 if (member != null) { | 12351 if (member != null) { |
| 12346 return member; | 12352 return member; |
| 12347 } | 12353 } |
| 12348 this._ensureCode(); | 12354 this._ensureCode(); |
| 12349 return null; | 12355 return null; |
| 12350 } | 12356 } |
| 12351 // ********** Code for CompilerException ************** | 12357 // ********** Code for CompilerException ************** |
| 12352 function CompilerException(_message, _location) { | 12358 function CompilerException(_message, _location) { |
| 12353 this._message = _message; | 12359 this._lang_message = _message; |
| 12354 this._location = _location; | 12360 this._location = _location; |
| 12355 // Initializers done | 12361 // Initializers done |
| 12356 } | 12362 } |
| 12357 CompilerException.prototype.toString = function() { | 12363 CompilerException.prototype.toString = function() { |
| 12358 if (this._location != null) { | 12364 if (this._location != null) { |
| 12359 return ('CompilerException: ' + this._location.toMessageString(this._message
)); | 12365 return ('CompilerException: ' + this._location.toMessageString(this._lang_me
ssage)); |
| 12360 } | 12366 } |
| 12361 else { | 12367 else { |
| 12362 return ('CompilerException: ' + this._message); | 12368 return ('CompilerException: ' + this._lang_message); |
| 12363 } | 12369 } |
| 12364 } | 12370 } |
| 12365 CompilerException.prototype.toString$0 = CompilerException.prototype.toString; | 12371 CompilerException.prototype.toString$0 = CompilerException.prototype.toString; |
| 12366 // ********** Code for World ************** | 12372 // ********** Code for World ************** |
| 12367 function World(files) { | 12373 function World(files) { |
| 12368 this.errors = 0 | 12374 this.errors = 0 |
| 12369 this.warnings = 0 | 12375 this.warnings = 0 |
| 12370 this.dartBytesRead = 0 | 12376 this.dartBytesRead = 0 |
| 12371 this.jsBytesWritten = 0 | 12377 this.jsBytesWritten = 0 |
| 12372 this.seenFatal = false | 12378 this.seenFatal = false |
| (...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12884 VarMember.prototype.get$name = function() { return this.name; }; | 12890 VarMember.prototype.get$name = function() { return this.name; }; |
| 12885 VarMember.prototype.get$returnType = function() { | 12891 VarMember.prototype.get$returnType = function() { |
| 12886 return $globals.world.varType; | 12892 return $globals.world.varType; |
| 12887 } | 12893 } |
| 12888 VarMember.prototype.invoke = function(context, node, target, args) { | 12894 VarMember.prototype.invoke = function(context, node, target, args) { |
| 12889 return new Value(this.get$returnType(), ('' + target.code + '.' + this.name +
'(' + args.getCode() + ')'), node.span, true); | 12895 return new Value(this.get$returnType(), ('' + target.code + '.' + this.name +
'(' + args.getCode() + ')'), node.span, true); |
| 12890 } | 12896 } |
| 12891 VarMember.prototype.generate$1 = VarMember.prototype.generate; | 12897 VarMember.prototype.generate$1 = VarMember.prototype.generate; |
| 12892 VarMember.prototype.invoke$4 = VarMember.prototype.invoke; | 12898 VarMember.prototype.invoke$4 = VarMember.prototype.invoke; |
| 12893 // ********** Code for VarFunctionStub ************** | 12899 // ********** Code for VarFunctionStub ************** |
| 12900 $inherits(VarFunctionStub, VarMember); |
| 12894 function VarFunctionStub(name, callArgs) { | 12901 function VarFunctionStub(name, callArgs) { |
| 12895 this.args = callArgs.toCallStubArgs(); | 12902 this.args = callArgs.toCallStubArgs(); |
| 12896 // Initializers done | 12903 // Initializers done |
| 12897 VarMember.call(this, name); | 12904 VarMember.call(this, name); |
| 12898 $globals.world.gen.corejs.useGenStub = true; | 12905 $globals.world.gen.corejs.useGenStub = true; |
| 12899 } | 12906 } |
| 12900 $inherits(VarFunctionStub, VarMember); | |
| 12901 VarFunctionStub.prototype.generate = function(code) { | 12907 VarFunctionStub.prototype.generate = function(code) { |
| 12902 if (this.args.get$hasNames()) { | 12908 if (this.args.get$hasNames()) { |
| 12903 this.generateNamed(code); | 12909 this.generateNamed(code); |
| 12904 } | 12910 } |
| 12905 else { | 12911 else { |
| 12906 this.generatePositional(code); | 12912 this.generatePositional(code); |
| 12907 } | 12913 } |
| 12908 } | 12914 } |
| 12909 VarFunctionStub.prototype.generatePositional = function(w) { | 12915 VarFunctionStub.prototype.generatePositional = function(w) { |
| 12910 var arity = this.args.get$length(); | 12916 var arity = this.args.get$length(); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 12922 VarFunctionStub.prototype.generateNamed = function(w) { | 12928 VarFunctionStub.prototype.generateNamed = function(w) { |
| 12923 var named = Strings.join(this.args.getNames(), '", "'); | 12929 var named = Strings.join(this.args.getNames(), '", "'); |
| 12924 var argsCode = this.args.getCode(); | 12930 var argsCode = this.args.getCode(); |
| 12925 w.enterBlock(('Function.prototype.' + this.name + ' = function(' + argsCode +
') {')); | 12931 w.enterBlock(('Function.prototype.' + this.name + ' = function(' + argsCode +
') {')); |
| 12926 w.writeln(('this.' + this.name + ' = this.\$genStub(' + this.args.get$length()
+ ', ["' + named + '"]);')); | 12932 w.writeln(('this.' + this.name + ' = this.\$genStub(' + this.args.get$length()
+ ', ["' + named + '"]);')); |
| 12927 w.writeln(('return this.' + this.name + '(' + argsCode + ');')); | 12933 w.writeln(('return this.' + this.name + '(' + argsCode + ');')); |
| 12928 w.exitBlock('}'); | 12934 w.exitBlock('}'); |
| 12929 } | 12935 } |
| 12930 VarFunctionStub.prototype.generate$1 = VarFunctionStub.prototype.generate; | 12936 VarFunctionStub.prototype.generate$1 = VarFunctionStub.prototype.generate; |
| 12931 // ********** Code for VarMethodStub ************** | 12937 // ********** Code for VarMethodStub ************** |
| 12938 $inherits(VarMethodStub, VarMember); |
| 12932 function VarMethodStub(name, member, args, body) { | 12939 function VarMethodStub(name, member, args, body) { |
| 12933 this.member = member; | 12940 this.member = member; |
| 12934 this.args = args; | 12941 this.args = args; |
| 12935 this.body = body; | 12942 this.body = body; |
| 12936 // Initializers done | 12943 // Initializers done |
| 12937 VarMember.call(this, name); | 12944 VarMember.call(this, name); |
| 12938 } | 12945 } |
| 12939 $inherits(VarMethodStub, VarMember); | |
| 12940 VarMethodStub.prototype.get$body = function() { return this.body; }; | 12946 VarMethodStub.prototype.get$body = function() { return this.body; }; |
| 12941 VarMethodStub.prototype.get$isHidden = function() { | 12947 VarMethodStub.prototype.get$isHidden = function() { |
| 12942 return this.member != null ? this.member.declaringType.get$isHiddenNativeType(
) : false; | 12948 return this.member != null ? this.member.declaringType.get$isHiddenNativeType(
) : false; |
| 12943 } | 12949 } |
| 12944 VarMethodStub.prototype.get$returnType = function() { | 12950 VarMethodStub.prototype.get$returnType = function() { |
| 12945 return this.member != null ? this.member.get$returnType() : $globals.world.var
Type; | 12951 return this.member != null ? this.member.get$returnType() : $globals.world.var
Type; |
| 12946 } | 12952 } |
| 12947 VarMethodStub.prototype.get$declaringType = function() { | 12953 VarMethodStub.prototype.get$declaringType = function() { |
| 12948 return this.member != null ? this.member.declaringType : $globals.world.object
Type; | 12954 return this.member != null ? this.member.declaringType : $globals.world.object
Type; |
| 12949 } | 12955 } |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12990 } | 12996 } |
| 12991 } | 12997 } |
| 12992 return method.namesInOrder(args); | 12998 return method.namesInOrder(args); |
| 12993 } | 12999 } |
| 12994 else { | 13000 else { |
| 12995 return false; | 13001 return false; |
| 12996 } | 13002 } |
| 12997 } | 13003 } |
| 12998 VarMethodStub.prototype.generate$1 = VarMethodStub.prototype.generate; | 13004 VarMethodStub.prototype.generate$1 = VarMethodStub.prototype.generate; |
| 12999 // ********** Code for VarMethodSet ************** | 13005 // ********** Code for VarMethodSet ************** |
| 13006 $inherits(VarMethodSet, VarMember); |
| 13000 function VarMethodSet(baseName, name, members, callArgs, returnType) { | 13007 function VarMethodSet(baseName, name, members, callArgs, returnType) { |
| 13001 this.invoked = false | 13008 this.invoked = false |
| 13002 this.baseName = baseName; | 13009 this.baseName = baseName; |
| 13003 this.members = members; | 13010 this.members = members; |
| 13004 this.returnType = returnType; | 13011 this.returnType = returnType; |
| 13005 this.args = callArgs.toCallStubArgs(); | 13012 this.args = callArgs.toCallStubArgs(); |
| 13006 // Initializers done | 13013 // Initializers done |
| 13007 VarMember.call(this, name); | 13014 VarMember.call(this, name); |
| 13008 } | 13015 } |
| 13009 $inherits(VarMethodSet, VarMember); | |
| 13010 VarMethodSet.prototype.get$members = function() { return this.members; }; | 13016 VarMethodSet.prototype.get$members = function() { return this.members; }; |
| 13011 VarMethodSet.prototype.get$returnType = function() { return this.returnType; }; | 13017 VarMethodSet.prototype.get$returnType = function() { return this.returnType; }; |
| 13012 VarMethodSet.prototype.invoke = function(context, node, target, args) { | 13018 VarMethodSet.prototype.invoke = function(context, node, target, args) { |
| 13013 this._invokeMembers(context, node); | 13019 this._invokeMembers(context, node); |
| 13014 return VarMember.prototype.invoke.call(this, context, node, target, args); | 13020 return VarMember.prototype.invoke.call(this, context, node, target, args); |
| 13015 } | 13021 } |
| 13016 VarMethodSet.prototype._invokeMembers = function(context, node) { | 13022 VarMethodSet.prototype._invokeMembers = function(context, node) { |
| 13017 if (this.invoked) return; | 13023 if (this.invoked) return; |
| 13018 this.invoked = true; | 13024 this.invoked = true; |
| 13019 var hasObjectType = false; | 13025 var hasObjectType = false; |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13217 $globals._NO_COLOR = '\u001b[0m'; | 13223 $globals._NO_COLOR = '\u001b[0m'; |
| 13218 $globals._RED_COLOR = '\u001b[31m'; | 13224 $globals._RED_COLOR = '\u001b[31m'; |
| 13219 } | 13225 } |
| 13220 var const$0 = new EnvMap()/*const EnvMap()*/; | 13226 var const$0 = new EnvMap()/*const EnvMap()*/; |
| 13221 var const$2 = new EmptyQueueException()/*const EmptyQueueException()*/; | 13227 var const$2 = new EmptyQueueException()/*const EmptyQueueException()*/; |
| 13222 var const$3 = new _DeletedKeySentinel()/*const _DeletedKeySentinel()*/; | 13228 var const$3 = new _DeletedKeySentinel()/*const _DeletedKeySentinel()*/; |
| 13223 var const$8 = new NoMoreElementsException()/*const NoMoreElementsException()*/; | 13229 var const$8 = new NoMoreElementsException()/*const NoMoreElementsException()*/; |
| 13224 var $globals = {}; | 13230 var $globals = {}; |
| 13225 $static_init(); | 13231 $static_init(); |
| 13226 main(); | 13232 main(); |
| OLD | NEW |