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

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

Issue 1059583002: Extension method support to move us closer to a valid List implementation. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: done Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/runtime/dart/_isolate_helper.js ('k') | lib/runtime/dart/_native_typed_data.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 var _js_helper; 1 var _js_helper;
2 (function(exports) { 2 (function(exports) {
3 'use strict'; 3 'use strict';
4 class NoSideEffects extends core.Object { 4 class NoSideEffects extends core.Object {
5 NoSideEffects() { 5 NoSideEffects() {
6 } 6 }
7 } 7 }
8 class NoThrows extends core.Object { 8 class NoThrows extends core.Object {
9 NoThrows() { 9 NoThrows() {
10 } 10 }
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 let _fetch = Symbol('_fetch'); 67 let _fetch = Symbol('_fetch');
68 let ConstantStringMap$ = dart.generic(function(K, V) { 68 let ConstantStringMap$ = dart.generic(function(K, V) {
69 class ConstantStringMap extends ConstantMap$(K, V) { 69 class ConstantStringMap extends ConstantMap$(K, V) {
70 [_$](length, jsObject$, keys$) { 70 [_$](length, jsObject$, keys$) {
71 this.length = length; 71 this.length = length;
72 this[_jsObject] = jsObject$; 72 this[_jsObject] = jsObject$;
73 this[_keys] = keys$; 73 this[_keys] = keys$;
74 super[_$](); 74 super[_$]();
75 } 75 }
76 containsValue(needle) { 76 containsValue(needle) {
77 return this.values.any((value) => dart.equals(value, needle)); 77 return this.values[core.$any]((value) => dart.equals(value, needle));
78 } 78 }
79 containsKey(key) { 79 containsKey(key) {
80 if (!(typeof key == 'string')) 80 if (!(typeof key == 'string'))
81 return false; 81 return false;
82 if (dart.equals('__proto__', key)) 82 if (dart.equals('__proto__', key))
83 return false; 83 return false;
84 return jsHasOwnProperty(this[_jsObject], dart.as(key, core.String)); 84 return jsHasOwnProperty(this[_jsObject], dart.as(key, core.String));
85 } 85 }
86 get(key) { 86 get(key) {
87 if (!dart.notNull(this.containsKey(key))) 87 if (!dart.notNull(this.containsKey(key)))
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 return ConstantProtoMap; 132 return ConstantProtoMap;
133 }); 133 });
134 let ConstantProtoMap = ConstantProtoMap$(dart.dynamic, dart.dynamic); 134 let ConstantProtoMap = ConstantProtoMap$(dart.dynamic, dart.dynamic);
135 let _map = Symbol('_map'); 135 let _map = Symbol('_map');
136 let _ConstantMapKeyIterable$ = dart.generic(function(K) { 136 let _ConstantMapKeyIterable$ = dart.generic(function(K) {
137 class _ConstantMapKeyIterable extends collection.IterableBase$(K) { 137 class _ConstantMapKeyIterable extends collection.IterableBase$(K) {
138 _ConstantMapKeyIterable(map$) { 138 _ConstantMapKeyIterable(map$) {
139 this[_map] = map$; 139 this[_map] = map$;
140 super.IterableBase(); 140 super.IterableBase();
141 } 141 }
142 get iterator() { 142 get [core.$iterator]() {
143 return this[_map][_keys].iterator; 143 return this[_map][_keys][core.$iterator];
144 } 144 }
145 get length() { 145 get [core.$length]() {
146 return this[_map][_keys].length; 146 return this[_map][_keys][core.$length];
147 } 147 }
148 } 148 }
149 return _ConstantMapKeyIterable; 149 return _ConstantMapKeyIterable;
150 }); 150 });
151 let _ConstantMapKeyIterable = _ConstantMapKeyIterable$(dart.dynamic); 151 let _ConstantMapKeyIterable = _ConstantMapKeyIterable$(dart.dynamic);
152 let _jsData = Symbol('_jsData'); 152 let _jsData = Symbol('_jsData');
153 let _getMap = Symbol('_getMap'); 153 let _getMap = Symbol('_getMap');
154 let GeneralConstantMap$ = dart.generic(function(K, V) { 154 let GeneralConstantMap$ = dart.generic(function(K, V) {
155 class GeneralConstantMap extends ConstantMap$(K, V) { 155 class GeneralConstantMap extends ConstantMap$(K, V) {
156 GeneralConstantMap(jsData) { 156 GeneralConstantMap(jsData) {
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 if (match == null) 551 if (match == null)
552 return null; 552 return null;
553 return new _MatchImplementation(this, dart.as(match, core.List$(core.Strin g))); 553 return new _MatchImplementation(this, dart.as(match, core.List$(core.Strin g)));
554 } 554 }
555 [_execAnchored](string, start) { 555 [_execAnchored](string, start) {
556 let regexp = this[_nativeAnchoredVersion]; 556 let regexp = this[_nativeAnchoredVersion];
557 regexp.lastIndex = start; 557 regexp.lastIndex = start;
558 let match = dart.as(regexp.exec(string), core.List); 558 let match = dart.as(regexp.exec(string), core.List);
559 if (match == null) 559 if (match == null)
560 return null; 560 return null;
561 if (match.get(dart.notNull(match.length) - 1) != null) 561 if (match[core.$get](dart.notNull(match[core.$length]) - 1) != null)
562 return null; 562 return null;
563 match.length = 1; 563 match[core.$length] = 1;
564 return new _MatchImplementation(this, dart.as(match, core.List$(core.Strin g))); 564 return new _MatchImplementation(this, dart.as(match, core.List$(core.Strin g)));
565 } 565 }
566 matchAsPrefix(string, start) { 566 matchAsPrefix(string, start) {
567 if (start === void 0) 567 if (start === void 0)
568 start = 0; 568 start = 0;
569 if (dart.notNull(start) < 0 || dart.notNull(start) > dart.notNull(string.l ength)) { 569 if (dart.notNull(start) < 0 || dart.notNull(start) > dart.notNull(string.l ength)) {
570 throw new core.RangeError.range(start, 0, string.length); 570 throw new core.RangeError.range(start, 0, string.length);
571 } 571 }
572 return this[_execAnchored](string, start); 572 return this[_execAnchored](string, start);
573 } 573 }
(...skipping 13 matching lines...) Expand all
587 dart.assert(typeof this[_match].input == 'string'); 587 dart.assert(typeof this[_match].input == 'string');
588 dart.assert(typeof this[_match].index == 'number'); 588 dart.assert(typeof this[_match].index == 'number');
589 } 589 }
590 get input() { 590 get input() {
591 return this[_match].input; 591 return this[_match].input;
592 } 592 }
593 get start() { 593 get start() {
594 return this[_match].index; 594 return this[_match].index;
595 } 595 }
596 get end() { 596 get end() {
597 return dart.notNull(this.start) + dart.notNull(this[_match].get(0).length) ; 597 return dart.notNull(this.start) + dart.notNull(this[_match][core.$get](0). length);
598 } 598 }
599 group(index) { 599 group(index) {
600 return this[_match].get(index); 600 return this[_match][core.$get](index);
601 } 601 }
602 get(index) { 602 get(index) {
603 return this.group(index); 603 return this.group(index);
604 } 604 }
605 get groupCount() { 605 get groupCount() {
606 return dart.notNull(this[_match].length) - 1; 606 return dart.notNull(this[_match][core.$length]) - 1;
607 } 607 }
608 groups(groups) { 608 groups(groups) {
609 let out = dart.as(new core.List.from([]), core.List$(core.String)); 609 let out = dart.as(new core.List.from([]), core.List$(core.String));
610 for (let i of groups) { 610 for (let i of groups) {
611 out.add(this.group(i)); 611 out[core.$add](this.group(i));
612 } 612 }
613 return out; 613 return out;
614 } 614 }
615 } 615 }
616 _MatchImplementation[dart.implements] = () => [core.Match]; 616 _MatchImplementation[dart.implements] = () => [core.Match];
617 let _re = Symbol('_re'); 617 let _re = Symbol('_re');
618 let _string = Symbol('_string'); 618 let _string = Symbol('_string');
619 let _start = Symbol('_start'); 619 let _start = Symbol('_start');
620 class _AllMatchesIterable extends collection.IterableBase$(core.Match) { 620 class _AllMatchesIterable extends collection.IterableBase$(core.Match) {
621 _AllMatchesIterable(re$, string$, start$) { 621 _AllMatchesIterable(re$, string$, start$) {
622 this[_re] = re$; 622 this[_re] = re$;
623 this[_string] = string$; 623 this[_string] = string$;
624 this[_start] = start$; 624 this[_start] = start$;
625 super.IterableBase(); 625 super.IterableBase();
626 } 626 }
627 get iterator() { 627 get [core.$iterator]() {
628 return new _AllMatchesIterator(this[_re], this[_string], this[_start]); 628 return new _AllMatchesIterator(this[_re], this[_string], this[_start]);
629 } 629 }
630 } 630 }
631 let _regExp = Symbol('_regExp'); 631 let _regExp = Symbol('_regExp');
632 let _nextIndex = Symbol('_nextIndex'); 632 let _nextIndex = Symbol('_nextIndex');
633 let _current = Symbol('_current'); 633 let _current = Symbol('_current');
634 class _AllMatchesIterator extends core.Object { 634 class _AllMatchesIterator extends core.Object {
635 _AllMatchesIterator(regExp$, string$, nextIndex$) { 635 _AllMatchesIterator(regExp$, string$, nextIndex$) {
636 this[_regExp] = regExp$; 636 this[_regExp] = regExp$;
637 this[_string] = string$; 637 this[_string] = string$;
638 this[_nextIndex] = nextIndex$; 638 this[_nextIndex] = nextIndex$;
639 this[_current] = null; 639 this[_current] = null;
640 } 640 }
641 get current() { 641 get current() {
642 return this[_current]; 642 return this[_current];
643 } 643 }
644 moveNext() { 644 moveNext() {
645 if (this[_string] == null) 645 if (this[_string] == null)
646 return false; 646 return false;
647 if (dart.notNull(this[_nextIndex]) <= dart.notNull(this[_string].length)) { 647 if (dart.notNull(this[_nextIndex]) <= dart.notNull(this[_string].length)) {
648 let match = this[_regExp]._execGlobal(this[_string], this[_nextIndex]); 648 let match = this[_regExp][_execGlobal](this[_string], this[_nextIndex]);
649 if (match != null) { 649 if (match != null) {
650 this[_current] = match; 650 this[_current] = match;
651 let nextIndex = match.end; 651 let nextIndex = match.end;
652 if (match.start == nextIndex) { 652 if (match.start == nextIndex) {
653 nextIndex = dart.notNull(nextIndex) + 1; 653 nextIndex = dart.notNull(nextIndex) + 1;
654 } 654 }
655 this[_nextIndex] = nextIndex; 655 this[_nextIndex] = nextIndex;
656 return true; 656 return true;
657 } 657 }
658 } 658 }
659 this[_current] = null; 659 this[_current] = null;
660 this[_string] = null; 660 this[_string] = null;
661 return false; 661 return false;
662 } 662 }
663 } 663 }
664 _AllMatchesIterator[dart.implements] = () => [core.Iterator$(core.Match)]; 664 _AllMatchesIterator[dart.implements] = () => [core.Iterator$(core.Match)];
665 // Function firstMatchAfter: (JSSyntaxRegExp, String, int) → Match 665 // Function firstMatchAfter: (JSSyntaxRegExp, String, int) → Match
666 function firstMatchAfter(regExp, string, start) { 666 function firstMatchAfter(regExp, string, start) {
667 return regExp._execGlobal(string, start); 667 return regExp[_execGlobal](string, start);
668 } 668 }
669 class StringMatch extends core.Object { 669 class StringMatch extends core.Object {
670 StringMatch(start, input, pattern) { 670 StringMatch(start, input, pattern) {
671 this.start = start; 671 this.start = start;
672 this.input = input; 672 this.input = input;
673 this.pattern = pattern; 673 this.pattern = pattern;
674 } 674 }
675 get end() { 675 get end() {
676 return dart.notNull(this.start) + dart.notNull(this.pattern.length); 676 return dart.notNull(this.start) + dart.notNull(this.pattern.length);
677 } 677 }
678 get(g) { 678 get(g) {
679 return this.group(g); 679 return this.group(g);
680 } 680 }
681 get groupCount() { 681 get groupCount() {
682 return 0; 682 return 0;
683 } 683 }
684 group(group_) { 684 group(group_) {
685 if (group_ != 0) { 685 if (group_ != 0) {
686 throw new core.RangeError.value(group_); 686 throw new core.RangeError.value(group_);
687 } 687 }
688 return this.pattern; 688 return this.pattern;
689 } 689 }
690 groups(groups_) { 690 groups(groups_) {
691 let result = new (core.List$(core.String))(); 691 let result = new (core.List$(core.String))();
692 for (let g of groups_) { 692 for (let g of groups_) {
693 result.add(this.group(g)); 693 result[core.$add](this.group(g));
694 } 694 }
695 return result; 695 return result;
696 } 696 }
697 } 697 }
698 StringMatch[dart.implements] = () => [core.Match]; 698 StringMatch[dart.implements] = () => [core.Match];
699 // Function allMatchesInStringUnchecked: (String, String, int) → List<Match> 699 // Function allMatchesInStringUnchecked: (String, String, int) → List<Match>
700 function allMatchesInStringUnchecked(needle, haystack, startIndex) { 700 function allMatchesInStringUnchecked(needle, haystack, startIndex) {
701 let result = new (core.List$(core.Match))(); 701 let result = new (core.List$(core.Match))();
702 let length = haystack.length; 702 let length = haystack.length;
703 let patternLength = needle.length; 703 let patternLength = needle.length;
704 while (true) { 704 while (true) {
705 let position = haystack.indexOf(needle, startIndex); 705 let position = haystack.indexOf(needle, startIndex);
706 if (position == -1) { 706 if (position == -1) {
707 break; 707 break;
708 } 708 }
709 result.add(new StringMatch(position, haystack, needle)); 709 result[core.$add](new StringMatch(position, haystack, needle));
710 let endIndex = dart.notNull(position) + dart.notNull(patternLength); 710 let endIndex = dart.notNull(position) + dart.notNull(patternLength);
711 if (endIndex == length) { 711 if (endIndex == length) {
712 break; 712 break;
713 } else if (position == endIndex) { 713 } else if (position == endIndex) {
714 startIndex = dart.notNull(startIndex) + 1; 714 startIndex = dart.notNull(startIndex) + 1;
715 } else { 715 } else {
716 startIndex = endIndex; 716 startIndex = endIndex;
717 } 717 }
718 } 718 }
719 return result; 719 return result;
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
1199 } 1199 }
1200 // Function areAssignableMaps: (dynamic, dynamic) → bool 1200 // Function areAssignableMaps: (dynamic, dynamic) → bool
1201 function areAssignableMaps(s, t) { 1201 function areAssignableMaps(s, t) {
1202 if (t == null) 1202 if (t == null)
1203 return true; 1203 return true;
1204 if (s == null) 1204 if (s == null)
1205 return false; 1205 return false;
1206 dart.assert(isJsObject(s)); 1206 dart.assert(isJsObject(s));
1207 dart.assert(isJsObject(t)); 1207 dart.assert(isJsObject(t));
1208 let names = _interceptors.JSArray.markFixedList(dart.as(Object.getOwnPropert yNames(t), core.List)); 1208 let names = _interceptors.JSArray.markFixedList(dart.as(Object.getOwnPropert yNames(t), core.List));
1209 for (let i = 0; dart.notNull(i) < dart.notNull(names.length); i = dart.notNu ll(i) + 1) { 1209 for (let i = 0; dart.notNull(i) < dart.notNull(names[core.$length]); i = dar t.notNull(i) + 1) {
1210 let name = names.get(i); 1210 let name = names[core.$get](i);
1211 if (!Object.hasOwnProperty.call(s, name)) { 1211 if (!Object.hasOwnProperty.call(s, name)) {
1212 return false; 1212 return false;
1213 } 1213 }
1214 let tType = t[name]; 1214 let tType = t[name];
1215 let sType = s[name]; 1215 let sType = s[name];
1216 if (!dart.notNull(isAssignable(tType, sType))) 1216 if (!dart.notNull(isAssignable(tType, sType)))
1217 return false; 1217 return false;
1218 } 1218 }
1219 return true; 1219 return true;
1220 } 1220 }
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
1410 this[_arguments] = arguments$; 1410 this[_arguments] = arguments$;
1411 this[_namedArgumentNames] = namedArgumentNames; 1411 this[_namedArgumentNames] = namedArgumentNames;
1412 this[_namedIndices] = null; 1412 this[_namedIndices] = null;
1413 } 1413 }
1414 get memberName() { 1414 get memberName() {
1415 if (dart.is(this[_memberName], core.Symbol)) 1415 if (dart.is(this[_memberName], core.Symbol))
1416 return dart.as(this[_memberName], core.Symbol); 1416 return dart.as(this[_memberName], core.Symbol);
1417 let name = dart.as(this[_memberName], core.String); 1417 let name = dart.as(this[_memberName], core.String);
1418 let unmangledName = _js_names.mangledNames.get(name); 1418 let unmangledName = _js_names.mangledNames.get(name);
1419 if (unmangledName != null) { 1419 if (unmangledName != null) {
1420 name = unmangledName.split(':').get(0); 1420 name = unmangledName.split(':')[core.$get](0);
1421 } else { 1421 } else {
1422 if (_js_names.mangledNames.get(this[_internalName]) == null) { 1422 if (_js_names.mangledNames.get(this[_internalName]) == null) {
1423 core.print(`Warning: '${name}' is used reflectively but not in Mirrors Used. ` + "This will break minified code."); 1423 core.print(`Warning: '${name}' is used reflectively but not in Mirrors Used. ` + "This will break minified code.");
1424 } 1424 }
1425 } 1425 }
1426 this[_memberName] = new _internal.Symbol.unvalidated(name); 1426 this[_memberName] = new _internal.Symbol.unvalidated(name);
1427 return dart.as(this[_memberName], core.Symbol); 1427 return dart.as(this[_memberName], core.Symbol);
1428 } 1428 }
1429 get isMethod() { 1429 get isMethod() {
1430 return this[_kind] == JSInvocationMirror.METHOD; 1430 return this[_kind] == JSInvocationMirror.METHOD;
1431 } 1431 }
1432 get isGetter() { 1432 get isGetter() {
1433 return this[_kind] == JSInvocationMirror.GETTER; 1433 return this[_kind] == JSInvocationMirror.GETTER;
1434 } 1434 }
1435 get isSetter() { 1435 get isSetter() {
1436 return this[_kind] == JSInvocationMirror.SETTER; 1436 return this[_kind] == JSInvocationMirror.SETTER;
1437 } 1437 }
1438 get isAccessor() { 1438 get isAccessor() {
1439 return this[_kind] != JSInvocationMirror.METHOD; 1439 return this[_kind] != JSInvocationMirror.METHOD;
1440 } 1440 }
1441 get positionalArguments() { 1441 get positionalArguments() {
1442 if (this.isGetter) 1442 if (this.isGetter)
1443 return /* Unimplemented const */new core.List.from([]); 1443 return /* Unimplemented const */new core.List.from([]);
1444 let argumentCount = dart.notNull(this[_arguments].length) - dart.notNull(t his[_namedArgumentNames].length); 1444 let argumentCount = dart.notNull(this[_arguments][core.$length]) - dart.no tNull(this[_namedArgumentNames][core.$length]);
1445 if (argumentCount == 0) 1445 if (argumentCount == 0)
1446 return /* Unimplemented const */new core.List.from([]); 1446 return /* Unimplemented const */new core.List.from([]);
1447 let list = new core.List.from([]); 1447 let list = new core.List.from([]);
1448 for (let index = 0; dart.notNull(index) < dart.notNull(argumentCount); ind ex = dart.notNull(index) + 1) { 1448 for (let index = 0; dart.notNull(index) < dart.notNull(argumentCount); ind ex = dart.notNull(index) + 1) {
1449 list.add(this[_arguments].get(index)); 1449 list[core.$add](this[_arguments][core.$get](index));
1450 } 1450 }
1451 return dart.as(makeLiteralListConst(list), core.List); 1451 return dart.as(makeLiteralListConst(list), core.List);
1452 } 1452 }
1453 get namedArguments() { 1453 get namedArguments() {
1454 if (this.isAccessor) 1454 if (this.isAccessor)
1455 return dart.map(); 1455 return dart.map();
1456 let namedArgumentCount = this[_namedArgumentNames].length; 1456 let namedArgumentCount = this[_namedArgumentNames][core.$length];
1457 let namedArgumentsStartIndex = dart.notNull(this[_arguments].length) - dar t.notNull(namedArgumentCount); 1457 let namedArgumentsStartIndex = dart.notNull(this[_arguments][core.$length] ) - dart.notNull(namedArgumentCount);
1458 if (namedArgumentCount == 0) 1458 if (namedArgumentCount == 0)
1459 return dart.map(); 1459 return dart.map();
1460 let map = new (core.Map$(core.Symbol, dynamic))(); 1460 let map = new (core.Map$(core.Symbol, dynamic))();
1461 for (let i = 0; dart.notNull(i) < dart.notNull(namedArgumentCount); i = da rt.notNull(i) + 1) { 1461 for (let i = 0; dart.notNull(i) < dart.notNull(namedArgumentCount); i = da rt.notNull(i) + 1) {
1462 map.set(new _internal.Symbol.unvalidated(dart.as(this[_namedArgumentName s].get(i), core.String)), this[_arguments].get(dart.notNull(namedArgumentsStartI ndex) + dart.notNull(i))); 1462 map.set(new _internal.Symbol.unvalidated(dart.as(this[_namedArgumentName s][core.$get](i), core.String)), this[_arguments][core.$get](dart.notNull(namedA rgumentsStartIndex) + dart.notNull(i)));
1463 } 1463 }
1464 return map; 1464 return map;
1465 } 1465 }
1466 [_getCachedInvocation](object) { 1466 [_getCachedInvocation](object) {
1467 let interceptor = _interceptors.getInterceptor(object); 1467 let interceptor = _interceptors.getInterceptor(object);
1468 let receiver = object; 1468 let receiver = object;
1469 let name = this[_internalName]; 1469 let name = this[_internalName];
1470 let arguments$ = this[_arguments]; 1470 let arguments$ = this[_arguments];
1471 let interceptedNames = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded _names.INTERCEPTED_NAMES); 1471 let interceptedNames = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded _names.INTERCEPTED_NAMES);
1472 let isIntercepted = Object.prototype.hasOwnProperty.call(interceptedNames, name); 1472 let isIntercepted = Object.prototype.hasOwnProperty.call(interceptedNames, name);
(...skipping 26 matching lines...) Expand all
1499 if (isCatchAll) { 1499 if (isCatchAll) {
1500 return new CachedCatchAllInvocation(name, method, isIntercepted, dart. as(interceptor, _interceptors.Interceptor)); 1500 return new CachedCatchAllInvocation(name, method, isIntercepted, dart. as(interceptor, _interceptors.Interceptor));
1501 } else { 1501 } else {
1502 return new CachedInvocation(name, method, isIntercepted, dart.as(inter ceptor, _interceptors.Interceptor)); 1502 return new CachedInvocation(name, method, isIntercepted, dart.as(inter ceptor, _interceptors.Interceptor));
1503 } 1503 }
1504 } else { 1504 } else {
1505 return new CachedNoSuchMethodInvocation(interceptor); 1505 return new CachedNoSuchMethodInvocation(interceptor);
1506 } 1506 }
1507 } 1507 }
1508 static invokeFromMirror(invocation, victim) { 1508 static invokeFromMirror(invocation, victim) {
1509 let cached = invocation._getCachedInvocation(victim); 1509 let cached = invocation[_getCachedInvocation](victim);
1510 if (dart.dload(cached, 'isNoSuchMethod')) { 1510 if (dart.dload(cached, 'isNoSuchMethod')) {
1511 return dart.dinvoke(cached, 'invokeOn', victim, invocation); 1511 return dart.dinvoke(cached, 'invokeOn', victim, invocation);
1512 } else { 1512 } else {
1513 return dart.dinvoke(cached, 'invokeOn', victim, invocation[_arguments]); 1513 return dart.dinvoke(cached, 'invokeOn', victim, invocation[_arguments]);
1514 } 1514 }
1515 } 1515 }
1516 static getCachedInvocation(invocation, victim) { 1516 static getCachedInvocation(invocation, victim) {
1517 return invocation._getCachedInvocation(victim); 1517 return invocation[_getCachedInvocation](victim);
1518 } 1518 }
1519 } 1519 }
1520 JSInvocationMirror[dart.implements] = () => [core.Invocation]; 1520 JSInvocationMirror[dart.implements] = () => [core.Invocation];
1521 JSInvocationMirror.METHOD = 0; 1521 JSInvocationMirror.METHOD = 0;
1522 JSInvocationMirror.GETTER = 1; 1522 JSInvocationMirror.GETTER = 1;
1523 JSInvocationMirror.SETTER = 2; 1523 JSInvocationMirror.SETTER = 2;
1524 class CachedInvocation extends core.Object { 1524 class CachedInvocation extends core.Object {
1525 CachedInvocation(mangledName, jsFunction, isIntercepted, cachedInterceptor) { 1525 CachedInvocation(mangledName, jsFunction, isIntercepted, cachedInterceptor) {
1526 this.mangledName = mangledName; 1526 this.mangledName = mangledName;
1527 this.jsFunction = jsFunction; 1527 this.jsFunction = jsFunction;
1528 this.isIntercepted = isIntercepted; 1528 this.isIntercepted = isIntercepted;
1529 this.cachedInterceptor = cachedInterceptor; 1529 this.cachedInterceptor = cachedInterceptor;
1530 } 1530 }
1531 get isNoSuchMethod() { 1531 get isNoSuchMethod() {
1532 return false; 1532 return false;
1533 } 1533 }
1534 get isGetterStub() { 1534 get isGetterStub() {
1535 return !!this.jsFunction.$getterStub; 1535 return !!this.jsFunction.$getterStub;
1536 } 1536 }
1537 invokeOn(victim, arguments$) { 1537 invokeOn(victim, arguments$) {
1538 let receiver = victim; 1538 let receiver = victim;
1539 if (!dart.notNull(this.isIntercepted)) { 1539 if (!dart.notNull(this.isIntercepted)) {
1540 if (!dart.is(arguments$, _interceptors.JSArray)) 1540 if (!dart.is(arguments$, _interceptors.JSArray))
1541 arguments$ = new core.List.from(arguments$); 1541 arguments$ = new core.List.from(arguments$);
1542 } else { 1542 } else {
1543 arguments$ = new core.List.from([victim]); 1543 arguments$ = new core.List.from([victim]);
1544 arguments$.addAll(arguments$); 1544 arguments$[core.$addAll](arguments$);
1545 if (this.cachedInterceptor != null) 1545 if (this.cachedInterceptor != null)
1546 receiver = this.cachedInterceptor; 1546 receiver = this.cachedInterceptor;
1547 } 1547 }
1548 return this.jsFunction.apply(receiver, arguments$); 1548 return this.jsFunction.apply(receiver, arguments$);
1549 } 1549 }
1550 } 1550 }
1551 class CachedCatchAllInvocation extends CachedInvocation { 1551 class CachedCatchAllInvocation extends CachedInvocation {
1552 CachedCatchAllInvocation(name, jsFunction, isIntercepted, cachedInterceptor) { 1552 CachedCatchAllInvocation(name, jsFunction, isIntercepted, cachedInterceptor) {
1553 this.info = new ReflectionInfo(jsFunction); 1553 this.info = new ReflectionInfo(jsFunction);
1554 super.CachedInvocation(name, jsFunction, isIntercepted, cachedInterceptor) ; 1554 super.CachedInvocation(name, jsFunction, isIntercepted, cachedInterceptor) ;
1555 } 1555 }
1556 get isGetterStub() { 1556 get isGetterStub() {
1557 return false; 1557 return false;
1558 } 1558 }
1559 invokeOn(victim, arguments$) { 1559 invokeOn(victim, arguments$) {
1560 let receiver = victim; 1560 let receiver = victim;
1561 let providedArgumentCount = null; 1561 let providedArgumentCount = null;
1562 let fullParameterCount = dart.notNull(this.info.requiredParameterCount) + dart.notNull(this.info.optionalParameterCount); 1562 let fullParameterCount = dart.notNull(this.info.requiredParameterCount) + dart.notNull(this.info.optionalParameterCount);
1563 if (!dart.notNull(this.isIntercepted)) { 1563 if (!dart.notNull(this.isIntercepted)) {
1564 if (dart.is(arguments$, _interceptors.JSArray)) { 1564 if (dart.is(arguments$, _interceptors.JSArray)) {
1565 providedArgumentCount = arguments$.length; 1565 providedArgumentCount = arguments$[core.$length];
1566 if (dart.notNull(providedArgumentCount) < dart.notNull(fullParameterCo unt)) { 1566 if (dart.notNull(providedArgumentCount) < dart.notNull(fullParameterCo unt)) {
1567 arguments$ = new core.List.from(arguments$); 1567 arguments$ = new core.List.from(arguments$);
1568 } 1568 }
1569 } else { 1569 } else {
1570 arguments$ = new core.List.from(arguments$); 1570 arguments$ = new core.List.from(arguments$);
1571 providedArgumentCount = arguments$.length; 1571 providedArgumentCount = arguments$[core.$length];
1572 } 1572 }
1573 } else { 1573 } else {
1574 arguments$ = new core.List.from([victim]); 1574 arguments$ = new core.List.from([victim]);
1575 arguments$.addAll(arguments$); 1575 arguments$[core.$addAll](arguments$);
1576 if (this.cachedInterceptor != null) 1576 if (this.cachedInterceptor != null)
1577 receiver = this.cachedInterceptor; 1577 receiver = this.cachedInterceptor;
1578 providedArgumentCount = dart.notNull(arguments$.length) - 1; 1578 providedArgumentCount = dart.notNull(arguments$[core.$length]) - 1;
1579 } 1579 }
1580 if (dart.notNull(this.info.areOptionalParametersNamed) && dart.notNull(pro videdArgumentCount) > dart.notNull(this.info.requiredParameterCount)) { 1580 if (dart.notNull(this.info.areOptionalParametersNamed) && dart.notNull(pro videdArgumentCount) > dart.notNull(this.info.requiredParameterCount)) {
1581 throw new UnimplementedNoSuchMethodError(`Invocation of unstubbed method '${this.info.reflectionName}'` + ` with ${arguments$.length} arguments.`); 1581 throw new UnimplementedNoSuchMethodError(`Invocation of unstubbed method '${this.info.reflectionName}'` + ` with ${arguments$[core.$length]} arguments.` );
1582 } else if (dart.notNull(providedArgumentCount) < dart.notNull(this.info.re quiredParameterCount)) { 1582 } else if (dart.notNull(providedArgumentCount) < dart.notNull(this.info.re quiredParameterCount)) {
1583 throw new UnimplementedNoSuchMethodError(`Invocation of unstubbed method '${this.info.reflectionName}'` + ` with ${providedArgumentCount} arguments (too few).`); 1583 throw new UnimplementedNoSuchMethodError(`Invocation of unstubbed method '${this.info.reflectionName}'` + ` with ${providedArgumentCount} arguments (too few).`);
1584 } else if (dart.notNull(providedArgumentCount) > dart.notNull(fullParamete rCount)) { 1584 } else if (dart.notNull(providedArgumentCount) > dart.notNull(fullParamete rCount)) {
1585 throw new UnimplementedNoSuchMethodError(`Invocation of unstubbed method '${this.info.reflectionName}'` + ` with ${providedArgumentCount} arguments (too many).`); 1585 throw new UnimplementedNoSuchMethodError(`Invocation of unstubbed method '${this.info.reflectionName}'` + ` with ${providedArgumentCount} arguments (too many).`);
1586 } 1586 }
1587 for (let i = providedArgumentCount; dart.notNull(i) < dart.notNull(fullPar ameterCount); i = dart.notNull(i) + 1) { 1587 for (let i = providedArgumentCount; dart.notNull(i) < dart.notNull(fullPar ameterCount); i = dart.notNull(i) + 1) {
1588 arguments$.add(getMetadata(this.info.defaultValue(i))); 1588 arguments$[core.$add](getMetadata(this.info.defaultValue(i)));
1589 } 1589 }
1590 return this.jsFunction.apply(receiver, arguments$); 1590 return this.jsFunction.apply(receiver, arguments$);
1591 } 1591 }
1592 } 1592 }
1593 class CachedNoSuchMethodInvocation extends core.Object { 1593 class CachedNoSuchMethodInvocation extends core.Object {
1594 CachedNoSuchMethodInvocation(interceptor) { 1594 CachedNoSuchMethodInvocation(interceptor) {
1595 this.interceptor = interceptor; 1595 this.interceptor = interceptor;
1596 } 1596 }
1597 get isNoSuchMethod() { 1597 get isNoSuchMethod() {
1598 return true; 1598 return true;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
1673 sortedIndex(unsortedIndex) { 1673 sortedIndex(unsortedIndex) {
1674 if (this.cachedSortedIndices == null) { 1674 if (this.cachedSortedIndices == null) {
1675 this.cachedSortedIndices = new core.List(this.optionalParameterCount); 1675 this.cachedSortedIndices = new core.List(this.optionalParameterCount);
1676 let positions = dart.map(); 1676 let positions = dart.map();
1677 for (let i = 0; dart.notNull(i) < dart.notNull(this.optionalParameterCou nt); i = dart.notNull(i) + 1) { 1677 for (let i = 0; dart.notNull(i) < dart.notNull(this.optionalParameterCou nt); i = dart.notNull(i) + 1) {
1678 let index = dart.notNull(this.requiredParameterCount) + dart.notNull(i ); 1678 let index = dart.notNull(this.requiredParameterCount) + dart.notNull(i );
1679 positions.set(this.parameterName(index), index); 1679 positions.set(this.parameterName(index), index);
1680 } 1680 }
1681 let index = 0; 1681 let index = 0;
1682 ((_$) => { 1682 ((_$) => {
1683 _$.sort(); 1683 _$[core.$sort]();
1684 return _$; 1684 return _$;
1685 }).bind(this)(positions.keys.toList()).forEach(((name) => { 1685 }).bind(this)(positions.keys[core.$toList]())[core.$forEach](((name) => {
1686 this.cachedSortedIndices.set(((x$) => index = dart.notNull(x$) + 1, x$ )(index), positions.get(name)); 1686 this.cachedSortedIndices[core.$set](((x$) => index = dart.notNull(x$) + 1, x$)(index), positions.get(name));
1687 }).bind(this)); 1687 }).bind(this));
1688 } 1688 }
1689 return dart.as(this.cachedSortedIndices.get(unsortedIndex), core.int); 1689 return dart.as(this.cachedSortedIndices[core.$get](unsortedIndex), core.in t);
1690 } 1690 }
1691 computeFunctionRti(jsConstructor) { 1691 computeFunctionRti(jsConstructor) {
1692 if (typeof this.functionType == "number") { 1692 if (typeof this.functionType == "number") {
1693 return getMetadata(dart.as(this.functionType, core.int)); 1693 return getMetadata(dart.as(this.functionType, core.int));
1694 } else if (typeof this.functionType == "function") { 1694 } else if (typeof this.functionType == "function") {
1695 let fakeInstance = new jsConstructor(); 1695 let fakeInstance = new jsConstructor();
1696 setRuntimeTypeInfo(fakeInstance, fakeInstance["<>"]); 1696 setRuntimeTypeInfo(fakeInstance, fakeInstance["<>"]);
1697 return this.functionType.apply({$receiver: fakeInstance}); 1697 return this.functionType.apply({$receiver: fakeInstance});
1698 } else { 1698 } else {
1699 throw new RuntimeError('Unexpected function type'); 1699 throw new RuntimeError('Unexpected function type');
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
1850 static currentUri() { 1850 static currentUri() {
1851 requiresPreamble(); 1851 requiresPreamble();
1852 if (!!self.location) { 1852 if (!!self.location) {
1853 return self.location.href; 1853 return self.location.href;
1854 } 1854 }
1855 return null; 1855 return null;
1856 } 1856 }
1857 static [_fromCharCodeApply](array) { 1857 static [_fromCharCodeApply](array) {
1858 let result = ""; 1858 let result = "";
1859 let kMaxApply = 500; 1859 let kMaxApply = 500;
1860 let end = array.length; 1860 let end = array[core.$length];
1861 for (let i = 0; dart.notNull(i) < dart.notNull(end); i = kMaxApply) { 1861 for (let i = 0; dart.notNull(i) < dart.notNull(end); i = kMaxApply) {
1862 let subarray = null; 1862 let subarray = null;
1863 if (dart.notNull(end) <= dart.notNull(kMaxApply)) { 1863 if (dart.notNull(end) <= dart.notNull(kMaxApply)) {
1864 subarray = array; 1864 subarray = array;
1865 } else { 1865 } else {
1866 subarray = array.slice(i, dart.notNull(i) + dart.notNull(kMaxApply) < dart.notNull(end) ? dart.notNull(i) + dart.notNull(kMaxApply) : end); 1866 subarray = array.slice(i, dart.notNull(i) + dart.notNull(kMaxApply) < dart.notNull(end) ? dart.notNull(i) + dart.notNull(kMaxApply) : end);
1867 } 1867 }
1868 result = result + String.fromCharCode.apply(null, subarray); 1868 result = result + String.fromCharCode.apply(null, subarray);
1869 } 1869 }
1870 return result; 1870 return result;
1871 } 1871 }
1872 static stringFromCodePoints(codePoints) { 1872 static stringFromCodePoints(codePoints) {
1873 let a = new core.List$(core.int).from([]); 1873 let a = new core.List$(core.int).from([]);
1874 for (let i of dart.as(codePoints, core.Iterable)) { 1874 for (let i of dart.as(codePoints, core.Iterable)) {
1875 if (!(typeof i == 'number')) 1875 if (!(typeof i == 'number'))
1876 throw new core.ArgumentError(i); 1876 throw new core.ArgumentError(i);
1877 if (dart.dbinary(i, '<=', 65535)) { 1877 if (dart.dbinary(i, '<=', 65535)) {
1878 a.add(dart.as(i, core.int)); 1878 a[core.$add](dart.as(i, core.int));
1879 } else if (dart.dbinary(i, '<=', 1114111)) { 1879 } else if (dart.dbinary(i, '<=', 1114111)) {
1880 a.add(55296['+'](dart.dbinary(dart.dbinary(dart.dbinary(i, '-', 65536) , '>>', 10), '&', 1023))); 1880 a[core.$add](55296['+'](dart.dbinary(dart.dbinary(dart.dbinary(i, '-', 65536), '>>', 10), '&', 1023)));
1881 a.add(56320['+'](dart.dbinary(i, '&', 1023))); 1881 a[core.$add](56320['+'](dart.dbinary(i, '&', 1023)));
1882 } else { 1882 } else {
1883 throw new core.ArgumentError(i); 1883 throw new core.ArgumentError(i);
1884 } 1884 }
1885 } 1885 }
1886 return Primitives[_fromCharCodeApply](a); 1886 return Primitives[_fromCharCodeApply](a);
1887 } 1887 }
1888 static stringFromCharCodes(charCodes) { 1888 static stringFromCharCodes(charCodes) {
1889 for (let i of dart.as(charCodes, core.Iterable)) { 1889 for (let i of dart.as(charCodes, core.Iterable)) {
1890 if (!(typeof i == 'number')) 1890 if (!(typeof i == 'number'))
1891 throw new core.ArgumentError(i); 1891 throw new core.ArgumentError(i);
(...skipping 21 matching lines...) Expand all
1913 static stringConcatUnchecked(string1, string2) { 1913 static stringConcatUnchecked(string1, string2) {
1914 return _foreign_helper.JS_STRING_CONCAT(string1, string2); 1914 return _foreign_helper.JS_STRING_CONCAT(string1, string2);
1915 } 1915 }
1916 static flattenString(str) { 1916 static flattenString(str) {
1917 return str.charCodeAt(0) == 0 ? str : str; 1917 return str.charCodeAt(0) == 0 ? str : str;
1918 } 1918 }
1919 static getTimeZoneName(receiver) { 1919 static getTimeZoneName(receiver) {
1920 let d = Primitives.lazyAsJsDate(receiver); 1920 let d = Primitives.lazyAsJsDate(receiver);
1921 let match = dart.as(/\((.*)\)/.exec(d.toString()), core.List); 1921 let match = dart.as(/\((.*)\)/.exec(d.toString()), core.List);
1922 if (match != null) 1922 if (match != null)
1923 return dart.as(match.get(1), core.String); 1923 return dart.as(match[core.$get](1), core.String);
1924 match = dart.as(/^[A-Z,a-z]{3}\s[A-Z,a-z]{3}\s\d+\s\d{2}:\d{2}:\d{2}\s([A- Z]{3,5})\s\d{4}$/.exec(d.toString()), core.List); 1924 match = dart.as(/^[A-Z,a-z]{3}\s[A-Z,a-z]{3}\s\d+\s\d{2}:\d{2}:\d{2}\s([A- Z]{3,5})\s\d{4}$/.exec(d.toString()), core.List);
1925 if (match != null) 1925 if (match != null)
1926 return dart.as(match.get(1), core.String); 1926 return dart.as(match[core.$get](1), core.String);
1927 match = dart.as(/(?:GMT|UTC)[+-]\d{4}/.exec(d.toString()), core.List); 1927 match = dart.as(/(?:GMT|UTC)[+-]\d{4}/.exec(d.toString()), core.List);
1928 if (match != null) 1928 if (match != null)
1929 return dart.as(match.get(0), core.String); 1929 return dart.as(match[core.$get](0), core.String);
1930 return ""; 1930 return "";
1931 } 1931 }
1932 static getTimeZoneOffsetInMinutes(receiver) { 1932 static getTimeZoneOffsetInMinutes(receiver) {
1933 return -Primitives.lazyAsJsDate(receiver).getTimezoneOffset(); 1933 return -Primitives.lazyAsJsDate(receiver).getTimezoneOffset();
1934 } 1934 }
1935 static valueFromDecomposedDate(years, month, day, hours, minutes, seconds, m illiseconds, isUtc) { 1935 static valueFromDecomposedDate(years, month, day, hours, minutes, seconds, m illiseconds, isUtc) {
1936 let MAX_MILLISECONDS_SINCE_EPOCH = 8640000000000000; 1936 let MAX_MILLISECONDS_SINCE_EPOCH = 8640000000000000;
1937 checkInt(years); 1937 checkInt(years);
1938 checkInt(month); 1938 checkInt(month);
1939 checkInt(day); 1939 checkInt(day);
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
2014 if (dart.notNull(object == null) || dart.notNull(typeof object == 'boolean ') || dart.notNull(dart.is(object, core.num)) || dart.notNull(typeof object == ' string')) { 2014 if (dart.notNull(object == null) || dart.notNull(typeof object == 'boolean ') || dart.notNull(dart.is(object, core.num)) || dart.notNull(typeof object == ' string')) {
2015 throw new core.ArgumentError(object); 2015 throw new core.ArgumentError(object);
2016 } 2016 }
2017 object[key] = value; 2017 object[key] = value;
2018 } 2018 }
2019 static functionNoSuchMethod(func, positionalArguments, namedArguments) { 2019 static functionNoSuchMethod(func, positionalArguments, namedArguments) {
2020 let argumentCount = 0; 2020 let argumentCount = 0;
2021 let arguments$ = new core.List.from([]); 2021 let arguments$ = new core.List.from([]);
2022 let namedArgumentList = new core.List.from([]); 2022 let namedArgumentList = new core.List.from([]);
2023 if (positionalArguments != null) { 2023 if (positionalArguments != null) {
2024 argumentCount = positionalArguments.length; 2024 argumentCount = positionalArguments[core.$length];
2025 arguments$.addAll(positionalArguments); 2025 arguments$[core.$addAll](positionalArguments);
2026 } 2026 }
2027 let names = ''; 2027 let names = '';
2028 if (dart.notNull(namedArguments != null) && !dart.notNull(namedArguments.i sEmpty)) { 2028 if (dart.notNull(namedArguments != null) && !dart.notNull(namedArguments.i sEmpty)) {
2029 namedArguments.forEach(((name, argument) => { 2029 namedArguments.forEach(((name, argument) => {
2030 names = `${names}$${name}`; 2030 names = `${names}$${name}`;
2031 namedArgumentList.add(name); 2031 namedArgumentList[core.$add](name);
2032 arguments$.add(argument); 2032 arguments$[core.$add](argument);
2033 argumentCount = dart.notNull(argumentCount) + 1; 2033 argumentCount = dart.notNull(argumentCount) + 1;
2034 }).bind(this)); 2034 }).bind(this));
2035 } 2035 }
2036 let selectorName = `${_foreign_helper.JS_GET_NAME("CALL_PREFIX")}$${argume ntCount}${names}`; 2036 let selectorName = `${_foreign_helper.JS_GET_NAME("CALL_PREFIX")}$${argume ntCount}${names}`;
2037 return dart.dinvoke(func, 'noSuchMethod', createUnmangledInvocationMirror( dart.throw_("Unimplemented SymbolLiteral: #call"), selectorName, JSInvocationMir ror.METHOD, arguments$, namedArgumentList)); 2037 return dart.dinvoke(func, 'noSuchMethod', createUnmangledInvocationMirror( dart.throw_("Unimplemented SymbolLiteral: #call"), selectorName, JSInvocationMir ror.METHOD, arguments$, namedArgumentList));
2038 } 2038 }
2039 static applyFunction(func, positionalArguments, namedArguments) { 2039 static applyFunction(func, positionalArguments, namedArguments) {
2040 return namedArguments == null ? Primitives.applyFunctionWithPositionalArgu ments(func, positionalArguments) : Primitives.applyFunctionWithNamedArguments(fu nc, positionalArguments, namedArguments); 2040 return namedArguments == null ? Primitives.applyFunctionWithPositionalArgu ments(func, positionalArguments) : Primitives.applyFunctionWithNamedArguments(fu nc, positionalArguments, namedArguments);
2041 } 2041 }
2042 static applyFunctionWithPositionalArguments(func, positionalArguments) { 2042 static applyFunctionWithPositionalArguments(func, positionalArguments) {
(...skipping 27 matching lines...) Expand all
2070 } 2070 }
2071 let info = new ReflectionInfo(jsFunction); 2071 let info = new ReflectionInfo(jsFunction);
2072 if (dart.notNull(info == null) || !dart.notNull(info.areOptionalParameters Named)) { 2072 if (dart.notNull(info == null) || !dart.notNull(info.areOptionalParameters Named)) {
2073 return Primitives.functionNoSuchMethod(func, positionalArguments, namedA rguments); 2073 return Primitives.functionNoSuchMethod(func, positionalArguments, namedA rguments);
2074 } 2074 }
2075 if (positionalArguments != null) { 2075 if (positionalArguments != null) {
2076 positionalArguments = new core.List.from(positionalArguments); 2076 positionalArguments = new core.List.from(positionalArguments);
2077 } else { 2077 } else {
2078 positionalArguments = new core.List.from([]); 2078 positionalArguments = new core.List.from([]);
2079 } 2079 }
2080 if (info.requiredParameterCount != positionalArguments.length) { 2080 if (info.requiredParameterCount != positionalArguments[core.$length]) {
2081 return Primitives.functionNoSuchMethod(func, positionalArguments, namedA rguments); 2081 return Primitives.functionNoSuchMethod(func, positionalArguments, namedA rguments);
2082 } 2082 }
2083 let defaultArguments = new core.Map(); 2083 let defaultArguments = new core.Map();
2084 for (let i = 0; dart.notNull(i) < dart.notNull(info.optionalParameterCount ); i = dart.notNull(i) + 1) { 2084 for (let i = 0; dart.notNull(i) < dart.notNull(info.optionalParameterCount ); i = dart.notNull(i) + 1) {
2085 let index = dart.notNull(i) + dart.notNull(info.requiredParameterCount); 2085 let index = dart.notNull(i) + dart.notNull(info.requiredParameterCount);
2086 let parameterName = info.parameterNameInOrder(index); 2086 let parameterName = info.parameterNameInOrder(index);
2087 let value = info.defaultValueInOrder(index); 2087 let value = info.defaultValueInOrder(index);
2088 let defaultValue = getMetadata(value); 2088 let defaultValue = getMetadata(value);
2089 defaultArguments.set(parameterName, defaultValue); 2089 defaultArguments.set(parameterName, defaultValue);
2090 } 2090 }
2091 let bad = false; 2091 let bad = false;
2092 namedArguments.forEach(((parameter, value) => { 2092 namedArguments.forEach(((parameter, value) => {
2093 if (defaultArguments.containsKey(parameter)) { 2093 if (defaultArguments.containsKey(parameter)) {
2094 defaultArguments.set(parameter, value); 2094 defaultArguments.set(parameter, value);
2095 } else { 2095 } else {
2096 bad = true; 2096 bad = true;
2097 } 2097 }
2098 }).bind(this)); 2098 }).bind(this));
2099 if (bad) { 2099 if (bad) {
2100 return Primitives.functionNoSuchMethod(func, positionalArguments, namedA rguments); 2100 return Primitives.functionNoSuchMethod(func, positionalArguments, namedA rguments);
2101 } 2101 }
2102 positionalArguments.addAll(defaultArguments.values); 2102 positionalArguments[core.$addAll](defaultArguments.values);
2103 return jsFunction.apply(func, positionalArguments); 2103 return jsFunction.apply(func, positionalArguments);
2104 } 2104 }
2105 static [_mangledNameMatchesType](mangledName, type) { 2105 static [_mangledNameMatchesType](mangledName, type) {
2106 return mangledName == type[_typeName]; 2106 return mangledName == type[_typeName];
2107 } 2107 }
2108 static identicalImplementation(a, b) { 2108 static identicalImplementation(a, b) {
2109 return a == null ? b == null : a === b; 2109 return a == null ? b == null : a === b;
2110 } 2110 }
2111 static extractStackTrace(error) { 2111 static extractStackTrace(error) {
2112 return getTraceFromException(error.$thrownJsError); 2112 return getTraceFromException(error.$thrownJsError);
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
2618 signatureFunction = function(f, r) { 2618 signatureFunction = function(f, r) {
2619 return function() { 2619 return function() {
2620 return f.apply({$receiver: r(this)}, arguments$); 2620 return f.apply({$receiver: r(this)}, arguments$);
2621 }; 2621 };
2622 }(functionType, getReceiver); 2622 }(functionType, getReceiver);
2623 } else { 2623 } else {
2624 throw 'Error in reflectionInfo.'; 2624 throw 'Error in reflectionInfo.';
2625 } 2625 }
2626 prototype[_foreign_helper.JS_SIGNATURE_NAME()] = signatureFunction; 2626 prototype[_foreign_helper.JS_SIGNATURE_NAME()] = signatureFunction;
2627 prototype[callName] = trampoline; 2627 prototype[callName] = trampoline;
2628 for (let i = 1; dart.notNull(i) < dart.notNull(functions.length); i = dart .notNull(i) + 1) { 2628 for (let i = 1; dart.notNull(i) < dart.notNull(functions[core.$length]); i = dart.notNull(i) + 1) {
2629 let stub = functions.get(i); 2629 let stub = functions[core.$get](i);
2630 let stubCallName = stub.$callName; 2630 let stubCallName = stub.$callName;
2631 if (stubCallName != null) { 2631 if (stubCallName != null) {
2632 prototype[stubCallName] = isStatic ? stub : Closure.forwardCallTo(rece iver, stub, isIntercepted); 2632 prototype[stubCallName] = isStatic ? stub : Closure.forwardCallTo(rece iver, stub, isIntercepted);
2633 } 2633 }
2634 } 2634 }
2635 prototype["call*"] = trampoline; 2635 prototype["call*"] = trampoline;
2636 return constructor; 2636 return constructor;
2637 } 2637 }
2638 static cspForwardCall(arity, isSuperCall, stubName, func) { 2638 static cspForwardCall(arity, isSuperCall, stubName, func) {
2639 let getSelf = _foreign_helper.RAW_DART_FUNCTION_REF(BoundClosure.selfOf); 2639 let getSelf = _foreign_helper.RAW_DART_FUNCTION_REF(BoundClosure.selfOf);
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
2873 } 2873 }
2874 static receiverFieldName() { 2874 static receiverFieldName() {
2875 if (BoundClosure.receiverFieldNameCache == null) { 2875 if (BoundClosure.receiverFieldNameCache == null) {
2876 BoundClosure.receiverFieldNameCache = BoundClosure.computeFieldNamed('re ceiver'); 2876 BoundClosure.receiverFieldNameCache = BoundClosure.computeFieldNamed('re ceiver');
2877 } 2877 }
2878 return BoundClosure.receiverFieldNameCache; 2878 return BoundClosure.receiverFieldNameCache;
2879 } 2879 }
2880 static computeFieldNamed(fieldName) { 2880 static computeFieldNamed(fieldName) {
2881 let template = new BoundClosure('self', 'target', 'receiver', 'name'); 2881 let template = new BoundClosure('self', 'target', 'receiver', 'name');
2882 let names = _interceptors.JSArray.markFixedList(dart.as(Object.getOwnPrope rtyNames(template), core.List)); 2882 let names = _interceptors.JSArray.markFixedList(dart.as(Object.getOwnPrope rtyNames(template), core.List));
2883 for (let i = 0; dart.notNull(i) < dart.notNull(names.length); i = dart.not Null(i) + 1) { 2883 for (let i = 0; dart.notNull(i) < dart.notNull(names[core.$length]); i = d art.notNull(i) + 1) {
2884 let name = names.get(i); 2884 let name = names[core.$get](i);
2885 if (template[name] === fieldName) { 2885 if (template[name] === fieldName) {
2886 return name; 2886 return name;
2887 } 2887 }
2888 } 2888 }
2889 } 2889 }
2890 } 2890 }
2891 BoundClosure.selfFieldNameCache = null; 2891 BoundClosure.selfFieldNameCache = null;
2892 BoundClosure.receiverFieldNameCache = null; 2892 BoundClosure.receiverFieldNameCache = null;
2893 // Function jsHasOwnProperty: (dynamic, String) → bool 2893 // Function jsHasOwnProperty: (dynamic, String) → bool
2894 function jsHasOwnProperty(jsObject, property) { 2894 function jsHasOwnProperty(jsObject, property) {
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
3169 throw new TypeErrorImplementation(value, 'void'); 3169 throw new TypeErrorImplementation(value, 'void');
3170 } 3170 }
3171 // Function checkMalformedType: (dynamic, dynamic) → dynamic 3171 // Function checkMalformedType: (dynamic, dynamic) → dynamic
3172 function checkMalformedType(value, message) { 3172 function checkMalformedType(value, message) {
3173 if (value == null) 3173 if (value == null)
3174 return value; 3174 return value;
3175 throw new TypeErrorImplementation.fromMessage(dart.as(message, core.String)) ; 3175 throw new TypeErrorImplementation.fromMessage(dart.as(message, core.String)) ;
3176 } 3176 }
3177 // Function checkDeferredIsLoaded: (String, String) → void 3177 // Function checkDeferredIsLoaded: (String, String) → void
3178 function checkDeferredIsLoaded(loadId, uri) { 3178 function checkDeferredIsLoaded(loadId, uri) {
3179 if (!dart.notNull(exports._loadedLibraries.contains(loadId))) { 3179 if (!dart.notNull(exports._loadedLibraries[core.$contains](loadId))) {
3180 throw new DeferredNotLoadedError(uri); 3180 throw new DeferredNotLoadedError(uri);
3181 } 3181 }
3182 } 3182 }
3183 dart.defineLazyClass(exports, { 3183 dart.defineLazyClass(exports, {
3184 get JavaScriptIndexingBehavior() { 3184 get JavaScriptIndexingBehavior() {
3185 class JavaScriptIndexingBehavior extends _interceptors.JSMutableIndexable { 3185 class JavaScriptIndexingBehavior extends _interceptors.JSMutableIndexable {
3186 } 3186 }
3187 return JavaScriptIndexingBehavior; 3187 return JavaScriptIndexingBehavior;
3188 } 3188 }
3189 }); 3189 });
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
3322 } 3322 }
3323 toRti() { 3323 toRti() {
3324 let result = {[_foreign_helper.JS_FUNCTION_TYPE_TAG()]: "dynafunc"}; 3324 let result = {[_foreign_helper.JS_FUNCTION_TYPE_TAG()]: "dynafunc"};
3325 if (this.isVoid) { 3325 if (this.isVoid) {
3326 result[_foreign_helper.JS_FUNCTION_TYPE_VOID_RETURN_TAG()] = true; 3326 result[_foreign_helper.JS_FUNCTION_TYPE_VOID_RETURN_TAG()] = true;
3327 } else { 3327 } else {
3328 if (!dart.is(this.returnType, DynamicRuntimeType)) { 3328 if (!dart.is(this.returnType, DynamicRuntimeType)) {
3329 result[_foreign_helper.JS_FUNCTION_TYPE_RETURN_TYPE_TAG()] = this.retu rnType.toRti(); 3329 result[_foreign_helper.JS_FUNCTION_TYPE_RETURN_TYPE_TAG()] = this.retu rnType.toRti();
3330 } 3330 }
3331 } 3331 }
3332 if (dart.notNull(this.parameterTypes != null) && !dart.notNull(this.parame terTypes.isEmpty)) { 3332 if (dart.notNull(this.parameterTypes != null) && !dart.notNull(this.parame terTypes[core.$isEmpty])) {
3333 result[_foreign_helper.JS_FUNCTION_TYPE_REQUIRED_PARAMETERS_TAG()] = Run timeFunctionType.listToRti(this.parameterTypes); 3333 result[_foreign_helper.JS_FUNCTION_TYPE_REQUIRED_PARAMETERS_TAG()] = Run timeFunctionType.listToRti(this.parameterTypes);
3334 } 3334 }
3335 if (dart.notNull(this.optionalParameterTypes != null) && !dart.notNull(thi s.optionalParameterTypes.isEmpty)) { 3335 if (dart.notNull(this.optionalParameterTypes != null) && !dart.notNull(thi s.optionalParameterTypes[core.$isEmpty])) {
3336 result[_foreign_helper.JS_FUNCTION_TYPE_OPTIONAL_PARAMETERS_TAG()] = Run timeFunctionType.listToRti(this.optionalParameterTypes); 3336 result[_foreign_helper.JS_FUNCTION_TYPE_OPTIONAL_PARAMETERS_TAG()] = Run timeFunctionType.listToRti(this.optionalParameterTypes);
3337 } 3337 }
3338 if (this.namedParameters != null) { 3338 if (this.namedParameters != null) {
3339 let namedRti = Object.create(null); 3339 let namedRti = Object.create(null);
3340 let keys = _js_names.extractKeys(this.namedParameters); 3340 let keys = _js_names.extractKeys(this.namedParameters);
3341 for (let i = 0; dart.notNull(i) < dart.notNull(keys.length); i = dart.no tNull(i) + 1) { 3341 for (let i = 0; dart.notNull(i) < dart.notNull(keys[core.$length]); i = dart.notNull(i) + 1) {
3342 let name = keys.get(i); 3342 let name = keys[core.$get](i);
3343 let rti = dart.dinvoke(this.namedParameters[name], 'toRti'); 3343 let rti = dart.dinvoke(this.namedParameters[name], 'toRti');
3344 namedRti[name] = rti; 3344 namedRti[name] = rti;
3345 } 3345 }
3346 result[_foreign_helper.JS_FUNCTION_TYPE_NAMED_PARAMETERS_TAG()] = namedR ti; 3346 result[_foreign_helper.JS_FUNCTION_TYPE_NAMED_PARAMETERS_TAG()] = namedR ti;
3347 } 3347 }
3348 return result; 3348 return result;
3349 } 3349 }
3350 static listToRti(list) { 3350 static listToRti(list) {
3351 list = list; 3351 list = list;
3352 let result = []; 3352 let result = [];
3353 for (let i = 0; i['<'](dart.dload(list, 'length')); i = dart.notNull(i) + 1) { 3353 for (let i = 0; i['<'](dart.dload(list, 'length')); i = dart.notNull(i) + 1) {
3354 result.push(dart.dinvoke(dart.dindex(list, i), 'toRti')); 3354 result.push(dart.dinvoke(dart.dindex(list, i), 'toRti'));
3355 } 3355 }
3356 return result; 3356 return result;
3357 } 3357 }
3358 toString() { 3358 toString() {
3359 let result = '('; 3359 let result = '(';
3360 let needsComma = false; 3360 let needsComma = false;
3361 if (this.parameterTypes != null) { 3361 if (this.parameterTypes != null) {
3362 for (let i = 0; dart.notNull(i) < dart.notNull(this.parameterTypes.lengt h); i = dart.notNull(i) + 1) { 3362 for (let i = 0; dart.notNull(i) < dart.notNull(this.parameterTypes[core. $length]); i = dart.notNull(i) + 1) {
3363 let type = this.parameterTypes.get(i); 3363 let type = this.parameterTypes[core.$get](i);
3364 if (needsComma) 3364 if (needsComma)
3365 result = ', '; 3365 result = ', ';
3366 result = `${type}`; 3366 result = `${type}`;
3367 needsComma = true; 3367 needsComma = true;
3368 } 3368 }
3369 } 3369 }
3370 if (dart.notNull(this.optionalParameterTypes != null) && !dart.notNull(thi s.optionalParameterTypes.isEmpty)) { 3370 if (dart.notNull(this.optionalParameterTypes != null) && !dart.notNull(thi s.optionalParameterTypes[core.$isEmpty])) {
3371 if (needsComma) 3371 if (needsComma)
3372 result = ', '; 3372 result = ', ';
3373 needsComma = false; 3373 needsComma = false;
3374 result = '['; 3374 result = '[';
3375 for (let i = 0; dart.notNull(i) < dart.notNull(this.optionalParameterTyp es.length); i = dart.notNull(i) + 1) { 3375 for (let i = 0; dart.notNull(i) < dart.notNull(this.optionalParameterTyp es[core.$length]); i = dart.notNull(i) + 1) {
3376 let type = this.optionalParameterTypes.get(i); 3376 let type = this.optionalParameterTypes[core.$get](i);
3377 if (needsComma) 3377 if (needsComma)
3378 result = ', '; 3378 result = ', ';
3379 result = `${type}`; 3379 result = `${type}`;
3380 needsComma = true; 3380 needsComma = true;
3381 } 3381 }
3382 result = ']'; 3382 result = ']';
3383 } else if (this.namedParameters != null) { 3383 } else if (this.namedParameters != null) {
3384 if (needsComma) 3384 if (needsComma)
3385 result = ', '; 3385 result = ', ';
3386 needsComma = false; 3386 needsComma = false;
3387 result = '{'; 3387 result = '{';
3388 let keys = _js_names.extractKeys(this.namedParameters); 3388 let keys = _js_names.extractKeys(this.namedParameters);
3389 for (let i = 0; dart.notNull(i) < dart.notNull(keys.length); i = dart.no tNull(i) + 1) { 3389 for (let i = 0; dart.notNull(i) < dart.notNull(keys[core.$length]); i = dart.notNull(i) + 1) {
3390 let name = keys.get(i); 3390 let name = keys[core.$get](i);
3391 if (needsComma) 3391 if (needsComma)
3392 result = ', '; 3392 result = ', ';
3393 let rti = dart.dinvoke(this.namedParameters[name], 'toRti'); 3393 let rti = dart.dinvoke(this.namedParameters[name], 'toRti');
3394 result = `${rti} ${name}`; 3394 result = `${rti} ${name}`;
3395 needsComma = true; 3395 needsComma = true;
3396 } 3396 }
3397 result = '}'; 3397 result = '}';
3398 } 3398 }
3399 result = `) -> ${this.returnType}`; 3399 result = `) -> ${this.returnType}`;
3400 return result; 3400 return result;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
3466 dart.dinvoke(dyn, '_assertCheck', dyn2); 3466 dart.dinvoke(dyn, '_assertCheck', dyn2);
3467 } 3467 }
3468 // Function convertRtiToRuntimeType: (dynamic) → RuntimeType 3468 // Function convertRtiToRuntimeType: (dynamic) → RuntimeType
3469 function convertRtiToRuntimeType(rti) { 3469 function convertRtiToRuntimeType(rti) {
3470 if (rti == null) { 3470 if (rti == null) {
3471 return getDynamicRuntimeType(); 3471 return getDynamicRuntimeType();
3472 } else if (typeof rti == "function") { 3472 } else if (typeof rti == "function") {
3473 return new RuntimeTypePlain(rti.name); 3473 return new RuntimeTypePlain(rti.name);
3474 } else if (rti.constructor == Array) { 3474 } else if (rti.constructor == Array) {
3475 let list = dart.as(rti, core.List); 3475 let list = dart.as(rti, core.List);
3476 let name = list.get(0).name; 3476 let name = list[core.$get](0).name;
3477 let arguments$ = new core.List.from([]); 3477 let arguments$ = new core.List.from([]);
3478 for (let i = 1; dart.notNull(i) < dart.notNull(list.length); i = dart.notN ull(i) + 1) { 3478 for (let i = 1; dart.notNull(i) < dart.notNull(list[core.$length]); i = da rt.notNull(i) + 1) {
3479 arguments$.add(convertRtiToRuntimeType(list.get(i))); 3479 arguments$[core.$add](convertRtiToRuntimeType(list[core.$get](i)));
3480 } 3480 }
3481 return new RuntimeTypeGeneric(name, dart.as(arguments$, core.List$(Runtime Type)), rti); 3481 return new RuntimeTypeGeneric(name, dart.as(arguments$, core.List$(Runtime Type)), rti);
3482 } else if ("func" in rti) { 3482 } else if ("func" in rti) {
3483 return new FunctionTypeInfoDecoderRing(rti).toRuntimeType(); 3483 return new FunctionTypeInfoDecoderRing(rti).toRuntimeType();
3484 } else { 3484 } else {
3485 throw new RuntimeError("Cannot convert " + `'${JSON.stringify(rti)}' to Ru ntimeType.`); 3485 throw new RuntimeError("Cannot convert " + `'${JSON.stringify(rti)}' to Ru ntimeType.`);
3486 } 3486 }
3487 } 3487 }
3488 class RuntimeTypePlain extends RuntimeType { 3488 class RuntimeTypePlain extends RuntimeType {
3489 RuntimeTypePlain(name) { 3489 RuntimeTypePlain(name) {
(...skipping 25 matching lines...) Expand all
3515 let result = [allClasses[this.name]]; 3515 let result = [allClasses[this.name]];
3516 if (dart.dindex(result, 0) == null) { 3516 if (dart.dindex(result, 0) == null) {
3517 throw `no type for '${this.name}<...>'`; 3517 throw `no type for '${this.name}<...>'`;
3518 } 3518 }
3519 for (let argument of this.arguments) { 3519 for (let argument of this.arguments) {
3520 result.push(argument.toRti()); 3520 result.push(argument.toRti());
3521 } 3521 }
3522 return this.rti = result; 3522 return this.rti = result;
3523 } 3523 }
3524 toString() { 3524 toString() {
3525 return `${this.name}<${this.arguments.join(", ")}>`; 3525 return `${this.name}<${this.arguments[core.$join](", ")}>`;
3526 } 3526 }
3527 } 3527 }
3528 let _typeData = Symbol('_typeData'); 3528 let _typeData = Symbol('_typeData');
3529 let _cachedToString = Symbol('_cachedToString'); 3529 let _cachedToString = Symbol('_cachedToString');
3530 let _hasReturnType = Symbol('_hasReturnType'); 3530 let _hasReturnType = Symbol('_hasReturnType');
3531 let _returnType = Symbol('_returnType'); 3531 let _returnType = Symbol('_returnType');
3532 let _isVoid = Symbol('_isVoid'); 3532 let _isVoid = Symbol('_isVoid');
3533 let _hasArguments = Symbol('_hasArguments'); 3533 let _hasArguments = Symbol('_hasArguments');
3534 let _hasOptionalArguments = Symbol('_hasOptionalArguments'); 3534 let _hasOptionalArguments = Symbol('_hasOptionalArguments');
3535 let _optionalArguments = Symbol('_optionalArguments'); 3535 let _optionalArguments = Symbol('_optionalArguments');
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
3664 }); 3664 });
3665 exports.deferredLoadHook = null; 3665 exports.deferredLoadHook = null;
3666 // Function loadDeferredLibrary: (String) → Future<Null> 3666 // Function loadDeferredLibrary: (String) → Future<Null>
3667 function loadDeferredLibrary(loadId) { 3667 function loadDeferredLibrary(loadId) {
3668 let urisMap = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_names.DEFE RRED_LIBRARY_URIS); 3668 let urisMap = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_names.DEFE RRED_LIBRARY_URIS);
3669 let uris = dart.as(urisMap[loadId], core.List$(core.String)); 3669 let uris = dart.as(urisMap[loadId], core.List$(core.String));
3670 let hashesMap = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_names.DE FERRED_LIBRARY_HASHES); 3670 let hashesMap = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_names.DE FERRED_LIBRARY_HASHES);
3671 let hashes = dart.as(hashesMap[loadId], core.List$(core.String)); 3671 let hashes = dart.as(hashesMap[loadId], core.List$(core.String));
3672 if (uris == null) 3672 if (uris == null)
3673 return dart.as(new async.Future.value(null), async.Future$(core.Null)); 3673 return dart.as(new async.Future.value(null), async.Future$(core.Null));
3674 let indices = new core.List.generate(uris.length, dart.closureWrap((i) => i, "(int) → dynamic")); 3674 let indices = new core.List.generate(uris[core.$length], dart.closureWrap((i ) => i, "(int) → dynamic"));
3675 let isHunkLoaded = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_names .IS_HUNK_LOADED); 3675 let isHunkLoaded = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_names .IS_HUNK_LOADED);
3676 let isHunkInitialized = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_ names.IS_HUNK_INITIALIZED); 3676 let isHunkInitialized = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_ names.IS_HUNK_INITIALIZED);
3677 let indicesToLoad = indices.where((i) => !isHunkLoaded(hashes.get(i))).toLis t(); 3677 let indicesToLoad = indices[core.$where]((i) => !isHunkLoaded(hashes[core.$g et](i)))[core.$toList]();
3678 return dart.as(async.Future.wait(dart.as(indicesToLoad.map((i) => _loadHunk( uris.get(i))), core.Iterable$(async.Future))).then(dart.closureWrap((_) => { 3678 return dart.as(async.Future.wait(dart.as(indicesToLoad[core.$map]((i) => _lo adHunk(uris[core.$get](i))), core.Iterable$(async.Future))).then(dart.closureWra p((_) => {
3679 let indicesToInitialize = indices.where((i) => !isHunkInitialized(hashes.g et(i))).toList(); 3679 let indicesToInitialize = indices[core.$where]((i) => !isHunkInitialized(h ashes[core.$get](i)))[core.$toList]();
3680 for (let i of indicesToInitialize) { 3680 for (let i of indicesToInitialize) {
3681 let initializer = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_na mes.INITIALIZE_LOADED_HUNK); 3681 let initializer = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_na mes.INITIALIZE_LOADED_HUNK);
3682 initializer(hashes.get(i)); 3682 initializer(hashes[core.$get](i));
3683 } 3683 }
3684 let updated = exports._loadedLibraries.add(loadId); 3684 let updated = exports._loadedLibraries.add(loadId);
3685 if (dart.notNull(updated) && dart.notNull(exports.deferredLoadHook != null )) { 3685 if (dart.notNull(updated) && dart.notNull(exports.deferredLoadHook != null )) {
3686 exports.deferredLoadHook(); 3686 exports.deferredLoadHook();
3687 } 3687 }
3688 }, "(List<dynamic>) → dynamic")), async.Future$(core.Null)); 3688 }, "(List<dynamic>) → dynamic")), async.Future$(core.Null));
3689 } 3689 }
3690 // Function _loadHunk: (String) → Future<Null> 3690 // Function _loadHunk: (String) → Future<Null>
3691 function _loadHunk(hunkName) { 3691 function _loadHunk(hunkName) {
3692 let future = exports._loadingLibraries.get(hunkName); 3692 let future = exports._loadingLibraries.get(hunkName);
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
4002 exports.UnimplementedNoSuchMethodError = UnimplementedNoSuchMethodError; 4002 exports.UnimplementedNoSuchMethodError = UnimplementedNoSuchMethodError;
4003 exports.random64 = random64; 4003 exports.random64 = random64;
4004 exports.jsonEncodeNative = jsonEncodeNative; 4004 exports.jsonEncodeNative = jsonEncodeNative;
4005 exports.getIsolateAffinityTag = getIsolateAffinityTag; 4005 exports.getIsolateAffinityTag = getIsolateAffinityTag;
4006 exports.loadDeferredLibrary = loadDeferredLibrary; 4006 exports.loadDeferredLibrary = loadDeferredLibrary;
4007 exports.MainError = MainError; 4007 exports.MainError = MainError;
4008 exports.missingMain = missingMain; 4008 exports.missingMain = missingMain;
4009 exports.badMain = badMain; 4009 exports.badMain = badMain;
4010 exports.mainHasTooManyParameters = mainHasTooManyParameters; 4010 exports.mainHasTooManyParameters = mainHasTooManyParameters;
4011 })(_js_helper || (_js_helper = {})); 4011 })(_js_helper || (_js_helper = {}));
OLDNEW
« no previous file with comments | « lib/runtime/dart/_isolate_helper.js ('k') | lib/runtime/dart/_native_typed_data.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698