OLD | NEW |
1 dart_library.library('dart/_interceptors', null, /* Imports */[ | 1 dart_library.library('dart/_interceptors', null, /* Imports */[ |
2 "dart_runtime/dart", | 2 "dart_runtime/dart", |
3 'dart/core', | 3 'dart/core', |
4 'dart/_internal', | 4 'dart/_internal', |
5 'dart/collection', | 5 'dart/collection', |
6 'dart/math' | 6 'dart/math' |
7 ], /* Lazy imports */[ | 7 ], /* Lazy imports */[ |
8 'dart/_js_helper' | 8 'dart/_js_helper' |
9 ], function(exports, dart, core, _internal, collection, math, _js_helper) { | 9 ], function(exports, dart, core, _internal, collection, math, _js_helper) { |
10 'use strict'; | 10 'use strict'; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 'length', | 65 'length', |
66 'length', | 66 'length', |
67 'get', | 67 'get', |
68 'set', | 68 'set', |
69 'asMap' | 69 'asMap' |
70 ]); | 70 ]); |
71 class JSArray extends core.Object { | 71 class JSArray extends core.Object { |
72 JSArray() { | 72 JSArray() { |
73 } | 73 } |
74 static typed(allocation) { | 74 static typed(allocation) { |
75 return dart.list(allocation, E); | 75 return dart.as(dart.list(allocation, E), JSArray$(E)); |
76 } | 76 } |
77 static markFixed(allocation) { | 77 static markFixed(allocation) { |
78 return JSArray$(E).typed(JSArray$().markFixedList(dart.as(allocation, co
re.List))); | 78 return JSArray$(E).typed(dart.dcall(JSArray$().markFixedList, allocation
)); |
79 } | 79 } |
80 static markGrowable(allocation) { | 80 static markGrowable(allocation) { |
81 return JSArray$().typed(allocation); | 81 return JSArray$().typed(allocation); |
82 } | 82 } |
83 static markFixedList(list) { | 83 static markFixedList(list) { |
84 list.fixed$length = Array; | 84 list.fixed$length = Array; |
85 return list; | 85 return list; |
86 } | 86 } |
87 [dartx.checkGrowable](reason) { | 87 [dartx.checkGrowable](reason) { |
88 if (this.fixed$length) { | 88 if (dart.notNull(dart.as(this.fixed$length, core.bool))) { |
89 dart.throw(new core.UnsupportedError(dart.as(reason, core.String))); | 89 dart.throw(new core.UnsupportedError(dart.as(reason, core.String))); |
90 } | 90 } |
91 } | 91 } |
92 [dartx.add](value) { | 92 [dartx.add](value) { |
93 dart.as(value, E); | 93 dart.as(value, E); |
94 this[dartx.checkGrowable]('add'); | 94 dart.dcall(this[dartx.checkGrowable], 'add'); |
95 this.push(value); | 95 this.push(value); |
96 } | 96 } |
97 [dartx.removeAt](index) { | 97 [dartx.removeAt](index) { |
98 if (!(typeof index == 'number')) | 98 if (!(typeof index == 'number')) |
99 dart.throw(new core.ArgumentError(index)); | 99 dart.throw(new core.ArgumentError(index)); |
100 if (dart.notNull(index) < 0 || dart.notNull(index) >= dart.notNull(this[
dartx.length])) { | 100 if (dart.notNull(index) < 0 || dart.notNull(index) >= dart.notNull(this[
dartx.length])) { |
101 dart.throw(new core.RangeError.value(index)); | 101 dart.throw(new core.RangeError.value(index)); |
102 } | 102 } |
103 this[dartx.checkGrowable]('removeAt'); | 103 dart.dcall(this[dartx.checkGrowable], 'removeAt'); |
104 return this.splice(index, 1)[0]; | 104 return dart.as(this.splice(index, 1)[0], E); |
105 } | 105 } |
106 [dartx.insert](index, value) { | 106 [dartx.insert](index, value) { |
107 dart.as(value, E); | 107 dart.as(value, E); |
108 if (!(typeof index == 'number')) | 108 if (!(typeof index == 'number')) |
109 dart.throw(new core.ArgumentError(index)); | 109 dart.throw(new core.ArgumentError(index)); |
110 if (dart.notNull(index) < 0 || dart.notNull(index) > dart.notNull(this[d
artx.length])) { | 110 if (dart.notNull(index) < 0 || dart.notNull(index) > dart.notNull(this[d
artx.length])) { |
111 dart.throw(new core.RangeError.value(index)); | 111 dart.throw(new core.RangeError.value(index)); |
112 } | 112 } |
113 this[dartx.checkGrowable]('insert'); | 113 dart.dcall(this[dartx.checkGrowable], 'insert'); |
114 this.splice(index, 0, value); | 114 this.splice(index, 0, value); |
115 } | 115 } |
116 [dartx.insertAll](index, iterable) { | 116 [dartx.insertAll](index, iterable) { |
117 dart.as(iterable, core.Iterable$(E)); | 117 dart.as(iterable, core.Iterable$(E)); |
118 this[dartx.checkGrowable]('insertAll'); | 118 dart.dcall(this[dartx.checkGrowable], 'insertAll'); |
119 _internal.IterableMixinWorkaround.insertAllList(this, index, iterable); | 119 dart.dcall(_internal.IterableMixinWorkaround.insertAllList, this, index,
iterable); |
120 } | 120 } |
121 [dartx.setAll](index, iterable) { | 121 [dartx.setAll](index, iterable) { |
122 dart.as(iterable, core.Iterable$(E)); | 122 dart.as(iterable, core.Iterable$(E)); |
123 _internal.IterableMixinWorkaround.setAllList(this, index, iterable); | 123 dart.dcall(_internal.IterableMixinWorkaround.setAllList, this, index, it
erable); |
124 } | 124 } |
125 [dartx.removeLast]() { | 125 [dartx.removeLast]() { |
126 this[dartx.checkGrowable]('removeLast'); | 126 dart.dcall(this[dartx.checkGrowable], 'removeLast'); |
127 if (this[dartx.length] == 0) | 127 if (this[dartx.length] == 0) |
128 dart.throw(new core.RangeError.value(-1)); | 128 dart.throw(new core.RangeError.value(-1)); |
129 return dart.as(this.pop(), E); | 129 return dart.as(this.pop(), E); |
130 } | 130 } |
131 [dartx.remove](element) { | 131 [dartx.remove](element) { |
132 this[dartx.checkGrowable]('remove'); | 132 dart.dcall(this[dartx.checkGrowable], 'remove'); |
133 for (let i = 0; dart.notNull(i) < dart.notNull(this[dartx.length]); i =
dart.notNull(i) + 1) { | 133 for (let i = 0; dart.notNull(i) < dart.notNull(this[dartx.length]); i =
dart.notNull(i) + 1) { |
134 if (dart.equals(this[dartx.get](i), element)) { | 134 if (dart.equals(this[dartx.get](i), element)) { |
135 this.splice(i, 1); | 135 this.splice(i, 1); |
136 return true; | 136 return true; |
137 } | 137 } |
138 } | 138 } |
139 return false; | 139 return false; |
140 } | 140 } |
141 [dartx.removeWhere](test) { | 141 [dartx.removeWhere](test) { |
142 dart.as(test, dart.functionType(core.bool, [E])); | 142 dart.as(test, dart.functionType(core.bool, [E])); |
143 _internal.IterableMixinWorkaround.removeWhereList(this, test); | 143 dart.dcall(_internal.IterableMixinWorkaround.removeWhereList, this, test
); |
144 } | 144 } |
145 [dartx.retainWhere](test) { | 145 [dartx.retainWhere](test) { |
146 dart.as(test, dart.functionType(core.bool, [E])); | 146 dart.as(test, dart.functionType(core.bool, [E])); |
147 _internal.IterableMixinWorkaround.removeWhereList(this, dart.fn(element
=> !dart.notNull(test(element)), core.bool, [E])); | 147 dart.dcall(_internal.IterableMixinWorkaround.removeWhereList, this, dart
.fn(element => !dart.notNull(test(element)), core.bool, [E])); |
148 } | 148 } |
149 [dartx.where](f) { | 149 [dartx.where](f) { |
150 dart.as(f, dart.functionType(core.bool, [E])); | 150 dart.as(f, dart.functionType(core.bool, [E])); |
151 return new (_internal.IterableMixinWorkaround$(E))().where(this, f); | 151 return dart.dcall(new (_internal.IterableMixinWorkaround$(E))().where, t
his, f); |
152 } | 152 } |
153 [dartx.expand](f) { | 153 [dartx.expand](f) { |
154 dart.as(f, dart.functionType(core.Iterable, [E])); | 154 dart.as(f, dart.functionType(core.Iterable, [E])); |
155 return _internal.IterableMixinWorkaround.expand(this, f); | 155 return dart.dcall(_internal.IterableMixinWorkaround.expand, this, f); |
156 } | 156 } |
157 [dartx.addAll](collection) { | 157 [dartx.addAll](collection) { |
158 dart.as(collection, core.Iterable$(E)); | 158 dart.as(collection, core.Iterable$(E)); |
159 for (let e of collection) { | 159 for (let e of collection) { |
160 this[dartx.add](e); | 160 dart.dcall(this[dartx.add], e); |
161 } | 161 } |
162 } | 162 } |
163 [dartx.clear]() { | 163 [dartx.clear]() { |
164 this[dartx.length] = 0; | 164 this[dartx.length] = 0; |
165 } | 165 } |
166 [dartx.forEach](f) { | 166 [dartx.forEach](f) { |
167 dart.as(f, dart.functionType(dart.void, [E])); | 167 dart.as(f, dart.functionType(dart.void, [E])); |
168 let length = this[dartx.length]; | 168 let length = this[dartx.length]; |
169 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 169 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
170 f(dart.as(this[i], E)); | 170 f(dart.as(this[i], E)); |
171 if (length != this[dartx.length]) { | 171 if (length != this[dartx.length]) { |
172 dart.throw(new core.ConcurrentModificationError(this)); | 172 dart.throw(new core.ConcurrentModificationError(this)); |
173 } | 173 } |
174 } | 174 } |
175 } | 175 } |
176 [dartx.map](f) { | 176 [dartx.map](f) { |
177 dart.as(f, dart.functionType(dart.dynamic, [E])); | 177 dart.as(f, dart.functionType(dart.dynamic, [E])); |
178 return _internal.IterableMixinWorkaround.mapList(this, f); | 178 return dart.dcall(_internal.IterableMixinWorkaround.mapList, this, f); |
179 } | 179 } |
180 [dartx.join](separator) { | 180 [dartx.join](separator) { |
181 if (separator === void 0) | 181 if (separator === void 0) |
182 separator = ""; | 182 separator = ""; |
183 let list = core.List.new(this[dartx.length]); | 183 let list = core.List.new(this[dartx.length]); |
184 for (let i = 0; dart.notNull(i) < dart.notNull(this[dartx.length]); i =
dart.notNull(i) + 1) { | 184 for (let i = 0; dart.notNull(i) < dart.notNull(this[dartx.length]); i =
dart.notNull(i) + 1) { |
185 list[dartx.set](i, `${this[dartx.get](i)}`); | 185 dart.dsetindex(list, i, `${this[dartx.get](i)}`); |
186 } | 186 } |
187 return list.join(separator); | 187 return dart.as(list.join(separator), core.String); |
188 } | 188 } |
189 [dartx.take](n) { | 189 [dartx.take](n) { |
190 return new (_internal.IterableMixinWorkaround$(E))().takeList(this, n); | 190 return dart.dcall(new (_internal.IterableMixinWorkaround$(E))().takeList
, this, n); |
191 } | 191 } |
192 [dartx.takeWhile](test) { | 192 [dartx.takeWhile](test) { |
193 dart.as(test, dart.functionType(core.bool, [E])); | 193 dart.as(test, dart.functionType(core.bool, [E])); |
194 return new (_internal.IterableMixinWorkaround$(E))().takeWhile(this, tes
t); | 194 return dart.dcall(new (_internal.IterableMixinWorkaround$(E))().takeWhil
e, this, test); |
195 } | 195 } |
196 [dartx.skip](n) { | 196 [dartx.skip](n) { |
197 return new (_internal.IterableMixinWorkaround$(E))().skipList(this, n); | 197 return dart.dcall(new (_internal.IterableMixinWorkaround$(E))().skipList
, this, n); |
198 } | 198 } |
199 [dartx.skipWhile](test) { | 199 [dartx.skipWhile](test) { |
200 dart.as(test, dart.functionType(core.bool, [E])); | 200 dart.as(test, dart.functionType(core.bool, [E])); |
201 return new (_internal.IterableMixinWorkaround$(E))().skipWhile(this, tes
t); | 201 return dart.dcall(new (_internal.IterableMixinWorkaround$(E))().skipWhil
e, this, test); |
202 } | 202 } |
203 [dartx.reduce](combine) { | 203 [dartx.reduce](combine) { |
204 dart.as(combine, dart.functionType(E, [E, E])); | 204 dart.as(combine, dart.functionType(E, [E, E])); |
205 return dart.as(_internal.IterableMixinWorkaround.reduce(this, combine),
E); | 205 return dart.as(dart.dcall(_internal.IterableMixinWorkaround.reduce, this
, combine), E); |
206 } | 206 } |
207 [dartx.fold](initialValue, combine) { | 207 [dartx.fold](initialValue, combine) { |
208 dart.as(combine, dart.functionType(dart.dynamic, [dart.dynamic, E])); | 208 dart.as(combine, dart.functionType(dart.dynamic, [dart.dynamic, E])); |
209 return _internal.IterableMixinWorkaround.fold(this, initialValue, combin
e); | 209 return dart.dcall(_internal.IterableMixinWorkaround.fold, this, initialV
alue, combine); |
210 } | 210 } |
211 [dartx.firstWhere](test, opts) { | 211 [dartx.firstWhere](test, opts) { |
212 dart.as(test, dart.functionType(core.bool, [E])); | 212 dart.as(test, dart.functionType(core.bool, [E])); |
213 let orElse = opts && 'orElse' in opts ? opts.orElse : null; | 213 let orElse = opts && 'orElse' in opts ? opts.orElse : null; |
214 dart.as(orElse, dart.functionType(E, [])); | 214 dart.as(orElse, dart.functionType(E, [])); |
215 return dart.as(_internal.IterableMixinWorkaround.firstWhere(this, test,
orElse), E); | 215 return dart.as(dart.dcall(_internal.IterableMixinWorkaround.firstWhere,
this, test, orElse), E); |
216 } | 216 } |
217 [dartx.lastWhere](test, opts) { | 217 [dartx.lastWhere](test, opts) { |
218 dart.as(test, dart.functionType(core.bool, [E])); | 218 dart.as(test, dart.functionType(core.bool, [E])); |
219 let orElse = opts && 'orElse' in opts ? opts.orElse : null; | 219 let orElse = opts && 'orElse' in opts ? opts.orElse : null; |
220 dart.as(orElse, dart.functionType(E, [])); | 220 dart.as(orElse, dart.functionType(E, [])); |
221 return dart.as(_internal.IterableMixinWorkaround.lastWhereList(this, tes
t, orElse), E); | 221 return dart.as(dart.dcall(_internal.IterableMixinWorkaround.lastWhereLis
t, this, test, orElse), E); |
222 } | 222 } |
223 [dartx.singleWhere](test) { | 223 [dartx.singleWhere](test) { |
224 dart.as(test, dart.functionType(core.bool, [E])); | 224 dart.as(test, dart.functionType(core.bool, [E])); |
225 return dart.as(_internal.IterableMixinWorkaround.singleWhere(this, test)
, E); | 225 return dart.as(dart.dcall(_internal.IterableMixinWorkaround.singleWhere,
this, test), E); |
226 } | 226 } |
227 [dartx.elementAt](index) { | 227 [dartx.elementAt](index) { |
228 return this[dartx.get](index); | 228 return this[dartx.get](index); |
229 } | 229 } |
230 [dartx.sublist](start, end) { | 230 [dartx.sublist](start, end) { |
231 if (end === void 0) | 231 if (end === void 0) |
232 end = null; | 232 end = null; |
233 _js_helper.checkNull(start); | 233 dart.dcall(_js_helper.checkNull, start); |
234 if (!(typeof start == 'number')) | 234 if (!(typeof start == 'number')) |
235 dart.throw(new core.ArgumentError(start)); | 235 dart.throw(new core.ArgumentError(start)); |
236 if (dart.notNull(start) < 0 || dart.notNull(start) > dart.notNull(this[d
artx.length])) { | 236 if (dart.notNull(start) < 0 || dart.notNull(start) > dart.notNull(this[d
artx.length])) { |
237 dart.throw(new core.RangeError.range(start, 0, this[dartx.length])); | 237 dart.throw(new core.RangeError.range(start, 0, this[dartx.length])); |
238 } | 238 } |
239 if (end == null) { | 239 if (end == null) { |
240 end = this[dartx.length]; | 240 end = this[dartx.length]; |
241 } else { | 241 } else { |
242 if (!(typeof end == 'number')) | 242 if (!(typeof end == 'number')) |
243 dart.throw(new core.ArgumentError(end)); | 243 dart.throw(new core.ArgumentError(end)); |
244 if (dart.notNull(end) < dart.notNull(start) || dart.notNull(end) > dar
t.notNull(this[dartx.length])) { | 244 if (dart.notNull(end) < dart.notNull(start) || dart.notNull(end) > dar
t.notNull(this[dartx.length])) { |
245 dart.throw(new core.RangeError.range(end, start, this[dartx.length])
); | 245 dart.throw(new core.RangeError.range(end, start, this[dartx.length])
); |
246 } | 246 } |
247 } | 247 } |
248 if (start == end) | 248 if (start == end) |
249 return dart.list([], E); | 249 return dart.list([], E); |
250 return JSArray$(E).typed(this.slice(start, end)); | 250 return JSArray$(E).typed(this.slice(start, end)); |
251 } | 251 } |
252 [dartx.getRange](start, end) { | 252 [dartx.getRange](start, end) { |
253 return new (_internal.IterableMixinWorkaround$(E))().getRangeList(this,
start, end); | 253 return dart.dcall(new (_internal.IterableMixinWorkaround$(E))().getRange
List, this, start, end); |
254 } | 254 } |
255 get [dartx.first]() { | 255 get [dartx.first]() { |
256 if (dart.notNull(this[dartx.length]) > 0) | 256 if (dart.notNull(this[dartx.length]) > 0) |
257 return this[dartx.get](0); | 257 return this[dartx.get](0); |
258 dart.throw(new core.StateError("No elements")); | 258 dart.throw(new core.StateError("No elements")); |
259 } | 259 } |
260 get [dartx.last]() { | 260 get [dartx.last]() { |
261 if (dart.notNull(this[dartx.length]) > 0) | 261 if (dart.notNull(this[dartx.length]) > 0) |
262 return this[dartx.get](dart.notNull(this[dartx.length]) - 1); | 262 return this[dartx.get](dart.notNull(this[dartx.length]) - 1); |
263 dart.throw(new core.StateError("No elements")); | 263 dart.throw(new core.StateError("No elements")); |
264 } | 264 } |
265 get [dartx.single]() { | 265 get [dartx.single]() { |
266 if (this[dartx.length] == 1) | 266 if (this[dartx.length] == 1) |
267 return this[dartx.get](0); | 267 return this[dartx.get](0); |
268 if (this[dartx.length] == 0) | 268 if (this[dartx.length] == 0) |
269 dart.throw(new core.StateError("No elements")); | 269 dart.throw(new core.StateError("No elements")); |
270 dart.throw(new core.StateError("More than one element")); | 270 dart.throw(new core.StateError("More than one element")); |
271 } | 271 } |
272 [dartx.removeRange](start, end) { | 272 [dartx.removeRange](start, end) { |
273 this[dartx.checkGrowable]('removeRange'); | 273 dart.dcall(this[dartx.checkGrowable], 'removeRange'); |
274 let receiverLength = this[dartx.length]; | 274 let receiverLength = this[dartx.length]; |
275 if (dart.notNull(start) < 0 || dart.notNull(start) > dart.notNull(receiv
erLength)) { | 275 if (dart.notNull(start) < 0 || dart.notNull(start) > dart.notNull(receiv
erLength)) { |
276 dart.throw(new core.RangeError.range(start, 0, receiverLength)); | 276 dart.throw(new core.RangeError.range(start, 0, receiverLength)); |
277 } | 277 } |
278 if (dart.notNull(end) < dart.notNull(start) || dart.notNull(end) > dart.
notNull(receiverLength)) { | 278 if (dart.notNull(end) < dart.notNull(start) || dart.notNull(end) > dart.
notNull(receiverLength)) { |
279 dart.throw(new core.RangeError.range(end, start, receiverLength)); | 279 dart.throw(new core.RangeError.range(end, start, receiverLength)); |
280 } | 280 } |
281 _internal.Lists.copy(this, end, this, start, dart.notNull(receiverLength
) - dart.notNull(end)); | 281 dart.dcall(_internal.Lists.copy, this, end, this, start, dart.notNull(re
ceiverLength) - dart.notNull(end)); |
282 this[dartx.length] = dart.notNull(receiverLength) - (dart.notNull(end) -
dart.notNull(start)); | 282 this[dartx.length] = dart.notNull(receiverLength) - (dart.notNull(end) -
dart.notNull(start)); |
283 } | 283 } |
284 [dartx.setRange](start, end, iterable, skipCount) { | 284 [dartx.setRange](start, end, iterable, skipCount) { |
285 dart.as(iterable, core.Iterable$(E)); | 285 dart.as(iterable, core.Iterable$(E)); |
286 if (skipCount === void 0) | 286 if (skipCount === void 0) |
287 skipCount = 0; | 287 skipCount = 0; |
288 _internal.IterableMixinWorkaround.setRangeList(this, start, end, iterabl
e, skipCount); | 288 dart.dcall(_internal.IterableMixinWorkaround.setRangeList, this, start,
end, iterable, skipCount); |
289 } | 289 } |
290 [dartx.fillRange](start, end, fillValue) { | 290 [dartx.fillRange](start, end, fillValue) { |
291 if (fillValue === void 0) | 291 if (fillValue === void 0) |
292 fillValue = null; | 292 fillValue = null; |
293 dart.as(fillValue, E); | 293 dart.as(fillValue, E); |
294 _internal.IterableMixinWorkaround.fillRangeList(this, start, end, fillVa
lue); | 294 dart.dcall(_internal.IterableMixinWorkaround.fillRangeList, this, start,
end, fillValue); |
295 } | 295 } |
296 [dartx.replaceRange](start, end, iterable) { | 296 [dartx.replaceRange](start, end, iterable) { |
297 dart.as(iterable, core.Iterable$(E)); | 297 dart.as(iterable, core.Iterable$(E)); |
298 _internal.IterableMixinWorkaround.replaceRangeList(this, start, end, ite
rable); | 298 dart.dcall(_internal.IterableMixinWorkaround.replaceRangeList, this, sta
rt, end, iterable); |
299 } | 299 } |
300 [dartx.any](f) { | 300 [dartx.any](f) { |
301 dart.as(f, dart.functionType(core.bool, [E])); | 301 dart.as(f, dart.functionType(core.bool, [E])); |
302 return _internal.IterableMixinWorkaround.any(this, f); | 302 return dart.dcall(_internal.IterableMixinWorkaround.any, this, f); |
303 } | 303 } |
304 [dartx.every](f) { | 304 [dartx.every](f) { |
305 dart.as(f, dart.functionType(core.bool, [E])); | 305 dart.as(f, dart.functionType(core.bool, [E])); |
306 return _internal.IterableMixinWorkaround.every(this, f); | 306 return dart.dcall(_internal.IterableMixinWorkaround.every, this, f); |
307 } | 307 } |
308 get [dartx.reversed]() { | 308 get [dartx.reversed]() { |
309 return new (_internal.IterableMixinWorkaround$(E))().reversedList(this); | 309 return dart.dcall(new (_internal.IterableMixinWorkaround$(E))().reversed
List, this); |
310 } | 310 } |
311 [dartx.sort](compare) { | 311 [dartx.sort](compare) { |
312 if (compare === void 0) | 312 if (compare === void 0) |
313 compare = null; | 313 compare = null; |
314 dart.as(compare, dart.functionType(core.int, [E, E])); | 314 dart.as(compare, dart.functionType(core.int, [E, E])); |
315 _internal.IterableMixinWorkaround.sortList(this, compare); | 315 dart.dcall(_internal.IterableMixinWorkaround.sortList, this, compare); |
316 } | 316 } |
317 [dartx.shuffle](random) { | 317 [dartx.shuffle](random) { |
318 if (random === void 0) | 318 if (random === void 0) |
319 random = null; | 319 random = null; |
320 _internal.IterableMixinWorkaround.shuffleList(this, random); | 320 dart.dcall(_internal.IterableMixinWorkaround.shuffleList, this, random); |
321 } | 321 } |
322 [dartx.indexOf](element, start) { | 322 [dartx.indexOf](element, start) { |
323 if (start === void 0) | 323 if (start === void 0) |
324 start = 0; | 324 start = 0; |
325 return _internal.IterableMixinWorkaround.indexOfList(this, element, star
t); | 325 return dart.dcall(_internal.IterableMixinWorkaround.indexOfList, this, e
lement, start); |
326 } | 326 } |
327 [dartx.lastIndexOf](element, start) { | 327 [dartx.lastIndexOf](element, start) { |
328 if (start === void 0) | 328 if (start === void 0) |
329 start = null; | 329 start = null; |
330 return _internal.IterableMixinWorkaround.lastIndexOfList(this, element,
start); | 330 return dart.dcall(_internal.IterableMixinWorkaround.lastIndexOfList, thi
s, element, start); |
331 } | 331 } |
332 [dartx.contains](other) { | 332 [dartx.contains](other) { |
333 for (let i = 0; dart.notNull(i) < dart.notNull(this[dartx.length]); i =
dart.notNull(i) + 1) { | 333 for (let i = 0; dart.notNull(i) < dart.notNull(this[dartx.length]); i =
dart.notNull(i) + 1) { |
334 if (dart.equals(this[dartx.get](i), other)) | 334 if (dart.equals(this[dartx.get](i), other)) |
335 return true; | 335 return true; |
336 } | 336 } |
337 return false; | 337 return false; |
338 } | 338 } |
339 get [dartx.isEmpty]() { | 339 get [dartx.isEmpty]() { |
340 return this[dartx.length] == 0; | 340 return this[dartx.length] == 0; |
341 } | 341 } |
342 get [dartx.isNotEmpty]() { | 342 get [dartx.isNotEmpty]() { |
343 return !dart.notNull(this[dartx.isEmpty]); | 343 return !dart.notNull(this[dartx.isEmpty]); |
344 } | 344 } |
345 toString() { | 345 toString() { |
346 return collection.ListBase.listToString(this); | 346 return dart.dcall(collection.ListBase.listToString, this); |
347 } | 347 } |
348 [dartx.toList](opts) { | 348 [dartx.toList](opts) { |
349 let growable = opts && 'growable' in opts ? opts.growable : true; | 349 let growable = opts && 'growable' in opts ? opts.growable : true; |
350 let list = this.slice(); | 350 let list = this.slice(); |
351 if (!dart.notNull(growable)) | 351 if (!dart.notNull(growable)) |
352 JSArray$().markFixedList(dart.as(list, core.List)); | 352 dart.dcall(JSArray$().markFixedList, list); |
353 return JSArray$(E).typed(list); | 353 return JSArray$(E).typed(list); |
354 } | 354 } |
355 [dartx.toSet]() { | 355 [dartx.toSet]() { |
356 return core.Set$(E).from(this); | 356 return core.Set$(E).from(this); |
357 } | 357 } |
358 get [dartx.iterator]() { | 358 get [dartx.iterator]() { |
359 return new (_internal.ListIterator$(E))(this); | 359 return new (_internal.ListIterator$(E))(this); |
360 } | 360 } |
361 get hashCode() { | 361 get hashCode() { |
362 return _js_helper.Primitives.objectHashCode(this); | 362 return dart.dcall(_js_helper.Primitives.objectHashCode, this); |
363 } | 363 } |
364 get [dartx.length]() { | 364 get [dartx.length]() { |
365 return dart.as(this.length, core.int); | 365 return dart.as(this.length, core.int); |
366 } | 366 } |
367 set [dartx.length](newLength) { | 367 set [dartx.length](newLength) { |
368 if (!(typeof newLength == 'number')) | 368 if (!(typeof newLength == 'number')) |
369 dart.throw(new core.ArgumentError(newLength)); | 369 dart.throw(new core.ArgumentError(newLength)); |
370 if (dart.notNull(newLength) < 0) | 370 if (dart.notNull(newLength) < 0) |
371 dart.throw(new core.RangeError.value(newLength)); | 371 dart.throw(new core.RangeError.value(newLength)); |
372 this[dartx.checkGrowable]('set length'); | 372 dart.dcall(this[dartx.checkGrowable], 'set length'); |
373 this.length = newLength; | 373 this.length = newLength; |
374 } | 374 } |
375 [dartx.get](index) { | 375 [dartx.get](index) { |
376 if (!(typeof index == 'number')) | 376 if (!(typeof index == 'number')) |
377 dart.throw(new core.ArgumentError(index)); | 377 dart.throw(new core.ArgumentError(index)); |
378 if (dart.notNull(index) >= dart.notNull(this[dartx.length]) || dart.notN
ull(index) < 0) | 378 if (dart.notNull(index) >= dart.notNull(this[dartx.length]) || dart.notN
ull(index) < 0) |
379 dart.throw(new core.RangeError.value(index)); | 379 dart.throw(new core.RangeError.value(index)); |
380 return dart.as(this[index], E); | 380 return dart.as(this[index], E); |
381 } | 381 } |
382 [dartx.set](index, value) { | 382 [dartx.set](index, value) { |
383 dart.as(value, E); | 383 dart.as(value, E); |
384 if (!(typeof index == 'number')) | 384 if (!(typeof index == 'number')) |
385 dart.throw(new core.ArgumentError(index)); | 385 dart.throw(new core.ArgumentError(index)); |
386 if (dart.notNull(index) >= dart.notNull(this[dartx.length]) || dart.notN
ull(index) < 0) | 386 if (dart.notNull(index) >= dart.notNull(this[dartx.length]) || dart.notN
ull(index) < 0) |
387 dart.throw(new core.RangeError.value(index)); | 387 dart.throw(new core.RangeError.value(index)); |
388 this[index] = value; | 388 this[index] = value; |
389 return value; | 389 return value; |
390 } | 390 } |
391 [dartx.asMap]() { | 391 [dartx.asMap]() { |
392 return new (_internal.IterableMixinWorkaround$(E))().asMapList(this); | 392 return dart.dcall(new (_internal.IterableMixinWorkaround$(E))().asMapLis
t, this); |
393 } | 393 } |
394 } | 394 } |
395 dart.setBaseClass(JSArray, dart.global.Array); | 395 dart.setBaseClass(JSArray, dart.global.Array); |
396 JSArray[dart.implements] = () => [core.List$(E), JSIndexable]; | 396 JSArray[dart.implements] = () => [core.List$(E), JSIndexable]; |
397 dart.setSignature(JSArray, { | 397 dart.setSignature(JSArray, { |
398 constructors: () => ({ | 398 constructors: () => ({ |
399 JSArray: [JSArray$(E), []], | 399 JSArray: [JSArray$(E), []], |
400 typed: [JSArray$(E), [dart.dynamic]], | 400 typed: [JSArray$(E), [dart.dynamic]], |
401 markFixed: [JSArray$(E), [dart.dynamic]], | 401 markFixed: [JSArray$(E), [dart.dynamic]], |
402 markGrowable: [JSArray$(E), [dart.dynamic]] | 402 markGrowable: [JSArray$(E), [dart.dynamic]] |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
561 } | 561 } |
562 return 1; | 562 return 1; |
563 } else { | 563 } else { |
564 return -1; | 564 return -1; |
565 } | 565 } |
566 } | 566 } |
567 get [dartx.isNegative]() { | 567 get [dartx.isNegative]() { |
568 return dart.equals(this, 0) ? (1)[dartx['/']](this) < 0 : this[dartx['<']]
(0); | 568 return dart.equals(this, 0) ? (1)[dartx['/']](this) < 0 : this[dartx['<']]
(0); |
569 } | 569 } |
570 get [dartx.isNaN]() { | 570 get [dartx.isNaN]() { |
571 return isNaN(this); | 571 return dart.as(isNaN(this), core.bool); |
572 } | 572 } |
573 get [dartx.isInfinite]() { | 573 get [dartx.isInfinite]() { |
574 return this == Infinity || this == -Infinity; | 574 return dart.notNull(dart.as(this == Infinity, core.bool)) || dart.notNull(
dart.as(this == -Infinity, core.bool)); |
575 } | 575 } |
576 get [dartx.isFinite]() { | 576 get [dartx.isFinite]() { |
577 return isFinite(this); | 577 return dart.as(isFinite(this), core.bool); |
578 } | 578 } |
579 [dartx.remainder](b) { | 579 [dartx.remainder](b) { |
580 _js_helper.checkNull(b); | 580 dart.dcall(_js_helper.checkNull, b); |
581 if (!dart.is(b, core.num)) | 581 if (!dart.is(b, core.num)) |
582 dart.throw(new core.ArgumentError(b)); | 582 dart.throw(new core.ArgumentError(b)); |
583 return this % b; | 583 return dart.as(this % b, core.num); |
584 } | 584 } |
585 [dartx.abs]() { | 585 [dartx.abs]() { |
586 return Math.abs(this); | 586 return dart.as(Math.abs(this), core.num); |
587 } | 587 } |
588 get [dartx.sign]() { | 588 get [dartx.sign]() { |
589 return dart.notNull(this[dartx['>']](0)) ? 1 : dart.notNull(this[dartx['<'
]](0)) ? -1 : this; | 589 return dart.notNull(this[dartx['>']](0)) ? 1 : dart.notNull(this[dartx['<'
]](0)) ? -1 : this; |
590 } | 590 } |
591 [dartx.toInt]() { | 591 [dartx.toInt]() { |
592 if (dart.notNull(this[dartx['>=']](JSNumber._MIN_INT32)) && dart.notNull(t
his[dartx['<=']](JSNumber._MAX_INT32))) { | 592 if (dart.notNull(this[dartx['>=']](JSNumber._MIN_INT32)) && dart.notNull(t
his[dartx['<=']](JSNumber._MAX_INT32))) { |
593 return this | 0; | 593 return dart.as(this | 0, core.int); |
594 } | 594 } |
595 if (isFinite(this)) { | 595 if (dart.notNull(dart.as(isFinite(this), core.bool))) { |
596 return this[dartx.truncateToDouble]() + 0; | 596 return dart.as(dart.dcall(this[dartx.truncateToDouble]) + 0, core.int); |
597 } | 597 } |
598 dart.throw(new core.UnsupportedError('' + this)); | 598 dart.throw(new core.UnsupportedError(dart.as('' + this, core.String))); |
599 } | 599 } |
600 [dartx.truncate]() { | 600 [dartx.truncate]() { |
601 return this[dartx.toInt](); | 601 return dart.dcall(this[dartx.toInt]); |
602 } | 602 } |
603 [dartx.ceil]() { | 603 [dartx.ceil]() { |
604 return this[dartx.ceilToDouble]()[dartx.toInt](); | 604 return dart.dcall(dart.dcall(this[dartx.ceilToDouble])[dartx.toInt]); |
605 } | 605 } |
606 [dartx.floor]() { | 606 [dartx.floor]() { |
607 return this[dartx.floorToDouble]()[dartx.toInt](); | 607 return dart.dcall(dart.dcall(this[dartx.floorToDouble])[dartx.toInt]); |
608 } | 608 } |
609 [dartx.round]() { | 609 [dartx.round]() { |
610 return this[dartx.roundToDouble]()[dartx.toInt](); | 610 return dart.dcall(dart.dcall(this[dartx.roundToDouble])[dartx.toInt]); |
611 } | 611 } |
612 [dartx.ceilToDouble]() { | 612 [dartx.ceilToDouble]() { |
613 return Math.ceil(this); | 613 return dart.as(Math.ceil(this), core.double); |
614 } | 614 } |
615 [dartx.floorToDouble]() { | 615 [dartx.floorToDouble]() { |
616 return Math.floor(this); | 616 return dart.as(Math.floor(this), core.double); |
617 } | 617 } |
618 [dartx.roundToDouble]() { | 618 [dartx.roundToDouble]() { |
619 if (dart.notNull(this[dartx['<']](0))) { | 619 if (dart.notNull(this[dartx['<']](0))) { |
620 return -Math.round(-this); | 620 return dart.as(-Math.round(-this), core.double); |
621 } else { | 621 } else { |
622 return Math.round(this); | 622 return dart.as(Math.round(this), core.double); |
623 } | 623 } |
624 } | 624 } |
625 [dartx.truncateToDouble]() { | 625 [dartx.truncateToDouble]() { |
626 return dart.notNull(this[dartx['<']](0)) ? this[dartx.ceilToDouble]() : th
is[dartx.floorToDouble](); | 626 return dart.notNull(this[dartx['<']](0)) ? dart.dcall(this[dartx.ceilToDou
ble]) : dart.dcall(this[dartx.floorToDouble]); |
627 } | 627 } |
628 [dartx.clamp](lowerLimit, upperLimit) { | 628 [dartx.clamp](lowerLimit, upperLimit) { |
629 if (!dart.is(lowerLimit, core.num)) | 629 if (!dart.is(lowerLimit, core.num)) |
630 dart.throw(new core.ArgumentError(lowerLimit)); | 630 dart.throw(new core.ArgumentError(lowerLimit)); |
631 if (!dart.is(upperLimit, core.num)) | 631 if (!dart.is(upperLimit, core.num)) |
632 dart.throw(new core.ArgumentError(upperLimit)); | 632 dart.throw(new core.ArgumentError(upperLimit)); |
633 if (dart.notNull(lowerLimit[dartx.compareTo](upperLimit)) > 0) { | 633 if (dart.notNull(dart.dcall(lowerLimit[dartx.compareTo], upperLimit)) > 0)
{ |
634 dart.throw(new core.ArgumentError(lowerLimit)); | 634 dart.throw(new core.ArgumentError(lowerLimit)); |
635 } | 635 } |
636 if (dart.notNull(this[dartx.compareTo](lowerLimit)) < 0) | 636 if (dart.notNull(dart.dcall(this[dartx.compareTo], lowerLimit)) < 0) |
637 return lowerLimit; | 637 return lowerLimit; |
638 if (dart.notNull(this[dartx.compareTo](upperLimit)) > 0) | 638 if (dart.notNull(dart.dcall(this[dartx.compareTo], upperLimit)) > 0) |
639 return upperLimit; | 639 return upperLimit; |
640 return this; | 640 return this; |
641 } | 641 } |
642 [dartx.toDouble]() { | 642 [dartx.toDouble]() { |
643 return this; | 643 return this; |
644 } | 644 } |
645 [dartx.toStringAsFixed](fractionDigits) { | 645 [dartx.toStringAsFixed](fractionDigits) { |
646 _js_helper.checkInt(fractionDigits); | 646 dart.dcall(_js_helper.checkInt, fractionDigits); |
647 if (dart.notNull(fractionDigits) < 0 || dart.notNull(fractionDigits) > 20)
{ | 647 if (dart.notNull(fractionDigits) < 0 || dart.notNull(fractionDigits) > 20)
{ |
648 dart.throw(new core.RangeError(fractionDigits)); | 648 dart.throw(new core.RangeError(fractionDigits)); |
649 } | 649 } |
650 let result = this.toFixed(fractionDigits); | 650 let result = dart.as(this.toFixed(fractionDigits), core.String); |
651 if (dart.equals(this, 0) && dart.notNull(this[dartx.isNegative])) | 651 if (dart.equals(this, 0) && dart.notNull(this[dartx.isNegative])) |
652 return `-${result}`; | 652 return `-${result}`; |
653 return result; | 653 return result; |
654 } | 654 } |
655 [dartx.toStringAsExponential](fractionDigits) { | 655 [dartx.toStringAsExponential](fractionDigits) { |
656 if (fractionDigits === void 0) | 656 if (fractionDigits === void 0) |
657 fractionDigits = null; | 657 fractionDigits = null; |
658 let result = null; | 658 let result = null; |
659 if (fractionDigits != null) { | 659 if (fractionDigits != null) { |
660 _js_helper.checkInt(fractionDigits); | 660 dart.dcall(_js_helper.checkInt, fractionDigits); |
661 if (dart.notNull(fractionDigits) < 0 || dart.notNull(fractionDigits) > 2
0) { | 661 if (dart.notNull(fractionDigits) < 0 || dart.notNull(fractionDigits) > 2
0) { |
662 dart.throw(new core.RangeError(fractionDigits)); | 662 dart.throw(new core.RangeError(fractionDigits)); |
663 } | 663 } |
664 result = this.toExponential(fractionDigits); | 664 result = dart.as(this.toExponential(fractionDigits), core.String); |
665 } else { | 665 } else { |
666 result = this.toExponential(); | 666 result = dart.as(this.toExponential(), core.String); |
667 } | 667 } |
668 if (dart.equals(this, 0) && dart.notNull(this[dartx.isNegative])) | 668 if (dart.equals(this, 0) && dart.notNull(this[dartx.isNegative])) |
669 return `-${result}`; | 669 return `-${result}`; |
670 return result; | 670 return result; |
671 } | 671 } |
672 [dartx.toStringAsPrecision](precision) { | 672 [dartx.toStringAsPrecision](precision) { |
673 _js_helper.checkInt(precision); | 673 dart.dcall(_js_helper.checkInt, precision); |
674 if (dart.notNull(precision) < 1 || dart.notNull(precision) > 21) { | 674 if (dart.notNull(precision) < 1 || dart.notNull(precision) > 21) { |
675 dart.throw(new core.RangeError(precision)); | 675 dart.throw(new core.RangeError(precision)); |
676 } | 676 } |
677 let result = this.toPrecision(precision); | 677 let result = dart.as(this.toPrecision(precision), core.String); |
678 if (dart.equals(this, 0) && dart.notNull(this[dartx.isNegative])) | 678 if (dart.equals(this, 0) && dart.notNull(this[dartx.isNegative])) |
679 return `-${result}`; | 679 return `-${result}`; |
680 return result; | 680 return result; |
681 } | 681 } |
682 [dartx.toRadixString](radix) { | 682 [dartx.toRadixString](radix) { |
683 _js_helper.checkInt(radix); | 683 dart.dcall(_js_helper.checkInt, radix); |
684 if (dart.notNull(radix) < 2 || dart.notNull(radix) > 36) | 684 if (dart.notNull(radix) < 2 || dart.notNull(radix) > 36) |
685 dart.throw(new core.RangeError(radix)); | 685 dart.throw(new core.RangeError(radix)); |
686 let result = this.toString(radix); | 686 let result = dart.as(this.toString(radix), core.String); |
687 let rightParenCode = 41; | 687 let rightParenCode = 41; |
688 if (result[dartx.codeUnitAt](dart.notNull(result[dartx.length]) - 1) != ri
ghtParenCode) { | 688 if (dart.dcall(result[dartx.codeUnitAt], dart.notNull(result[dartx.length]
) - 1) != rightParenCode) { |
689 return result; | 689 return result; |
690 } | 690 } |
691 return JSNumber._handleIEtoString(result); | 691 return dart.dcall(JSNumber._handleIEtoString, result); |
692 } | 692 } |
693 static _handleIEtoString(result) { | 693 static _handleIEtoString(result) { |
694 let match = /^([\da-z]+)(?:\.([\da-z]+))?\(e\+(\d+)\)$/.exec(result); | 694 let match = /^([\da-z]+)(?:\.([\da-z]+))?\(e\+(\d+)\)$/.exec(result); |
695 if (match == null) { | 695 if (match == null) { |
696 dart.throw(new core.UnsupportedError(`Unexpected toString result: ${resu
lt}`)); | 696 dart.throw(new core.UnsupportedError(`Unexpected toString result: ${resu
lt}`)); |
697 } | 697 } |
698 result = dart.dindex(match, 1); | 698 result = dart.as(dart.dindex(match, 1), core.String); |
699 let exponent = +dart.dindex(match, 3); | 699 let exponent = dart.as(+dart.dindex(match, 3), core.int); |
700 if (dart.dindex(match, 2) != null) { | 700 if (dart.dindex(match, 2) != null) { |
701 result = result + dart.dindex(match, 2); | 701 result = dart.as(result + dart.dindex(match, 2), core.String); |
702 exponent = dart.notNull(exponent) - dart.dindex(match, 2).length; | 702 exponent = dart.notNull(exponent) - dart.notNull(dart.as(dart.dindex(mat
ch, 2).length, core.int)); |
703 } | 703 } |
704 return dart.notNull(result) + "0"[dartx['*']](exponent); | 704 return dart.notNull(result) + "0"[dartx['*']](exponent); |
705 } | 705 } |
706 toString() { | 706 toString() { |
707 if (dart.equals(this, 0) && 1 / this < 0) { | 707 if (dart.equals(this, 0) && dart.notNull(dart.as(1 / this < 0, core.bool))
) { |
708 return '-0.0'; | 708 return '-0.0'; |
709 } else { | 709 } else { |
710 return "" + this; | 710 return dart.as("" + this, core.String); |
711 } | 711 } |
712 } | 712 } |
713 get hashCode() { | 713 get hashCode() { |
714 return this & 0x1FFFFFFF; | 714 return dart.as(this & 0x1FFFFFFF, core.int); |
715 } | 715 } |
716 [dartx['unary-']]() { | 716 [dartx['unary-']]() { |
717 return -this; | 717 return dart.as(-this, core.num); |
718 } | 718 } |
719 [dartx['+']](other) { | 719 [dartx['+']](other) { |
720 if (!dart.is(other, core.num)) | 720 if (!dart.is(other, core.num)) |
721 dart.throw(new core.ArgumentError(other)); | 721 dart.throw(new core.ArgumentError(other)); |
722 return this + other; | 722 return dart.as(this + other, core.num); |
723 } | 723 } |
724 [dartx['-']](other) { | 724 [dartx['-']](other) { |
725 if (!dart.is(other, core.num)) | 725 if (!dart.is(other, core.num)) |
726 dart.throw(new core.ArgumentError(other)); | 726 dart.throw(new core.ArgumentError(other)); |
727 return this - other; | 727 return dart.as(this - other, core.num); |
728 } | 728 } |
729 [dartx['/']](other) { | 729 [dartx['/']](other) { |
730 if (!dart.is(other, core.num)) | 730 if (!dart.is(other, core.num)) |
731 dart.throw(new core.ArgumentError(other)); | 731 dart.throw(new core.ArgumentError(other)); |
732 return this / other; | 732 return dart.as(this / other, core.double); |
733 } | 733 } |
734 [dartx['*']](other) { | 734 [dartx['*']](other) { |
735 if (!dart.is(other, core.num)) | 735 if (!dart.is(other, core.num)) |
736 dart.throw(new core.ArgumentError(other)); | 736 dart.throw(new core.ArgumentError(other)); |
737 return this * other; | 737 return dart.as(this * other, core.num); |
738 } | 738 } |
739 [dartx['%']](other) { | 739 [dartx['%']](other) { |
740 if (!dart.is(other, core.num)) | 740 if (!dart.is(other, core.num)) |
741 dart.throw(new core.ArgumentError(other)); | 741 dart.throw(new core.ArgumentError(other)); |
742 let result = this % other; | 742 let result = dart.as(this % other, core.num); |
743 if (result == 0) | 743 if (result == 0) |
744 return 0; | 744 return 0; |
745 if (dart.notNull(result) > 0) | 745 if (dart.notNull(result) > 0) |
746 return result; | 746 return result; |
747 if (other < 0) { | 747 if (dart.notNull(dart.as(dart.dsend(other, '<', 0), core.bool))) { |
748 return dart.notNull(result) - other; | 748 return dart.notNull(result) - dart.notNull(dart.as(other, core.num)); |
749 } else { | 749 } else { |
750 return dart.notNull(result) + other; | 750 return dart.notNull(result) + dart.notNull(dart.as(other, core.num)); |
751 } | 751 } |
752 } | 752 } |
753 [_isInt32](value) { | 753 [_isInt32](value) { |
754 return (value | 0) === value; | 754 return dart.as((value | 0) === value, core.bool); |
755 } | 755 } |
756 [dartx['~/']](other) { | 756 [dartx['~/']](other) { |
757 if (false) | 757 if (false) |
758 this[_tdivFast](other); | 758 dart.dcall(this[_tdivFast], other); |
759 if (dart.notNull(this[_isInt32](this)) && dart.notNull(this[_isInt32](othe
r)) && 0 != other && -1 != other) { | 759 if (dart.notNull(dart.dcall(this[_isInt32], this)) && dart.notNull(dart.dc
all(this[_isInt32], other)) && 0 != other && -1 != other) { |
760 return this / other | 0; | 760 return dart.as(this / other | 0, core.int); |
761 } else { | 761 } else { |
762 return this[_tdivSlow](other); | 762 return dart.dcall(this[_tdivSlow], other); |
763 } | 763 } |
764 } | 764 } |
765 [_tdivFast](other) { | 765 [_tdivFast](other) { |
766 return dart.notNull(this[_isInt32](this)) ? this / other | 0 : (this / oth
er)[dartx.toInt](); | 766 return dart.notNull(dart.dcall(this[_isInt32], this)) ? dart.as(this / oth
er | 0, core.int) : dart.as(dart.dsend(this / other, 'toInt'), core.int); |
767 } | 767 } |
768 [_tdivSlow](other) { | 768 [_tdivSlow](other) { |
769 if (!dart.is(other, core.num)) | 769 if (!dart.is(other, core.num)) |
770 dart.throw(new core.ArgumentError(other)); | 770 dart.throw(new core.ArgumentError(other)); |
771 return (this / other)[dartx.toInt](); | 771 return dart.as(dart.dsend(this / other, 'toInt'), core.int); |
772 } | 772 } |
773 [dartx['<<']](other) { | 773 [dartx['<<']](other) { |
774 if (!dart.is(other, core.num)) | 774 if (!dart.is(other, core.num)) |
775 dart.throw(new core.ArgumentError(other)); | 775 dart.throw(new core.ArgumentError(other)); |
776 if (other < 0) | 776 if (dart.notNull(dart.as(dart.dsend(other, '<', 0), core.bool))) |
777 dart.throw(new core.ArgumentError(other)); | 777 dart.throw(new core.ArgumentError(other)); |
778 return this[_shlPositive](other); | 778 return dart.dcall(this[_shlPositive], other); |
779 } | 779 } |
780 [_shlPositive](other) { | 780 [_shlPositive](other) { |
781 return other > 31 ? 0 : dart.as(this << other >>> 0, core.num); | 781 return dart.notNull(dart.as(other > 31, core.bool)) ? 0 : dart.as(this <<
other >>> 0, core.num); |
782 } | 782 } |
783 [dartx['>>']](other) { | 783 [dartx['>>']](other) { |
784 if (false) | 784 if (false) |
785 this[_shrReceiverPositive](other); | 785 dart.dcall(this[_shrReceiverPositive], other); |
786 if (!dart.is(other, core.num)) | 786 if (!dart.is(other, core.num)) |
787 dart.throw(new core.ArgumentError(other)); | 787 dart.throw(new core.ArgumentError(other)); |
788 if (other < 0) | 788 if (dart.notNull(dart.as(dart.dsend(other, '<', 0), core.bool))) |
789 dart.throw(new core.ArgumentError(other)); | 789 dart.throw(new core.ArgumentError(other)); |
790 return this[_shrOtherPositive](other); | 790 return dart.dcall(this[_shrOtherPositive], other); |
791 } | 791 } |
792 [_shrOtherPositive](other) { | 792 [_shrOtherPositive](other) { |
793 return this > 0 ? this[_shrBothPositive](other) : dart.as(this >> (dart.no
tNull(other) > 31 ? 31 : other) >>> 0, core.num); | 793 return dart.notNull(dart.as(dart.dsend(this, '>', 0), core.bool)) ? dart.d
call(this[_shrBothPositive], other) : dart.as(this >> (dart.notNull(other) > 31
? 31 : other) >>> 0, core.num); |
794 } | 794 } |
795 [_shrReceiverPositive](other) { | 795 [_shrReceiverPositive](other) { |
796 if (other < 0) | 796 if (dart.notNull(dart.as(dart.dsend(other, '<', 0), core.bool))) |
797 dart.throw(new core.ArgumentError(other)); | 797 dart.throw(new core.ArgumentError(other)); |
798 return this[_shrBothPositive](other); | 798 return dart.dcall(this[_shrBothPositive], other); |
799 } | 799 } |
800 [_shrBothPositive](other) { | 800 [_shrBothPositive](other) { |
801 return other > 31 ? 0 : dart.as(this >>> other, core.num); | 801 return dart.notNull(dart.as(other > 31, core.bool)) ? 0 : dart.as(this >>>
other, core.num); |
802 } | 802 } |
803 [dartx['&']](other) { | 803 [dartx['&']](other) { |
804 if (!dart.is(other, core.num)) | 804 if (!dart.is(other, core.num)) |
805 dart.throw(new core.ArgumentError(other)); | 805 dart.throw(new core.ArgumentError(other)); |
806 return dart.as((this & other) >>> 0, core.num); | 806 return dart.as((this & other) >>> 0, core.num); |
807 } | 807 } |
808 [dartx['|']](other) { | 808 [dartx['|']](other) { |
809 if (!dart.is(other, core.num)) | 809 if (!dart.is(other, core.num)) |
810 dart.throw(new core.ArgumentError(other)); | 810 dart.throw(new core.ArgumentError(other)); |
811 return dart.as((this | other) >>> 0, core.num); | 811 return dart.as((this | other) >>> 0, core.num); |
812 } | 812 } |
813 [dartx['^']](other) { | 813 [dartx['^']](other) { |
814 if (!dart.is(other, core.num)) | 814 if (!dart.is(other, core.num)) |
815 dart.throw(new core.ArgumentError(other)); | 815 dart.throw(new core.ArgumentError(other)); |
816 return dart.as((this ^ other) >>> 0, core.num); | 816 return dart.as((this ^ other) >>> 0, core.num); |
817 } | 817 } |
818 [dartx['<']](other) { | 818 [dartx['<']](other) { |
819 if (!dart.is(other, core.num)) | 819 if (!dart.is(other, core.num)) |
820 dart.throw(new core.ArgumentError(other)); | 820 dart.throw(new core.ArgumentError(other)); |
821 return this < other; | 821 return dart.as(this < other, core.bool); |
822 } | 822 } |
823 [dartx['>']](other) { | 823 [dartx['>']](other) { |
824 if (!dart.is(other, core.num)) | 824 if (!dart.is(other, core.num)) |
825 dart.throw(new core.ArgumentError(other)); | 825 dart.throw(new core.ArgumentError(other)); |
826 return this > other; | 826 return dart.as(this > other, core.bool); |
827 } | 827 } |
828 [dartx['<=']](other) { | 828 [dartx['<=']](other) { |
829 if (!dart.is(other, core.num)) | 829 if (!dart.is(other, core.num)) |
830 dart.throw(new core.ArgumentError(other)); | 830 dart.throw(new core.ArgumentError(other)); |
831 return this <= other; | 831 return dart.as(this <= other, core.bool); |
832 } | 832 } |
833 [dartx['>=']](other) { | 833 [dartx['>=']](other) { |
834 if (!dart.is(other, core.num)) | 834 if (!dart.is(other, core.num)) |
835 dart.throw(new core.ArgumentError(other)); | 835 dart.throw(new core.ArgumentError(other)); |
836 return this >= other; | 836 return dart.as(this >= other, core.bool); |
837 } | 837 } |
838 get runtimeType() { | 838 get runtimeType() { |
839 return core.num; | 839 return core.num; |
840 } | 840 } |
841 } | 841 } |
842 JSNumber[dart.implements] = () => [core.num]; | 842 JSNumber[dart.implements] = () => [core.num]; |
843 dart.setSignature(JSNumber, { | 843 dart.setSignature(JSNumber, { |
844 constructors: () => ({JSNumber: [JSNumber, []]}), | 844 constructors: () => ({JSNumber: [JSNumber, []]}), |
845 methods: () => ({ | 845 methods: () => ({ |
846 [dartx.compareTo]: [core.int, [core.num]], | 846 [dartx.compareTo]: [core.int, [core.num]], |
847 [dartx.remainder]: [core.num, [core.num]], | 847 [dartx.remainder]: [core.num, [core.num]], |
848 [dartx.abs]: [core.num, []], | 848 [dartx.abs]: [core.num, []], |
849 [dartx.toInt]: [core.int, []], | 849 [dartx.toInt]: [core.int, []], |
850 [dartx.truncate]: [core.int, []], | 850 [dartx.truncate]: [core.int, []], |
851 [dartx.ceil]: [core.int, []], | 851 [dartx.ceil]: [core.int, []], |
852 [dartx.floor]: [core.int, []], | 852 [dartx.floor]: [core.int, []], |
853 [dartx.round]: [core.int, []], | 853 [dartx.round]: [core.int, []], |
854 [dartx.ceilToDouble]: [core.double, []], | 854 [dartx.ceilToDouble]: [core.double, []], |
855 [dartx.floorToDouble]: [core.double, []], | 855 [dartx.floorToDouble]: [core.double, []], |
856 [dartx.roundToDouble]: [core.double, []], | 856 [dartx.roundToDouble]: [core.double, []], |
857 [dartx.truncateToDouble]: [core.double, []], | 857 [dartx.truncateToDouble]: [core.double, []], |
858 [dartx.clamp]: [core.num, [core.num, core.num]], | 858 [dartx.clamp]: [core.num, [core.num, core.num]], |
859 [dartx.toDouble]: [core.double, []], | 859 [dartx.toDouble]: [dart.dynamic, []], |
860 [dartx.toStringAsFixed]: [core.String, [core.int]], | 860 [dartx.toStringAsFixed]: [core.String, [core.int]], |
861 [dartx.toStringAsExponential]: [core.String, [], [core.int]], | 861 [dartx.toStringAsExponential]: [core.String, [], [core.int]], |
862 [dartx.toStringAsPrecision]: [core.String, [core.int]], | 862 [dartx.toStringAsPrecision]: [core.String, [core.int]], |
863 [dartx.toRadixString]: [core.String, [core.int]], | 863 [dartx.toRadixString]: [core.String, [core.int]], |
864 [dartx['unary-']]: [core.num, []], | 864 [dartx['unary-']]: [core.num, []], |
865 [dartx['+']]: [core.num, [core.num]], | 865 [dartx['+']]: [core.num, [core.num]], |
866 [dartx['-']]: [core.num, [core.num]], | 866 [dartx['-']]: [core.num, [core.num]], |
867 [dartx['/']]: [core.double, [core.num]], | 867 [dartx['/']]: [core.double, [core.num]], |
868 [dartx['*']]: [core.num, [core.num]], | 868 [dartx['*']]: [core.num, [core.num]], |
869 [dartx['%']]: [core.num, [core.num]], | 869 [dartx['%']]: [core.num, [core.num]], |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
913 return this[dartx['&']]((1 << dart.notNull(width)) - 1); | 913 return this[dartx['&']]((1 << dart.notNull(width)) - 1); |
914 } | 914 } |
915 [dartx.toSigned](width) { | 915 [dartx.toSigned](width) { |
916 let signMask = 1 << dart.notNull(width) - 1; | 916 let signMask = 1 << dart.notNull(width) - 1; |
917 return dart.notNull(this[dartx['&']](dart.notNull(signMask) - 1)) - dart.n
otNull(this[dartx['&']](signMask)); | 917 return dart.notNull(this[dartx['&']](dart.notNull(signMask) - 1)) - dart.n
otNull(this[dartx['&']](signMask)); |
918 } | 918 } |
919 get [dartx.bitLength]() { | 919 get [dartx.bitLength]() { |
920 let nonneg = dart.notNull(this[dartx['<']](0)) ? dart.notNull(this[dartx['
unary-']]()) - 1 : this; | 920 let nonneg = dart.notNull(this[dartx['<']](0)) ? dart.notNull(this[dartx['
unary-']]()) - 1 : this; |
921 if (dart.notNull(nonneg) >= 4294967296) { | 921 if (dart.notNull(nonneg) >= 4294967296) { |
922 nonneg = (dart.notNull(nonneg) / 4294967296)[dartx.truncate](); | 922 nonneg = (dart.notNull(nonneg) / 4294967296)[dartx.truncate](); |
923 return dart.notNull(JSInt._bitCount(JSInt._spread(nonneg))) + 32; | 923 return dart.notNull(dart.dcall(JSInt._bitCount, dart.dcall(JSInt._spread
, nonneg))) + 32; |
924 } | 924 } |
925 return JSInt._bitCount(JSInt._spread(nonneg)); | 925 return dart.dcall(JSInt._bitCount, dart.dcall(JSInt._spread, nonneg)); |
926 } | 926 } |
927 static _bitCount(i) { | 927 static _bitCount(i) { |
928 i = dart.notNull(JSInt._shru(i, 0)) - (dart.notNull(JSInt._shru(i, 1)) & 1
431655765); | 928 i = dart.notNull(dart.dcall(JSInt._shru, i, 0)) - (dart.notNull(dart.dcall
(JSInt._shru, i, 1)) & 1431655765); |
929 i = (dart.notNull(i) & 858993459) + (dart.notNull(JSInt._shru(i, 2)) & 858
993459); | 929 i = (dart.notNull(i) & 858993459) + (dart.notNull(dart.dcall(JSInt._shru,
i, 2)) & 858993459); |
930 i = 252645135 & dart.notNull(i) + dart.notNull(JSInt._shru(i, 4)); | 930 i = 252645135 & dart.notNull(i) + dart.notNull(dart.dcall(JSInt._shru, i,
4)); |
931 i = dart.notNull(i) + dart.notNull(JSInt._shru(i, 8)); | 931 i = dart.notNull(i) + dart.notNull(dart.dcall(JSInt._shru, i, 8)); |
932 i = dart.notNull(i) + dart.notNull(JSInt._shru(i, 16)); | 932 i = dart.notNull(i) + dart.notNull(dart.dcall(JSInt._shru, i, 16)); |
933 return dart.notNull(i) & 63; | 933 return dart.notNull(i) & 63; |
934 } | 934 } |
935 static _shru(value, shift) { | 935 static _shru(value, shift) { |
936 return value >>> shift; | 936 return dart.as(value >>> shift, core.int); |
937 } | 937 } |
938 static _shrs(value, shift) { | 938 static _shrs(value, shift) { |
939 return value >> shift; | 939 return dart.as(value >> shift, core.int); |
940 } | 940 } |
941 static _ors(a, b) { | 941 static _ors(a, b) { |
942 return a | b; | 942 return dart.as(a | b, core.int); |
943 } | 943 } |
944 static _spread(i) { | 944 static _spread(i) { |
945 i = JSInt._ors(i, JSInt._shrs(i, 1)); | 945 i = dart.dcall(JSInt._ors, i, dart.dcall(JSInt._shrs, i, 1)); |
946 i = JSInt._ors(i, JSInt._shrs(i, 2)); | 946 i = dart.dcall(JSInt._ors, i, dart.dcall(JSInt._shrs, i, 2)); |
947 i = JSInt._ors(i, JSInt._shrs(i, 4)); | 947 i = dart.dcall(JSInt._ors, i, dart.dcall(JSInt._shrs, i, 4)); |
948 i = JSInt._ors(i, JSInt._shrs(i, 8)); | 948 i = dart.dcall(JSInt._ors, i, dart.dcall(JSInt._shrs, i, 8)); |
949 i = JSInt._shru(JSInt._ors(i, JSInt._shrs(i, 16)), 0); | 949 i = dart.dcall(JSInt._shru, dart.dcall(JSInt._ors, i, dart.dcall(JSInt._sh
rs, i, 16)), 0); |
950 return i; | 950 return i; |
951 } | 951 } |
952 get runtimeType() { | 952 get runtimeType() { |
953 return core.int; | 953 return core.int; |
954 } | 954 } |
955 [dartx['~']]() { | 955 [dartx['~']]() { |
956 return dart.as(~this >>> 0, core.int); | 956 return dart.as(~this >>> 0, core.int); |
957 } | 957 } |
958 } | 958 } |
959 JSInt[dart.implements] = () => [core.int, core.double]; | 959 JSInt[dart.implements] = () => [core.int, core.double]; |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1042 dart.throw(new core.ArgumentError(index)); | 1042 dart.throw(new core.ArgumentError(index)); |
1043 if (dart.notNull(index) < 0) | 1043 if (dart.notNull(index) < 0) |
1044 dart.throw(new core.RangeError.value(index)); | 1044 dart.throw(new core.RangeError.value(index)); |
1045 if (dart.notNull(index) >= dart.notNull(this[dartx.length])) | 1045 if (dart.notNull(index) >= dart.notNull(this[dartx.length])) |
1046 dart.throw(new core.RangeError.value(index)); | 1046 dart.throw(new core.RangeError.value(index)); |
1047 return dart.as(this.charCodeAt(index), core.int); | 1047 return dart.as(this.charCodeAt(index), core.int); |
1048 } | 1048 } |
1049 [dartx.allMatches](string, start) { | 1049 [dartx.allMatches](string, start) { |
1050 if (start === void 0) | 1050 if (start === void 0) |
1051 start = 0; | 1051 start = 0; |
1052 _js_helper.checkString(string); | 1052 dart.dcall(_js_helper.checkString, string); |
1053 _js_helper.checkInt(start); | 1053 dart.dcall(_js_helper.checkInt, start); |
1054 if (0 > dart.notNull(start) || dart.notNull(start) > dart.notNull(string[d
artx.length])) { | 1054 if (0 > dart.notNull(start) || dart.notNull(start) > dart.notNull(string[d
artx.length])) { |
1055 dart.throw(new core.RangeError.range(start, 0, string[dartx.length])); | 1055 dart.throw(new core.RangeError.range(start, 0, string[dartx.length])); |
1056 } | 1056 } |
1057 return _js_helper.allMatchesInStringUnchecked(this, string, start); | 1057 return dart.dcall(_js_helper.allMatchesInStringUnchecked, this, string, st
art); |
1058 } | 1058 } |
1059 [dartx.matchAsPrefix](string, start) { | 1059 [dartx.matchAsPrefix](string, start) { |
1060 if (start === void 0) | 1060 if (start === void 0) |
1061 start = 0; | 1061 start = 0; |
1062 if (dart.notNull(start) < 0 || dart.notNull(start) > dart.notNull(string[d
artx.length])) { | 1062 if (dart.notNull(start) < 0 || dart.notNull(start) > dart.notNull(string[d
artx.length])) { |
1063 dart.throw(new core.RangeError.range(start, 0, string[dartx.length])); | 1063 dart.throw(new core.RangeError.range(start, 0, string[dartx.length])); |
1064 } | 1064 } |
1065 if (dart.notNull(start) + dart.notNull(this[dartx.length]) > dart.notNull(
string[dartx.length])) | 1065 if (dart.notNull(start) + dart.notNull(this[dartx.length]) > dart.notNull(
string[dartx.length])) |
1066 return null; | 1066 return null; |
1067 for (let i = 0; dart.notNull(i) < dart.notNull(this[dartx.length]); i = da
rt.notNull(i) + 1) { | 1067 for (let i = 0; dart.notNull(i) < dart.notNull(this[dartx.length]); i = da
rt.notNull(i) + 1) { |
1068 if (string[dartx.codeUnitAt](dart.notNull(start) + dart.notNull(i)) != t
his[dartx.codeUnitAt](i)) { | 1068 if (dart.dcall(string[dartx.codeUnitAt], dart.notNull(start) + dart.notN
ull(i)) != dart.dcall(this[dartx.codeUnitAt], i)) { |
1069 return null; | 1069 return null; |
1070 } | 1070 } |
1071 } | 1071 } |
1072 return new _js_helper.StringMatch(start, string, this); | 1072 return new _js_helper.StringMatch(start, string, this); |
1073 } | 1073 } |
1074 [dartx['+']](other) { | 1074 [dartx['+']](other) { |
1075 if (!(typeof other == 'string')) | 1075 if (!(typeof other == 'string')) |
1076 dart.throw(new core.ArgumentError(other)); | 1076 dart.throw(new core.ArgumentError(other)); |
1077 return this + other; | 1077 return dart.as(this + other, core.String); |
1078 } | 1078 } |
1079 [dartx.endsWith](other) { | 1079 [dartx.endsWith](other) { |
1080 _js_helper.checkString(other); | 1080 dart.dcall(_js_helper.checkString, other); |
1081 let otherLength = other[dartx.length]; | 1081 let otherLength = other[dartx.length]; |
1082 if (dart.notNull(otherLength) > dart.notNull(this[dartx.length])) | 1082 if (dart.notNull(otherLength) > dart.notNull(this[dartx.length])) |
1083 return false; | 1083 return false; |
1084 return other == this[dartx.substring](dart.notNull(this[dartx.length]) - d
art.notNull(otherLength)); | 1084 return other == dart.dcall(this[dartx.substring], dart.notNull(this[dartx.
length]) - dart.notNull(otherLength)); |
1085 } | 1085 } |
1086 [dartx.replaceAll](from, to) { | 1086 [dartx.replaceAll](from, to) { |
1087 _js_helper.checkString(to); | 1087 dart.dcall(_js_helper.checkString, to); |
1088 return dart.as(_js_helper.stringReplaceAllUnchecked(this, from, to), core.
String); | 1088 return dart.as(dart.dcall(_js_helper.stringReplaceAllUnchecked, this, from
, to), core.String); |
1089 } | 1089 } |
1090 [dartx.replaceAllMapped](from, convert) { | 1090 [dartx.replaceAllMapped](from, convert) { |
1091 return this[dartx.splitMapJoin](from, {onMatch: convert}); | 1091 return dart.dcall(this[dartx.splitMapJoin], from, {onMatch: convert}); |
1092 } | 1092 } |
1093 [dartx.splitMapJoin](from, opts) { | 1093 [dartx.splitMapJoin](from, opts) { |
1094 let onMatch = opts && 'onMatch' in opts ? opts.onMatch : null; | 1094 let onMatch = opts && 'onMatch' in opts ? opts.onMatch : null; |
1095 let onNonMatch = opts && 'onNonMatch' in opts ? opts.onNonMatch : null; | 1095 let onNonMatch = opts && 'onNonMatch' in opts ? opts.onNonMatch : null; |
1096 return dart.as(_js_helper.stringReplaceAllFuncUnchecked(this, from, onMatc
h, onNonMatch), core.String); | 1096 return dart.as(dart.dcall(_js_helper.stringReplaceAllFuncUnchecked, this,
from, onMatch, onNonMatch), core.String); |
1097 } | 1097 } |
1098 [dartx.replaceFirst](from, to, startIndex) { | 1098 [dartx.replaceFirst](from, to, startIndex) { |
1099 if (startIndex === void 0) | 1099 if (startIndex === void 0) |
1100 startIndex = 0; | 1100 startIndex = 0; |
1101 _js_helper.checkString(to); | 1101 dart.dcall(_js_helper.checkString, to); |
1102 _js_helper.checkInt(startIndex); | 1102 dart.dcall(_js_helper.checkInt, startIndex); |
1103 if (dart.notNull(startIndex) < 0 || dart.notNull(startIndex) > dart.notNul
l(this[dartx.length])) { | 1103 if (dart.notNull(startIndex) < 0 || dart.notNull(startIndex) > dart.notNul
l(this[dartx.length])) { |
1104 dart.throw(new core.RangeError.range(startIndex, 0, this[dartx.length]))
; | 1104 dart.throw(new core.RangeError.range(startIndex, 0, this[dartx.length]))
; |
1105 } | 1105 } |
1106 return dart.as(_js_helper.stringReplaceFirstUnchecked(this, from, to, star
tIndex), core.String); | 1106 return dart.as(dart.dcall(_js_helper.stringReplaceFirstUnchecked, this, fr
om, to, startIndex), core.String); |
1107 } | 1107 } |
1108 [dartx.split](pattern) { | 1108 [dartx.split](pattern) { |
1109 _js_helper.checkNull(pattern); | 1109 dart.dcall(_js_helper.checkNull, pattern); |
1110 if (typeof pattern == 'string') { | 1110 if (typeof pattern == 'string') { |
1111 return dart.as(this.split(pattern), core.List$(core.String)); | 1111 return dart.as(this.split(pattern), core.List$(core.String)); |
1112 } else if (dart.is(pattern, _js_helper.JSSyntaxRegExp) && _js_helper.regEx
pCaptureCount(pattern) == 0) { | 1112 } else if (dart.is(pattern, _js_helper.JSSyntaxRegExp) && dart.dcall(_js_h
elper.regExpCaptureCount, pattern) == 0) { |
1113 let re = _js_helper.regExpGetNative(pattern); | 1113 let re = dart.dcall(_js_helper.regExpGetNative, pattern); |
1114 return dart.as(this.split(re), core.List$(core.String)); | 1114 return dart.as(this.split(re), core.List$(core.String)); |
1115 } else { | 1115 } else { |
1116 return this[_defaultSplit](pattern); | 1116 return dart.dcall(this[_defaultSplit], pattern); |
1117 } | 1117 } |
1118 } | 1118 } |
1119 [_defaultSplit](pattern) { | 1119 [_defaultSplit](pattern) { |
1120 let result = dart.list([], core.String); | 1120 let result = dart.list([], core.String); |
1121 let start = 0; | 1121 let start = 0; |
1122 let length = 1; | 1122 let length = 1; |
1123 for (let match of pattern[dartx.allMatches](this)) { | 1123 for (let match of dart.dcall(pattern[dartx.allMatches], this)) { |
1124 let matchStart = match.start; | 1124 let matchStart = dart.as(dart.dload(match, 'start'), core.int); |
1125 let matchEnd = match.end; | 1125 let matchEnd = dart.as(dart.dload(match, 'end'), core.int); |
1126 length = dart.notNull(matchEnd) - dart.notNull(matchStart); | 1126 length = dart.notNull(matchEnd) - dart.notNull(matchStart); |
1127 if (length == 0 && start == matchStart) { | 1127 if (length == 0 && start == matchStart) { |
1128 continue; | 1128 continue; |
1129 } | 1129 } |
1130 let end = matchStart; | 1130 let end = matchStart; |
1131 result[dartx.add](this[dartx.substring](start, end)); | 1131 dart.dcall(result[dartx.add], dart.dcall(this[dartx.substring], start, e
nd)); |
1132 start = matchEnd; | 1132 start = matchEnd; |
1133 } | 1133 } |
1134 if (dart.notNull(start) < dart.notNull(this[dartx.length]) || dart.notNull
(length) > 0) { | 1134 if (dart.notNull(start) < dart.notNull(this[dartx.length]) || dart.notNull
(length) > 0) { |
1135 result[dartx.add](this[dartx.substring](start)); | 1135 dart.dcall(result[dartx.add], dart.dcall(this[dartx.substring], start)); |
1136 } | 1136 } |
1137 return result; | 1137 return result; |
1138 } | 1138 } |
1139 [dartx.startsWith](pattern, index) { | 1139 [dartx.startsWith](pattern, index) { |
1140 if (index === void 0) | 1140 if (index === void 0) |
1141 index = 0; | 1141 index = 0; |
1142 _js_helper.checkInt(index); | 1142 dart.dcall(_js_helper.checkInt, index); |
1143 if (dart.notNull(index) < 0 || dart.notNull(index) > dart.notNull(this[dar
tx.length])) { | 1143 if (dart.notNull(index) < 0 || dart.notNull(index) > dart.notNull(this[dar
tx.length])) { |
1144 dart.throw(new core.RangeError.range(index, 0, this[dartx.length])); | 1144 dart.throw(new core.RangeError.range(index, 0, this[dartx.length])); |
1145 } | 1145 } |
1146 if (typeof pattern == 'string') { | 1146 if (typeof pattern == 'string') { |
1147 let other = pattern; | 1147 let other = pattern; |
1148 let otherLength = other[dartx.length]; | 1148 let otherLength = other[dartx.length]; |
1149 let endIndex = dart.notNull(index) + dart.notNull(otherLength); | 1149 let endIndex = dart.notNull(index) + dart.notNull(otherLength); |
1150 if (dart.notNull(endIndex) > dart.notNull(this[dartx.length])) | 1150 if (dart.notNull(endIndex) > dart.notNull(this[dartx.length])) |
1151 return false; | 1151 return false; |
1152 return other == this.substring(index, endIndex); | 1152 return dart.equals(other, this.substring(index, endIndex)); |
1153 } | 1153 } |
1154 return pattern[dartx.matchAsPrefix](this, index) != null; | 1154 return dart.dcall(pattern[dartx.matchAsPrefix], this, index) != null; |
1155 } | 1155 } |
1156 [dartx.substring](startIndex, endIndex) { | 1156 [dartx.substring](startIndex, endIndex) { |
1157 if (endIndex === void 0) | 1157 if (endIndex === void 0) |
1158 endIndex = null; | 1158 endIndex = null; |
1159 _js_helper.checkInt(startIndex); | 1159 dart.dcall(_js_helper.checkInt, startIndex); |
1160 if (endIndex == null) | 1160 if (endIndex == null) |
1161 endIndex = this[dartx.length]; | 1161 endIndex = this[dartx.length]; |
1162 _js_helper.checkInt(endIndex); | 1162 dart.dcall(_js_helper.checkInt, endIndex); |
1163 if (dart.notNull(startIndex) < 0) | 1163 if (dart.notNull(startIndex) < 0) |
1164 dart.throw(new core.RangeError.value(startIndex)); | 1164 dart.throw(new core.RangeError.value(startIndex)); |
1165 if (dart.notNull(startIndex) > dart.notNull(endIndex)) | 1165 if (dart.notNull(startIndex) > dart.notNull(endIndex)) |
1166 dart.throw(new core.RangeError.value(startIndex)); | 1166 dart.throw(new core.RangeError.value(startIndex)); |
1167 if (dart.notNull(endIndex) > dart.notNull(this[dartx.length])) | 1167 if (dart.notNull(endIndex) > dart.notNull(this[dartx.length])) |
1168 dart.throw(new core.RangeError.value(endIndex)); | 1168 dart.throw(new core.RangeError.value(endIndex)); |
1169 return this.substring(startIndex, endIndex); | 1169 return dart.as(this.substring(startIndex, endIndex), core.String); |
1170 } | 1170 } |
1171 [dartx.toLowerCase]() { | 1171 [dartx.toLowerCase]() { |
1172 return this.toLowerCase(); | 1172 return dart.as(this.toLowerCase(), core.String); |
1173 } | 1173 } |
1174 [dartx.toUpperCase]() { | 1174 [dartx.toUpperCase]() { |
1175 return this.toUpperCase(); | 1175 return dart.as(this.toUpperCase(), core.String); |
1176 } | 1176 } |
1177 static _isWhitespace(codeUnit) { | 1177 static _isWhitespace(codeUnit) { |
1178 if (dart.notNull(codeUnit) < 256) { | 1178 if (dart.notNull(codeUnit) < 256) { |
1179 switch (codeUnit) { | 1179 switch (codeUnit) { |
1180 case 9: | 1180 case 9: |
1181 case 10: | 1181 case 10: |
1182 case 11: | 1182 case 11: |
1183 case 12: | 1183 case 12: |
1184 case 13: | 1184 case 13: |
1185 case 32: | 1185 case 32: |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1220 default: | 1220 default: |
1221 { | 1221 { |
1222 return false; | 1222 return false; |
1223 } | 1223 } |
1224 } | 1224 } |
1225 } | 1225 } |
1226 static _skipLeadingWhitespace(string, index) { | 1226 static _skipLeadingWhitespace(string, index) { |
1227 let SPACE = 32; | 1227 let SPACE = 32; |
1228 let CARRIAGE_RETURN = 13; | 1228 let CARRIAGE_RETURN = 13; |
1229 while (dart.notNull(index) < dart.notNull(string[dartx.length])) { | 1229 while (dart.notNull(index) < dart.notNull(string[dartx.length])) { |
1230 let codeUnit = string[dartx.codeUnitAt](index); | 1230 let codeUnit = dart.dcall(string[dartx.codeUnitAt], index); |
1231 if (codeUnit != SPACE && codeUnit != CARRIAGE_RETURN && !dart.notNull(JS
String._isWhitespace(codeUnit))) { | 1231 if (codeUnit != SPACE && codeUnit != CARRIAGE_RETURN && !dart.notNull(da
rt.dcall(JSString._isWhitespace, codeUnit))) { |
1232 break; | 1232 break; |
1233 } | 1233 } |
1234 index = dart.notNull(index) + 1; | 1234 index = dart.notNull(index) + 1; |
1235 } | 1235 } |
1236 return index; | 1236 return index; |
1237 } | 1237 } |
1238 static _skipTrailingWhitespace(string, index) { | 1238 static _skipTrailingWhitespace(string, index) { |
1239 let SPACE = 32; | 1239 let SPACE = 32; |
1240 let CARRIAGE_RETURN = 13; | 1240 let CARRIAGE_RETURN = 13; |
1241 while (dart.notNull(index) > 0) { | 1241 while (dart.notNull(index) > 0) { |
1242 let codeUnit = string[dartx.codeUnitAt](dart.notNull(index) - 1); | 1242 let codeUnit = dart.dcall(string[dartx.codeUnitAt], dart.notNull(index)
- 1); |
1243 if (codeUnit != SPACE && codeUnit != CARRIAGE_RETURN && !dart.notNull(JS
String._isWhitespace(codeUnit))) { | 1243 if (codeUnit != SPACE && codeUnit != CARRIAGE_RETURN && !dart.notNull(da
rt.dcall(JSString._isWhitespace, codeUnit))) { |
1244 break; | 1244 break; |
1245 } | 1245 } |
1246 index = dart.notNull(index) - 1; | 1246 index = dart.notNull(index) - 1; |
1247 } | 1247 } |
1248 return index; | 1248 return index; |
1249 } | 1249 } |
1250 [dartx.trim]() { | 1250 [dartx.trim]() { |
1251 let NEL = 133; | 1251 let NEL = 133; |
1252 let result = this.trim(); | 1252 let result = dart.as(this.trim(), core.String); |
1253 if (result[dartx.length] == 0) | 1253 if (result[dartx.length] == 0) |
1254 return result; | 1254 return result; |
1255 let firstCode = result[dartx.codeUnitAt](0); | 1255 let firstCode = dart.dcall(result[dartx.codeUnitAt], 0); |
1256 let startIndex = 0; | 1256 let startIndex = 0; |
1257 if (firstCode == NEL) { | 1257 if (firstCode == NEL) { |
1258 startIndex = JSString._skipLeadingWhitespace(result, 1); | 1258 startIndex = dart.dcall(JSString._skipLeadingWhitespace, result, 1); |
1259 if (startIndex == result[dartx.length]) | 1259 if (startIndex == result[dartx.length]) |
1260 return ""; | 1260 return ""; |
1261 } | 1261 } |
1262 let endIndex = result[dartx.length]; | 1262 let endIndex = result[dartx.length]; |
1263 let lastCode = result[dartx.codeUnitAt](dart.notNull(endIndex) - 1); | 1263 let lastCode = dart.dcall(result[dartx.codeUnitAt], dart.notNull(endIndex)
- 1); |
1264 if (lastCode == NEL) { | 1264 if (lastCode == NEL) { |
1265 endIndex = JSString._skipTrailingWhitespace(result, dart.notNull(endInde
x) - 1); | 1265 endIndex = dart.dcall(JSString._skipTrailingWhitespace, result, dart.not
Null(endIndex) - 1); |
1266 } | 1266 } |
1267 if (startIndex == 0 && endIndex == result[dartx.length]) | 1267 if (startIndex == 0 && endIndex == result[dartx.length]) |
1268 return result; | 1268 return result; |
1269 return result.substring(startIndex, endIndex); | 1269 return dart.as(result.substring(startIndex, endIndex), core.String); |
1270 } | 1270 } |
1271 [dartx.trimLeft]() { | 1271 [dartx.trimLeft]() { |
1272 let NEL = 133; | 1272 let NEL = 133; |
1273 let result = null; | 1273 let result = null; |
1274 let startIndex = 0; | 1274 let startIndex = 0; |
1275 if (typeof this.trimLeft != "undefined") { | 1275 if (dart.notNull(dart.as(typeof this.trimLeft != "undefined", core.bool)))
{ |
1276 result = this.trimLeft(); | 1276 result = dart.as(this.trimLeft(), core.String); |
1277 if (result[dartx.length] == 0) | 1277 if (result[dartx.length] == 0) |
1278 return result; | 1278 return result; |
1279 let firstCode = result[dartx.codeUnitAt](0); | 1279 let firstCode = dart.dcall(result[dartx.codeUnitAt], 0); |
1280 if (firstCode == NEL) { | 1280 if (firstCode == NEL) { |
1281 startIndex = JSString._skipLeadingWhitespace(result, 1); | 1281 startIndex = dart.dcall(JSString._skipLeadingWhitespace, result, 1); |
1282 } | 1282 } |
1283 } else { | 1283 } else { |
1284 result = this; | 1284 result = this; |
1285 startIndex = JSString._skipLeadingWhitespace(this, 0); | 1285 startIndex = dart.dcall(JSString._skipLeadingWhitespace, this, 0); |
1286 } | 1286 } |
1287 if (startIndex == 0) | 1287 if (startIndex == 0) |
1288 return result; | 1288 return result; |
1289 if (startIndex == result[dartx.length]) | 1289 if (startIndex == result[dartx.length]) |
1290 return ""; | 1290 return ""; |
1291 return result.substring(startIndex); | 1291 return dart.as(result.substring(startIndex), core.String); |
1292 } | 1292 } |
1293 [dartx.trimRight]() { | 1293 [dartx.trimRight]() { |
1294 let NEL = 133; | 1294 let NEL = 133; |
1295 let result = null; | 1295 let result = null; |
1296 let endIndex = null; | 1296 let endIndex = null; |
1297 if (typeof this.trimRight != "undefined") { | 1297 if (dart.notNull(dart.as(typeof this.trimRight != "undefined", core.bool))
) { |
1298 result = this.trimRight(); | 1298 result = dart.as(this.trimRight(), core.String); |
1299 endIndex = result[dartx.length]; | 1299 endIndex = result[dartx.length]; |
1300 if (endIndex == 0) | 1300 if (endIndex == 0) |
1301 return result; | 1301 return result; |
1302 let lastCode = result[dartx.codeUnitAt](dart.notNull(endIndex) - 1); | 1302 let lastCode = dart.dcall(result[dartx.codeUnitAt], dart.notNull(endInde
x) - 1); |
1303 if (lastCode == NEL) { | 1303 if (lastCode == NEL) { |
1304 endIndex = JSString._skipTrailingWhitespace(result, dart.notNull(endIn
dex) - 1); | 1304 endIndex = dart.dcall(JSString._skipTrailingWhitespace, result, dart.n
otNull(endIndex) - 1); |
1305 } | 1305 } |
1306 } else { | 1306 } else { |
1307 result = this; | 1307 result = this; |
1308 endIndex = JSString._skipTrailingWhitespace(this, this[dartx.length]); | 1308 endIndex = dart.dcall(JSString._skipTrailingWhitespace, this, this[dartx
.length]); |
1309 } | 1309 } |
1310 if (endIndex == result[dartx.length]) | 1310 if (endIndex == result[dartx.length]) |
1311 return result; | 1311 return result; |
1312 if (endIndex == 0) | 1312 if (endIndex == 0) |
1313 return ""; | 1313 return ""; |
1314 return result.substring(0, endIndex); | 1314 return dart.as(result.substring(0, endIndex), core.String); |
1315 } | 1315 } |
1316 [dartx['*']](times) { | 1316 [dartx['*']](times) { |
1317 if (0 >= dart.notNull(times)) | 1317 if (0 >= dart.notNull(times)) |
1318 return ''; | 1318 return ''; |
1319 if (times == 1 || this[dartx.length] == 0) | 1319 if (times == 1 || this[dartx.length] == 0) |
1320 return this; | 1320 return this; |
1321 if (!dart.equals(times, times >>> 0)) { | 1321 if (!dart.equals(times, times >>> 0)) { |
1322 dart.throw(dart.const(new core.OutOfMemoryError())); | 1322 dart.throw(dart.const(new core.OutOfMemoryError())); |
1323 } | 1323 } |
1324 let result = ''; | 1324 let result = ''; |
1325 let s = this; | 1325 let s = this; |
1326 while (true) { | 1326 while (true) { |
1327 if ((dart.notNull(times) & 1) == 1) | 1327 if ((dart.notNull(times) & 1) == 1) |
1328 result = s[dartx['+']](result); | 1328 result = dart.dsend(s, '+', result); |
1329 times = dart.as(times >>> 1, core.int); | 1329 times = dart.as(times >>> 1, core.int); |
1330 if (times == 0) | 1330 if (times == 0) |
1331 break; | 1331 break; |
1332 s = s[dartx['+']](s); | 1332 s = dart.dsend(s, '+', s); |
1333 } | 1333 } |
1334 return result; | 1334 return dart.as(result, core.String); |
1335 } | 1335 } |
1336 [dartx.padLeft](width, padding) { | 1336 [dartx.padLeft](width, padding) { |
1337 if (padding === void 0) | 1337 if (padding === void 0) |
1338 padding = ' '; | 1338 padding = ' '; |
1339 let delta = dart.notNull(width) - dart.notNull(this[dartx.length]); | 1339 let delta = dart.notNull(width) - dart.notNull(this[dartx.length]); |
1340 if (dart.notNull(delta) <= 0) | 1340 if (dart.notNull(delta) <= 0) |
1341 return this; | 1341 return this; |
1342 return padding[dartx['*']](delta) + this; | 1342 return padding[dartx['*']](delta) + this; |
1343 } | 1343 } |
1344 [dartx.padRight](width, padding) { | 1344 [dartx.padRight](width, padding) { |
1345 if (padding === void 0) | 1345 if (padding === void 0) |
1346 padding = ' '; | 1346 padding = ' '; |
1347 let delta = dart.notNull(width) - dart.notNull(this[dartx.length]); | 1347 let delta = dart.notNull(width) - dart.notNull(this[dartx.length]); |
1348 if (dart.notNull(delta) <= 0) | 1348 if (dart.notNull(delta) <= 0) |
1349 return this; | 1349 return this; |
1350 return this[dartx['+']](padding[dartx['*']](delta)); | 1350 return this[dartx['+']](padding[dartx['*']](delta)); |
1351 } | 1351 } |
1352 get [dartx.codeUnits]() { | 1352 get [dartx.codeUnits]() { |
1353 return new _CodeUnits(this); | 1353 return new _CodeUnits(this); |
1354 } | 1354 } |
1355 get [dartx.runes]() { | 1355 get [dartx.runes]() { |
1356 return new core.Runes(this); | 1356 return new core.Runes(this); |
1357 } | 1357 } |
1358 [dartx.indexOf](pattern, start) { | 1358 [dartx.indexOf](pattern, start) { |
1359 if (start === void 0) | 1359 if (start === void 0) |
1360 start = 0; | 1360 start = 0; |
1361 _js_helper.checkNull(pattern); | 1361 dart.dcall(_js_helper.checkNull, pattern); |
1362 if (!(typeof start == 'number')) | 1362 if (!(typeof start == 'number')) |
1363 dart.throw(new core.ArgumentError(start)); | 1363 dart.throw(new core.ArgumentError(start)); |
1364 if (dart.notNull(start) < 0 || dart.notNull(start) > dart.notNull(this[dar
tx.length])) { | 1364 if (dart.notNull(start) < 0 || dart.notNull(start) > dart.notNull(this[dar
tx.length])) { |
1365 dart.throw(new core.RangeError.range(start, 0, this[dartx.length])); | 1365 dart.throw(new core.RangeError.range(start, 0, this[dartx.length])); |
1366 } | 1366 } |
1367 if (typeof pattern == 'string') { | 1367 if (typeof pattern == 'string') { |
1368 return this.indexOf(pattern, start); | 1368 return dart.as(this.indexOf(pattern, start), core.int); |
1369 } | 1369 } |
1370 if (dart.is(pattern, _js_helper.JSSyntaxRegExp)) { | 1370 if (dart.is(pattern, _js_helper.JSSyntaxRegExp)) { |
1371 let re = pattern; | 1371 let re = pattern; |
1372 let match = _js_helper.firstMatchAfter(re, this, start); | 1372 let match = dart.dcall(_js_helper.firstMatchAfter, re, this, start); |
1373 return match == null ? -1 : match.start; | 1373 return match == null ? -1 : match.start; |
1374 } | 1374 } |
1375 for (let i = start; dart.notNull(i) <= dart.notNull(this[dartx.length]); i
= dart.notNull(i) + 1) { | 1375 for (let i = start; dart.notNull(i) <= dart.notNull(this[dartx.length]); i
= dart.notNull(i) + 1) { |
1376 if (pattern[dartx.matchAsPrefix](this, i) != null) | 1376 if (dart.dcall(pattern[dartx.matchAsPrefix], this, i) != null) |
1377 return i; | 1377 return i; |
1378 } | 1378 } |
1379 return -1; | 1379 return -1; |
1380 } | 1380 } |
1381 [dartx.lastIndexOf](pattern, start) { | 1381 [dartx.lastIndexOf](pattern, start) { |
1382 if (start === void 0) | 1382 if (start === void 0) |
1383 start = null; | 1383 start = null; |
1384 _js_helper.checkNull(pattern); | 1384 dart.dcall(_js_helper.checkNull, pattern); |
1385 if (start == null) { | 1385 if (start == null) { |
1386 start = this[dartx.length]; | 1386 start = this[dartx.length]; |
1387 } else if (!(typeof start == 'number')) { | 1387 } else if (!(typeof start == 'number')) { |
1388 dart.throw(new core.ArgumentError(start)); | 1388 dart.throw(new core.ArgumentError(start)); |
1389 } else if (dart.notNull(start) < 0 || dart.notNull(start) > dart.notNull(t
his[dartx.length])) { | 1389 } else if (dart.notNull(start) < 0 || dart.notNull(start) > dart.notNull(t
his[dartx.length])) { |
1390 dart.throw(new core.RangeError.range(start, 0, this[dartx.length])); | 1390 dart.throw(new core.RangeError.range(start, 0, this[dartx.length])); |
1391 } | 1391 } |
1392 if (typeof pattern == 'string') { | 1392 if (typeof pattern == 'string') { |
1393 let other = pattern; | 1393 let other = pattern; |
1394 if (dart.notNull(start) + dart.notNull(other[dartx.length]) > dart.notNu
ll(this[dartx.length])) { | 1394 if (dart.notNull(start) + dart.notNull(other[dartx.length]) > dart.notNu
ll(this[dartx.length])) { |
1395 start = dart.notNull(this[dartx.length]) - dart.notNull(other[dartx.le
ngth]); | 1395 start = dart.notNull(this[dartx.length]) - dart.notNull(other[dartx.le
ngth]); |
1396 } | 1396 } |
1397 return dart.as(_js_helper.stringLastIndexOfUnchecked(this, other, start)
, core.int); | 1397 return dart.as(dart.dcall(_js_helper.stringLastIndexOfUnchecked, this, o
ther, start), core.int); |
1398 } | 1398 } |
1399 for (let i = start; dart.notNull(i) >= 0; i = dart.notNull(i) - 1) { | 1399 for (let i = start; dart.notNull(i) >= 0; i = dart.notNull(i) - 1) { |
1400 if (pattern[dartx.matchAsPrefix](this, i) != null) | 1400 if (dart.dcall(pattern[dartx.matchAsPrefix], this, i) != null) |
1401 return i; | 1401 return i; |
1402 } | 1402 } |
1403 return -1; | 1403 return -1; |
1404 } | 1404 } |
1405 [dartx.contains](other, startIndex) { | 1405 [dartx.contains](other, startIndex) { |
1406 if (startIndex === void 0) | 1406 if (startIndex === void 0) |
1407 startIndex = 0; | 1407 startIndex = 0; |
1408 _js_helper.checkNull(other); | 1408 dart.dcall(_js_helper.checkNull, other); |
1409 if (dart.notNull(startIndex) < 0 || dart.notNull(startIndex) > dart.notNul
l(this[dartx.length])) { | 1409 if (dart.notNull(startIndex) < 0 || dart.notNull(startIndex) > dart.notNul
l(this[dartx.length])) { |
1410 dart.throw(new core.RangeError.range(startIndex, 0, this[dartx.length]))
; | 1410 dart.throw(new core.RangeError.range(startIndex, 0, this[dartx.length]))
; |
1411 } | 1411 } |
1412 return dart.as(_js_helper.stringContainsUnchecked(this, other, startIndex)
, core.bool); | 1412 return dart.as(dart.dcall(_js_helper.stringContainsUnchecked, this, other,
startIndex), core.bool); |
1413 } | 1413 } |
1414 get [dartx.isEmpty]() { | 1414 get [dartx.isEmpty]() { |
1415 return this[dartx.length] == 0; | 1415 return this[dartx.length] == 0; |
1416 } | 1416 } |
1417 get [dartx.isNotEmpty]() { | 1417 get [dartx.isNotEmpty]() { |
1418 return !dart.notNull(this[dartx.isEmpty]); | 1418 return !dart.notNull(this[dartx.isEmpty]); |
1419 } | 1419 } |
1420 [dartx.compareTo](other) { | 1420 [dartx.compareTo](other) { |
1421 if (!(typeof other == 'string')) | 1421 if (!(typeof other == 'string')) |
1422 dart.throw(new core.ArgumentError(other)); | 1422 dart.throw(new core.ArgumentError(other)); |
1423 return dart.equals(this, other) ? 0 : this < other ? -1 : 1; | 1423 return dart.equals(this, other) ? 0 : dart.notNull(dart.as(this < other, c
ore.bool)) ? -1 : 1; |
1424 } | 1424 } |
1425 toString() { | 1425 toString() { |
1426 return this; | 1426 return this; |
1427 } | 1427 } |
1428 get hashCode() { | 1428 get hashCode() { |
1429 let hash = 0; | 1429 let hash = 0; |
1430 for (let i = 0; dart.notNull(i) < dart.notNull(this[dartx.length]); i = da
rt.notNull(i) + 1) { | 1430 for (let i = 0; dart.notNull(i) < dart.notNull(this[dartx.length]); i = da
rt.notNull(i) + 1) { |
1431 hash = 536870911 & dart.notNull(hash) + this.charCodeAt(i); | 1431 hash = 536870911 & dart.notNull(dart.notNull(hash) + dart.notNull(dart.a
s(this.charCodeAt(i), core.num))); |
1432 hash = 536870911 & dart.notNull(hash) + ((524287 & dart.notNull(hash)) <
< 10); | 1432 hash = 536870911 & dart.notNull(hash) + ((524287 & dart.notNull(hash)) <
< 10); |
1433 hash = hash ^ hash >> 6; | 1433 hash = dart.as(hash ^ hash >> 6, core.int); |
1434 } | 1434 } |
1435 hash = 536870911 & dart.notNull(hash) + ((67108863 & dart.notNull(hash)) <
< 3); | 1435 hash = 536870911 & dart.notNull(hash) + ((67108863 & dart.notNull(hash)) <
< 3); |
1436 hash = hash ^ hash >> 11; | 1436 hash = dart.as(hash ^ hash >> 11, core.int); |
1437 return 536870911 & dart.notNull(hash) + ((16383 & dart.notNull(hash)) << 1
5); | 1437 return 536870911 & dart.notNull(hash) + ((16383 & dart.notNull(hash)) << 1
5); |
1438 } | 1438 } |
1439 get runtimeType() { | 1439 get runtimeType() { |
1440 return core.String; | 1440 return core.String; |
1441 } | 1441 } |
1442 get [dartx.length]() { | 1442 get [dartx.length]() { |
1443 return this.length; | 1443 return dart.as(this.length, core.int); |
1444 } | 1444 } |
1445 [dartx.get](index) { | 1445 [dartx.get](index) { |
1446 if (!(typeof index == 'number')) | 1446 if (!(typeof index == 'number')) |
1447 dart.throw(new core.ArgumentError(index)); | 1447 dart.throw(new core.ArgumentError(index)); |
1448 if (dart.notNull(index) >= dart.notNull(this[dartx.length]) || dart.notNul
l(index) < 0) | 1448 if (dart.notNull(index) >= dart.notNull(this[dartx.length]) || dart.notNul
l(index) < 0) |
1449 dart.throw(new core.RangeError.value(index)); | 1449 dart.throw(new core.RangeError.value(index)); |
1450 return this[index]; | 1450 return dart.as(this[index], core.String); |
1451 } | 1451 } |
1452 } | 1452 } |
1453 JSString[dart.implements] = () => [core.String, JSIndexable]; | 1453 JSString[dart.implements] = () => [core.String, JSIndexable]; |
1454 dart.setSignature(JSString, { | 1454 dart.setSignature(JSString, { |
1455 constructors: () => ({JSString: [JSString, []]}), | 1455 constructors: () => ({JSString: [JSString, []]}), |
1456 methods: () => ({ | 1456 methods: () => ({ |
1457 [dartx.codeUnitAt]: [core.int, [core.int]], | 1457 [dartx.codeUnitAt]: [core.int, [core.int]], |
1458 [dartx.allMatches]: [core.Iterable$(core.Match), [core.String], [core.int]
], | 1458 [dartx.allMatches]: [core.Iterable$(core.Match), [core.String], [core.int]
], |
1459 [dartx.matchAsPrefix]: [core.Match, [core.String], [core.int]], | 1459 [dartx.matchAsPrefix]: [core.Match, [core.String], [core.int]], |
1460 [dartx['+']]: [core.String, [core.String]], | 1460 [dartx['+']]: [core.String, [core.String]], |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1492 dart.registerExtension(dart.global.String, JSString); | 1492 dart.registerExtension(dart.global.String, JSString); |
1493 let _string = Symbol('_string'); | 1493 let _string = Symbol('_string'); |
1494 class _CodeUnits extends _internal.UnmodifiableListBase$(core.int) { | 1494 class _CodeUnits extends _internal.UnmodifiableListBase$(core.int) { |
1495 _CodeUnits(string) { | 1495 _CodeUnits(string) { |
1496 this[_string] = string; | 1496 this[_string] = string; |
1497 } | 1497 } |
1498 get length() { | 1498 get length() { |
1499 return this[_string][dartx.length]; | 1499 return this[_string][dartx.length]; |
1500 } | 1500 } |
1501 get(i) { | 1501 get(i) { |
1502 return this[_string][dartx.codeUnitAt](i); | 1502 return dart.dcall(this[_string][dartx.codeUnitAt], i); |
1503 } | 1503 } |
1504 } | 1504 } |
1505 dart.setSignature(_CodeUnits, { | 1505 dart.setSignature(_CodeUnits, { |
1506 constructors: () => ({_CodeUnits: [_CodeUnits, [core.String]]}), | 1506 constructors: () => ({_CodeUnits: [_CodeUnits, [core.String]]}), |
1507 methods: () => ({get: [core.int, [core.int]]}) | 1507 methods: () => ({get: [core.int, [core.int]]}) |
1508 }); | 1508 }); |
1509 dart.defineExtensionMembers(_CodeUnits, ['get', 'length']); | 1509 dart.defineExtensionMembers(_CodeUnits, ['get', 'length']); |
1510 function getInterceptor(obj) { | 1510 function getInterceptor(obj) { |
1511 return obj; | 1511 return obj; |
1512 } | 1512 } |
1513 dart.fn(getInterceptor); | 1513 dart.fn(getInterceptor); |
1514 dart.defineExtensionNames([ | 1514 dart.defineExtensionNames([ |
1515 'toString', | 1515 'toString', |
1516 'hashCode', | 1516 'hashCode', |
1517 'runtimeType' | 1517 'runtimeType' |
1518 ]); | 1518 ]); |
1519 class JSBool extends Interceptor { | 1519 class JSBool extends Interceptor { |
1520 JSBool() { | 1520 JSBool() { |
1521 super.Interceptor(); | 1521 super.Interceptor(); |
1522 } | 1522 } |
1523 toString() { | 1523 toString() { |
1524 return String(this); | 1524 return dart.as(String(this), core.String); |
1525 } | 1525 } |
1526 get hashCode() { | 1526 get hashCode() { |
1527 return this ? 2 * 3 * 23 * 3761 : 269 * 811; | 1527 return this ? 2 * 3 * 23 * 3761 : 269 * 811; |
1528 } | 1528 } |
1529 get runtimeType() { | 1529 get runtimeType() { |
1530 return core.bool; | 1530 return core.bool; |
1531 } | 1531 } |
1532 } | 1532 } |
1533 JSBool[dart.implements] = () => [core.bool]; | 1533 JSBool[dart.implements] = () => [core.bool]; |
1534 dart.setSignature(JSBool, { | 1534 dart.setSignature(JSBool, { |
(...skipping 25 matching lines...) Expand all Loading... |
1560 } | 1560 } |
1561 } | 1561 } |
1562 dart.setSignature(PlainJavaScriptObject, { | 1562 dart.setSignature(PlainJavaScriptObject, { |
1563 constructors: () => ({PlainJavaScriptObject: [PlainJavaScriptObject, []]}) | 1563 constructors: () => ({PlainJavaScriptObject: [PlainJavaScriptObject, []]}) |
1564 }); | 1564 }); |
1565 class UnknownJavaScriptObject extends JavaScriptObject { | 1565 class UnknownJavaScriptObject extends JavaScriptObject { |
1566 UnknownJavaScriptObject() { | 1566 UnknownJavaScriptObject() { |
1567 super.JavaScriptObject(); | 1567 super.JavaScriptObject(); |
1568 } | 1568 } |
1569 toString() { | 1569 toString() { |
1570 return String(this); | 1570 return dart.as(String(this), core.String); |
1571 } | 1571 } |
1572 } | 1572 } |
1573 dart.setSignature(UnknownJavaScriptObject, { | 1573 dart.setSignature(UnknownJavaScriptObject, { |
1574 constructors: () => ({UnknownJavaScriptObject: [UnknownJavaScriptObject, []]
}) | 1574 constructors: () => ({UnknownJavaScriptObject: [UnknownJavaScriptObject, []]
}) |
1575 }); | 1575 }); |
1576 // Exports: | 1576 // Exports: |
1577 exports.JSArray$ = JSArray$; | 1577 exports.JSArray$ = JSArray$; |
1578 exports.JSArray = JSArray; | 1578 exports.JSArray = JSArray; |
1579 exports.JSMutableArray$ = JSMutableArray$; | 1579 exports.JSMutableArray$ = JSMutableArray$; |
1580 exports.JSMutableArray = JSMutableArray; | 1580 exports.JSMutableArray = JSMutableArray; |
(...skipping 11 matching lines...) Expand all Loading... |
1592 exports.JSString = JSString; | 1592 exports.JSString = JSString; |
1593 exports.getInterceptor = getInterceptor; | 1593 exports.getInterceptor = getInterceptor; |
1594 exports.JSBool = JSBool; | 1594 exports.JSBool = JSBool; |
1595 exports.JSIndexable = JSIndexable; | 1595 exports.JSIndexable = JSIndexable; |
1596 exports.JSMutableIndexable = JSMutableIndexable; | 1596 exports.JSMutableIndexable = JSMutableIndexable; |
1597 exports.JSObject = JSObject; | 1597 exports.JSObject = JSObject; |
1598 exports.JavaScriptObject = JavaScriptObject; | 1598 exports.JavaScriptObject = JavaScriptObject; |
1599 exports.PlainJavaScriptObject = PlainJavaScriptObject; | 1599 exports.PlainJavaScriptObject = PlainJavaScriptObject; |
1600 exports.UnknownJavaScriptObject = UnknownJavaScriptObject; | 1600 exports.UnknownJavaScriptObject = UnknownJavaScriptObject; |
1601 }); | 1601 }); |
OLD | NEW |