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

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

Issue 1138793002: Tag closures with their types (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Rebase Created 5 years, 7 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
OLDNEW
1 var core = dart.defineLibrary(core, {}); 1 var core = dart.defineLibrary(core, {});
2 var _js_helper = dart.lazyImport(_js_helper); 2 var _js_helper = dart.lazyImport(_js_helper);
3 var _internal = dart.lazyImport(_internal); 3 var _internal = dart.lazyImport(_internal);
4 var collection = dart.lazyImport(collection); 4 var collection = dart.lazyImport(collection);
5 var _interceptors = dart.lazyImport(_interceptors); 5 var _interceptors = dart.lazyImport(_interceptors);
6 var math = dart.lazyImport(math);
6 var convert = dart.lazyImport(convert); 7 var convert = dart.lazyImport(convert);
7 (function(exports, _js_helper, _internal, collection, _interceptors, convert) { 8 (function(exports, _js_helper, _internal, collection, _interceptors, math, conve rt) {
8 'use strict'; 9 'use strict';
9 class Object { 10 class Object {
10 constructor() { 11 constructor() {
11 let name = this.constructor.name; 12 let name = this.constructor.name;
12 let init = this[name]; 13 let init = this[name];
13 let result = void 0; 14 let result = void 0;
14 if (init) 15 if (init)
15 result = init.apply(this, arguments); 16 result = init.apply(this, arguments);
16 return result === void 0 ? this : result; 17 return result === void 0 ? this : result;
17 } 18 }
18 ['=='](other) { 19 ['=='](other) {
19 return identical(this, other); 20 return identical(this, other);
20 } 21 }
21 get hashCode() { 22 get hashCode() {
22 return _js_helper.Primitives.objectHashCode(this); 23 return _js_helper.Primitives.objectHashCode(this);
23 } 24 }
24 toString() { 25 toString() {
25 return _js_helper.Primitives.objectToString(this); 26 return _js_helper.Primitives.objectToString(this);
26 } 27 }
27 noSuchMethod(invocation) { 28 noSuchMethod(invocation) {
28 throw new NoSuchMethodError(this, invocation.memberName, invocation.positi onalArguments, invocation.namedArguments); 29 throw new NoSuchMethodError(this, invocation.memberName, invocation.positi onalArguments, invocation.namedArguments);
29 } 30 }
30 get runtimeType() { 31 get runtimeType() {
31 return dart.realRuntimeType(this); 32 return dart.realRuntimeType(this);
32 } 33 }
33 } 34 }
35 dart.setSignature(Object, {
36 methods: () => ({
Jennifer Messerly 2015/05/18 17:52:52 could this level be removed? e.g. dart.setSignat
Leaf 2015/05/19 00:02:20 Certainly in the case that there are no statics, I
37 '==': dart.functionType(bool, [dart.dynamic]),
Jennifer Messerly 2015/05/18 17:52:52 could we compute the function type later? the `dar
Leaf 2015/05/19 00:02:20 Something like this sounds like a good idea, might
38 toString: dart.functionType(String, []),
39 noSuchMethod: dart.functionType(dart.dynamic, [Invocation])
40 })
41 });
34 class JsName extends Object { 42 class JsName extends Object {
35 JsName(opts) { 43 JsName(opts) {
36 let name = opts && 'name' in opts ? opts.name : null; 44 let name = opts && 'name' in opts ? opts.name : null;
37 this.name = name; 45 this.name = name;
38 } 46 }
39 } 47 }
48 dart.setSignature(JsName, {});
40 class JsPeerInterface extends Object { 49 class JsPeerInterface extends Object {
41 JsPeerInterface(opts) { 50 JsPeerInterface(opts) {
42 let name = opts && 'name' in opts ? opts.name : null; 51 let name = opts && 'name' in opts ? opts.name : null;
43 this.name = name; 52 this.name = name;
44 } 53 }
45 } 54 }
55 dart.setSignature(JsPeerInterface, {});
46 class SupportJsExtensionMethod extends Object { 56 class SupportJsExtensionMethod extends Object {
47 SupportJsExtensionMethod() { 57 SupportJsExtensionMethod() {
48 } 58 }
49 } 59 }
60 dart.setSignature(SupportJsExtensionMethod, {});
50 class Deprecated extends Object { 61 class Deprecated extends Object {
51 Deprecated(expires) { 62 Deprecated(expires) {
52 this.expires = expires; 63 this.expires = expires;
53 } 64 }
54 toString() { 65 toString() {
55 return `Deprecated feature. Will be removed ${this.expires}`; 66 return `Deprecated feature. Will be removed ${this.expires}`;
56 } 67 }
57 } 68 }
69 dart.setSignature(Deprecated, {
70 methods: () => ({toString: dart.functionType(String, [])})
71 });
58 class _Override extends Object { 72 class _Override extends Object {
59 _Override() { 73 _Override() {
60 } 74 }
61 } 75 }
76 dart.setSignature(_Override, {});
62 let deprecated = dart.const(new Deprecated("next release")); 77 let deprecated = dart.const(new Deprecated("next release"));
63 let override = dart.const(new _Override()); 78 let override = dart.const(new _Override());
64 class _Proxy extends Object { 79 class _Proxy extends Object {
65 _Proxy() { 80 _Proxy() {
66 } 81 }
67 } 82 }
83 dart.setSignature(_Proxy, {});
68 let proxy = dart.const(new _Proxy()); 84 let proxy = dart.const(new _Proxy());
69 class bool extends Object { 85 class bool extends Object {
70 fromEnvironment(name, opts) { 86 fromEnvironment(name, opts) {
71 let defaultValue = opts && 'defaultValue' in opts ? opts.defaultValue : fa lse; 87 let defaultValue = opts && 'defaultValue' in opts ? opts.defaultValue : fa lse;
72 throw new UnsupportedError('bool.fromEnvironment can only be used as a con st constructor'); 88 throw new UnsupportedError('bool.fromEnvironment can only be used as a con st constructor');
73 } 89 }
74 toString() { 90 toString() {
75 return this ? "true" : "false"; 91 return this ? "true" : "false";
76 } 92 }
77 } 93 }
78 dart.defineNamedConstructor(bool, 'fromEnvironment'); 94 dart.defineNamedConstructor(bool, 'fromEnvironment');
95 dart.setSignature(bool, {
96 methods: () => ({toString: dart.functionType(String, [])})
97 });
79 let Comparator$ = dart.generic(function(T) { 98 let Comparator$ = dart.generic(function(T) {
80 let Comparator = dart.typedef('Comparator', () => dart.functionType(int, [T, T])); 99 let Comparator = dart.typedef('Comparator', () => dart.functionType(int, [T, T]));
81 return Comparator; 100 return Comparator;
82 }); 101 });
83 let Comparator = Comparator$(); 102 let Comparator = Comparator$();
84 let Comparable$ = dart.generic(function(T) { 103 let Comparable$ = dart.generic(function(T) {
85 class Comparable extends Object { 104 class Comparable extends Object {
86 static compare(a, b) { 105 static compare(a, b) {
87 return a.compareTo(b); 106 return a.compareTo(b);
88 } 107 }
89 } 108 }
109 dart.setSignature(Comparable, {
110 statics: () => ({compare: dart.functionType(int, [Comparable$(), Comparabl e$()])}),
Jennifer Messerly 2015/05/18 17:52:52 do statics need to be separate from methods? for b
Leaf 2015/05/19 00:02:20 They don't need to be. I didn't really like mixin
Jennifer Messerly 2015/05/19 16:34:39 yeah, not a huge deal to me, just prefer less nest
111 names: ['compare']
Jennifer Messerly 2015/05/18 17:52:52 what does this do?
Leaf 2015/05/19 00:02:20 The types in general need to be evaluated lazily.
Jennifer Messerly 2015/05/19 16:32:49 Yeah, lots of possibilities to fix. Hard to choose
112 });
90 return Comparable; 113 return Comparable;
91 }); 114 });
92 let Comparable = Comparable$(); 115 let Comparable = Comparable$();
93 class DateTime extends Object { 116 class DateTime extends Object {
94 DateTime(year, month, day, hour, minute, second, millisecond) { 117 DateTime(year, month, day, hour, minute, second, millisecond) {
95 if (month === void 0) 118 if (month === void 0)
96 month = 1; 119 month = 1;
97 if (day === void 0) 120 if (day === void 0)
98 day = 1; 121 day = 1;
99 if (hour === void 0) 122 if (hour === void 0)
(...skipping 21 matching lines...) Expand all
121 millisecond = 0; 144 millisecond = 0;
122 this._internal(year, month, day, hour, minute, second, millisecond, true); 145 this._internal(year, month, day, hour, minute, second, millisecond, true);
123 } 146 }
124 now() { 147 now() {
125 this._now(); 148 this._now();
126 } 149 }
127 static parse(formattedString) { 150 static parse(formattedString) {
128 let re = new RegExp('^([+-]?\\d{4,6})-?(\\d\\d)-?(\\d\\d)' + '(?:[ T](\\d\ \d)(?::?(\\d\\d)(?::?(\\d\\d)(.\\d{1,6})?)?)?' + '( ?[zZ]| ?([-+])(\\d\\d)(?::?( \\d\\d))?)?)?$'); 151 let re = new RegExp('^([+-]?\\d{4,6})-?(\\d\\d)-?(\\d\\d)' + '(?:[ T](\\d\ \d)(?::?(\\d\\d)(?::?(\\d\\d)(.\\d{1,6})?)?)?' + '( ?[zZ]| ?([-+])(\\d\\d)(?::?( \\d\\d))?)?)?$');
129 let match = re.firstMatch(formattedString); 152 let match = re.firstMatch(formattedString);
130 if (match != null) { 153 if (match != null) {
131 // Function parseIntOrZero: (String) → int
132 let parseIntOrZero = matched => { 154 let parseIntOrZero = matched => {
133 if (matched == null) 155 if (matched == null)
134 return 0; 156 return 0;
135 return int.parse(matched); 157 return int.parse(matched);
136 }; 158 };
137 // Function parseDoubleOrZero: (String) → double 159 dart.fn(parseIntOrZero, int, [String]);
138 let parseDoubleOrZero = matched => { 160 let parseDoubleOrZero = matched => {
139 if (matched == null) 161 if (matched == null)
140 return 0.0; 162 return 0.0;
141 return double.parse(matched); 163 return double.parse(matched);
142 }; 164 };
165 dart.fn(parseDoubleOrZero, double, [String]);
143 let years = int.parse(match.get(1)); 166 let years = int.parse(match.get(1));
144 let month = int.parse(match.get(2)); 167 let month = int.parse(match.get(2));
145 let day = int.parse(match.get(3)); 168 let day = int.parse(match.get(3));
146 let hour = parseIntOrZero(match.get(4)); 169 let hour = parseIntOrZero(match.get(4));
147 let minute = parseIntOrZero(match.get(5)); 170 let minute = parseIntOrZero(match.get(5));
148 let second = parseIntOrZero(match.get(6)); 171 let second = parseIntOrZero(match.get(6));
149 let addOneMillisecond = false; 172 let addOneMillisecond = false;
150 let millisecond = (dart.notNull(parseDoubleOrZero(match.get(7))) * 1000) .round(); 173 let millisecond = (dart.notNull(parseDoubleOrZero(match.get(7))) * 1000) .round();
151 if (millisecond == 1000) { 174 if (millisecond == 1000) {
152 addOneMillisecond = true; 175 addOneMillisecond = true;
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 get weekday() { 356 get weekday() {
334 return dart.as(_js_helper.Primitives.getWeekday(this), int); 357 return dart.as(_js_helper.Primitives.getWeekday(this), int);
335 } 358 }
336 } 359 }
337 DateTime[dart.implements] = () => [Comparable]; 360 DateTime[dart.implements] = () => [Comparable];
338 dart.defineNamedConstructor(DateTime, 'utc'); 361 dart.defineNamedConstructor(DateTime, 'utc');
339 dart.defineNamedConstructor(DateTime, 'now'); 362 dart.defineNamedConstructor(DateTime, 'now');
340 dart.defineNamedConstructor(DateTime, 'fromMillisecondsSinceEpoch'); 363 dart.defineNamedConstructor(DateTime, 'fromMillisecondsSinceEpoch');
341 dart.defineNamedConstructor(DateTime, '_internal'); 364 dart.defineNamedConstructor(DateTime, '_internal');
342 dart.defineNamedConstructor(DateTime, '_now'); 365 dart.defineNamedConstructor(DateTime, '_now');
366 dart.setSignature(DateTime, {
367 methods: () => ({
368 '==': dart.functionType(bool, [dart.dynamic]),
Jennifer Messerly 2015/05/18 17:52:53 I'd be really curious to see this after above sugg
369 isBefore: dart.functionType(bool, [DateTime]),
370 isAfter: dart.functionType(bool, [DateTime]),
371 isAtSameMomentAs: dart.functionType(bool, [DateTime]),
372 compareTo: dart.functionType(int, [DateTime]),
373 toLocal: dart.functionType(DateTime, []),
374 toUtc: dart.functionType(DateTime, []),
375 toString: dart.functionType(String, []),
376 toIso8601String: dart.functionType(String, []),
377 add: dart.functionType(DateTime, [Duration]),
378 subtract: dart.functionType(DateTime, [Duration]),
379 difference: dart.functionType(Duration, [DateTime])
380 }),
381 statics: () => ({
382 parse: dart.functionType(DateTime, [String]),
383 _fourDigits: dart.functionType(String, [int]),
384 _sixDigits: dart.functionType(String, [int]),
385 _threeDigits: dart.functionType(String, [int]),
386 _twoDigits: dart.functionType(String, [int]),
387 _brokenDownDateToMillisecondsSinceEpoch: dart.functionType(int, [int, int, int, int, int, int, int, bool])
388 }),
389 names: ['parse', '_fourDigits', '_sixDigits', '_threeDigits', '_twoDigits', '_brokenDownDateToMillisecondsSinceEpoch']
390 });
343 DateTime.MONDAY = 1; 391 DateTime.MONDAY = 1;
344 DateTime.TUESDAY = 2; 392 DateTime.TUESDAY = 2;
345 DateTime.WEDNESDAY = 3; 393 DateTime.WEDNESDAY = 3;
346 DateTime.THURSDAY = 4; 394 DateTime.THURSDAY = 4;
347 DateTime.FRIDAY = 5; 395 DateTime.FRIDAY = 5;
348 DateTime.SATURDAY = 6; 396 DateTime.SATURDAY = 6;
349 DateTime.SUNDAY = 7; 397 DateTime.SUNDAY = 7;
350 DateTime.DAYS_PER_WEEK = 7; 398 DateTime.DAYS_PER_WEEK = 7;
351 DateTime.JANUARY = 1; 399 DateTime.JANUARY = 1;
352 DateTime.FEBRUARY = 2; 400 DateTime.FEBRUARY = 2;
(...skipping 29 matching lines...) Expand all
382 static _onParseErrorInt(_) { 430 static _onParseErrorInt(_) {
383 num._parseError = true; 431 num._parseError = true;
384 return 0; 432 return 0;
385 } 433 }
386 static _onParseErrorDouble(_) { 434 static _onParseErrorDouble(_) {
387 num._parseError = true; 435 num._parseError = true;
388 return 0.0; 436 return 0.0;
389 } 437 }
390 } 438 }
391 num[dart.implements] = () => [Comparable$(num)]; 439 num[dart.implements] = () => [Comparable$(num)];
440 dart.setSignature(num, {
441 statics: () => ({
442 parse: dart.functionType(num, [String], [dart.functionType(num, [String])] ),
443 _onParseErrorInt: dart.functionType(int, [String]),
444 _onParseErrorDouble: dart.functionType(double, [String])
445 }),
446 names: ['parse', '_onParseErrorInt', '_onParseErrorDouble']
447 });
392 class double extends num { 448 class double extends num {
393 static parse(source, onError) { 449 static parse(source, onError) {
394 if (onError === void 0) 450 if (onError === void 0)
395 onError = null; 451 onError = null;
396 return _js_helper.Primitives.parseDouble(source, onError); 452 return _js_helper.Primitives.parseDouble(source, onError);
397 } 453 }
398 } 454 }
455 dart.setSignature(double, {
456 statics: () => ({parse: dart.functionType(double, [String], [dart.functionTy pe(double, [String])])}),
457 names: ['parse']
458 });
399 double.NAN = 0.0 / 0.0; 459 double.NAN = 0.0 / 0.0;
400 double.INFINITY = 1.0 / 0.0; 460 double.INFINITY = 1.0 / 0.0;
401 double.NEGATIVE_INFINITY = -dart.notNull(double.INFINITY); 461 double.NEGATIVE_INFINITY = -dart.notNull(double.INFINITY);
402 double.MIN_POSITIVE = 5e-324; 462 double.MIN_POSITIVE = 5e-324;
403 double.MAX_FINITE = 1.7976931348623157e+308; 463 double.MAX_FINITE = 1.7976931348623157e+308;
404 let _duration = dart.JsSymbol('_duration'); 464 let _duration = dart.JsSymbol('_duration');
405 class Duration extends Object { 465 class Duration extends Object {
406 Duration(opts) { 466 Duration(opts) {
407 let days = opts && 'days' in opts ? opts.days : 0; 467 let days = opts && 'days' in opts ? opts.days : 0;
408 let hours = opts && 'hours' in opts ? opts.hours : 0; 468 let hours = opts && 'hours' in opts ? opts.hours : 0;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 return false; 524 return false;
465 return dart.equals(this[_duration], dart.dload(other, _duration)); 525 return dart.equals(this[_duration], dart.dload(other, _duration));
466 } 526 }
467 get hashCode() { 527 get hashCode() {
468 return dart.hashCode(this[_duration]); 528 return dart.hashCode(this[_duration]);
469 } 529 }
470 compareTo(other) { 530 compareTo(other) {
471 return this[_duration].compareTo(other[_duration]); 531 return this[_duration].compareTo(other[_duration]);
472 } 532 }
473 toString() { 533 toString() {
474 // Function sixDigits: (int) → String
475 let sixDigits = n => { 534 let sixDigits = n => {
476 if (dart.notNull(n) >= 100000) 535 if (dart.notNull(n) >= 100000)
477 return `${n}`; 536 return `${n}`;
478 if (dart.notNull(n) >= 10000) 537 if (dart.notNull(n) >= 10000)
479 return `0${n}`; 538 return `0${n}`;
480 if (dart.notNull(n) >= 1000) 539 if (dart.notNull(n) >= 1000)
481 return `00${n}`; 540 return `00${n}`;
482 if (dart.notNull(n) >= 100) 541 if (dart.notNull(n) >= 100)
483 return `000${n}`; 542 return `000${n}`;
484 if (dart.notNull(n) >= 10) 543 if (dart.notNull(n) >= 10)
485 return `0000${n}`; 544 return `0000${n}`;
486 return `00000${n}`; 545 return `00000${n}`;
487 }; 546 };
488 // Function twoDigits: (int) → String 547 dart.fn(sixDigits, String, [int]);
489 let twoDigits = n => { 548 let twoDigits = n => {
490 if (dart.notNull(n) >= 10) 549 if (dart.notNull(n) >= 10)
491 return `${n}`; 550 return `${n}`;
492 return `0${n}`; 551 return `0${n}`;
493 }; 552 };
553 dart.fn(twoDigits, String, [int]);
494 if (dart.notNull(this.inMicroseconds) < 0) { 554 if (dart.notNull(this.inMicroseconds) < 0) {
495 return `-${this['unary-']()}`; 555 return `-${this['unary-']()}`;
496 } 556 }
497 let twoDigitMinutes = twoDigits(this.inMinutes.remainder(Duration.MINUTES_ PER_HOUR)); 557 let twoDigitMinutes = twoDigits(this.inMinutes.remainder(Duration.MINUTES_ PER_HOUR));
498 let twoDigitSeconds = twoDigits(this.inSeconds.remainder(Duration.SECONDS_ PER_MINUTE)); 558 let twoDigitSeconds = twoDigits(this.inSeconds.remainder(Duration.SECONDS_ PER_MINUTE));
499 let sixDigitUs = sixDigits(this.inMicroseconds.remainder(Duration.MICROSEC ONDS_PER_SECOND)); 559 let sixDigitUs = sixDigits(this.inMicroseconds.remainder(Duration.MICROSEC ONDS_PER_SECOND));
500 return `${this.inHours}:${twoDigitMinutes}:${twoDigitSeconds}.${sixDigitUs }`; 560 return `${this.inHours}:${twoDigitMinutes}:${twoDigitSeconds}.${sixDigitUs }`;
501 } 561 }
502 get isNegative() { 562 get isNegative() {
503 return dart.notNull(this[_duration]) < 0; 563 return dart.notNull(this[_duration]) < 0;
504 } 564 }
505 abs() { 565 abs() {
506 return new Duration._microseconds(this[_duration].abs()); 566 return new Duration._microseconds(this[_duration].abs());
507 } 567 }
508 ['unary-']() { 568 ['unary-']() {
509 return new Duration._microseconds(-dart.notNull(this[_duration])); 569 return new Duration._microseconds(-dart.notNull(this[_duration]));
510 } 570 }
511 } 571 }
512 Duration[dart.implements] = () => [Comparable$(Duration)]; 572 Duration[dart.implements] = () => [Comparable$(Duration)];
513 dart.defineNamedConstructor(Duration, '_microseconds'); 573 dart.defineNamedConstructor(Duration, '_microseconds');
574 dart.setSignature(Duration, {
575 methods: () => ({
576 '+': dart.functionType(Duration, [Duration]),
577 '-': dart.functionType(Duration, [Duration]),
578 '*': dart.functionType(Duration, [num]),
579 '~/': dart.functionType(Duration, [int]),
580 '<': dart.functionType(bool, [Duration]),
581 '>': dart.functionType(bool, [Duration]),
582 '<=': dart.functionType(bool, [Duration]),
583 '>=': dart.functionType(bool, [Duration]),
584 '==': dart.functionType(bool, [dart.dynamic]),
585 compareTo: dart.functionType(int, [Duration]),
586 toString: dart.functionType(String, []),
587 abs: dart.functionType(Duration, []),
588 'unary-': dart.functionType(Duration, [])
589 })
590 });
514 Duration.MICROSECONDS_PER_MILLISECOND = 1000; 591 Duration.MICROSECONDS_PER_MILLISECOND = 1000;
515 Duration.MILLISECONDS_PER_SECOND = 1000; 592 Duration.MILLISECONDS_PER_SECOND = 1000;
516 Duration.SECONDS_PER_MINUTE = 60; 593 Duration.SECONDS_PER_MINUTE = 60;
517 Duration.MINUTES_PER_HOUR = 60; 594 Duration.MINUTES_PER_HOUR = 60;
518 Duration.HOURS_PER_DAY = 24; 595 Duration.HOURS_PER_DAY = 24;
519 Duration.MICROSECONDS_PER_SECOND = dart.notNull(Duration.MICROSECONDS_PER_MILL ISECOND) * dart.notNull(Duration.MILLISECONDS_PER_SECOND); 596 Duration.MICROSECONDS_PER_SECOND = dart.notNull(Duration.MICROSECONDS_PER_MILL ISECOND) * dart.notNull(Duration.MILLISECONDS_PER_SECOND);
520 Duration.MICROSECONDS_PER_MINUTE = dart.notNull(Duration.MICROSECONDS_PER_SECO ND) * dart.notNull(Duration.SECONDS_PER_MINUTE); 597 Duration.MICROSECONDS_PER_MINUTE = dart.notNull(Duration.MICROSECONDS_PER_SECO ND) * dart.notNull(Duration.SECONDS_PER_MINUTE);
521 Duration.MICROSECONDS_PER_HOUR = dart.notNull(Duration.MICROSECONDS_PER_MINUTE ) * dart.notNull(Duration.MINUTES_PER_HOUR); 598 Duration.MICROSECONDS_PER_HOUR = dart.notNull(Duration.MICROSECONDS_PER_MINUTE ) * dart.notNull(Duration.MINUTES_PER_HOUR);
522 Duration.MICROSECONDS_PER_DAY = dart.notNull(Duration.MICROSECONDS_PER_HOUR) * dart.notNull(Duration.HOURS_PER_DAY); 599 Duration.MICROSECONDS_PER_DAY = dart.notNull(Duration.MICROSECONDS_PER_HOUR) * dart.notNull(Duration.HOURS_PER_DAY);
523 Duration.MILLISECONDS_PER_MINUTE = dart.notNull(Duration.MILLISECONDS_PER_SECO ND) * dart.notNull(Duration.SECONDS_PER_MINUTE); 600 Duration.MILLISECONDS_PER_MINUTE = dart.notNull(Duration.MILLISECONDS_PER_SECO ND) * dart.notNull(Duration.SECONDS_PER_MINUTE);
(...skipping 18 matching lines...) Expand all
542 static _stringToSafeString(string) { 619 static _stringToSafeString(string) {
543 return _js_helper.jsonEncodeNative(string); 620 return _js_helper.jsonEncodeNative(string);
544 } 621 }
545 static _objectToString(object) { 622 static _objectToString(object) {
546 return _js_helper.Primitives.objectToString(object); 623 return _js_helper.Primitives.objectToString(object);
547 } 624 }
548 get stackTrace() { 625 get stackTrace() {
549 return _js_helper.Primitives.extractStackTrace(this); 626 return _js_helper.Primitives.extractStackTrace(this);
550 } 627 }
551 } 628 }
629 dart.setSignature(Error, {
630 statics: () => ({
631 safeToString: dart.functionType(String, [Object]),
632 _stringToSafeString: dart.functionType(String, [String]),
633 _objectToString: dart.functionType(String, [Object])
634 }),
635 names: ['safeToString', '_stringToSafeString', '_objectToString']
636 });
552 class AssertionError extends Error { 637 class AssertionError extends Error {
553 AssertionError() { 638 AssertionError() {
554 super.Error(); 639 super.Error();
555 } 640 }
556 } 641 }
642 dart.setSignature(AssertionError, {});
557 class TypeError extends AssertionError {} 643 class TypeError extends AssertionError {}
644 dart.setSignature(TypeError, {});
558 class CastError extends Error { 645 class CastError extends Error {
559 CastError() { 646 CastError() {
560 super.Error(); 647 super.Error();
561 } 648 }
562 } 649 }
650 dart.setSignature(CastError, {});
563 class NullThrownError extends Error { 651 class NullThrownError extends Error {
564 NullThrownError() { 652 NullThrownError() {
565 super.Error(); 653 super.Error();
566 } 654 }
567 toString() { 655 toString() {
568 return "Throw of null."; 656 return "Throw of null.";
569 } 657 }
570 } 658 }
659 dart.setSignature(NullThrownError, {
660 methods: () => ({toString: dart.functionType(String, [])})
661 });
571 let _hasValue = dart.JsSymbol('_hasValue'); 662 let _hasValue = dart.JsSymbol('_hasValue');
572 class ArgumentError extends Error { 663 class ArgumentError extends Error {
573 ArgumentError(message) { 664 ArgumentError(message) {
574 if (message === void 0) 665 if (message === void 0)
575 message = null; 666 message = null;
576 this.message = message; 667 this.message = message;
577 this.invalidValue = null; 668 this.invalidValue = null;
578 this[_hasValue] = false; 669 this[_hasValue] = false;
579 this.name = null; 670 this.name = null;
580 super.Error(); 671 super.Error();
(...skipping 24 matching lines...) Expand all
605 } 696 }
606 let nameString = ""; 697 let nameString = "";
607 if (this.name != null) { 698 if (this.name != null) {
608 nameString = ` (${this.name})`; 699 nameString = ` (${this.name})`;
609 } 700 }
610 return `${this.message}${nameString}: ${Error.safeToString(this.invalidVal ue)}`; 701 return `${this.message}${nameString}: ${Error.safeToString(this.invalidVal ue)}`;
611 } 702 }
612 } 703 }
613 dart.defineNamedConstructor(ArgumentError, 'value'); 704 dart.defineNamedConstructor(ArgumentError, 'value');
614 dart.defineNamedConstructor(ArgumentError, 'notNull'); 705 dart.defineNamedConstructor(ArgumentError, 'notNull');
706 dart.setSignature(ArgumentError, {
707 methods: () => ({toString: dart.functionType(String, [])})
708 });
615 class RangeError extends ArgumentError { 709 class RangeError extends ArgumentError {
616 RangeError(message) { 710 RangeError(message) {
617 this.start = null; 711 this.start = null;
618 this.end = null; 712 this.end = null;
619 super.ArgumentError(message); 713 super.ArgumentError(message);
620 } 714 }
621 value(value, name, message) { 715 value(value, name, message) {
622 if (name === void 0) 716 if (name === void 0)
623 name = null; 717 name = null;
624 if (message === void 0) 718 if (message === void 0)
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 explanation = ": Valid value range is empty"; 800 explanation = ": Valid value range is empty";
707 } else { 801 } else {
708 explanation = `: Only valid value is ${this.start}`; 802 explanation = `: Only valid value is ${this.start}`;
709 } 803 }
710 return `RangeError: ${this.message} (${value})${explanation}`; 804 return `RangeError: ${this.message} (${value})${explanation}`;
711 } 805 }
712 } 806 }
713 dart.defineNamedConstructor(RangeError, 'value'); 807 dart.defineNamedConstructor(RangeError, 'value');
714 dart.defineNamedConstructor(RangeError, 'range'); 808 dart.defineNamedConstructor(RangeError, 'range');
715 dart.defineNamedConstructor(RangeError, 'index'); 809 dart.defineNamedConstructor(RangeError, 'index');
810 dart.setSignature(RangeError, {
811 methods: () => ({toString: dart.functionType(String, [])}),
812 statics: () => ({
813 checkValueInInterval: dart.functionType(dart.void, [int, int, int], [Strin g, String]),
814 checkValidIndex: dart.functionType(dart.void, [int, dart.dynamic], [String , int, String]),
815 checkValidRange: dart.functionType(dart.void, [int, int, int], [String, St ring, String]),
816 checkNotNegative: dart.functionType(dart.void, [int], [String, String])
817 }),
818 names: ['checkValueInInterval', 'checkValidIndex', 'checkValidRange', 'check NotNegative']
819 });
716 class IndexError extends ArgumentError { 820 class IndexError extends ArgumentError {
717 IndexError(invalidValue, indexable, name, message, length) { 821 IndexError(invalidValue, indexable, name, message, length) {
718 if (name === void 0) 822 if (name === void 0)
719 name = null; 823 name = null;
720 if (message === void 0) 824 if (message === void 0)
721 message = null; 825 message = null;
722 if (length === void 0) 826 if (length === void 0)
723 length = null; 827 length = null;
724 this.indexable = indexable; 828 this.indexable = indexable;
725 this.length = length != null ? length : dart.as(dart.dload(indexable, 'len gth'), int); 829 this.length = length != null ? length : dart.as(dart.dload(indexable, 'len gth'), int);
726 super.value(invalidValue, name, message != null ? message : "Index out of range"); 830 super.value(invalidValue, name, message != null ? message : "Index out of range");
727 } 831 }
728 get start() { 832 get start() {
729 return 0; 833 return 0;
730 } 834 }
731 get end() { 835 get end() {
732 return dart.notNull(this.length) - 1; 836 return dart.notNull(this.length) - 1;
733 } 837 }
734 toString() { 838 toString() {
735 dart.assert(this[_hasValue]); 839 dart.assert(this[_hasValue]);
736 let target = Error.safeToString(this.indexable); 840 let target = Error.safeToString(this.indexable);
737 let explanation = `index should be less than ${this.length}`; 841 let explanation = `index should be less than ${this.length}`;
738 if (dart.dsend(this.invalidValue, '<', 0)) { 842 if (dart.dsend(this.invalidValue, '<', 0)) {
739 explanation = "index must not be negative"; 843 explanation = "index must not be negative";
740 } 844 }
741 return `RangeError: ${this.message} (${target}[${this.invalidValue}]): ${e xplanation}`; 845 return `RangeError: ${this.message} (${target}[${this.invalidValue}]): ${e xplanation}`;
742 } 846 }
743 } 847 }
744 IndexError[dart.implements] = () => [RangeError]; 848 IndexError[dart.implements] = () => [RangeError];
849 dart.setSignature(IndexError, {
850 methods: () => ({toString: dart.functionType(String, [])})
851 });
745 class FallThroughError extends Error { 852 class FallThroughError extends Error {
746 FallThroughError() { 853 FallThroughError() {
747 super.Error(); 854 super.Error();
748 } 855 }
749 } 856 }
857 dart.setSignature(FallThroughError, {});
750 let _className = dart.JsSymbol('_className'); 858 let _className = dart.JsSymbol('_className');
751 class AbstractClassInstantiationError extends Error { 859 class AbstractClassInstantiationError extends Error {
752 AbstractClassInstantiationError(className) { 860 AbstractClassInstantiationError(className) {
753 this[_className] = className; 861 this[_className] = className;
754 super.Error(); 862 super.Error();
755 } 863 }
756 toString() { 864 toString() {
757 return `Cannot instantiate abstract class: '${this[_className]}'`; 865 return `Cannot instantiate abstract class: '${this[_className]}'`;
758 } 866 }
759 } 867 }
868 dart.setSignature(AbstractClassInstantiationError, {
869 methods: () => ({toString: dart.functionType(String, [])})
870 });
760 let _receiver = dart.JsSymbol('_receiver'); 871 let _receiver = dart.JsSymbol('_receiver');
761 let _memberName = dart.JsSymbol('_memberName'); 872 let _memberName = dart.JsSymbol('_memberName');
762 let _arguments = dart.JsSymbol('_arguments'); 873 let _arguments = dart.JsSymbol('_arguments');
763 let _namedArguments = dart.JsSymbol('_namedArguments'); 874 let _namedArguments = dart.JsSymbol('_namedArguments');
764 let _existingArgumentNames = dart.JsSymbol('_existingArgumentNames'); 875 let _existingArgumentNames = dart.JsSymbol('_existingArgumentNames');
765 let $length = dart.JsSymbol('$length'); 876 let $length = dart.JsSymbol('$length');
766 let $get = dart.JsSymbol('$get'); 877 let $get = dart.JsSymbol('$get');
767 class NoSuchMethodError extends Error { 878 class NoSuchMethodError extends Error {
768 NoSuchMethodError(receiver, memberName, positionalArguments, namedArguments, existingArgumentNames) { 879 NoSuchMethodError(receiver, memberName, positionalArguments, namedArguments, existingArgumentNames) {
769 if (existingArgumentNames === void 0) 880 if (existingArgumentNames === void 0)
(...skipping 10 matching lines...) Expand all
780 let i = 0; 891 let i = 0;
781 if (this[_arguments] != null) { 892 if (this[_arguments] != null) {
782 for (; dart.notNull(i) < dart.notNull(this[_arguments][$length]); i = da rt.notNull(i) + 1) { 893 for (; dart.notNull(i) < dart.notNull(this[_arguments][$length]); i = da rt.notNull(i) + 1) {
783 if (dart.notNull(i) > 0) { 894 if (dart.notNull(i) > 0) {
784 sb.write(", "); 895 sb.write(", ");
785 } 896 }
786 sb.write(Error.safeToString(this[_arguments][$get](i))); 897 sb.write(Error.safeToString(this[_arguments][$get](i)));
787 } 898 }
788 } 899 }
789 if (this[_namedArguments] != null) { 900 if (this[_namedArguments] != null) {
790 this[_namedArguments].forEach((key, value) => { 901 this[_namedArguments].forEach(dart.fn((key, value) => {
791 if (dart.notNull(i) > 0) { 902 if (dart.notNull(i) > 0) {
792 sb.write(", "); 903 sb.write(", ");
793 } 904 }
794 sb.write(_symbolToString(key)); 905 sb.write(_symbolToString(key));
795 sb.write(": "); 906 sb.write(": ");
796 sb.write(Error.safeToString(value)); 907 sb.write(Error.safeToString(value));
797 i = dart.notNull(i) + 1; 908 i = dart.notNull(i) + 1;
798 }); 909 }, dart.dynamic, [Symbol, dart.dynamic]));
799 } 910 }
800 if (this[_existingArgumentNames] == null) { 911 if (this[_existingArgumentNames] == null) {
801 return `NoSuchMethodError : method not found: '${this[_memberName]}'\n` + `Receiver: ${Error.safeToString(this[_receiver])}\n` + `Arguments: [${sb}]`; 912 return `NoSuchMethodError : method not found: '${this[_memberName]}'\n` + `Receiver: ${Error.safeToString(this[_receiver])}\n` + `Arguments: [${sb}]`;
802 } else { 913 } else {
803 let actualParameters = dart.toString(sb); 914 let actualParameters = dart.toString(sb);
804 sb = new StringBuffer(); 915 sb = new StringBuffer();
805 for (let i = 0; dart.notNull(i) < dart.notNull(this[_existingArgumentNam es][$length]); i = dart.notNull(i) + 1) { 916 for (let i = 0; dart.notNull(i) < dart.notNull(this[_existingArgumentNam es][$length]); i = dart.notNull(i) + 1) {
806 if (dart.notNull(i) > 0) { 917 if (dart.notNull(i) > 0) {
807 sb.write(", "); 918 sb.write(", ");
808 } 919 }
809 sb.write(this[_existingArgumentNames][$get](i)); 920 sb.write(this[_existingArgumentNames][$get](i));
810 } 921 }
811 let formalParameters = dart.toString(sb); 922 let formalParameters = dart.toString(sb);
812 return "NoSuchMethodError: incorrect number of arguments passed to " + ` method named '${this[_memberName]}'\n` + `Receiver: ${Error.safeToString(this[_r eceiver])}\n` + `Tried calling: ${this[_memberName]}(${actualParameters})\n` + ` Found: ${this[_memberName]}(${formalParameters})`; 923 return "NoSuchMethodError: incorrect number of arguments passed to " + ` method named '${this[_memberName]}'\n` + `Receiver: ${Error.safeToString(this[_r eceiver])}\n` + `Tried calling: ${this[_memberName]}(${actualParameters})\n` + ` Found: ${this[_memberName]}(${formalParameters})`;
813 } 924 }
814 } 925 }
815 } 926 }
927 dart.setSignature(NoSuchMethodError, {
928 methods: () => ({toString: dart.functionType(String, [])})
929 });
816 class UnsupportedError extends Error { 930 class UnsupportedError extends Error {
817 UnsupportedError(message) { 931 UnsupportedError(message) {
818 this.message = message; 932 this.message = message;
819 super.Error(); 933 super.Error();
820 } 934 }
821 toString() { 935 toString() {
822 return `Unsupported operation: ${this.message}`; 936 return `Unsupported operation: ${this.message}`;
823 } 937 }
824 } 938 }
939 dart.setSignature(UnsupportedError, {
940 methods: () => ({toString: dart.functionType(String, [])})
941 });
825 class UnimplementedError extends Error { 942 class UnimplementedError extends Error {
826 UnimplementedError(message) { 943 UnimplementedError(message) {
827 if (message === void 0) 944 if (message === void 0)
828 message = null; 945 message = null;
829 this.message = message; 946 this.message = message;
830 super.Error(); 947 super.Error();
831 } 948 }
832 toString() { 949 toString() {
833 return this.message != null ? `UnimplementedError: ${this.message}` : "Uni mplementedError"; 950 return this.message != null ? `UnimplementedError: ${this.message}` : "Uni mplementedError";
834 } 951 }
835 } 952 }
836 UnimplementedError[dart.implements] = () => [UnsupportedError]; 953 UnimplementedError[dart.implements] = () => [UnsupportedError];
954 dart.setSignature(UnimplementedError, {
955 methods: () => ({toString: dart.functionType(String, [])})
Jennifer Messerly 2015/05/18 17:52:52 can we avoid adding types to overrides when it jus
Leaf 2015/05/19 00:02:20 Sure. I'll do in a follow up CL.
956 });
837 class StateError extends Error { 957 class StateError extends Error {
838 StateError(message) { 958 StateError(message) {
839 this.message = message; 959 this.message = message;
840 super.Error(); 960 super.Error();
841 } 961 }
842 toString() { 962 toString() {
843 return `Bad state: ${this.message}`; 963 return `Bad state: ${this.message}`;
844 } 964 }
845 } 965 }
966 dart.setSignature(StateError, {
967 methods: () => ({toString: dart.functionType(String, [])})
968 });
846 class ConcurrentModificationError extends Error { 969 class ConcurrentModificationError extends Error {
847 ConcurrentModificationError(modifiedObject) { 970 ConcurrentModificationError(modifiedObject) {
848 if (modifiedObject === void 0) 971 if (modifiedObject === void 0)
849 modifiedObject = null; 972 modifiedObject = null;
850 this.modifiedObject = modifiedObject; 973 this.modifiedObject = modifiedObject;
851 super.Error(); 974 super.Error();
852 } 975 }
853 toString() { 976 toString() {
854 if (this.modifiedObject == null) { 977 if (this.modifiedObject == null) {
855 return "Concurrent modification during iteration."; 978 return "Concurrent modification during iteration.";
856 } 979 }
857 return "Concurrent modification during iteration: " + `${Error.safeToStrin g(this.modifiedObject)}.`; 980 return "Concurrent modification during iteration: " + `${Error.safeToStrin g(this.modifiedObject)}.`;
858 } 981 }
859 } 982 }
983 dart.setSignature(ConcurrentModificationError, {
984 methods: () => ({toString: dart.functionType(String, [])})
985 });
860 class OutOfMemoryError extends Object { 986 class OutOfMemoryError extends Object {
861 OutOfMemoryError() { 987 OutOfMemoryError() {
862 } 988 }
863 toString() { 989 toString() {
864 return "Out of Memory"; 990 return "Out of Memory";
865 } 991 }
866 get stackTrace() { 992 get stackTrace() {
867 return null; 993 return null;
868 } 994 }
869 } 995 }
870 OutOfMemoryError[dart.implements] = () => [Error]; 996 OutOfMemoryError[dart.implements] = () => [Error];
997 dart.setSignature(OutOfMemoryError, {
998 methods: () => ({toString: dart.functionType(String, [])})
999 });
871 class StackOverflowError extends Object { 1000 class StackOverflowError extends Object {
872 StackOverflowError() { 1001 StackOverflowError() {
873 } 1002 }
874 toString() { 1003 toString() {
875 return "Stack Overflow"; 1004 return "Stack Overflow";
876 } 1005 }
877 get stackTrace() { 1006 get stackTrace() {
878 return null; 1007 return null;
879 } 1008 }
880 } 1009 }
881 StackOverflowError[dart.implements] = () => [Error]; 1010 StackOverflowError[dart.implements] = () => [Error];
1011 dart.setSignature(StackOverflowError, {
1012 methods: () => ({toString: dart.functionType(String, [])})
1013 });
882 class CyclicInitializationError extends Error { 1014 class CyclicInitializationError extends Error {
883 CyclicInitializationError(variableName) { 1015 CyclicInitializationError(variableName) {
884 if (variableName === void 0) 1016 if (variableName === void 0)
885 variableName = null; 1017 variableName = null;
886 this.variableName = variableName; 1018 this.variableName = variableName;
887 super.Error(); 1019 super.Error();
888 } 1020 }
889 toString() { 1021 toString() {
890 return this.variableName == null ? "Reading static variable during its ini tialization" : `Reading static variable '${this.variableName}' during its initia lization`; 1022 return this.variableName == null ? "Reading static variable during its ini tialization" : `Reading static variable '${this.variableName}' during its initia lization`;
891 } 1023 }
892 } 1024 }
1025 dart.setSignature(CyclicInitializationError, {
1026 methods: () => ({toString: dart.functionType(String, [])})
1027 });
893 class Exception extends Object { 1028 class Exception extends Object {
894 Exception(message) { 1029 Exception(message) {
895 if (message === void 0) 1030 if (message === void 0)
896 message = null; 1031 message = null;
897 return new _ExceptionImplementation(message); 1032 return new _ExceptionImplementation(message);
898 } 1033 }
899 } 1034 }
1035 dart.setSignature(Exception, {});
900 class _ExceptionImplementation extends Object { 1036 class _ExceptionImplementation extends Object {
901 _ExceptionImplementation(message) { 1037 _ExceptionImplementation(message) {
902 if (message === void 0) 1038 if (message === void 0)
903 message = null; 1039 message = null;
904 this.message = message; 1040 this.message = message;
905 } 1041 }
906 toString() { 1042 toString() {
907 if (this.message == null) 1043 if (this.message == null)
908 return "Exception"; 1044 return "Exception";
909 return `Exception: ${this.message}`; 1045 return `Exception: ${this.message}`;
910 } 1046 }
911 } 1047 }
912 _ExceptionImplementation[dart.implements] = () => [Exception]; 1048 _ExceptionImplementation[dart.implements] = () => [Exception];
1049 dart.setSignature(_ExceptionImplementation, {
1050 methods: () => ({toString: dart.functionType(String, [])})
1051 });
913 class FormatException extends Object { 1052 class FormatException extends Object {
914 FormatException(message, source, offset) { 1053 FormatException(message, source, offset) {
915 if (message === void 0) 1054 if (message === void 0)
916 message = ""; 1055 message = "";
917 if (source === void 0) 1056 if (source === void 0)
918 source = null; 1057 source = null;
919 if (offset === void 0) 1058 if (offset === void 0)
920 offset = -1; 1059 offset = -1;
921 this.message = message; 1060 this.message = message;
922 this.source = source; 1061 this.source = source;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
992 end = dart.notNull(offset) + 36; 1131 end = dart.notNull(offset) + 36;
993 prefix = postfix = "..."; 1132 prefix = postfix = "...";
994 } 1133 }
995 } 1134 }
996 let slice = dart.as(dart.dsend(this.source, 'substring', start, end), Stri ng); 1135 let slice = dart.as(dart.dsend(this.source, 'substring', start, end), Stri ng);
997 let markOffset = dart.notNull(offset) - dart.notNull(start) + dart.notNull (prefix.length); 1136 let markOffset = dart.notNull(offset) - dart.notNull(start) + dart.notNull (prefix.length);
998 return `${report}${prefix}${slice}${postfix}\n${" "['*'](markOffset)}^\n`; 1137 return `${report}${prefix}${slice}${postfix}\n${" "['*'](markOffset)}^\n`;
999 } 1138 }
1000 } 1139 }
1001 FormatException[dart.implements] = () => [Exception]; 1140 FormatException[dart.implements] = () => [Exception];
1141 dart.setSignature(FormatException, {
1142 methods: () => ({toString: dart.functionType(String, [])})
1143 });
1002 class IntegerDivisionByZeroException extends Object { 1144 class IntegerDivisionByZeroException extends Object {
1003 IntegerDivisionByZeroException() { 1145 IntegerDivisionByZeroException() {
1004 } 1146 }
1005 toString() { 1147 toString() {
1006 return "IntegerDivisionByZeroException"; 1148 return "IntegerDivisionByZeroException";
1007 } 1149 }
1008 } 1150 }
1009 IntegerDivisionByZeroException[dart.implements] = () => [Exception]; 1151 IntegerDivisionByZeroException[dart.implements] = () => [Exception];
1152 dart.setSignature(IntegerDivisionByZeroException, {
1153 methods: () => ({toString: dart.functionType(String, [])})
1154 });
1010 let _getKey = dart.JsSymbol('_getKey'); 1155 let _getKey = dart.JsSymbol('_getKey');
1011 let Expando$ = dart.generic(function(T) { 1156 let Expando$ = dart.generic(function(T) {
1012 class Expando extends Object { 1157 class Expando extends Object {
1013 Expando(name) { 1158 Expando(name) {
1014 if (name === void 0) 1159 if (name === void 0)
1015 name = null; 1160 name = null;
1016 this.name = name; 1161 this.name = name;
1017 } 1162 }
1018 toString() { 1163 toString() {
1019 return `Expando:${this.name}`; 1164 return `Expando:${this.name}`;
(...skipping 17 matching lines...) Expand all
1037 key = `expando$key$${(() => { 1182 key = `expando$key$${(() => {
1038 let x = Expando$()._keyCount; 1183 let x = Expando$()._keyCount;
1039 Expando$()._keyCount = dart.notNull(x) + 1; 1184 Expando$()._keyCount = dart.notNull(x) + 1;
1040 return x; 1185 return x;
1041 })()}`; 1186 })()}`;
1042 _js_helper.Primitives.setProperty(this, Expando$()._KEY_PROPERTY_NAME, key); 1187 _js_helper.Primitives.setProperty(this, Expando$()._KEY_PROPERTY_NAME, key);
1043 } 1188 }
1044 return key; 1189 return key;
1045 } 1190 }
1046 } 1191 }
1192 dart.setSignature(Expando, {
1193 methods: () => ({
1194 toString: dart.functionType(String, []),
1195 get: dart.functionType(T, [Object]),
1196 set: dart.functionType(dart.void, [Object, T]),
1197 [_getKey]: dart.functionType(String, [])
1198 })
1199 });
1047 return Expando; 1200 return Expando;
1048 }); 1201 });
1049 let Expando = Expando$(); 1202 let Expando = Expando$();
1050 Expando._KEY_PROPERTY_NAME = 'expando$key'; 1203 Expando._KEY_PROPERTY_NAME = 'expando$key';
1051 Expando._EXPANDO_PROPERTY_NAME = 'expando$values'; 1204 Expando._EXPANDO_PROPERTY_NAME = 'expando$values';
1052 Expando._keyCount = 0; 1205 Expando._keyCount = 0;
1053 class Function extends Object { 1206 class Function extends Object {
1054 static apply(f, positionalArguments, namedArguments) { 1207 static apply(f, positionalArguments, namedArguments) {
1055 if (namedArguments === void 0) 1208 if (namedArguments === void 0)
1056 namedArguments = null; 1209 namedArguments = null;
1057 return dart.dcall.apply(null, [f].concat(positionalArguments)); 1210 return dart.dcall.apply(null, [f].concat(positionalArguments));
1058 } 1211 }
1059 static _toMangledNames(namedArguments) { 1212 static _toMangledNames(namedArguments) {
1060 let result = dart.map(); 1213 let result = dart.map();
1061 namedArguments.forEach((symbol, value) => { 1214 namedArguments.forEach(dart.fn((symbol, value) => {
Jennifer Messerly 2015/05/18 17:52:52 this one seems not needed
Leaf 2015/05/19 00:02:20 You mean just assuming that any Function not marke
1062 result.set(_symbolToString(dart.as(symbol, Symbol)), value); 1215 result.set(_symbolToString(dart.as(symbol, Symbol)), value);
1063 }); 1216 }));
1064 return result; 1217 return result;
1065 } 1218 }
1066 } 1219 }
1067 // Function identical: (Object, Object) → bool 1220 dart.setSignature(Function, {
1221 statics: () => ({
1222 apply: dart.functionType(dart.dynamic, [Function, List], [Map$(Symbol, dar t.dynamic)]),
1223 _toMangledNames: dart.functionType(Map$(String, dart.dynamic), [Map$(Symbo l, dart.dynamic)])
1224 }),
1225 names: ['apply', '_toMangledNames']
1226 });
1068 function identical(a, b) { 1227 function identical(a, b) {
1069 return _js_helper.Primitives.identicalImplementation(a, b); 1228 return _js_helper.Primitives.identicalImplementation(a, b);
1070 } 1229 }
1071 // Function identityHashCode: (Object) → int 1230 dart.fn(identical, bool, [Object, Object]);
1072 function identityHashCode(object) { 1231 function identityHashCode(object) {
1073 return _js_helper.objectHashCode(object); 1232 return _js_helper.objectHashCode(object);
1074 } 1233 }
1234 dart.fn(identityHashCode, () => dart.functionType(int, [Object]));
1075 class int extends num { 1235 class int extends num {
1076 fromEnvironment(name, opts) { 1236 fromEnvironment(name, opts) {
1077 let defaultValue = opts && 'defaultValue' in opts ? opts.defaultValue : nu ll; 1237 let defaultValue = opts && 'defaultValue' in opts ? opts.defaultValue : nu ll;
1078 throw new UnsupportedError('int.fromEnvironment can only be used as a cons t constructor'); 1238 throw new UnsupportedError('int.fromEnvironment can only be used as a cons t constructor');
1079 } 1239 }
1080 static parse(source, opts) { 1240 static parse(source, opts) {
1081 let radix = opts && 'radix' in opts ? opts.radix : null; 1241 let radix = opts && 'radix' in opts ? opts.radix : null;
1082 let onError = opts && 'onError' in opts ? opts.onError : null; 1242 let onError = opts && 'onError' in opts ? opts.onError : null;
1083 return _js_helper.Primitives.parseInt(source, radix, onError); 1243 return _js_helper.Primitives.parseInt(source, radix, onError);
1084 } 1244 }
1085 } 1245 }
1086 dart.defineNamedConstructor(int, 'fromEnvironment'); 1246 dart.defineNamedConstructor(int, 'fromEnvironment');
1247 dart.setSignature(int, {
1248 statics: () => ({parse: dart.functionType(int, [String], {adi: int, nErro: d art.functionType(int, [String])})}),
1249 names: ['parse']
1250 });
1087 class Invocation extends Object { 1251 class Invocation extends Object {
1088 get isAccessor() { 1252 get isAccessor() {
1089 return dart.notNull(this.isGetter) || dart.notNull(this.isSetter); 1253 return dart.notNull(this.isGetter) || dart.notNull(this.isSetter);
1090 } 1254 }
1091 } 1255 }
1256 dart.setSignature(Invocation, {});
1092 let $iterator = dart.JsSymbol('$iterator'); 1257 let $iterator = dart.JsSymbol('$iterator');
1093 let $join = dart.JsSymbol('$join'); 1258 let $join = dart.JsSymbol('$join');
1094 let Iterable$ = dart.generic(function(E) { 1259 let Iterable$ = dart.generic(function(E) {
1095 class Iterable extends Object { 1260 class Iterable extends Object {
1096 Iterable() { 1261 Iterable() {
1097 } 1262 }
1098 generate(count, generator) { 1263 generate(count, generator) {
1099 if (generator === void 0) 1264 if (generator === void 0)
1100 generator = null; 1265 generator = null;
1101 if (dart.notNull(count) <= 0) 1266 if (dart.notNull(count) <= 0)
1102 return new (_internal.EmptyIterable$(E))(); 1267 return new (_internal.EmptyIterable$(E))();
1103 return new (exports._GeneratorIterable$(E))(count, generator); 1268 return new (exports._GeneratorIterable$(E))(count, generator);
1104 } 1269 }
1105 [dart.JsSymbol.iterator]() { 1270 [dart.JsSymbol.iterator]() {
1106 return new dart.JsIterator(this[$iterator]); 1271 return new dart.JsIterator(this[$iterator]);
1107 } 1272 }
1108 [$join](separator) { 1273 [$join](separator) {
1109 if (separator === void 0) 1274 if (separator === void 0)
1110 separator = ""; 1275 separator = "";
1111 let buffer = new StringBuffer(); 1276 let buffer = new StringBuffer();
1112 buffer.writeAll(this, separator); 1277 buffer.writeAll(this, separator);
1113 return dart.toString(buffer); 1278 return dart.toString(buffer);
1114 } 1279 }
1115 } 1280 }
1116 dart.defineNamedConstructor(Iterable, 'generate'); 1281 dart.defineNamedConstructor(Iterable, 'generate');
1282 dart.setSignature(Iterable, {
1283 methods: () => ({[$join]: dart.functionType(String, [], [String])})
1284 });
1117 return Iterable; 1285 return Iterable;
1118 }); 1286 });
1119 let Iterable = Iterable$(); 1287 let Iterable = Iterable$();
1120 let _Generator$ = dart.generic(function(E) { 1288 let _Generator$ = dart.generic(function(E) {
1121 let _Generator = dart.typedef('_Generator', () => dart.functionType(E, [int] )); 1289 let _Generator = dart.typedef('_Generator', () => dart.functionType(E, [int] ));
1122 return _Generator; 1290 return _Generator;
1123 }); 1291 });
1124 let _Generator = _Generator$(); 1292 let _Generator = _Generator$();
1125 let _end = dart.JsSymbol('_end'); 1293 let _end = dart.JsSymbol('_end');
1126 let _start = dart.JsSymbol('_start'); 1294 let _start = dart.JsSymbol('_start');
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
1164 if (dart.notNull(newEnd) >= dart.notNull(this[_end])) 1332 if (dart.notNull(newEnd) >= dart.notNull(this[_end]))
1165 return this; 1333 return this;
1166 return new (exports._GeneratorIterable$(E)).slice(this[_start], newEnd, this[_generator]); 1334 return new (exports._GeneratorIterable$(E)).slice(this[_start], newEnd, this[_generator]);
1167 } 1335 }
1168 static _id(n) { 1336 static _id(n) {
1169 return n; 1337 return n;
1170 } 1338 }
1171 } 1339 }
1172 _GeneratorIterable[dart.implements] = () => [_internal.EfficientLength]; 1340 _GeneratorIterable[dart.implements] = () => [_internal.EfficientLength];
1173 dart.defineNamedConstructor(_GeneratorIterable, 'slice'); 1341 dart.defineNamedConstructor(_GeneratorIterable, 'slice');
1342 dart.setSignature(_GeneratorIterable, {
1343 methods: () => ({
1344 [$skip]: dart.functionType(Iterable$(E), [int]),
1345 [$take]: dart.functionType(Iterable$(E), [int])
1346 }),
1347 statics: () => ({_id: dart.functionType(int, [int])}),
1348 names: ['_id']
1349 });
1174 return _GeneratorIterable; 1350 return _GeneratorIterable;
1175 }); 1351 });
1176 dart.defineLazyClassGeneric(exports, '_GeneratorIterable', {get: _GeneratorIte rable$}); 1352 dart.defineLazyClassGeneric(exports, '_GeneratorIterable', {get: _GeneratorIte rable$});
1177 let _index = dart.JsSymbol('_index'); 1353 let _index = dart.JsSymbol('_index');
1178 let _current = dart.JsSymbol('_current'); 1354 let _current = dart.JsSymbol('_current');
1179 let _GeneratorIterator$ = dart.generic(function(E) { 1355 let _GeneratorIterator$ = dart.generic(function(E) {
1180 class _GeneratorIterator extends Object { 1356 class _GeneratorIterator extends Object {
1181 _GeneratorIterator(index, end, generator) { 1357 _GeneratorIterator(index, end, generator) {
1182 this[_index] = index; 1358 this[_index] = index;
1183 this[_end] = end; 1359 this[_end] = end;
1184 this[_generator] = generator; 1360 this[_generator] = generator;
1185 this[_current] = null; 1361 this[_current] = null;
1186 } 1362 }
1187 moveNext() { 1363 moveNext() {
1188 if (dart.notNull(this[_index]) < dart.notNull(this[_end])) { 1364 if (dart.notNull(this[_index]) < dart.notNull(this[_end])) {
1189 this[_current] = this[_generator](this[_index]); 1365 this[_current] = this[_generator](this[_index]);
1190 this[_index] = dart.notNull(this[_index]) + 1; 1366 this[_index] = dart.notNull(this[_index]) + 1;
1191 return true; 1367 return true;
1192 } else { 1368 } else {
1193 this[_current] = null; 1369 this[_current] = null;
1194 return false; 1370 return false;
1195 } 1371 }
1196 } 1372 }
1197 get current() { 1373 get current() {
1198 return this[_current]; 1374 return this[_current];
1199 } 1375 }
1200 } 1376 }
1201 _GeneratorIterator[dart.implements] = () => [Iterator$(E)]; 1377 _GeneratorIterator[dart.implements] = () => [Iterator$(E)];
1378 dart.setSignature(_GeneratorIterator, {
1379 methods: () => ({moveNext: dart.functionType(bool, [])})
1380 });
1202 return _GeneratorIterator; 1381 return _GeneratorIterator;
1203 }); 1382 });
1204 let _GeneratorIterator = _GeneratorIterator$(); 1383 let _GeneratorIterator = _GeneratorIterator$();
1205 let BidirectionalIterator$ = dart.generic(function(E) { 1384 let BidirectionalIterator$ = dart.generic(function(E) {
1206 class BidirectionalIterator extends Object {} 1385 class BidirectionalIterator extends Object {}
1207 BidirectionalIterator[dart.implements] = () => [Iterator$(E)]; 1386 BidirectionalIterator[dart.implements] = () => [Iterator$(E)];
1387 dart.setSignature(BidirectionalIterator, {});
1208 return BidirectionalIterator; 1388 return BidirectionalIterator;
1209 }); 1389 });
1210 let BidirectionalIterator = BidirectionalIterator$(); 1390 let BidirectionalIterator = BidirectionalIterator$();
1211 let Iterator$ = dart.generic(function(E) { 1391 let Iterator$ = dart.generic(function(E) {
1212 class Iterator extends Object {} 1392 class Iterator extends Object {}
1393 dart.setSignature(Iterator, {});
1213 return Iterator; 1394 return Iterator;
1214 }); 1395 });
1215 let Iterator = Iterator$(); 1396 let Iterator = Iterator$();
1216 let $set = dart.JsSymbol('$set'); 1397 let $set = dart.JsSymbol('$set');
1217 let $add = dart.JsSymbol('$add'); 1398 let $add = dart.JsSymbol('$add');
1218 let $checkMutable = dart.JsSymbol('$checkMutable'); 1399 let $checkMutable = dart.JsSymbol('$checkMutable');
1219 let $checkGrowable = dart.JsSymbol('$checkGrowable'); 1400 let $checkGrowable = dart.JsSymbol('$checkGrowable');
1220 let $where = dart.JsSymbol('$where'); 1401 let $where = dart.JsSymbol('$where');
1221 let $expand = dart.JsSymbol('$expand'); 1402 let $expand = dart.JsSymbol('$expand');
1222 let $forEach = dart.JsSymbol('$forEach'); 1403 let $forEach = dart.JsSymbol('$forEach');
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
1554 if (this[$length] == 0) 1735 if (this[$length] == 0)
1555 throw new RangeError.value(-1); 1736 throw new RangeError.value(-1);
1556 return dart.as(this.pop(), E); 1737 return dart.as(this.pop(), E);
1557 } 1738 }
1558 [$removeWhere](test) { 1739 [$removeWhere](test) {
1559 dart.as(test, dart.functionType(bool, [E])); 1740 dart.as(test, dart.functionType(bool, [E]));
1560 _internal.IterableMixinWorkaround.removeWhereList(this, test); 1741 _internal.IterableMixinWorkaround.removeWhereList(this, test);
1561 } 1742 }
1562 [$retainWhere](test) { 1743 [$retainWhere](test) {
1563 dart.as(test, dart.functionType(bool, [E])); 1744 dart.as(test, dart.functionType(bool, [E]));
1564 _internal.IterableMixinWorkaround.removeWhereList(this, element => !dart .notNull(test(element))); 1745 _internal.IterableMixinWorkaround.removeWhereList(this, dart.fn(element => !dart.notNull(test(element)), bool, [E]));
1565 } 1746 }
1566 [$sublist](start, end) { 1747 [$sublist](start, end) {
1567 if (end === void 0) 1748 if (end === void 0)
1568 end = null; 1749 end = null;
1569 dart.dcall(/* Unimplemented unknown name */checkNull, start); 1750 dart.dcall(/* Unimplemented unknown name */checkNull, start);
1570 if (!(typeof start == 'number')) 1751 if (!(typeof start == 'number'))
1571 throw new ArgumentError(start); 1752 throw new ArgumentError(start);
1572 if (dart.notNull(start) < 0 || dart.notNull(start) > dart.notNull(this[$ length])) { 1753 if (dart.notNull(start) < 0 || dart.notNull(start) > dart.notNull(this[$ length])) {
1573 throw new RangeError.range(start, 0, this[$length]); 1754 throw new RangeError.range(start, 0, this[$length]);
1574 } 1755 }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
1621 } 1802 }
1622 [$asMap]() { 1803 [$asMap]() {
1623 return new (_internal.IterableMixinWorkaround$(E))().asMapList(this); 1804 return new (_internal.IterableMixinWorkaround$(E))().asMapList(this);
1624 } 1805 }
1625 } 1806 }
1626 dart.setBaseClass(List, dart.global.Array); 1807 dart.setBaseClass(List, dart.global.Array);
1627 List[dart.implements] = () => [Iterable$(E), _internal.EfficientLength]; 1808 List[dart.implements] = () => [Iterable$(E), _internal.EfficientLength];
1628 dart.defineNamedConstructor(List, 'filled'); 1809 dart.defineNamedConstructor(List, 'filled');
1629 dart.defineNamedConstructor(List, 'from'); 1810 dart.defineNamedConstructor(List, 'from');
1630 dart.defineNamedConstructor(List, 'generate'); 1811 dart.defineNamedConstructor(List, 'generate');
1812 dart.setSignature(List, {
1813 methods: () => ({
1814 [$checkMutable]: dart.functionType(dart.dynamic, [dart.dynamic]),
1815 [$checkGrowable]: dart.functionType(dart.dynamic, [dart.dynamic]),
1816 [$where]: dart.functionType(Iterable$(E), [dart.functionType(bool, [E])] ),
1817 [$expand]: dart.functionType(Iterable, [dart.functionType(Iterable, [E]) ]),
1818 [$forEach]: dart.functionType(dart.void, [dart.functionType(dart.void, [ E])]),
1819 [$map]: dart.functionType(Iterable, [dart.functionType(dart.dynamic, [E] )]),
1820 [$join]: dart.functionType(String, [], [String]),
1821 [$take]: dart.functionType(Iterable$(E), [int]),
1822 [$takeWhile]: dart.functionType(Iterable$(E), [dart.functionType(bool, [ E])]),
1823 [$skip]: dart.functionType(Iterable$(E), [int]),
1824 [$skipWhile]: dart.functionType(Iterable$(E), [dart.functionType(bool, [ E])]),
1825 [$reduce]: dart.functionType(E, [dart.functionType(E, [E, E])]),
1826 [$fold]: dart.functionType(dart.dynamic, [dart.dynamic, dart.functionTyp e(dart.dynamic, [dart.dynamic, E])]),
1827 [$firstWhere]: dart.functionType(E, [dart.functionType(bool, [E])], {rEl s: dart.functionType(E, [])}),
1828 [$lastWhere]: dart.functionType(E, [dart.functionType(bool, [E])], {rEls : dart.functionType(E, [])}),
1829 [$singleWhere]: dart.functionType(E, [dart.functionType(bool, [E])]),
1830 [$elementAt]: dart.functionType(E, [int]),
1831 [$any]: dart.functionType(bool, [dart.functionType(bool, [E])]),
1832 [$every]: dart.functionType(bool, [dart.functionType(bool, [E])]),
1833 [$contains]: dart.functionType(bool, [Object]),
1834 [$toString]: dart.functionType(String, []),
1835 [$toList]: dart.functionType(List$(E), [], {rowabl: bool}),
1836 [$toSet]: dart.functionType(exports.Set$(E), []),
1837 [$get]: dart.functionType(E, [int]),
1838 [$set]: dart.functionType(dart.void, [int, E]),
1839 [$add]: dart.functionType(dart.void, [E]),
1840 [$addAll]: dart.functionType(dart.void, [Iterable$(E)]),
1841 [$sort]: dart.functionType(dart.void, [], [dart.functionType(int, [E, E] )]),
1842 [$shuffle]: dart.functionType(dart.void, [], [math.Random]),
1843 [$indexOf]: dart.functionType(int, [E], [int]),
1844 [$lastIndexOf]: dart.functionType(int, [E], [int]),
1845 [$clear]: dart.functionType(dart.void, []),
1846 [$insert]: dart.functionType(dart.void, [int, E]),
1847 [$insertAll]: dart.functionType(dart.void, [int, Iterable$(E)]),
1848 [$setAll]: dart.functionType(dart.void, [int, Iterable$(E)]),
1849 [$remove]: dart.functionType(bool, [Object]),
1850 [$removeAt]: dart.functionType(E, [int]),
1851 [$removeLast]: dart.functionType(E, []),
1852 [$removeWhere]: dart.functionType(dart.void, [dart.functionType(bool, [E ])]),
1853 [$retainWhere]: dart.functionType(dart.void, [dart.functionType(bool, [E ])]),
1854 [$sublist]: dart.functionType(List$(E), [int], [int]),
1855 [$getRange]: dart.functionType(Iterable$(E), [int, int]),
1856 [$setRange]: dart.functionType(dart.void, [int, int, Iterable$(E)], [int ]),
1857 [$removeRange]: dart.functionType(dart.void, [int, int]),
1858 [$fillRange]: dart.functionType(dart.void, [int, int], [E]),
1859 [$replaceRange]: dart.functionType(dart.void, [int, int, Iterable$(E)]),
1860 [$asMap]: dart.functionType(Map$(int, E), [])
1861 })
1862 });
1631 return List; 1863 return List;
1632 }); 1864 });
1633 let List = List$(); 1865 let List = List$();
1634 dart.registerExtension(dart.global.Array, List); 1866 dart.registerExtension(dart.global.Array, List);
1635 let Map$ = dart.generic(function(K, V) { 1867 let Map$ = dart.generic(function(K, V) {
1636 class Map extends Object { 1868 class Map extends Object {
1637 Map() { 1869 Map() {
1638 return new (collection.LinkedHashMap$(K, V))(); 1870 return new (collection.LinkedHashMap$(K, V))();
1639 } 1871 }
1640 from(other) { 1872 from(other) {
1641 return new (collection.LinkedHashMap$(K, V)).from(other); 1873 return new (collection.LinkedHashMap$(K, V)).from(other);
1642 } 1874 }
1643 identity() { 1875 identity() {
1644 return new (collection.LinkedHashMap$(K, V)).identity(); 1876 return new (collection.LinkedHashMap$(K, V)).identity();
1645 } 1877 }
1646 fromIterable(iterable, opts) { 1878 fromIterable(iterable, opts) {
1647 return new (collection.LinkedHashMap$(K, V)).fromIterable(iterable, opts ); 1879 return new (collection.LinkedHashMap$(K, V)).fromIterable(iterable, opts );
1648 } 1880 }
1649 fromIterables(keys, values) { 1881 fromIterables(keys, values) {
1650 return new (collection.LinkedHashMap$(K, V)).fromIterables(keys, values) ; 1882 return new (collection.LinkedHashMap$(K, V)).fromIterables(keys, values) ;
1651 } 1883 }
1652 } 1884 }
1653 dart.defineNamedConstructor(Map, 'from'); 1885 dart.defineNamedConstructor(Map, 'from');
1654 dart.defineNamedConstructor(Map, 'identity'); 1886 dart.defineNamedConstructor(Map, 'identity');
1655 dart.defineNamedConstructor(Map, 'fromIterable'); 1887 dart.defineNamedConstructor(Map, 'fromIterable');
1656 dart.defineNamedConstructor(Map, 'fromIterables'); 1888 dart.defineNamedConstructor(Map, 'fromIterables');
1889 dart.setSignature(Map, {});
1657 return Map; 1890 return Map;
1658 }); 1891 });
1659 let Map = Map$(); 1892 let Map = Map$();
1660 class Null extends Object { 1893 class Null extends Object {
1661 _uninstantiable() { 1894 _uninstantiable() {
1662 throw new UnsupportedError('class Null cannot be instantiated'); 1895 throw new UnsupportedError('class Null cannot be instantiated');
1663 } 1896 }
1664 toString() { 1897 toString() {
1665 return "null"; 1898 return "null";
1666 } 1899 }
1667 } 1900 }
1668 dart.defineNamedConstructor(Null, '_uninstantiable'); 1901 dart.defineNamedConstructor(Null, '_uninstantiable');
1902 dart.setSignature(Null, {
1903 methods: () => ({toString: dart.functionType(String, [])})
1904 });
1669 num._parseError = false; 1905 num._parseError = false;
1670 class Pattern extends Object {} 1906 class Pattern extends Object {}
1671 // Function print: (Object) → void 1907 dart.setSignature(Pattern, {});
1672 function print(object) { 1908 function print(object) {
1673 let line = `${object}`; 1909 let line = `${object}`;
1674 if (_internal.printToZone == null) { 1910 if (_internal.printToZone == null) {
1675 _internal.printToConsole(line); 1911 _internal.printToConsole(line);
1676 } else { 1912 } else {
1677 dart.dcall(_internal.printToZone, line); 1913 dart.dcall(_internal.printToZone, line);
1678 } 1914 }
1679 } 1915 }
1916 dart.fn(print, dart.void, [Object]);
1680 class Match extends Object {} 1917 class Match extends Object {}
1918 dart.setSignature(Match, {});
1681 class RegExp extends Object { 1919 class RegExp extends Object {
1682 RegExp(source, opts) { 1920 RegExp(source, opts) {
1683 let multiLine = opts && 'multiLine' in opts ? opts.multiLine : false; 1921 let multiLine = opts && 'multiLine' in opts ? opts.multiLine : false;
1684 let caseSensitive = opts && 'caseSensitive' in opts ? opts.caseSensitive : true; 1922 let caseSensitive = opts && 'caseSensitive' in opts ? opts.caseSensitive : true;
1685 return new _js_helper.JSSyntaxRegExp(source, {multiLine: multiLine, caseSe nsitive: caseSensitive}); 1923 return new _js_helper.JSSyntaxRegExp(source, {multiLine: multiLine, caseSe nsitive: caseSensitive});
1686 } 1924 }
1687 } 1925 }
1688 RegExp[dart.implements] = () => [Pattern]; 1926 RegExp[dart.implements] = () => [Pattern];
1927 dart.setSignature(RegExp, {});
1689 let Set$ = dart.generic(function(E) { 1928 let Set$ = dart.generic(function(E) {
1690 class Set extends collection.IterableBase$(E) { 1929 class Set extends collection.IterableBase$(E) {
1691 Set() { 1930 Set() {
1692 return new (collection.LinkedHashSet$(E))(); 1931 return new (collection.LinkedHashSet$(E))();
1693 } 1932 }
1694 identity() { 1933 identity() {
1695 return new (collection.LinkedHashSet$(E)).identity(); 1934 return new (collection.LinkedHashSet$(E)).identity();
1696 } 1935 }
1697 from(elements) { 1936 from(elements) {
1698 return new (collection.LinkedHashSet$(E)).from(elements); 1937 return new (collection.LinkedHashSet$(E)).from(elements);
1699 } 1938 }
1700 } 1939 }
1701 Set[dart.implements] = () => [_internal.EfficientLength]; 1940 Set[dart.implements] = () => [_internal.EfficientLength];
1702 dart.defineNamedConstructor(Set, 'identity'); 1941 dart.defineNamedConstructor(Set, 'identity');
1703 dart.defineNamedConstructor(Set, 'from'); 1942 dart.defineNamedConstructor(Set, 'from');
1943 dart.setSignature(Set, {});
1704 return Set; 1944 return Set;
1705 }); 1945 });
1706 dart.defineLazyClassGeneric(exports, 'Set', {get: Set$}); 1946 dart.defineLazyClassGeneric(exports, 'Set', {get: Set$});
1707 let Sink$ = dart.generic(function(T) { 1947 let Sink$ = dart.generic(function(T) {
1708 class Sink extends Object {} 1948 class Sink extends Object {}
1949 dart.setSignature(Sink, {});
1709 return Sink; 1950 return Sink;
1710 }); 1951 });
1711 let Sink = Sink$(); 1952 let Sink = Sink$();
1712 class StackTrace extends Object {} 1953 class StackTrace extends Object {}
1954 dart.setSignature(StackTrace, {});
1713 let _stop = dart.JsSymbol('_stop'); 1955 let _stop = dart.JsSymbol('_stop');
1714 class Stopwatch extends Object { 1956 class Stopwatch extends Object {
1715 get frequency() { 1957 get frequency() {
1716 return Stopwatch._frequency; 1958 return Stopwatch._frequency;
1717 } 1959 }
1718 Stopwatch() { 1960 Stopwatch() {
1719 this[_start] = null; 1961 this[_start] = null;
1720 this[_stop] = null; 1962 this[_stop] = null;
1721 Stopwatch._initTicker(); 1963 Stopwatch._initTicker();
1722 } 1964 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1762 return this[_start] != null && this[_stop] == null; 2004 return this[_start] != null && this[_stop] == null;
1763 } 2005 }
1764 static _initTicker() { 2006 static _initTicker() {
1765 _js_helper.Primitives.initTicker(); 2007 _js_helper.Primitives.initTicker();
1766 Stopwatch._frequency = _js_helper.Primitives.timerFrequency; 2008 Stopwatch._frequency = _js_helper.Primitives.timerFrequency;
1767 } 2009 }
1768 static _now() { 2010 static _now() {
1769 return dart.as(dart.dcall(_js_helper.Primitives.timerTicks), int); 2011 return dart.as(dart.dcall(_js_helper.Primitives.timerTicks), int);
1770 } 2012 }
1771 } 2013 }
2014 dart.setSignature(Stopwatch, {
2015 methods: () => ({
2016 start: dart.functionType(dart.void, []),
2017 stop: dart.functionType(dart.void, []),
2018 reset: dart.functionType(dart.void, [])
2019 }),
2020 statics: () => ({
2021 _initTicker: dart.functionType(dart.void, []),
2022 _now: dart.functionType(int, [])
2023 }),
2024 names: ['_initTicker', '_now']
2025 });
1772 Stopwatch._frequency = null; 2026 Stopwatch._frequency = null;
1773 class String extends Object { 2027 class String extends Object {
1774 fromCharCodes(charCodes, start, end) { 2028 fromCharCodes(charCodes, start, end) {
1775 if (start === void 0) 2029 if (start === void 0)
1776 start = 0; 2030 start = 0;
1777 if (end === void 0) 2031 if (end === void 0)
1778 end = null; 2032 end = null;
1779 if (!dart.is(charCodes, _interceptors.JSArray)) { 2033 if (!dart.is(charCodes, _interceptors.JSArray)) {
1780 return String._stringFromIterable(charCodes, start, end); 2034 return String._stringFromIterable(charCodes, start, end);
1781 } 2035 }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
1825 list[$add](it.current); 2079 list[$add](it.current);
1826 } 2080 }
1827 } 2081 }
1828 return _js_helper.Primitives.stringFromCharCodes(list); 2082 return _js_helper.Primitives.stringFromCharCodes(list);
1829 } 2083 }
1830 } 2084 }
1831 String[dart.implements] = () => [Comparable$(String), Pattern]; 2085 String[dart.implements] = () => [Comparable$(String), Pattern];
1832 dart.defineNamedConstructor(String, 'fromCharCodes'); 2086 dart.defineNamedConstructor(String, 'fromCharCodes');
1833 dart.defineNamedConstructor(String, 'fromCharCode'); 2087 dart.defineNamedConstructor(String, 'fromCharCode');
1834 dart.defineNamedConstructor(String, 'fromEnvironment'); 2088 dart.defineNamedConstructor(String, 'fromEnvironment');
2089 dart.setSignature(String, {
2090 statics: () => ({_stringFromIterable: dart.functionType(String, [Iterable$(i nt), int, int])}),
2091 names: ['_stringFromIterable']
2092 });
1835 dart.defineLazyClass(exports, { 2093 dart.defineLazyClass(exports, {
1836 get Runes() { 2094 get Runes() {
1837 class Runes extends collection.IterableBase$(int) { 2095 class Runes extends collection.IterableBase$(int) {
1838 Runes(string) { 2096 Runes(string) {
1839 this.string = string; 2097 this.string = string;
1840 super.IterableBase(); 2098 super.IterableBase();
1841 } 2099 }
1842 get [$iterator]() { 2100 get [$iterator]() {
1843 return new RuneIterator(this.string); 2101 return new RuneIterator(this.string);
1844 } 2102 }
1845 get [$last]() { 2103 get [$last]() {
1846 if (this.string.length == 0) { 2104 if (this.string.length == 0) {
1847 throw new StateError('No elements.'); 2105 throw new StateError('No elements.');
1848 } 2106 }
1849 let length = this.string.length; 2107 let length = this.string.length;
1850 let code = this.string.codeUnitAt(dart.notNull(length) - 1); 2108 let code = this.string.codeUnitAt(dart.notNull(length) - 1);
1851 if (dart.notNull(_isTrailSurrogate(code)) && dart.notNull(this.string. length) > 1) { 2109 if (dart.notNull(_isTrailSurrogate(code)) && dart.notNull(this.string. length) > 1) {
1852 let previousCode = this.string.codeUnitAt(dart.notNull(length) - 2); 2110 let previousCode = this.string.codeUnitAt(dart.notNull(length) - 2);
1853 if (_isLeadSurrogate(previousCode)) { 2111 if (_isLeadSurrogate(previousCode)) {
1854 return _combineSurrogatePair(previousCode, code); 2112 return _combineSurrogatePair(previousCode, code);
1855 } 2113 }
1856 } 2114 }
1857 return code; 2115 return code;
1858 } 2116 }
1859 } 2117 }
2118 dart.setSignature(Runes, {});
1860 return Runes; 2119 return Runes;
1861 } 2120 }
1862 }); 2121 });
1863 // Function _isLeadSurrogate: (int) → bool
1864 function _isLeadSurrogate(code) { 2122 function _isLeadSurrogate(code) {
1865 return (dart.notNull(code) & 64512) == 55296; 2123 return (dart.notNull(code) & 64512) == 55296;
1866 } 2124 }
1867 // Function _isTrailSurrogate: (int) → bool 2125 dart.fn(_isLeadSurrogate, bool, [int]);
1868 function _isTrailSurrogate(code) { 2126 function _isTrailSurrogate(code) {
1869 return (dart.notNull(code) & 64512) == 56320; 2127 return (dart.notNull(code) & 64512) == 56320;
1870 } 2128 }
1871 // Function _combineSurrogatePair: (int, int) → int 2129 dart.fn(_isTrailSurrogate, bool, [int]);
1872 function _combineSurrogatePair(start, end) { 2130 function _combineSurrogatePair(start, end) {
1873 return 65536 + ((dart.notNull(start) & 1023) << 10) + (dart.notNull(end) & 1 023); 2131 return 65536 + ((dart.notNull(start) & 1023) << 10) + (dart.notNull(end) & 1 023);
1874 } 2132 }
2133 dart.fn(_combineSurrogatePair, int, [int, int]);
1875 let _position = dart.JsSymbol('_position'); 2134 let _position = dart.JsSymbol('_position');
1876 let _nextPosition = dart.JsSymbol('_nextPosition'); 2135 let _nextPosition = dart.JsSymbol('_nextPosition');
1877 let _currentCodePoint = dart.JsSymbol('_currentCodePoint'); 2136 let _currentCodePoint = dart.JsSymbol('_currentCodePoint');
1878 let _checkSplitSurrogate = dart.JsSymbol('_checkSplitSurrogate'); 2137 let _checkSplitSurrogate = dart.JsSymbol('_checkSplitSurrogate');
1879 class RuneIterator extends Object { 2138 class RuneIterator extends Object {
1880 RuneIterator(string) { 2139 RuneIterator(string) {
1881 this.string = string; 2140 this.string = string;
1882 this[_position] = 0; 2141 this[_position] = 0;
1883 this[_nextPosition] = 0; 2142 this[_nextPosition] = 0;
1884 this[_currentCodePoint] = null; 2143 this[_currentCodePoint] = null;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
1961 return true; 2220 return true;
1962 } 2221 }
1963 } 2222 }
1964 this[_position] = position; 2223 this[_position] = position;
1965 this[_currentCodePoint] = codeUnit; 2224 this[_currentCodePoint] = codeUnit;
1966 return true; 2225 return true;
1967 } 2226 }
1968 } 2227 }
1969 RuneIterator[dart.implements] = () => [BidirectionalIterator$(int)]; 2228 RuneIterator[dart.implements] = () => [BidirectionalIterator$(int)];
1970 dart.defineNamedConstructor(RuneIterator, 'at'); 2229 dart.defineNamedConstructor(RuneIterator, 'at');
2230 dart.setSignature(RuneIterator, {
2231 methods: () => ({
2232 [_checkSplitSurrogate]: dart.functionType(dart.void, [int]),
2233 reset: dart.functionType(dart.void, [], [int]),
2234 moveNext: dart.functionType(bool, []),
2235 movePrevious: dart.functionType(bool, [])
2236 })
2237 });
1971 let _contents = dart.JsSymbol('_contents'); 2238 let _contents = dart.JsSymbol('_contents');
1972 let _writeString = dart.JsSymbol('_writeString'); 2239 let _writeString = dart.JsSymbol('_writeString');
1973 class StringBuffer extends Object { 2240 class StringBuffer extends Object {
1974 StringBuffer(content) { 2241 StringBuffer(content) {
1975 if (content === void 0) 2242 if (content === void 0)
1976 content = ""; 2243 content = "";
1977 this[_contents] = `${content}`; 2244 this[_contents] = `${content}`;
1978 } 2245 }
1979 get length() { 2246 get length() {
1980 return this[_contents].length; 2247 return this[_contents].length;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
2019 this[_contents] = ""; 2286 this[_contents] = "";
2020 } 2287 }
2021 toString() { 2288 toString() {
2022 return _js_helper.Primitives.flattenString(this[_contents]); 2289 return _js_helper.Primitives.flattenString(this[_contents]);
2023 } 2290 }
2024 [_writeString](str) { 2291 [_writeString](str) {
2025 this[_contents] = _js_helper.Primitives.stringConcatUnchecked(this[_conten ts], dart.as(str, String)); 2292 this[_contents] = _js_helper.Primitives.stringConcatUnchecked(this[_conten ts], dart.as(str, String));
2026 } 2293 }
2027 } 2294 }
2028 StringBuffer[dart.implements] = () => [StringSink]; 2295 StringBuffer[dart.implements] = () => [StringSink];
2296 dart.setSignature(StringBuffer, {
2297 methods: () => ({
2298 write: dart.functionType(dart.void, [Object]),
2299 writeCharCode: dart.functionType(dart.void, [int]),
2300 writeAll: dart.functionType(dart.void, [Iterable], [String]),
2301 writeln: dart.functionType(dart.void, [], [Object]),
2302 clear: dart.functionType(dart.void, []),
2303 toString: dart.functionType(String, []),
2304 [_writeString]: dart.functionType(dart.void, [dart.dynamic])
2305 })
2306 });
2029 class StringSink extends Object {} 2307 class StringSink extends Object {}
2308 dart.setSignature(StringSink, {});
2030 class Symbol extends Object { 2309 class Symbol extends Object {
2031 Symbol(name) { 2310 Symbol(name) {
2032 return new _internal.Symbol(name); 2311 return new _internal.Symbol(name);
2033 } 2312 }
2034 } 2313 }
2314 dart.setSignature(Symbol, {});
2035 class Type extends Object {} 2315 class Type extends Object {}
2316 dart.setSignature(Type, {});
2036 let _writeAuthority = dart.JsSymbol('_writeAuthority'); 2317 let _writeAuthority = dart.JsSymbol('_writeAuthority');
2037 let _userInfo = dart.JsSymbol('_userInfo'); 2318 let _userInfo = dart.JsSymbol('_userInfo');
2038 let _host = dart.JsSymbol('_host'); 2319 let _host = dart.JsSymbol('_host');
2039 let _port = dart.JsSymbol('_port'); 2320 let _port = dart.JsSymbol('_port');
2040 let _path = dart.JsSymbol('_path'); 2321 let _path = dart.JsSymbol('_path');
2041 let _query = dart.JsSymbol('_query'); 2322 let _query = dart.JsSymbol('_query');
2042 let _fragment = dart.JsSymbol('_fragment'); 2323 let _fragment = dart.JsSymbol('_fragment');
2043 let _pathSegments = dart.JsSymbol('_pathSegments'); 2324 let _pathSegments = dart.JsSymbol('_pathSegments');
2044 let _queryParameters = dart.JsSymbol('_queryParameters'); 2325 let _queryParameters = dart.JsSymbol('_queryParameters');
2045 let _merge = dart.JsSymbol('_merge'); 2326 let _merge = dart.JsSymbol('_merge');
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
2082 get path() { 2363 get path() {
2083 return this[_path]; 2364 return this[_path];
2084 } 2365 }
2085 get query() { 2366 get query() {
2086 return this[_query] == null ? "" : this[_query]; 2367 return this[_query] == null ? "" : this[_query];
2087 } 2368 }
2088 get fragment() { 2369 get fragment() {
2089 return this[_fragment] == null ? "" : this[_fragment]; 2370 return this[_fragment] == null ? "" : this[_fragment];
2090 } 2371 }
2091 static parse(uri) { 2372 static parse(uri) {
2092 // Function isRegName: (int) → bool
2093 let isRegName = ch => { 2373 let isRegName = ch => {
2094 return dart.notNull(ch) < 128 && dart.notNull(!dart.equals(dart.dsend(Ur i._regNameTable[$get](dart.notNull(ch) >> 4), '&', 1 << (dart.notNull(ch) & 15)) , 0)); 2374 return dart.notNull(ch) < 128 && dart.notNull(!dart.equals(dart.dsend(Ur i._regNameTable[$get](dart.notNull(ch) >> 4), '&', 1 << (dart.notNull(ch) & 15)) , 0));
2095 }; 2375 };
2376 dart.fn(isRegName, bool, [int]);
2096 let EOI = -1; 2377 let EOI = -1;
2097 let scheme = ""; 2378 let scheme = "";
2098 let userinfo = ""; 2379 let userinfo = "";
2099 let host = null; 2380 let host = null;
2100 let port = null; 2381 let port = null;
2101 let path = null; 2382 let path = null;
2102 let query = null; 2383 let query = null;
2103 let fragment = null; 2384 let fragment = null;
2104 let index = 0; 2385 let index = 0;
2105 let pathStart = 0; 2386 let pathStart = 0;
2106 let char = EOI; 2387 let char = EOI;
2107 // Function parseAuth: () → void
2108 let parseAuth = () => { 2388 let parseAuth = () => {
2109 if (index == uri.length) { 2389 if (index == uri.length) {
2110 char = EOI; 2390 char = EOI;
2111 return; 2391 return;
2112 } 2392 }
2113 let authStart = index; 2393 let authStart = index;
2114 let lastColon = -1; 2394 let lastColon = -1;
2115 let lastAt = -1; 2395 let lastAt = -1;
2116 char = uri.codeUnitAt(index); 2396 char = uri.codeUnitAt(index);
2117 while (dart.notNull(index) < dart.notNull(uri.length)) { 2397 while (dart.notNull(index) < dart.notNull(uri.length)) {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
2157 } 2437 }
2158 } 2438 }
2159 port = Uri._makePort(portNumber, scheme); 2439 port = Uri._makePort(portNumber, scheme);
2160 hostEnd = lastColon; 2440 hostEnd = lastColon;
2161 } 2441 }
2162 host = Uri._makeHost(uri, hostStart, hostEnd, true); 2442 host = Uri._makeHost(uri, hostStart, hostEnd, true);
2163 if (dart.notNull(index) < dart.notNull(uri.length)) { 2443 if (dart.notNull(index) < dart.notNull(uri.length)) {
2164 char = uri.codeUnitAt(index); 2444 char = uri.codeUnitAt(index);
2165 } 2445 }
2166 }; 2446 };
2447 dart.fn(parseAuth, dart.void, []);
2167 let NOT_IN_PATH = 0; 2448 let NOT_IN_PATH = 0;
2168 let IN_PATH = 1; 2449 let IN_PATH = 1;
2169 let ALLOW_AUTH = 2; 2450 let ALLOW_AUTH = 2;
2170 let state = NOT_IN_PATH; 2451 let state = NOT_IN_PATH;
2171 let i = index; 2452 let i = index;
2172 while (dart.notNull(i) < dart.notNull(uri.length)) { 2453 while (dart.notNull(i) < dart.notNull(uri.length)) {
2173 char = uri.codeUnitAt(i); 2454 char = uri.codeUnitAt(i);
2174 if (char == Uri._QUESTION || char == Uri._NUMBER_SIGN) { 2455 if (char == Uri._QUESTION || char == Uri._NUMBER_SIGN) {
2175 state = NOT_IN_PATH; 2456 state = NOT_IN_PATH;
2176 break; 2457 break;
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
2353 static get base() { 2634 static get base() {
2354 let uri = _js_helper.Primitives.currentUri(); 2635 let uri = _js_helper.Primitives.currentUri();
2355 if (uri != null) 2636 if (uri != null)
2356 return Uri.parse(uri); 2637 return Uri.parse(uri);
2357 throw new UnsupportedError("'Uri.base' is not supported"); 2638 throw new UnsupportedError("'Uri.base' is not supported");
2358 } 2639 }
2359 static get _isWindows() { 2640 static get _isWindows() {
2360 return false; 2641 return false;
2361 } 2642 }
2362 static _checkNonWindowsPathReservedCharacters(segments, argumentError) { 2643 static _checkNonWindowsPathReservedCharacters(segments, argumentError) {
2363 segments[$forEach](segment => { 2644 segments[$forEach](dart.fn(segment => {
2364 if (dart.dsend(segment, 'contains', "/")) { 2645 if (dart.dsend(segment, 'contains', "/")) {
2365 if (argumentError) { 2646 if (argumentError) {
2366 throw new ArgumentError(`Illegal path character ${segment}`); 2647 throw new ArgumentError(`Illegal path character ${segment}`);
2367 } else { 2648 } else {
2368 throw new UnsupportedError(`Illegal path character ${segment}`); 2649 throw new UnsupportedError(`Illegal path character ${segment}`);
2369 } 2650 }
2370 } 2651 }
2371 }); 2652 }));
2372 } 2653 }
2373 static _checkWindowsPathReservedCharacters(segments, argumentError, firstSeg ment) { 2654 static _checkWindowsPathReservedCharacters(segments, argumentError, firstSeg ment) {
2374 if (firstSegment === void 0) 2655 if (firstSegment === void 0)
2375 firstSegment = 0; 2656 firstSegment = 0;
2376 segments[$skip](firstSegment)[$forEach](segment => { 2657 segments[$skip](firstSegment)[$forEach](dart.fn(segment => {
2377 if (dart.dsend(segment, 'contains', new RegExp('["*/:<>?\\\\|]'))) { 2658 if (dart.dsend(segment, 'contains', new RegExp('["*/:<>?\\\\|]'))) {
2378 if (argumentError) { 2659 if (argumentError) {
2379 throw new ArgumentError("Illegal character in path"); 2660 throw new ArgumentError("Illegal character in path");
2380 } else { 2661 } else {
2381 throw new UnsupportedError("Illegal character in path"); 2662 throw new UnsupportedError("Illegal character in path");
2382 } 2663 }
2383 } 2664 }
2384 }); 2665 }));
2385 } 2666 }
2386 static _checkWindowsDriveLetter(charCode, argumentError) { 2667 static _checkWindowsDriveLetter(charCode, argumentError) {
2387 if (dart.notNull(Uri._UPPER_CASE_A) <= dart.notNull(charCode) && dart.notN ull(charCode) <= dart.notNull(Uri._UPPER_CASE_Z) || dart.notNull(Uri._LOWER_CASE _A) <= dart.notNull(charCode) && dart.notNull(charCode) <= dart.notNull(Uri._LOW ER_CASE_Z)) { 2668 if (dart.notNull(Uri._UPPER_CASE_A) <= dart.notNull(charCode) && dart.notN ull(charCode) <= dart.notNull(Uri._UPPER_CASE_Z) || dart.notNull(Uri._LOWER_CASE _A) <= dart.notNull(charCode) && dart.notNull(charCode) <= dart.notNull(Uri._LOW ER_CASE_Z)) {
2388 return; 2669 return;
2389 } 2670 }
2390 if (argumentError) { 2671 if (argumentError) {
2391 throw new ArgumentError("Illegal drive letter " + dart.notNull(new Strin g.fromCharCode(charCode))); 2672 throw new ArgumentError("Illegal drive letter " + dart.notNull(new Strin g.fromCharCode(charCode)));
2392 } else { 2673 } else {
2393 throw new UnsupportedError("Illegal drive letter " + dart.notNull(new St ring.fromCharCode(charCode))); 2674 throw new UnsupportedError("Illegal drive letter " + dart.notNull(new St ring.fromCharCode(charCode)));
2394 } 2675 }
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
2648 static _makePath(path, start, end, pathSegments, ensureLeadingSlash, isFile) { 2929 static _makePath(path, start, end, pathSegments, ensureLeadingSlash, isFile) {
2649 if (path == null && dart.notNull(pathSegments == null)) 2930 if (path == null && dart.notNull(pathSegments == null))
2650 return isFile ? "/" : ""; 2931 return isFile ? "/" : "";
2651 if (path != null && dart.notNull(pathSegments != null)) { 2932 if (path != null && dart.notNull(pathSegments != null)) {
2652 throw new ArgumentError('Both path and pathSegments specified'); 2933 throw new ArgumentError('Both path and pathSegments specified');
2653 } 2934 }
2654 let result = null; 2935 let result = null;
2655 if (path != null) { 2936 if (path != null) {
2656 result = Uri._normalize(path, start, end, dart.as(Uri._pathCharOrSlashTa ble, List$(int))); 2937 result = Uri._normalize(path, start, end, dart.as(Uri._pathCharOrSlashTa ble, List$(int)));
2657 } else { 2938 } else {
2658 result = pathSegments[$map](s => Uri._uriEncode(dart.as(Uri._pathCharTab le, List$(int)), dart.as(s, String)))[$join]("/"); 2939 result = pathSegments[$map](dart.fn(s => Uri._uriEncode(dart.as(Uri._pat hCharTable, List$(int)), dart.as(s, String)), String, [dart.dynamic]))[$join]("/ ");
2659 } 2940 }
2660 if (dart.dload(result, 'isEmpty')) { 2941 if (dart.dload(result, 'isEmpty')) {
2661 if (isFile) 2942 if (isFile)
2662 return "/"; 2943 return "/";
2663 } else if ((dart.notNull(isFile) || dart.notNull(ensureLeadingSlash)) && d art.notNull(!dart.equals(dart.dsend(result, 'codeUnitAt', 0), Uri._SLASH))) { 2944 } else if ((dart.notNull(isFile) || dart.notNull(ensureLeadingSlash)) && d art.notNull(!dart.equals(dart.dsend(result, 'codeUnitAt', 0), Uri._SLASH))) {
2664 return `/${result}`; 2945 return `/${result}`;
2665 } 2946 }
2666 return dart.as(result, String); 2947 return dart.as(result, String);
2667 } 2948 }
2668 static _makeQuery(query, start, end, queryParameters) { 2949 static _makeQuery(query, start, end, queryParameters) {
2669 if (query == null && dart.notNull(queryParameters == null)) 2950 if (query == null && dart.notNull(queryParameters == null))
2670 return null; 2951 return null;
2671 if (query != null && dart.notNull(queryParameters != null)) { 2952 if (query != null && dart.notNull(queryParameters != null)) {
2672 throw new ArgumentError('Both query and queryParameters specified'); 2953 throw new ArgumentError('Both query and queryParameters specified');
2673 } 2954 }
2674 if (query != null) 2955 if (query != null)
2675 return Uri._normalize(query, start, end, dart.as(Uri._queryCharTable, Li st$(int))); 2956 return Uri._normalize(query, start, end, dart.as(Uri._queryCharTable, Li st$(int)));
2676 let result = new StringBuffer(); 2957 let result = new StringBuffer();
2677 let first = true; 2958 let first = true;
2678 queryParameters.forEach((key, value) => { 2959 queryParameters.forEach(dart.fn((key, value) => {
2679 if (!dart.notNull(first)) { 2960 if (!dart.notNull(first)) {
2680 result.write("&"); 2961 result.write("&");
2681 } 2962 }
2682 first = false; 2963 first = false;
2683 result.write(Uri.encodeQueryComponent(dart.as(key, String))); 2964 result.write(Uri.encodeQueryComponent(dart.as(key, String)));
2684 if (dart.notNull(value != null) && dart.notNull(dart.dsend(dart.dload(va lue, 'isEmpty'), '!'))) { 2965 if (dart.notNull(value != null) && dart.notNull(dart.dsend(dart.dload(va lue, 'isEmpty'), '!'))) {
2685 result.write("="); 2966 result.write("=");
2686 result.write(Uri.encodeQueryComponent(dart.as(value, String))); 2967 result.write(Uri.encodeQueryComponent(dart.as(value, String)));
2687 } 2968 }
2688 }); 2969 }));
2689 return dart.toString(result); 2970 return dart.toString(result);
2690 } 2971 }
2691 static _makeFragment(fragment, start, end) { 2972 static _makeFragment(fragment, start, end) {
2692 if (fragment == null) 2973 if (fragment == null)
2693 return null; 2974 return null;
2694 return Uri._normalize(fragment, start, end, dart.as(Uri._queryCharTable, L ist$(int))); 2975 return Uri._normalize(fragment, start, end, dart.as(Uri._queryCharTable, L ist$(int)));
2695 } 2976 }
2696 static _stringOrNullLength(s) { 2977 static _stringOrNullLength(s) {
2697 return s == null ? 0 : s.length; 2978 return s == null ? 0 : s.length;
2698 } 2979 }
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
3043 } 3324 }
3044 return dart.toString(sb); 3325 return dart.toString(sb);
3045 } 3326 }
3046 ['=='](other) { 3327 ['=='](other) {
3047 if (!dart.is(other, Uri)) 3328 if (!dart.is(other, Uri))
3048 return false; 3329 return false;
3049 let uri = dart.as(other, Uri); 3330 let uri = dart.as(other, Uri);
3050 return this.scheme == uri.scheme && this.hasAuthority == uri.hasAuthority && this.userInfo == uri.userInfo && this.host == uri.host && this.port == uri.po rt && this.path == uri.path && this.hasQuery == uri.hasQuery && this.query == ur i.query && this.hasFragment == uri.hasFragment && this.fragment == uri.fragment; 3331 return this.scheme == uri.scheme && this.hasAuthority == uri.hasAuthority && this.userInfo == uri.userInfo && this.host == uri.host && this.port == uri.po rt && this.path == uri.path && this.hasQuery == uri.hasQuery && this.query == ur i.query && this.hasFragment == uri.hasFragment && this.fragment == uri.fragment;
3051 } 3332 }
3052 get hashCode() { 3333 get hashCode() {
3053 // Function combine: (dynamic, dynamic) → int
3054 let combine = (part, current) => { 3334 let combine = (part, current) => {
3055 return dart.as(dart.dsend(dart.dsend(dart.dsend(current, '*', 31), '+', dart.hashCode(part)), '&', 1073741823), int); 3335 return dart.as(dart.dsend(dart.dsend(dart.dsend(current, '*', 31), '+', dart.hashCode(part)), '&', 1073741823), int);
3056 }; 3336 };
3337 dart.fn(combine, int, [dart.dynamic, dart.dynamic]);
3057 return combine(this.scheme, combine(this.userInfo, combine(this.host, comb ine(this.port, combine(this.path, combine(this.query, combine(this.fragment, 1)) ))))); 3338 return combine(this.scheme, combine(this.userInfo, combine(this.host, comb ine(this.port, combine(this.path, combine(this.query, combine(this.fragment, 1)) )))));
3058 } 3339 }
3059 static _addIfNonEmpty(sb, test, first, second) { 3340 static _addIfNonEmpty(sb, test, first, second) {
3060 if ("" != test) { 3341 if ("" != test) {
3061 sb.write(first); 3342 sb.write(first);
3062 sb.write(second); 3343 sb.write(second);
3063 } 3344 }
3064 } 3345 }
3065 static encodeComponent(component) { 3346 static encodeComponent(component) {
3066 return Uri._uriEncode(dart.as(Uri._unreserved2396Table, List$(int)), compo nent); 3347 return Uri._uriEncode(dart.as(Uri._unreserved2396Table, List$(int)), compo nent);
(...skipping 10 matching lines...) Expand all
3077 return Uri._uriDecode(encodedComponent, {plusToSpace: true, encoding: enco ding}); 3358 return Uri._uriDecode(encodedComponent, {plusToSpace: true, encoding: enco ding});
3078 } 3359 }
3079 static encodeFull(uri) { 3360 static encodeFull(uri) {
3080 return Uri._uriEncode(dart.as(Uri._encodeFullTable, List$(int)), uri); 3361 return Uri._uriEncode(dart.as(Uri._encodeFullTable, List$(int)), uri);
3081 } 3362 }
3082 static decodeFull(uri) { 3363 static decodeFull(uri) {
3083 return Uri._uriDecode(uri); 3364 return Uri._uriDecode(uri);
3084 } 3365 }
3085 static splitQueryString(query, opts) { 3366 static splitQueryString(query, opts) {
3086 let encoding = opts && 'encoding' in opts ? opts.encoding : convert.UTF8; 3367 let encoding = opts && 'encoding' in opts ? opts.encoding : convert.UTF8;
3087 return dart.as(query.split("&")[$fold](dart.map(), (map, element) => { 3368 return dart.as(query.split("&")[$fold](dart.map(), dart.fn((map, element) => {
3088 let index = dart.as(dart.dsend(element, 'indexOf', "="), int); 3369 let index = dart.as(dart.dsend(element, 'indexOf', "="), int);
3089 if (index == -1) { 3370 if (index == -1) {
3090 if (!dart.equals(element, "")) { 3371 if (!dart.equals(element, "")) {
3091 dart.dsetindex(map, Uri.decodeQueryComponent(dart.as(element, String ), {encoding: encoding}), ""); 3372 dart.dsetindex(map, Uri.decodeQueryComponent(dart.as(element, String ), {encoding: encoding}), "");
3092 } 3373 }
3093 } else if (index != 0) { 3374 } else if (index != 0) {
3094 let key = dart.dsend(element, 'substring', 0, index); 3375 let key = dart.dsend(element, 'substring', 0, index);
3095 let value = dart.dsend(element, 'substring', dart.notNull(index) + 1); 3376 let value = dart.dsend(element, 'substring', dart.notNull(index) + 1);
3096 dart.dsetindex(map, Uri.decodeQueryComponent(dart.as(key, String), {en coding: encoding}), Uri.decodeQueryComponent(dart.as(value, String), {encoding: encoding})); 3377 dart.dsetindex(map, Uri.decodeQueryComponent(dart.as(key, String), {en coding: encoding}), Uri.decodeQueryComponent(dart.as(value, String), {encoding: encoding}));
3097 } 3378 }
3098 return map; 3379 return map;
3099 }), Map$(String, String)); 3380 })), Map$(String, String));
3100 } 3381 }
3101 static parseIPv4Address(host) { 3382 static parseIPv4Address(host) {
3102 // Function error: (String) → void
3103 let error = msg => { 3383 let error = msg => {
3104 throw new FormatException(`Illegal IPv4 address, ${msg}`); 3384 throw new FormatException(`Illegal IPv4 address, ${msg}`);
3105 }; 3385 };
3386 dart.fn(error, dart.void, [String]);
3106 let bytes = host.split('.'); 3387 let bytes = host.split('.');
3107 if (bytes[$length] != 4) { 3388 if (bytes[$length] != 4) {
3108 error('IPv4 address should contain exactly 4 parts'); 3389 error('IPv4 address should contain exactly 4 parts');
3109 } 3390 }
3110 return dart.as(bytes[$map](byteString => { 3391 return dart.as(bytes[$map](dart.fn(byteString => {
3111 let byte = int.parse(dart.as(byteString, String)); 3392 let byte = int.parse(dart.as(byteString, String));
3112 if (dart.notNull(byte) < 0 || dart.notNull(byte) > 255) { 3393 if (dart.notNull(byte) < 0 || dart.notNull(byte) > 255) {
3113 error('each part must be in the range of `0..255`'); 3394 error('each part must be in the range of `0..255`');
3114 } 3395 }
3115 return byte; 3396 return byte;
3116 })[$toList](), List$(int)); 3397 }))[$toList](), List$(int));
3117 } 3398 }
3118 static parseIPv6Address(host, start, end) { 3399 static parseIPv6Address(host, start, end) {
3119 if (start === void 0) 3400 if (start === void 0)
3120 start = 0; 3401 start = 0;
3121 if (end === void 0) 3402 if (end === void 0)
3122 end = null; 3403 end = null;
3123 if (end == null) 3404 if (end == null)
3124 end = host.length; 3405 end = host.length;
3125 // Function error: (String, [dynamic]) → void
3126 let error = (msg, position) => { 3406 let error = (msg, position) => {
3127 if (position === void 0) 3407 if (position === void 0)
3128 position = null; 3408 position = null;
3129 throw new FormatException(`Illegal IPv6 address, ${msg}`, host, dart.as( position, int)); 3409 throw new FormatException(`Illegal IPv6 address, ${msg}`, host, dart.as( position, int));
3130 }; 3410 };
3131 // Function parseHex: (int, int) → int 3411 dart.fn(error, dart.void, [String], [dart.dynamic]);
3132 let parseHex = (start, end) => { 3412 let parseHex = (start, end) => {
3133 if (dart.notNull(end) - dart.notNull(start) > 4) { 3413 if (dart.notNull(end) - dart.notNull(start) > 4) {
3134 error('an IPv6 part can only contain a maximum of 4 hex digits', start ); 3414 error('an IPv6 part can only contain a maximum of 4 hex digits', start );
3135 } 3415 }
3136 let value = int.parse(host.substring(start, end), {radix: 16}); 3416 let value = int.parse(host.substring(start, end), {radix: 16});
3137 if (dart.notNull(value) < 0 || dart.notNull(value) > (1 << 16) - 1) { 3417 if (dart.notNull(value) < 0 || dart.notNull(value) > (1 << 16) - 1) {
3138 error('each part must be in the range of `0x0..0xFFFF`', start); 3418 error('each part must be in the range of `0x0..0xFFFF`', start);
3139 } 3419 }
3140 return value; 3420 return value;
3141 }; 3421 };
3422 dart.fn(parseHex, int, [int, int]);
3142 if (dart.notNull(host.length) < 2) 3423 if (dart.notNull(host.length) < 2)
3143 error('address is too short'); 3424 error('address is too short');
3144 let parts = dart.setType([], List$(int)); 3425 let parts = dart.setType([], List$(int));
3145 let wildcardSeen = false; 3426 let wildcardSeen = false;
3146 let partStart = start; 3427 let partStart = start;
3147 for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNull( i) + 1) { 3428 for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNull( i) + 1) {
3148 if (host.codeUnitAt(i) == Uri._COLON) { 3429 if (host.codeUnitAt(i) == Uri._COLON) {
3149 if (i == start) { 3430 if (i == start) {
3150 i = dart.notNull(i) + 1; 3431 i = dart.notNull(i) + 1;
3151 if (host.codeUnitAt(i) != Uri._COLON) { 3432 if (host.codeUnitAt(i) != Uri._COLON) {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
3208 bytes[$set](index, dart.notNull(value) >> 8); 3489 bytes[$set](index, dart.notNull(value) >> 8);
3209 bytes[$set](dart.notNull(index) + 1, dart.notNull(value) & 255); 3490 bytes[$set](dart.notNull(index) + 1, dart.notNull(value) & 255);
3210 index = dart.notNull(index) + 2; 3491 index = dart.notNull(index) + 2;
3211 } 3492 }
3212 } 3493 }
3213 return dart.as(bytes, List$(int)); 3494 return dart.as(bytes, List$(int));
3214 } 3495 }
3215 static _uriEncode(canonicalTable, text, opts) { 3496 static _uriEncode(canonicalTable, text, opts) {
3216 let encoding = opts && 'encoding' in opts ? opts.encoding : convert.UTF8; 3497 let encoding = opts && 'encoding' in opts ? opts.encoding : convert.UTF8;
3217 let spaceToPlus = opts && 'spaceToPlus' in opts ? opts.spaceToPlus : false ; 3498 let spaceToPlus = opts && 'spaceToPlus' in opts ? opts.spaceToPlus : false ;
3218 // Function byteToHex: (dynamic, dynamic) → dynamic
3219 let byteToHex = (byte, buffer) => { 3499 let byteToHex = (byte, buffer) => {
3220 let hex = '0123456789ABCDEF'; 3500 let hex = '0123456789ABCDEF';
3221 dart.dsend(buffer, 'writeCharCode', hex.codeUnitAt(dart.as(dart.dsend(by te, '>>', 4), int))); 3501 dart.dsend(buffer, 'writeCharCode', hex.codeUnitAt(dart.as(dart.dsend(by te, '>>', 4), int)));
3222 dart.dsend(buffer, 'writeCharCode', hex.codeUnitAt(dart.as(dart.dsend(by te, '&', 15), int))); 3502 dart.dsend(buffer, 'writeCharCode', hex.codeUnitAt(dart.as(dart.dsend(by te, '&', 15), int)));
3223 }; 3503 };
3504 dart.fn(byteToHex);
3224 let result = new StringBuffer(); 3505 let result = new StringBuffer();
3225 let bytes = encoding.encode(text); 3506 let bytes = encoding.encode(text);
3226 for (let i = 0; dart.notNull(i) < dart.notNull(bytes[$length]); i = dart.n otNull(i) + 1) { 3507 for (let i = 0; dart.notNull(i) < dart.notNull(bytes[$length]); i = dart.n otNull(i) + 1) {
3227 let byte = bytes[$get](i); 3508 let byte = bytes[$get](i);
3228 if (dart.notNull(byte) < 128 && (dart.notNull(canonicalTable[$get](dart. notNull(byte) >> 4)) & 1 << (dart.notNull(byte) & 15)) != 0) { 3509 if (dart.notNull(byte) < 128 && (dart.notNull(canonicalTable[$get](dart. notNull(byte) >> 4)) & 1 << (dart.notNull(byte) & 15)) != 0) {
3229 result.writeCharCode(byte); 3510 result.writeCharCode(byte);
3230 } else if (dart.notNull(spaceToPlus) && byte == Uri._SPACE) { 3511 } else if (dart.notNull(spaceToPlus) && byte == Uri._SPACE) {
3231 result.writeCharCode(Uri._PLUS); 3512 result.writeCharCode(Uri._PLUS);
3232 } else { 3513 } else {
3233 result.writeCharCode(Uri._PERCENT); 3514 result.writeCharCode(Uri._PERCENT);
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
3291 return encoding.decode(bytes); 3572 return encoding.decode(bytes);
3292 } 3573 }
3293 static _isAlphabeticCharacter(codeUnit) { 3574 static _isAlphabeticCharacter(codeUnit) {
3294 return dart.notNull(codeUnit) >= dart.notNull(Uri._LOWER_CASE_A) && dart.n otNull(codeUnit) <= dart.notNull(Uri._LOWER_CASE_Z) || dart.notNull(codeUnit) >= dart.notNull(Uri._UPPER_CASE_A) && dart.notNull(codeUnit) <= dart.notNull(Uri._ UPPER_CASE_Z); 3575 return dart.notNull(codeUnit) >= dart.notNull(Uri._LOWER_CASE_A) && dart.n otNull(codeUnit) <= dart.notNull(Uri._LOWER_CASE_Z) || dart.notNull(codeUnit) >= dart.notNull(Uri._UPPER_CASE_A) && dart.notNull(codeUnit) <= dart.notNull(Uri._ UPPER_CASE_Z);
3295 } 3576 }
3296 } 3577 }
3297 dart.defineNamedConstructor(Uri, '_internal'); 3578 dart.defineNamedConstructor(Uri, '_internal');
3298 dart.defineNamedConstructor(Uri, 'http'); 3579 dart.defineNamedConstructor(Uri, 'http');
3299 dart.defineNamedConstructor(Uri, 'https'); 3580 dart.defineNamedConstructor(Uri, 'https');
3300 dart.defineNamedConstructor(Uri, 'file'); 3581 dart.defineNamedConstructor(Uri, 'file');
3582 dart.setSignature(Uri, {
3583 methods: () => ({
3584 replace: dart.functionType(Uri, [], {chem: String, serInf: String, os: Str ing, or: int, at: String, athSegment: Iterable$(String), uer: String, ueryParame ter: Map$(String, String), ragmen: String}),
3585 [_merge]: dart.functionType(String, [String, String]),
3586 [_hasDotSegments]: dart.functionType(bool, [String]),
3587 [_removeDotSegments]: dart.functionType(String, [String]),
3588 resolve: dart.functionType(Uri, [String]),
3589 resolveUri: dart.functionType(Uri, [Uri]),
3590 toFilePath: dart.functionType(String, [], {indow: bool}),
3591 [_toFilePath]: dart.functionType(String, []),
3592 [_toWindowsFilePath]: dart.functionType(String, []),
3593 [_writeAuthority]: dart.functionType(dart.void, [StringSink]),
3594 toString: dart.functionType(String, []),
3595 '==': dart.functionType(bool, [dart.dynamic])
3596 }),
3597 statics: () => ({
3598 _defaultPort: dart.functionType(int, [String]),
3599 parse: dart.functionType(Uri, [String]),
3600 _fail: dart.functionType(dart.void, [String, int, String]),
3601 _makeHttpUri: dart.functionType(Uri, [String, String, String, Map$(String, String)]),
3602 _checkNonWindowsPathReservedCharacters: dart.functionType(dart.dynamic, [L ist$(String), bool]),
3603 _checkWindowsPathReservedCharacters: dart.functionType(dart.dynamic, [List $(String), bool], [int]),
3604 _checkWindowsDriveLetter: dart.functionType(dart.dynamic, [int, bool]),
3605 _makeFileUri: dart.functionType(dart.dynamic, [String]),
3606 _makeWindowsFileUrl: dart.functionType(dart.dynamic, [String]),
3607 _makePort: dart.functionType(int, [int, String]),
3608 _makeHost: dart.functionType(String, [String, int, int, bool]),
3609 _isRegNameChar: dart.functionType(bool, [int]),
3610 _normalizeRegName: dart.functionType(String, [String, int, int]),
3611 _makeScheme: dart.functionType(String, [String, int]),
3612 _makeUserInfo: dart.functionType(String, [String, int, int]),
3613 _makePath: dart.functionType(String, [String, int, int, Iterable$(String), bool, bool]),
3614 _makeQuery: dart.functionType(String, [String, int, int, Map$(String, Stri ng)]),
3615 _makeFragment: dart.functionType(String, [String, int, int]),
3616 _stringOrNullLength: dart.functionType(int, [String]),
3617 _isHexDigit: dart.functionType(bool, [int]),
3618 _hexValue: dart.functionType(int, [int]),
3619 _normalizeEscape: dart.functionType(String, [String, int, bool]),
3620 _isUnreservedChar: dart.functionType(bool, [int]),
3621 _escapeChar: dart.functionType(String, [dart.dynamic]),
3622 _normalize: dart.functionType(String, [String, int, int, List$(int)]),
3623 _isSchemeCharacter: dart.functionType(bool, [int]),
3624 _isGeneralDelimiter: dart.functionType(bool, [int]),
3625 _addIfNonEmpty: dart.functionType(dart.void, [StringBuffer, String, String , String]),
3626 encodeComponent: dart.functionType(String, [String]),
3627 encodeQueryComponent: dart.functionType(String, [String], {ncodin: convert .Encoding}),
3628 decodeComponent: dart.functionType(String, [String]),
3629 decodeQueryComponent: dart.functionType(String, [String], {ncodin: convert .Encoding}),
3630 encodeFull: dart.functionType(String, [String]),
3631 decodeFull: dart.functionType(String, [String]),
3632 splitQueryString: dart.functionType(Map$(String, String), [String], {ncodi n: convert.Encoding}),
3633 parseIPv4Address: dart.functionType(List$(int), [String]),
3634 parseIPv6Address: dart.functionType(List$(int), [String], [int, int]),
3635 _uriEncode: dart.functionType(String, [List$(int), String], {ncodin: conve rt.Encoding, paceToPlu: bool}),
3636 _hexCharPairToByte: dart.functionType(int, [String, int]),
3637 _uriDecode: dart.functionType(String, [String], {lusToSpac: bool, ncodin: convert.Encoding}),
3638 _isAlphabeticCharacter: dart.functionType(bool, [int])
3639 }),
3640 names: ['_defaultPort', 'parse', '_fail', '_makeHttpUri', '_checkNonWindowsP athReservedCharacters', '_checkWindowsPathReservedCharacters', '_checkWindowsDri veLetter', '_makeFileUri', '_makeWindowsFileUrl', '_makePort', '_makeHost', '_is RegNameChar', '_normalizeRegName', '_makeScheme', '_makeUserInfo', '_makePath', '_makeQuery', '_makeFragment', '_stringOrNullLength', '_isHexDigit', '_hexValue' , '_normalizeEscape', '_isUnreservedChar', '_escapeChar', '_normalize', '_isSche meCharacter', '_isGeneralDelimiter', '_addIfNonEmpty', 'encodeComponent', 'encod eQueryComponent', 'decodeComponent', 'decodeQueryComponent', 'encodeFull', 'deco deFull', 'splitQueryString', 'parseIPv4Address', 'parseIPv6Address', '_uriEncode ', '_hexCharPairToByte', '_uriDecode', '_isAlphabeticCharacter']
3641 });
3301 Uri._SPACE = 32; 3642 Uri._SPACE = 32;
3302 Uri._DOUBLE_QUOTE = 34; 3643 Uri._DOUBLE_QUOTE = 34;
3303 Uri._NUMBER_SIGN = 35; 3644 Uri._NUMBER_SIGN = 35;
3304 Uri._PERCENT = 37; 3645 Uri._PERCENT = 37;
3305 Uri._ASTERISK = 42; 3646 Uri._ASTERISK = 42;
3306 Uri._PLUS = 43; 3647 Uri._PLUS = 43;
3307 Uri._DOT = 46; 3648 Uri._DOT = 46;
3308 Uri._SLASH = 47; 3649 Uri._SLASH = 47;
3309 Uri._ZERO = 48; 3650 Uri._ZERO = 48;
3310 Uri._NINE = 57; 3651 Uri._NINE = 57;
(...skipping 17 matching lines...) Expand all
3328 Uri._encodeFullTable = dart.const([0, 0, 65498, 45055, 65535, 34815, 65534, 18 431]); 3669 Uri._encodeFullTable = dart.const([0, 0, 65498, 45055, 65535, 34815, 65534, 18 431]);
3329 Uri._schemeTable = dart.const([0, 0, 26624, 1023, 65534, 2047, 65534, 2047]); 3670 Uri._schemeTable = dart.const([0, 0, 26624, 1023, 65534, 2047, 65534, 2047]);
3330 Uri._schemeLowerTable = dart.const([0, 0, 26624, 1023, 0, 0, 65534, 2047]); 3671 Uri._schemeLowerTable = dart.const([0, 0, 26624, 1023, 0, 0, 65534, 2047]);
3331 Uri._subDelimitersTable = dart.const([0, 0, 32722, 11263, 65534, 34815, 65534, 18431]); 3672 Uri._subDelimitersTable = dart.const([0, 0, 32722, 11263, 65534, 34815, 65534, 18431]);
3332 Uri._genDelimitersTable = dart.const([0, 0, 32776, 33792, 1, 10240, 0, 0]); 3673 Uri._genDelimitersTable = dart.const([0, 0, 32776, 33792, 1, 10240, 0, 0]);
3333 Uri._userinfoTable = dart.const([0, 0, 32722, 12287, 65534, 34815, 65534, 1843 1]); 3674 Uri._userinfoTable = dart.const([0, 0, 32722, 12287, 65534, 34815, 65534, 1843 1]);
3334 Uri._regNameTable = dart.const([0, 0, 32754, 11263, 65534, 34815, 65534, 18431 ]); 3675 Uri._regNameTable = dart.const([0, 0, 32754, 11263, 65534, 34815, 65534, 18431 ]);
3335 Uri._pathCharTable = dart.const([0, 0, 32722, 12287, 65535, 34815, 65534, 1843 1]); 3676 Uri._pathCharTable = dart.const([0, 0, 32722, 12287, 65535, 34815, 65534, 1843 1]);
3336 Uri._pathCharOrSlashTable = dart.const([0, 0, 65490, 12287, 65535, 34815, 6553 4, 18431]); 3677 Uri._pathCharOrSlashTable = dart.const([0, 0, 65490, 12287, 65535, 34815, 6553 4, 18431]);
3337 Uri._queryCharTable = dart.const([0, 0, 65490, 45055, 65535, 34815, 65534, 184 31]); 3678 Uri._queryCharTable = dart.const([0, 0, 65490, 45055, 65535, 34815, 65534, 184 31]);
3338 // Function _symbolToString: (Symbol) → String
3339 function _symbolToString(symbol) { 3679 function _symbolToString(symbol) {
3340 return _internal.Symbol.getName(dart.as(symbol, _internal.Symbol)); 3680 return _internal.Symbol.getName(dart.as(symbol, _internal.Symbol));
3341 } 3681 }
3342 // Function _symbolMapToStringMap: (Map<Symbol, dynamic>) → dynamic 3682 dart.fn(_symbolToString, String, [Symbol]);
3343 function _symbolMapToStringMap(map) { 3683 function _symbolMapToStringMap(map) {
3344 if (map == null) 3684 if (map == null)
3345 return null; 3685 return null;
3346 let result = new (Map$(String, dart.dynamic))(); 3686 let result = new (Map$(String, dart.dynamic))();
3347 map.forEach((key, value) => { 3687 map.forEach(dart.fn((key, value) => {
3348 result.set(_symbolToString(key), value); 3688 result.set(_symbolToString(key), value);
3349 }); 3689 }, dart.dynamic, [Symbol, dart.dynamic]));
3350 return result; 3690 return result;
3351 } 3691 }
3692 dart.fn(_symbolMapToStringMap, dart.dynamic, [Map$(Symbol, dart.dynamic)]);
3352 class SupportJsExtensionMethods extends Object { 3693 class SupportJsExtensionMethods extends Object {
3353 SupportJsExtensionMethods() { 3694 SupportJsExtensionMethods() {
3354 } 3695 }
3355 } 3696 }
3697 dart.setSignature(SupportJsExtensionMethods, {});
3356 class _ListConstructorSentinel extends Object { 3698 class _ListConstructorSentinel extends Object {
3357 _ListConstructorSentinel() { 3699 _ListConstructorSentinel() {
3358 } 3700 }
3359 } 3701 }
3702 dart.setSignature(_ListConstructorSentinel, {});
3360 // Exports: 3703 // Exports:
3361 exports.Object = Object; 3704 exports.Object = Object;
3362 exports.JsName = JsName; 3705 exports.JsName = JsName;
3363 exports.JsPeerInterface = JsPeerInterface; 3706 exports.JsPeerInterface = JsPeerInterface;
3364 exports.SupportJsExtensionMethod = SupportJsExtensionMethod; 3707 exports.SupportJsExtensionMethod = SupportJsExtensionMethod;
3365 exports.Deprecated = Deprecated; 3708 exports.Deprecated = Deprecated;
3366 exports.deprecated = deprecated; 3709 exports.deprecated = deprecated;
3367 exports.override = override; 3710 exports.override = override;
3368 exports.proxy = proxy; 3711 exports.proxy = proxy;
3369 exports.bool = bool; 3712 exports.bool = bool;
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
3480 exports.StackTrace = StackTrace; 3823 exports.StackTrace = StackTrace;
3481 exports.Stopwatch = Stopwatch; 3824 exports.Stopwatch = Stopwatch;
3482 exports.String = String; 3825 exports.String = String;
3483 exports.RuneIterator = RuneIterator; 3826 exports.RuneIterator = RuneIterator;
3484 exports.StringBuffer = StringBuffer; 3827 exports.StringBuffer = StringBuffer;
3485 exports.StringSink = StringSink; 3828 exports.StringSink = StringSink;
3486 exports.Symbol = Symbol; 3829 exports.Symbol = Symbol;
3487 exports.Type = Type; 3830 exports.Type = Type;
3488 exports.Uri = Uri; 3831 exports.Uri = Uri;
3489 exports.SupportJsExtensionMethods = SupportJsExtensionMethods; 3832 exports.SupportJsExtensionMethods = SupportJsExtensionMethods;
3490 })(core, _js_helper, _internal, collection, _interceptors, convert); 3833 })(core, _js_helper, _internal, collection, _interceptors, math, convert);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698