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

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

Issue 1153003003: fixes #40, extension methods for primitive types (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
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);
7 var convert = dart.lazyImport(convert); 6 var convert = dart.lazyImport(convert);
8 (function(exports, _js_helper, _internal, collection, _interceptors, math, conve rt) { 7 (function(exports, _js_helper, _internal, collection, _interceptors, convert) {
9 'use strict'; 8 'use strict';
10 class Object { 9 class Object {
11 constructor() { 10 constructor() {
12 let name = this.constructor.name; 11 let name = this.constructor.name;
13 let init = this[name]; 12 let init = this[name];
14 let result = void 0; 13 let result = void 0;
15 if (init) 14 if (init)
16 result = init.apply(this, arguments); 15 result = init.apply(this, arguments);
17 return result === void 0 ? this : result; 16 return result === void 0 ? this : result;
18 } 17 }
(...skipping 14 matching lines...) Expand all
33 } 32 }
34 } 33 }
35 dart.setSignature(Object, { 34 dart.setSignature(Object, {
36 constructors: () => ({Object: [Object, []]}), 35 constructors: () => ({Object: [Object, []]}),
37 methods: () => ({ 36 methods: () => ({
38 '==': [bool, [Object]], 37 '==': [bool, [Object]],
39 toString: [String, []], 38 toString: [String, []],
40 noSuchMethod: [Object, [Invocation]] 39 noSuchMethod: [Object, [Invocation]]
41 }) 40 })
42 }); 41 });
43 class JsName extends Object {
44 JsName(opts) {
45 let name = opts && 'name' in opts ? opts.name : null;
46 this.name = name;
47 }
48 }
49 dart.setSignature(JsName, {
50 constructors: () => ({JsName: [JsName, [], {name: String}]})
51 });
52 class JsPeerInterface extends Object {
53 JsPeerInterface(opts) {
54 let name = opts && 'name' in opts ? opts.name : null;
55 this.name = name;
56 }
57 }
58 dart.setSignature(JsPeerInterface, {
59 constructors: () => ({JsPeerInterface: [JsPeerInterface, [], {name: String}] })
60 });
61 class SupportJsExtensionMethod extends Object {
62 SupportJsExtensionMethod() {
63 }
64 }
65 dart.setSignature(SupportJsExtensionMethod, {
66 constructors: () => ({SupportJsExtensionMethod: [SupportJsExtensionMethod, [ ]]})
67 });
68 class Deprecated extends Object { 42 class Deprecated extends Object {
69 Deprecated(expires) { 43 Deprecated(expires) {
70 this.expires = expires; 44 this.expires = expires;
71 } 45 }
72 toString() { 46 toString() {
73 return `Deprecated feature. Will be removed ${this.expires}`; 47 return `Deprecated feature. Will be removed ${this.expires}`;
74 } 48 }
75 } 49 }
76 dart.setSignature(Deprecated, { 50 dart.setSignature(Deprecated, {
77 constructors: () => ({Deprecated: [Deprecated, [String]]}) 51 constructors: () => ({Deprecated: [Deprecated, [String]]})
(...skipping 28 matching lines...) Expand all
106 constructors: () => ({fromEnvironment: [bool, [String], {defaultValue: bool} ]}) 80 constructors: () => ({fromEnvironment: [bool, [String], {defaultValue: bool} ]})
107 }); 81 });
108 let Comparator$ = dart.generic(function(T) { 82 let Comparator$ = dart.generic(function(T) {
109 let Comparator = dart.typedef('Comparator', () => dart.functionType(int, [T, T])); 83 let Comparator = dart.typedef('Comparator', () => dart.functionType(int, [T, T]));
110 return Comparator; 84 return Comparator;
111 }); 85 });
112 let Comparator = Comparator$(); 86 let Comparator = Comparator$();
113 let Comparable$ = dart.generic(function(T) { 87 let Comparable$ = dart.generic(function(T) {
114 class Comparable extends Object { 88 class Comparable extends Object {
115 static compare(a, b) { 89 static compare(a, b) {
116 return a.compareTo(b); 90 return a[dartx.compareTo](b);
117 } 91 }
118 } 92 }
119 dart.setSignature(Comparable, { 93 dart.setSignature(Comparable, {
120 statics: () => ({compare: [int, [Comparable$(), Comparable$()]]}), 94 statics: () => ({compare: [int, [Comparable$(), Comparable$()]]}),
121 names: ['compare'] 95 names: ['compare']
122 }); 96 });
123 return Comparable; 97 return Comparable;
124 }); 98 });
125 let Comparable = Comparable$(); 99 let Comparable = Comparable$();
126 class DateTime extends Object { 100 class DateTime extends Object {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 return double.parse(matched); 147 return double.parse(matched);
174 }; 148 };
175 dart.fn(parseDoubleOrZero, double, [String]); 149 dart.fn(parseDoubleOrZero, double, [String]);
176 let years = int.parse(match.get(1)); 150 let years = int.parse(match.get(1));
177 let month = int.parse(match.get(2)); 151 let month = int.parse(match.get(2));
178 let day = int.parse(match.get(3)); 152 let day = int.parse(match.get(3));
179 let hour = parseIntOrZero(match.get(4)); 153 let hour = parseIntOrZero(match.get(4));
180 let minute = parseIntOrZero(match.get(5)); 154 let minute = parseIntOrZero(match.get(5));
181 let second = parseIntOrZero(match.get(6)); 155 let second = parseIntOrZero(match.get(6));
182 let addOneMillisecond = false; 156 let addOneMillisecond = false;
183 let millisecond = (dart.notNull(parseDoubleOrZero(match.get(7))) * 1000) .round(); 157 let millisecond = (dart.notNull(parseDoubleOrZero(match.get(7))) * 1000) [dartx.round]();
184 if (millisecond == 1000) { 158 if (millisecond == 1000) {
185 addOneMillisecond = true; 159 addOneMillisecond = true;
186 millisecond = 999; 160 millisecond = 999;
187 } 161 }
188 let isUtc = false; 162 let isUtc = false;
189 if (match.get(8) != null) { 163 if (match.get(8) != null) {
190 isUtc = true; 164 isUtc = true;
191 if (match.get(9) != null) { 165 if (match.get(9) != null) {
192 let sign = match.get(9) == '-' ? -1 : 1; 166 let sign = match.get(9) == '-' ? -1 : 1;
193 let hourDifference = int.parse(match.get(10)); 167 let hourDifference = int.parse(match.get(10));
(...skipping 11 matching lines...) Expand all
205 } 179 }
206 return new DateTime.fromMillisecondsSinceEpoch(millisecondsSinceEpoch, { isUtc: isUtc}); 180 return new DateTime.fromMillisecondsSinceEpoch(millisecondsSinceEpoch, { isUtc: isUtc});
207 } else { 181 } else {
208 throw new FormatException("Invalid date format", formattedString); 182 throw new FormatException("Invalid date format", formattedString);
209 } 183 }
210 } 184 }
211 fromMillisecondsSinceEpoch(millisecondsSinceEpoch, opts) { 185 fromMillisecondsSinceEpoch(millisecondsSinceEpoch, opts) {
212 let isUtc = opts && 'isUtc' in opts ? opts.isUtc : false; 186 let isUtc = opts && 'isUtc' in opts ? opts.isUtc : false;
213 this.millisecondsSinceEpoch = millisecondsSinceEpoch; 187 this.millisecondsSinceEpoch = millisecondsSinceEpoch;
214 this.isUtc = isUtc; 188 this.isUtc = isUtc;
215 if (dart.notNull(millisecondsSinceEpoch.abs()) > dart.notNull(DateTime._MA X_MILLISECONDS_SINCE_EPOCH)) { 189 if (dart.notNull(millisecondsSinceEpoch[dartx.abs]()) > dart.notNull(DateT ime._MAX_MILLISECONDS_SINCE_EPOCH)) {
216 throw new ArgumentError(millisecondsSinceEpoch); 190 throw new ArgumentError(millisecondsSinceEpoch);
217 } 191 }
218 if (isUtc == null) 192 if (isUtc == null)
219 throw new ArgumentError(isUtc); 193 throw new ArgumentError(isUtc);
220 } 194 }
221 ['=='](other) { 195 ['=='](other) {
222 if (!dart.is(other, DateTime)) 196 if (!dart.is(other, DateTime))
223 return false; 197 return false;
224 return dart.equals(this.millisecondsSinceEpoch, dart.dload(other, 'millise condsSinceEpoch')) && dart.equals(this.isUtc, dart.dload(other, 'isUtc')); 198 return dart.equals(this.millisecondsSinceEpoch, dart.dload(other, 'millise condsSinceEpoch')) && dart.equals(this.isUtc, dart.dload(other, 'isUtc'));
225 } 199 }
226 isBefore(other) { 200 isBefore(other) {
227 return dart.notNull(this.millisecondsSinceEpoch) < dart.notNull(other.mill isecondsSinceEpoch); 201 return dart.notNull(this.millisecondsSinceEpoch) < dart.notNull(other.mill isecondsSinceEpoch);
228 } 202 }
229 isAfter(other) { 203 isAfter(other) {
230 return dart.notNull(this.millisecondsSinceEpoch) > dart.notNull(other.mill isecondsSinceEpoch); 204 return dart.notNull(this.millisecondsSinceEpoch) > dart.notNull(other.mill isecondsSinceEpoch);
231 } 205 }
232 isAtSameMomentAs(other) { 206 isAtSameMomentAs(other) {
233 return this.millisecondsSinceEpoch == other.millisecondsSinceEpoch; 207 return this.millisecondsSinceEpoch == other.millisecondsSinceEpoch;
234 } 208 }
235 compareTo(other) { 209 compareTo(other) {
236 return this.millisecondsSinceEpoch.compareTo(other.millisecondsSinceEpoch) ; 210 return this.millisecondsSinceEpoch[dartx.compareTo](other.millisecondsSinc eEpoch);
237 } 211 }
238 get hashCode() { 212 get hashCode() {
239 return this.millisecondsSinceEpoch; 213 return this.millisecondsSinceEpoch;
240 } 214 }
241 toLocal() { 215 toLocal() {
242 if (this.isUtc) { 216 if (this.isUtc) {
243 return new DateTime.fromMillisecondsSinceEpoch(this.millisecondsSinceEpo ch, {isUtc: false}); 217 return new DateTime.fromMillisecondsSinceEpoch(this.millisecondsSinceEpo ch, {isUtc: false});
244 } 218 }
245 return this; 219 return this;
246 } 220 }
247 toUtc() { 221 toUtc() {
248 if (this.isUtc) 222 if (this.isUtc)
249 return this; 223 return this;
250 return new DateTime.fromMillisecondsSinceEpoch(this.millisecondsSinceEpoch , {isUtc: true}); 224 return new DateTime.fromMillisecondsSinceEpoch(this.millisecondsSinceEpoch , {isUtc: true});
251 } 225 }
252 static _fourDigits(n) { 226 static _fourDigits(n) {
253 let absN = n.abs(); 227 let absN = n[dartx.abs]();
254 let sign = dart.notNull(n) < 0 ? "-" : ""; 228 let sign = dart.notNull(n) < 0 ? "-" : "";
255 if (dart.notNull(absN) >= 1000) 229 if (dart.notNull(absN) >= 1000)
256 return `${n}`; 230 return `${n}`;
257 if (dart.notNull(absN) >= 100) 231 if (dart.notNull(absN) >= 100)
258 return `${sign}0${absN}`; 232 return `${sign}0${absN}`;
259 if (dart.notNull(absN) >= 10) 233 if (dart.notNull(absN) >= 10)
260 return `${sign}00${absN}`; 234 return `${sign}00${absN}`;
261 return `${sign}000${absN}`; 235 return `${sign}000${absN}`;
262 } 236 }
263 static _sixDigits(n) { 237 static _sixDigits(n) {
264 dart.assert(dart.notNull(n) < -9999 || dart.notNull(n) > 9999); 238 dart.assert(dart.notNull(n) < -9999 || dart.notNull(n) > 9999);
265 let absN = n.abs(); 239 let absN = n[dartx.abs]();
266 let sign = dart.notNull(n) < 0 ? "-" : "+"; 240 let sign = dart.notNull(n) < 0 ? "-" : "+";
267 if (dart.notNull(absN) >= 100000) 241 if (dart.notNull(absN) >= 100000)
268 return `${sign}${absN}`; 242 return `${sign}${absN}`;
269 return `${sign}0${absN}`; 243 return `${sign}0${absN}`;
270 } 244 }
271 static _threeDigits(n) { 245 static _threeDigits(n) {
272 if (dart.notNull(n) >= 100) 246 if (dart.notNull(n) >= 100)
273 return `${n}`; 247 return `${n}`;
274 if (dart.notNull(n) >= 10) 248 if (dart.notNull(n) >= 10)
275 return `0${n}`; 249 return `0${n}`;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 return dart.as(_js_helper.Primitives.getSeconds(this), int); 335 return dart.as(_js_helper.Primitives.getSeconds(this), int);
362 } 336 }
363 get millisecond() { 337 get millisecond() {
364 return dart.as(_js_helper.Primitives.getMilliseconds(this), int); 338 return dart.as(_js_helper.Primitives.getMilliseconds(this), int);
365 } 339 }
366 get weekday() { 340 get weekday() {
367 return dart.as(_js_helper.Primitives.getWeekday(this), int); 341 return dart.as(_js_helper.Primitives.getWeekday(this), int);
368 } 342 }
369 } 343 }
370 DateTime[dart.implements] = () => [Comparable]; 344 DateTime[dart.implements] = () => [Comparable];
345 dart.defineExtensionMembers(DateTime, ['compareTo']);
371 dart.defineNamedConstructor(DateTime, 'utc'); 346 dart.defineNamedConstructor(DateTime, 'utc');
372 dart.defineNamedConstructor(DateTime, 'now'); 347 dart.defineNamedConstructor(DateTime, 'now');
373 dart.defineNamedConstructor(DateTime, 'fromMillisecondsSinceEpoch'); 348 dart.defineNamedConstructor(DateTime, 'fromMillisecondsSinceEpoch');
374 dart.defineNamedConstructor(DateTime, '_internal'); 349 dart.defineNamedConstructor(DateTime, '_internal');
375 dart.defineNamedConstructor(DateTime, '_now'); 350 dart.defineNamedConstructor(DateTime, '_now');
376 dart.setSignature(DateTime, { 351 dart.setSignature(DateTime, {
377 constructors: () => ({ 352 constructors: () => ({
378 DateTime: [DateTime, [int], [int, int, int, int, int, int]], 353 DateTime: [DateTime, [int], [int, int, int, int, int, int]],
379 utc: [DateTime, [int], [int, int, int, int, int, int]], 354 utc: [DateTime, [int], [int, int, int, int, int, int]],
380 now: [DateTime, []], 355 now: [DateTime, []],
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 DateTime.SEPTEMBER = 9; 398 DateTime.SEPTEMBER = 9;
424 DateTime.OCTOBER = 10; 399 DateTime.OCTOBER = 10;
425 DateTime.NOVEMBER = 11; 400 DateTime.NOVEMBER = 11;
426 DateTime.DECEMBER = 12; 401 DateTime.DECEMBER = 12;
427 DateTime.MONTHS_PER_YEAR = 12; 402 DateTime.MONTHS_PER_YEAR = 12;
428 DateTime._MAX_MILLISECONDS_SINCE_EPOCH = 8640000000000000; 403 DateTime._MAX_MILLISECONDS_SINCE_EPOCH = 8640000000000000;
429 class num extends Object { 404 class num extends Object {
430 static parse(input, onError) { 405 static parse(input, onError) {
431 if (onError === void 0) 406 if (onError === void 0)
432 onError = null; 407 onError = null;
433 let source = input.trim(); 408 let source = input[dartx.trim]();
434 num._parseError = false; 409 num._parseError = false;
435 let result = int.parse(source, {onError: num._onParseErrorInt}); 410 let result = int.parse(source, {onError: num._onParseErrorInt});
436 if (!dart.notNull(num._parseError)) 411 if (!dart.notNull(num._parseError))
437 return result; 412 return result;
438 num._parseError = false; 413 num._parseError = false;
439 result = double.parse(source, num._onParseErrorDouble); 414 result = double.parse(source, num._onParseErrorDouble);
440 if (!dart.notNull(num._parseError)) 415 if (!dart.notNull(num._parseError))
441 return result; 416 return result;
442 if (onError == null) 417 if (onError == null)
443 throw new FormatException(input); 418 throw new FormatException(input);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 _microseconds(duration) { 466 _microseconds(duration) {
492 this[_duration] = duration; 467 this[_duration] = duration;
493 } 468 }
494 ['+'](other) { 469 ['+'](other) {
495 return new Duration._microseconds(dart.notNull(this[_duration]) + dart.not Null(other[_duration])); 470 return new Duration._microseconds(dart.notNull(this[_duration]) + dart.not Null(other[_duration]));
496 } 471 }
497 ['-'](other) { 472 ['-'](other) {
498 return new Duration._microseconds(dart.notNull(this[_duration]) - dart.not Null(other[_duration])); 473 return new Duration._microseconds(dart.notNull(this[_duration]) - dart.not Null(other[_duration]));
499 } 474 }
500 ['*'](factor) { 475 ['*'](factor) {
501 return new Duration._microseconds((dart.notNull(this[_duration]) * dart.no tNull(factor)).round()); 476 return new Duration._microseconds((dart.notNull(this[_duration]) * dart.no tNull(factor))[dartx.round]());
502 } 477 }
503 ['~/'](quotient) { 478 ['~/'](quotient) {
504 if (quotient == 0) 479 if (quotient == 0)
505 throw new IntegerDivisionByZeroException(); 480 throw new IntegerDivisionByZeroException();
506 return new Duration._microseconds((dart.notNull(this[_duration]) / dart.no tNull(quotient)).truncate()); 481 return new Duration._microseconds((dart.notNull(this[_duration]) / dart.no tNull(quotient)).truncate());
507 } 482 }
508 ['<'](other) { 483 ['<'](other) {
509 return dart.notNull(this[_duration]) < dart.notNull(other[_duration]); 484 return dart.notNull(this[_duration]) < dart.notNull(other[_duration]);
510 } 485 }
511 ['>'](other) { 486 ['>'](other) {
(...skipping 22 matching lines...) Expand all
534 } 509 }
535 get inMicroseconds() { 510 get inMicroseconds() {
536 return this[_duration]; 511 return this[_duration];
537 } 512 }
538 ['=='](other) { 513 ['=='](other) {
539 if (!dart.is(other, Duration)) 514 if (!dart.is(other, Duration))
540 return false; 515 return false;
541 return dart.equals(this[_duration], dart.dload(other, _duration)); 516 return dart.equals(this[_duration], dart.dload(other, _duration));
542 } 517 }
543 get hashCode() { 518 get hashCode() {
544 return dart.hashCode(this[_duration]); 519 return dart[dartx.hashCode](this[_duration]);
545 } 520 }
546 compareTo(other) { 521 compareTo(other) {
547 return this[_duration].compareTo(other[_duration]); 522 return this[_duration][dartx.compareTo](other[_duration]);
548 } 523 }
549 toString() { 524 toString() {
550 let sixDigits = n => { 525 let sixDigits = n => {
551 if (dart.notNull(n) >= 100000) 526 if (dart.notNull(n) >= 100000)
552 return `${n}`; 527 return `${n}`;
553 if (dart.notNull(n) >= 10000) 528 if (dart.notNull(n) >= 10000)
554 return `0${n}`; 529 return `0${n}`;
555 if (dart.notNull(n) >= 1000) 530 if (dart.notNull(n) >= 1000)
556 return `00${n}`; 531 return `00${n}`;
557 if (dart.notNull(n) >= 100) 532 if (dart.notNull(n) >= 100)
558 return `000${n}`; 533 return `000${n}`;
559 if (dart.notNull(n) >= 10) 534 if (dart.notNull(n) >= 10)
560 return `0000${n}`; 535 return `0000${n}`;
561 return `00000${n}`; 536 return `00000${n}`;
562 }; 537 };
563 dart.fn(sixDigits, String, [int]); 538 dart.fn(sixDigits, String, [int]);
564 let twoDigits = n => { 539 let twoDigits = n => {
565 if (dart.notNull(n) >= 10) 540 if (dart.notNull(n) >= 10)
566 return `${n}`; 541 return `${n}`;
567 return `0${n}`; 542 return `0${n}`;
568 }; 543 };
569 dart.fn(twoDigits, String, [int]); 544 dart.fn(twoDigits, String, [int]);
570 if (dart.notNull(this.inMicroseconds) < 0) { 545 if (dart.notNull(this.inMicroseconds) < 0) {
571 return `-${this['unary-']()}`; 546 return `-${this['unary-']()}`;
572 } 547 }
573 let twoDigitMinutes = twoDigits(this.inMinutes.remainder(Duration.MINUTES_ PER_HOUR)); 548 let twoDigitMinutes = twoDigits(this.inMinutes[dartx.remainder](Duration.M INUTES_PER_HOUR));
574 let twoDigitSeconds = twoDigits(this.inSeconds.remainder(Duration.SECONDS_ PER_MINUTE)); 549 let twoDigitSeconds = twoDigits(this.inSeconds[dartx.remainder](Duration.S ECONDS_PER_MINUTE));
575 let sixDigitUs = sixDigits(this.inMicroseconds.remainder(Duration.MICROSEC ONDS_PER_SECOND)); 550 let sixDigitUs = sixDigits(this.inMicroseconds[dartx.remainder](Duration.M ICROSECONDS_PER_SECOND));
576 return `${this.inHours}:${twoDigitMinutes}:${twoDigitSeconds}.${sixDigitUs }`; 551 return `${this.inHours}:${twoDigitMinutes}:${twoDigitSeconds}.${sixDigitUs }`;
577 } 552 }
578 get isNegative() { 553 get isNegative() {
579 return dart.notNull(this[_duration]) < 0; 554 return dart.notNull(this[_duration]) < 0;
580 } 555 }
581 abs() { 556 abs() {
582 return new Duration._microseconds(this[_duration].abs()); 557 return new Duration._microseconds(this[_duration][dartx.abs]());
583 } 558 }
584 ['unary-']() { 559 ['unary-']() {
585 return new Duration._microseconds(-dart.notNull(this[_duration])); 560 return new Duration._microseconds(-dart.notNull(this[_duration]));
586 } 561 }
587 } 562 }
588 Duration[dart.implements] = () => [Comparable$(Duration)]; 563 Duration[dart.implements] = () => [Comparable$(Duration)];
564 dart.defineExtensionMembers(Duration, ['compareTo']);
589 dart.defineNamedConstructor(Duration, '_microseconds'); 565 dart.defineNamedConstructor(Duration, '_microseconds');
590 dart.setSignature(Duration, { 566 dart.setSignature(Duration, {
591 constructors: () => ({ 567 constructors: () => ({
592 Duration: [Duration, [], {days: int, hours: int, minutes: int, seconds: in t, milliseconds: int, microseconds: int}], 568 Duration: [Duration, [], {days: int, hours: int, minutes: int, seconds: in t, milliseconds: int, microseconds: int}],
593 _microseconds: [Duration, [int]] 569 _microseconds: [Duration, [int]]
594 }), 570 }),
595 methods: () => ({ 571 methods: () => ({
596 '+': [Duration, [Duration]], 572 '+': [Duration, [Duration]],
597 '-': [Duration, [Duration]], 573 '-': [Duration, [Duration]],
598 '*': [Duration, [num]], 574 '*': [Duration, [num]],
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
889 } 865 }
890 } 866 }
891 dart.setSignature(AbstractClassInstantiationError, { 867 dart.setSignature(AbstractClassInstantiationError, {
892 constructors: () => ({AbstractClassInstantiationError: [AbstractClassInstant iationError, [String]]}) 868 constructors: () => ({AbstractClassInstantiationError: [AbstractClassInstant iationError, [String]]})
893 }); 869 });
894 let _receiver = dart.JsSymbol('_receiver'); 870 let _receiver = dart.JsSymbol('_receiver');
895 let _memberName = dart.JsSymbol('_memberName'); 871 let _memberName = dart.JsSymbol('_memberName');
896 let _arguments = dart.JsSymbol('_arguments'); 872 let _arguments = dart.JsSymbol('_arguments');
897 let _namedArguments = dart.JsSymbol('_namedArguments'); 873 let _namedArguments = dart.JsSymbol('_namedArguments');
898 let _existingArgumentNames = dart.JsSymbol('_existingArgumentNames'); 874 let _existingArgumentNames = dart.JsSymbol('_existingArgumentNames');
899 let $length = dart.JsSymbol('$length');
900 let $get = dart.JsSymbol('$get');
901 class NoSuchMethodError extends Error { 875 class NoSuchMethodError extends Error {
902 NoSuchMethodError(receiver, memberName, positionalArguments, namedArguments, existingArgumentNames) { 876 NoSuchMethodError(receiver, memberName, positionalArguments, namedArguments, existingArgumentNames) {
903 if (existingArgumentNames === void 0) 877 if (existingArgumentNames === void 0)
904 existingArgumentNames = null; 878 existingArgumentNames = null;
905 this[_receiver] = receiver; 879 this[_receiver] = receiver;
906 this[_memberName] = memberName; 880 this[_memberName] = memberName;
907 this[_arguments] = positionalArguments; 881 this[_arguments] = positionalArguments;
908 this[_namedArguments] = namedArguments; 882 this[_namedArguments] = namedArguments;
909 this[_existingArgumentNames] = existingArgumentNames; 883 this[_existingArgumentNames] = existingArgumentNames;
910 super.Error(); 884 super.Error();
911 } 885 }
912 toString() { 886 toString() {
913 let sb = new StringBuffer(); 887 let sb = new StringBuffer();
914 let i = 0; 888 let i = 0;
915 if (this[_arguments] != null) { 889 if (this[_arguments] != null) {
916 for (; dart.notNull(i) < dart.notNull(this[_arguments][$length]); i = da rt.notNull(i) + 1) { 890 for (; dart.notNull(i) < dart.notNull(this[_arguments].length); i = dart .notNull(i) + 1) {
917 if (dart.notNull(i) > 0) { 891 if (dart.notNull(i) > 0) {
918 sb.write(", "); 892 sb.write(", ");
919 } 893 }
920 sb.write(Error.safeToString(this[_arguments][$get](i))); 894 sb.write(Error.safeToString(this[_arguments][dartx.get](i)));
921 } 895 }
922 } 896 }
923 if (this[_namedArguments] != null) { 897 if (this[_namedArguments] != null) {
924 this[_namedArguments].forEach(dart.fn((key, value) => { 898 this[_namedArguments].forEach(dart.fn((key, value) => {
925 if (dart.notNull(i) > 0) { 899 if (dart.notNull(i) > 0) {
926 sb.write(", "); 900 sb.write(", ");
927 } 901 }
928 sb.write(_symbolToString(key)); 902 sb.write(_symbolToString(key));
929 sb.write(": "); 903 sb.write(": ");
930 sb.write(Error.safeToString(value)); 904 sb.write(Error.safeToString(value));
931 i = dart.notNull(i) + 1; 905 i = dart.notNull(i) + 1;
932 }, Object, [Symbol, Object])); 906 }, Object, [Symbol, Object]));
933 } 907 }
934 if (this[_existingArgumentNames] == null) { 908 if (this[_existingArgumentNames] == null) {
935 return `NoSuchMethodError : method not found: '${this[_memberName]}'\n` + `Receiver: ${Error.safeToString(this[_receiver])}\n` + `Arguments: [${sb}]`; 909 return `NoSuchMethodError : method not found: '${this[_memberName]}'\n` + `Receiver: ${Error.safeToString(this[_receiver])}\n` + `Arguments: [${sb}]`;
936 } else { 910 } else {
937 let actualParameters = dart.toString(sb); 911 let actualParameters = dart.toString(sb);
938 sb = new StringBuffer(); 912 sb = new StringBuffer();
939 for (let i = 0; dart.notNull(i) < dart.notNull(this[_existingArgumentNam es][$length]); i = dart.notNull(i) + 1) { 913 for (let i = 0; dart.notNull(i) < dart.notNull(this[_existingArgumentNam es].length); i = dart.notNull(i) + 1) {
940 if (dart.notNull(i) > 0) { 914 if (dart.notNull(i) > 0) {
941 sb.write(", "); 915 sb.write(", ");
942 } 916 }
943 sb.write(this[_existingArgumentNames][$get](i)); 917 sb.write(this[_existingArgumentNames][dartx.get](i));
944 } 918 }
945 let formalParameters = dart.toString(sb); 919 let formalParameters = dart.toString(sb);
946 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})`; 920 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})`;
947 } 921 }
948 } 922 }
949 } 923 }
950 dart.setSignature(NoSuchMethodError, { 924 dart.setSignature(NoSuchMethodError, {
951 constructors: () => ({NoSuchMethodError: [NoSuchMethodError, [Object, Symbol , List, Map$(Symbol, Object)], [List]]}) 925 constructors: () => ({NoSuchMethodError: [NoSuchMethodError, [Object, Symbol , List, Map$(Symbol, Object)], [List]]})
952 }); 926 });
953 class UnsupportedError extends Error { 927 class UnsupportedError extends Error {
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1097 report = dart.notNull(report) + ` (at offset ${offset})`; 1071 report = dart.notNull(report) + ` (at offset ${offset})`;
1098 } 1072 }
1099 return report; 1073 return report;
1100 } 1074 }
1101 if (offset != -1 && (dart.notNull(offset) < 0 || dart.notNull(offset) > da rt.notNull(dart.as(dart.dload(this.source, 'length'), num)))) { 1075 if (offset != -1 && (dart.notNull(offset) < 0 || dart.notNull(offset) > da rt.notNull(dart.as(dart.dload(this.source, 'length'), num)))) {
1102 offset = -1; 1076 offset = -1;
1103 } 1077 }
1104 if (offset == -1) { 1078 if (offset == -1) {
1105 let source = dart.as(this.source, String); 1079 let source = dart.as(this.source, String);
1106 if (dart.notNull(source.length) > 78) { 1080 if (dart.notNull(source.length) > 78) {
1107 source = dart.notNull(source.substring(0, 75)) + "..."; 1081 source = dart.notNull(source[dartx.substring](0, 75)) + "...";
1108 } 1082 }
1109 return `${report}\n${source}`; 1083 return `${report}\n${source}`;
1110 } 1084 }
1111 let lineNum = 1; 1085 let lineNum = 1;
1112 let lineStart = 0; 1086 let lineStart = 0;
1113 let lastWasCR = null; 1087 let lastWasCR = null;
1114 for (let i = 0; dart.notNull(i) < dart.notNull(offset); i = dart.notNull(i ) + 1) { 1088 for (let i = 0; dart.notNull(i) < dart.notNull(offset); i = dart.notNull(i ) + 1) {
1115 let char = dart.as(dart.dsend(this.source, 'codeUnitAt', i), int); 1089 let char = dart.as(dart.dsend(this.source, 'codeUnitAt', i), int);
1116 if (char == 10) { 1090 if (char == 10) {
1117 if (lineStart != i || !dart.notNull(lastWasCR)) { 1091 if (lineStart != i || !dart.notNull(lastWasCR)) {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
1152 start = dart.notNull(end) - 75; 1126 start = dart.notNull(end) - 75;
1153 prefix = "..."; 1127 prefix = "...";
1154 } else { 1128 } else {
1155 start = dart.notNull(offset) - 36; 1129 start = dart.notNull(offset) - 36;
1156 end = dart.notNull(offset) + 36; 1130 end = dart.notNull(offset) + 36;
1157 prefix = postfix = "..."; 1131 prefix = postfix = "...";
1158 } 1132 }
1159 } 1133 }
1160 let slice = dart.as(dart.dsend(this.source, 'substring', start, end), Stri ng); 1134 let slice = dart.as(dart.dsend(this.source, 'substring', start, end), Stri ng);
1161 let markOffset = dart.notNull(offset) - dart.notNull(start) + dart.notNull (prefix.length); 1135 let markOffset = dart.notNull(offset) - dart.notNull(start) + dart.notNull (prefix.length);
1162 return `${report}${prefix}${slice}${postfix}\n${" "['*'](markOffset)}^\n`; 1136 return `${report}${prefix}${slice}${postfix}\n${" "[dartx['*']](markOffset )}^\n`;
1163 } 1137 }
1164 } 1138 }
1165 FormatException[dart.implements] = () => [Exception]; 1139 FormatException[dart.implements] = () => [Exception];
1166 dart.setSignature(FormatException, { 1140 dart.setSignature(FormatException, {
1167 constructors: () => ({FormatException: [FormatException, [], [String, Object , int]]}) 1141 constructors: () => ({FormatException: [FormatException, [], [String, Object , int]]})
1168 }); 1142 });
1169 class IntegerDivisionByZeroException extends Object { 1143 class IntegerDivisionByZeroException extends Object {
1170 IntegerDivisionByZeroException() { 1144 IntegerDivisionByZeroException() {
1171 } 1145 }
1172 toString() { 1146 toString() {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
1271 dart.setSignature(int, { 1245 dart.setSignature(int, {
1272 constructors: () => ({fromEnvironment: [int, [String], {defaultValue: int}]} ), 1246 constructors: () => ({fromEnvironment: [int, [String], {defaultValue: int}]} ),
1273 statics: () => ({parse: [int, [String], {radix: int, onError: dart.functionT ype(int, [String])}]}), 1247 statics: () => ({parse: [int, [String], {radix: int, onError: dart.functionT ype(int, [String])}]}),
1274 names: ['parse'] 1248 names: ['parse']
1275 }); 1249 });
1276 class Invocation extends Object { 1250 class Invocation extends Object {
1277 get isAccessor() { 1251 get isAccessor() {
1278 return dart.notNull(this.isGetter) || dart.notNull(this.isSetter); 1252 return dart.notNull(this.isGetter) || dart.notNull(this.isSetter);
1279 } 1253 }
1280 } 1254 }
1281 let $iterator = dart.JsSymbol('$iterator');
1282 let $join = dart.JsSymbol('$join');
1283 let Iterable$ = dart.generic(function(E) { 1255 let Iterable$ = dart.generic(function(E) {
1284 class Iterable extends Object { 1256 class Iterable extends Object {
1285 Iterable() { 1257 Iterable() {
1286 } 1258 }
1287 static generate(count, generator) { 1259 static generate(count, generator) {
1288 if (generator === void 0) 1260 if (generator === void 0)
1289 generator = null; 1261 generator = null;
1290 if (dart.notNull(count) <= 0) 1262 if (dart.notNull(count) <= 0)
1291 return new (_internal.EmptyIterable$(E))(); 1263 return new (_internal.EmptyIterable$(E))();
1292 return new (exports._GeneratorIterable$(E))(count, generator); 1264 return new (exports._GeneratorIterable$(E))(count, generator);
1293 } 1265 }
1294 [dart.JsSymbol.iterator]() { 1266 [dart.JsSymbol.iterator]() {
1295 return new dart.JsIterator(this[$iterator]); 1267 return new dart.JsIterator(this[dartx.iterator]);
1296 } 1268 }
1297 [$join](separator) { 1269 join(separator) {
1298 if (separator === void 0) 1270 if (separator === void 0)
1299 separator = ""; 1271 separator = "";
1300 let buffer = new StringBuffer(); 1272 let buffer = new StringBuffer();
1301 buffer.writeAll(this, separator); 1273 buffer.writeAll(this, separator);
1302 return dart.toString(buffer); 1274 return dart.toString(buffer);
1303 } 1275 }
1304 } 1276 }
1305 dart.setSignature(Iterable, { 1277 dart.setSignature(Iterable, {
1306 constructors: () => ({ 1278 constructors: () => ({
1307 Iterable: [Iterable$(E), []], 1279 Iterable: [Iterable$(E), []],
1308 generate: [Iterable$(E), [int], [dart.functionType(E, [int])]] 1280 generate: [Iterable$(E), [int], [dart.functionType(E, [int])]]
1309 }), 1281 }),
1310 methods: () => ({[$join]: [String, [], [String]]}) 1282 methods: () => ({join: [String, [], [String]]})
1311 }); 1283 });
1312 return Iterable; 1284 return Iterable;
1313 }); 1285 });
1314 let Iterable = Iterable$(); 1286 let Iterable = Iterable$();
1315 let _Generator$ = dart.generic(function(E) { 1287 let _Generator$ = dart.generic(function(E) {
1316 let _Generator = dart.typedef('_Generator', () => dart.functionType(E, [int] )); 1288 let _Generator = dart.typedef('_Generator', () => dart.functionType(E, [int] ));
1317 return _Generator; 1289 return _Generator;
1318 }); 1290 });
1319 let _Generator = _Generator$(); 1291 let _Generator = _Generator$();
1320 let _end = dart.JsSymbol('_end'); 1292 let _end = dart.JsSymbol('_end');
1321 let _start = dart.JsSymbol('_start'); 1293 let _start = dart.JsSymbol('_start');
1322 let _generator = dart.JsSymbol('_generator'); 1294 let _generator = dart.JsSymbol('_generator');
1323 let $skip = dart.JsSymbol('$skip');
1324 let $take = dart.JsSymbol('$take');
1325 let _GeneratorIterable$ = dart.generic(function(E) { 1295 let _GeneratorIterable$ = dart.generic(function(E) {
1326 class _GeneratorIterable extends collection.IterableBase$(E) { 1296 class _GeneratorIterable extends collection.IterableBase$(E) {
1327 _GeneratorIterable(end, generator) { 1297 _GeneratorIterable(end, generator) {
1328 this[_end] = end; 1298 this[_end] = end;
1329 this[_start] = 0; 1299 this[_start] = 0;
1330 this[_generator] = dart.as(generator != null ? generator : exports._Gene ratorIterable$()._id, _Generator$(E)); 1300 this[_generator] = dart.as(generator != null ? generator : exports._Gene ratorIterable$()._id, _Generator$(E));
1331 super.IterableBase(); 1301 super.IterableBase();
1332 } 1302 }
1333 slice(start, end, generator) { 1303 slice(start, end, generator) {
1334 this[_start] = start; 1304 this[_start] = start;
1335 this[_end] = end; 1305 this[_end] = end;
1336 this[_generator] = generator; 1306 this[_generator] = generator;
1337 super.IterableBase(); 1307 super.IterableBase();
1338 } 1308 }
1339 get [$iterator]() { 1309 get iterator() {
1340 return new (_GeneratorIterator$(E))(this[_start], this[_end], this[_gene rator]); 1310 return new (_GeneratorIterator$(E))(this[_start], this[_end], this[_gene rator]);
1341 } 1311 }
1342 get [$length]() { 1312 get length() {
1343 return dart.notNull(this[_end]) - dart.notNull(this[_start]); 1313 return dart.notNull(this[_end]) - dart.notNull(this[_start]);
1344 } 1314 }
1345 [$skip](count) { 1315 skip(count) {
1346 RangeError.checkNotNegative(count, "count"); 1316 RangeError.checkNotNegative(count, "count");
1347 if (count == 0) 1317 if (count == 0)
1348 return this; 1318 return this;
1349 let newStart = dart.notNull(this[_start]) + dart.notNull(count); 1319 let newStart = dart.notNull(this[_start]) + dart.notNull(count);
1350 if (dart.notNull(newStart) >= dart.notNull(this[_end])) 1320 if (dart.notNull(newStart) >= dart.notNull(this[_end]))
1351 return new (_internal.EmptyIterable$(E))(); 1321 return new (_internal.EmptyIterable$(E))();
1352 return new (exports._GeneratorIterable$(E)).slice(newStart, this[_end], this[_generator]); 1322 return new (exports._GeneratorIterable$(E)).slice(newStart, this[_end], this[_generator]);
1353 } 1323 }
1354 [$take](count) { 1324 take(count) {
1355 RangeError.checkNotNegative(count, "count"); 1325 RangeError.checkNotNegative(count, "count");
1356 if (count == 0) 1326 if (count == 0)
1357 return new (_internal.EmptyIterable$(E))(); 1327 return new (_internal.EmptyIterable$(E))();
1358 let newEnd = dart.notNull(this[_start]) + dart.notNull(count); 1328 let newEnd = dart.notNull(this[_start]) + dart.notNull(count);
1359 if (dart.notNull(newEnd) >= dart.notNull(this[_end])) 1329 if (dart.notNull(newEnd) >= dart.notNull(this[_end]))
1360 return this; 1330 return this;
1361 return new (exports._GeneratorIterable$(E)).slice(this[_start], newEnd, this[_generator]); 1331 return new (exports._GeneratorIterable$(E)).slice(this[_start], newEnd, this[_generator]);
1362 } 1332 }
1363 static _id(n) { 1333 static _id(n) {
1364 return n; 1334 return n;
1365 } 1335 }
1366 } 1336 }
1367 _GeneratorIterable[dart.implements] = () => [_internal.EfficientLength]; 1337 _GeneratorIterable[dart.implements] = () => [_internal.EfficientLength];
1338 dart.defineExtensionMembers(_GeneratorIterable, ['skip', 'take', 'iterator', 'length']);
1368 dart.defineNamedConstructor(_GeneratorIterable, 'slice'); 1339 dart.defineNamedConstructor(_GeneratorIterable, 'slice');
1369 dart.setSignature(_GeneratorIterable, { 1340 dart.setSignature(_GeneratorIterable, {
1370 constructors: () => ({ 1341 constructors: () => ({
1371 _GeneratorIterable: [exports._GeneratorIterable$(E), [int, dart.function Type(E, [int])]], 1342 _GeneratorIterable: [exports._GeneratorIterable$(E), [int, dart.function Type(E, [int])]],
1372 slice: [exports._GeneratorIterable$(E), [int, int, _Generator$(E)]] 1343 slice: [exports._GeneratorIterable$(E), [int, int, _Generator$(E)]]
1373 }), 1344 }),
1374 methods: () => ({ 1345 methods: () => ({
1375 [$skip]: [Iterable$(E), [int]], 1346 skip: [Iterable$(E), [int]],
1376 [$take]: [Iterable$(E), [int]] 1347 take: [Iterable$(E), [int]]
1377 }), 1348 }),
1378 statics: () => ({_id: [int, [int]]}), 1349 statics: () => ({_id: [int, [int]]}),
1379 names: ['_id'] 1350 names: ['_id']
1380 }); 1351 });
1381 return _GeneratorIterable; 1352 return _GeneratorIterable;
1382 }); 1353 });
1383 dart.defineLazyClassGeneric(exports, '_GeneratorIterable', {get: _GeneratorIte rable$}); 1354 dart.defineLazyClassGeneric(exports, '_GeneratorIterable', {get: _GeneratorIte rable$});
1384 let _index = dart.JsSymbol('_index'); 1355 let _index = dart.JsSymbol('_index');
1385 let _current = dart.JsSymbol('_current'); 1356 let _current = dart.JsSymbol('_current');
1386 let _GeneratorIterator$ = dart.generic(function(E) { 1357 let _GeneratorIterator$ = dart.generic(function(E) {
(...skipping 30 matching lines...) Expand all
1417 class BidirectionalIterator extends Object {} 1388 class BidirectionalIterator extends Object {}
1418 BidirectionalIterator[dart.implements] = () => [Iterator$(E)]; 1389 BidirectionalIterator[dart.implements] = () => [Iterator$(E)];
1419 return BidirectionalIterator; 1390 return BidirectionalIterator;
1420 }); 1391 });
1421 let BidirectionalIterator = BidirectionalIterator$(); 1392 let BidirectionalIterator = BidirectionalIterator$();
1422 let Iterator$ = dart.generic(function(E) { 1393 let Iterator$ = dart.generic(function(E) {
1423 class Iterator extends Object {} 1394 class Iterator extends Object {}
1424 return Iterator; 1395 return Iterator;
1425 }); 1396 });
1426 let Iterator = Iterator$(); 1397 let Iterator = Iterator$();
1427 let $set = dart.JsSymbol('$set');
1428 let $add = dart.JsSymbol('$add');
1429 let $checkMutable = dart.JsSymbol('$checkMutable');
1430 let $checkGrowable = dart.JsSymbol('$checkGrowable');
1431 let $where = dart.JsSymbol('$where');
1432 let $expand = dart.JsSymbol('$expand');
1433 let $forEach = dart.JsSymbol('$forEach');
1434 let $map = dart.JsSymbol('$map');
1435 let $takeWhile = dart.JsSymbol('$takeWhile');
1436 let $skipWhile = dart.JsSymbol('$skipWhile');
1437 let $reduce = dart.JsSymbol('$reduce');
1438 let $fold = dart.JsSymbol('$fold');
1439 let $firstWhere = dart.JsSymbol('$firstWhere');
1440 let $lastWhere = dart.JsSymbol('$lastWhere');
1441 let $singleWhere = dart.JsSymbol('$singleWhere');
1442 let $elementAt = dart.JsSymbol('$elementAt');
1443 let $first = dart.JsSymbol('$first');
1444 let $last = dart.JsSymbol('$last');
1445 let $single = dart.JsSymbol('$single');
1446 let $any = dart.JsSymbol('$any');
1447 let $every = dart.JsSymbol('$every');
1448 let $contains = dart.JsSymbol('$contains');
1449 let $isEmpty = dart.JsSymbol('$isEmpty');
1450 let $isNotEmpty = dart.JsSymbol('$isNotEmpty');
1451 let $toString = dart.JsSymbol('$toString');
1452 let $toList = dart.JsSymbol('$toList');
1453 let $toSet = dart.JsSymbol('$toSet');
1454 let $hashCode = dart.JsSymbol('$hashCode');
1455 let $addAll = dart.JsSymbol('$addAll');
1456 let $reversed = dart.JsSymbol('$reversed');
1457 let $sort = dart.JsSymbol('$sort');
1458 let $shuffle = dart.JsSymbol('$shuffle');
1459 let $indexOf = dart.JsSymbol('$indexOf');
1460 let $lastIndexOf = dart.JsSymbol('$lastIndexOf');
1461 let $clear = dart.JsSymbol('$clear');
1462 let $insert = dart.JsSymbol('$insert');
1463 let $insertAll = dart.JsSymbol('$insertAll');
1464 let $setAll = dart.JsSymbol('$setAll');
1465 let $remove = dart.JsSymbol('$remove');
1466 let $removeAt = dart.JsSymbol('$removeAt');
1467 let $removeLast = dart.JsSymbol('$removeLast');
1468 let $removeWhere = dart.JsSymbol('$removeWhere');
1469 let $retainWhere = dart.JsSymbol('$retainWhere');
1470 let $sublist = dart.JsSymbol('$sublist');
1471 let $getRange = dart.JsSymbol('$getRange');
1472 let $setRange = dart.JsSymbol('$setRange');
1473 let $removeRange = dart.JsSymbol('$removeRange');
1474 let $fillRange = dart.JsSymbol('$fillRange');
1475 let $replaceRange = dart.JsSymbol('$replaceRange');
1476 let $asMap = dart.JsSymbol('$asMap');
1477 let List$ = dart.generic(function(E) { 1398 let List$ = dart.generic(function(E) {
1478 class List extends Object { 1399 class List extends Object {
1479 static new(length) { 1400 static new(length) {
1480 if (length === void 0) 1401 if (length === void 0)
1481 length = null; 1402 length = null;
1482 let list = null; 1403 let list = null;
1483 if (length == null) { 1404 if (length == null) {
1484 list = []; 1405 list = [];
1485 } else { 1406 } else {
1486 if (!(typeof length == 'number') || dart.notNull(length) < 0) { 1407 if (!(typeof length == 'number') || dart.notNull(length) < 0) {
1487 throw new ArgumentError(`Length must be a non-negative integer: ${le ngth}`); 1408 throw new ArgumentError(`Length must be a non-negative integer: ${le ngth}`);
1488 } 1409 }
1489 list = new Array(length); 1410 list = _interceptors.JSArray.markFixedList(dart.as(new Array(length), List$()));
1490 list.fixed$length = Array;
1491 } 1411 }
1492 dart.setType(list, List$(E)); 1412 return _interceptors.JSArray$(E).typed(list);
1493 return dart.as(list, List$(E));
1494 } 1413 }
1495 static filled(length, fill) { 1414 static filled(length, fill) {
1496 let result = List$(E).new(length); 1415 let result = List$(E).new(length);
1497 if (length != 0 && dart.notNull(fill != null)) { 1416 if (length != 0 && dart.notNull(fill != null)) {
1498 for (let i = 0; dart.notNull(i) < dart.notNull(result[$length]); i = d art.notNull(i) + 1) { 1417 for (let i = 0; dart.notNull(i) < dart.notNull(result.length); i = dar t.notNull(i) + 1) {
1499 result[$set](i, fill); 1418 result[dartx.set](i, fill);
1500 } 1419 }
1501 } 1420 }
1502 return result; 1421 return result;
1503 } 1422 }
1504 static from(elements, opts) { 1423 static from(elements, opts) {
1505 let growable = opts && 'growable' in opts ? opts.growable : true; 1424 let growable = opts && 'growable' in opts ? opts.growable : true;
1506 let list = List$(E).new(); 1425 let list = List$(E).new();
1507 for (let e of elements) { 1426 for (let e of elements) {
1508 list[$add](dart.as(e, E)); 1427 list[dartx.add](dart.as(e, E));
1509 } 1428 }
1510 if (growable) 1429 if (growable)
1511 return list; 1430 return list;
1512 return dart.as(_internal.makeListFixedLength(list), List$(E)); 1431 return dart.as(_internal.makeListFixedLength(list), List$(E));
1513 } 1432 }
1514 static generate(length, generator, opts) { 1433 static generate(length, generator, opts) {
1515 let growable = opts && 'growable' in opts ? opts.growable : true; 1434 let growable = opts && 'growable' in opts ? opts.growable : true;
1516 let result = null; 1435 let result = null;
1517 if (growable) { 1436 if (growable) {
1518 result = dart.setType([], List$(E)); 1437 result = dart.list([], E);
1519 result[$length] = length; 1438 result.length = length;
1520 } else { 1439 } else {
1521 result = List$(E).new(length); 1440 result = List$(E).new(length);
1522 } 1441 }
1523 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 1442 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
1524 result[$set](i, generator(i)); 1443 result[dartx.set](i, generator(i));
1525 } 1444 }
1526 return result; 1445 return result;
1527 } 1446 }
1528 [$checkMutable](reason) {} 1447 [dart.JsSymbol.iterator]() {
1529 [$checkGrowable](reason) {} 1448 return new dart.JsIterator(this[dartx.iterator]);
1530 [$where](f) {
1531 dart.as(f, dart.functionType(bool, [E]));
1532 return new (_internal.IterableMixinWorkaround$(E))().where(this, f);
1533 }
1534 [$expand](f) {
1535 dart.as(f, dart.functionType(Iterable, [E]));
1536 return _internal.IterableMixinWorkaround.expand(this, f);
1537 }
1538 [$forEach](f) {
1539 dart.as(f, dart.functionType(dart.void, [E]));
1540 let length = this[$length];
1541 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
1542 f(dart.as(this[i], E));
1543 if (length != this[$length]) {
1544 throw new ConcurrentModificationError(this);
1545 }
1546 }
1547 }
1548 [$map](f) {
1549 dart.as(f, dart.functionType(Object, [E]));
1550 return _internal.IterableMixinWorkaround.mapList(this, f);
1551 }
1552 [$join](separator) {
1553 if (separator === void 0)
1554 separator = "";
1555 let list = List$().new(this[$length]);
1556 for (let i = 0; dart.notNull(i) < dart.notNull(this[$length]); i = dart. notNull(i) + 1) {
1557 list[$set](i, `${this[$get](i)}`);
1558 }
1559 return list.join(separator);
1560 }
1561 [$take](n) {
1562 return new (_internal.IterableMixinWorkaround$(E))().takeList(this, n);
1563 }
1564 [$takeWhile](test) {
1565 dart.as(test, dart.functionType(bool, [E]));
1566 return new (_internal.IterableMixinWorkaround$(E))().takeWhile(this, tes t);
1567 }
1568 [$skip](n) {
1569 return new (_internal.IterableMixinWorkaround$(E))().skipList(this, n);
1570 }
1571 [$skipWhile](test) {
1572 dart.as(test, dart.functionType(bool, [E]));
1573 return new (_internal.IterableMixinWorkaround$(E))().skipWhile(this, tes t);
1574 }
1575 [$reduce](combine) {
1576 dart.as(combine, dart.functionType(E, [E, E]));
1577 return dart.as(_internal.IterableMixinWorkaround.reduce(this, combine), E);
1578 }
1579 [$fold](initialValue, combine) {
1580 dart.as(combine, dart.functionType(Object, [dart.bottom, E]));
1581 return _internal.IterableMixinWorkaround.fold(this, initialValue, combin e);
1582 }
1583 [$firstWhere](test, opts) {
1584 dart.as(test, dart.functionType(bool, [E]));
1585 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
1586 dart.as(orElse, dart.functionType(E, []));
1587 return dart.as(_internal.IterableMixinWorkaround.firstWhere(this, test, orElse), E);
1588 }
1589 [$lastWhere](test, opts) {
1590 dart.as(test, dart.functionType(bool, [E]));
1591 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
1592 dart.as(orElse, dart.functionType(E, []));
1593 return dart.as(_internal.IterableMixinWorkaround.lastWhereList(this, tes t, orElse), E);
1594 }
1595 [$singleWhere](test) {
1596 dart.as(test, dart.functionType(bool, [E]));
1597 return dart.as(_internal.IterableMixinWorkaround.singleWhere(this, test) , E);
1598 }
1599 [$elementAt](index) {
1600 return this[$get](index);
1601 }
1602 get [$first]() {
1603 if (dart.notNull(this[$length]) > 0)
1604 return this[$get](0);
1605 throw new StateError("No elements");
1606 }
1607 get [$last]() {
1608 if (dart.notNull(this[$length]) > 0)
1609 return this[$get](dart.notNull(this[$length]) - 1);
1610 throw new StateError("No elements");
1611 }
1612 get [$single]() {
1613 if (this[$length] == 1)
1614 return this[$get](0);
1615 if (this[$length] == 0)
1616 throw new StateError("No elements");
1617 throw new StateError("More than one element");
1618 }
1619 [$any](f) {
1620 dart.as(f, dart.functionType(bool, [E]));
1621 return _internal.IterableMixinWorkaround.any(this, f);
1622 }
1623 [$every](f) {
1624 dart.as(f, dart.functionType(bool, [E]));
1625 return _internal.IterableMixinWorkaround.every(this, f);
1626 }
1627 [$contains](other) {
1628 for (let i = 0; dart.notNull(i) < dart.notNull(this[$length]); i = dart. notNull(i) + 1) {
1629 if (dart.equals(this[$get](i), other))
1630 return true;
1631 }
1632 return false;
1633 }
1634 get [$isEmpty]() {
1635 return this[$length] == 0;
1636 }
1637 get [$isNotEmpty]() {
1638 return !dart.notNull(this[$isEmpty]);
1639 }
1640 [$toString]() {
1641 return collection.ListBase.listToString(this);
1642 }
1643 [$toList](opts) {
1644 let growable = opts && 'growable' in opts ? opts.growable : true;
1645 return dart.as(dart.setType(this.slice(), core.List$(E)), List$(E));
1646 }
1647 [$toSet]() {
1648 return exports.Set$(E).from(this);
1649 }
1650 get [$iterator]() {
1651 return new (_internal.ListIterator$(E))(this);
1652 }
1653 get [$hashCode]() {
1654 return _js_helper.Primitives.objectHashCode(this);
1655 }
1656 [$get](index) {
1657 if (!(typeof index == 'number'))
1658 throw new ArgumentError(index);
1659 if (dart.notNull(index) >= dart.notNull(this[$length]) || dart.notNull(i ndex) < 0)
1660 throw new RangeError.value(index);
1661 return dart.as(this[index], E);
1662 }
1663 [$set](index, value) {
1664 dart.as(value, E);
1665 this[$checkMutable]('indexed set');
1666 if (!(typeof index == 'number'))
1667 throw new ArgumentError(index);
1668 if (dart.notNull(index) >= dart.notNull(this[$length]) || dart.notNull(i ndex) < 0)
1669 throw new RangeError.value(index);
1670 this[index] = value;
1671 }
1672 get [$length]() {
1673 return dart.as(this.length, int);
1674 }
1675 set [$length](newLength) {
1676 if (!(typeof newLength == 'number'))
1677 throw new ArgumentError(newLength);
1678 if (dart.notNull(newLength) < 0)
1679 throw new RangeError.value(newLength);
1680 this[$checkGrowable]('set length');
1681 this.length = newLength;
1682 }
1683 [$add](value) {
1684 dart.as(value, E);
1685 this[$checkGrowable]('add');
1686 this.push(value);
1687 }
1688 [$addAll](iterable) {
1689 dart.as(iterable, Iterable$(E));
1690 for (let e of iterable) {
1691 this[$add](e);
1692 }
1693 }
1694 get [$reversed]() {
1695 return new (_internal.IterableMixinWorkaround$(E))().reversedList(this);
1696 }
1697 [$sort](compare) {
1698 if (compare === void 0)
1699 compare = null;
1700 dart.as(compare, dart.functionType(int, [E, E]));
1701 this[$checkMutable]('sort');
1702 _internal.IterableMixinWorkaround.sortList(this, compare);
1703 }
1704 [$shuffle](random) {
1705 if (random === void 0)
1706 random = null;
1707 _internal.IterableMixinWorkaround.shuffleList(this, random);
1708 }
1709 [$indexOf](element, start) {
1710 dart.as(element, E);
1711 if (start === void 0)
1712 start = 0;
1713 return _internal.IterableMixinWorkaround.indexOfList(this, element, star t);
1714 }
1715 [$lastIndexOf](element, start) {
1716 dart.as(element, E);
1717 if (start === void 0)
1718 start = null;
1719 return _internal.IterableMixinWorkaround.lastIndexOfList(this, element, start);
1720 }
1721 [$clear]() {
1722 this[$length] = 0;
1723 }
1724 [$insert](index, element) {
1725 dart.as(element, E);
1726 if (!(typeof index == 'number'))
1727 throw new ArgumentError(index);
1728 if (dart.notNull(index) < 0 || dart.notNull(index) > dart.notNull(this[$ length])) {
1729 throw new RangeError.value(index);
1730 }
1731 this[$checkGrowable]('insert');
1732 this.splice(index, 0, element);
1733 }
1734 [$insertAll](index, iterable) {
1735 dart.as(iterable, Iterable$(E));
1736 this[$checkGrowable]('insertAll');
1737 _internal.IterableMixinWorkaround.insertAllList(this, index, iterable);
1738 }
1739 [$setAll](index, iterable) {
1740 dart.as(iterable, Iterable$(E));
1741 this[$checkMutable]('setAll');
1742 _internal.IterableMixinWorkaround.setAllList(this, index, iterable);
1743 }
1744 [$remove](element) {
1745 this[$checkGrowable]('remove');
1746 for (let i = 0; dart.notNull(i) < dart.notNull(this[$length]); i = dart. notNull(i) + 1) {
1747 if (dart.equals(this[$get](i), /* Unimplemented unknown name */value)) {
1748 this.splice(i, 1);
1749 return true;
1750 }
1751 }
1752 return false;
1753 }
1754 [$removeAt](index) {
1755 if (!(typeof index == 'number'))
1756 throw new ArgumentError(index);
1757 if (dart.notNull(index) < 0 || dart.notNull(index) >= dart.notNull(this[ $length])) {
1758 throw new RangeError.value(index);
1759 }
1760 this[$checkGrowable]('removeAt');
1761 return dart.as(this.splice(index, 1)[0], E);
1762 }
1763 [$removeLast]() {
1764 this[$checkGrowable]('removeLast');
1765 if (this[$length] == 0)
1766 throw new RangeError.value(-1);
1767 return dart.as(this.pop(), E);
1768 }
1769 [$removeWhere](test) {
1770 dart.as(test, dart.functionType(bool, [E]));
1771 _internal.IterableMixinWorkaround.removeWhereList(this, test);
1772 }
1773 [$retainWhere](test) {
1774 dart.as(test, dart.functionType(bool, [E]));
1775 _internal.IterableMixinWorkaround.removeWhereList(this, dart.fn(element => !dart.notNull(test(element)), bool, [E]));
1776 }
1777 [$sublist](start, end) {
1778 if (end === void 0)
1779 end = null;
1780 dart.dcall(/* Unimplemented unknown name */checkNull, start);
1781 if (!(typeof start == 'number'))
1782 throw new ArgumentError(start);
1783 if (dart.notNull(start) < 0 || dart.notNull(start) > dart.notNull(this[$ length])) {
1784 throw new RangeError.range(start, 0, this[$length]);
1785 }
1786 if (end == null) {
1787 end = this[$length];
1788 } else {
1789 if (!(typeof end == 'number'))
1790 throw new ArgumentError(end);
1791 if (dart.notNull(end) < dart.notNull(start) || dart.notNull(end) > dar t.notNull(this[$length])) {
1792 throw new RangeError.range(end, start, this[$length]);
1793 }
1794 }
1795 if (start == end)
1796 return dart.setType([], List$(E));
1797 return _interceptors.JSArray$(E).markGrowable(this.slice(start, end));
1798 }
1799 [$getRange](start, end) {
1800 return new (_internal.IterableMixinWorkaround$(E))().getRangeList(this, start, end);
1801 }
1802 [$setRange](start, end, iterable, skipCount) {
1803 dart.as(iterable, Iterable$(E));
1804 if (skipCount === void 0)
1805 skipCount = 0;
1806 this[$checkMutable]('set range');
1807 _internal.IterableMixinWorkaround.setRangeList(this, start, end, iterabl e, skipCount);
1808 }
1809 [$removeRange](start, end) {
1810 this[$checkGrowable]('removeRange');
1811 let receiverLength = this[$length];
1812 if (dart.notNull(start) < 0 || dart.notNull(start) > dart.notNull(receiv erLength)) {
1813 throw new RangeError.range(start, 0, receiverLength);
1814 }
1815 if (dart.notNull(end) < dart.notNull(start) || dart.notNull(end) > dart. notNull(receiverLength)) {
1816 throw new RangeError.range(end, start, receiverLength);
1817 }
1818 _internal.Lists.copy(this, end, this, start, dart.notNull(receiverLength ) - dart.notNull(end));
1819 this[$length] = dart.notNull(receiverLength) - (dart.notNull(end) - dart .notNull(start));
1820 }
1821 [$fillRange](start, end, fillValue) {
1822 if (fillValue === void 0)
1823 fillValue = null;
1824 dart.as(fillValue, E);
1825 this[$checkMutable]('fill range');
1826 _internal.IterableMixinWorkaround.fillRangeList(this, start, end, fillVa lue);
1827 }
1828 [$replaceRange](start, end, replacement) {
1829 dart.as(replacement, Iterable$(E));
1830 this[$checkGrowable]('removeRange');
1831 _internal.IterableMixinWorkaround.replaceRangeList(this, start, end, rep lacement);
1832 }
1833 [$asMap]() {
1834 return new (_internal.IterableMixinWorkaround$(E))().asMapList(this);
1835 } 1449 }
1836 } 1450 }
1837 dart.setBaseClass(List, dart.global.Array); 1451 List[dart.implements] = () => [Iterable$(E)];
1838 List[dart.implements] = () => [Iterable$(E), _internal.EfficientLength];
1839 dart.setSignature(List, { 1452 dart.setSignature(List, {
1840 constructors: () => ({ 1453 constructors: () => ({
1841 new: [List$(E), [], [int]], 1454 new: [List$(E), [], [int]],
1842 filled: [List$(E), [int, E]], 1455 filled: [List$(E), [int, E]],
1843 from: [List$(E), [Iterable], {growable: bool}], 1456 from: [List$(E), [Iterable], {growable: bool}],
1844 generate: [List$(E), [int, dart.functionType(E, [int])], {growable: bool }] 1457 generate: [List$(E), [int, dart.functionType(E, [int])], {growable: bool }]
1845 }),
1846 methods: () => ({
1847 [$checkMutable]: [Object, [Object]],
1848 [$checkGrowable]: [Object, [Object]],
1849 [$where]: [Iterable$(E), [dart.functionType(bool, [E])]],
1850 [$expand]: [Iterable, [dart.functionType(Iterable, [E])]],
1851 [$forEach]: [dart.void, [dart.functionType(dart.void, [E])]],
1852 [$map]: [Iterable, [dart.functionType(Object, [E])]],
1853 [$join]: [String, [], [String]],
1854 [$take]: [Iterable$(E), [int]],
1855 [$takeWhile]: [Iterable$(E), [dart.functionType(bool, [E])]],
1856 [$skip]: [Iterable$(E), [int]],
1857 [$skipWhile]: [Iterable$(E), [dart.functionType(bool, [E])]],
1858 [$reduce]: [E, [dart.functionType(E, [E, E])]],
1859 [$fold]: [Object, [Object, dart.functionType(Object, [dart.bottom, E])]] ,
1860 [$firstWhere]: [E, [dart.functionType(bool, [E])], {orElse: dart.functio nType(E, [])}],
1861 [$lastWhere]: [E, [dart.functionType(bool, [E])], {orElse: dart.function Type(E, [])}],
1862 [$singleWhere]: [E, [dart.functionType(bool, [E])]],
1863 [$elementAt]: [E, [int]],
1864 [$any]: [bool, [dart.functionType(bool, [E])]],
1865 [$every]: [bool, [dart.functionType(bool, [E])]],
1866 [$contains]: [bool, [Object]],
1867 [$toList]: [List$(E), [], {growable: bool}],
1868 [$toSet]: [exports.Set$(E), []],
1869 [$get]: [E, [int]],
1870 [$set]: [dart.void, [int, E]],
1871 [$add]: [dart.void, [E]],
1872 [$addAll]: [dart.void, [Iterable$(E)]],
1873 [$sort]: [dart.void, [], [dart.functionType(int, [E, E])]],
1874 [$shuffle]: [dart.void, [], [math.Random]],
1875 [$indexOf]: [int, [E], [int]],
1876 [$lastIndexOf]: [int, [E], [int]],
1877 [$clear]: [dart.void, []],
1878 [$insert]: [dart.void, [int, E]],
1879 [$insertAll]: [dart.void, [int, Iterable$(E)]],
1880 [$setAll]: [dart.void, [int, Iterable$(E)]],
1881 [$remove]: [bool, [Object]],
1882 [$removeAt]: [E, [int]],
1883 [$removeLast]: [E, []],
1884 [$removeWhere]: [dart.void, [dart.functionType(bool, [E])]],
1885 [$retainWhere]: [dart.void, [dart.functionType(bool, [E])]],
1886 [$sublist]: [List$(E), [int], [int]],
1887 [$getRange]: [Iterable$(E), [int, int]],
1888 [$setRange]: [dart.void, [int, int, Iterable$(E)], [int]],
1889 [$removeRange]: [dart.void, [int, int]],
1890 [$fillRange]: [dart.void, [int, int], [E]],
1891 [$replaceRange]: [dart.void, [int, int, Iterable$(E)]],
1892 [$asMap]: [Map$(int, E), []]
1893 }) 1458 })
1894 }); 1459 });
1895 return List; 1460 return List;
1896 }); 1461 });
1897 let List = List$(); 1462 let List = List$();
1898 dart.registerExtension(dart.global.Array, List);
1899 let Map$ = dart.generic(function(K, V) { 1463 let Map$ = dart.generic(function(K, V) {
1900 class Map extends Object { 1464 class Map extends Object {
1901 static new() { 1465 static new() {
1902 return collection.LinkedHashMap$(K, V).new(); 1466 return collection.LinkedHashMap$(K, V).new();
1903 } 1467 }
1904 static from(other) { 1468 static from(other) {
1905 return collection.LinkedHashMap$(K, V).from(other); 1469 return collection.LinkedHashMap$(K, V).from(other);
1906 } 1470 }
1907 static identity() { 1471 static identity() {
1908 return collection.LinkedHashMap$(K, V).identity(); 1472 return collection.LinkedHashMap$(K, V).identity();
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
2065 class String extends Object { 1629 class String extends Object {
2066 static fromCharCodes(charCodes, start, end) { 1630 static fromCharCodes(charCodes, start, end) {
2067 if (start === void 0) 1631 if (start === void 0)
2068 start = 0; 1632 start = 0;
2069 if (end === void 0) 1633 if (end === void 0)
2070 end = null; 1634 end = null;
2071 if (!dart.is(charCodes, _interceptors.JSArray)) { 1635 if (!dart.is(charCodes, _interceptors.JSArray)) {
2072 return String._stringFromIterable(charCodes, start, end); 1636 return String._stringFromIterable(charCodes, start, end);
2073 } 1637 }
2074 let list = dart.as(charCodes, List); 1638 let list = dart.as(charCodes, List);
2075 let len = list[$length]; 1639 let len = list.length;
2076 if (dart.notNull(start) < 0 || dart.notNull(start) > dart.notNull(len)) { 1640 if (dart.notNull(start) < 0 || dart.notNull(start) > dart.notNull(len)) {
2077 throw new RangeError.range(start, 0, len); 1641 throw new RangeError.range(start, 0, len);
2078 } 1642 }
2079 if (end == null) { 1643 if (end == null) {
2080 end = len; 1644 end = len;
2081 } else if (dart.notNull(end) < dart.notNull(start) || dart.notNull(end) > dart.notNull(len)) { 1645 } else if (dart.notNull(end) < dart.notNull(start) || dart.notNull(end) > dart.notNull(len)) {
2082 throw new RangeError.range(end, start, len); 1646 throw new RangeError.range(end, start, len);
2083 } 1647 }
2084 if (dart.notNull(start) > 0 || dart.notNull(end) < dart.notNull(len)) { 1648 if (dart.notNull(start) > 0 || dart.notNull(end) < dart.notNull(len)) {
2085 list = list[$sublist](start, end); 1649 list = list[dartx.sublist](start, end);
2086 } 1650 }
2087 return _js_helper.Primitives.stringFromCharCodes(list); 1651 return _js_helper.Primitives.stringFromCharCodes(list);
2088 } 1652 }
2089 static fromCharCode(charCode) { 1653 static fromCharCode(charCode) {
2090 return _js_helper.Primitives.stringFromCharCode(charCode); 1654 return _js_helper.Primitives.stringFromCharCode(charCode);
2091 } 1655 }
2092 static fromEnvironment(name, opts) { 1656 static fromEnvironment(name, opts) {
2093 let defaultValue = opts && 'defaultValue' in opts ? opts.defaultValue : nu ll; 1657 let defaultValue = opts && 'defaultValue' in opts ? opts.defaultValue : nu ll;
2094 throw new UnsupportedError('String.fromEnvironment can only be used as a c onst constructor'); 1658 throw new UnsupportedError('String.fromEnvironment can only be used as a c onst constructor');
2095 } 1659 }
2096 static _stringFromIterable(charCodes, start, end) { 1660 static _stringFromIterable(charCodes, start, end) {
2097 if (dart.notNull(start) < 0) 1661 if (dart.notNull(start) < 0)
2098 throw new RangeError.range(start, 0, charCodes[$length]); 1662 throw new RangeError.range(start, 0, charCodes.length);
2099 if (end != null && dart.notNull(end) < dart.notNull(start)) { 1663 if (end != null && dart.notNull(end) < dart.notNull(start)) {
2100 throw new RangeError.range(end, start, charCodes[$length]); 1664 throw new RangeError.range(end, start, charCodes.length);
2101 } 1665 }
2102 let it = charCodes[$iterator]; 1666 let it = charCodes[dartx.iterator];
2103 for (let i = 0; dart.notNull(i) < dart.notNull(start); i = dart.notNull(i) + 1) { 1667 for (let i = 0; dart.notNull(i) < dart.notNull(start); i = dart.notNull(i) + 1) {
2104 if (!dart.notNull(it.moveNext())) { 1668 if (!dart.notNull(it.moveNext())) {
2105 throw new RangeError.range(start, 0, i); 1669 throw new RangeError.range(start, 0, i);
2106 } 1670 }
2107 } 1671 }
2108 let list = []; 1672 let list = [];
2109 if (end == null) { 1673 if (end == null) {
2110 while (it.moveNext()) 1674 while (it.moveNext())
2111 list[$add](it.current); 1675 list[dartx.add](it.current);
2112 } else { 1676 } else {
2113 for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNul l(i) + 1) { 1677 for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNul l(i) + 1) {
2114 if (!dart.notNull(it.moveNext())) { 1678 if (!dart.notNull(it.moveNext())) {
2115 throw new RangeError.range(end, start, i); 1679 throw new RangeError.range(end, start, i);
2116 } 1680 }
2117 list[$add](it.current); 1681 list[dartx.add](it.current);
2118 } 1682 }
2119 } 1683 }
2120 return _js_helper.Primitives.stringFromCharCodes(list); 1684 return _js_helper.Primitives.stringFromCharCodes(list);
2121 } 1685 }
2122 } 1686 }
2123 String[dart.implements] = () => [Comparable$(String), Pattern]; 1687 String[dart.implements] = () => [Comparable$(String), Pattern];
2124 dart.setSignature(String, { 1688 dart.setSignature(String, {
2125 constructors: () => ({ 1689 constructors: () => ({
2126 fromCharCodes: [String, [Iterable$(int)], [int, int]], 1690 fromCharCodes: [String, [Iterable$(int)], [int, int]],
2127 fromCharCode: [String, [int]], 1691 fromCharCode: [String, [int]],
2128 fromEnvironment: [String, [String], {defaultValue: String}] 1692 fromEnvironment: [String, [String], {defaultValue: String}]
2129 }), 1693 }),
2130 statics: () => ({_stringFromIterable: [String, [Iterable$(int), int, int]]}) , 1694 statics: () => ({_stringFromIterable: [String, [Iterable$(int), int, int]]}) ,
2131 names: ['_stringFromIterable'] 1695 names: ['_stringFromIterable']
2132 }); 1696 });
2133 dart.defineLazyClass(exports, { 1697 dart.defineLazyClass(exports, {
2134 get Runes() { 1698 get Runes() {
2135 class Runes extends collection.IterableBase$(int) { 1699 class Runes extends collection.IterableBase$(int) {
2136 Runes(string) { 1700 Runes(string) {
2137 this.string = string; 1701 this.string = string;
2138 super.IterableBase(); 1702 super.IterableBase();
2139 } 1703 }
2140 get [$iterator]() { 1704 get iterator() {
2141 return new RuneIterator(this.string); 1705 return new RuneIterator(this.string);
2142 } 1706 }
2143 get [$last]() { 1707 get last() {
2144 if (this.string.length == 0) { 1708 if (this.string.length == 0) {
2145 throw new StateError('No elements.'); 1709 throw new StateError('No elements.');
2146 } 1710 }
2147 let length = this.string.length; 1711 let length = this.string.length;
2148 let code = this.string.codeUnitAt(dart.notNull(length) - 1); 1712 let code = this.string[dartx.codeUnitAt](dart.notNull(length) - 1);
2149 if (dart.notNull(_isTrailSurrogate(code)) && dart.notNull(this.string. length) > 1) { 1713 if (dart.notNull(_isTrailSurrogate(code)) && dart.notNull(this.string. length) > 1) {
2150 let previousCode = this.string.codeUnitAt(dart.notNull(length) - 2); 1714 let previousCode = this.string[dartx.codeUnitAt](dart.notNull(length ) - 2);
2151 if (_isLeadSurrogate(previousCode)) { 1715 if (_isLeadSurrogate(previousCode)) {
2152 return _combineSurrogatePair(previousCode, code); 1716 return _combineSurrogatePair(previousCode, code);
2153 } 1717 }
2154 } 1718 }
2155 return code; 1719 return code;
2156 } 1720 }
2157 } 1721 }
2158 dart.setSignature(Runes, { 1722 dart.setSignature(Runes, {
2159 constructors: () => ({Runes: [exports.Runes, [String]]}) 1723 constructors: () => ({Runes: [exports.Runes, [String]]})
2160 }); 1724 });
(...skipping 25 matching lines...) Expand all
2186 } 1750 }
2187 at(string, index) { 1751 at(string, index) {
2188 this.string = string; 1752 this.string = string;
2189 this[_position] = index; 1753 this[_position] = index;
2190 this[_nextPosition] = index; 1754 this[_nextPosition] = index;
2191 this[_currentCodePoint] = null; 1755 this[_currentCodePoint] = null;
2192 RangeError.checkValueInInterval(index, 0, string.length); 1756 RangeError.checkValueInInterval(index, 0, string.length);
2193 this[_checkSplitSurrogate](index); 1757 this[_checkSplitSurrogate](index);
2194 } 1758 }
2195 [_checkSplitSurrogate](index) { 1759 [_checkSplitSurrogate](index) {
2196 if (dart.notNull(index) > 0 && dart.notNull(index) < dart.notNull(this.str ing.length) && dart.notNull(_isLeadSurrogate(this.string.codeUnitAt(dart.notNull (index) - 1))) && dart.notNull(_isTrailSurrogate(this.string.codeUnitAt(index))) ) { 1760 if (dart.notNull(index) > 0 && dart.notNull(index) < dart.notNull(this.str ing.length) && dart.notNull(_isLeadSurrogate(this.string[dartx.codeUnitAt](dart. notNull(index) - 1))) && dart.notNull(_isTrailSurrogate(this.string[dartx.codeUn itAt](index)))) {
2197 throw new ArgumentError(`Index inside surrogate pair: ${index}`); 1761 throw new ArgumentError(`Index inside surrogate pair: ${index}`);
2198 } 1762 }
2199 } 1763 }
2200 get rawIndex() { 1764 get rawIndex() {
2201 return this[_position] != this[_nextPosition] ? this[_position] : null; 1765 return this[_position] != this[_nextPosition] ? this[_position] : null;
2202 } 1766 }
2203 set rawIndex(rawIndex) { 1767 set rawIndex(rawIndex) {
2204 RangeError.checkValidIndex(rawIndex, this.string, "rawIndex"); 1768 RangeError.checkValidIndex(rawIndex, this.string, "rawIndex");
2205 this.reset(rawIndex); 1769 this.reset(rawIndex);
2206 this.moveNext(); 1770 this.moveNext();
2207 } 1771 }
2208 reset(rawIndex) { 1772 reset(rawIndex) {
2209 if (rawIndex === void 0) 1773 if (rawIndex === void 0)
2210 rawIndex = 0; 1774 rawIndex = 0;
2211 RangeError.checkValueInInterval(rawIndex, 0, this.string.length, "rawIndex "); 1775 RangeError.checkValueInInterval(rawIndex, 0, this.string.length, "rawIndex ");
2212 this[_checkSplitSurrogate](rawIndex); 1776 this[_checkSplitSurrogate](rawIndex);
2213 this[_position] = this[_nextPosition] = rawIndex; 1777 this[_position] = this[_nextPosition] = rawIndex;
2214 this[_currentCodePoint] = null; 1778 this[_currentCodePoint] = null;
2215 } 1779 }
2216 get current() { 1780 get current() {
2217 return this[_currentCodePoint]; 1781 return this[_currentCodePoint];
2218 } 1782 }
2219 get currentSize() { 1783 get currentSize() {
2220 return dart.notNull(this[_nextPosition]) - dart.notNull(this[_position]); 1784 return dart.notNull(this[_nextPosition]) - dart.notNull(this[_position]);
2221 } 1785 }
2222 get currentAsString() { 1786 get currentAsString() {
2223 if (this[_position] == this[_nextPosition]) 1787 if (this[_position] == this[_nextPosition])
2224 return null; 1788 return null;
2225 if (dart.notNull(this[_position]) + 1 == this[_nextPosition]) 1789 if (dart.notNull(this[_position]) + 1 == this[_nextPosition])
2226 return this.string.get(this[_position]); 1790 return this.string[dartx.get](this[_position]);
2227 return this.string.substring(this[_position], this[_nextPosition]); 1791 return this.string[dartx.substring](this[_position], this[_nextPosition]);
2228 } 1792 }
2229 moveNext() { 1793 moveNext() {
2230 this[_position] = this[_nextPosition]; 1794 this[_position] = this[_nextPosition];
2231 if (this[_position] == this.string.length) { 1795 if (this[_position] == this.string.length) {
2232 this[_currentCodePoint] = null; 1796 this[_currentCodePoint] = null;
2233 return false; 1797 return false;
2234 } 1798 }
2235 let codeUnit = this.string.codeUnitAt(this[_position]); 1799 let codeUnit = this.string[dartx.codeUnitAt](this[_position]);
2236 let nextPosition = dart.notNull(this[_position]) + 1; 1800 let nextPosition = dart.notNull(this[_position]) + 1;
2237 if (dart.notNull(_isLeadSurrogate(codeUnit)) && dart.notNull(nextPosition) < dart.notNull(this.string.length)) { 1801 if (dart.notNull(_isLeadSurrogate(codeUnit)) && dart.notNull(nextPosition) < dart.notNull(this.string.length)) {
2238 let nextCodeUnit = this.string.codeUnitAt(nextPosition); 1802 let nextCodeUnit = this.string[dartx.codeUnitAt](nextPosition);
2239 if (_isTrailSurrogate(nextCodeUnit)) { 1803 if (_isTrailSurrogate(nextCodeUnit)) {
2240 this[_nextPosition] = dart.notNull(nextPosition) + 1; 1804 this[_nextPosition] = dart.notNull(nextPosition) + 1;
2241 this[_currentCodePoint] = _combineSurrogatePair(codeUnit, nextCodeUnit ); 1805 this[_currentCodePoint] = _combineSurrogatePair(codeUnit, nextCodeUnit );
2242 return true; 1806 return true;
2243 } 1807 }
2244 } 1808 }
2245 this[_nextPosition] = nextPosition; 1809 this[_nextPosition] = nextPosition;
2246 this[_currentCodePoint] = codeUnit; 1810 this[_currentCodePoint] = codeUnit;
2247 return true; 1811 return true;
2248 } 1812 }
2249 movePrevious() { 1813 movePrevious() {
2250 this[_nextPosition] = this[_position]; 1814 this[_nextPosition] = this[_position];
2251 if (this[_position] == 0) { 1815 if (this[_position] == 0) {
2252 this[_currentCodePoint] = null; 1816 this[_currentCodePoint] = null;
2253 return false; 1817 return false;
2254 } 1818 }
2255 let position = dart.notNull(this[_position]) - 1; 1819 let position = dart.notNull(this[_position]) - 1;
2256 let codeUnit = this.string.codeUnitAt(position); 1820 let codeUnit = this.string[dartx.codeUnitAt](position);
2257 if (dart.notNull(_isTrailSurrogate(codeUnit)) && dart.notNull(position) > 0) { 1821 if (dart.notNull(_isTrailSurrogate(codeUnit)) && dart.notNull(position) > 0) {
2258 let prevCodeUnit = this.string.codeUnitAt(dart.notNull(position) - 1); 1822 let prevCodeUnit = this.string[dartx.codeUnitAt](dart.notNull(position) - 1);
2259 if (_isLeadSurrogate(prevCodeUnit)) { 1823 if (_isLeadSurrogate(prevCodeUnit)) {
2260 this[_position] = dart.notNull(position) - 1; 1824 this[_position] = dart.notNull(position) - 1;
2261 this[_currentCodePoint] = _combineSurrogatePair(prevCodeUnit, codeUnit ); 1825 this[_currentCodePoint] = _combineSurrogatePair(prevCodeUnit, codeUnit );
2262 return true; 1826 return true;
2263 } 1827 }
2264 } 1828 }
2265 this[_position] = position; 1829 this[_position] = position;
2266 this[_currentCodePoint] = codeUnit; 1830 this[_currentCodePoint] = codeUnit;
2267 return true; 1831 return true;
2268 } 1832 }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
2300 } 1864 }
2301 write(obj) { 1865 write(obj) {
2302 this[_writeString](`${obj}`); 1866 this[_writeString](`${obj}`);
2303 } 1867 }
2304 writeCharCode(charCode) { 1868 writeCharCode(charCode) {
2305 this[_writeString](String.fromCharCode(charCode)); 1869 this[_writeString](String.fromCharCode(charCode));
2306 } 1870 }
2307 writeAll(objects, separator) { 1871 writeAll(objects, separator) {
2308 if (separator === void 0) 1872 if (separator === void 0)
2309 separator = ""; 1873 separator = "";
2310 let iterator = objects[$iterator]; 1874 let iterator = objects[dartx.iterator];
2311 if (!dart.notNull(iterator.moveNext())) 1875 if (!dart.notNull(iterator.moveNext()))
2312 return; 1876 return;
2313 if (separator.isEmpty) { 1877 if (separator[dartx.isEmpty]) {
2314 do { 1878 do {
2315 this.write(iterator.current); 1879 this.write(iterator.current);
2316 } while (iterator.moveNext()); 1880 } while (iterator.moveNext());
2317 } else { 1881 } else {
2318 this.write(iterator.current); 1882 this.write(iterator.current);
2319 while (iterator.moveNext()) { 1883 while (iterator.moveNext()) {
2320 this.write(separator); 1884 this.write(separator);
2321 this.write(iterator.current); 1885 this.write(iterator.current);
2322 } 1886 }
2323 } 1887 }
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
2382 let sb = new StringBuffer(); 1946 let sb = new StringBuffer();
2383 this[_writeAuthority](sb); 1947 this[_writeAuthority](sb);
2384 return dart.toString(sb); 1948 return dart.toString(sb);
2385 } 1949 }
2386 get userInfo() { 1950 get userInfo() {
2387 return this[_userInfo]; 1951 return this[_userInfo];
2388 } 1952 }
2389 get host() { 1953 get host() {
2390 if (this[_host] == null) 1954 if (this[_host] == null)
2391 return ""; 1955 return "";
2392 if (this[_host].startsWith('[')) { 1956 if (this[_host][dartx.startsWith]('[')) {
2393 return this[_host].substring(1, dart.notNull(this[_host].length) - 1); 1957 return this[_host][dartx.substring](1, dart.notNull(this[_host].length) - 1);
2394 } 1958 }
2395 return this[_host]; 1959 return this[_host];
2396 } 1960 }
2397 get port() { 1961 get port() {
2398 if (this[_port] == null) 1962 if (this[_port] == null)
2399 return Uri._defaultPort(this.scheme); 1963 return Uri._defaultPort(this.scheme);
2400 return this[_port]; 1964 return this[_port];
2401 } 1965 }
2402 static _defaultPort(scheme) { 1966 static _defaultPort(scheme) {
2403 if (scheme == "http") 1967 if (scheme == "http")
2404 return 80; 1968 return 80;
2405 if (scheme == "https") 1969 if (scheme == "https")
2406 return 443; 1970 return 443;
2407 return 0; 1971 return 0;
2408 } 1972 }
2409 get path() { 1973 get path() {
2410 return this[_path]; 1974 return this[_path];
2411 } 1975 }
2412 get query() { 1976 get query() {
2413 return this[_query] == null ? "" : this[_query]; 1977 return this[_query] == null ? "" : this[_query];
2414 } 1978 }
2415 get fragment() { 1979 get fragment() {
2416 return this[_fragment] == null ? "" : this[_fragment]; 1980 return this[_fragment] == null ? "" : this[_fragment];
2417 } 1981 }
2418 static parse(uri) { 1982 static parse(uri) {
2419 let isRegName = ch => { 1983 let isRegName = ch => {
2420 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)); 1984 return dart.notNull(ch) < 128 && dart.notNull(!dart.equals(dart.dsend(Ur i._regNameTable[dartx.get](dart.notNull(ch) >> 4), '&', 1 << (dart.notNull(ch) & 15)), 0));
2421 }; 1985 };
2422 dart.fn(isRegName, bool, [int]); 1986 dart.fn(isRegName, bool, [int]);
2423 let EOI = -1; 1987 let EOI = -1;
2424 let scheme = ""; 1988 let scheme = "";
2425 let userinfo = ""; 1989 let userinfo = "";
2426 let host = null; 1990 let host = null;
2427 let port = null; 1991 let port = null;
2428 let path = null; 1992 let path = null;
2429 let query = null; 1993 let query = null;
2430 let fragment = null; 1994 let fragment = null;
2431 let index = 0; 1995 let index = 0;
2432 let pathStart = 0; 1996 let pathStart = 0;
2433 let char = EOI; 1997 let char = EOI;
2434 let parseAuth = () => { 1998 let parseAuth = () => {
2435 if (index == uri.length) { 1999 if (index == uri.length) {
2436 char = EOI; 2000 char = EOI;
2437 return; 2001 return;
2438 } 2002 }
2439 let authStart = index; 2003 let authStart = index;
2440 let lastColon = -1; 2004 let lastColon = -1;
2441 let lastAt = -1; 2005 let lastAt = -1;
2442 char = uri.codeUnitAt(index); 2006 char = uri[dartx.codeUnitAt](index);
2443 while (dart.notNull(index) < dart.notNull(uri.length)) { 2007 while (dart.notNull(index) < dart.notNull(uri.length)) {
2444 char = uri.codeUnitAt(index); 2008 char = uri[dartx.codeUnitAt](index);
2445 if (char == Uri._SLASH || char == Uri._QUESTION || char == Uri._NUMBER _SIGN) { 2009 if (char == Uri._SLASH || char == Uri._QUESTION || char == Uri._NUMBER _SIGN) {
2446 break; 2010 break;
2447 } 2011 }
2448 if (char == Uri._AT_SIGN) { 2012 if (char == Uri._AT_SIGN) {
2449 lastAt = index; 2013 lastAt = index;
2450 lastColon = -1; 2014 lastColon = -1;
2451 } else if (char == Uri._COLON) { 2015 } else if (char == Uri._COLON) {
2452 lastColon = index; 2016 lastColon = index;
2453 } else if (char == Uri._LEFT_BRACKET) { 2017 } else if (char == Uri._LEFT_BRACKET) {
2454 lastColon = -1; 2018 lastColon = -1;
2455 let endBracket = uri.indexOf(']', dart.notNull(index) + 1); 2019 let endBracket = uri[dartx.indexOf](']', dart.notNull(index) + 1);
2456 if (endBracket == -1) { 2020 if (endBracket == -1) {
2457 index = uri.length; 2021 index = uri.length;
2458 char = EOI; 2022 char = EOI;
2459 break; 2023 break;
2460 } else { 2024 } else {
2461 index = endBracket; 2025 index = endBracket;
2462 } 2026 }
2463 } 2027 }
2464 index = dart.notNull(index) + 1; 2028 index = dart.notNull(index) + 1;
2465 char = EOI; 2029 char = EOI;
2466 } 2030 }
2467 let hostStart = authStart; 2031 let hostStart = authStart;
2468 let hostEnd = index; 2032 let hostEnd = index;
2469 if (dart.notNull(lastAt) >= 0) { 2033 if (dart.notNull(lastAt) >= 0) {
2470 userinfo = Uri._makeUserInfo(uri, authStart, lastAt); 2034 userinfo = Uri._makeUserInfo(uri, authStart, lastAt);
2471 hostStart = dart.notNull(lastAt) + 1; 2035 hostStart = dart.notNull(lastAt) + 1;
2472 } 2036 }
2473 if (dart.notNull(lastColon) >= 0) { 2037 if (dart.notNull(lastColon) >= 0) {
2474 let portNumber = null; 2038 let portNumber = null;
2475 if (dart.notNull(lastColon) + 1 < dart.notNull(index)) { 2039 if (dart.notNull(lastColon) + 1 < dart.notNull(index)) {
2476 portNumber = 0; 2040 portNumber = 0;
2477 for (let i = dart.notNull(lastColon) + 1; dart.notNull(i) < dart.not Null(index); i = dart.notNull(i) + 1) { 2041 for (let i = dart.notNull(lastColon) + 1; dart.notNull(i) < dart.not Null(index); i = dart.notNull(i) + 1) {
2478 let digit = uri.codeUnitAt(i); 2042 let digit = uri[dartx.codeUnitAt](i);
2479 if (dart.notNull(Uri._ZERO) > dart.notNull(digit) || dart.notNull( Uri._NINE) < dart.notNull(digit)) { 2043 if (dart.notNull(Uri._ZERO) > dart.notNull(digit) || dart.notNull( Uri._NINE) < dart.notNull(digit)) {
2480 Uri._fail(uri, i, "Invalid port number"); 2044 Uri._fail(uri, i, "Invalid port number");
2481 } 2045 }
2482 portNumber = dart.notNull(portNumber) * 10 + (dart.notNull(digit) - dart.notNull(Uri._ZERO)); 2046 portNumber = dart.notNull(portNumber) * 10 + (dart.notNull(digit) - dart.notNull(Uri._ZERO));
2483 } 2047 }
2484 } 2048 }
2485 port = Uri._makePort(portNumber, scheme); 2049 port = Uri._makePort(portNumber, scheme);
2486 hostEnd = lastColon; 2050 hostEnd = lastColon;
2487 } 2051 }
2488 host = Uri._makeHost(uri, hostStart, hostEnd, true); 2052 host = Uri._makeHost(uri, hostStart, hostEnd, true);
2489 if (dart.notNull(index) < dart.notNull(uri.length)) { 2053 if (dart.notNull(index) < dart.notNull(uri.length)) {
2490 char = uri.codeUnitAt(index); 2054 char = uri[dartx.codeUnitAt](index);
2491 } 2055 }
2492 }; 2056 };
2493 dart.fn(parseAuth, dart.void, []); 2057 dart.fn(parseAuth, dart.void, []);
2494 let NOT_IN_PATH = 0; 2058 let NOT_IN_PATH = 0;
2495 let IN_PATH = 1; 2059 let IN_PATH = 1;
2496 let ALLOW_AUTH = 2; 2060 let ALLOW_AUTH = 2;
2497 let state = NOT_IN_PATH; 2061 let state = NOT_IN_PATH;
2498 let i = index; 2062 let i = index;
2499 while (dart.notNull(i) < dart.notNull(uri.length)) { 2063 while (dart.notNull(i) < dart.notNull(uri.length)) {
2500 char = uri.codeUnitAt(i); 2064 char = uri[dartx.codeUnitAt](i);
2501 if (char == Uri._QUESTION || char == Uri._NUMBER_SIGN) { 2065 if (char == Uri._QUESTION || char == Uri._NUMBER_SIGN) {
2502 state = NOT_IN_PATH; 2066 state = NOT_IN_PATH;
2503 break; 2067 break;
2504 } 2068 }
2505 if (char == Uri._SLASH) { 2069 if (char == Uri._SLASH) {
2506 state = i == 0 ? ALLOW_AUTH : IN_PATH; 2070 state = i == 0 ? ALLOW_AUTH : IN_PATH;
2507 break; 2071 break;
2508 } 2072 }
2509 if (char == Uri._COLON) { 2073 if (char == Uri._COLON) {
2510 if (i == 0) 2074 if (i == 0)
2511 Uri._fail(uri, 0, "Invalid empty scheme"); 2075 Uri._fail(uri, 0, "Invalid empty scheme");
2512 scheme = Uri._makeScheme(uri, i); 2076 scheme = Uri._makeScheme(uri, i);
2513 i = dart.notNull(i) + 1; 2077 i = dart.notNull(i) + 1;
2514 pathStart = i; 2078 pathStart = i;
2515 if (i == uri.length) { 2079 if (i == uri.length) {
2516 char = EOI; 2080 char = EOI;
2517 state = NOT_IN_PATH; 2081 state = NOT_IN_PATH;
2518 } else { 2082 } else {
2519 char = uri.codeUnitAt(i); 2083 char = uri[dartx.codeUnitAt](i);
2520 if (char == Uri._QUESTION || char == Uri._NUMBER_SIGN) { 2084 if (char == Uri._QUESTION || char == Uri._NUMBER_SIGN) {
2521 state = NOT_IN_PATH; 2085 state = NOT_IN_PATH;
2522 } else if (char == Uri._SLASH) { 2086 } else if (char == Uri._SLASH) {
2523 state = ALLOW_AUTH; 2087 state = ALLOW_AUTH;
2524 } else { 2088 } else {
2525 state = IN_PATH; 2089 state = IN_PATH;
2526 } 2090 }
2527 } 2091 }
2528 break; 2092 break;
2529 } 2093 }
2530 i = dart.notNull(i) + 1; 2094 i = dart.notNull(i) + 1;
2531 char = EOI; 2095 char = EOI;
2532 } 2096 }
2533 index = i; 2097 index = i;
2534 if (state == ALLOW_AUTH) { 2098 if (state == ALLOW_AUTH) {
2535 dart.assert(char == Uri._SLASH); 2099 dart.assert(char == Uri._SLASH);
2536 index = dart.notNull(index) + 1; 2100 index = dart.notNull(index) + 1;
2537 if (index == uri.length) { 2101 if (index == uri.length) {
2538 char = EOI; 2102 char = EOI;
2539 state = NOT_IN_PATH; 2103 state = NOT_IN_PATH;
2540 } else { 2104 } else {
2541 char = uri.codeUnitAt(index); 2105 char = uri[dartx.codeUnitAt](index);
2542 if (char == Uri._SLASH) { 2106 if (char == Uri._SLASH) {
2543 index = dart.notNull(index) + 1; 2107 index = dart.notNull(index) + 1;
2544 parseAuth(); 2108 parseAuth();
2545 pathStart = index; 2109 pathStart = index;
2546 } 2110 }
2547 if (char == Uri._QUESTION || char == Uri._NUMBER_SIGN || char == EOI) { 2111 if (char == Uri._QUESTION || char == Uri._NUMBER_SIGN || char == EOI) {
2548 state = NOT_IN_PATH; 2112 state = NOT_IN_PATH;
2549 } else { 2113 } else {
2550 state = IN_PATH; 2114 state = IN_PATH;
2551 } 2115 }
2552 } 2116 }
2553 } 2117 }
2554 dart.assert(state == IN_PATH || state == NOT_IN_PATH); 2118 dart.assert(state == IN_PATH || state == NOT_IN_PATH);
2555 if (state == IN_PATH) { 2119 if (state == IN_PATH) {
2556 while ((index = dart.notNull(index) + 1) < dart.notNull(uri.length)) { 2120 while ((index = dart.notNull(index) + 1) < dart.notNull(uri.length)) {
2557 char = uri.codeUnitAt(index); 2121 char = uri[dartx.codeUnitAt](index);
2558 if (char == Uri._QUESTION || char == Uri._NUMBER_SIGN) { 2122 if (char == Uri._QUESTION || char == Uri._NUMBER_SIGN) {
2559 break; 2123 break;
2560 } 2124 }
2561 char = EOI; 2125 char = EOI;
2562 } 2126 }
2563 state = NOT_IN_PATH; 2127 state = NOT_IN_PATH;
2564 } 2128 }
2565 dart.assert(state == NOT_IN_PATH); 2129 dart.assert(state == NOT_IN_PATH);
2566 let isFile = scheme == "file"; 2130 let isFile = scheme == "file";
2567 let ensureLeadingSlash = host != null; 2131 let ensureLeadingSlash = host != null;
2568 path = Uri._makePath(uri, pathStart, index, null, ensureLeadingSlash, isFi le); 2132 path = Uri._makePath(uri, pathStart, index, null, ensureLeadingSlash, isFi le);
2569 if (char == Uri._QUESTION) { 2133 if (char == Uri._QUESTION) {
2570 let numberSignIndex = uri.indexOf('#', dart.notNull(index) + 1); 2134 let numberSignIndex = uri[dartx.indexOf]('#', dart.notNull(index) + 1);
2571 if (dart.notNull(numberSignIndex) < 0) { 2135 if (dart.notNull(numberSignIndex) < 0) {
2572 query = Uri._makeQuery(uri, dart.notNull(index) + 1, uri.length, null) ; 2136 query = Uri._makeQuery(uri, dart.notNull(index) + 1, uri.length, null) ;
2573 } else { 2137 } else {
2574 query = Uri._makeQuery(uri, dart.notNull(index) + 1, numberSignIndex, null); 2138 query = Uri._makeQuery(uri, dart.notNull(index) + 1, numberSignIndex, null);
2575 fragment = Uri._makeFragment(uri, dart.notNull(numberSignIndex) + 1, u ri.length); 2139 fragment = Uri._makeFragment(uri, dart.notNull(numberSignIndex) + 1, u ri.length);
2576 } 2140 }
2577 } else if (char == Uri._NUMBER_SIGN) { 2141 } else if (char == Uri._NUMBER_SIGN) {
2578 fragment = Uri._makeFragment(uri, dart.notNull(index) + 1, uri.length); 2142 fragment = Uri._makeFragment(uri, dart.notNull(index) + 1, uri.length);
2579 } 2143 }
2580 return new Uri._internal(scheme, userinfo, host, port, path, query, fragme nt); 2144 return new Uri._internal(scheme, userinfo, host, port, path, query, fragme nt);
(...skipping 24 matching lines...) Expand all
2605 let fragment = opts && 'fragment' in opts ? opts.fragment : null; 2169 let fragment = opts && 'fragment' in opts ? opts.fragment : null;
2606 scheme = Uri._makeScheme(scheme, Uri._stringOrNullLength(scheme)); 2170 scheme = Uri._makeScheme(scheme, Uri._stringOrNullLength(scheme));
2607 userInfo = Uri._makeUserInfo(userInfo, 0, Uri._stringOrNullLength(userInfo )); 2171 userInfo = Uri._makeUserInfo(userInfo, 0, Uri._stringOrNullLength(userInfo ));
2608 host = Uri._makeHost(host, 0, Uri._stringOrNullLength(host), false); 2172 host = Uri._makeHost(host, 0, Uri._stringOrNullLength(host), false);
2609 if (query == "") 2173 if (query == "")
2610 query = null; 2174 query = null;
2611 query = Uri._makeQuery(query, 0, Uri._stringOrNullLength(query), queryPara meters); 2175 query = Uri._makeQuery(query, 0, Uri._stringOrNullLength(query), queryPara meters);
2612 fragment = Uri._makeFragment(fragment, 0, Uri._stringOrNullLength(fragment )); 2176 fragment = Uri._makeFragment(fragment, 0, Uri._stringOrNullLength(fragment ));
2613 port = Uri._makePort(port, scheme); 2177 port = Uri._makePort(port, scheme);
2614 let isFile = scheme == "file"; 2178 let isFile = scheme == "file";
2615 if (host == null && (dart.notNull(userInfo.isNotEmpty) || port != null || dart.notNull(isFile))) { 2179 if (host == null && (dart.notNull(userInfo[dartx.isNotEmpty]) || port != n ull || dart.notNull(isFile))) {
2616 host = ""; 2180 host = "";
2617 } 2181 }
2618 let ensureLeadingSlash = host != null; 2182 let ensureLeadingSlash = host != null;
2619 path = Uri._makePath(path, 0, Uri._stringOrNullLength(path), pathSegments, ensureLeadingSlash, isFile); 2183 path = Uri._makePath(path, 0, Uri._stringOrNullLength(path), pathSegments, ensureLeadingSlash, isFile);
2620 return new Uri._internal(scheme, userInfo, host, port, path, query, fragme nt); 2184 return new Uri._internal(scheme, userInfo, host, port, path, query, fragme nt);
2621 } 2185 }
2622 static http(authority, unencodedPath, queryParameters) { 2186 static http(authority, unencodedPath, queryParameters) {
2623 if (queryParameters === void 0) 2187 if (queryParameters === void 0)
2624 queryParameters = null; 2188 queryParameters = null;
2625 return Uri._makeHttpUri("http", authority, unencodedPath, queryParameters) ; 2189 return Uri._makeHttpUri("http", authority, unencodedPath, queryParameters) ;
2626 } 2190 }
2627 static https(authority, unencodedPath, queryParameters) { 2191 static https(authority, unencodedPath, queryParameters) {
2628 if (queryParameters === void 0) 2192 if (queryParameters === void 0)
2629 queryParameters = null; 2193 queryParameters = null;
2630 return Uri._makeHttpUri("https", authority, unencodedPath, queryParameters ); 2194 return Uri._makeHttpUri("https", authority, unencodedPath, queryParameters );
2631 } 2195 }
2632 static _makeHttpUri(scheme, authority, unencodedPath, queryParameters) { 2196 static _makeHttpUri(scheme, authority, unencodedPath, queryParameters) {
2633 let userInfo = ""; 2197 let userInfo = "";
2634 let host = null; 2198 let host = null;
2635 let port = null; 2199 let port = null;
2636 if (authority != null && dart.notNull(authority.isNotEmpty)) { 2200 if (authority != null && dart.notNull(authority[dartx.isNotEmpty])) {
2637 let hostStart = 0; 2201 let hostStart = 0;
2638 let hasUserInfo = false; 2202 let hasUserInfo = false;
2639 for (let i = 0; dart.notNull(i) < dart.notNull(authority.length); i = da rt.notNull(i) + 1) { 2203 for (let i = 0; dart.notNull(i) < dart.notNull(authority.length); i = da rt.notNull(i) + 1) {
2640 if (authority.codeUnitAt(i) == Uri._AT_SIGN) { 2204 if (authority[dartx.codeUnitAt](i) == Uri._AT_SIGN) {
2641 hasUserInfo = true; 2205 hasUserInfo = true;
2642 userInfo = authority.substring(0, i); 2206 userInfo = authority[dartx.substring](0, i);
2643 hostStart = dart.notNull(i) + 1; 2207 hostStart = dart.notNull(i) + 1;
2644 break; 2208 break;
2645 } 2209 }
2646 } 2210 }
2647 let hostEnd = hostStart; 2211 let hostEnd = hostStart;
2648 if (dart.notNull(hostStart) < dart.notNull(authority.length) && authorit y.codeUnitAt(hostStart) == Uri._LEFT_BRACKET) { 2212 if (dart.notNull(hostStart) < dart.notNull(authority.length) && authorit y[dartx.codeUnitAt](hostStart) == Uri._LEFT_BRACKET) {
2649 for (; dart.notNull(hostEnd) < dart.notNull(authority.length); hostEnd = dart.notNull(hostEnd) + 1) { 2213 for (; dart.notNull(hostEnd) < dart.notNull(authority.length); hostEnd = dart.notNull(hostEnd) + 1) {
2650 if (authority.codeUnitAt(hostEnd) == Uri._RIGHT_BRACKET) 2214 if (authority[dartx.codeUnitAt](hostEnd) == Uri._RIGHT_BRACKET)
2651 break; 2215 break;
2652 } 2216 }
2653 if (hostEnd == authority.length) { 2217 if (hostEnd == authority.length) {
2654 throw new FormatException("Invalid IPv6 host entry.", authority, hos tStart); 2218 throw new FormatException("Invalid IPv6 host entry.", authority, hos tStart);
2655 } 2219 }
2656 Uri.parseIPv6Address(authority, dart.notNull(hostStart) + 1, hostEnd); 2220 Uri.parseIPv6Address(authority, dart.notNull(hostStart) + 1, hostEnd);
2657 hostEnd = dart.notNull(hostEnd) + 1; 2221 hostEnd = dart.notNull(hostEnd) + 1;
2658 if (hostEnd != authority.length && authority.codeUnitAt(hostEnd) != Ur i._COLON) { 2222 if (hostEnd != authority.length && authority[dartx.codeUnitAt](hostEnd ) != Uri._COLON) {
2659 throw new FormatException("Invalid end of authority", authority, hos tEnd); 2223 throw new FormatException("Invalid end of authority", authority, hos tEnd);
2660 } 2224 }
2661 } 2225 }
2662 let hasPort = false; 2226 let hasPort = false;
2663 for (; dart.notNull(hostEnd) < dart.notNull(authority.length); hostEnd = dart.notNull(hostEnd) + 1) { 2227 for (; dart.notNull(hostEnd) < dart.notNull(authority.length); hostEnd = dart.notNull(hostEnd) + 1) {
2664 if (authority.codeUnitAt(hostEnd) == Uri._COLON) { 2228 if (authority[dartx.codeUnitAt](hostEnd) == Uri._COLON) {
2665 let portString = authority.substring(dart.notNull(hostEnd) + 1); 2229 let portString = authority[dartx.substring](dart.notNull(hostEnd) + 1);
2666 if (portString.isNotEmpty) 2230 if (portString[dartx.isNotEmpty])
2667 port = int.parse(portString); 2231 port = int.parse(portString);
2668 break; 2232 break;
2669 } 2233 }
2670 } 2234 }
2671 host = authority.substring(hostStart, hostEnd); 2235 host = authority[dartx.substring](hostStart, hostEnd);
2672 } 2236 }
2673 return Uri.new({scheme: scheme, userInfo: userInfo, host: dart.as(host, St ring), port: dart.as(port, int), pathSegments: unencodedPath.split("/"), queryPa rameters: queryParameters}); 2237 return Uri.new({scheme: scheme, userInfo: userInfo, host: dart.as(host, St ring), port: dart.as(port, int), pathSegments: unencodedPath[dartx.split]("/"), queryParameters: queryParameters});
2674 } 2238 }
2675 static file(path, opts) { 2239 static file(path, opts) {
2676 let windows = opts && 'windows' in opts ? opts.windows : null; 2240 let windows = opts && 'windows' in opts ? opts.windows : null;
2677 windows = windows == null ? Uri._isWindows : windows; 2241 windows = windows == null ? Uri._isWindows : windows;
2678 return windows ? dart.as(Uri._makeWindowsFileUrl(path), Uri) : dart.as(Uri ._makeFileUri(path), Uri); 2242 return windows ? dart.as(Uri._makeWindowsFileUrl(path), Uri) : dart.as(Uri ._makeFileUri(path), Uri);
2679 } 2243 }
2680 static get base() { 2244 static get base() {
2681 let uri = _js_helper.Primitives.currentUri(); 2245 let uri = _js_helper.Primitives.currentUri();
2682 if (uri != null) 2246 if (uri != null)
2683 return Uri.parse(uri); 2247 return Uri.parse(uri);
2684 throw new UnsupportedError("'Uri.base' is not supported"); 2248 throw new UnsupportedError("'Uri.base' is not supported");
2685 } 2249 }
2686 static get _isWindows() { 2250 static get _isWindows() {
2687 return false; 2251 return false;
2688 } 2252 }
2689 static _checkNonWindowsPathReservedCharacters(segments, argumentError) { 2253 static _checkNonWindowsPathReservedCharacters(segments, argumentError) {
2690 segments[$forEach](dart.fn(segment => { 2254 segments[dartx.forEach](dart.fn(segment => {
2691 if (dart.dsend(segment, 'contains', "/")) { 2255 if (dart.dsend(segment, 'contains', "/")) {
2692 if (argumentError) { 2256 if (argumentError) {
2693 throw new ArgumentError(`Illegal path character ${segment}`); 2257 throw new ArgumentError(`Illegal path character ${segment}`);
2694 } else { 2258 } else {
2695 throw new UnsupportedError(`Illegal path character ${segment}`); 2259 throw new UnsupportedError(`Illegal path character ${segment}`);
2696 } 2260 }
2697 } 2261 }
2698 })); 2262 }));
2699 } 2263 }
2700 static _checkWindowsPathReservedCharacters(segments, argumentError, firstSeg ment) { 2264 static _checkWindowsPathReservedCharacters(segments, argumentError, firstSeg ment) {
2701 if (firstSegment === void 0) 2265 if (firstSegment === void 0)
2702 firstSegment = 0; 2266 firstSegment = 0;
2703 segments[$skip](firstSegment)[$forEach](dart.fn(segment => { 2267 segments[dartx.skip](firstSegment)[dartx.forEach](dart.fn(segment => {
2704 if (dart.dsend(segment, 'contains', RegExp.new('["*/:<>?\\\\|]'))) { 2268 if (dart.dsend(segment, 'contains', RegExp.new('["*/:<>?\\\\|]'))) {
2705 if (argumentError) { 2269 if (argumentError) {
2706 throw new ArgumentError("Illegal character in path"); 2270 throw new ArgumentError("Illegal character in path");
2707 } else { 2271 } else {
2708 throw new UnsupportedError("Illegal character in path"); 2272 throw new UnsupportedError("Illegal character in path");
2709 } 2273 }
2710 } 2274 }
2711 })); 2275 }));
2712 } 2276 }
2713 static _checkWindowsDriveLetter(charCode, argumentError) { 2277 static _checkWindowsDriveLetter(charCode, argumentError) {
2714 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)) { 2278 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)) {
2715 return; 2279 return;
2716 } 2280 }
2717 if (argumentError) { 2281 if (argumentError) {
2718 throw new ArgumentError("Illegal drive letter " + dart.notNull(String.fr omCharCode(charCode))); 2282 throw new ArgumentError("Illegal drive letter " + dart.notNull(String.fr omCharCode(charCode)));
2719 } else { 2283 } else {
2720 throw new UnsupportedError("Illegal drive letter " + dart.notNull(String .fromCharCode(charCode))); 2284 throw new UnsupportedError("Illegal drive letter " + dart.notNull(String .fromCharCode(charCode)));
2721 } 2285 }
2722 } 2286 }
2723 static _makeFileUri(path) { 2287 static _makeFileUri(path) {
2724 let sep = "/"; 2288 let sep = "/";
2725 if (path.startsWith(sep)) { 2289 if (path[dartx.startsWith](sep)) {
2726 return Uri.new({scheme: "file", pathSegments: path.split(sep)}); 2290 return Uri.new({scheme: "file", pathSegments: path[dartx.split](sep)});
2727 } else { 2291 } else {
2728 return Uri.new({pathSegments: path.split(sep)}); 2292 return Uri.new({pathSegments: path[dartx.split](sep)});
2729 } 2293 }
2730 } 2294 }
2731 static _makeWindowsFileUrl(path) { 2295 static _makeWindowsFileUrl(path) {
2732 if (path.startsWith("\\\\?\\")) { 2296 if (path[dartx.startsWith]("\\\\?\\")) {
2733 if (path.startsWith("\\\\?\\UNC\\")) { 2297 if (path[dartx.startsWith]("\\\\?\\UNC\\")) {
2734 path = `\\${path.substring(7)}`; 2298 path = `\\${path[dartx.substring](7)}`;
2735 } else { 2299 } else {
2736 path = path.substring(4); 2300 path = path[dartx.substring](4);
2737 if (dart.notNull(path.length) < 3 || path.codeUnitAt(1) != Uri._COLON || path.codeUnitAt(2) != Uri._BACKSLASH) { 2301 if (dart.notNull(path.length) < 3 || path[dartx.codeUnitAt](1) != Uri. _COLON || path[dartx.codeUnitAt](2) != Uri._BACKSLASH) {
2738 throw new ArgumentError("Windows paths with \\\\?\\ prefix must be a bsolute"); 2302 throw new ArgumentError("Windows paths with \\\\?\\ prefix must be a bsolute");
2739 } 2303 }
2740 } 2304 }
2741 } else { 2305 } else {
2742 path = path.replaceAll("/", "\\"); 2306 path = path[dartx.replaceAll]("/", "\\");
2743 } 2307 }
2744 let sep = "\\"; 2308 let sep = "\\";
2745 if (dart.notNull(path.length) > 1 && path.get(1) == ":") { 2309 if (dart.notNull(path.length) > 1 && path[dartx.get](1) == ":") {
2746 Uri._checkWindowsDriveLetter(path.codeUnitAt(0), true); 2310 Uri._checkWindowsDriveLetter(path[dartx.codeUnitAt](0), true);
2747 if (path.length == 2 || path.codeUnitAt(2) != Uri._BACKSLASH) { 2311 if (path.length == 2 || path[dartx.codeUnitAt](2) != Uri._BACKSLASH) {
2748 throw new ArgumentError("Windows paths with drive letter must be absol ute"); 2312 throw new ArgumentError("Windows paths with drive letter must be absol ute");
2749 } 2313 }
2750 let pathSegments = path.split(sep); 2314 let pathSegments = path[dartx.split](sep);
2751 Uri._checkWindowsPathReservedCharacters(pathSegments, true, 1); 2315 Uri._checkWindowsPathReservedCharacters(pathSegments, true, 1);
2752 return Uri.new({scheme: "file", pathSegments: pathSegments}); 2316 return Uri.new({scheme: "file", pathSegments: pathSegments});
2753 } 2317 }
2754 if (dart.notNull(path.length) > 0 && path.get(0) == sep) { 2318 if (dart.notNull(path.length) > 0 && path[dartx.get](0) == sep) {
2755 if (dart.notNull(path.length) > 1 && path.get(1) == sep) { 2319 if (dart.notNull(path.length) > 1 && path[dartx.get](1) == sep) {
2756 let pathStart = path.indexOf("\\", 2); 2320 let pathStart = path[dartx.indexOf]("\\", 2);
2757 let hostPart = pathStart == -1 ? path.substring(2) : path.substring(2, pathStart); 2321 let hostPart = pathStart == -1 ? path[dartx.substring](2) : path[dartx .substring](2, pathStart);
2758 let pathPart = pathStart == -1 ? "" : path.substring(dart.notNull(path Start) + 1); 2322 let pathPart = pathStart == -1 ? "" : path[dartx.substring](dart.notNu ll(pathStart) + 1);
2759 let pathSegments = pathPart.split(sep); 2323 let pathSegments = pathPart[dartx.split](sep);
2760 Uri._checkWindowsPathReservedCharacters(pathSegments, true); 2324 Uri._checkWindowsPathReservedCharacters(pathSegments, true);
2761 return Uri.new({scheme: "file", host: hostPart, pathSegments: pathSegm ents}); 2325 return Uri.new({scheme: "file", host: hostPart, pathSegments: pathSegm ents});
2762 } else { 2326 } else {
2763 let pathSegments = path.split(sep); 2327 let pathSegments = path[dartx.split](sep);
2764 Uri._checkWindowsPathReservedCharacters(pathSegments, true); 2328 Uri._checkWindowsPathReservedCharacters(pathSegments, true);
2765 return Uri.new({scheme: "file", pathSegments: pathSegments}); 2329 return Uri.new({scheme: "file", pathSegments: pathSegments});
2766 } 2330 }
2767 } else { 2331 } else {
2768 let pathSegments = path.split(sep); 2332 let pathSegments = path[dartx.split](sep);
2769 Uri._checkWindowsPathReservedCharacters(pathSegments, true); 2333 Uri._checkWindowsPathReservedCharacters(pathSegments, true);
2770 return Uri.new({pathSegments: pathSegments}); 2334 return Uri.new({pathSegments: pathSegments});
2771 } 2335 }
2772 } 2336 }
2773 replace(opts) { 2337 replace(opts) {
2774 let scheme = opts && 'scheme' in opts ? opts.scheme : null; 2338 let scheme = opts && 'scheme' in opts ? opts.scheme : null;
2775 let userInfo = opts && 'userInfo' in opts ? opts.userInfo : null; 2339 let userInfo = opts && 'userInfo' in opts ? opts.userInfo : null;
2776 let host = opts && 'host' in opts ? opts.host : null; 2340 let host = opts && 'host' in opts ? opts.host : null;
2777 let port = opts && 'port' in opts ? opts.port : null; 2341 let port = opts && 'port' in opts ? opts.port : null;
2778 let path = opts && 'path' in opts ? opts.path : null; 2342 let path = opts && 'path' in opts ? opts.path : null;
(...skipping 19 matching lines...) Expand all
2798 } else { 2362 } else {
2799 port = this[_port]; 2363 port = this[_port];
2800 if (schemeChanged) { 2364 if (schemeChanged) {
2801 port = Uri._makePort(port, scheme); 2365 port = Uri._makePort(port, scheme);
2802 } 2366 }
2803 } 2367 }
2804 if (host != null) { 2368 if (host != null) {
2805 host = Uri._makeHost(host, 0, host.length, false); 2369 host = Uri._makeHost(host, 0, host.length, false);
2806 } else if (this.hasAuthority) { 2370 } else if (this.hasAuthority) {
2807 host = this.host; 2371 host = this.host;
2808 } else if (dart.notNull(userInfo.isNotEmpty) || port != null || dart.notNu ll(isFile)) { 2372 } else if (dart.notNull(userInfo[dartx.isNotEmpty]) || port != null || dar t.notNull(isFile)) {
2809 host = ""; 2373 host = "";
2810 } 2374 }
2811 let ensureLeadingSlash = host != null; 2375 let ensureLeadingSlash = host != null;
2812 if (path != null || dart.notNull(pathSegments != null)) { 2376 if (path != null || dart.notNull(pathSegments != null)) {
2813 path = Uri._makePath(path, 0, Uri._stringOrNullLength(path), pathSegment s, ensureLeadingSlash, isFile); 2377 path = Uri._makePath(path, 0, Uri._stringOrNullLength(path), pathSegment s, ensureLeadingSlash, isFile);
2814 } else { 2378 } else {
2815 path = this.path; 2379 path = this.path;
2816 if ((dart.notNull(isFile) || dart.notNull(ensureLeadingSlash) && !dart.n otNull(path.isEmpty)) && !dart.notNull(path.startsWith('/'))) { 2380 if ((dart.notNull(isFile) || dart.notNull(ensureLeadingSlash) && !dart.n otNull(path[dartx.isEmpty])) && !dart.notNull(path[dartx.startsWith]('/'))) {
2817 path = `/${path}`; 2381 path = `/${path}`;
2818 } 2382 }
2819 } 2383 }
2820 if (query != null || dart.notNull(queryParameters != null)) { 2384 if (query != null || dart.notNull(queryParameters != null)) {
2821 query = Uri._makeQuery(query, 0, Uri._stringOrNullLength(query), queryPa rameters); 2385 query = Uri._makeQuery(query, 0, Uri._stringOrNullLength(query), queryPa rameters);
2822 } else if (this.hasQuery) { 2386 } else if (this.hasQuery) {
2823 query = this.query; 2387 query = this.query;
2824 } 2388 }
2825 if (fragment != null) { 2389 if (fragment != null) {
2826 fragment = Uri._makeFragment(fragment, 0, fragment.length); 2390 fragment = Uri._makeFragment(fragment, 0, fragment.length);
2827 } else if (this.hasFragment) { 2391 } else if (this.hasFragment) {
2828 fragment = this.fragment; 2392 fragment = this.fragment;
2829 } 2393 }
2830 return new Uri._internal(scheme, userInfo, host, port, path, query, fragme nt); 2394 return new Uri._internal(scheme, userInfo, host, port, path, query, fragme nt);
2831 } 2395 }
2832 get pathSegments() { 2396 get pathSegments() {
2833 if (this[_pathSegments] == null) { 2397 if (this[_pathSegments] == null) {
2834 let pathToSplit = !dart.notNull(this.path.isEmpty) && this.path.codeUnit At(0) == Uri._SLASH ? this.path.substring(1) : this.path; 2398 let pathToSplit = !dart.notNull(this.path[dartx.isEmpty]) && this.path[d artx.codeUnitAt](0) == Uri._SLASH ? this.path[dartx.substring](1) : this.path;
2835 this[_pathSegments] = new (collection.UnmodifiableListView$(String))(pat hToSplit == "" ? dart.const(dart.setType([], List$(String))) : List$(String).fro m(pathToSplit.split("/")[$map](Uri.decodeComponent), {growable: false})); 2399 this[_pathSegments] = new (collection.UnmodifiableListView$(String))(pat hToSplit == "" ? dart.const(dart.list([], String)) : List$(String).from(pathToSp lit[dartx.split]("/")[dartx.map](Uri.decodeComponent), {growable: false}));
2836 } 2400 }
2837 return this[_pathSegments]; 2401 return this[_pathSegments];
2838 } 2402 }
2839 get queryParameters() { 2403 get queryParameters() {
2840 if (this[_queryParameters] == null) { 2404 if (this[_queryParameters] == null) {
2841 this[_queryParameters] = new (collection.UnmodifiableMapView$(String, St ring))(Uri.splitQueryString(this.query)); 2405 this[_queryParameters] = new (collection.UnmodifiableMapView$(String, St ring))(Uri.splitQueryString(this.query));
2842 } 2406 }
2843 return this[_queryParameters]; 2407 return this[_queryParameters];
2844 } 2408 }
2845 static _makePort(port, scheme) { 2409 static _makePort(port, scheme) {
2846 if (port != null && port == Uri._defaultPort(scheme)) 2410 if (port != null && port == Uri._defaultPort(scheme))
2847 return null; 2411 return null;
2848 return port; 2412 return port;
2849 } 2413 }
2850 static _makeHost(host, start, end, strictIPv6) { 2414 static _makeHost(host, start, end, strictIPv6) {
2851 if (host == null) 2415 if (host == null)
2852 return null; 2416 return null;
2853 if (start == end) 2417 if (start == end)
2854 return ""; 2418 return "";
2855 if (host.codeUnitAt(start) == Uri._LEFT_BRACKET) { 2419 if (host[dartx.codeUnitAt](start) == Uri._LEFT_BRACKET) {
2856 if (host.codeUnitAt(dart.notNull(end) - 1) != Uri._RIGHT_BRACKET) { 2420 if (host[dartx.codeUnitAt](dart.notNull(end) - 1) != Uri._RIGHT_BRACKET) {
2857 Uri._fail(host, start, 'Missing end `]` to match `[` in host'); 2421 Uri._fail(host, start, 'Missing end `]` to match `[` in host');
2858 } 2422 }
2859 Uri.parseIPv6Address(host, dart.notNull(start) + 1, dart.notNull(end) - 1); 2423 Uri.parseIPv6Address(host, dart.notNull(start) + 1, dart.notNull(end) - 1);
2860 return host.substring(start, end).toLowerCase(); 2424 return host[dartx.substring](start, end)[dartx.toLowerCase]();
2861 } 2425 }
2862 if (!dart.notNull(strictIPv6)) { 2426 if (!dart.notNull(strictIPv6)) {
2863 for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNul l(i) + 1) { 2427 for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNul l(i) + 1) {
2864 if (host.codeUnitAt(i) == Uri._COLON) { 2428 if (host[dartx.codeUnitAt](i) == Uri._COLON) {
2865 Uri.parseIPv6Address(host, start, end); 2429 Uri.parseIPv6Address(host, start, end);
2866 return `[${host}]`; 2430 return `[${host}]`;
2867 } 2431 }
2868 } 2432 }
2869 } 2433 }
2870 return Uri._normalizeRegName(host, start, end); 2434 return Uri._normalizeRegName(host, start, end);
2871 } 2435 }
2872 static _isRegNameChar(char) { 2436 static _isRegNameChar(char) {
2873 return dart.notNull(char) < 127 && dart.notNull(!dart.equals(dart.dsend(Ur i._regNameTable[$get](dart.notNull(char) >> 4), '&', 1 << (dart.notNull(char) & 15)), 0)); 2437 return dart.notNull(char) < 127 && dart.notNull(!dart.equals(dart.dsend(Ur i._regNameTable[dartx.get](dart.notNull(char) >> 4), '&', 1 << (dart.notNull(cha r) & 15)), 0));
2874 } 2438 }
2875 static _normalizeRegName(host, start, end) { 2439 static _normalizeRegName(host, start, end) {
2876 let buffer = null; 2440 let buffer = null;
2877 let sectionStart = start; 2441 let sectionStart = start;
2878 let index = start; 2442 let index = start;
2879 let isNormalized = true; 2443 let isNormalized = true;
2880 while (dart.notNull(index) < dart.notNull(end)) { 2444 while (dart.notNull(index) < dart.notNull(end)) {
2881 let char = host.codeUnitAt(index); 2445 let char = host[dartx.codeUnitAt](index);
2882 if (char == Uri._PERCENT) { 2446 if (char == Uri._PERCENT) {
2883 let replacement = Uri._normalizeEscape(host, index, true); 2447 let replacement = Uri._normalizeEscape(host, index, true);
2884 if (replacement == null && dart.notNull(isNormalized)) { 2448 if (replacement == null && dart.notNull(isNormalized)) {
2885 index = dart.notNull(index) + 3; 2449 index = dart.notNull(index) + 3;
2886 continue; 2450 continue;
2887 } 2451 }
2888 if (buffer == null) 2452 if (buffer == null)
2889 buffer = new StringBuffer(); 2453 buffer = new StringBuffer();
2890 let slice = host.substring(sectionStart, index); 2454 let slice = host[dartx.substring](sectionStart, index);
2891 if (!dart.notNull(isNormalized)) 2455 if (!dart.notNull(isNormalized))
2892 slice = slice.toLowerCase(); 2456 slice = slice[dartx.toLowerCase]();
2893 buffer.write(slice); 2457 buffer.write(slice);
2894 let sourceLength = 3; 2458 let sourceLength = 3;
2895 if (replacement == null) { 2459 if (replacement == null) {
2896 replacement = host.substring(index, dart.notNull(index) + 3); 2460 replacement = host[dartx.substring](index, dart.notNull(index) + 3);
2897 } else if (replacement == "%") { 2461 } else if (replacement == "%") {
2898 replacement = "%25"; 2462 replacement = "%25";
2899 sourceLength = 1; 2463 sourceLength = 1;
2900 } 2464 }
2901 buffer.write(replacement); 2465 buffer.write(replacement);
2902 index = dart.notNull(index) + dart.notNull(sourceLength); 2466 index = dart.notNull(index) + dart.notNull(sourceLength);
2903 sectionStart = index; 2467 sectionStart = index;
2904 isNormalized = true; 2468 isNormalized = true;
2905 } else if (Uri._isRegNameChar(char)) { 2469 } else if (Uri._isRegNameChar(char)) {
2906 if (dart.notNull(isNormalized) && dart.notNull(Uri._UPPER_CASE_A) <= d art.notNull(char) && dart.notNull(Uri._UPPER_CASE_Z) >= dart.notNull(char)) { 2470 if (dart.notNull(isNormalized) && dart.notNull(Uri._UPPER_CASE_A) <= d art.notNull(char) && dart.notNull(Uri._UPPER_CASE_Z) >= dart.notNull(char)) {
2907 if (buffer == null) 2471 if (buffer == null)
2908 buffer = new StringBuffer(); 2472 buffer = new StringBuffer();
2909 if (dart.notNull(sectionStart) < dart.notNull(index)) { 2473 if (dart.notNull(sectionStart) < dart.notNull(index)) {
2910 buffer.write(host.substring(sectionStart, index)); 2474 buffer.write(host[dartx.substring](sectionStart, index));
2911 sectionStart = index; 2475 sectionStart = index;
2912 } 2476 }
2913 isNormalized = false; 2477 isNormalized = false;
2914 } 2478 }
2915 index = dart.notNull(index) + 1; 2479 index = dart.notNull(index) + 1;
2916 } else if (Uri._isGeneralDelimiter(char)) { 2480 } else if (Uri._isGeneralDelimiter(char)) {
2917 Uri._fail(host, index, "Invalid character"); 2481 Uri._fail(host, index, "Invalid character");
2918 } else { 2482 } else {
2919 let sourceLength = 1; 2483 let sourceLength = 1;
2920 if ((dart.notNull(char) & 64512) == 55296 && dart.notNull(index) + 1 < dart.notNull(end)) { 2484 if ((dart.notNull(char) & 64512) == 55296 && dart.notNull(index) + 1 < dart.notNull(end)) {
2921 let tail = host.codeUnitAt(dart.notNull(index) + 1); 2485 let tail = host[dartx.codeUnitAt](dart.notNull(index) + 1);
2922 if ((dart.notNull(tail) & 64512) == 56320) { 2486 if ((dart.notNull(tail) & 64512) == 56320) {
2923 char = 65536 | (dart.notNull(char) & 1023) << 10 | dart.notNull(ta il) & 1023; 2487 char = 65536 | (dart.notNull(char) & 1023) << 10 | dart.notNull(ta il) & 1023;
2924 sourceLength = 2; 2488 sourceLength = 2;
2925 } 2489 }
2926 } 2490 }
2927 if (buffer == null) 2491 if (buffer == null)
2928 buffer = new StringBuffer(); 2492 buffer = new StringBuffer();
2929 let slice = host.substring(sectionStart, index); 2493 let slice = host[dartx.substring](sectionStart, index);
2930 if (!dart.notNull(isNormalized)) 2494 if (!dart.notNull(isNormalized))
2931 slice = slice.toLowerCase(); 2495 slice = slice[dartx.toLowerCase]();
2932 buffer.write(slice); 2496 buffer.write(slice);
2933 buffer.write(Uri._escapeChar(char)); 2497 buffer.write(Uri._escapeChar(char));
2934 index = dart.notNull(index) + dart.notNull(sourceLength); 2498 index = dart.notNull(index) + dart.notNull(sourceLength);
2935 sectionStart = index; 2499 sectionStart = index;
2936 } 2500 }
2937 } 2501 }
2938 if (buffer == null) 2502 if (buffer == null)
2939 return host.substring(start, end); 2503 return host[dartx.substring](start, end);
2940 if (dart.notNull(sectionStart) < dart.notNull(end)) { 2504 if (dart.notNull(sectionStart) < dart.notNull(end)) {
2941 let slice = host.substring(sectionStart, end); 2505 let slice = host[dartx.substring](sectionStart, end);
2942 if (!dart.notNull(isNormalized)) 2506 if (!dart.notNull(isNormalized))
2943 slice = slice.toLowerCase(); 2507 slice = slice[dartx.toLowerCase]();
2944 buffer.write(slice); 2508 buffer.write(slice);
2945 } 2509 }
2946 return dart.toString(buffer); 2510 return dart.toString(buffer);
2947 } 2511 }
2948 static _makeScheme(scheme, end) { 2512 static _makeScheme(scheme, end) {
2949 if (end == 0) 2513 if (end == 0)
2950 return ""; 2514 return "";
2951 let firstCodeUnit = scheme.codeUnitAt(0); 2515 let firstCodeUnit = scheme[dartx.codeUnitAt](0);
2952 if (!dart.notNull(Uri._isAlphabeticCharacter(firstCodeUnit))) { 2516 if (!dart.notNull(Uri._isAlphabeticCharacter(firstCodeUnit))) {
2953 Uri._fail(scheme, 0, "Scheme not starting with alphabetic character"); 2517 Uri._fail(scheme, 0, "Scheme not starting with alphabetic character");
2954 } 2518 }
2955 let allLowercase = dart.notNull(firstCodeUnit) >= dart.notNull(Uri._LOWER_ CASE_A); 2519 let allLowercase = dart.notNull(firstCodeUnit) >= dart.notNull(Uri._LOWER_ CASE_A);
2956 for (let i = 0; dart.notNull(i) < dart.notNull(end); i = dart.notNull(i) + 1) { 2520 for (let i = 0; dart.notNull(i) < dart.notNull(end); i = dart.notNull(i) + 1) {
2957 let codeUnit = scheme.codeUnitAt(i); 2521 let codeUnit = scheme[dartx.codeUnitAt](i);
2958 if (!dart.notNull(Uri._isSchemeCharacter(codeUnit))) { 2522 if (!dart.notNull(Uri._isSchemeCharacter(codeUnit))) {
2959 Uri._fail(scheme, i, "Illegal scheme character"); 2523 Uri._fail(scheme, i, "Illegal scheme character");
2960 } 2524 }
2961 if (dart.notNull(codeUnit) < dart.notNull(Uri._LOWER_CASE_A) || dart.not Null(codeUnit) > dart.notNull(Uri._LOWER_CASE_Z)) { 2525 if (dart.notNull(codeUnit) < dart.notNull(Uri._LOWER_CASE_A) || dart.not Null(codeUnit) > dart.notNull(Uri._LOWER_CASE_Z)) {
2962 allLowercase = false; 2526 allLowercase = false;
2963 } 2527 }
2964 } 2528 }
2965 scheme = scheme.substring(0, end); 2529 scheme = scheme[dartx.substring](0, end);
2966 if (!dart.notNull(allLowercase)) 2530 if (!dart.notNull(allLowercase))
2967 scheme = scheme.toLowerCase(); 2531 scheme = scheme[dartx.toLowerCase]();
2968 return scheme; 2532 return scheme;
2969 } 2533 }
2970 static _makeUserInfo(userInfo, start, end) { 2534 static _makeUserInfo(userInfo, start, end) {
2971 if (userInfo == null) 2535 if (userInfo == null)
2972 return ""; 2536 return "";
2973 return Uri._normalize(userInfo, start, end, dart.as(Uri._userinfoTable, Li st$(int))); 2537 return Uri._normalize(userInfo, start, end, dart.as(Uri._userinfoTable, Li st$(int)));
2974 } 2538 }
2975 static _makePath(path, start, end, pathSegments, ensureLeadingSlash, isFile) { 2539 static _makePath(path, start, end, pathSegments, ensureLeadingSlash, isFile) {
2976 if (path == null && dart.notNull(pathSegments == null)) 2540 if (path == null && dart.notNull(pathSegments == null))
2977 return isFile ? "/" : ""; 2541 return isFile ? "/" : "";
2978 if (path != null && dart.notNull(pathSegments != null)) { 2542 if (path != null && dart.notNull(pathSegments != null)) {
2979 throw new ArgumentError('Both path and pathSegments specified'); 2543 throw new ArgumentError('Both path and pathSegments specified');
2980 } 2544 }
2981 let result = null; 2545 let result = null;
2982 if (path != null) { 2546 if (path != null) {
2983 result = Uri._normalize(path, start, end, dart.as(Uri._pathCharOrSlashTa ble, List$(int))); 2547 result = Uri._normalize(path, start, end, dart.as(Uri._pathCharOrSlashTa ble, List$(int)));
2984 } else { 2548 } else {
2985 result = pathSegments[$map](dart.fn(s => Uri._uriEncode(dart.as(Uri._pat hCharTable, List$(int)), dart.as(s, String)), String, [Object]))[$join]("/"); 2549 result = pathSegments[dartx.map](dart.fn(s => Uri._uriEncode(dart.as(Uri ._pathCharTable, List$(int)), dart.as(s, String)), String, [Object]))[dartx.join ]("/");
2986 } 2550 }
2987 if (dart.dload(result, 'isEmpty')) { 2551 if (dart.dload(result, 'isEmpty')) {
2988 if (isFile) 2552 if (isFile)
2989 return "/"; 2553 return "/";
2990 } else if ((dart.notNull(isFile) || dart.notNull(ensureLeadingSlash)) && d art.notNull(!dart.equals(dart.dsend(result, 'codeUnitAt', 0), Uri._SLASH))) { 2554 } else if ((dart.notNull(isFile) || dart.notNull(ensureLeadingSlash)) && d art.notNull(!dart.equals(dart.dsend(result, 'codeUnitAt', 0), Uri._SLASH))) {
2991 return `/${result}`; 2555 return `/${result}`;
2992 } 2556 }
2993 return dart.as(result, String); 2557 return dart.as(result, String);
2994 } 2558 }
2995 static _makeQuery(query, start, end, queryParameters) { 2559 static _makeQuery(query, start, end, queryParameters) {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
3030 return dart.notNull(Uri._LOWER_CASE_A) <= dart.notNull(char) && dart.notNu ll(Uri._LOWER_CASE_F) >= dart.notNull(char); 2594 return dart.notNull(Uri._LOWER_CASE_A) <= dart.notNull(char) && dart.notNu ll(Uri._LOWER_CASE_F) >= dart.notNull(char);
3031 } 2595 }
3032 static _hexValue(char) { 2596 static _hexValue(char) {
3033 dart.assert(Uri._isHexDigit(char)); 2597 dart.assert(Uri._isHexDigit(char));
3034 if (dart.notNull(Uri._NINE) >= dart.notNull(char)) 2598 if (dart.notNull(Uri._NINE) >= dart.notNull(char))
3035 return dart.notNull(char) - dart.notNull(Uri._ZERO); 2599 return dart.notNull(char) - dart.notNull(Uri._ZERO);
3036 char = dart.notNull(char) | 32; 2600 char = dart.notNull(char) | 32;
3037 return dart.notNull(char) - (dart.notNull(Uri._LOWER_CASE_A) - 10); 2601 return dart.notNull(char) - (dart.notNull(Uri._LOWER_CASE_A) - 10);
3038 } 2602 }
3039 static _normalizeEscape(source, index, lowerCase) { 2603 static _normalizeEscape(source, index, lowerCase) {
3040 dart.assert(source.codeUnitAt(index) == Uri._PERCENT); 2604 dart.assert(source[dartx.codeUnitAt](index) == Uri._PERCENT);
3041 if (dart.notNull(index) + 2 >= dart.notNull(source.length)) { 2605 if (dart.notNull(index) + 2 >= dart.notNull(source.length)) {
3042 return "%"; 2606 return "%";
3043 } 2607 }
3044 let firstDigit = source.codeUnitAt(dart.notNull(index) + 1); 2608 let firstDigit = source[dartx.codeUnitAt](dart.notNull(index) + 1);
3045 let secondDigit = source.codeUnitAt(dart.notNull(index) + 2); 2609 let secondDigit = source[dartx.codeUnitAt](dart.notNull(index) + 2);
3046 if (!dart.notNull(Uri._isHexDigit(firstDigit)) || !dart.notNull(Uri._isHex Digit(secondDigit))) { 2610 if (!dart.notNull(Uri._isHexDigit(firstDigit)) || !dart.notNull(Uri._isHex Digit(secondDigit))) {
3047 return "%"; 2611 return "%";
3048 } 2612 }
3049 let value = dart.notNull(Uri._hexValue(firstDigit)) * 16 + dart.notNull(Ur i._hexValue(secondDigit)); 2613 let value = dart.notNull(Uri._hexValue(firstDigit)) * 16 + dart.notNull(Ur i._hexValue(secondDigit));
3050 if (Uri._isUnreservedChar(value)) { 2614 if (Uri._isUnreservedChar(value)) {
3051 if (dart.notNull(lowerCase) && dart.notNull(Uri._UPPER_CASE_A) <= dart.n otNull(value) && dart.notNull(Uri._UPPER_CASE_Z) >= dart.notNull(value)) { 2615 if (dart.notNull(lowerCase) && dart.notNull(Uri._UPPER_CASE_A) <= dart.n otNull(value) && dart.notNull(Uri._UPPER_CASE_Z) >= dart.notNull(value)) {
3052 value = dart.notNull(value) | 32; 2616 value = dart.notNull(value) | 32;
3053 } 2617 }
3054 return String.fromCharCode(value); 2618 return String.fromCharCode(value);
3055 } 2619 }
3056 if (dart.notNull(firstDigit) >= dart.notNull(Uri._LOWER_CASE_A) || dart.no tNull(secondDigit) >= dart.notNull(Uri._LOWER_CASE_A)) { 2620 if (dart.notNull(firstDigit) >= dart.notNull(Uri._LOWER_CASE_A) || dart.no tNull(secondDigit) >= dart.notNull(Uri._LOWER_CASE_A)) {
3057 return source.substring(index, dart.notNull(index) + 3).toUpperCase(); 2621 return source[dartx.substring](index, dart.notNull(index) + 3)[dartx.toU pperCase]();
3058 } 2622 }
3059 return null; 2623 return null;
3060 } 2624 }
3061 static _isUnreservedChar(ch) { 2625 static _isUnreservedChar(ch) {
3062 return dart.notNull(ch) < 127 && dart.notNull(!dart.equals(dart.dsend(Uri. _unreservedTable[$get](dart.notNull(ch) >> 4), '&', 1 << (dart.notNull(ch) & 15) ), 0)); 2626 return dart.notNull(ch) < 127 && dart.notNull(!dart.equals(dart.dsend(Uri. _unreservedTable[dartx.get](dart.notNull(ch) >> 4), '&', 1 << (dart.notNull(ch) & 15)), 0));
3063 } 2627 }
3064 static _escapeChar(char) { 2628 static _escapeChar(char) {
3065 dart.assert(dart.dsend(char, '<=', 1114111)); 2629 dart.assert(dart.dsend(char, '<=', 1114111));
3066 let hexDigits = "0123456789ABCDEF"; 2630 let hexDigits = "0123456789ABCDEF";
3067 let codeUnits = null; 2631 let codeUnits = null;
3068 if (dart.dsend(char, '<', 128)) { 2632 if (dart.dsend(char, '<', 128)) {
3069 codeUnits = List.new(3); 2633 codeUnits = List.new(3);
3070 codeUnits[$set](0, Uri._PERCENT); 2634 codeUnits[dartx.set](0, Uri._PERCENT);
3071 codeUnits[$set](1, hexDigits.codeUnitAt(dart.as(dart.dsend(char, '>>', 4 ), int))); 2635 codeUnits[dartx.set](1, hexDigits[dartx.codeUnitAt](dart.as(dart.dsend(c har, '>>', 4), int)));
3072 codeUnits[$set](2, hexDigits.codeUnitAt(dart.as(dart.dsend(char, '&', 15 ), int))); 2636 codeUnits[dartx.set](2, hexDigits[dartx.codeUnitAt](dart.as(dart.dsend(c har, '&', 15), int)));
3073 } else { 2637 } else {
3074 let flag = 192; 2638 let flag = 192;
3075 let encodedBytes = 2; 2639 let encodedBytes = 2;
3076 if (dart.dsend(char, '>', 2047)) { 2640 if (dart.dsend(char, '>', 2047)) {
3077 flag = 224; 2641 flag = 224;
3078 encodedBytes = 3; 2642 encodedBytes = 3;
3079 if (dart.dsend(char, '>', 65535)) { 2643 if (dart.dsend(char, '>', 65535)) {
3080 encodedBytes = 4; 2644 encodedBytes = 4;
3081 flag = 240; 2645 flag = 240;
3082 } 2646 }
3083 } 2647 }
3084 codeUnits = List.new(3 * dart.notNull(encodedBytes)); 2648 codeUnits = List.new(3 * dart.notNull(encodedBytes));
3085 let index = 0; 2649 let index = 0;
3086 while ((encodedBytes = dart.notNull(encodedBytes) - 1) >= 0) { 2650 while ((encodedBytes = dart.notNull(encodedBytes) - 1) >= 0) {
3087 let byte = dart.as(dart.dsend(dart.dsend(dart.dsend(char, '>>', 6 * da rt.notNull(encodedBytes)), '&', 63), '|', flag), int); 2651 let byte = dart.as(dart.dsend(dart.dsend(dart.dsend(char, '>>', 6 * da rt.notNull(encodedBytes)), '&', 63), '|', flag), int);
3088 codeUnits[$set](index, Uri._PERCENT); 2652 codeUnits[dartx.set](index, Uri._PERCENT);
3089 codeUnits[$set](dart.notNull(index) + 1, hexDigits.codeUnitAt(dart.not Null(byte) >> 4)); 2653 codeUnits[dartx.set](dart.notNull(index) + 1, hexDigits[dartx.codeUnit At](dart.notNull(byte) >> 4));
3090 codeUnits[$set](dart.notNull(index) + 2, hexDigits.codeUnitAt(dart.not Null(byte) & 15)); 2654 codeUnits[dartx.set](dart.notNull(index) + 2, hexDigits[dartx.codeUnit At](dart.notNull(byte) & 15));
3091 index = dart.notNull(index) + 3; 2655 index = dart.notNull(index) + 3;
3092 flag = 128; 2656 flag = 128;
3093 } 2657 }
3094 } 2658 }
3095 return String.fromCharCodes(dart.as(codeUnits, Iterable$(int))); 2659 return String.fromCharCodes(dart.as(codeUnits, Iterable$(int)));
3096 } 2660 }
3097 static _normalize(component, start, end, charTable) { 2661 static _normalize(component, start, end, charTable) {
3098 let buffer = null; 2662 let buffer = null;
3099 let sectionStart = start; 2663 let sectionStart = start;
3100 let index = start; 2664 let index = start;
3101 while (dart.notNull(index) < dart.notNull(end)) { 2665 while (dart.notNull(index) < dart.notNull(end)) {
3102 let char = component.codeUnitAt(index); 2666 let char = component[dartx.codeUnitAt](index);
3103 if (dart.notNull(char) < 127 && (dart.notNull(charTable[$get](dart.notNu ll(char) >> 4)) & 1 << (dart.notNull(char) & 15)) != 0) { 2667 if (dart.notNull(char) < 127 && (dart.notNull(charTable[dartx.get](dart. notNull(char) >> 4)) & 1 << (dart.notNull(char) & 15)) != 0) {
3104 index = dart.notNull(index) + 1; 2668 index = dart.notNull(index) + 1;
3105 } else { 2669 } else {
3106 let replacement = null; 2670 let replacement = null;
3107 let sourceLength = null; 2671 let sourceLength = null;
3108 if (char == Uri._PERCENT) { 2672 if (char == Uri._PERCENT) {
3109 replacement = Uri._normalizeEscape(component, index, false); 2673 replacement = Uri._normalizeEscape(component, index, false);
3110 if (replacement == null) { 2674 if (replacement == null) {
3111 index = dart.notNull(index) + 3; 2675 index = dart.notNull(index) + 3;
3112 continue; 2676 continue;
3113 } 2677 }
3114 if ("%" == replacement) { 2678 if ("%" == replacement) {
3115 replacement = "%25"; 2679 replacement = "%25";
3116 sourceLength = 1; 2680 sourceLength = 1;
3117 } else { 2681 } else {
3118 sourceLength = 3; 2682 sourceLength = 3;
3119 } 2683 }
3120 } else if (Uri._isGeneralDelimiter(char)) { 2684 } else if (Uri._isGeneralDelimiter(char)) {
3121 Uri._fail(component, index, "Invalid character"); 2685 Uri._fail(component, index, "Invalid character");
3122 } else { 2686 } else {
3123 sourceLength = 1; 2687 sourceLength = 1;
3124 if ((dart.notNull(char) & 64512) == 55296) { 2688 if ((dart.notNull(char) & 64512) == 55296) {
3125 if (dart.notNull(index) + 1 < dart.notNull(end)) { 2689 if (dart.notNull(index) + 1 < dart.notNull(end)) {
3126 let tail = component.codeUnitAt(dart.notNull(index) + 1); 2690 let tail = component[dartx.codeUnitAt](dart.notNull(index) + 1);
3127 if ((dart.notNull(tail) & 64512) == 56320) { 2691 if ((dart.notNull(tail) & 64512) == 56320) {
3128 sourceLength = 2; 2692 sourceLength = 2;
3129 char = 65536 | (dart.notNull(char) & 1023) << 10 | dart.notNul l(tail) & 1023; 2693 char = 65536 | (dart.notNull(char) & 1023) << 10 | dart.notNul l(tail) & 1023;
3130 } 2694 }
3131 } 2695 }
3132 } 2696 }
3133 replacement = Uri._escapeChar(char); 2697 replacement = Uri._escapeChar(char);
3134 } 2698 }
3135 if (buffer == null) 2699 if (buffer == null)
3136 buffer = new StringBuffer(); 2700 buffer = new StringBuffer();
3137 buffer.write(component.substring(sectionStart, index)); 2701 buffer.write(component[dartx.substring](sectionStart, index));
3138 buffer.write(replacement); 2702 buffer.write(replacement);
3139 index = dart.notNull(index) + dart.notNull(sourceLength); 2703 index = dart.notNull(index) + dart.notNull(sourceLength);
3140 sectionStart = index; 2704 sectionStart = index;
3141 } 2705 }
3142 } 2706 }
3143 if (buffer == null) { 2707 if (buffer == null) {
3144 return component.substring(start, end); 2708 return component[dartx.substring](start, end);
3145 } 2709 }
3146 if (dart.notNull(sectionStart) < dart.notNull(end)) { 2710 if (dart.notNull(sectionStart) < dart.notNull(end)) {
3147 buffer.write(component.substring(sectionStart, end)); 2711 buffer.write(component[dartx.substring](sectionStart, end));
3148 } 2712 }
3149 return dart.toString(buffer); 2713 return dart.toString(buffer);
3150 } 2714 }
3151 static _isSchemeCharacter(ch) { 2715 static _isSchemeCharacter(ch) {
3152 return dart.notNull(ch) < 128 && dart.notNull(!dart.equals(dart.dsend(Uri. _schemeTable[$get](dart.notNull(ch) >> 4), '&', 1 << (dart.notNull(ch) & 15)), 0 )); 2716 return dart.notNull(ch) < 128 && dart.notNull(!dart.equals(dart.dsend(Uri. _schemeTable[dartx.get](dart.notNull(ch) >> 4), '&', 1 << (dart.notNull(ch) & 15 )), 0));
3153 } 2717 }
3154 static _isGeneralDelimiter(ch) { 2718 static _isGeneralDelimiter(ch) {
3155 return dart.notNull(ch) <= dart.notNull(Uri._RIGHT_BRACKET) && dart.notNul l(!dart.equals(dart.dsend(Uri._genDelimitersTable[$get](dart.notNull(ch) >> 4), '&', 1 << (dart.notNull(ch) & 15)), 0)); 2719 return dart.notNull(ch) <= dart.notNull(Uri._RIGHT_BRACKET) && dart.notNul l(!dart.equals(dart.dsend(Uri._genDelimitersTable[dartx.get](dart.notNull(ch) >> 4), '&', 1 << (dart.notNull(ch) & 15)), 0));
3156 } 2720 }
3157 get isAbsolute() { 2721 get isAbsolute() {
3158 return this.scheme != "" && this.fragment == ""; 2722 return this.scheme != "" && this.fragment == "";
3159 } 2723 }
3160 [_merge](base, reference) { 2724 [_merge](base, reference) {
3161 if (base.isEmpty) 2725 if (base[dartx.isEmpty])
3162 return `/${reference}`; 2726 return `/${reference}`;
3163 let backCount = 0; 2727 let backCount = 0;
3164 let refStart = 0; 2728 let refStart = 0;
3165 while (reference.startsWith("../", refStart)) { 2729 while (reference[dartx.startsWith]("../", refStart)) {
3166 refStart = dart.notNull(refStart) + 3; 2730 refStart = dart.notNull(refStart) + 3;
3167 backCount = dart.notNull(backCount) + 1; 2731 backCount = dart.notNull(backCount) + 1;
3168 } 2732 }
3169 let baseEnd = base.lastIndexOf('/'); 2733 let baseEnd = base[dartx.lastIndexOf]('/');
3170 while (dart.notNull(baseEnd) > 0 && dart.notNull(backCount) > 0) { 2734 while (dart.notNull(baseEnd) > 0 && dart.notNull(backCount) > 0) {
3171 let newEnd = base.lastIndexOf('/', dart.notNull(baseEnd) - 1); 2735 let newEnd = base[dartx.lastIndexOf]('/', dart.notNull(baseEnd) - 1);
3172 if (dart.notNull(newEnd) < 0) { 2736 if (dart.notNull(newEnd) < 0) {
3173 break; 2737 break;
3174 } 2738 }
3175 let delta = dart.notNull(baseEnd) - dart.notNull(newEnd); 2739 let delta = dart.notNull(baseEnd) - dart.notNull(newEnd);
3176 if ((delta == 2 || delta == 3) && base.codeUnitAt(dart.notNull(newEnd) + 1) == Uri._DOT && (delta == 2 || base.codeUnitAt(dart.notNull(newEnd) + 2) == U ri._DOT)) { 2740 if ((delta == 2 || delta == 3) && base[dartx.codeUnitAt](dart.notNull(ne wEnd) + 1) == Uri._DOT && (delta == 2 || base[dartx.codeUnitAt](dart.notNull(new End) + 2) == Uri._DOT)) {
3177 break; 2741 break;
3178 } 2742 }
3179 baseEnd = newEnd; 2743 baseEnd = newEnd;
3180 backCount = dart.notNull(backCount) - 1; 2744 backCount = dart.notNull(backCount) - 1;
3181 } 2745 }
3182 return dart.notNull(base.substring(0, dart.notNull(baseEnd) + 1)) + dart.n otNull(reference.substring(dart.notNull(refStart) - 3 * dart.notNull(backCount)) ); 2746 return dart.notNull(base[dartx.substring](0, dart.notNull(baseEnd) + 1)) + dart.notNull(reference[dartx.substring](dart.notNull(refStart) - 3 * dart.notNu ll(backCount)));
3183 } 2747 }
3184 [_hasDotSegments](path) { 2748 [_hasDotSegments](path) {
3185 if (dart.notNull(path.length) > 0 && path.codeUnitAt(0) == Uri._DOT) 2749 if (dart.notNull(path.length) > 0 && path[dartx.codeUnitAt](0) == Uri._DOT )
3186 return true; 2750 return true;
3187 let index = path.indexOf("/."); 2751 let index = path[dartx.indexOf]("/.");
3188 return index != -1; 2752 return index != -1;
3189 } 2753 }
3190 [_removeDotSegments](path) { 2754 [_removeDotSegments](path) {
3191 if (!dart.notNull(this[_hasDotSegments](path))) 2755 if (!dart.notNull(this[_hasDotSegments](path)))
3192 return path; 2756 return path;
3193 let output = dart.setType([], List$(String)); 2757 let output = dart.list([], String);
3194 let appendSlash = false; 2758 let appendSlash = false;
3195 for (let segment of path.split("/")) { 2759 for (let segment of path[dartx.split]("/")) {
3196 appendSlash = false; 2760 appendSlash = false;
3197 if (segment == "..") { 2761 if (segment == "..") {
3198 if (!dart.notNull(output[$isEmpty]) && (output[$length] != 1 || output [$get](0) != "")) 2762 if (!dart.notNull(output[dartx.isEmpty]) && (output.length != 1 || out put[dartx.get](0) != ""))
3199 output[$removeLast](); 2763 output[dartx.removeLast]();
3200 appendSlash = true; 2764 appendSlash = true;
3201 } else if ("." == segment) { 2765 } else if ("." == segment) {
3202 appendSlash = true; 2766 appendSlash = true;
3203 } else { 2767 } else {
3204 output[$add](segment); 2768 output[dartx.add](segment);
3205 } 2769 }
3206 } 2770 }
3207 if (appendSlash) 2771 if (appendSlash)
3208 output[$add](""); 2772 output[dartx.add]("");
3209 return output[$join]("/"); 2773 return output[dartx.join]("/");
3210 } 2774 }
3211 resolve(reference) { 2775 resolve(reference) {
3212 return this.resolveUri(Uri.parse(reference)); 2776 return this.resolveUri(Uri.parse(reference));
3213 } 2777 }
3214 resolveUri(reference) { 2778 resolveUri(reference) {
3215 let targetScheme = null; 2779 let targetScheme = null;
3216 let targetUserInfo = ""; 2780 let targetUserInfo = "";
3217 let targetHost = null; 2781 let targetHost = null;
3218 let targetPort = null; 2782 let targetPort = null;
3219 let targetPath = null; 2783 let targetPath = null;
3220 let targetQuery = null; 2784 let targetQuery = null;
3221 if (reference.scheme.isNotEmpty) { 2785 if (reference.scheme[dartx.isNotEmpty]) {
3222 targetScheme = reference.scheme; 2786 targetScheme = reference.scheme;
3223 if (reference.hasAuthority) { 2787 if (reference.hasAuthority) {
3224 targetUserInfo = reference.userInfo; 2788 targetUserInfo = reference.userInfo;
3225 targetHost = reference.host; 2789 targetHost = reference.host;
3226 targetPort = reference.hasPort ? reference.port : null; 2790 targetPort = reference.hasPort ? reference.port : null;
3227 } 2791 }
3228 targetPath = this[_removeDotSegments](reference.path); 2792 targetPath = this[_removeDotSegments](reference.path);
3229 if (reference.hasQuery) { 2793 if (reference.hasQuery) {
3230 targetQuery = reference.query; 2794 targetQuery = reference.query;
3231 } 2795 }
3232 } else { 2796 } else {
3233 targetScheme = this.scheme; 2797 targetScheme = this.scheme;
3234 if (reference.hasAuthority) { 2798 if (reference.hasAuthority) {
3235 targetUserInfo = reference.userInfo; 2799 targetUserInfo = reference.userInfo;
3236 targetHost = reference.host; 2800 targetHost = reference.host;
3237 targetPort = Uri._makePort(reference.hasPort ? reference.port : null, targetScheme); 2801 targetPort = Uri._makePort(reference.hasPort ? reference.port : null, targetScheme);
3238 targetPath = this[_removeDotSegments](reference.path); 2802 targetPath = this[_removeDotSegments](reference.path);
3239 if (reference.hasQuery) 2803 if (reference.hasQuery)
3240 targetQuery = reference.query; 2804 targetQuery = reference.query;
3241 } else { 2805 } else {
3242 if (reference.path == "") { 2806 if (reference.path == "") {
3243 targetPath = this[_path]; 2807 targetPath = this[_path];
3244 if (reference.hasQuery) { 2808 if (reference.hasQuery) {
3245 targetQuery = reference.query; 2809 targetQuery = reference.query;
3246 } else { 2810 } else {
3247 targetQuery = this[_query]; 2811 targetQuery = this[_query];
3248 } 2812 }
3249 } else { 2813 } else {
3250 if (reference.path.startsWith("/")) { 2814 if (reference.path[dartx.startsWith]("/")) {
3251 targetPath = this[_removeDotSegments](reference.path); 2815 targetPath = this[_removeDotSegments](reference.path);
3252 } else { 2816 } else {
3253 targetPath = this[_removeDotSegments](this[_merge](this[_path], re ference.path)); 2817 targetPath = this[_removeDotSegments](this[_merge](this[_path], re ference.path));
3254 } 2818 }
3255 if (reference.hasQuery) 2819 if (reference.hasQuery)
3256 targetQuery = reference.query; 2820 targetQuery = reference.query;
3257 } 2821 }
3258 targetUserInfo = this[_userInfo]; 2822 targetUserInfo = this[_userInfo];
3259 targetHost = this[_host]; 2823 targetHost = this[_host];
3260 targetPort = this[_port]; 2824 targetPort = this[_port];
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
3308 Uri._checkNonWindowsPathReservedCharacters(this.pathSegments, false); 2872 Uri._checkNonWindowsPathReservedCharacters(this.pathSegments, false);
3309 let result = new StringBuffer(); 2873 let result = new StringBuffer();
3310 if (this[_isPathAbsolute]) 2874 if (this[_isPathAbsolute])
3311 result.write("/"); 2875 result.write("/");
3312 result.writeAll(this.pathSegments, "/"); 2876 result.writeAll(this.pathSegments, "/");
3313 return dart.toString(result); 2877 return dart.toString(result);
3314 } 2878 }
3315 [_toWindowsFilePath]() { 2879 [_toWindowsFilePath]() {
3316 let hasDriveLetter = false; 2880 let hasDriveLetter = false;
3317 let segments = this.pathSegments; 2881 let segments = this.pathSegments;
3318 if (dart.notNull(segments[$length]) > 0 && segments[$get](0).length == 2 & & segments[$get](0).codeUnitAt(1) == Uri._COLON) { 2882 if (dart.notNull(segments.length) > 0 && segments[dartx.get](0).length == 2 && segments[dartx.get](0)[dartx.codeUnitAt](1) == Uri._COLON) {
3319 Uri._checkWindowsDriveLetter(segments[$get](0).codeUnitAt(0), false); 2883 Uri._checkWindowsDriveLetter(segments[dartx.get](0)[dartx.codeUnitAt](0) , false);
3320 Uri._checkWindowsPathReservedCharacters(segments, false, 1); 2884 Uri._checkWindowsPathReservedCharacters(segments, false, 1);
3321 hasDriveLetter = true; 2885 hasDriveLetter = true;
3322 } else { 2886 } else {
3323 Uri._checkWindowsPathReservedCharacters(segments, false); 2887 Uri._checkWindowsPathReservedCharacters(segments, false);
3324 } 2888 }
3325 let result = new StringBuffer(); 2889 let result = new StringBuffer();
3326 if (dart.notNull(this[_isPathAbsolute]) && !dart.notNull(hasDriveLetter)) 2890 if (dart.notNull(this[_isPathAbsolute]) && !dart.notNull(hasDriveLetter))
3327 result.write("\\"); 2891 result.write("\\");
3328 if (this.host != "") { 2892 if (this.host != "") {
3329 result.write("\\"); 2893 result.write("\\");
3330 result.write(this.host); 2894 result.write(this.host);
3331 result.write("\\"); 2895 result.write("\\");
3332 } 2896 }
3333 result.writeAll(segments, "\\"); 2897 result.writeAll(segments, "\\");
3334 if (dart.notNull(hasDriveLetter) && segments[$length] == 1) 2898 if (dart.notNull(hasDriveLetter) && segments.length == 1)
3335 result.write("\\"); 2899 result.write("\\");
3336 return dart.toString(result); 2900 return dart.toString(result);
3337 } 2901 }
3338 get [_isPathAbsolute]() { 2902 get [_isPathAbsolute]() {
3339 if (this.path == null || dart.notNull(this.path.isEmpty)) 2903 if (this.path == null || dart.notNull(this.path[dartx.isEmpty]))
3340 return false; 2904 return false;
3341 return this.path.startsWith('/'); 2905 return this.path[dartx.startsWith]('/');
3342 } 2906 }
3343 [_writeAuthority](ss) { 2907 [_writeAuthority](ss) {
3344 if (this[_userInfo].isNotEmpty) { 2908 if (this[_userInfo][dartx.isNotEmpty]) {
3345 ss.write(this[_userInfo]); 2909 ss.write(this[_userInfo]);
3346 ss.write("@"); 2910 ss.write("@");
3347 } 2911 }
3348 if (this[_host] != null) 2912 if (this[_host] != null)
3349 ss.write(this[_host]); 2913 ss.write(this[_host]);
3350 if (this[_port] != null) { 2914 if (this[_port] != null) {
3351 ss.write(":"); 2915 ss.write(":");
3352 ss.write(this[_port]); 2916 ss.write(this[_port]);
3353 } 2917 }
3354 } 2918 }
3355 toString() { 2919 toString() {
3356 let sb = new StringBuffer(); 2920 let sb = new StringBuffer();
3357 Uri._addIfNonEmpty(sb, this.scheme, this.scheme, ':'); 2921 Uri._addIfNonEmpty(sb, this.scheme, this.scheme, ':');
3358 if (dart.notNull(this.hasAuthority) || dart.notNull(this.path.startsWith(" //")) || this.scheme == "file") { 2922 if (dart.notNull(this.hasAuthority) || dart.notNull(this.path[dartx.starts With]("//")) || this.scheme == "file") {
3359 sb.write("//"); 2923 sb.write("//");
3360 this[_writeAuthority](sb); 2924 this[_writeAuthority](sb);
3361 } 2925 }
3362 sb.write(this.path); 2926 sb.write(this.path);
3363 if (this[_query] != null) { 2927 if (this[_query] != null) {
3364 sb.write("?"); 2928 sb.write("?");
3365 sb.write(this[_query]); 2929 sb.write(this[_query]);
3366 } 2930 }
3367 if (this[_fragment] != null) { 2931 if (this[_fragment] != null) {
3368 sb.write("#"); 2932 sb.write("#");
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
3404 return Uri._uriDecode(encodedComponent, {plusToSpace: true, encoding: enco ding}); 2968 return Uri._uriDecode(encodedComponent, {plusToSpace: true, encoding: enco ding});
3405 } 2969 }
3406 static encodeFull(uri) { 2970 static encodeFull(uri) {
3407 return Uri._uriEncode(dart.as(Uri._encodeFullTable, List$(int)), uri); 2971 return Uri._uriEncode(dart.as(Uri._encodeFullTable, List$(int)), uri);
3408 } 2972 }
3409 static decodeFull(uri) { 2973 static decodeFull(uri) {
3410 return Uri._uriDecode(uri); 2974 return Uri._uriDecode(uri);
3411 } 2975 }
3412 static splitQueryString(query, opts) { 2976 static splitQueryString(query, opts) {
3413 let encoding = opts && 'encoding' in opts ? opts.encoding : convert.UTF8; 2977 let encoding = opts && 'encoding' in opts ? opts.encoding : convert.UTF8;
3414 return dart.as(query.split("&")[$fold](dart.map(), dart.fn((map, element) => { 2978 return dart.as(query[dartx.split]("&")[dartx.fold](dart.map(), dart.fn((ma p, element) => {
3415 let index = dart.as(dart.dsend(element, 'indexOf', "="), int); 2979 let index = dart.as(dart.dsend(element, 'indexOf', "="), int);
3416 if (index == -1) { 2980 if (index == -1) {
3417 if (!dart.equals(element, "")) { 2981 if (!dart.equals(element, "")) {
3418 dart.dsetindex(map, Uri.decodeQueryComponent(dart.as(element, String ), {encoding: encoding}), ""); 2982 dart.dsetindex(map, Uri.decodeQueryComponent(dart.as(element, String ), {encoding: encoding}), "");
3419 } 2983 }
3420 } else if (index != 0) { 2984 } else if (index != 0) {
3421 let key = dart.dsend(element, 'substring', 0, index); 2985 let key = dart.dsend(element, 'substring', 0, index);
3422 let value = dart.dsend(element, 'substring', dart.notNull(index) + 1); 2986 let value = dart.dsend(element, 'substring', dart.notNull(index) + 1);
3423 dart.dsetindex(map, Uri.decodeQueryComponent(dart.as(key, String), {en coding: encoding}), Uri.decodeQueryComponent(dart.as(value, String), {encoding: encoding})); 2987 dart.dsetindex(map, Uri.decodeQueryComponent(dart.as(key, String), {en coding: encoding}), Uri.decodeQueryComponent(dart.as(value, String), {encoding: encoding}));
3424 } 2988 }
3425 return map; 2989 return map;
3426 })), Map$(String, String)); 2990 })), Map$(String, String));
3427 } 2991 }
3428 static parseIPv4Address(host) { 2992 static parseIPv4Address(host) {
3429 let error = msg => { 2993 let error = msg => {
3430 throw new FormatException(`Illegal IPv4 address, ${msg}`); 2994 throw new FormatException(`Illegal IPv4 address, ${msg}`);
3431 }; 2995 };
3432 dart.fn(error, dart.void, [String]); 2996 dart.fn(error, dart.void, [String]);
3433 let bytes = host.split('.'); 2997 let bytes = host[dartx.split]('.');
3434 if (bytes[$length] != 4) { 2998 if (bytes.length != 4) {
3435 error('IPv4 address should contain exactly 4 parts'); 2999 error('IPv4 address should contain exactly 4 parts');
3436 } 3000 }
3437 return dart.as(bytes[$map](dart.fn(byteString => { 3001 return dart.as(bytes[dartx.map](dart.fn(byteString => {
3438 let byte = int.parse(dart.as(byteString, String)); 3002 let byte = int.parse(dart.as(byteString, String));
3439 if (dart.notNull(byte) < 0 || dart.notNull(byte) > 255) { 3003 if (dart.notNull(byte) < 0 || dart.notNull(byte) > 255) {
3440 error('each part must be in the range of `0..255`'); 3004 error('each part must be in the range of `0..255`');
3441 } 3005 }
3442 return byte; 3006 return byte;
3443 }))[$toList](), List$(int)); 3007 }))[dartx.toList](), List$(int));
3444 } 3008 }
3445 static parseIPv6Address(host, start, end) { 3009 static parseIPv6Address(host, start, end) {
3446 if (start === void 0) 3010 if (start === void 0)
3447 start = 0; 3011 start = 0;
3448 if (end === void 0) 3012 if (end === void 0)
3449 end = null; 3013 end = null;
3450 if (end == null) 3014 if (end == null)
3451 end = host.length; 3015 end = host.length;
3452 let error = (msg, position) => { 3016 let error = (msg, position) => {
3453 if (position === void 0) 3017 if (position === void 0)
3454 position = null; 3018 position = null;
3455 throw new FormatException(`Illegal IPv6 address, ${msg}`, host, dart.as( position, int)); 3019 throw new FormatException(`Illegal IPv6 address, ${msg}`, host, dart.as( position, int));
3456 }; 3020 };
3457 dart.fn(error, dart.void, [String], [Object]); 3021 dart.fn(error, dart.void, [String], [Object]);
3458 let parseHex = (start, end) => { 3022 let parseHex = (start, end) => {
3459 if (dart.notNull(end) - dart.notNull(start) > 4) { 3023 if (dart.notNull(end) - dart.notNull(start) > 4) {
3460 error('an IPv6 part can only contain a maximum of 4 hex digits', start ); 3024 error('an IPv6 part can only contain a maximum of 4 hex digits', start );
3461 } 3025 }
3462 let value = int.parse(host.substring(start, end), {radix: 16}); 3026 let value = int.parse(host[dartx.substring](start, end), {radix: 16});
3463 if (dart.notNull(value) < 0 || dart.notNull(value) > (1 << 16) - 1) { 3027 if (dart.notNull(value) < 0 || dart.notNull(value) > (1 << 16) - 1) {
3464 error('each part must be in the range of `0x0..0xFFFF`', start); 3028 error('each part must be in the range of `0x0..0xFFFF`', start);
3465 } 3029 }
3466 return value; 3030 return value;
3467 }; 3031 };
3468 dart.fn(parseHex, int, [int, int]); 3032 dart.fn(parseHex, int, [int, int]);
3469 if (dart.notNull(host.length) < 2) 3033 if (dart.notNull(host.length) < 2)
3470 error('address is too short'); 3034 error('address is too short');
3471 let parts = dart.setType([], List$(int)); 3035 let parts = dart.list([], int);
3472 let wildcardSeen = false; 3036 let wildcardSeen = false;
3473 let partStart = start; 3037 let partStart = start;
3474 for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNull( i) + 1) { 3038 for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNull( i) + 1) {
3475 if (host.codeUnitAt(i) == Uri._COLON) { 3039 if (host[dartx.codeUnitAt](i) == Uri._COLON) {
3476 if (i == start) { 3040 if (i == start) {
3477 i = dart.notNull(i) + 1; 3041 i = dart.notNull(i) + 1;
3478 if (host.codeUnitAt(i) != Uri._COLON) { 3042 if (host[dartx.codeUnitAt](i) != Uri._COLON) {
3479 error('invalid start colon.', i); 3043 error('invalid start colon.', i);
3480 } 3044 }
3481 partStart = i; 3045 partStart = i;
3482 } 3046 }
3483 if (i == partStart) { 3047 if (i == partStart) {
3484 if (wildcardSeen) { 3048 if (wildcardSeen) {
3485 error('only one wildcard `::` is allowed', i); 3049 error('only one wildcard `::` is allowed', i);
3486 } 3050 }
3487 wildcardSeen = true; 3051 wildcardSeen = true;
3488 parts[$add](-1); 3052 parts[dartx.add](-1);
3489 } else { 3053 } else {
3490 parts[$add](parseHex(partStart, i)); 3054 parts[dartx.add](parseHex(partStart, i));
3491 } 3055 }
3492 partStart = dart.notNull(i) + 1; 3056 partStart = dart.notNull(i) + 1;
3493 } 3057 }
3494 } 3058 }
3495 if (parts[$length] == 0) 3059 if (parts.length == 0)
3496 error('too few parts'); 3060 error('too few parts');
3497 let atEnd = partStart == end; 3061 let atEnd = partStart == end;
3498 let isLastWildcard = parts[$last] == -1; 3062 let isLastWildcard = parts[dartx.last] == -1;
3499 if (dart.notNull(atEnd) && !dart.notNull(isLastWildcard)) { 3063 if (dart.notNull(atEnd) && !dart.notNull(isLastWildcard)) {
3500 error('expected a part after last `:`', end); 3064 error('expected a part after last `:`', end);
3501 } 3065 }
3502 if (!dart.notNull(atEnd)) { 3066 if (!dart.notNull(atEnd)) {
3503 try { 3067 try {
3504 parts[$add](parseHex(partStart, end)); 3068 parts[dartx.add](parseHex(partStart, end));
3505 } catch (e) { 3069 } catch (e) {
3506 try { 3070 try {
3507 let last = Uri.parseIPv4Address(host.substring(partStart, end)); 3071 let last = Uri.parseIPv4Address(host[dartx.substring](partStart, end ));
3508 parts[$add](dart.notNull(last[$get](0)) << 8 | dart.notNull(last[$ge t](1))); 3072 parts[dartx.add](dart.notNull(last[dartx.get](0)) << 8 | dart.notNul l(last[dartx.get](1)));
3509 parts[$add](dart.notNull(last[$get](2)) << 8 | dart.notNull(last[$ge t](3))); 3073 parts[dartx.add](dart.notNull(last[dartx.get](2)) << 8 | dart.notNul l(last[dartx.get](3)));
3510 } catch (e) { 3074 } catch (e) {
3511 error('invalid end of IPv6 address.', partStart); 3075 error('invalid end of IPv6 address.', partStart);
3512 } 3076 }
3513 3077
3514 } 3078 }
3515 3079
3516 } 3080 }
3517 if (wildcardSeen) { 3081 if (wildcardSeen) {
3518 if (dart.notNull(parts[$length]) > 7) { 3082 if (dart.notNull(parts.length) > 7) {
3519 error('an address with a wildcard must have less than 7 parts'); 3083 error('an address with a wildcard must have less than 7 parts');
3520 } 3084 }
3521 } else if (parts[$length] != 8) { 3085 } else if (parts.length != 8) {
3522 error('an address without a wildcard must contain exactly 8 parts'); 3086 error('an address without a wildcard must contain exactly 8 parts');
3523 } 3087 }
3524 let bytes = List$(int).new(16); 3088 let bytes = List$(int).new(16);
3525 for (let i = 0, index = 0; dart.notNull(i) < dart.notNull(parts[$length]); i = dart.notNull(i) + 1) { 3089 for (let i = 0, index = 0; dart.notNull(i) < dart.notNull(parts.length); i = dart.notNull(i) + 1) {
3526 let value = parts[$get](i); 3090 let value = parts[dartx.get](i);
3527 if (value == -1) { 3091 if (value == -1) {
3528 let wildCardLength = 9 - dart.notNull(parts[$length]); 3092 let wildCardLength = 9 - dart.notNull(parts.length);
3529 for (let j = 0; dart.notNull(j) < dart.notNull(wildCardLength); j = da rt.notNull(j) + 1) { 3093 for (let j = 0; dart.notNull(j) < dart.notNull(wildCardLength); j = da rt.notNull(j) + 1) {
3530 bytes[$set](index, 0); 3094 bytes[dartx.set](index, 0);
3531 bytes[$set](dart.notNull(index) + 1, 0); 3095 bytes[dartx.set](dart.notNull(index) + 1, 0);
3532 index = dart.notNull(index) + 2; 3096 index = dart.notNull(index) + 2;
3533 } 3097 }
3534 } else { 3098 } else {
3535 bytes[$set](index, dart.notNull(value) >> 8); 3099 bytes[dartx.set](index, dart.notNull(value) >> 8);
3536 bytes[$set](dart.notNull(index) + 1, dart.notNull(value) & 255); 3100 bytes[dartx.set](dart.notNull(index) + 1, dart.notNull(value) & 255);
3537 index = dart.notNull(index) + 2; 3101 index = dart.notNull(index) + 2;
3538 } 3102 }
3539 } 3103 }
3540 return dart.as(bytes, List$(int)); 3104 return dart.as(bytes, List$(int));
3541 } 3105 }
3542 static _uriEncode(canonicalTable, text, opts) { 3106 static _uriEncode(canonicalTable, text, opts) {
3543 let encoding = opts && 'encoding' in opts ? opts.encoding : convert.UTF8; 3107 let encoding = opts && 'encoding' in opts ? opts.encoding : convert.UTF8;
3544 let spaceToPlus = opts && 'spaceToPlus' in opts ? opts.spaceToPlus : false ; 3108 let spaceToPlus = opts && 'spaceToPlus' in opts ? opts.spaceToPlus : false ;
3545 let byteToHex = (byte, buffer) => { 3109 let byteToHex = (byte, buffer) => {
3546 let hex = '0123456789ABCDEF'; 3110 let hex = '0123456789ABCDEF';
3547 dart.dsend(buffer, 'writeCharCode', hex.codeUnitAt(dart.as(dart.dsend(by te, '>>', 4), int))); 3111 dart.dsend(buffer, 'writeCharCode', hex[dartx.codeUnitAt](dart.as(dart.d send(byte, '>>', 4), int)));
3548 dart.dsend(buffer, 'writeCharCode', hex.codeUnitAt(dart.as(dart.dsend(by te, '&', 15), int))); 3112 dart.dsend(buffer, 'writeCharCode', hex[dartx.codeUnitAt](dart.as(dart.d send(byte, '&', 15), int)));
3549 }; 3113 };
3550 dart.fn(byteToHex); 3114 dart.fn(byteToHex);
3551 let result = new StringBuffer(); 3115 let result = new StringBuffer();
3552 let bytes = encoding.encode(text); 3116 let bytes = encoding.encode(text);
3553 for (let i = 0; dart.notNull(i) < dart.notNull(bytes[$length]); i = dart.n otNull(i) + 1) { 3117 for (let i = 0; dart.notNull(i) < dart.notNull(bytes.length); i = dart.not Null(i) + 1) {
3554 let byte = bytes[$get](i); 3118 let byte = bytes[dartx.get](i);
3555 if (dart.notNull(byte) < 128 && (dart.notNull(canonicalTable[$get](dart. notNull(byte) >> 4)) & 1 << (dart.notNull(byte) & 15)) != 0) { 3119 if (dart.notNull(byte) < 128 && (dart.notNull(canonicalTable[dartx.get]( dart.notNull(byte) >> 4)) & 1 << (dart.notNull(byte) & 15)) != 0) {
3556 result.writeCharCode(byte); 3120 result.writeCharCode(byte);
3557 } else if (dart.notNull(spaceToPlus) && byte == Uri._SPACE) { 3121 } else if (dart.notNull(spaceToPlus) && byte == Uri._SPACE) {
3558 result.writeCharCode(Uri._PLUS); 3122 result.writeCharCode(Uri._PLUS);
3559 } else { 3123 } else {
3560 result.writeCharCode(Uri._PERCENT); 3124 result.writeCharCode(Uri._PERCENT);
3561 byteToHex(byte, result); 3125 byteToHex(byte, result);
3562 } 3126 }
3563 } 3127 }
3564 return dart.toString(result); 3128 return dart.toString(result);
3565 } 3129 }
3566 static _hexCharPairToByte(s, pos) { 3130 static _hexCharPairToByte(s, pos) {
3567 let byte = 0; 3131 let byte = 0;
3568 for (let i = 0; dart.notNull(i) < 2; i = dart.notNull(i) + 1) { 3132 for (let i = 0; dart.notNull(i) < 2; i = dart.notNull(i) + 1) {
3569 let charCode = s.codeUnitAt(dart.notNull(pos) + dart.notNull(i)); 3133 let charCode = s[dartx.codeUnitAt](dart.notNull(pos) + dart.notNull(i));
3570 if (48 <= dart.notNull(charCode) && dart.notNull(charCode) <= 57) { 3134 if (48 <= dart.notNull(charCode) && dart.notNull(charCode) <= 57) {
3571 byte = dart.notNull(byte) * 16 + dart.notNull(charCode) - 48; 3135 byte = dart.notNull(byte) * 16 + dart.notNull(charCode) - 48;
3572 } else { 3136 } else {
3573 charCode = dart.notNull(charCode) | 32; 3137 charCode = dart.notNull(charCode) | 32;
3574 if (97 <= dart.notNull(charCode) && dart.notNull(charCode) <= 102) { 3138 if (97 <= dart.notNull(charCode) && dart.notNull(charCode) <= 102) {
3575 byte = dart.notNull(byte) * 16 + dart.notNull(charCode) - 87; 3139 byte = dart.notNull(byte) * 16 + dart.notNull(charCode) - 87;
3576 } else { 3140 } else {
3577 throw new ArgumentError("Invalid URL encoding"); 3141 throw new ArgumentError("Invalid URL encoding");
3578 } 3142 }
3579 } 3143 }
3580 } 3144 }
3581 return byte; 3145 return byte;
3582 } 3146 }
3583 static _uriDecode(text, opts) { 3147 static _uriDecode(text, opts) {
3584 let plusToSpace = opts && 'plusToSpace' in opts ? opts.plusToSpace : false ; 3148 let plusToSpace = opts && 'plusToSpace' in opts ? opts.plusToSpace : false ;
3585 let encoding = opts && 'encoding' in opts ? opts.encoding : convert.UTF8; 3149 let encoding = opts && 'encoding' in opts ? opts.encoding : convert.UTF8;
3586 let simple = true; 3150 let simple = true;
3587 for (let i = 0; dart.notNull(i) < dart.notNull(text.length) && dart.notNul l(simple); i = dart.notNull(i) + 1) { 3151 for (let i = 0; dart.notNull(i) < dart.notNull(text.length) && dart.notNul l(simple); i = dart.notNull(i) + 1) {
3588 let codeUnit = text.codeUnitAt(i); 3152 let codeUnit = text[dartx.codeUnitAt](i);
3589 simple = codeUnit != Uri._PERCENT && codeUnit != Uri._PLUS; 3153 simple = codeUnit != Uri._PERCENT && codeUnit != Uri._PLUS;
3590 } 3154 }
3591 let bytes = null; 3155 let bytes = null;
3592 if (simple) { 3156 if (simple) {
3593 if (dart.notNull(dart.equals(encoding, convert.UTF8)) || dart.notNull(da rt.equals(encoding, convert.LATIN1))) { 3157 if (dart.notNull(dart.equals(encoding, convert.UTF8)) || dart.notNull(da rt.equals(encoding, convert.LATIN1))) {
3594 return text; 3158 return text;
3595 } else { 3159 } else {
3596 bytes = text.codeUnits; 3160 bytes = text[dartx.codeUnits];
3597 } 3161 }
3598 } else { 3162 } else {
3599 bytes = List$(int).new(); 3163 bytes = List$(int).new();
3600 for (let i = 0; dart.notNull(i) < dart.notNull(text.length); i = dart.no tNull(i) + 1) { 3164 for (let i = 0; dart.notNull(i) < dart.notNull(text.length); i = dart.no tNull(i) + 1) {
3601 let codeUnit = text.codeUnitAt(i); 3165 let codeUnit = text[dartx.codeUnitAt](i);
3602 if (dart.notNull(codeUnit) > 127) { 3166 if (dart.notNull(codeUnit) > 127) {
3603 throw new ArgumentError("Illegal percent encoding in URI"); 3167 throw new ArgumentError("Illegal percent encoding in URI");
3604 } 3168 }
3605 if (codeUnit == Uri._PERCENT) { 3169 if (codeUnit == Uri._PERCENT) {
3606 if (dart.notNull(i) + 3 > dart.notNull(text.length)) { 3170 if (dart.notNull(i) + 3 > dart.notNull(text.length)) {
3607 throw new ArgumentError('Truncated URI'); 3171 throw new ArgumentError('Truncated URI');
3608 } 3172 }
3609 bytes[$add](Uri._hexCharPairToByte(text, dart.notNull(i) + 1)); 3173 bytes[dartx.add](Uri._hexCharPairToByte(text, dart.notNull(i) + 1));
3610 i = dart.notNull(i) + 2; 3174 i = dart.notNull(i) + 2;
3611 } else if (dart.notNull(plusToSpace) && codeUnit == Uri._PLUS) { 3175 } else if (dart.notNull(plusToSpace) && codeUnit == Uri._PLUS) {
3612 bytes[$add](Uri._SPACE); 3176 bytes[dartx.add](Uri._SPACE);
3613 } else { 3177 } else {
3614 bytes[$add](codeUnit); 3178 bytes[dartx.add](codeUnit);
3615 } 3179 }
3616 } 3180 }
3617 } 3181 }
3618 return encoding.decode(bytes); 3182 return encoding.decode(bytes);
3619 } 3183 }
3620 static _isAlphabeticCharacter(codeUnit) { 3184 static _isAlphabeticCharacter(codeUnit) {
3621 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); 3185 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);
3622 } 3186 }
3623 } 3187 }
3624 dart.defineNamedConstructor(Uri, '_internal'); 3188 dart.defineNamedConstructor(Uri, '_internal');
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
3721 Uri._genDelimitersTable = dart.const([0, 0, 32776, 33792, 1, 10240, 0, 0]); 3285 Uri._genDelimitersTable = dart.const([0, 0, 32776, 33792, 1, 10240, 0, 0]);
3722 Uri._userinfoTable = dart.const([0, 0, 32722, 12287, 65534, 34815, 65534, 1843 1]); 3286 Uri._userinfoTable = dart.const([0, 0, 32722, 12287, 65534, 34815, 65534, 1843 1]);
3723 Uri._regNameTable = dart.const([0, 0, 32754, 11263, 65534, 34815, 65534, 18431 ]); 3287 Uri._regNameTable = dart.const([0, 0, 32754, 11263, 65534, 34815, 65534, 18431 ]);
3724 Uri._pathCharTable = dart.const([0, 0, 32722, 12287, 65535, 34815, 65534, 1843 1]); 3288 Uri._pathCharTable = dart.const([0, 0, 32722, 12287, 65535, 34815, 65534, 1843 1]);
3725 Uri._pathCharOrSlashTable = dart.const([0, 0, 65490, 12287, 65535, 34815, 6553 4, 18431]); 3289 Uri._pathCharOrSlashTable = dart.const([0, 0, 65490, 12287, 65535, 34815, 6553 4, 18431]);
3726 Uri._queryCharTable = dart.const([0, 0, 65490, 45055, 65535, 34815, 65534, 184 31]); 3290 Uri._queryCharTable = dart.const([0, 0, 65490, 45055, 65535, 34815, 65534, 184 31]);
3727 function _symbolToString(symbol) { 3291 function _symbolToString(symbol) {
3728 return _internal.Symbol.getName(dart.as(symbol, _internal.Symbol)); 3292 return _internal.Symbol.getName(dart.as(symbol, _internal.Symbol));
3729 } 3293 }
3730 dart.fn(_symbolToString, String, [Symbol]); 3294 dart.fn(_symbolToString, String, [Symbol]);
3731 function _symbolMapToStringMap(map) {
3732 if (map == null)
3733 return null;
3734 let result = Map$(String, Object).new();
3735 map.forEach(dart.fn((key, value) => {
3736 result.set(_symbolToString(key), value);
3737 }, Object, [Symbol, Object]));
3738 return result;
3739 }
3740 dart.fn(_symbolMapToStringMap, Object, [Map$(Symbol, Object)]);
3741 class SupportJsExtensionMethods extends Object {
3742 SupportJsExtensionMethods() {
3743 }
3744 }
3745 dart.setSignature(SupportJsExtensionMethods, {
3746 constructors: () => ({SupportJsExtensionMethods: [SupportJsExtensionMethods, []]})
3747 });
3748 class _ListConstructorSentinel extends Object {
3749 _ListConstructorSentinel() {
3750 }
3751 }
3752 dart.setSignature(_ListConstructorSentinel, {
3753 constructors: () => ({_ListConstructorSentinel: [_ListConstructorSentinel, [ ]]})
3754 });
3755 // Exports: 3295 // Exports:
3756 exports.Object = Object; 3296 exports.Object = Object;
3757 exports.JsName = JsName;
3758 exports.JsPeerInterface = JsPeerInterface;
3759 exports.SupportJsExtensionMethod = SupportJsExtensionMethod;
3760 exports.Deprecated = Deprecated; 3297 exports.Deprecated = Deprecated;
3761 exports.deprecated = deprecated; 3298 exports.deprecated = deprecated;
3762 exports.override = override; 3299 exports.override = override;
3763 exports.proxy = proxy; 3300 exports.proxy = proxy;
3764 exports.bool = bool; 3301 exports.bool = bool;
3765 exports.Comparator$ = Comparator$; 3302 exports.Comparator$ = Comparator$;
3766 exports.Comparator = Comparator; 3303 exports.Comparator = Comparator;
3767 exports.Comparable$ = Comparable$; 3304 exports.Comparable$ = Comparable$;
3768 exports.Comparable = Comparable; 3305 exports.Comparable = Comparable;
3769 exports.DateTime = DateTime; 3306 exports.DateTime = DateTime;
3770 exports.num = num; 3307 exports.num = num;
3771 exports.double = double; 3308 exports.double = double;
3772 exports.Duration = Duration; 3309 exports.Duration = Duration;
3773 exports.Error = Error; 3310 exports.Error = Error;
3774 exports.AssertionError = AssertionError; 3311 exports.AssertionError = AssertionError;
3775 exports.TypeError = TypeError; 3312 exports.TypeError = TypeError;
3776 exports.CastError = CastError; 3313 exports.CastError = CastError;
3777 exports.NullThrownError = NullThrownError; 3314 exports.NullThrownError = NullThrownError;
3778 exports.ArgumentError = ArgumentError; 3315 exports.ArgumentError = ArgumentError;
3779 exports.RangeError = RangeError; 3316 exports.RangeError = RangeError;
3780 exports.IndexError = IndexError; 3317 exports.IndexError = IndexError;
3781 exports.FallThroughError = FallThroughError; 3318 exports.FallThroughError = FallThroughError;
3782 exports.AbstractClassInstantiationError = AbstractClassInstantiationError; 3319 exports.AbstractClassInstantiationError = AbstractClassInstantiationError;
3783 exports.$length = $length;
3784 exports.$get = $get;
3785 exports.NoSuchMethodError = NoSuchMethodError; 3320 exports.NoSuchMethodError = NoSuchMethodError;
3786 exports.UnsupportedError = UnsupportedError; 3321 exports.UnsupportedError = UnsupportedError;
3787 exports.UnimplementedError = UnimplementedError; 3322 exports.UnimplementedError = UnimplementedError;
3788 exports.StateError = StateError; 3323 exports.StateError = StateError;
3789 exports.ConcurrentModificationError = ConcurrentModificationError; 3324 exports.ConcurrentModificationError = ConcurrentModificationError;
3790 exports.OutOfMemoryError = OutOfMemoryError; 3325 exports.OutOfMemoryError = OutOfMemoryError;
3791 exports.StackOverflowError = StackOverflowError; 3326 exports.StackOverflowError = StackOverflowError;
3792 exports.CyclicInitializationError = CyclicInitializationError; 3327 exports.CyclicInitializationError = CyclicInitializationError;
3793 exports.Exception = Exception; 3328 exports.Exception = Exception;
3794 exports.FormatException = FormatException; 3329 exports.FormatException = FormatException;
3795 exports.IntegerDivisionByZeroException = IntegerDivisionByZeroException; 3330 exports.IntegerDivisionByZeroException = IntegerDivisionByZeroException;
3796 exports.Expando$ = Expando$; 3331 exports.Expando$ = Expando$;
3797 exports.Expando = Expando; 3332 exports.Expando = Expando;
3798 exports.Function = Function; 3333 exports.Function = Function;
3799 exports.identical = identical; 3334 exports.identical = identical;
3800 exports.identityHashCode = identityHashCode; 3335 exports.identityHashCode = identityHashCode;
3801 exports.int = int; 3336 exports.int = int;
3802 exports.Invocation = Invocation; 3337 exports.Invocation = Invocation;
3803 exports.$iterator = $iterator;
3804 exports.$join = $join;
3805 exports.Iterable$ = Iterable$; 3338 exports.Iterable$ = Iterable$;
3806 exports.Iterable = Iterable; 3339 exports.Iterable = Iterable;
3807 exports.$skip = $skip;
3808 exports.$take = $take;
3809 exports.BidirectionalIterator$ = BidirectionalIterator$; 3340 exports.BidirectionalIterator$ = BidirectionalIterator$;
3810 exports.BidirectionalIterator = BidirectionalIterator; 3341 exports.BidirectionalIterator = BidirectionalIterator;
3811 exports.Iterator$ = Iterator$; 3342 exports.Iterator$ = Iterator$;
3812 exports.Iterator = Iterator; 3343 exports.Iterator = Iterator;
3813 exports.$set = $set;
3814 exports.$add = $add;
3815 exports.$checkMutable = $checkMutable;
3816 exports.$checkGrowable = $checkGrowable;
3817 exports.$where = $where;
3818 exports.$expand = $expand;
3819 exports.$forEach = $forEach;
3820 exports.$map = $map;
3821 exports.$takeWhile = $takeWhile;
3822 exports.$skipWhile = $skipWhile;
3823 exports.$reduce = $reduce;
3824 exports.$fold = $fold;
3825 exports.$firstWhere = $firstWhere;
3826 exports.$lastWhere = $lastWhere;
3827 exports.$singleWhere = $singleWhere;
3828 exports.$elementAt = $elementAt;
3829 exports.$first = $first;
3830 exports.$last = $last;
3831 exports.$single = $single;
3832 exports.$any = $any;
3833 exports.$every = $every;
3834 exports.$contains = $contains;
3835 exports.$isEmpty = $isEmpty;
3836 exports.$isNotEmpty = $isNotEmpty;
3837 exports.$toString = $toString;
3838 exports.$toList = $toList;
3839 exports.$toSet = $toSet;
3840 exports.$hashCode = $hashCode;
3841 exports.$addAll = $addAll;
3842 exports.$reversed = $reversed;
3843 exports.$sort = $sort;
3844 exports.$shuffle = $shuffle;
3845 exports.$indexOf = $indexOf;
3846 exports.$lastIndexOf = $lastIndexOf;
3847 exports.$clear = $clear;
3848 exports.$insert = $insert;
3849 exports.$insertAll = $insertAll;
3850 exports.$setAll = $setAll;
3851 exports.$remove = $remove;
3852 exports.$removeAt = $removeAt;
3853 exports.$removeLast = $removeLast;
3854 exports.$removeWhere = $removeWhere;
3855 exports.$retainWhere = $retainWhere;
3856 exports.$sublist = $sublist;
3857 exports.$getRange = $getRange;
3858 exports.$setRange = $setRange;
3859 exports.$removeRange = $removeRange;
3860 exports.$fillRange = $fillRange;
3861 exports.$replaceRange = $replaceRange;
3862 exports.$asMap = $asMap;
3863 exports.List$ = List$; 3344 exports.List$ = List$;
3864 exports.List = List; 3345 exports.List = List;
3865 exports.Map$ = Map$; 3346 exports.Map$ = Map$;
3866 exports.Map = Map; 3347 exports.Map = Map;
3867 exports.Null = Null; 3348 exports.Null = Null;
3868 exports.Pattern = Pattern; 3349 exports.Pattern = Pattern;
3869 exports.print = print; 3350 exports.print = print;
3870 exports.Match = Match; 3351 exports.Match = Match;
3871 exports.RegExp = RegExp; 3352 exports.RegExp = RegExp;
3872 exports.Set$ = Set$; 3353 exports.Set$ = Set$;
3873 exports.Sink$ = Sink$; 3354 exports.Sink$ = Sink$;
3874 exports.Sink = Sink; 3355 exports.Sink = Sink;
3875 exports.StackTrace = StackTrace; 3356 exports.StackTrace = StackTrace;
3876 exports.Stopwatch = Stopwatch; 3357 exports.Stopwatch = Stopwatch;
3877 exports.String = String; 3358 exports.String = String;
3878 exports.RuneIterator = RuneIterator; 3359 exports.RuneIterator = RuneIterator;
3879 exports.StringBuffer = StringBuffer; 3360 exports.StringBuffer = StringBuffer;
3880 exports.StringSink = StringSink; 3361 exports.StringSink = StringSink;
3881 exports.Symbol = Symbol; 3362 exports.Symbol = Symbol;
3882 exports.Type = Type; 3363 exports.Type = Type;
3883 exports.Uri = Uri; 3364 exports.Uri = Uri;
3884 exports.SupportJsExtensionMethods = SupportJsExtensionMethods; 3365 })(core, _js_helper, _internal, collection, _interceptors, convert);
3885 })(core, _js_helper, _internal, collection, _interceptors, math, convert);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698