Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: lib/runtime/dart/_interceptors.js

Issue 1153003003: fixes #40, extension methods for primitive types (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | lib/runtime/dart/_internal.js » ('j') | lib/runtime/dart_runtime.js » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 var _interceptors = dart.defineLibrary(_interceptors, {}); 1 var _interceptors = dart.defineLibrary(_interceptors, {});
2 var core = dart.import(core); 2 var core = dart.import(core);
3 var _internal = dart.import(_internal);
3 var _js_helper = dart.lazyImport(_js_helper); 4 var _js_helper = dart.lazyImport(_js_helper);
4 var _internal = dart.import(_internal); 5 var collection = dart.import(collection);
5 var _foreign_helper = dart.import(_foreign_helper); 6 var math = dart.import(math);
6 var _js_embedded_names = dart.import(_js_embedded_names); 7 (function(exports, core, _internal, _js_helper, collection, math) {
7 (function(exports, core, _js_helper, _internal, _foreign_helper, _js_embedded_na mes) {
8 'use strict'; 8 'use strict';
9 let JSArray = Array; 9 let JSArray$ = dart.generic(function(E) {
10 class JSArray extends core.Object {
11 JSArray() {
12 }
13 static typed(allocation) {
14 return dart.list(allocation, E);
15 }
16 static markFixed(allocation) {
17 return JSArray$(E).typed(JSArray$().markFixedList(dart.as(allocation, co re.List)));
18 }
19 static markGrowable(allocation) {
20 return JSArray$().typed(allocation);
21 }
22 static markFixedList(list) {
23 list.fixed$length = Array;
24 return list;
25 }
26 checkGrowable(reason) {
27 if (this.fixed$length) {
28 throw new core.UnsupportedError(dart.as(reason, core.String));
29 }
30 }
31 add(value) {
32 dart.as(value, E);
33 this[dartx.checkGrowable]('add');
34 this.push(value);
35 }
36 removeAt(index) {
37 if (!(typeof index == 'number'))
38 throw new core.ArgumentError(index);
39 if (dart.notNull(index) < 0 || dart.notNull(index) >= dart.notNull(this. length)) {
40 throw new core.RangeError.value(index);
41 }
42 this[dartx.checkGrowable]('removeAt');
43 return this.splice(index, 1)[0];
44 }
45 insert(index, value) {
46 dart.as(value, E);
47 if (!(typeof index == 'number'))
48 throw new core.ArgumentError(index);
49 if (dart.notNull(index) < 0 || dart.notNull(index) > dart.notNull(this.l ength)) {
50 throw new core.RangeError.value(index);
51 }
52 this[dartx.checkGrowable]('insert');
53 this.splice(index, 0, value);
54 }
55 insertAll(index, iterable) {
56 dart.as(iterable, core.Iterable$(E));
57 this[dartx.checkGrowable]('insertAll');
58 _internal.IterableMixinWorkaround.insertAllList(this, index, iterable);
59 }
60 setAll(index, iterable) {
61 dart.as(iterable, core.Iterable$(E));
62 _internal.IterableMixinWorkaround.setAllList(this, index, iterable);
63 }
64 removeLast() {
65 this[dartx.checkGrowable]('removeLast');
66 if (this.length == 0)
67 throw new core.RangeError.value(-1);
68 return dart.as(this.pop(), E);
69 }
70 remove(element) {
71 this[dartx.checkGrowable]('remove');
72 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.no tNull(i) + 1) {
73 if (dart.equals(this[dartx.get](i), element)) {
74 this.splice(i, 1);
75 return true;
76 }
77 }
78 return false;
79 }
80 removeWhere(test) {
81 dart.as(test, dart.functionType(core.bool, [E]));
82 _internal.IterableMixinWorkaround.removeWhereList(this, test);
83 }
84 retainWhere(test) {
85 dart.as(test, dart.functionType(core.bool, [E]));
86 _internal.IterableMixinWorkaround.removeWhereList(this, dart.fn(element => !dart.notNull(test(element)), core.bool, [E]));
87 }
88 where(f) {
89 dart.as(f, dart.functionType(core.bool, [E]));
90 return new (_internal.IterableMixinWorkaround$(E))().where(this, f);
91 }
92 expand(f) {
93 dart.as(f, dart.functionType(core.Iterable, [E]));
94 return _internal.IterableMixinWorkaround.expand(this, f);
95 }
96 addAll(collection) {
97 dart.as(collection, core.Iterable$(E));
98 for (let e of collection) {
99 this[dartx.add](e);
100 }
101 }
102 clear() {
103 this.length = 0;
104 }
105 forEach(f) {
106 dart.as(f, dart.functionType(dart.void, [E]));
107 let length = this.length;
108 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
109 f(dart.as(this[i], E));
110 if (length != this.length) {
111 throw new core.ConcurrentModificationError(this);
112 }
113 }
114 }
115 map(f) {
116 dart.as(f, dart.functionType(core.Object, [E]));
117 return _internal.IterableMixinWorkaround.mapList(this, f);
118 }
119 join(separator) {
120 if (separator === void 0)
121 separator = "";
122 let list = core.List.new(this.length);
123 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.no tNull(i) + 1) {
124 list[dartx.set](i, `${this[dartx.get](i)}`);
125 }
126 return list.join(separator);
127 }
128 take(n) {
129 return new (_internal.IterableMixinWorkaround$(E))().takeList(this, n);
130 }
131 takeWhile(test) {
132 dart.as(test, dart.functionType(core.bool, [E]));
133 return new (_internal.IterableMixinWorkaround$(E))().takeWhile(this, tes t);
134 }
135 skip(n) {
136 return new (_internal.IterableMixinWorkaround$(E))().skipList(this, n);
137 }
138 skipWhile(test) {
139 dart.as(test, dart.functionType(core.bool, [E]));
140 return new (_internal.IterableMixinWorkaround$(E))().skipWhile(this, tes t);
141 }
142 reduce(combine) {
143 dart.as(combine, dart.functionType(E, [E, E]));
144 return dart.as(_internal.IterableMixinWorkaround.reduce(this, combine), E);
145 }
146 fold(initialValue, combine) {
147 dart.as(combine, dart.functionType(core.Object, [dart.bottom, E]));
148 return _internal.IterableMixinWorkaround.fold(this, initialValue, combin e);
149 }
150 firstWhere(test, opts) {
151 dart.as(test, dart.functionType(core.bool, [E]));
152 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
153 dart.as(orElse, dart.functionType(E, []));
154 return dart.as(_internal.IterableMixinWorkaround.firstWhere(this, test, orElse), E);
155 }
156 lastWhere(test, opts) {
157 dart.as(test, dart.functionType(core.bool, [E]));
158 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
159 dart.as(orElse, dart.functionType(E, []));
160 return dart.as(_internal.IterableMixinWorkaround.lastWhereList(this, tes t, orElse), E);
161 }
162 singleWhere(test) {
163 dart.as(test, dart.functionType(core.bool, [E]));
164 return dart.as(_internal.IterableMixinWorkaround.singleWhere(this, test) , E);
165 }
166 elementAt(index) {
167 return this[dartx.get](index);
168 }
169 sublist(start, end) {
170 if (end === void 0)
171 end = null;
172 _js_helper.checkNull(start);
173 if (!(typeof start == 'number'))
174 throw new core.ArgumentError(start);
175 if (dart.notNull(start) < 0 || dart.notNull(start) > dart.notNull(this.l ength)) {
176 throw new core.RangeError.range(start, 0, this.length);
177 }
178 if (end == null) {
179 end = this.length;
180 } else {
181 if (!(typeof end == 'number'))
182 throw new core.ArgumentError(end);
183 if (dart.notNull(end) < dart.notNull(start) || dart.notNull(end) > dar t.notNull(this.length)) {
184 throw new core.RangeError.range(end, start, this.length);
185 }
186 }
187 if (start == end)
188 return dart.list([], E);
189 return JSArray$(E).typed(this.slice(start, end));
190 }
191 getRange(start, end) {
192 return new (_internal.IterableMixinWorkaround$(E))().getRangeList(this, start, end);
193 }
194 get first() {
195 if (dart.notNull(this.length) > 0)
196 return this[dartx.get](0);
197 throw new core.StateError("No elements");
198 }
199 get last() {
200 if (dart.notNull(this.length) > 0)
201 return this[dartx.get](dart.notNull(this.length) - 1);
202 throw new core.StateError("No elements");
203 }
204 get single() {
205 if (this.length == 1)
206 return this[dartx.get](0);
207 if (this.length == 0)
208 throw new core.StateError("No elements");
209 throw new core.StateError("More than one element");
210 }
211 removeRange(start, end) {
212 this[dartx.checkGrowable]('removeRange');
213 let receiverLength = this.length;
214 if (dart.notNull(start) < 0 || dart.notNull(start) > dart.notNull(receiv erLength)) {
215 throw new core.RangeError.range(start, 0, receiverLength);
216 }
217 if (dart.notNull(end) < dart.notNull(start) || dart.notNull(end) > dart. notNull(receiverLength)) {
218 throw new core.RangeError.range(end, start, receiverLength);
219 }
220 _internal.Lists.copy(this, end, this, start, dart.notNull(receiverLength ) - dart.notNull(end));
221 this.length = dart.notNull(receiverLength) - (dart.notNull(end) - dart.n otNull(start));
222 }
223 setRange(start, end, iterable, skipCount) {
224 dart.as(iterable, core.Iterable$(E));
225 if (skipCount === void 0)
226 skipCount = 0;
227 _internal.IterableMixinWorkaround.setRangeList(this, start, end, iterabl e, skipCount);
228 }
229 fillRange(start, end, fillValue) {
230 if (fillValue === void 0)
231 fillValue = null;
232 dart.as(fillValue, E);
233 _internal.IterableMixinWorkaround.fillRangeList(this, start, end, fillVa lue);
234 }
235 replaceRange(start, end, iterable) {
236 dart.as(iterable, core.Iterable$(E));
237 _internal.IterableMixinWorkaround.replaceRangeList(this, start, end, ite rable);
238 }
239 any(f) {
240 dart.as(f, dart.functionType(core.bool, [E]));
241 return _internal.IterableMixinWorkaround.any(this, f);
242 }
243 every(f) {
244 dart.as(f, dart.functionType(core.bool, [E]));
245 return _internal.IterableMixinWorkaround.every(this, f);
246 }
247 get reversed() {
248 return new (_internal.IterableMixinWorkaround$(E))().reversedList(this);
249 }
250 sort(compare) {
251 if (compare === void 0)
252 compare = null;
253 dart.as(compare, dart.functionType(core.int, [E, E]));
254 _internal.IterableMixinWorkaround.sortList(this, compare);
255 }
256 shuffle(random) {
257 if (random === void 0)
258 random = null;
259 _internal.IterableMixinWorkaround.shuffleList(this, random);
260 }
261 indexOf(element, start) {
262 if (start === void 0)
263 start = 0;
264 return _internal.IterableMixinWorkaround.indexOfList(this, element, star t);
265 }
266 lastIndexOf(element, start) {
267 if (start === void 0)
268 start = null;
269 return _internal.IterableMixinWorkaround.lastIndexOfList(this, element, start);
270 }
271 contains(other) {
272 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.no tNull(i) + 1) {
273 if (dart.equals(this[dartx.get](i), other))
274 return true;
275 }
276 return false;
277 }
278 get isEmpty() {
279 return this.length == 0;
280 }
281 get isNotEmpty() {
282 return !dart.notNull(this[dartx.isEmpty]);
283 }
284 toString() {
285 return collection.ListBase.listToString(this);
286 }
287 toList(opts) {
288 let growable = opts && 'growable' in opts ? opts.growable : true;
289 let list = this.slice();
290 if (!dart.notNull(growable))
291 JSArray$().markFixedList(dart.as(list, core.List));
292 return JSArray$(E).typed(list);
293 }
294 toSet() {
295 return core.Set$(E).from(this);
296 }
297 get iterator() {
298 return new (_internal.ListIterator$(E))(this);
299 }
300 get hashCode() {
301 return _js_helper.Primitives.objectHashCode(this);
302 }
303 get length() {
304 return dart.as(this.length, core.int);
305 }
306 set length(newLength) {
307 if (!(typeof newLength == 'number'))
308 throw new core.ArgumentError(newLength);
309 if (dart.notNull(newLength) < 0)
310 throw new core.RangeError.value(newLength);
311 this[dartx.checkGrowable]('set length');
312 this.length = newLength;
313 }
314 get(index) {
315 if (!(typeof index == 'number'))
316 throw new core.ArgumentError(index);
317 if (dart.notNull(index) >= dart.notNull(this.length) || dart.notNull(ind ex) < 0)
318 throw new core.RangeError.value(index);
319 return dart.as(this[index], E);
320 }
321 set(index, value) {
322 dart.as(value, E);
323 if (!(typeof index == 'number'))
324 throw new core.ArgumentError(index);
325 if (dart.notNull(index) >= dart.notNull(this.length) || dart.notNull(ind ex) < 0)
326 throw new core.RangeError.value(index);
327 this[index] = value;
328 }
329 asMap() {
330 return new (_internal.IterableMixinWorkaround$(E))().asMapList(this);
331 }
332 }
333 dart.setBaseClass(JSArray, dart.global.Array);
334 JSArray[dart.implements] = () => [core.List$(E), JSIndexable];
335 dart.setSignature(JSArray, {
336 constructors: () => ({
337 JSArray: [JSArray$(E), []],
338 typed: [JSArray$(E), [core.Object]],
339 markFixed: [JSArray$(E), [core.Object]],
340 markGrowable: [JSArray$(E), [core.Object]]
341 }),
342 methods: () => ({
343 checkGrowable: [core.Object, [core.Object]],
344 add: [dart.void, [E]],
345 removeAt: [E, [core.int]],
346 insert: [dart.void, [core.int, E]],
347 insertAll: [dart.void, [core.int, core.Iterable$(E)]],
348 setAll: [dart.void, [core.int, core.Iterable$(E)]],
349 removeLast: [E, []],
350 remove: [core.bool, [core.Object]],
351 removeWhere: [dart.void, [dart.functionType(core.bool, [E])]],
352 retainWhere: [dart.void, [dart.functionType(core.bool, [E])]],
353 where: [core.Iterable$(E), [dart.functionType(core.bool, [E])]],
354 expand: [core.Iterable, [dart.functionType(core.Iterable, [E])]],
355 addAll: [dart.void, [core.Iterable$(E)]],
356 clear: [dart.void, []],
357 forEach: [dart.void, [dart.functionType(dart.void, [E])]],
358 map: [core.Iterable, [dart.functionType(core.Object, [E])]],
359 join: [core.String, [], [core.String]],
360 take: [core.Iterable$(E), [core.int]],
361 takeWhile: [core.Iterable$(E), [dart.functionType(core.bool, [E])]],
362 skip: [core.Iterable$(E), [core.int]],
363 skipWhile: [core.Iterable$(E), [dart.functionType(core.bool, [E])]],
364 reduce: [E, [dart.functionType(E, [E, E])]],
365 fold: [core.Object, [core.Object, dart.functionType(core.Object, [dart.b ottom, E])]],
366 firstWhere: [E, [dart.functionType(core.bool, [E])], {orElse: dart.funct ionType(E, [])}],
367 lastWhere: [E, [dart.functionType(core.bool, [E])], {orElse: dart.functi onType(E, [])}],
368 singleWhere: [E, [dart.functionType(core.bool, [E])]],
369 elementAt: [E, [core.int]],
370 sublist: [core.List$(E), [core.int], [core.int]],
371 getRange: [core.Iterable$(E), [core.int, core.int]],
372 removeRange: [dart.void, [core.int, core.int]],
373 setRange: [dart.void, [core.int, core.int, core.Iterable$(E)], [core.int ]],
374 fillRange: [dart.void, [core.int, core.int], [E]],
375 replaceRange: [dart.void, [core.int, core.int, core.Iterable$(E)]],
376 any: [core.bool, [dart.functionType(core.bool, [E])]],
377 every: [core.bool, [dart.functionType(core.bool, [E])]],
378 sort: [dart.void, [], [dart.functionType(core.int, [E, E])]],
379 shuffle: [dart.void, [], [math.Random]],
380 indexOf: [core.int, [core.Object], [core.int]],
381 lastIndexOf: [core.int, [core.Object], [core.int]],
382 contains: [core.bool, [core.Object]],
383 toList: [core.List$(E), [], {growable: core.bool}],
384 toSet: [core.Set$(E), []],
385 get: [E, [core.int]],
386 set: [dart.void, [core.int, E]],
387 asMap: [core.Map$(core.int, E), []]
388 }),
389 statics: () => ({markFixedList: [core.List, [core.List]]}),
390 names: ['markFixedList']
391 });
392 return JSArray;
393 });
394 let JSArray = JSArray$();
395 dart.registerExtension(dart.global.Array, JSArray);
10 let JSMutableArray$ = dart.generic(function(E) { 396 let JSMutableArray$ = dart.generic(function(E) {
11 class JSMutableArray extends JSArray$(E) { 397 class JSMutableArray extends JSArray$(E) {
12 JSMutableArray() { 398 JSMutableArray() {
13 super.JSArray(); 399 super.JSArray();
14 } 400 }
15 } 401 }
16 JSMutableArray[dart.implements] = () => [JSMutableIndexable]; 402 JSMutableArray[dart.implements] = () => [JSMutableIndexable];
17 return JSMutableArray; 403 return JSMutableArray;
18 }); 404 });
19 let JSMutableArray = JSMutableArray$(); 405 let JSMutableArray = JSMutableArray$();
20 let JSFixedArray$ = dart.generic(function(E) { 406 let JSFixedArray$ = dart.generic(function(E) {
21 class JSFixedArray extends JSMutableArray$(E) {} 407 class JSFixedArray extends JSMutableArray$(E) {}
22 return JSFixedArray; 408 return JSFixedArray;
23 }); 409 });
24 let JSFixedArray = JSFixedArray$(); 410 let JSFixedArray = JSFixedArray$();
25 let JSExtendableArray$ = dart.generic(function(E) { 411 let JSExtendableArray$ = dart.generic(function(E) {
26 class JSExtendableArray extends JSMutableArray$(E) {} 412 class JSExtendableArray extends JSMutableArray$(E) {}
27 return JSExtendableArray; 413 return JSExtendableArray;
28 }); 414 });
29 let JSExtendableArray = JSExtendableArray$(); 415 let JSExtendableArray = JSExtendableArray$();
30 class Interceptor extends core.Object { 416 class Interceptor extends core.Object {
31 Interceptor() { 417 Interceptor() {
32 } 418 }
33 ['=='](other) {
34 return core.identical(this, other);
35 }
36 get hashCode() {
37 return _js_helper.Primitives.objectHashCode(this);
38 }
39 toString() {
40 return _js_helper.Primitives.objectToString(this);
41 }
42 noSuchMethod(invocation) {
43 throw new core.NoSuchMethodError(this, invocation.memberName, invocation.p ositionalArguments, invocation.namedArguments);
44 }
45 get runtimeType() {
46 return _js_helper.getRuntimeType(this);
47 }
48 } 419 }
49 dart.setSignature(Interceptor, { 420 dart.setSignature(Interceptor, {
50 constructors: () => ({Interceptor: [Interceptor, []]}), 421 constructors: () => ({Interceptor: [Interceptor, []]})
51 methods: () => ({'==': [core.bool, [core.Object]]})
52 }); 422 });
53 let _isInt32 = Symbol('_isInt32'); 423 let _isInt32 = Symbol('_isInt32');
54 let _tdivFast = Symbol('_tdivFast'); 424 let _tdivFast = Symbol('_tdivFast');
55 let _tdivSlow = Symbol('_tdivSlow'); 425 let _tdivSlow = Symbol('_tdivSlow');
56 let _shlPositive = Symbol('_shlPositive'); 426 let _shlPositive = Symbol('_shlPositive');
57 let _shrReceiverPositive = Symbol('_shrReceiverPositive'); 427 let _shrReceiverPositive = Symbol('_shrReceiverPositive');
58 let _shrOtherPositive = Symbol('_shrOtherPositive'); 428 let _shrOtherPositive = Symbol('_shrOtherPositive');
59 let _shrBothPositive = Symbol('_shrBothPositive'); 429 let _shrBothPositive = Symbol('_shrBothPositive');
60 class JSNumber extends Interceptor { 430 class JSNumber extends Interceptor {
61 JSNumber() { 431 JSNumber() {
62 super.Interceptor(); 432 super.Interceptor();
63 } 433 }
64 compareTo(b) { 434 compareTo(b) {
65 if (!dart.is(b, core.num)) 435 if (!dart.is(b, core.num))
66 throw new core.ArgumentError(b); 436 throw new core.ArgumentError(b);
67 if (this['<'](b)) { 437 if (this[dartx['<']](b)) {
68 return -1; 438 return -1;
69 } else if (this['>'](b)) { 439 } else if (this[dartx['>']](b)) {
70 return 1; 440 return 1;
71 } else if (dart.equals(this, b)) { 441 } else if (dart.equals(this, b)) {
72 if (dart.equals(this, 0)) { 442 if (dart.equals(this, 0)) {
73 let bIsNegative = b.isNegative; 443 let bIsNegative = b[dartx.isNegative];
74 if (this.isNegative == bIsNegative) 444 if (this[dartx.isNegative] == bIsNegative)
75 return 0; 445 return 0;
76 if (this.isNegative) 446 if (this[dartx.isNegative])
77 return -1; 447 return -1;
78 return 1; 448 return 1;
79 } 449 }
80 return 0; 450 return 0;
81 } else if (this.isNaN) { 451 } else if (this[dartx.isNaN]) {
82 if (b.isNaN) { 452 if (b[dartx.isNaN]) {
83 return 0; 453 return 0;
84 } 454 }
85 return 1; 455 return 1;
86 } else { 456 } else {
87 return -1; 457 return -1;
88 } 458 }
89 } 459 }
90 get isNegative() { 460 get isNegative() {
91 return dart.equals(this, 0) ? (1)['/'](this) < 0 : this['<'](0); 461 return dart.equals(this, 0) ? (1)[dartx['/']](this) < 0 : this[dartx['<']] (0);
92 } 462 }
93 get isNaN() { 463 get isNaN() {
94 return isNaN(this); 464 return isNaN(this);
95 } 465 }
96 get isInfinite() { 466 get isInfinite() {
97 return this == Infinity || this == -Infinity; 467 return this == Infinity || this == -Infinity;
98 } 468 }
99 get isFinite() { 469 get isFinite() {
100 return isFinite(this); 470 return isFinite(this);
101 } 471 }
102 remainder(b) { 472 remainder(b) {
103 _js_helper.checkNull(b); 473 _js_helper.checkNull(b);
104 if (!dart.is(b, core.num)) 474 if (!dart.is(b, core.num))
105 throw new core.ArgumentError(b); 475 throw new core.ArgumentError(b);
106 return this % b; 476 return this % b;
107 } 477 }
108 abs() { 478 abs() {
109 return Math.abs(this); 479 return Math.abs(this);
110 } 480 }
111 get sign() { 481 get sign() {
112 return this['>'](0) ? 1 : this['<'](0) ? -1 : this; 482 return this[dartx['>']](0) ? 1 : this[dartx['<']](0) ? -1 : this;
113 } 483 }
114 toInt() { 484 toInt() {
115 if (dart.notNull(this['>='](JSNumber._MIN_INT32)) && dart.notNull(this['<= '](JSNumber._MAX_INT32))) { 485 if (dart.notNull(this[dartx['>=']](JSNumber._MIN_INT32)) && dart.notNull(t his[dartx['<=']](JSNumber._MAX_INT32))) {
116 return this | 0; 486 return this | 0;
117 } 487 }
118 if (isFinite(this)) { 488 if (isFinite(this)) {
119 return this.truncateToDouble() + 0; 489 return this[dartx.truncateToDouble]() + 0;
120 } 490 }
121 throw new core.UnsupportedError('' + this); 491 throw new core.UnsupportedError('' + this);
122 } 492 }
123 truncate() { 493 truncate() {
124 return this.toInt(); 494 return this[dartx.toInt]();
125 } 495 }
126 ceil() { 496 ceil() {
127 return this.ceilToDouble().toInt(); 497 return this[dartx.ceilToDouble]()[dartx.toInt]();
128 } 498 }
129 floor() { 499 floor() {
130 return this.floorToDouble().toInt(); 500 return this[dartx.floorToDouble]()[dartx.toInt]();
131 } 501 }
132 round() { 502 round() {
133 return this.roundToDouble().toInt(); 503 return this[dartx.roundToDouble]()[dartx.toInt]();
134 } 504 }
135 ceilToDouble() { 505 ceilToDouble() {
136 return Math.ceil(this); 506 return Math.ceil(this);
137 } 507 }
138 floorToDouble() { 508 floorToDouble() {
139 return Math.floor(this); 509 return Math.floor(this);
140 } 510 }
141 roundToDouble() { 511 roundToDouble() {
142 if (this['<'](0)) { 512 if (this[dartx['<']](0)) {
143 return -Math.round(-this); 513 return -Math.round(-this);
144 } else { 514 } else {
145 return Math.round(this); 515 return Math.round(this);
146 } 516 }
147 } 517 }
148 truncateToDouble() { 518 truncateToDouble() {
149 return this['<'](0) ? this.ceilToDouble() : this.floorToDouble(); 519 return this[dartx['<']](0) ? this[dartx.ceilToDouble]() : this[dartx.floor ToDouble]();
150 } 520 }
151 clamp(lowerLimit, upperLimit) { 521 clamp(lowerLimit, upperLimit) {
152 if (!dart.is(lowerLimit, core.num)) 522 if (!dart.is(lowerLimit, core.num))
153 throw new core.ArgumentError(lowerLimit); 523 throw new core.ArgumentError(lowerLimit);
154 if (!dart.is(upperLimit, core.num)) 524 if (!dart.is(upperLimit, core.num))
155 throw new core.ArgumentError(upperLimit); 525 throw new core.ArgumentError(upperLimit);
156 if (dart.notNull(lowerLimit.compareTo(upperLimit)) > 0) { 526 if (dart.notNull(lowerLimit[dartx.compareTo](upperLimit)) > 0) {
157 throw new core.ArgumentError(lowerLimit); 527 throw new core.ArgumentError(lowerLimit);
158 } 528 }
159 if (dart.notNull(this.compareTo(lowerLimit)) < 0) 529 if (dart.notNull(this[dartx.compareTo](lowerLimit)) < 0)
160 return lowerLimit; 530 return lowerLimit;
161 if (dart.notNull(this.compareTo(upperLimit)) > 0) 531 if (dart.notNull(this[dartx.compareTo](upperLimit)) > 0)
162 return upperLimit; 532 return upperLimit;
163 return this; 533 return this;
164 } 534 }
165 toDouble() { 535 toDouble() {
166 return this; 536 return this;
167 } 537 }
168 toStringAsFixed(fractionDigits) { 538 toStringAsFixed(fractionDigits) {
169 _js_helper.checkInt(fractionDigits); 539 _js_helper.checkInt(fractionDigits);
170 if (dart.notNull(fractionDigits) < 0 || dart.notNull(fractionDigits) > 20) { 540 if (dart.notNull(fractionDigits) < 0 || dart.notNull(fractionDigits) > 20) {
171 throw new core.RangeError(fractionDigits); 541 throw new core.RangeError(fractionDigits);
172 } 542 }
173 let result = this.toFixed(fractionDigits); 543 let result = this.toFixed(fractionDigits);
174 if (dart.notNull(dart.equals(this, 0)) && dart.notNull(this.isNegative)) 544 if (dart.notNull(dart.equals(this, 0)) && dart.notNull(this[dartx.isNegati ve]))
175 return `-${result}`; 545 return `-${result}`;
176 return result; 546 return result;
177 } 547 }
178 toStringAsExponential(fractionDigits) { 548 toStringAsExponential(fractionDigits) {
179 if (fractionDigits === void 0) 549 if (fractionDigits === void 0)
180 fractionDigits = null; 550 fractionDigits = null;
181 let result = null; 551 let result = null;
182 if (fractionDigits != null) { 552 if (fractionDigits != null) {
183 _js_helper.checkInt(fractionDigits); 553 _js_helper.checkInt(fractionDigits);
184 if (dart.notNull(fractionDigits) < 0 || dart.notNull(fractionDigits) > 2 0) { 554 if (dart.notNull(fractionDigits) < 0 || dart.notNull(fractionDigits) > 2 0) {
185 throw new core.RangeError(fractionDigits); 555 throw new core.RangeError(fractionDigits);
186 } 556 }
187 result = this.toExponential(fractionDigits); 557 result = this.toExponential(fractionDigits);
188 } else { 558 } else {
189 result = this.toExponential(); 559 result = this.toExponential();
190 } 560 }
191 if (dart.notNull(dart.equals(this, 0)) && dart.notNull(this.isNegative)) 561 if (dart.notNull(dart.equals(this, 0)) && dart.notNull(this[dartx.isNegati ve]))
192 return `-${result}`; 562 return `-${result}`;
193 return result; 563 return result;
194 } 564 }
195 toStringAsPrecision(precision) { 565 toStringAsPrecision(precision) {
196 _js_helper.checkInt(precision); 566 _js_helper.checkInt(precision);
197 if (dart.notNull(precision) < 1 || dart.notNull(precision) > 21) { 567 if (dart.notNull(precision) < 1 || dart.notNull(precision) > 21) {
198 throw new core.RangeError(precision); 568 throw new core.RangeError(precision);
199 } 569 }
200 let result = this.toPrecision(precision); 570 let result = this.toPrecision(precision);
201 if (dart.notNull(dart.equals(this, 0)) && dart.notNull(this.isNegative)) 571 if (dart.notNull(dart.equals(this, 0)) && dart.notNull(this[dartx.isNegati ve]))
202 return `-${result}`; 572 return `-${result}`;
203 return result; 573 return result;
204 } 574 }
205 toRadixString(radix) { 575 toRadixString(radix) {
206 _js_helper.checkInt(radix); 576 _js_helper.checkInt(radix);
207 if (dart.notNull(radix) < 2 || dart.notNull(radix) > 36) 577 if (dart.notNull(radix) < 2 || dart.notNull(radix) > 36)
208 throw new core.RangeError(radix); 578 throw new core.RangeError(radix);
209 let result = this.toString(radix); 579 let result = this.toString(radix);
210 let rightParenCode = 41; 580 let rightParenCode = 41;
211 if (result.codeUnitAt(dart.notNull(result.length) - 1) != rightParenCode) { 581 if (result[dartx.codeUnitAt](dart.notNull(result.length) - 1) != rightPare nCode) {
212 return result; 582 return result;
213 } 583 }
214 return JSNumber._handleIEtoString(result); 584 return JSNumber._handleIEtoString(result);
215 } 585 }
216 static _handleIEtoString(result) { 586 static _handleIEtoString(result) {
217 let match = /^([\da-z]+)(?:\.([\da-z]+))?\(e\+(\d+)\)$/.exec(result); 587 let match = /^([\da-z]+)(?:\.([\da-z]+))?\(e\+(\d+)\)$/.exec(result);
218 if (match == null) { 588 if (match == null) {
219 throw new core.UnsupportedError(`Unexpected toString result: ${result}`) ; 589 throw new core.UnsupportedError(`Unexpected toString result: ${result}`) ;
220 } 590 }
221 result = dart.dindex(match, 1); 591 result = dart.dindex(match, 1);
222 let exponent = +dart.dindex(match, 3); 592 let exponent = +dart.dindex(match, 3);
223 if (dart.dindex(match, 2) != null) { 593 if (dart.dindex(match, 2) != null) {
224 result = result + dart.dindex(match, 2); 594 result = result + dart.dindex(match, 2);
225 exponent = dart.notNull(exponent) - dart.dindex(match, 2).length; 595 exponent = dart.notNull(exponent) - dart.dindex(match, 2).length;
226 } 596 }
227 return dart.notNull(result) + "0"['*'](exponent); 597 return dart.notNull(result) + "0"[dartx['*']](exponent);
228 } 598 }
229 toString() { 599 toString() {
230 if (dart.notNull(dart.equals(this, 0)) && 1 / this < 0) { 600 if (dart.notNull(dart.equals(this, 0)) && 1 / this < 0) {
231 return '-0.0'; 601 return '-0.0';
232 } else { 602 } else {
233 return "" + this; 603 return "" + this;
234 } 604 }
235 } 605 }
236 get hashCode() { 606 get hashCode() {
237 return this & 0x1FFFFFFF; 607 return this & 0x1FFFFFFF;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 ['~/'](other) { 649 ['~/'](other) {
280 if (false) 650 if (false)
281 this[_tdivFast](other); 651 this[_tdivFast](other);
282 if (dart.notNull(this[_isInt32](this)) && dart.notNull(this[_isInt32](othe r)) && 0 != other && -1 != other) { 652 if (dart.notNull(this[_isInt32](this)) && dart.notNull(this[_isInt32](othe r)) && 0 != other && -1 != other) {
283 return this / other | 0; 653 return this / other | 0;
284 } else { 654 } else {
285 return this[_tdivSlow](other); 655 return this[_tdivSlow](other);
286 } 656 }
287 } 657 }
288 [_tdivFast](other) { 658 [_tdivFast](other) {
289 return this[_isInt32](this) ? this / other | 0 : (this / other).toInt(); 659 return this[_isInt32](this) ? this / other | 0 : (this / other)[dartx.toIn t]();
290 } 660 }
291 [_tdivSlow](other) { 661 [_tdivSlow](other) {
292 if (!dart.is(other, core.num)) 662 if (!dart.is(other, core.num))
293 throw new core.ArgumentError(other); 663 throw new core.ArgumentError(other);
294 return (this / other).toInt(); 664 return (this / other)[dartx.toInt]();
295 } 665 }
296 ['<<'](other) { 666 ['<<'](other) {
297 if (!dart.is(other, core.num)) 667 if (!dart.is(other, core.num))
298 throw new core.ArgumentError(other); 668 throw new core.ArgumentError(other);
299 if (other < 0) 669 if (other < 0)
300 throw new core.ArgumentError(other); 670 throw new core.ArgumentError(other);
301 return this[_shlPositive](other); 671 return this[_shlPositive](other);
302 } 672 }
303 [_shlPositive](other) { 673 [_shlPositive](other) {
304 return other > 31 ? 0 : dart.as(this << other >>> 0, core.num); 674 return other > 31 ? 0 : dart.as(this << other >>> 0, core.num);
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 statics: () => ({_handleIEtoString: [core.String, [core.String]]}), 781 statics: () => ({_handleIEtoString: [core.String, [core.String]]}),
412 names: ['_handleIEtoString'] 782 names: ['_handleIEtoString']
413 }); 783 });
414 JSNumber._MIN_INT32 = -2147483648; 784 JSNumber._MIN_INT32 = -2147483648;
415 JSNumber._MAX_INT32 = 2147483647; 785 JSNumber._MAX_INT32 = 2147483647;
416 class JSInt extends JSNumber { 786 class JSInt extends JSNumber {
417 JSInt() { 787 JSInt() {
418 super.JSNumber(); 788 super.JSNumber();
419 } 789 }
420 get isEven() { 790 get isEven() {
421 return this['&'](1) == 0; 791 return this[dartx['&']](1) == 0;
422 } 792 }
423 get isOdd() { 793 get isOdd() {
424 return this['&'](1) == 1; 794 return this[dartx['&']](1) == 1;
425 } 795 }
426 toUnsigned(width) { 796 toUnsigned(width) {
427 return this['&']((1 << dart.notNull(width)) - 1); 797 return this[dartx['&']]((1 << dart.notNull(width)) - 1);
428 } 798 }
429 toSigned(width) { 799 toSigned(width) {
430 let signMask = 1 << dart.notNull(width) - 1; 800 let signMask = 1 << dart.notNull(width) - 1;
431 return dart.notNull(this['&'](dart.notNull(signMask) - 1)) - dart.notNull( this['&'](signMask)); 801 return dart.notNull(this[dartx['&']](dart.notNull(signMask) - 1)) - dart.n otNull(this[dartx['&']](signMask));
432 } 802 }
433 get bitLength() { 803 get bitLength() {
434 let nonneg = this['<'](0) ? dart.notNull(this['unary-']()) - 1 : this; 804 let nonneg = this[dartx['<']](0) ? dart.notNull(this[dartx['unary-']]()) - 1 : this;
435 if (dart.notNull(nonneg) >= 4294967296) { 805 if (dart.notNull(nonneg) >= 4294967296) {
436 nonneg = (dart.notNull(nonneg) / 4294967296).truncate(); 806 nonneg = (dart.notNull(nonneg) / 4294967296).truncate();
437 return dart.notNull(JSInt._bitCount(JSInt._spread(nonneg))) + 32; 807 return dart.notNull(JSInt._bitCount(JSInt._spread(nonneg))) + 32;
438 } 808 }
439 return JSInt._bitCount(JSInt._spread(nonneg)); 809 return JSInt._bitCount(JSInt._spread(nonneg));
440 } 810 }
441 static _bitCount(i) { 811 static _bitCount(i) {
442 i = dart.notNull(JSInt._shru(i, 0)) - (dart.notNull(JSInt._shru(i, 1)) & 1 431655765); 812 i = dart.notNull(JSInt._shru(i, 0)) - (dart.notNull(JSInt._shru(i, 1)) & 1 431655765);
443 i = (dart.notNull(i) & 858993459) + (dart.notNull(JSInt._shru(i, 2)) & 858 993459); 813 i = (dart.notNull(i) & 858993459) + (dart.notNull(JSInt._shru(i, 2)) & 858 993459);
444 i = 252645135 & dart.notNull(i) + dart.notNull(JSInt._shru(i, 4)); 814 i = 252645135 & dart.notNull(i) + dart.notNull(JSInt._shru(i, 4));
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 }), 850 }),
481 statics: () => ({ 851 statics: () => ({
482 _bitCount: [core.int, [core.int]], 852 _bitCount: [core.int, [core.int]],
483 _shru: [core.int, [core.int, core.int]], 853 _shru: [core.int, [core.int, core.int]],
484 _shrs: [core.int, [core.int, core.int]], 854 _shrs: [core.int, [core.int, core.int]],
485 _ors: [core.int, [core.int, core.int]], 855 _ors: [core.int, [core.int, core.int]],
486 _spread: [core.int, [core.int]] 856 _spread: [core.int, [core.int]]
487 }), 857 }),
488 names: ['_bitCount', '_shru', '_shrs', '_ors', '_spread'] 858 names: ['_bitCount', '_shru', '_shrs', '_ors', '_spread']
489 }); 859 });
860 dart.registerExtension(dart.global.Number, JSInt);
490 class JSDouble extends JSNumber { 861 class JSDouble extends JSNumber {
491 JSDouble() { 862 JSDouble() {
492 super.JSNumber(); 863 super.JSNumber();
493 } 864 }
494 get runtimeType() { 865 get runtimeType() {
495 return core.double; 866 return core.double;
496 } 867 }
497 } 868 }
498 JSDouble[dart.implements] = () => [core.double]; 869 JSDouble[dart.implements] = () => [core.double];
499 dart.setSignature(JSDouble, { 870 dart.setSignature(JSDouble, {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 } 903 }
533 matchAsPrefix(string, start) { 904 matchAsPrefix(string, start) {
534 if (start === void 0) 905 if (start === void 0)
535 start = 0; 906 start = 0;
536 if (dart.notNull(start) < 0 || dart.notNull(start) > dart.notNull(string.l ength)) { 907 if (dart.notNull(start) < 0 || dart.notNull(start) > dart.notNull(string.l ength)) {
537 throw new core.RangeError.range(start, 0, string.length); 908 throw new core.RangeError.range(start, 0, string.length);
538 } 909 }
539 if (dart.notNull(start) + dart.notNull(this.length) > dart.notNull(string. length)) 910 if (dart.notNull(start) + dart.notNull(this.length) > dart.notNull(string. length))
540 return null; 911 return null;
541 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.notN ull(i) + 1) { 912 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.notN ull(i) + 1) {
542 if (string.codeUnitAt(dart.notNull(start) + dart.notNull(i)) != this.cod eUnitAt(i)) { 913 if (string[dartx.codeUnitAt](dart.notNull(start) + dart.notNull(i)) != t his[dartx.codeUnitAt](i)) {
543 return null; 914 return null;
544 } 915 }
545 } 916 }
546 return new _js_helper.StringMatch(start, string, this); 917 return new _js_helper.StringMatch(start, string, this);
547 } 918 }
548 ['+'](other) { 919 ['+'](other) {
549 if (!(typeof other == 'string')) 920 if (!(typeof other == 'string'))
550 throw new core.ArgumentError(other); 921 throw new core.ArgumentError(other);
551 return this + other; 922 return this + other;
552 } 923 }
553 endsWith(other) { 924 endsWith(other) {
554 _js_helper.checkString(other); 925 _js_helper.checkString(other);
555 let otherLength = other.length; 926 let otherLength = other.length;
556 if (dart.notNull(otherLength) > dart.notNull(this.length)) 927 if (dart.notNull(otherLength) > dart.notNull(this.length))
557 return false; 928 return false;
558 return other == this.substring(dart.notNull(this.length) - dart.notNull(ot herLength)); 929 return other == this[dartx.substring](dart.notNull(this.length) - dart.not Null(otherLength));
559 } 930 }
560 replaceAll(from, to) { 931 replaceAll(from, to) {
561 _js_helper.checkString(to); 932 _js_helper.checkString(to);
562 return dart.as(_js_helper.stringReplaceAllUnchecked(this, from, to), core. String); 933 return dart.as(_js_helper.stringReplaceAllUnchecked(this, from, to), core. String);
563 } 934 }
564 replaceAllMapped(from, convert) { 935 replaceAllMapped(from, convert) {
565 return this.splitMapJoin(from, {onMatch: convert}); 936 return this[dartx.splitMapJoin](from, {onMatch: convert});
566 } 937 }
567 splitMapJoin(from, opts) { 938 splitMapJoin(from, opts) {
568 let onMatch = opts && 'onMatch' in opts ? opts.onMatch : null; 939 let onMatch = opts && 'onMatch' in opts ? opts.onMatch : null;
569 let onNonMatch = opts && 'onNonMatch' in opts ? opts.onNonMatch : null; 940 let onNonMatch = opts && 'onNonMatch' in opts ? opts.onNonMatch : null;
570 return dart.as(_js_helper.stringReplaceAllFuncUnchecked(this, from, onMatc h, onNonMatch), core.String); 941 return dart.as(_js_helper.stringReplaceAllFuncUnchecked(this, from, onMatc h, onNonMatch), core.String);
571 } 942 }
572 replaceFirst(from, to, startIndex) { 943 replaceFirst(from, to, startIndex) {
573 if (startIndex === void 0) 944 if (startIndex === void 0)
574 startIndex = 0; 945 startIndex = 0;
575 _js_helper.checkString(to); 946 _js_helper.checkString(to);
576 _js_helper.checkInt(startIndex); 947 _js_helper.checkInt(startIndex);
577 if (dart.notNull(startIndex) < 0 || dart.notNull(startIndex) > dart.notNul l(this.length)) { 948 if (dart.notNull(startIndex) < 0 || dart.notNull(startIndex) > dart.notNul l(this.length)) {
578 throw new core.RangeError.range(startIndex, 0, this.length); 949 throw new core.RangeError.range(startIndex, 0, this.length);
579 } 950 }
580 return dart.as(_js_helper.stringReplaceFirstUnchecked(this, from, to, star tIndex), core.String); 951 return dart.as(_js_helper.stringReplaceFirstUnchecked(this, from, to, star tIndex), core.String);
581 } 952 }
582 split(pattern) { 953 split(pattern) {
583 _js_helper.checkNull(pattern); 954 _js_helper.checkNull(pattern);
584 if (typeof pattern == 'string') { 955 if (typeof pattern == 'string') {
585 return dart.as(this.split(pattern), core.List$(core.String)); 956 return dart.as(this.split(pattern), core.List$(core.String));
586 } else if (dart.is(pattern, _js_helper.JSSyntaxRegExp) && _js_helper.regEx pCaptureCount(pattern) == 0) { 957 } else if (dart.is(pattern, _js_helper.JSSyntaxRegExp) && _js_helper.regEx pCaptureCount(pattern) == 0) {
587 let re = _js_helper.regExpGetNative(pattern); 958 let re = _js_helper.regExpGetNative(pattern);
588 return dart.as(this.split(re), core.List$(core.String)); 959 return dart.as(this.split(re), core.List$(core.String));
589 } else { 960 } else {
590 return this[_defaultSplit](pattern); 961 return this[_defaultSplit](pattern);
591 } 962 }
592 } 963 }
593 [_defaultSplit](pattern) { 964 [_defaultSplit](pattern) {
594 let result = dart.setType([], core.List$(core.String)); 965 let result = dart.list([], core.String);
595 let start = 0; 966 let start = 0;
596 let length = 1; 967 let length = 1;
597 for (let match of pattern.allMatches(this)) { 968 for (let match of pattern[dartx.allMatches](this)) {
598 let matchStart = match.start; 969 let matchStart = match.start;
599 let matchEnd = match.end; 970 let matchEnd = match.end;
600 length = dart.notNull(matchEnd) - dart.notNull(matchStart); 971 length = dart.notNull(matchEnd) - dart.notNull(matchStart);
601 if (length == 0 && start == matchStart) { 972 if (length == 0 && start == matchStart) {
602 continue; 973 continue;
603 } 974 }
604 let end = matchStart; 975 let end = matchStart;
605 result[core.$add](this.substring(start, end)); 976 result[dartx.add](this[dartx.substring](start, end));
606 start = matchEnd; 977 start = matchEnd;
607 } 978 }
608 if (dart.notNull(start) < dart.notNull(this.length) || dart.notNull(length ) > 0) { 979 if (dart.notNull(start) < dart.notNull(this.length) || dart.notNull(length ) > 0) {
609 result[core.$add](this.substring(start)); 980 result[dartx.add](this[dartx.substring](start));
610 } 981 }
611 return result; 982 return result;
612 } 983 }
613 startsWith(pattern, index) { 984 startsWith(pattern, index) {
614 if (index === void 0) 985 if (index === void 0)
615 index = 0; 986 index = 0;
616 _js_helper.checkInt(index); 987 _js_helper.checkInt(index);
617 if (dart.notNull(index) < 0 || dart.notNull(index) > dart.notNull(this.len gth)) { 988 if (dart.notNull(index) < 0 || dart.notNull(index) > dart.notNull(this.len gth)) {
618 throw new core.RangeError.range(index, 0, this.length); 989 throw new core.RangeError.range(index, 0, this.length);
619 } 990 }
620 if (typeof pattern == 'string') { 991 if (typeof pattern == 'string') {
621 let other = pattern; 992 let other = pattern;
622 let otherLength = other.length; 993 let otherLength = other.length;
623 let endIndex = dart.notNull(index) + dart.notNull(otherLength); 994 let endIndex = dart.notNull(index) + dart.notNull(otherLength);
624 if (dart.notNull(endIndex) > dart.notNull(this.length)) 995 if (dart.notNull(endIndex) > dart.notNull(this.length))
625 return false; 996 return false;
626 return other == this.substring(index, endIndex); 997 return other == this.substring(index, endIndex);
627 } 998 }
628 return pattern.matchAsPrefix(this, index) != null; 999 return pattern[dartx.matchAsPrefix](this, index) != null;
629 } 1000 }
630 substring(startIndex, endIndex) { 1001 substring(startIndex, endIndex) {
631 if (endIndex === void 0) 1002 if (endIndex === void 0)
632 endIndex = null; 1003 endIndex = null;
633 _js_helper.checkInt(startIndex); 1004 _js_helper.checkInt(startIndex);
634 if (endIndex == null) 1005 if (endIndex == null)
635 endIndex = this.length; 1006 endIndex = this.length;
636 _js_helper.checkInt(endIndex); 1007 _js_helper.checkInt(endIndex);
637 if (dart.notNull(startIndex) < 0) 1008 if (dart.notNull(startIndex) < 0)
638 throw new core.RangeError.value(startIndex); 1009 throw new core.RangeError.value(startIndex);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 default: 1065 default:
695 { 1066 {
696 return false; 1067 return false;
697 } 1068 }
698 } 1069 }
699 } 1070 }
700 static _skipLeadingWhitespace(string, index) { 1071 static _skipLeadingWhitespace(string, index) {
701 let SPACE = 32; 1072 let SPACE = 32;
702 let CARRIAGE_RETURN = 13; 1073 let CARRIAGE_RETURN = 13;
703 while (dart.notNull(index) < dart.notNull(string.length)) { 1074 while (dart.notNull(index) < dart.notNull(string.length)) {
704 let codeUnit = string.codeUnitAt(index); 1075 let codeUnit = string[dartx.codeUnitAt](index);
705 if (codeUnit != SPACE && codeUnit != CARRIAGE_RETURN && !dart.notNull(JS String._isWhitespace(codeUnit))) { 1076 if (codeUnit != SPACE && codeUnit != CARRIAGE_RETURN && !dart.notNull(JS String._isWhitespace(codeUnit))) {
706 break; 1077 break;
707 } 1078 }
708 index = dart.notNull(index) + 1; 1079 index = dart.notNull(index) + 1;
709 } 1080 }
710 return index; 1081 return index;
711 } 1082 }
712 static _skipTrailingWhitespace(string, index) { 1083 static _skipTrailingWhitespace(string, index) {
713 let SPACE = 32; 1084 let SPACE = 32;
714 let CARRIAGE_RETURN = 13; 1085 let CARRIAGE_RETURN = 13;
715 while (dart.notNull(index) > 0) { 1086 while (dart.notNull(index) > 0) {
716 let codeUnit = string.codeUnitAt(dart.notNull(index) - 1); 1087 let codeUnit = string[dartx.codeUnitAt](dart.notNull(index) - 1);
717 if (codeUnit != SPACE && codeUnit != CARRIAGE_RETURN && !dart.notNull(JS String._isWhitespace(codeUnit))) { 1088 if (codeUnit != SPACE && codeUnit != CARRIAGE_RETURN && !dart.notNull(JS String._isWhitespace(codeUnit))) {
718 break; 1089 break;
719 } 1090 }
720 index = dart.notNull(index) - 1; 1091 index = dart.notNull(index) - 1;
721 } 1092 }
722 return index; 1093 return index;
723 } 1094 }
724 trim() { 1095 trim() {
725 let NEL = 133; 1096 let NEL = 133;
726 let result = this.trim(); 1097 let result = this.trim();
727 if (result.length == 0) 1098 if (result.length == 0)
728 return result; 1099 return result;
729 let firstCode = result.codeUnitAt(0); 1100 let firstCode = result[dartx.codeUnitAt](0);
730 let startIndex = 0; 1101 let startIndex = 0;
731 if (firstCode == NEL) { 1102 if (firstCode == NEL) {
732 startIndex = JSString._skipLeadingWhitespace(result, 1); 1103 startIndex = JSString._skipLeadingWhitespace(result, 1);
733 if (startIndex == result.length) 1104 if (startIndex == result.length)
734 return ""; 1105 return "";
735 } 1106 }
736 let endIndex = result.length; 1107 let endIndex = result.length;
737 let lastCode = result.codeUnitAt(dart.notNull(endIndex) - 1); 1108 let lastCode = result[dartx.codeUnitAt](dart.notNull(endIndex) - 1);
738 if (lastCode == NEL) { 1109 if (lastCode == NEL) {
739 endIndex = JSString._skipTrailingWhitespace(result, dart.notNull(endInde x) - 1); 1110 endIndex = JSString._skipTrailingWhitespace(result, dart.notNull(endInde x) - 1);
740 } 1111 }
741 if (startIndex == 0 && endIndex == result.length) 1112 if (startIndex == 0 && endIndex == result.length)
742 return result; 1113 return result;
743 return result.substring(startIndex, endIndex); 1114 return result.substring(startIndex, endIndex);
744 } 1115 }
745 trimLeft() { 1116 trimLeft() {
746 let NEL = 133; 1117 let NEL = 133;
747 let result = null; 1118 let result = null;
748 let startIndex = 0; 1119 let startIndex = 0;
749 if (typeof this.trimLeft != "undefined") { 1120 if (typeof this.trimLeft != "undefined") {
750 result = this.trimLeft(); 1121 result = this.trimLeft();
751 if (result.length == 0) 1122 if (result.length == 0)
752 return result; 1123 return result;
753 let firstCode = result.codeUnitAt(0); 1124 let firstCode = result[dartx.codeUnitAt](0);
754 if (firstCode == NEL) { 1125 if (firstCode == NEL) {
755 startIndex = JSString._skipLeadingWhitespace(result, 1); 1126 startIndex = JSString._skipLeadingWhitespace(result, 1);
756 } 1127 }
757 } else { 1128 } else {
758 result = this; 1129 result = this;
759 startIndex = JSString._skipLeadingWhitespace(this, 0); 1130 startIndex = JSString._skipLeadingWhitespace(this, 0);
760 } 1131 }
761 if (startIndex == 0) 1132 if (startIndex == 0)
762 return result; 1133 return result;
763 if (startIndex == result.length) 1134 if (startIndex == result.length)
764 return ""; 1135 return "";
765 return result.substring(startIndex); 1136 return result.substring(startIndex);
766 } 1137 }
767 trimRight() { 1138 trimRight() {
768 let NEL = 133; 1139 let NEL = 133;
769 let result = null; 1140 let result = null;
770 let endIndex = null; 1141 let endIndex = null;
771 if (typeof this.trimRight != "undefined") { 1142 if (typeof this.trimRight != "undefined") {
772 result = this.trimRight(); 1143 result = this.trimRight();
773 endIndex = result.length; 1144 endIndex = result.length;
774 if (endIndex == 0) 1145 if (endIndex == 0)
775 return result; 1146 return result;
776 let lastCode = result.codeUnitAt(dart.notNull(endIndex) - 1); 1147 let lastCode = result[dartx.codeUnitAt](dart.notNull(endIndex) - 1);
777 if (lastCode == NEL) { 1148 if (lastCode == NEL) {
778 endIndex = JSString._skipTrailingWhitespace(result, dart.notNull(endIn dex) - 1); 1149 endIndex = JSString._skipTrailingWhitespace(result, dart.notNull(endIn dex) - 1);
779 } 1150 }
780 } else { 1151 } else {
781 result = this; 1152 result = this;
782 endIndex = JSString._skipTrailingWhitespace(this, this.length); 1153 endIndex = JSString._skipTrailingWhitespace(this, this.length);
783 } 1154 }
784 if (endIndex == result.length) 1155 if (endIndex == result.length)
785 return result; 1156 return result;
786 if (endIndex == 0) 1157 if (endIndex == 0)
787 return ""; 1158 return "";
788 return result.substring(0, endIndex); 1159 return result.substring(0, endIndex);
789 } 1160 }
790 ['*'](times) { 1161 ['*'](times) {
791 if (0 >= dart.notNull(times)) 1162 if (0 >= dart.notNull(times))
792 return ''; 1163 return '';
793 if (times == 1 || this.length == 0) 1164 if (times == 1 || this.length == 0)
794 return this; 1165 return this;
795 if (!dart.equals(times, times >>> 0)) { 1166 if (!dart.equals(times, times >>> 0)) {
796 throw dart.const(new core.OutOfMemoryError()); 1167 throw dart.const(new core.OutOfMemoryError());
797 } 1168 }
798 let result = ''; 1169 let result = '';
799 let s = this; 1170 let s = this;
800 while (true) { 1171 while (true) {
801 if ((dart.notNull(times) & 1) == 1) 1172 if ((dart.notNull(times) & 1) == 1)
802 result = s['+'](result); 1173 result = s[dartx['+']](result);
803 times = dart.as(times >>> 1, core.int); 1174 times = dart.as(times >>> 1, core.int);
804 if (times == 0) 1175 if (times == 0)
805 break; 1176 break;
806 s = s['+'](s); 1177 s = s[dartx['+']](s);
807 } 1178 }
808 return result; 1179 return result;
809 } 1180 }
810 padLeft(width, padding) { 1181 padLeft(width, padding) {
811 if (padding === void 0) 1182 if (padding === void 0)
812 padding = ' '; 1183 padding = ' ';
813 let delta = dart.notNull(width) - dart.notNull(this.length); 1184 let delta = dart.notNull(width) - dart.notNull(this.length);
814 if (dart.notNull(delta) <= 0) 1185 if (dart.notNull(delta) <= 0)
815 return this; 1186 return this;
816 return padding['*'](delta) + this; 1187 return padding[dartx['*']](delta) + this;
817 } 1188 }
818 padRight(width, padding) { 1189 padRight(width, padding) {
819 if (padding === void 0) 1190 if (padding === void 0)
820 padding = ' '; 1191 padding = ' ';
821 let delta = dart.notNull(width) - dart.notNull(this.length); 1192 let delta = dart.notNull(width) - dart.notNull(this.length);
822 if (dart.notNull(delta) <= 0) 1193 if (dart.notNull(delta) <= 0)
823 return this; 1194 return this;
824 return this['+'](padding['*'](delta)); 1195 return this[dartx['+']](padding[dartx['*']](delta));
825 } 1196 }
826 get codeUnits() { 1197 get codeUnits() {
827 return new _CodeUnits(this); 1198 return new _CodeUnits(this);
828 } 1199 }
829 get runes() { 1200 get runes() {
830 return new core.Runes(this); 1201 return new core.Runes(this);
831 } 1202 }
832 indexOf(pattern, start) { 1203 indexOf(pattern, start) {
833 if (start === void 0) 1204 if (start === void 0)
834 start = 0; 1205 start = 0;
835 _js_helper.checkNull(pattern); 1206 _js_helper.checkNull(pattern);
836 if (!(typeof start == 'number')) 1207 if (!(typeof start == 'number'))
837 throw new core.ArgumentError(start); 1208 throw new core.ArgumentError(start);
838 if (dart.notNull(start) < 0 || dart.notNull(start) > dart.notNull(this.len gth)) { 1209 if (dart.notNull(start) < 0 || dart.notNull(start) > dart.notNull(this.len gth)) {
839 throw new core.RangeError.range(start, 0, this.length); 1210 throw new core.RangeError.range(start, 0, this.length);
840 } 1211 }
841 if (typeof pattern == 'string') { 1212 if (typeof pattern == 'string') {
842 return this.indexOf(pattern, start); 1213 return this.indexOf(pattern, start);
843 } 1214 }
844 if (dart.is(pattern, _js_helper.JSSyntaxRegExp)) { 1215 if (dart.is(pattern, _js_helper.JSSyntaxRegExp)) {
845 let re = pattern; 1216 let re = pattern;
846 let match = _js_helper.firstMatchAfter(re, this, start); 1217 let match = _js_helper.firstMatchAfter(re, this, start);
847 return match == null ? -1 : match.start; 1218 return match == null ? -1 : match.start;
848 } 1219 }
849 for (let i = start; dart.notNull(i) <= dart.notNull(this.length); i = dart .notNull(i) + 1) { 1220 for (let i = start; dart.notNull(i) <= dart.notNull(this.length); i = dart .notNull(i) + 1) {
850 if (pattern.matchAsPrefix(this, i) != null) 1221 if (pattern[dartx.matchAsPrefix](this, i) != null)
851 return i; 1222 return i;
852 } 1223 }
853 return -1; 1224 return -1;
854 } 1225 }
855 lastIndexOf(pattern, start) { 1226 lastIndexOf(pattern, start) {
856 if (start === void 0) 1227 if (start === void 0)
857 start = null; 1228 start = null;
858 _js_helper.checkNull(pattern); 1229 _js_helper.checkNull(pattern);
859 if (start == null) { 1230 if (start == null) {
860 start = this.length; 1231 start = this.length;
861 } else if (!(typeof start == 'number')) { 1232 } else if (!(typeof start == 'number')) {
862 throw new core.ArgumentError(start); 1233 throw new core.ArgumentError(start);
863 } else if (dart.notNull(start) < 0 || dart.notNull(start) > dart.notNull(t his.length)) { 1234 } else if (dart.notNull(start) < 0 || dart.notNull(start) > dart.notNull(t his.length)) {
864 throw new core.RangeError.range(start, 0, this.length); 1235 throw new core.RangeError.range(start, 0, this.length);
865 } 1236 }
866 if (typeof pattern == 'string') { 1237 if (typeof pattern == 'string') {
867 let other = pattern; 1238 let other = pattern;
868 if (dart.notNull(start) + dart.notNull(other.length) > dart.notNull(this .length)) { 1239 if (dart.notNull(start) + dart.notNull(other.length) > dart.notNull(this .length)) {
869 start = dart.notNull(this.length) - dart.notNull(other.length); 1240 start = dart.notNull(this.length) - dart.notNull(other.length);
870 } 1241 }
871 return dart.as(_js_helper.stringLastIndexOfUnchecked(this, other, start) , core.int); 1242 return dart.as(_js_helper.stringLastIndexOfUnchecked(this, other, start) , core.int);
872 } 1243 }
873 for (let i = start; dart.notNull(i) >= 0; i = dart.notNull(i) - 1) { 1244 for (let i = start; dart.notNull(i) >= 0; i = dart.notNull(i) - 1) {
874 if (pattern.matchAsPrefix(this, i) != null) 1245 if (pattern[dartx.matchAsPrefix](this, i) != null)
875 return i; 1246 return i;
876 } 1247 }
877 return -1; 1248 return -1;
878 } 1249 }
879 contains(other, startIndex) { 1250 contains(other, startIndex) {
880 if (startIndex === void 0) 1251 if (startIndex === void 0)
881 startIndex = 0; 1252 startIndex = 0;
882 _js_helper.checkNull(other); 1253 _js_helper.checkNull(other);
883 if (dart.notNull(startIndex) < 0 || dart.notNull(startIndex) > dart.notNul l(this.length)) { 1254 if (dart.notNull(startIndex) < 0 || dart.notNull(startIndex) > dart.notNul l(this.length)) {
884 throw new core.RangeError.range(startIndex, 0, this.length); 1255 throw new core.RangeError.range(startIndex, 0, this.length);
885 } 1256 }
886 return dart.as(_js_helper.stringContainsUnchecked(this, other, startIndex) , core.bool); 1257 return dart.as(_js_helper.stringContainsUnchecked(this, other, startIndex) , core.bool);
887 } 1258 }
888 get isEmpty() { 1259 get isEmpty() {
889 return this.length == 0; 1260 return this.length == 0;
890 } 1261 }
891 get isNotEmpty() { 1262 get isNotEmpty() {
892 return !dart.notNull(this.isEmpty); 1263 return !dart.notNull(this[dartx.isEmpty]);
893 } 1264 }
894 compareTo(other) { 1265 compareTo(other) {
895 if (!(typeof other == 'string')) 1266 if (!(typeof other == 'string'))
896 throw new core.ArgumentError(other); 1267 throw new core.ArgumentError(other);
897 return dart.equals(this, other) ? 0 : this < other ? -1 : 1; 1268 return dart.equals(this, other) ? 0 : this < other ? -1 : 1;
898 } 1269 }
899 toString() { 1270 toString() {
900 return this; 1271 return this;
901 } 1272 }
902 get hashCode() { 1273 get hashCode() {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
955 compareTo: [core.int, [core.String]], 1326 compareTo: [core.int, [core.String]],
956 get: [core.String, [core.int]] 1327 get: [core.String, [core.int]]
957 }), 1328 }),
958 statics: () => ({ 1329 statics: () => ({
959 _isWhitespace: [core.bool, [core.int]], 1330 _isWhitespace: [core.bool, [core.int]],
960 _skipLeadingWhitespace: [core.int, [core.String, core.int]], 1331 _skipLeadingWhitespace: [core.int, [core.String, core.int]],
961 _skipTrailingWhitespace: [core.int, [core.String, core.int]] 1332 _skipTrailingWhitespace: [core.int, [core.String, core.int]]
962 }), 1333 }),
963 names: ['_isWhitespace', '_skipLeadingWhitespace', '_skipTrailingWhitespace' ] 1334 names: ['_isWhitespace', '_skipLeadingWhitespace', '_skipTrailingWhitespace' ]
964 }); 1335 });
1336 dart.registerExtension(dart.global.String, JSString);
965 let _string = Symbol('_string'); 1337 let _string = Symbol('_string');
966 class _CodeUnits extends _internal.UnmodifiableListBase$(core.int) { 1338 class _CodeUnits extends _internal.UnmodifiableListBase$(core.int) {
967 _CodeUnits(string) { 1339 _CodeUnits(string) {
968 this[_string] = string; 1340 this[_string] = string;
969 } 1341 }
970 get [core.$length]() { 1342 get length() {
971 return this[_string].length; 1343 return this[_string].length;
972 } 1344 }
973 [core.$get](i) { 1345 get(i) {
974 return this[_string].codeUnitAt(i); 1346 return this[_string][dartx.codeUnitAt](i);
975 } 1347 }
976 } 1348 }
977 dart.setSignature(_CodeUnits, { 1349 dart.setSignature(_CodeUnits, {
978 constructors: () => ({_CodeUnits: [_CodeUnits, [core.String]]}), 1350 constructors: () => ({_CodeUnits: [_CodeUnits, [core.String]]}),
979 methods: () => ({[core.$get]: [core.int, [core.int]]}) 1351 methods: () => ({get: [core.int, [core.int]]})
980 }); 1352 });
981 function _symbolToString(symbol) { 1353 function getInterceptor(obj) {
982 return _internal.Symbol.getName(dart.as(symbol, _internal.Symbol)); 1354 return obj;
983 }
984 dart.fn(_symbolToString, core.String, [core.Symbol]);
985 function _symbolMapToStringMap(map) {
986 if (map == null)
987 return null;
988 let result = core.Map$(core.String, core.Object).new();
989 map.forEach(dart.fn((key, value) => {
990 result.set(_symbolToString(key), value);
991 }, core.Object, [core.Symbol, core.Object]));
992 return result;
993 }
994 dart.fn(_symbolMapToStringMap, core.Object, [core.Map$(core.Symbol, core.Objec t)]);
995 function getInterceptor(object) {
996 return void 0;
997 } 1355 }
998 dart.fn(getInterceptor); 1356 dart.fn(getInterceptor);
999 function getDispatchProperty(object) {
1000 return object[_foreign_helper.JS_EMBEDDED_GLOBAL('String', _js_embedded_name s.DISPATCH_PROPERTY_NAME)];
1001 }
1002 dart.fn(getDispatchProperty);
1003 function setDispatchProperty(object, value) {
1004 _js_helper.defineProperty(object, dart.as(_foreign_helper.JS_EMBEDDED_GLOBAL ('String', _js_embedded_names.DISPATCH_PROPERTY_NAME), core.String), value);
1005 }
1006 dart.fn(setDispatchProperty);
1007 function makeDispatchRecord(interceptor, proto, extension, indexability) {
1008 return {i: interceptor, p: proto, e: extension, x: indexability};
1009 }
1010 dart.fn(makeDispatchRecord);
1011 function dispatchRecordInterceptor(record) {
1012 return record.i;
1013 }
1014 dart.fn(dispatchRecordInterceptor);
1015 function dispatchRecordProto(record) {
1016 return record.p;
1017 }
1018 dart.fn(dispatchRecordProto);
1019 function dispatchRecordExtension(record) {
1020 return record.e;
1021 }
1022 dart.fn(dispatchRecordExtension);
1023 function dispatchRecordIndexability(record) {
1024 return record.x;
1025 }
1026 dart.fn(dispatchRecordIndexability);
1027 function getNativeInterceptor(object) {
1028 let record = getDispatchProperty(object);
1029 if (record == null) {
1030 if (_js_helper.initNativeDispatchFlag == null) {
1031 _js_helper.initNativeDispatch();
1032 record = getDispatchProperty(object);
1033 }
1034 }
1035 if (record != null) {
1036 let proto = dispatchRecordProto(record);
1037 if (dart.equals(false, proto))
1038 return dispatchRecordInterceptor(record);
1039 if (dart.equals(true, proto))
1040 return object;
1041 let objectProto = Object.getPrototypeOf(object);
1042 if (proto === objectProto) {
1043 return dispatchRecordInterceptor(record);
1044 }
1045 let extension = dispatchRecordExtension(record);
1046 if (extension === objectProto) {
1047 let discriminatedTag = proto(object, record);
1048 throw new core.UnimplementedError(`Return interceptor for ${discriminate dTag}`);
1049 }
1050 }
1051 let interceptor = _js_helper.lookupAndCacheInterceptor(object);
1052 if (interceptor == null) {
1053 let proto = Object.getPrototypeOf(object);
1054 if (proto == null || proto === Object.prototype) {
1055 return _foreign_helper.JS_INTERCEPTOR_CONSTANT(PlainJavaScriptObject);
1056 } else {
1057 return _foreign_helper.JS_INTERCEPTOR_CONSTANT(UnknownJavaScriptObject);
1058 }
1059 }
1060 return interceptor;
1061 }
1062 dart.fn(getNativeInterceptor);
1063 dart.copyProperties(exports, {
1064 get mapTypeToInterceptor() {
1065 return _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_names.MAP_TYPE_ TO_INTERCEPTOR);
1066 }
1067 });
1068 function findIndexForNativeSubclassType(type) {
1069 if (exports.mapTypeToInterceptor == null)
1070 return null;
1071 let map = dart.as(exports.mapTypeToInterceptor, core.List);
1072 for (let i = 0; dart.notNull(i) + 1 < dart.notNull(map[core.$length]); i = d art.notNull(i) + 3) {
1073 if (dart.equals(type, map[core.$get](i))) {
1074 return i;
1075 }
1076 }
1077 return null;
1078 }
1079 dart.fn(findIndexForNativeSubclassType, core.int, [core.Type]);
1080 function findInterceptorConstructorForType(type) {
1081 let index = findIndexForNativeSubclassType(type);
1082 if (index == null)
1083 return null;
1084 let map = dart.as(exports.mapTypeToInterceptor, core.List);
1085 return map[core.$get](dart.notNull(index) + 1);
1086 }
1087 dart.fn(findInterceptorConstructorForType, core.Object, [core.Type]);
1088 function findConstructorForNativeSubclassType(type, name) {
1089 let index = findIndexForNativeSubclassType(type);
1090 if (index == null)
1091 return null;
1092 let map = dart.as(exports.mapTypeToInterceptor, core.List);
1093 let constructorMap = map[core.$get](dart.notNull(index) + 2);
1094 let constructorFn = constructorMap[name];
1095 return constructorFn;
1096 }
1097 dart.fn(findConstructorForNativeSubclassType, core.Object, [core.Type, core.St ring]);
1098 function findInterceptorForType(type) {
1099 let constructor = findInterceptorConstructorForType(type);
1100 if (constructor == null)
1101 return null;
1102 return constructor.prototype;
1103 }
1104 dart.fn(findInterceptorForType, core.Object, [core.Type]);
1105 class JSBool extends Interceptor { 1357 class JSBool extends Interceptor {
1106 JSBool() { 1358 JSBool() {
1107 super.Interceptor(); 1359 super.Interceptor();
1108 } 1360 }
1109 toString() { 1361 toString() {
1110 return String(this); 1362 return String(this);
1111 } 1363 }
1112 get hashCode() { 1364 get hashCode() {
1113 return this ? 2 * 3 * 23 * 3761 : 269 * 811; 1365 return this ? 2 * 3 * 23 * 3761 : 269 * 811;
1114 } 1366 }
1115 get runtimeType() { 1367 get runtimeType() {
1116 return core.bool; 1368 return core.bool;
1117 } 1369 }
1118 } 1370 }
1119 JSBool[dart.implements] = () => [core.bool]; 1371 JSBool[dart.implements] = () => [core.bool];
1120 dart.setSignature(JSBool, { 1372 dart.setSignature(JSBool, {
1121 constructors: () => ({JSBool: [JSBool, []]}) 1373 constructors: () => ({JSBool: [JSBool, []]})
1122 }); 1374 });
1123 class JSNull extends Interceptor { 1375 dart.registerExtension(dart.global.Boolean, JSBool);
1124 JSNull() {
1125 super.Interceptor();
1126 }
1127 ['=='](other) {
1128 return core.identical(null, other);
1129 }
1130 toString() {
1131 return 'null';
1132 }
1133 get hashCode() {
1134 return 0;
1135 }
1136 get runtimeType() {
1137 return core.Null;
1138 }
1139 noSuchMethod(invocation) {
1140 return super.noSuchMethod(invocation);
1141 }
1142 }
1143 JSNull[dart.implements] = () => [core.Null];
1144 dart.setSignature(JSNull, {
1145 constructors: () => ({JSNull: [JSNull, []]}),
1146 methods: () => ({'==': [core.bool, [core.Object]]})
1147 });
1148 class JSIndexable extends core.Object {} 1376 class JSIndexable extends core.Object {}
1149 class JSMutableIndexable extends JSIndexable {} 1377 class JSMutableIndexable extends JSIndexable {}
1150 class JSObject extends core.Object {} 1378 class JSObject extends core.Object {}
1151 class JavaScriptObject extends Interceptor { 1379 class JavaScriptObject extends Interceptor {
1152 JavaScriptObject() { 1380 JavaScriptObject() {
1153 super.Interceptor(); 1381 super.Interceptor();
1154 } 1382 }
1155 get hashCode() { 1383 get hashCode() {
1156 return 0; 1384 return 0;
1157 } 1385 }
(...skipping 18 matching lines...) Expand all
1176 super.JavaScriptObject(); 1404 super.JavaScriptObject();
1177 } 1405 }
1178 toString() { 1406 toString() {
1179 return String(this); 1407 return String(this);
1180 } 1408 }
1181 } 1409 }
1182 dart.setSignature(UnknownJavaScriptObject, { 1410 dart.setSignature(UnknownJavaScriptObject, {
1183 constructors: () => ({UnknownJavaScriptObject: [UnknownJavaScriptObject, []] }) 1411 constructors: () => ({UnknownJavaScriptObject: [UnknownJavaScriptObject, []] })
1184 }); 1412 });
1185 // Exports: 1413 // Exports:
1414 exports.JSArray$ = JSArray$;
1186 exports.JSArray = JSArray; 1415 exports.JSArray = JSArray;
1187 exports.JSMutableArray$ = JSMutableArray$; 1416 exports.JSMutableArray$ = JSMutableArray$;
1188 exports.JSMutableArray = JSMutableArray; 1417 exports.JSMutableArray = JSMutableArray;
1189 exports.JSFixedArray$ = JSFixedArray$; 1418 exports.JSFixedArray$ = JSFixedArray$;
1190 exports.JSFixedArray = JSFixedArray; 1419 exports.JSFixedArray = JSFixedArray;
1191 exports.JSExtendableArray$ = JSExtendableArray$; 1420 exports.JSExtendableArray$ = JSExtendableArray$;
1192 exports.JSExtendableArray = JSExtendableArray; 1421 exports.JSExtendableArray = JSExtendableArray;
1193 exports.Interceptor = Interceptor; 1422 exports.Interceptor = Interceptor;
1194 exports.JSNumber = JSNumber; 1423 exports.JSNumber = JSNumber;
1195 exports.JSInt = JSInt; 1424 exports.JSInt = JSInt;
1196 exports.JSDouble = JSDouble; 1425 exports.JSDouble = JSDouble;
1197 exports.JSPositiveInt = JSPositiveInt; 1426 exports.JSPositiveInt = JSPositiveInt;
1198 exports.JSUInt32 = JSUInt32; 1427 exports.JSUInt32 = JSUInt32;
1199 exports.JSUInt31 = JSUInt31; 1428 exports.JSUInt31 = JSUInt31;
1200 exports.JSString = JSString; 1429 exports.JSString = JSString;
1201 exports.getInterceptor = getInterceptor; 1430 exports.getInterceptor = getInterceptor;
1202 exports.getDispatchProperty = getDispatchProperty;
1203 exports.setDispatchProperty = setDispatchProperty;
1204 exports.makeDispatchRecord = makeDispatchRecord;
1205 exports.dispatchRecordInterceptor = dispatchRecordInterceptor;
1206 exports.dispatchRecordProto = dispatchRecordProto;
1207 exports.dispatchRecordExtension = dispatchRecordExtension;
1208 exports.dispatchRecordIndexability = dispatchRecordIndexability;
1209 exports.getNativeInterceptor = getNativeInterceptor;
1210 exports.findIndexForNativeSubclassType = findIndexForNativeSubclassType;
1211 exports.findInterceptorConstructorForType = findInterceptorConstructorForType;
1212 exports.findConstructorForNativeSubclassType = findConstructorForNativeSubclas sType;
1213 exports.findInterceptorForType = findInterceptorForType;
1214 exports.JSBool = JSBool; 1431 exports.JSBool = JSBool;
1215 exports.JSNull = JSNull;
1216 exports.JSIndexable = JSIndexable; 1432 exports.JSIndexable = JSIndexable;
1217 exports.JSMutableIndexable = JSMutableIndexable; 1433 exports.JSMutableIndexable = JSMutableIndexable;
1218 exports.JSObject = JSObject; 1434 exports.JSObject = JSObject;
1219 exports.JavaScriptObject = JavaScriptObject; 1435 exports.JavaScriptObject = JavaScriptObject;
1220 exports.PlainJavaScriptObject = PlainJavaScriptObject; 1436 exports.PlainJavaScriptObject = PlainJavaScriptObject;
1221 exports.UnknownJavaScriptObject = UnknownJavaScriptObject; 1437 exports.UnknownJavaScriptObject = UnknownJavaScriptObject;
1222 })(_interceptors, core, _js_helper, _internal, _foreign_helper, _js_embedded_nam es); 1438 })(_interceptors, core, _internal, _js_helper, collection, math);
OLDNEW
« no previous file with comments | « no previous file | lib/runtime/dart/_internal.js » ('j') | lib/runtime/dart_runtime.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698