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

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

Issue 1083763003: refactor emitMemberName to be used more consistently (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 8 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; 1 var core;
2 (function(exports) { 2 (function(exports) {
3 'use strict'; 3 'use strict';
4 class Object { 4 class Object {
5 constructor() { 5 constructor() {
6 let name = this.constructor.name; 6 let name = this.constructor.name;
7 let init = this[name]; 7 let init = this[name];
8 let result = void 0; 8 let result = void 0;
9 if (init) 9 if (init)
10 result = init.apply(this, arguments); 10 result = init.apply(this, arguments);
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 let isUtc = opts && 'isUtc' in opts ? opts.isUtc : false; 197 let isUtc = opts && 'isUtc' in opts ? opts.isUtc : false;
198 this.millisecondsSinceEpoch = millisecondsSinceEpoch; 198 this.millisecondsSinceEpoch = millisecondsSinceEpoch;
199 this.isUtc = isUtc; 199 this.isUtc = isUtc;
200 if (dart.notNull(millisecondsSinceEpoch.abs()) > dart.notNull(DateTime[_MA X_MILLISECONDS_SINCE_EPOCH])) { 200 if (dart.notNull(millisecondsSinceEpoch.abs()) > dart.notNull(DateTime[_MA X_MILLISECONDS_SINCE_EPOCH])) {
201 throw new ArgumentError(millisecondsSinceEpoch); 201 throw new ArgumentError(millisecondsSinceEpoch);
202 } 202 }
203 if (isUtc == null) 203 if (isUtc == null)
204 throw new ArgumentError(isUtc); 204 throw new ArgumentError(isUtc);
205 } 205 }
206 ['=='](other) { 206 ['=='](other) {
207 if (!dart.notNull(dart.is(other, DateTime))) 207 if (!dart.is(other, DateTime))
208 return false; 208 return false;
209 return dart.equals(this.millisecondsSinceEpoch, dart.dload(other, 'millise condsSinceEpoch')) && dart.equals(this.isUtc, dart.dload(other, 'isUtc')); 209 return dart.equals(this.millisecondsSinceEpoch, dart.dload(other, 'millise condsSinceEpoch')) && dart.equals(this.isUtc, dart.dload(other, 'isUtc'));
210 } 210 }
211 isBefore(other) { 211 isBefore(other) {
212 return dart.notNull(this.millisecondsSinceEpoch) < dart.notNull(other.mill isecondsSinceEpoch); 212 return dart.notNull(this.millisecondsSinceEpoch) < dart.notNull(other.mill isecondsSinceEpoch);
213 } 213 }
214 isAfter(other) { 214 isAfter(other) {
215 return dart.notNull(this.millisecondsSinceEpoch) > dart.notNull(other.mill isecondsSinceEpoch); 215 return dart.notNull(this.millisecondsSinceEpoch) > dart.notNull(other.mill isecondsSinceEpoch);
216 } 216 }
217 isAtSameMomentAs(other) { 217 isAtSameMomentAs(other) {
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 } 478 }
479 get inMilliseconds() { 479 get inMilliseconds() {
480 return (dart.notNull(this[_duration]) / dart.notNull(Duration.MICROSECONDS _PER_MILLISECOND)).truncate(); 480 return (dart.notNull(this[_duration]) / dart.notNull(Duration.MICROSECONDS _PER_MILLISECOND)).truncate();
481 } 481 }
482 get inMicroseconds() { 482 get inMicroseconds() {
483 return this[_duration]; 483 return this[_duration];
484 } 484 }
485 ['=='](other) { 485 ['=='](other) {
486 if (!dart.is(other, Duration)) 486 if (!dart.is(other, Duration))
487 return false; 487 return false;
488 return dart.equals(this[_duration], dart.dload(other, '_duration')); 488 return dart.equals(this[_duration], dart.dload(other, _duration));
489 } 489 }
490 get hashCode() { 490 get hashCode() {
491 return this[_duration].hashCode; 491 return this[_duration].hashCode;
492 } 492 }
493 compareTo(other) { 493 compareTo(other) {
494 return this[_duration].compareTo(other[_duration]); 494 return this[_duration].compareTo(other[_duration]);
495 } 495 }
496 toString() { 496 toString() {
497 // Function sixDigits: (int) → String 497 // Function sixDigits: (int) → String
498 function sixDigits(n) { 498 function sixDigits(n) {
(...skipping 22 matching lines...) Expand all
521 let twoDigitSeconds = twoDigits(this.inSeconds.remainder(Duration.SECONDS_ PER_MINUTE)); 521 let twoDigitSeconds = twoDigits(this.inSeconds.remainder(Duration.SECONDS_ PER_MINUTE));
522 let sixDigitUs = sixDigits(this.inMicroseconds.remainder(Duration.MICROSEC ONDS_PER_SECOND)); 522 let sixDigitUs = sixDigits(this.inMicroseconds.remainder(Duration.MICROSEC ONDS_PER_SECOND));
523 return `${this.inHours}:${twoDigitMinutes}:${twoDigitSeconds}.${sixDigitUs }`; 523 return `${this.inHours}:${twoDigitMinutes}:${twoDigitSeconds}.${sixDigitUs }`;
524 } 524 }
525 get isNegative() { 525 get isNegative() {
526 return dart.notNull(this[_duration]) < 0; 526 return dart.notNull(this[_duration]) < 0;
527 } 527 }
528 abs() { 528 abs() {
529 return new Duration[_microseconds](this[_duration].abs()); 529 return new Duration[_microseconds](this[_duration].abs());
530 } 530 }
531 ['-']() { 531 ['unary-']() {
532 return new Duration[_microseconds](-dart.notNull(this[_duration])); 532 return new Duration[_microseconds](-dart.notNull(this[_duration]));
533 } 533 }
534 } 534 }
535 Duration[dart.implements] = () => [Comparable$(Duration)]; 535 Duration[dart.implements] = () => [Comparable$(Duration)];
536 dart.defineNamedConstructor(Duration, _microseconds); 536 dart.defineNamedConstructor(Duration, _microseconds);
537 Duration.MICROSECONDS_PER_MILLISECOND = 1000; 537 Duration.MICROSECONDS_PER_MILLISECOND = 1000;
538 Duration.MILLISECONDS_PER_SECOND = 1000; 538 Duration.MILLISECONDS_PER_SECOND = 1000;
539 Duration.SECONDS_PER_MINUTE = 60; 539 Duration.SECONDS_PER_MINUTE = 60;
540 Duration.MINUTES_PER_HOUR = 60; 540 Duration.MINUTES_PER_HOUR = 60;
541 Duration.HOURS_PER_DAY = 24; 541 Duration.HOURS_PER_DAY = 24;
542 Duration.MICROSECONDS_PER_SECOND = dart.notNull(Duration.MICROSECONDS_PER_MILL ISECOND) * dart.notNull(Duration.MILLISECONDS_PER_SECOND); 542 Duration.MICROSECONDS_PER_SECOND = dart.notNull(Duration.MICROSECONDS_PER_MILL ISECOND) * dart.notNull(Duration.MILLISECONDS_PER_SECOND);
543 Duration.MICROSECONDS_PER_MINUTE = dart.notNull(Duration.MICROSECONDS_PER_SECO ND) * dart.notNull(Duration.SECONDS_PER_MINUTE); 543 Duration.MICROSECONDS_PER_MINUTE = dart.notNull(Duration.MICROSECONDS_PER_SECO ND) * dart.notNull(Duration.SECONDS_PER_MINUTE);
544 Duration.MICROSECONDS_PER_HOUR = dart.notNull(Duration.MICROSECONDS_PER_MINUTE ) * dart.notNull(Duration.MINUTES_PER_HOUR); 544 Duration.MICROSECONDS_PER_HOUR = dart.notNull(Duration.MICROSECONDS_PER_MINUTE ) * dart.notNull(Duration.MINUTES_PER_HOUR);
545 Duration.MICROSECONDS_PER_DAY = dart.notNull(Duration.MICROSECONDS_PER_HOUR) * dart.notNull(Duration.HOURS_PER_DAY); 545 Duration.MICROSECONDS_PER_DAY = dart.notNull(Duration.MICROSECONDS_PER_HOUR) * dart.notNull(Duration.HOURS_PER_DAY);
546 Duration.MILLISECONDS_PER_MINUTE = dart.notNull(Duration.MILLISECONDS_PER_SECO ND) * dart.notNull(Duration.SECONDS_PER_MINUTE); 546 Duration.MILLISECONDS_PER_MINUTE = dart.notNull(Duration.MILLISECONDS_PER_SECO ND) * dart.notNull(Duration.SECONDS_PER_MINUTE);
547 Duration.MILLISECONDS_PER_HOUR = dart.notNull(Duration.MILLISECONDS_PER_MINUTE ) * dart.notNull(Duration.MINUTES_PER_HOUR); 547 Duration.MILLISECONDS_PER_HOUR = dart.notNull(Duration.MILLISECONDS_PER_MINUTE ) * dart.notNull(Duration.MINUTES_PER_HOUR);
548 Duration.MILLISECONDS_PER_DAY = dart.notNull(Duration.MILLISECONDS_PER_HOUR) * dart.notNull(Duration.HOURS_PER_DAY); 548 Duration.MILLISECONDS_PER_DAY = dart.notNull(Duration.MILLISECONDS_PER_HOUR) * dart.notNull(Duration.HOURS_PER_DAY);
549 Duration.SECONDS_PER_HOUR = dart.notNull(Duration.SECONDS_PER_MINUTE) * dart.n otNull(Duration.MINUTES_PER_HOUR); 549 Duration.SECONDS_PER_HOUR = dart.notNull(Duration.SECONDS_PER_MINUTE) * dart.n otNull(Duration.MINUTES_PER_HOUR);
550 Duration.SECONDS_PER_DAY = dart.notNull(Duration.SECONDS_PER_HOUR) * dart.notN ull(Duration.HOURS_PER_DAY); 550 Duration.SECONDS_PER_DAY = dart.notNull(Duration.SECONDS_PER_HOUR) * dart.notN ull(Duration.HOURS_PER_DAY);
551 Duration.MINUTES_PER_DAY = dart.notNull(Duration.MINUTES_PER_HOUR) * dart.notN ull(Duration.HOURS_PER_DAY); 551 Duration.MINUTES_PER_DAY = dart.notNull(Duration.MINUTES_PER_HOUR) * dart.notN ull(Duration.HOURS_PER_DAY);
552 Duration.ZERO = new Duration({seconds: 0}); 552 Duration.ZERO = new Duration({seconds: 0});
553 let _stringToSafeString = dart.JsSymbol('_stringToSafeString'); 553 let _stringToSafeString = dart.JsSymbol('_stringToSafeString');
554 let _objectToString = dart.JsSymbol('_objectToString'); 554 let _objectToString = dart.JsSymbol('_objectToString');
555 class Error extends Object { 555 class Error extends Object {
556 Error() { 556 Error() {
557 } 557 }
558 static safeToString(object) { 558 static safeToString(object) {
559 if (dart.notNull(dart.is(object, num)) || dart.notNull(typeof object == 'b oolean') || dart.notNull(null == object)) { 559 if (dart.is(object, num) || typeof object == 'boolean' || dart.notNull(nul l == object)) {
560 return object.toString(); 560 return object.toString();
561 } 561 }
562 if (typeof object == 'string') { 562 if (typeof object == 'string') {
563 return Error[_stringToSafeString](object); 563 return Error[_stringToSafeString](object);
564 } 564 }
565 return Error[_objectToString](object); 565 return Error[_objectToString](object);
566 } 566 }
567 static [_stringToSafeString](string) { 567 static [_stringToSafeString](string) {
568 return _js_helper.jsonEncodeNative(string); 568 return _js_helper.jsonEncodeNative(string);
569 } 569 }
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 get start() { 742 get start() {
743 return 0; 743 return 0;
744 } 744 }
745 get end() { 745 get end() {
746 return dart.notNull(this.length) - 1; 746 return dart.notNull(this.length) - 1;
747 } 747 }
748 toString() { 748 toString() {
749 dart.assert(this[_hasValue]); 749 dart.assert(this[_hasValue]);
750 let target = Error.safeToString(this.indexable); 750 let target = Error.safeToString(this.indexable);
751 let explanation = `index should be less than ${this.length}`; 751 let explanation = `index should be less than ${this.length}`;
752 if (dart.dbinary(this.invalidValue, '<', 0)) { 752 if (dart.dsend(this.invalidValue, '<', 0)) {
753 explanation = "index must not be negative"; 753 explanation = "index must not be negative";
754 } 754 }
755 return `RangeError: ${this.message} (${target}[${this.invalidValue}]): ${e xplanation}`; 755 return `RangeError: ${this.message} (${target}[${this.invalidValue}]): ${e xplanation}`;
756 } 756 }
757 } 757 }
758 IndexError[dart.implements] = () => [RangeError]; 758 IndexError[dart.implements] = () => [RangeError];
759 class FallThroughError extends Error { 759 class FallThroughError extends Error {
760 FallThroughError() { 760 FallThroughError() {
761 super.Error(); 761 super.Error();
762 } 762 }
763 } 763 }
764 let _className = dart.JsSymbol('_className'); 764 let _className = dart.JsSymbol('_className');
765 class AbstractClassInstantiationError extends Error { 765 class AbstractClassInstantiationError extends Error {
766 AbstractClassInstantiationError(className) { 766 AbstractClassInstantiationError(className) {
767 this[_className] = className; 767 this[_className] = className;
768 super.Error(); 768 super.Error();
769 } 769 }
770 toString() { 770 toString() {
771 return `Cannot instantiate abstract class: '${this[_className]}'`; 771 return `Cannot instantiate abstract class: '${this[_className]}'`;
772 } 772 }
773 } 773 }
774 let _receiver = dart.JsSymbol('_receiver'); 774 let _receiver = dart.JsSymbol('_receiver');
775 let _memberName = dart.JsSymbol('_memberName'); 775 let _memberName = dart.JsSymbol('_memberName');
776 let _arguments = dart.JsSymbol('_arguments'); 776 let _arguments = dart.JsSymbol('_arguments');
777 let _namedArguments = dart.JsSymbol('_namedArguments'); 777 let _namedArguments = dart.JsSymbol('_namedArguments');
778 let _existingArgumentNames = dart.JsSymbol('_existingArgumentNames'); 778 let _existingArgumentNames = dart.JsSymbol('_existingArgumentNames');
779 let $length = dart.JsSymbol('$length');
780 let $get = dart.JsSymbol('$get');
779 class NoSuchMethodError extends Error { 781 class NoSuchMethodError extends Error {
780 NoSuchMethodError(receiver, memberName, positionalArguments, namedArguments, existingArgumentNames) { 782 NoSuchMethodError(receiver, memberName, positionalArguments, namedArguments, existingArgumentNames) {
781 if (existingArgumentNames === void 0) 783 if (existingArgumentNames === void 0)
782 existingArgumentNames = null; 784 existingArgumentNames = null;
783 this[_receiver] = receiver; 785 this[_receiver] = receiver;
784 this[_memberName] = memberName; 786 this[_memberName] = memberName;
785 this[_arguments] = positionalArguments; 787 this[_arguments] = positionalArguments;
786 this[_namedArguments] = namedArguments; 788 this[_namedArguments] = namedArguments;
787 this[_existingArgumentNames] = existingArgumentNames; 789 this[_existingArgumentNames] = existingArgumentNames;
788 super.Error(); 790 super.Error();
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
953 let source = dart.as(this.source, String); 955 let source = dart.as(this.source, String);
954 if (dart.notNull(source.length) > 78) { 956 if (dart.notNull(source.length) > 78) {
955 source = String['+'](source.substring(0, 75), "..."); 957 source = String['+'](source.substring(0, 75), "...");
956 } 958 }
957 return `${report}\n${source}`; 959 return `${report}\n${source}`;
958 } 960 }
959 let lineNum = 1; 961 let lineNum = 1;
960 let lineStart = 0; 962 let lineStart = 0;
961 let lastWasCR = null; 963 let lastWasCR = null;
962 for (let i = 0; dart.notNull(i) < dart.notNull(offset); i = dart.notNull(i ) + 1) { 964 for (let i = 0; dart.notNull(i) < dart.notNull(offset); i = dart.notNull(i ) + 1) {
963 let char = dart.as(dart.dinvoke(this.source, 'codeUnitAt', i), int); 965 let char = dart.as(dart.dsend(this.source, 'codeUnitAt', i), int);
964 if (char == 10) { 966 if (char == 10) {
965 if (lineStart != i || !dart.notNull(lastWasCR)) { 967 if (lineStart != i || !dart.notNull(lastWasCR)) {
966 lineNum = dart.notNull(lineNum) + 1; 968 lineNum = dart.notNull(lineNum) + 1;
967 } 969 }
968 lineStart = dart.notNull(i) + 1; 970 lineStart = dart.notNull(i) + 1;
969 lastWasCR = false; 971 lastWasCR = false;
970 } else if (char == 13) { 972 } else if (char == 13) {
971 lineNum = dart.notNull(lineNum) + 1; 973 lineNum = dart.notNull(lineNum) + 1;
972 lineStart = dart.notNull(i) + 1; 974 lineStart = dart.notNull(i) + 1;
973 lastWasCR = true; 975 lastWasCR = true;
974 } 976 }
975 } 977 }
976 if (dart.notNull(lineNum) > 1) { 978 if (dart.notNull(lineNum) > 1) {
977 report = String['+'](report, ` (at line ${lineNum}, character ${dart.not Null(offset) - dart.notNull(lineStart) + 1})\n`); 979 report = String['+'](report, ` (at line ${lineNum}, character ${dart.not Null(offset) - dart.notNull(lineStart) + 1})\n`);
978 } else { 980 } else {
979 report = String['+'](report, ` (at character ${dart.notNull(offset) + 1} )\n`); 981 report = String['+'](report, ` (at character ${dart.notNull(offset) + 1} )\n`);
980 } 982 }
981 let lineEnd = dart.as(dart.dload(this.source, 'length'), int); 983 let lineEnd = dart.as(dart.dload(this.source, 'length'), int);
982 for (let i = offset; i['<'](dart.dload(this.source, 'length')); i = dart.n otNull(i) + 1) { 984 for (let i = offset; i['<'](dart.dload(this.source, 'length')); i = dart.n otNull(i) + 1) {
983 let char = dart.as(dart.dinvoke(this.source, 'codeUnitAt', i), int); 985 let char = dart.as(dart.dsend(this.source, 'codeUnitAt', i), int);
984 if (char == 10 || char == 13) { 986 if (char == 10 || char == 13) {
985 lineEnd = i; 987 lineEnd = i;
986 break; 988 break;
987 } 989 }
988 } 990 }
989 let length = dart.notNull(lineEnd) - dart.notNull(lineStart); 991 let length = dart.notNull(lineEnd) - dart.notNull(lineStart);
990 let start = lineStart; 992 let start = lineStart;
991 let end = lineEnd; 993 let end = lineEnd;
992 let prefix = ""; 994 let prefix = "";
993 let postfix = ""; 995 let postfix = "";
994 if (dart.notNull(length) > 78) { 996 if (dart.notNull(length) > 78) {
995 let index = dart.notNull(offset) - dart.notNull(lineStart); 997 let index = dart.notNull(offset) - dart.notNull(lineStart);
996 if (dart.notNull(index) < 75) { 998 if (dart.notNull(index) < 75) {
997 end = dart.notNull(start) + 75; 999 end = dart.notNull(start) + 75;
998 postfix = "..."; 1000 postfix = "...";
999 } else if (dart.notNull(end) - dart.notNull(offset) < 75) { 1001 } else if (dart.notNull(end) - dart.notNull(offset) < 75) {
1000 start = dart.notNull(end) - 75; 1002 start = dart.notNull(end) - 75;
1001 prefix = "..."; 1003 prefix = "...";
1002 } else { 1004 } else {
1003 start = dart.notNull(offset) - 36; 1005 start = dart.notNull(offset) - 36;
1004 end = dart.notNull(offset) + 36; 1006 end = dart.notNull(offset) + 36;
1005 prefix = postfix = "..."; 1007 prefix = postfix = "...";
1006 } 1008 }
1007 } 1009 }
1008 let slice = dart.as(dart.dinvoke(this.source, 'substring', start, end), St ring); 1010 let slice = dart.as(dart.dsend(this.source, 'substring', start, end), Stri ng);
1009 let markOffset = dart.notNull(offset) - dart.notNull(start) + dart.notNull (prefix.length); 1011 let markOffset = dart.notNull(offset) - dart.notNull(start) + dart.notNull (prefix.length);
1010 return `${report}${prefix}${slice}${postfix}\n${String['*'](" ", markOffse t)}^\n`; 1012 return `${report}${prefix}${slice}${postfix}\n${String['*'](" ", markOffse t)}^\n`;
1011 } 1013 }
1012 } 1014 }
1013 FormatException[dart.implements] = () => [Exception]; 1015 FormatException[dart.implements] = () => [Exception];
1014 class IntegerDivisionByZeroException extends Object { 1016 class IntegerDivisionByZeroException extends Object {
1015 IntegerDivisionByZeroException() { 1017 IntegerDivisionByZeroException() {
1016 } 1018 }
1017 toString() { 1019 toString() {
1018 return "IntegerDivisionByZeroException"; 1020 return "IntegerDivisionByZeroException";
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1125 let _Generator$ = dart.generic(function(E) { 1127 let _Generator$ = dart.generic(function(E) {
1126 let _Generator = dart.typedef('_Generator', () => dart.functionType(E, [int] )); 1128 let _Generator = dart.typedef('_Generator', () => dart.functionType(E, [int] ));
1127 return _Generator; 1129 return _Generator;
1128 }); 1130 });
1129 let _Generator = _Generator$(); 1131 let _Generator = _Generator$();
1130 let _end = dart.JsSymbol('_end'); 1132 let _end = dart.JsSymbol('_end');
1131 let _start = dart.JsSymbol('_start'); 1133 let _start = dart.JsSymbol('_start');
1132 let _generator = dart.JsSymbol('_generator'); 1134 let _generator = dart.JsSymbol('_generator');
1133 let _id = dart.JsSymbol('_id'); 1135 let _id = dart.JsSymbol('_id');
1134 let $iterator = dart.JsSymbol('$iterator'); 1136 let $iterator = dart.JsSymbol('$iterator');
1135 let $length = dart.JsSymbol('$length');
1136 let $skip = dart.JsSymbol('$skip'); 1137 let $skip = dart.JsSymbol('$skip');
1137 let $take = dart.JsSymbol('$take'); 1138 let $take = dart.JsSymbol('$take');
1138 let _GeneratorIterable$ = dart.generic(function(E) { 1139 let _GeneratorIterable$ = dart.generic(function(E) {
1139 class _GeneratorIterable extends collection.IterableBase$(E) { 1140 class _GeneratorIterable extends collection.IterableBase$(E) {
1140 _GeneratorIterable(end$, generator) { 1141 _GeneratorIterable(end$, generator) {
1141 this[_end] = end$; 1142 this[_end] = end$;
1142 this[_start] = 0; 1143 this[_start] = 0;
1143 this[_generator] = dart.as(generator != null ? generator : _GeneratorIte rable[_id], _Generator); 1144 this[_generator] = dart.as(generator != null ? generator : _GeneratorIte rable[_id], _Generator);
1144 super.IterableBase(); 1145 super.IterableBase();
1145 } 1146 }
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
1214 class BidirectionalIterator extends Object {} 1215 class BidirectionalIterator extends Object {}
1215 BidirectionalIterator[dart.implements] = () => [Iterator$(E)]; 1216 BidirectionalIterator[dart.implements] = () => [Iterator$(E)];
1216 return BidirectionalIterator; 1217 return BidirectionalIterator;
1217 }); 1218 });
1218 let BidirectionalIterator = BidirectionalIterator$(); 1219 let BidirectionalIterator = BidirectionalIterator$();
1219 let Iterator$ = dart.generic(function(E) { 1220 let Iterator$ = dart.generic(function(E) {
1220 class Iterator extends Object {} 1221 class Iterator extends Object {}
1221 return Iterator; 1222 return Iterator;
1222 }); 1223 });
1223 let Iterator = Iterator$(); 1224 let Iterator = Iterator$();
1225 let $set = dart.JsSymbol('$set');
1224 let List$ = dart.generic(function(E) { 1226 let List$ = dart.generic(function(E) {
1225 class List extends Object { 1227 class List extends Object {
1226 List(length) { 1228 List(length) {
1227 if (length === void 0) 1229 if (length === void 0)
1228 length = new _ListConstructorSentinel(); 1230 length = new _ListConstructorSentinel();
1229 if (dart.equals(length, new _ListConstructorSentinel())) { 1231 if (dart.equals(length, new _ListConstructorSentinel())) {
1230 return new _interceptors.JSArray$(E).emptyGrowable(); 1232 return new _interceptors.JSArray$(E).emptyGrowable();
1231 } 1233 }
1232 return new _interceptors.JSArray$(E).fixed(length); 1234 return new _interceptors.JSArray$(E).fixed(length);
1233 } 1235 }
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
1395 return (dart.notNull(this.elapsedTicks) * 1000 / dart.notNull(this.frequen cy)).truncate(); 1397 return (dart.notNull(this.elapsedTicks) * 1000 / dart.notNull(this.frequen cy)).truncate();
1396 } 1398 }
1397 get isRunning() { 1399 get isRunning() {
1398 return this[_start] != null && this[_stop] == null; 1400 return this[_start] != null && this[_stop] == null;
1399 } 1401 }
1400 static [_initTicker]() { 1402 static [_initTicker]() {
1401 _js_helper.Primitives.initTicker(); 1403 _js_helper.Primitives.initTicker();
1402 Stopwatch[_frequency] = _js_helper.Primitives.timerFrequency; 1404 Stopwatch[_frequency] = _js_helper.Primitives.timerFrequency;
1403 } 1405 }
1404 static [_now]() { 1406 static [_now]() {
1405 return dart.as(dart.dinvoke(_js_helper.Primitives, 'timerTicks'), int); 1407 return dart.as(dart.dsend(_js_helper.Primitives, 'timerTicks'), int);
1406 } 1408 }
1407 } 1409 }
1408 Stopwatch._frequency = null; 1410 Stopwatch._frequency = null;
1409 let _stringFromIterable = dart.JsSymbol('_stringFromIterable'); 1411 let _stringFromIterable = dart.JsSymbol('_stringFromIterable');
1412 let $sublist = dart.JsSymbol('$sublist');
1413 let $add = dart.JsSymbol('$add');
1410 class String extends Object { 1414 class String extends Object {
1411 fromCharCodes(charCodes, start, end) { 1415 fromCharCodes(charCodes, start, end) {
1412 if (start === void 0) 1416 if (start === void 0)
1413 start = 0; 1417 start = 0;
1414 if (end === void 0) 1418 if (end === void 0)
1415 end = null; 1419 end = null;
1416 if (!dart.is(charCodes, _interceptors.JSArray)) { 1420 if (!dart.is(charCodes, _interceptors.JSArray)) {
1417 return String[_stringFromIterable](charCodes, start, end); 1421 return String[_stringFromIterable](charCodes, start, end);
1418 } 1422 }
1419 let list = dart.as(charCodes, List); 1423 let list = dart.as(charCodes, List);
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1553 get current() { 1557 get current() {
1554 return this[_currentCodePoint]; 1558 return this[_currentCodePoint];
1555 } 1559 }
1556 get currentSize() { 1560 get currentSize() {
1557 return dart.notNull(this[_nextPosition]) - dart.notNull(this[_position]); 1561 return dart.notNull(this[_nextPosition]) - dart.notNull(this[_position]);
1558 } 1562 }
1559 get currentAsString() { 1563 get currentAsString() {
1560 if (this[_position] == this[_nextPosition]) 1564 if (this[_position] == this[_nextPosition])
1561 return null; 1565 return null;
1562 if (dart.notNull(this[_position]) + 1 == this[_nextPosition]) 1566 if (dart.notNull(this[_position]) + 1 == this[_nextPosition])
1563 return this.string.get(this[_position]); 1567 return String.get(this.string, this[_position]);
1564 return this.string.substring(this[_position], this[_nextPosition]); 1568 return this.string.substring(this[_position], this[_nextPosition]);
1565 } 1569 }
1566 moveNext() { 1570 moveNext() {
1567 this[_position] = this[_nextPosition]; 1571 this[_position] = this[_nextPosition];
1568 if (this[_position] == this.string.length) { 1572 if (this[_position] == this.string.length) {
1569 this[_currentCodePoint] = null; 1573 this[_currentCodePoint] = null;
1570 return false; 1574 return false;
1571 } 1575 }
1572 let codeUnit = this.string.codeUnitAt(this[_position]); 1576 let codeUnit = this.string.codeUnitAt(this[_position]);
1573 let nextPosition = dart.notNull(this[_position]) + 1; 1577 let nextPosition = dart.notNull(this[_position]) + 1;
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
1740 let _toWindowsFilePath = dart.JsSymbol('_toWindowsFilePath'); 1744 let _toWindowsFilePath = dart.JsSymbol('_toWindowsFilePath');
1741 let _toFilePath = dart.JsSymbol('_toFilePath'); 1745 let _toFilePath = dart.JsSymbol('_toFilePath');
1742 let _isPathAbsolute = dart.JsSymbol('_isPathAbsolute'); 1746 let _isPathAbsolute = dart.JsSymbol('_isPathAbsolute');
1743 let _addIfNonEmpty = dart.JsSymbol('_addIfNonEmpty'); 1747 let _addIfNonEmpty = dart.JsSymbol('_addIfNonEmpty');
1744 let _unreserved2396Table = dart.JsSymbol('_unreserved2396Table'); 1748 let _unreserved2396Table = dart.JsSymbol('_unreserved2396Table');
1745 let _uriDecode = dart.JsSymbol('_uriDecode'); 1749 let _uriDecode = dart.JsSymbol('_uriDecode');
1746 let _encodeFullTable = dart.JsSymbol('_encodeFullTable'); 1750 let _encodeFullTable = dart.JsSymbol('_encodeFullTable');
1747 let _SPACE = dart.JsSymbol('_SPACE'); 1751 let _SPACE = dart.JsSymbol('_SPACE');
1748 let _PLUS = dart.JsSymbol('_PLUS'); 1752 let _PLUS = dart.JsSymbol('_PLUS');
1749 let _hexCharPairToByte = dart.JsSymbol('_hexCharPairToByte'); 1753 let _hexCharPairToByte = dart.JsSymbol('_hexCharPairToByte');
1754 let $forEach = dart.JsSymbol('$forEach');
1755 let $map = dart.JsSymbol('$map');
1756 let $toList = dart.JsSymbol('$toList');
1757 let $isEmpty = dart.JsSymbol('$isEmpty');
1758 let $removeLast = dart.JsSymbol('$removeLast');
1759 let $fold = dart.JsSymbol('$fold');
1750 class Uri extends Object { 1760 class Uri extends Object {
1751 get authority() { 1761 get authority() {
1752 if (!dart.notNull(this.hasAuthority)) 1762 if (!dart.notNull(this.hasAuthority))
1753 return ""; 1763 return "";
1754 let sb = new StringBuffer(); 1764 let sb = new StringBuffer();
1755 this[_writeAuthority](sb); 1765 this[_writeAuthority](sb);
1756 return sb.toString(); 1766 return sb.toString();
1757 } 1767 }
1758 get userInfo() { 1768 get userInfo() {
1759 return this[_userInfo]; 1769 return this[_userInfo];
(...skipping 23 matching lines...) Expand all
1783 } 1793 }
1784 get query() { 1794 get query() {
1785 return this[_query] == null ? "" : this[_query]; 1795 return this[_query] == null ? "" : this[_query];
1786 } 1796 }
1787 get fragment() { 1797 get fragment() {
1788 return this[_fragment] == null ? "" : this[_fragment]; 1798 return this[_fragment] == null ? "" : this[_fragment];
1789 } 1799 }
1790 static parse(uri) { 1800 static parse(uri) {
1791 // Function isRegName: (int) → bool 1801 // Function isRegName: (int) → bool
1792 function isRegName(ch) { 1802 function isRegName(ch) {
1793 return dart.notNull(ch) < 128 && dart.notNull(!dart.equals(dart.dbinary( Uri[_regNameTable][exports.$get](dart.notNull(ch) >> 4), '&', 1 << (dart.notNull (ch) & 15)), 0)); 1803 return dart.notNull(ch) < 128 && dart.notNull(!dart.equals(dart.dsend(Ur i[_regNameTable][exports.$get](dart.notNull(ch) >> 4), '&', 1 << (dart.notNull(c h) & 15)), 0));
1794 } 1804 }
1795 let EOI = -1; 1805 let EOI = -1;
1796 let scheme = ""; 1806 let scheme = "";
1797 let userinfo = ""; 1807 let userinfo = "";
1798 let host = null; 1808 let host = null;
1799 let port = null; 1809 let port = null;
1800 let path = null; 1810 let path = null;
1801 let query = null; 1811 let query = null;
1802 let fragment = null; 1812 let fragment = null;
1803 let index = 0; 1813 let index = 0;
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
2053 let uri = _js_helper.Primitives.currentUri(); 2063 let uri = _js_helper.Primitives.currentUri();
2054 if (uri != null) 2064 if (uri != null)
2055 return Uri.parse(uri); 2065 return Uri.parse(uri);
2056 throw new UnsupportedError("'Uri.base' is not supported"); 2066 throw new UnsupportedError("'Uri.base' is not supported");
2057 } 2067 }
2058 static get [_isWindows]() { 2068 static get [_isWindows]() {
2059 return false; 2069 return false;
2060 } 2070 }
2061 static [_checkNonWindowsPathReservedCharacters](segments, argumentError) { 2071 static [_checkNonWindowsPathReservedCharacters](segments, argumentError) {
2062 segments[exports.$forEach](dart.as(segment => { 2072 segments[exports.$forEach](dart.as(segment => {
2063 if (dart.dinvoke(segment, 'contains', "/")) { 2073 if (dart.dsend(segment, 'contains', "/")) {
2064 if (argumentError) { 2074 if (argumentError) {
2065 throw new ArgumentError(`Illegal path character ${segment}`); 2075 throw new ArgumentError(`Illegal path character ${segment}`);
2066 } else { 2076 } else {
2067 throw new UnsupportedError(`Illegal path character ${segment}`); 2077 throw new UnsupportedError(`Illegal path character ${segment}`);
2068 } 2078 }
2069 } 2079 }
2070 }, dart.functionType(dart.void, [String]))); 2080 }, dart.functionType(dart.void, [String])));
2071 } 2081 }
2072 static [_checkWindowsPathReservedCharacters](segments, argumentError, firstS egment) { 2082 static [_checkWindowsPathReservedCharacters](segments, argumentError, firstS egment) {
2073 if (firstSegment === void 0) 2083 if (firstSegment === void 0)
2074 firstSegment = 0; 2084 firstSegment = 0;
2075 segments[exports.$skip](firstSegment)[exports.$forEach](dart.as(segment => { 2085 segments[exports.$skip](firstSegment)[exports.$forEach](dart.as(segment => {
2076 if (dart.dinvoke(segment, 'contains', new RegExp('["*/:<>?\\\\|]'))) { 2086 if (dart.dsend(segment, 'contains', new RegExp('["*/:<>?\\\\|]'))) {
2077 if (argumentError) { 2087 if (argumentError) {
2078 throw new ArgumentError("Illegal character in path"); 2088 throw new ArgumentError("Illegal character in path");
2079 } else { 2089 } else {
2080 throw new UnsupportedError("Illegal character in path"); 2090 throw new UnsupportedError("Illegal character in path");
2081 } 2091 }
2082 } 2092 }
2083 }, dart.functionType(dart.void, [String]))); 2093 }, dart.functionType(dart.void, [String])));
2084 } 2094 }
2085 static [_checkWindowsDriveLetter](charCode, argumentError) { 2095 static [_checkWindowsDriveLetter](charCode, argumentError) {
2086 if (dart.notNull(Uri[_UPPER_CASE_A]) <= dart.notNull(charCode) && dart.not Null(charCode) <= dart.notNull(Uri[_UPPER_CASE_Z]) || dart.notNull(Uri[_LOWER_CA SE_A]) <= dart.notNull(charCode) && dart.notNull(charCode) <= dart.notNull(Uri[_ LOWER_CASE_Z])) { 2096 if (dart.notNull(Uri[_UPPER_CASE_A]) <= dart.notNull(charCode) && dart.not Null(charCode) <= dart.notNull(Uri[_UPPER_CASE_Z]) || dart.notNull(Uri[_LOWER_CA SE_A]) <= dart.notNull(charCode) && dart.notNull(charCode) <= dart.notNull(Uri[_ LOWER_CASE_Z])) {
(...skipping 20 matching lines...) Expand all
2107 } else { 2117 } else {
2108 path = path.substring(4); 2118 path = path.substring(4);
2109 if (dart.notNull(path.length) < 3 || path.codeUnitAt(1) != Uri[_COLON] || path.codeUnitAt(2) != Uri[_BACKSLASH]) { 2119 if (dart.notNull(path.length) < 3 || path.codeUnitAt(1) != Uri[_COLON] || path.codeUnitAt(2) != Uri[_BACKSLASH]) {
2110 throw new ArgumentError("Windows paths with \\\\?\\ prefix must be a bsolute"); 2120 throw new ArgumentError("Windows paths with \\\\?\\ prefix must be a bsolute");
2111 } 2121 }
2112 } 2122 }
2113 } else { 2123 } else {
2114 path = path.replaceAll("/", "\\"); 2124 path = path.replaceAll("/", "\\");
2115 } 2125 }
2116 let sep = "\\"; 2126 let sep = "\\";
2117 if (dart.notNull(path.length) > 1 && dart.notNull(path.get(1) == ":")) { 2127 if (dart.notNull(path.length) > 1 && dart.notNull(String.get(path, 1) == " :")) {
2118 Uri[_checkWindowsDriveLetter](path.codeUnitAt(0), true); 2128 Uri[_checkWindowsDriveLetter](path.codeUnitAt(0), true);
2119 if (path.length == 2 || path.codeUnitAt(2) != Uri[_BACKSLASH]) { 2129 if (path.length == 2 || path.codeUnitAt(2) != Uri[_BACKSLASH]) {
2120 throw new ArgumentError("Windows paths with drive letter must be absol ute"); 2130 throw new ArgumentError("Windows paths with drive letter must be absol ute");
2121 } 2131 }
2122 let pathSegments = path.split(sep); 2132 let pathSegments = path.split(sep);
2123 Uri[_checkWindowsPathReservedCharacters](pathSegments, true, 1); 2133 Uri[_checkWindowsPathReservedCharacters](pathSegments, true, 1);
2124 return new Uri({scheme: "file", pathSegments: pathSegments}); 2134 return new Uri({scheme: "file", pathSegments: pathSegments});
2125 } 2135 }
2126 if (dart.notNull(path.length) > 0 && dart.notNull(path.get(0) == sep)) { 2136 if (dart.notNull(path.length) > 0 && dart.notNull(String.get(path, 0) == s ep)) {
2127 if (dart.notNull(path.length) > 1 && dart.notNull(path.get(1) == sep)) { 2137 if (dart.notNull(path.length) > 1 && dart.notNull(String.get(path, 1) == sep)) {
2128 let pathStart = path.indexOf("\\", 2); 2138 let pathStart = path.indexOf("\\", 2);
2129 let hostPart = pathStart == -1 ? path.substring(2) : path.substring(2, pathStart); 2139 let hostPart = pathStart == -1 ? path.substring(2) : path.substring(2, pathStart);
2130 let pathPart = pathStart == -1 ? "" : path.substring(dart.notNull(path Start) + 1); 2140 let pathPart = pathStart == -1 ? "" : path.substring(dart.notNull(path Start) + 1);
2131 let pathSegments = pathPart.split(sep); 2141 let pathSegments = pathPart.split(sep);
2132 Uri[_checkWindowsPathReservedCharacters](pathSegments, true); 2142 Uri[_checkWindowsPathReservedCharacters](pathSegments, true);
2133 return new Uri({scheme: "file", host: hostPart, pathSegments: pathSegm ents}); 2143 return new Uri({scheme: "file", host: hostPart, pathSegments: pathSegm ents});
2134 } else { 2144 } else {
2135 let pathSegments = path.split(sep); 2145 let pathSegments = path.split(sep);
2136 Uri[_checkWindowsPathReservedCharacters](pathSegments, true); 2146 Uri[_checkWindowsPathReservedCharacters](pathSegments, true);
2137 return new Uri({scheme: "file", pathSegments: pathSegments}); 2147 return new Uri({scheme: "file", pathSegments: pathSegments});
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
2235 for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNul l(i) + 1) { 2245 for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNul l(i) + 1) {
2236 if (host.codeUnitAt(i) == Uri[_COLON]) { 2246 if (host.codeUnitAt(i) == Uri[_COLON]) {
2237 Uri.parseIPv6Address(host, start, end); 2247 Uri.parseIPv6Address(host, start, end);
2238 return `[${host}]`; 2248 return `[${host}]`;
2239 } 2249 }
2240 } 2250 }
2241 } 2251 }
2242 return Uri[_normalizeRegName](host, start, end); 2252 return Uri[_normalizeRegName](host, start, end);
2243 } 2253 }
2244 static [_isRegNameChar](char) { 2254 static [_isRegNameChar](char) {
2245 return dart.notNull(char) < 127 && dart.notNull(!dart.equals(dart.dbinary( Uri[_regNameTable][exports.$get](dart.notNull(char) >> 4), '&', 1 << (dart.notNu ll(char) & 15)), 0)); 2255 return dart.notNull(char) < 127 && dart.notNull(!dart.equals(dart.dsend(Ur i[_regNameTable][exports.$get](dart.notNull(char) >> 4), '&', 1 << (dart.notNull (char) & 15)), 0));
2246 } 2256 }
2247 static [_normalizeRegName](host, start, end) { 2257 static [_normalizeRegName](host, start, end) {
2248 let buffer = null; 2258 let buffer = null;
2249 let sectionStart = start; 2259 let sectionStart = start;
2250 let index = start; 2260 let index = start;
2251 let isNormalized = true; 2261 let isNormalized = true;
2252 while (dart.notNull(index) < dart.notNull(end)) { 2262 while (dart.notNull(index) < dart.notNull(end)) {
2253 let char = host.codeUnitAt(index); 2263 let char = host.codeUnitAt(index);
2254 if (char == Uri[_PERCENT]) { 2264 if (char == Uri[_PERCENT]) {
2255 let replacement = Uri[_normalizeEscape](host, index, true); 2265 let replacement = Uri[_normalizeEscape](host, index, true);
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
2352 } 2362 }
2353 let result = null; 2363 let result = null;
2354 if (path != null) { 2364 if (path != null) {
2355 result = Uri[_normalize](path, start, end, dart.as(Uri[_pathCharOrSlashT able], List$(int))); 2365 result = Uri[_normalize](path, start, end, dart.as(Uri[_pathCharOrSlashT able], List$(int)));
2356 } else { 2366 } else {
2357 result = pathSegments[exports.$map](dart.as(s => Uri[_uriEncode](dart.as (Uri[_pathCharTable], List$(int)), dart.as(s, String)), dart.functionType(dart.d ynamic, [String])))[exports.$join]("/"); 2367 result = pathSegments[exports.$map](dart.as(s => Uri[_uriEncode](dart.as (Uri[_pathCharTable], List$(int)), dart.as(s, String)), dart.functionType(dart.d ynamic, [String])))[exports.$join]("/");
2358 } 2368 }
2359 if (dart.dload(result, 'isEmpty')) { 2369 if (dart.dload(result, 'isEmpty')) {
2360 if (isFile) 2370 if (isFile)
2361 return "/"; 2371 return "/";
2362 } else if ((dart.notNull(isFile) || dart.notNull(ensureLeadingSlash)) && d art.notNull(!dart.equals(dart.dinvoke(result, 'codeUnitAt', 0), Uri[_SLASH]))) { 2372 } else if ((dart.notNull(isFile) || dart.notNull(ensureLeadingSlash)) && d art.notNull(!dart.equals(dart.dsend(result, 'codeUnitAt', 0), Uri[_SLASH]))) {
2363 return `/${result}`; 2373 return `/${result}`;
2364 } 2374 }
2365 return dart.as(result, String); 2375 return dart.as(result, String);
2366 } 2376 }
2367 static [_makeQuery](query, start, end, queryParameters) { 2377 static [_makeQuery](query, start, end, queryParameters) {
2368 if (dart.notNull(query == null) && dart.notNull(queryParameters == null)) 2378 if (dart.notNull(query == null) && dart.notNull(queryParameters == null))
2369 return null; 2379 return null;
2370 if (dart.notNull(query != null) && dart.notNull(queryParameters != null)) { 2380 if (dart.notNull(query != null) && dart.notNull(queryParameters != null)) {
2371 throw new ArgumentError('Both query and queryParameters specified'); 2381 throw new ArgumentError('Both query and queryParameters specified');
2372 } 2382 }
2373 if (query != null) 2383 if (query != null)
2374 return Uri[_normalize](query, start, end, dart.as(Uri[_queryCharTable], List$(int))); 2384 return Uri[_normalize](query, start, end, dart.as(Uri[_queryCharTable], List$(int)));
2375 let result = new StringBuffer(); 2385 let result = new StringBuffer();
2376 let first = true; 2386 let first = true;
2377 queryParameters.forEach(dart.as((key, value) => { 2387 queryParameters.forEach(dart.as((key, value) => {
2378 if (!dart.notNull(first)) { 2388 if (!dart.notNull(first)) {
2379 result.write("&"); 2389 result.write("&");
2380 } 2390 }
2381 first = false; 2391 first = false;
2382 result.write(Uri.encodeQueryComponent(dart.as(key, String))); 2392 result.write(Uri.encodeQueryComponent(dart.as(key, String)));
2383 if (dart.notNull(value != null) && dart.notNull(dart.dunary('!', dart.dl oad(value, 'isEmpty')))) { 2393 if (dart.notNull(value != null) && dart.notNull(dart.dsend(dart.dload(va lue, 'isEmpty'), '!'))) {
2384 result.write("="); 2394 result.write("=");
2385 result.write(Uri.encodeQueryComponent(dart.as(value, String))); 2395 result.write(Uri.encodeQueryComponent(dart.as(value, String)));
2386 } 2396 }
2387 }, dart.functionType(dart.void, [String, String]))); 2397 }, dart.functionType(dart.void, [String, String])));
2388 return result.toString(); 2398 return result.toString();
2389 } 2399 }
2390 static [_makeFragment](fragment, start, end) { 2400 static [_makeFragment](fragment, start, end) {
2391 if (fragment == null) 2401 if (fragment == null)
2392 return null; 2402 return null;
2393 return Uri[_normalize](fragment, start, end, dart.as(Uri[_queryCharTable], List$(int))); 2403 return Uri[_normalize](fragment, start, end, dart.as(Uri[_queryCharTable], List$(int)));
(...skipping 30 matching lines...) Expand all
2424 value = dart.notNull(value) | 32; 2434 value = dart.notNull(value) | 32;
2425 } 2435 }
2426 return new String.fromCharCode(value); 2436 return new String.fromCharCode(value);
2427 } 2437 }
2428 if (dart.notNull(firstDigit) >= dart.notNull(Uri[_LOWER_CASE_A]) || dart.n otNull(secondDigit) >= dart.notNull(Uri[_LOWER_CASE_A])) { 2438 if (dart.notNull(firstDigit) >= dart.notNull(Uri[_LOWER_CASE_A]) || dart.n otNull(secondDigit) >= dart.notNull(Uri[_LOWER_CASE_A])) {
2429 return source.substring(index, dart.notNull(index) + 3).toUpperCase(); 2439 return source.substring(index, dart.notNull(index) + 3).toUpperCase();
2430 } 2440 }
2431 return null; 2441 return null;
2432 } 2442 }
2433 static [_isUnreservedChar](ch) { 2443 static [_isUnreservedChar](ch) {
2434 return dart.notNull(ch) < 127 && dart.notNull(!dart.equals(dart.dbinary(Ur i[_unreservedTable][exports.$get](dart.notNull(ch) >> 4), '&', 1 << (dart.notNul l(ch) & 15)), 0)); 2444 return dart.notNull(ch) < 127 && dart.notNull(!dart.equals(dart.dsend(Uri[ _unreservedTable][exports.$get](dart.notNull(ch) >> 4), '&', 1 << (dart.notNull( ch) & 15)), 0));
2435 } 2445 }
2436 static [_escapeChar](char) { 2446 static [_escapeChar](char) {
2437 dart.assert(dart.dbinary(char, '<=', 1114111)); 2447 dart.assert(dart.dsend(char, '<=', 1114111));
2438 let hexDigits = "0123456789ABCDEF"; 2448 let hexDigits = "0123456789ABCDEF";
2439 let codeUnits = null; 2449 let codeUnits = null;
2440 if (dart.dbinary(char, '<', 128)) { 2450 if (dart.dsend(char, '<', 128)) {
2441 codeUnits = new List(3); 2451 codeUnits = new List(3);
2442 codeUnits[exports.$set](0, Uri[_PERCENT]); 2452 codeUnits[exports.$set](0, Uri[_PERCENT]);
2443 codeUnits[exports.$set](1, hexDigits.codeUnitAt(dart.as(dart.dbinary(cha r, '>>', 4), int))); 2453 codeUnits[exports.$set](1, hexDigits.codeUnitAt(dart.as(dart.dsend(char, '>>', 4), int)));
2444 codeUnits[exports.$set](2, hexDigits.codeUnitAt(dart.as(dart.dbinary(cha r, '&', 15), int))); 2454 codeUnits[exports.$set](2, hexDigits.codeUnitAt(dart.as(dart.dsend(char, '&', 15), int)));
2445 } else { 2455 } else {
2446 let flag = 192; 2456 let flag = 192;
2447 let encodedBytes = 2; 2457 let encodedBytes = 2;
2448 if (dart.dbinary(char, '>', 2047)) { 2458 if (dart.dsend(char, '>', 2047)) {
2449 flag = 224; 2459 flag = 224;
2450 encodedBytes = 3; 2460 encodedBytes = 3;
2451 if (dart.dbinary(char, '>', 65535)) { 2461 if (dart.dsend(char, '>', 65535)) {
2452 encodedBytes = 4; 2462 encodedBytes = 4;
2453 flag = 240; 2463 flag = 240;
2454 } 2464 }
2455 } 2465 }
2456 codeUnits = new List(3 * dart.notNull(encodedBytes)); 2466 codeUnits = new List(3 * dart.notNull(encodedBytes));
2457 let index = 0; 2467 let index = 0;
2458 while ((encodedBytes = dart.notNull(encodedBytes) - 1) >= 0) { 2468 while ((encodedBytes = dart.notNull(encodedBytes) - 1) >= 0) {
2459 let byte = dart.as(dart.dbinary(dart.dbinary(dart.dbinary(char, '>>', 6 * dart.notNull(encodedBytes)), '&', 63), '|', flag), int); 2469 let byte = dart.as(dart.dsend(dart.dsend(dart.dsend(char, '>>', 6 * da rt.notNull(encodedBytes)), '&', 63), '|', flag), int);
2460 codeUnits[exports.$set](index, Uri[_PERCENT]); 2470 codeUnits[exports.$set](index, Uri[_PERCENT]);
2461 codeUnits[exports.$set](dart.notNull(index) + 1, hexDigits.codeUnitAt( dart.notNull(byte) >> 4)); 2471 codeUnits[exports.$set](dart.notNull(index) + 1, hexDigits.codeUnitAt( dart.notNull(byte) >> 4));
2462 codeUnits[exports.$set](dart.notNull(index) + 2, hexDigits.codeUnitAt( dart.notNull(byte) & 15)); 2472 codeUnits[exports.$set](dart.notNull(index) + 2, hexDigits.codeUnitAt( dart.notNull(byte) & 15));
2463 index = dart.notNull(index) + 3; 2473 index = dart.notNull(index) + 3;
2464 flag = 128; 2474 flag = 128;
2465 } 2475 }
2466 } 2476 }
2467 return new String.fromCharCodes(dart.as(codeUnits, Iterable$(int))); 2477 return new String.fromCharCodes(dart.as(codeUnits, Iterable$(int)));
2468 } 2478 }
2469 static [_normalize](component, start, end, charTable) { 2479 static [_normalize](component, start, end, charTable) {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
2514 } 2524 }
2515 if (buffer == null) { 2525 if (buffer == null) {
2516 return component.substring(start, end); 2526 return component.substring(start, end);
2517 } 2527 }
2518 if (dart.notNull(sectionStart) < dart.notNull(end)) { 2528 if (dart.notNull(sectionStart) < dart.notNull(end)) {
2519 buffer.write(component.substring(sectionStart, end)); 2529 buffer.write(component.substring(sectionStart, end));
2520 } 2530 }
2521 return buffer.toString(); 2531 return buffer.toString();
2522 } 2532 }
2523 static [_isSchemeCharacter](ch) { 2533 static [_isSchemeCharacter](ch) {
2524 return dart.notNull(ch) < 128 && dart.notNull(!dart.equals(dart.dbinary(Ur i[_schemeTable][exports.$get](dart.notNull(ch) >> 4), '&', 1 << (dart.notNull(ch ) & 15)), 0)); 2534 return dart.notNull(ch) < 128 && dart.notNull(!dart.equals(dart.dsend(Uri[ _schemeTable][exports.$get](dart.notNull(ch) >> 4), '&', 1 << (dart.notNull(ch) & 15)), 0));
2525 } 2535 }
2526 static [_isGeneralDelimiter](ch) { 2536 static [_isGeneralDelimiter](ch) {
2527 return dart.notNull(ch) <= dart.notNull(Uri[_RIGHT_BRACKET]) && dart.notNu ll(!dart.equals(dart.dbinary(Uri[_genDelimitersTable][exports.$get](dart.notNull (ch) >> 4), '&', 1 << (dart.notNull(ch) & 15)), 0)); 2537 return dart.notNull(ch) <= dart.notNull(Uri[_RIGHT_BRACKET]) && dart.notNu ll(!dart.equals(dart.dsend(Uri[_genDelimitersTable][exports.$get](dart.notNull(c h) >> 4), '&', 1 << (dart.notNull(ch) & 15)), 0));
2528 } 2538 }
2529 get isAbsolute() { 2539 get isAbsolute() {
2530 return dart.notNull(this.scheme != "") && dart.notNull(this.fragment == "" ); 2540 return dart.notNull(this.scheme != "") && dart.notNull(this.fragment == "" );
2531 } 2541 }
2532 [_merge](base, reference) { 2542 [_merge](base, reference) {
2533 if (base.isEmpty) 2543 if (base.isEmpty)
2534 return `/${reference}`; 2544 return `/${reference}`;
2535 let backCount = 0; 2545 let backCount = 0;
2536 let refStart = 0; 2546 let refStart = 0;
2537 while (reference.startsWith("../", refStart)) { 2547 while (reference.startsWith("../", refStart)) {
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
2744 } 2754 }
2745 ['=='](other) { 2755 ['=='](other) {
2746 if (!dart.is(other, Uri)) 2756 if (!dart.is(other, Uri))
2747 return false; 2757 return false;
2748 let uri = dart.as(other, Uri); 2758 let uri = dart.as(other, Uri);
2749 return dart.notNull(this.scheme == uri.scheme) && this.hasAuthority == uri .hasAuthority && dart.notNull(this.userInfo == uri.userInfo) && dart.notNull(thi s.host == uri.host) && this.port == uri.port && dart.notNull(this.path == uri.pa th) && this.hasQuery == uri.hasQuery && dart.notNull(this.query == uri.query) && this.hasFragment == uri.hasFragment && dart.notNull(this.fragment == uri.fragme nt); 2759 return dart.notNull(this.scheme == uri.scheme) && this.hasAuthority == uri .hasAuthority && dart.notNull(this.userInfo == uri.userInfo) && dart.notNull(thi s.host == uri.host) && this.port == uri.port && dart.notNull(this.path == uri.pa th) && this.hasQuery == uri.hasQuery && dart.notNull(this.query == uri.query) && this.hasFragment == uri.hasFragment && dart.notNull(this.fragment == uri.fragme nt);
2750 } 2760 }
2751 get hashCode() { 2761 get hashCode() {
2752 // Function combine: (dynamic, dynamic) → int 2762 // Function combine: (dynamic, dynamic) → int
2753 function combine(part, current) { 2763 function combine(part, current) {
2754 return dart.as(dart.dbinary(dart.dbinary(dart.dbinary(current, '*', 31), '+', part.hashCode), '&', 1073741823), int); 2764 return dart.as(dart.dsend(dart.dsend(dart.dsend(current, '*', 31), '+', part.hashCode), '&', 1073741823), int);
2755 } 2765 }
2756 return combine(this.scheme, combine(this.userInfo, combine(this.host, comb ine(this.port, combine(this.path, combine(this.query, combine(this.fragment, 1)) ))))); 2766 return combine(this.scheme, combine(this.userInfo, combine(this.host, comb ine(this.port, combine(this.path, combine(this.query, combine(this.fragment, 1)) )))));
2757 } 2767 }
2758 static [_addIfNonEmpty](sb, test, first, second) { 2768 static [_addIfNonEmpty](sb, test, first, second) {
2759 if ("" != test) { 2769 if ("" != test) {
2760 sb.write(first); 2770 sb.write(first);
2761 sb.write(second); 2771 sb.write(second);
2762 } 2772 }
2763 } 2773 }
2764 static encodeComponent(component) { 2774 static encodeComponent(component) {
(...skipping 12 matching lines...) Expand all
2777 } 2787 }
2778 static encodeFull(uri) { 2788 static encodeFull(uri) {
2779 return Uri[_uriEncode](dart.as(Uri[_encodeFullTable], List$(int)), uri); 2789 return Uri[_uriEncode](dart.as(Uri[_encodeFullTable], List$(int)), uri);
2780 } 2790 }
2781 static decodeFull(uri) { 2791 static decodeFull(uri) {
2782 return Uri[_uriDecode](uri); 2792 return Uri[_uriDecode](uri);
2783 } 2793 }
2784 static splitQueryString(query, opts) { 2794 static splitQueryString(query, opts) {
2785 let encoding = opts && 'encoding' in opts ? opts.encoding : convert.UTF8; 2795 let encoding = opts && 'encoding' in opts ? opts.encoding : convert.UTF8;
2786 return dart.as(query.split("&")[exports.$fold](dart.map(), dart.as((map, e lement) => { 2796 return dart.as(query.split("&")[exports.$fold](dart.map(), dart.as((map, e lement) => {
2787 let index = dart.as(dart.dinvoke(element, 'indexOf', "="), int); 2797 let index = dart.as(dart.dsend(element, 'indexOf', "="), int);
2788 if (index == -1) { 2798 if (index == -1) {
2789 if (!dart.equals(element, "")) { 2799 if (!dart.equals(element, "")) {
2790 dart.dsetindex(map, Uri.decodeQueryComponent(dart.as(element, String ), {encoding: encoding}), ""); 2800 dart.dsetindex(map, Uri.decodeQueryComponent(dart.as(element, String ), {encoding: encoding}), "");
2791 } 2801 }
2792 } else if (index != 0) { 2802 } else if (index != 0) {
2793 let key = dart.dinvoke(element, 'substring', 0, index); 2803 let key = dart.dsend(element, 'substring', 0, index);
2794 let value = dart.dinvoke(element, 'substring', dart.notNull(index) + 1 ); 2804 let value = dart.dsend(element, 'substring', dart.notNull(index) + 1);
2795 dart.dsetindex(map, Uri.decodeQueryComponent(dart.as(key, String), {en coding: encoding}), Uri.decodeQueryComponent(dart.as(value, String), {encoding: encoding})); 2805 dart.dsetindex(map, Uri.decodeQueryComponent(dart.as(key, String), {en coding: encoding}), Uri.decodeQueryComponent(dart.as(value, String), {encoding: encoding}));
2796 } 2806 }
2797 return map; 2807 return map;
2798 }, dart.functionType(dart.dynamic, [dart.dynamic, String]))), Map$(String, String)); 2808 }, dart.functionType(dart.dynamic, [dart.dynamic, String]))), Map$(String, String));
2799 } 2809 }
2800 static parseIPv4Address(host) { 2810 static parseIPv4Address(host) {
2801 // Function error: (String) → void 2811 // Function error: (String) → void
2802 function error(msg) { 2812 function error(msg) {
2803 throw new FormatException(`Illegal IPv4 address, ${msg}`); 2813 throw new FormatException(`Illegal IPv4 address, ${msg}`);
2804 } 2814 }
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
2910 } 2920 }
2911 } 2921 }
2912 return dart.as(bytes, List$(int)); 2922 return dart.as(bytes, List$(int));
2913 } 2923 }
2914 static [_uriEncode](canonicalTable, text, opts) { 2924 static [_uriEncode](canonicalTable, text, opts) {
2915 let encoding = opts && 'encoding' in opts ? opts.encoding : convert.UTF8; 2925 let encoding = opts && 'encoding' in opts ? opts.encoding : convert.UTF8;
2916 let spaceToPlus = opts && 'spaceToPlus' in opts ? opts.spaceToPlus : false ; 2926 let spaceToPlus = opts && 'spaceToPlus' in opts ? opts.spaceToPlus : false ;
2917 // Function byteToHex: (dynamic, dynamic) → dynamic 2927 // Function byteToHex: (dynamic, dynamic) → dynamic
2918 function byteToHex(byte, buffer) { 2928 function byteToHex(byte, buffer) {
2919 let hex = '0123456789ABCDEF'; 2929 let hex = '0123456789ABCDEF';
2920 dart.dinvoke(buffer, 'writeCharCode', hex.codeUnitAt(dart.as(dart.dbinar y(byte, '>>', 4), int))); 2930 dart.dsend(buffer, 'writeCharCode', hex.codeUnitAt(dart.as(dart.dsend(by te, '>>', 4), int)));
2921 dart.dinvoke(buffer, 'writeCharCode', hex.codeUnitAt(dart.as(dart.dbinar y(byte, '&', 15), int))); 2931 dart.dsend(buffer, 'writeCharCode', hex.codeUnitAt(dart.as(dart.dsend(by te, '&', 15), int)));
2922 } 2932 }
2923 let result = new StringBuffer(); 2933 let result = new StringBuffer();
2924 let bytes = encoding.encode(text); 2934 let bytes = encoding.encode(text);
2925 for (let i = 0; dart.notNull(i) < dart.notNull(bytes[exports.$length]); i = dart.notNull(i) + 1) { 2935 for (let i = 0; dart.notNull(i) < dart.notNull(bytes[exports.$length]); i = dart.notNull(i) + 1) {
2926 let byte = bytes[exports.$get](i); 2936 let byte = bytes[exports.$get](i);
2927 if (dart.notNull(byte) < 128 && (dart.notNull(canonicalTable[exports.$ge t](dart.notNull(byte) >> 4)) & 1 << (dart.notNull(byte) & 15)) != 0) { 2937 if (dart.notNull(byte) < 128 && (dart.notNull(canonicalTable[exports.$ge t](dart.notNull(byte) >> 4)) & 1 << (dart.notNull(byte) & 15)) != 0) {
2928 result.writeCharCode(byte); 2938 result.writeCharCode(byte);
2929 } else if (dart.notNull(spaceToPlus) && byte == Uri[_SPACE]) { 2939 } else if (dart.notNull(spaceToPlus) && byte == Uri[_SPACE]) {
2930 result.writeCharCode(Uri[_PLUS]); 2940 result.writeCharCode(Uri[_PLUS]);
2931 } else { 2941 } else {
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
3074 exports.Error = Error; 3084 exports.Error = Error;
3075 exports.AssertionError = AssertionError; 3085 exports.AssertionError = AssertionError;
3076 exports.TypeError = TypeError; 3086 exports.TypeError = TypeError;
3077 exports.CastError = CastError; 3087 exports.CastError = CastError;
3078 exports.NullThrownError = NullThrownError; 3088 exports.NullThrownError = NullThrownError;
3079 exports.ArgumentError = ArgumentError; 3089 exports.ArgumentError = ArgumentError;
3080 exports.RangeError = RangeError; 3090 exports.RangeError = RangeError;
3081 exports.IndexError = IndexError; 3091 exports.IndexError = IndexError;
3082 exports.FallThroughError = FallThroughError; 3092 exports.FallThroughError = FallThroughError;
3083 exports.AbstractClassInstantiationError = AbstractClassInstantiationError; 3093 exports.AbstractClassInstantiationError = AbstractClassInstantiationError;
3094 exports.$length = $length;
3095 exports.$get = $get;
3084 exports.NoSuchMethodError = NoSuchMethodError; 3096 exports.NoSuchMethodError = NoSuchMethodError;
3085 exports.UnsupportedError = UnsupportedError; 3097 exports.UnsupportedError = UnsupportedError;
3086 exports.UnimplementedError = UnimplementedError; 3098 exports.UnimplementedError = UnimplementedError;
3087 exports.StateError = StateError; 3099 exports.StateError = StateError;
3088 exports.ConcurrentModificationError = ConcurrentModificationError; 3100 exports.ConcurrentModificationError = ConcurrentModificationError;
3089 exports.OutOfMemoryError = OutOfMemoryError; 3101 exports.OutOfMemoryError = OutOfMemoryError;
3090 exports.StackOverflowError = StackOverflowError; 3102 exports.StackOverflowError = StackOverflowError;
3091 exports.CyclicInitializationError = CyclicInitializationError; 3103 exports.CyclicInitializationError = CyclicInitializationError;
3092 exports.Exception = Exception; 3104 exports.Exception = Exception;
3093 exports.FormatException = FormatException; 3105 exports.FormatException = FormatException;
3094 exports.IntegerDivisionByZeroException = IntegerDivisionByZeroException; 3106 exports.IntegerDivisionByZeroException = IntegerDivisionByZeroException;
3095 exports.Expando$ = Expando$; 3107 exports.Expando$ = Expando$;
3096 exports.Expando = Expando; 3108 exports.Expando = Expando;
3097 exports.identical = identical; 3109 exports.identical = identical;
3098 exports.identityHashCode = identityHashCode; 3110 exports.identityHashCode = identityHashCode;
3099 exports.int = int; 3111 exports.int = int;
3100 exports.Invocation = Invocation; 3112 exports.Invocation = Invocation;
3101 exports.$join = $join; 3113 exports.$join = $join;
3102 exports.Iterable$ = Iterable$; 3114 exports.Iterable$ = Iterable$;
3103 exports.Iterable = Iterable; 3115 exports.Iterable = Iterable;
3104 exports.$iterator = $iterator; 3116 exports.$iterator = $iterator;
3105 exports.$length = $length;
3106 exports.$skip = $skip; 3117 exports.$skip = $skip;
3107 exports.$take = $take; 3118 exports.$take = $take;
3108 exports.BidirectionalIterator$ = BidirectionalIterator$; 3119 exports.BidirectionalIterator$ = BidirectionalIterator$;
3109 exports.BidirectionalIterator = BidirectionalIterator; 3120 exports.BidirectionalIterator = BidirectionalIterator;
3110 exports.Iterator$ = Iterator$; 3121 exports.Iterator$ = Iterator$;
3111 exports.Iterator = Iterator; 3122 exports.Iterator = Iterator;
3123 exports.$set = $set;
3112 exports.List$ = List$; 3124 exports.List$ = List$;
3113 exports.List = List; 3125 exports.List = List;
3114 exports.Map$ = Map$; 3126 exports.Map$ = Map$;
3115 exports.Map = Map; 3127 exports.Map = Map;
3116 exports.Null = Null; 3128 exports.Null = Null;
3117 exports.Pattern = Pattern; 3129 exports.Pattern = Pattern;
3118 exports.print = print; 3130 exports.print = print;
3119 exports.Match = Match; 3131 exports.Match = Match;
3120 exports.RegExp = RegExp; 3132 exports.RegExp = RegExp;
3121 exports.Set$ = Set$; 3133 exports.Set$ = Set$;
3122 exports.Sink$ = Sink$; 3134 exports.Sink$ = Sink$;
3123 exports.Sink = Sink; 3135 exports.Sink = Sink;
3124 exports.StackTrace = StackTrace; 3136 exports.StackTrace = StackTrace;
3125 exports.Stopwatch = Stopwatch; 3137 exports.Stopwatch = Stopwatch;
3138 exports.$sublist = $sublist;
3139 exports.$add = $add;
3126 exports.String = String; 3140 exports.String = String;
3127 exports.$last = $last; 3141 exports.$last = $last;
3128 exports.RuneIterator = RuneIterator; 3142 exports.RuneIterator = RuneIterator;
3129 exports.StringBuffer = StringBuffer; 3143 exports.StringBuffer = StringBuffer;
3130 exports.StringSink = StringSink; 3144 exports.StringSink = StringSink;
3131 exports.Symbol = Symbol; 3145 exports.Symbol = Symbol;
3132 exports.Type = Type; 3146 exports.Type = Type;
3147 exports.$forEach = $forEach;
3148 exports.$map = $map;
3149 exports.$toList = $toList;
3150 exports.$isEmpty = $isEmpty;
3151 exports.$removeLast = $removeLast;
3152 exports.$fold = $fold;
3133 exports.Uri = Uri; 3153 exports.Uri = Uri;
3134 })(core || (core = {})); 3154 })(core || (core = {}));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698