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

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

Issue 1152583002: Add constructors to signatures (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 var _js_helper = dart.defineLibrary(_js_helper, {}); 1 var _js_helper = dart.defineLibrary(_js_helper, {});
2 var core = dart.import(core); 2 var core = dart.import(core);
3 var collection = dart.import(collection); 3 var collection = dart.import(collection);
4 var _internal = dart.import(_internal); 4 var _internal = dart.import(_internal);
5 var _foreign_helper = dart.import(_foreign_helper); 5 var _foreign_helper = dart.import(_foreign_helper);
6 var _js_embedded_names = dart.import(_js_embedded_names); 6 var _js_embedded_names = dart.import(_js_embedded_names);
7 var _interceptors = dart.lazyImport(_interceptors); 7 var _interceptors = dart.lazyImport(_interceptors);
8 var _js_names = dart.import(_js_names); 8 var _js_names = dart.import(_js_names);
9 var async = dart.import(async); 9 var async = dart.import(async);
10 var _isolate_helper = dart.lazyImport(_isolate_helper); 10 var _isolate_helper = dart.lazyImport(_isolate_helper);
11 (function(exports, core, collection, _internal, _foreign_helper, _js_embedded_na mes, _interceptors, _js_names, async, _isolate_helper) { 11 (function(exports, core, collection, _internal, _foreign_helper, _js_embedded_na mes, _interceptors, _js_names, async, _isolate_helper) {
12 'use strict'; 12 'use strict';
13 class NoSideEffects extends core.Object { 13 class NoSideEffects extends core.Object {
14 NoSideEffects() { 14 NoSideEffects() {
15 } 15 }
16 } 16 }
17 dart.setSignature(NoSideEffects, {
18 constructors: () => ({NoSideEffects: [NoSideEffects, []]})
19 });
17 class NoThrows extends core.Object { 20 class NoThrows extends core.Object {
18 NoThrows() { 21 NoThrows() {
19 } 22 }
20 } 23 }
24 dart.setSignature(NoThrows, {
25 constructors: () => ({NoThrows: [NoThrows, []]})
26 });
21 class NoInline extends core.Object { 27 class NoInline extends core.Object {
22 NoInline() { 28 NoInline() {
23 } 29 }
24 } 30 }
31 dart.setSignature(NoInline, {
32 constructors: () => ({NoInline: [NoInline, []]})
33 });
25 class IrRepresentation extends core.Object { 34 class IrRepresentation extends core.Object {
26 IrRepresentation(value) { 35 IrRepresentation(value) {
27 this.value = value; 36 this.value = value;
28 } 37 }
29 } 38 }
39 dart.setSignature(IrRepresentation, {
40 constructors: () => ({IrRepresentation: [IrRepresentation, [core.bool]]})
41 });
30 class Native extends core.Object { 42 class Native extends core.Object {
31 Native(name) { 43 Native(name) {
32 this.name = name; 44 this.name = name;
33 } 45 }
34 } 46 }
47 dart.setSignature(Native, {
48 constructors: () => ({Native: [Native, [core.String]]})
49 });
35 let _throwUnmodifiable = Symbol('_throwUnmodifiable'); 50 let _throwUnmodifiable = Symbol('_throwUnmodifiable');
36 let ConstantMap$ = dart.generic(function(K, V) { 51 let ConstantMap$ = dart.generic(function(K, V) {
37 class ConstantMap extends core.Object { 52 class ConstantMap extends core.Object {
38 _() { 53 _() {
39 } 54 }
40 get isEmpty() { 55 get isEmpty() {
41 return this.length == 0; 56 return this.length == 0;
42 } 57 }
43 get isNotEmpty() { 58 get isNotEmpty() {
44 return !dart.notNull(this.isEmpty); 59 return !dart.notNull(this.isEmpty);
(...skipping 21 matching lines...) Expand all
66 return this[_throwUnmodifiable](); 81 return this[_throwUnmodifiable]();
67 } 82 }
68 addAll(other) { 83 addAll(other) {
69 dart.as(other, core.Map$(K, V)); 84 dart.as(other, core.Map$(K, V));
70 return this[_throwUnmodifiable](); 85 return this[_throwUnmodifiable]();
71 } 86 }
72 } 87 }
73 ConstantMap[dart.implements] = () => [core.Map$(K, V)]; 88 ConstantMap[dart.implements] = () => [core.Map$(K, V)];
74 dart.defineNamedConstructor(ConstantMap, '_'); 89 dart.defineNamedConstructor(ConstantMap, '_');
75 dart.setSignature(ConstantMap, { 90 dart.setSignature(ConstantMap, {
91 constructors: () => ({_: [ConstantMap$(K, V), []]}),
76 methods: () => ({ 92 methods: () => ({
77 [_throwUnmodifiable]: [core.Object, []], 93 [_throwUnmodifiable]: [core.Object, []],
78 set: [dart.void, [K, V]], 94 set: [dart.void, [K, V]],
79 putIfAbsent: [V, [K, dart.functionType(V, [])]], 95 putIfAbsent: [V, [K, dart.functionType(V, [])]],
80 remove: [V, [core.Object]], 96 remove: [V, [core.Object]],
81 clear: [dart.void, []], 97 clear: [dart.void, []],
82 addAll: [dart.void, [core.Map$(K, V)]] 98 addAll: [dart.void, [core.Map$(K, V)]]
83 }) 99 })
84 }); 100 });
85 return ConstantMap; 101 return ConstantMap;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 get keys() { 141 get keys() {
126 return new (_ConstantMapKeyIterable$(K))(this); 142 return new (_ConstantMapKeyIterable$(K))(this);
127 } 143 }
128 get values() { 144 get values() {
129 return new (_internal.MappedIterable$(K, V))(this[_keys], dart.fn((key = > dart.as(this[_fetch](key), V)).bind(this), V, [core.Object])); 145 return new (_internal.MappedIterable$(K, V))(this[_keys], dart.fn((key = > dart.as(this[_fetch](key), V)).bind(this), V, [core.Object]));
130 } 146 }
131 } 147 }
132 ConstantStringMap[dart.implements] = () => [_internal.EfficientLength]; 148 ConstantStringMap[dart.implements] = () => [_internal.EfficientLength];
133 dart.defineNamedConstructor(ConstantStringMap, '_'); 149 dart.defineNamedConstructor(ConstantStringMap, '_');
134 dart.setSignature(ConstantStringMap, { 150 dart.setSignature(ConstantStringMap, {
151 constructors: () => ({_: [ConstantStringMap$(K, V), [core.int, core.Object , core.List$(K)]]}),
135 methods: () => ({ 152 methods: () => ({
136 containsValue: [core.bool, [core.Object]], 153 containsValue: [core.bool, [core.Object]],
137 containsKey: [core.bool, [core.Object]], 154 containsKey: [core.bool, [core.Object]],
138 get: [V, [core.Object]], 155 get: [V, [core.Object]],
139 [_fetch]: [core.Object, [core.Object]], 156 [_fetch]: [core.Object, [core.Object]],
140 forEach: [dart.void, [dart.functionType(dart.void, [K, V])]] 157 forEach: [dart.void, [dart.functionType(dart.void, [K, V])]]
141 }) 158 })
142 }); 159 });
143 return ConstantStringMap; 160 return ConstantStringMap;
144 }); 161 });
(...skipping 10 matching lines...) Expand all
155 return false; 172 return false;
156 if (dart.equals('__proto__', key)) 173 if (dart.equals('__proto__', key))
157 return true; 174 return true;
158 return jsHasOwnProperty(this[_jsObject], dart.as(key, core.String)); 175 return jsHasOwnProperty(this[_jsObject], dart.as(key, core.String));
159 } 176 }
160 [_fetch](key) { 177 [_fetch](key) {
161 return dart.equals('__proto__', key) ? this[_protoValue] : jsPropertyAcc ess(this[_jsObject], dart.as(key, core.String)); 178 return dart.equals('__proto__', key) ? this[_protoValue] : jsPropertyAcc ess(this[_jsObject], dart.as(key, core.String));
162 } 179 }
163 } 180 }
164 dart.defineNamedConstructor(ConstantProtoMap, '_'); 181 dart.defineNamedConstructor(ConstantProtoMap, '_');
182 dart.setSignature(ConstantProtoMap, {
183 constructors: () => ({_: [ConstantProtoMap$(K, V), [core.Object, core.Obje ct, core.Object, V]]})
184 });
165 return ConstantProtoMap; 185 return ConstantProtoMap;
166 }); 186 });
167 let ConstantProtoMap = ConstantProtoMap$(); 187 let ConstantProtoMap = ConstantProtoMap$();
168 let _map = Symbol('_map'); 188 let _map = Symbol('_map');
169 let _ConstantMapKeyIterable$ = dart.generic(function(K) { 189 let _ConstantMapKeyIterable$ = dart.generic(function(K) {
170 class _ConstantMapKeyIterable extends collection.IterableBase$(K) { 190 class _ConstantMapKeyIterable extends collection.IterableBase$(K) {
171 _ConstantMapKeyIterable(map) { 191 _ConstantMapKeyIterable(map) {
172 this[_map] = map; 192 this[_map] = map;
173 super.IterableBase(); 193 super.IterableBase();
174 } 194 }
175 get [core.$iterator]() { 195 get [core.$iterator]() {
176 return this[_map][_keys][core.$iterator]; 196 return this[_map][_keys][core.$iterator];
177 } 197 }
178 get [core.$length]() { 198 get [core.$length]() {
179 return this[_map][_keys][core.$length]; 199 return this[_map][_keys][core.$length];
180 } 200 }
181 } 201 }
202 dart.setSignature(_ConstantMapKeyIterable, {
203 constructors: () => ({_ConstantMapKeyIterable: [_ConstantMapKeyIterable$(K ), [ConstantStringMap$(K, core.Object)]]})
204 });
182 return _ConstantMapKeyIterable; 205 return _ConstantMapKeyIterable;
183 }); 206 });
184 let _ConstantMapKeyIterable = _ConstantMapKeyIterable$(); 207 let _ConstantMapKeyIterable = _ConstantMapKeyIterable$();
185 let _jsData = Symbol('_jsData'); 208 let _jsData = Symbol('_jsData');
186 let _getMap = Symbol('_getMap'); 209 let _getMap = Symbol('_getMap');
187 let GeneralConstantMap$ = dart.generic(function(K, V) { 210 let GeneralConstantMap$ = dart.generic(function(K, V) {
188 class GeneralConstantMap extends ConstantMap$(K, V) { 211 class GeneralConstantMap extends ConstantMap$(K, V) {
189 GeneralConstantMap(jsData) { 212 GeneralConstantMap(jsData) {
190 this[_jsData] = jsData; 213 this[_jsData] = jsData;
191 super._(); 214 super._();
(...skipping 22 matching lines...) Expand all
214 return this[_getMap]().keys; 237 return this[_getMap]().keys;
215 } 238 }
216 get values() { 239 get values() {
217 return this[_getMap]().values; 240 return this[_getMap]().values;
218 } 241 }
219 get length() { 242 get length() {
220 return this[_getMap]().length; 243 return this[_getMap]().length;
221 } 244 }
222 } 245 }
223 dart.setSignature(GeneralConstantMap, { 246 dart.setSignature(GeneralConstantMap, {
247 constructors: () => ({GeneralConstantMap: [GeneralConstantMap$(K, V), [cor e.Object]]}),
224 methods: () => ({ 248 methods: () => ({
225 [_getMap]: [core.Map$(K, V), []], 249 [_getMap]: [core.Map$(K, V), []],
226 containsValue: [core.bool, [core.Object]], 250 containsValue: [core.bool, [core.Object]],
227 containsKey: [core.bool, [core.Object]], 251 containsKey: [core.bool, [core.Object]],
228 get: [V, [core.Object]], 252 get: [V, [core.Object]],
229 forEach: [dart.void, [dart.functionType(dart.void, [K, V])]] 253 forEach: [dart.void, [dart.functionType(dart.void, [K, V])]]
230 }) 254 })
231 }); 255 });
232 return GeneralConstantMap; 256 return GeneralConstantMap;
233 }); 257 });
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 } 640 }
617 get isMultiLine() { 641 get isMultiLine() {
618 return this[_isMultiLine]; 642 return this[_isMultiLine];
619 } 643 }
620 get isCaseSensitive() { 644 get isCaseSensitive() {
621 return this[_isCaseSensitive]; 645 return this[_isCaseSensitive];
622 } 646 }
623 } 647 }
624 JSSyntaxRegExp[dart.implements] = () => [core.RegExp]; 648 JSSyntaxRegExp[dart.implements] = () => [core.RegExp];
625 dart.setSignature(JSSyntaxRegExp, { 649 dart.setSignature(JSSyntaxRegExp, {
650 constructors: () => ({JSSyntaxRegExp: [JSSyntaxRegExp, [core.String], {ultiL in: core.bool, aseSensitiv: core.bool}]}),
626 methods: () => ({ 651 methods: () => ({
627 firstMatch: [core.Match, [core.String]], 652 firstMatch: [core.Match, [core.String]],
628 hasMatch: [core.bool, [core.String]], 653 hasMatch: [core.bool, [core.String]],
629 stringMatch: [core.String, [core.String]], 654 stringMatch: [core.String, [core.String]],
630 allMatches: [core.Iterable$(core.Match), [core.String], [core.int]], 655 allMatches: [core.Iterable$(core.Match), [core.String], [core.int]],
631 [_execGlobal]: [core.Match, [core.String, core.int]], 656 [_execGlobal]: [core.Match, [core.String, core.int]],
632 [_execAnchored]: [core.Match, [core.String, core.int]], 657 [_execAnchored]: [core.Match, [core.String, core.int]],
633 matchAsPrefix: [core.Match, [core.String], [core.int]] 658 matchAsPrefix: [core.Match, [core.String], [core.int]]
634 }), 659 }),
635 statics: () => ({makeNative: [core.Object, [core.String, core.bool, core.boo l, core.bool]]}), 660 statics: () => ({makeNative: [core.Object, [core.String, core.bool, core.boo l, core.bool]]}),
(...skipping 28 matching lines...) Expand all
664 groups(groups) { 689 groups(groups) {
665 let out = dart.setType([], core.List$(core.String)); 690 let out = dart.setType([], core.List$(core.String));
666 for (let i of groups) { 691 for (let i of groups) {
667 out[core.$add](this.group(i)); 692 out[core.$add](this.group(i));
668 } 693 }
669 return out; 694 return out;
670 } 695 }
671 } 696 }
672 _MatchImplementation[dart.implements] = () => [core.Match]; 697 _MatchImplementation[dart.implements] = () => [core.Match];
673 dart.setSignature(_MatchImplementation, { 698 dart.setSignature(_MatchImplementation, {
699 constructors: () => ({_MatchImplementation: [_MatchImplementation, [core.Pat tern, core.List$(core.String)]]}),
674 methods: () => ({ 700 methods: () => ({
675 group: [core.String, [core.int]], 701 group: [core.String, [core.int]],
676 get: [core.String, [core.int]], 702 get: [core.String, [core.int]],
677 groups: [core.List$(core.String), [core.List$(core.int)]] 703 groups: [core.List$(core.String), [core.List$(core.int)]]
678 }) 704 })
679 }); 705 });
680 let _re = Symbol('_re'); 706 let _re = Symbol('_re');
681 let _string = Symbol('_string'); 707 let _string = Symbol('_string');
682 let _start = Symbol('_start'); 708 let _start = Symbol('_start');
683 class _AllMatchesIterable extends collection.IterableBase$(core.Match) { 709 class _AllMatchesIterable extends collection.IterableBase$(core.Match) {
684 _AllMatchesIterable(re, string, start) { 710 _AllMatchesIterable(re, string, start) {
685 this[_re] = re; 711 this[_re] = re;
686 this[_string] = string; 712 this[_string] = string;
687 this[_start] = start; 713 this[_start] = start;
688 super.IterableBase(); 714 super.IterableBase();
689 } 715 }
690 get [core.$iterator]() { 716 get [core.$iterator]() {
691 return new _AllMatchesIterator(this[_re], this[_string], this[_start]); 717 return new _AllMatchesIterator(this[_re], this[_string], this[_start]);
692 } 718 }
693 } 719 }
720 dart.setSignature(_AllMatchesIterable, {
721 constructors: () => ({_AllMatchesIterable: [_AllMatchesIterable, [JSSyntaxRe gExp, core.String, core.int]]})
722 });
694 let _regExp = Symbol('_regExp'); 723 let _regExp = Symbol('_regExp');
695 let _nextIndex = Symbol('_nextIndex'); 724 let _nextIndex = Symbol('_nextIndex');
696 let _current = Symbol('_current'); 725 let _current = Symbol('_current');
697 class _AllMatchesIterator extends core.Object { 726 class _AllMatchesIterator extends core.Object {
698 _AllMatchesIterator(regExp, string, nextIndex) { 727 _AllMatchesIterator(regExp, string, nextIndex) {
699 this[_regExp] = regExp; 728 this[_regExp] = regExp;
700 this[_string] = string; 729 this[_string] = string;
701 this[_nextIndex] = nextIndex; 730 this[_nextIndex] = nextIndex;
702 this[_current] = null; 731 this[_current] = null;
703 } 732 }
(...skipping 15 matching lines...) Expand all
719 return true; 748 return true;
720 } 749 }
721 } 750 }
722 this[_current] = null; 751 this[_current] = null;
723 this[_string] = null; 752 this[_string] = null;
724 return false; 753 return false;
725 } 754 }
726 } 755 }
727 _AllMatchesIterator[dart.implements] = () => [core.Iterator$(core.Match)]; 756 _AllMatchesIterator[dart.implements] = () => [core.Iterator$(core.Match)];
728 dart.setSignature(_AllMatchesIterator, { 757 dart.setSignature(_AllMatchesIterator, {
758 constructors: () => ({_AllMatchesIterator: [_AllMatchesIterator, [JSSyntaxRe gExp, core.String, core.int]]}),
729 methods: () => ({moveNext: [core.bool, []]}) 759 methods: () => ({moveNext: [core.bool, []]})
730 }); 760 });
731 function firstMatchAfter(regExp, string, start) { 761 function firstMatchAfter(regExp, string, start) {
732 return regExp[_execGlobal](string, start); 762 return regExp[_execGlobal](string, start);
733 } 763 }
734 dart.fn(firstMatchAfter, core.Match, [JSSyntaxRegExp, core.String, core.int]); 764 dart.fn(firstMatchAfter, core.Match, [JSSyntaxRegExp, core.String, core.int]);
735 class StringMatch extends core.Object { 765 class StringMatch extends core.Object {
736 StringMatch(start, input, pattern) { 766 StringMatch(start, input, pattern) {
737 this.start = start; 767 this.start = start;
738 this.input = input; 768 this.input = input;
(...skipping 17 matching lines...) Expand all
756 groups(groups_) { 786 groups(groups_) {
757 let result = new (core.List$(core.String))(); 787 let result = new (core.List$(core.String))();
758 for (let g of groups_) { 788 for (let g of groups_) {
759 result[core.$add](this.group(g)); 789 result[core.$add](this.group(g));
760 } 790 }
761 return result; 791 return result;
762 } 792 }
763 } 793 }
764 StringMatch[dart.implements] = () => [core.Match]; 794 StringMatch[dart.implements] = () => [core.Match];
765 dart.setSignature(StringMatch, { 795 dart.setSignature(StringMatch, {
796 constructors: () => ({StringMatch: [StringMatch, [core.int, core.String, cor e.String]]}),
766 methods: () => ({ 797 methods: () => ({
767 get: [core.String, [core.int]], 798 get: [core.String, [core.int]],
768 group: [core.String, [core.int]], 799 group: [core.String, [core.int]],
769 groups: [core.List$(core.String), [core.List$(core.int)]] 800 groups: [core.List$(core.String), [core.List$(core.int)]]
770 }) 801 })
771 }); 802 });
772 function allMatchesInStringUnchecked(needle, haystack, startIndex) { 803 function allMatchesInStringUnchecked(needle, haystack, startIndex) {
773 let result = new (core.List$(core.Match))(); 804 let result = new (core.List$(core.Match))();
774 let length = haystack.length; 805 let length = haystack.length;
775 let patternLength = needle.length; 806 let patternLength = needle.length;
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 return this[_unmangledName] = unmangledName; 992 return this[_unmangledName] = unmangledName;
962 } 993 }
963 get hashCode() { 994 get hashCode() {
964 return dart.hashCode(this[_typeName]); 995 return dart.hashCode(this[_typeName]);
965 } 996 }
966 ['=='](other) { 997 ['=='](other) {
967 return dart.is(other, TypeImpl) && dart.equals(this[_typeName], dart.dload (other, _typeName)); 998 return dart.is(other, TypeImpl) && dart.equals(this[_typeName], dart.dload (other, _typeName));
968 } 999 }
969 } 1000 }
970 TypeImpl[dart.implements] = () => [core.Type]; 1001 TypeImpl[dart.implements] = () => [core.Type];
1002 dart.setSignature(TypeImpl, {
1003 constructors: () => ({TypeImpl: [TypeImpl, [core.String]]})
1004 });
971 class TypeVariable extends core.Object { 1005 class TypeVariable extends core.Object {
972 TypeVariable(owner, name, bound) { 1006 TypeVariable(owner, name, bound) {
973 this.owner = owner; 1007 this.owner = owner;
974 this.name = name; 1008 this.name = name;
975 this.bound = bound; 1009 this.bound = bound;
976 } 1010 }
977 } 1011 }
1012 dart.setSignature(TypeVariable, {
1013 constructors: () => ({TypeVariable: [TypeVariable, [core.Type, core.String, core.int]]})
1014 });
978 function getMangledTypeName(type) { 1015 function getMangledTypeName(type) {
979 return type[_typeName]; 1016 return type[_typeName];
980 } 1017 }
981 dart.fn(getMangledTypeName, core.Object, [TypeImpl]); 1018 dart.fn(getMangledTypeName, core.Object, [TypeImpl]);
982 function setRuntimeTypeInfo(target, typeInfo) { 1019 function setRuntimeTypeInfo(target, typeInfo) {
983 dart.assert(dart.notNull(typeInfo == null) || dart.notNull(isJsArray(typeInf o))); 1020 dart.assert(dart.notNull(typeInfo == null) || dart.notNull(isJsArray(typeInf o)));
984 if (target != null) 1021 if (target != null)
985 target.$builtinTypeInfo = typeInfo; 1022 target.$builtinTypeInfo = typeInfo;
986 return target; 1023 return target;
987 } 1024 }
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
1412 } 1449 }
1413 dart.fn(unmangleGlobalNameIfPreservedAnyways, core.String, [core.String]); 1450 dart.fn(unmangleGlobalNameIfPreservedAnyways, core.String, [core.String]);
1414 function unmangleAllIdentifiersIfPreservedAnyways(str) { 1451 function unmangleAllIdentifiersIfPreservedAnyways(str) {
1415 return str; 1452 return str;
1416 } 1453 }
1417 dart.fn(unmangleAllIdentifiersIfPreservedAnyways, core.String, [core.String]); 1454 dart.fn(unmangleAllIdentifiersIfPreservedAnyways, core.String, [core.String]);
1418 class _Patch extends core.Object { 1455 class _Patch extends core.Object {
1419 _Patch() { 1456 _Patch() {
1420 } 1457 }
1421 } 1458 }
1459 dart.setSignature(_Patch, {
1460 constructors: () => ({_Patch: [_Patch, []]})
1461 });
1422 let patch = dart.const(new _Patch()); 1462 let patch = dart.const(new _Patch());
1423 class InternalMap extends core.Object {} 1463 class InternalMap extends core.Object {}
1424 function requiresPreamble() { 1464 function requiresPreamble() {
1425 } 1465 }
1426 dart.fn(requiresPreamble); 1466 dart.fn(requiresPreamble);
1427 function isJsIndexable(object, record) { 1467 function isJsIndexable(object, record) {
1428 if (record != null) { 1468 if (record != null) {
1429 let result = _interceptors.dispatchRecordIndexability(record); 1469 let result = _interceptors.dispatchRecordIndexability(record);
1430 if (result != null) 1470 if (result != null)
1431 return dart.as(result, core.bool); 1471 return dart.as(result, core.bool);
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
1592 } else { 1632 } else {
1593 return dart.dsend(cached, 'invokeOn', victim, invocation[_arguments]); 1633 return dart.dsend(cached, 'invokeOn', victim, invocation[_arguments]);
1594 } 1634 }
1595 } 1635 }
1596 static getCachedInvocation(invocation, victim) { 1636 static getCachedInvocation(invocation, victim) {
1597 return invocation[_getCachedInvocation](victim); 1637 return invocation[_getCachedInvocation](victim);
1598 } 1638 }
1599 } 1639 }
1600 JSInvocationMirror[dart.implements] = () => [core.Invocation]; 1640 JSInvocationMirror[dart.implements] = () => [core.Invocation];
1601 dart.setSignature(JSInvocationMirror, { 1641 dart.setSignature(JSInvocationMirror, {
1642 constructors: () => ({JSInvocationMirror: [JSInvocationMirror, [core.Object, core.String, core.int, core.List, core.List]]}),
1602 methods: () => ({[_getCachedInvocation]: [core.Object, [core.Object]]}), 1643 methods: () => ({[_getCachedInvocation]: [core.Object, [core.Object]]}),
1603 statics: () => ({ 1644 statics: () => ({
1604 invokeFromMirror: [core.Object, [JSInvocationMirror, core.Object]], 1645 invokeFromMirror: [core.Object, [JSInvocationMirror, core.Object]],
1605 getCachedInvocation: [core.Object, [JSInvocationMirror, core.Object]] 1646 getCachedInvocation: [core.Object, [JSInvocationMirror, core.Object]]
1606 }), 1647 }),
1607 names: ['invokeFromMirror', 'getCachedInvocation'] 1648 names: ['invokeFromMirror', 'getCachedInvocation']
1608 }); 1649 });
1609 JSInvocationMirror.METHOD = 0; 1650 JSInvocationMirror.METHOD = 0;
1610 JSInvocationMirror.GETTER = 1; 1651 JSInvocationMirror.GETTER = 1;
1611 JSInvocationMirror.SETTER = 2; 1652 JSInvocationMirror.SETTER = 2;
(...skipping 19 matching lines...) Expand all
1631 let _ = [victim]; 1672 let _ = [victim];
1632 _[core.$addAll](arguments$); 1673 _[core.$addAll](arguments$);
1633 arguments$ = _; 1674 arguments$ = _;
1634 if (this.cachedInterceptor != null) 1675 if (this.cachedInterceptor != null)
1635 receiver = this.cachedInterceptor; 1676 receiver = this.cachedInterceptor;
1636 } 1677 }
1637 return this.jsFunction.apply(receiver, arguments$); 1678 return this.jsFunction.apply(receiver, arguments$);
1638 } 1679 }
1639 } 1680 }
1640 dart.setSignature(CachedInvocation, { 1681 dart.setSignature(CachedInvocation, {
1682 constructors: () => ({CachedInvocation: [CachedInvocation, [core.String, cor e.Object, core.bool, _interceptors.Interceptor]]}),
1641 methods: () => ({invokeOn: [core.Object, [core.Object, core.List]]}) 1683 methods: () => ({invokeOn: [core.Object, [core.Object, core.List]]})
1642 }); 1684 });
1643 class CachedCatchAllInvocation extends CachedInvocation { 1685 class CachedCatchAllInvocation extends CachedInvocation {
1644 CachedCatchAllInvocation(name, jsFunction, isIntercepted, cachedInterceptor) { 1686 CachedCatchAllInvocation(name, jsFunction, isIntercepted, cachedInterceptor) {
1645 this.info = new ReflectionInfo(jsFunction); 1687 this.info = new ReflectionInfo(jsFunction);
1646 super.CachedInvocation(name, jsFunction, isIntercepted, cachedInterceptor) ; 1688 super.CachedInvocation(name, jsFunction, isIntercepted, cachedInterceptor) ;
1647 } 1689 }
1648 get isGetterStub() { 1690 get isGetterStub() {
1649 return false; 1691 return false;
1650 } 1692 }
(...skipping 25 matching lines...) Expand all
1676 throw new UnimplementedNoSuchMethodError(`Invocation of unstubbed method '${this.info.reflectionName}'` + ` with ${providedArgumentCount} arguments (too few).`); 1718 throw new UnimplementedNoSuchMethodError(`Invocation of unstubbed method '${this.info.reflectionName}'` + ` with ${providedArgumentCount} arguments (too few).`);
1677 } else if (dart.notNull(providedArgumentCount) > dart.notNull(fullParamete rCount)) { 1719 } else if (dart.notNull(providedArgumentCount) > dart.notNull(fullParamete rCount)) {
1678 throw new UnimplementedNoSuchMethodError(`Invocation of unstubbed method '${this.info.reflectionName}'` + ` with ${providedArgumentCount} arguments (too many).`); 1720 throw new UnimplementedNoSuchMethodError(`Invocation of unstubbed method '${this.info.reflectionName}'` + ` with ${providedArgumentCount} arguments (too many).`);
1679 } 1721 }
1680 for (let i = providedArgumentCount; dart.notNull(i) < dart.notNull(fullPar ameterCount); i = dart.notNull(i) + 1) { 1722 for (let i = providedArgumentCount; dart.notNull(i) < dart.notNull(fullPar ameterCount); i = dart.notNull(i) + 1) {
1681 arguments$[core.$add](getMetadata(this.info.defaultValue(i))); 1723 arguments$[core.$add](getMetadata(this.info.defaultValue(i)));
1682 } 1724 }
1683 return this.jsFunction.apply(receiver, arguments$); 1725 return this.jsFunction.apply(receiver, arguments$);
1684 } 1726 }
1685 } 1727 }
1728 dart.setSignature(CachedCatchAllInvocation, {
1729 constructors: () => ({CachedCatchAllInvocation: [CachedCatchAllInvocation, [ core.String, core.Object, core.bool, _interceptors.Interceptor]]})
1730 });
1686 class CachedNoSuchMethodInvocation extends core.Object { 1731 class CachedNoSuchMethodInvocation extends core.Object {
1687 CachedNoSuchMethodInvocation(interceptor) { 1732 CachedNoSuchMethodInvocation(interceptor) {
1688 this.interceptor = interceptor; 1733 this.interceptor = interceptor;
1689 } 1734 }
1690 get isNoSuchMethod() { 1735 get isNoSuchMethod() {
1691 return true; 1736 return true;
1692 } 1737 }
1693 get isGetterStub() { 1738 get isGetterStub() {
1694 return false; 1739 return false;
1695 } 1740 }
1696 invokeOn(victim, invocation) { 1741 invokeOn(victim, invocation) {
1697 let receiver = this.interceptor == null ? victim : this.interceptor; 1742 let receiver = this.interceptor == null ? victim : this.interceptor;
1698 return dart.dsend(receiver, 'noSuchMethod', invocation); 1743 return dart.dsend(receiver, 'noSuchMethod', invocation);
1699 } 1744 }
1700 } 1745 }
1701 dart.setSignature(CachedNoSuchMethodInvocation, { 1746 dart.setSignature(CachedNoSuchMethodInvocation, {
1747 constructors: () => ({CachedNoSuchMethodInvocation: [CachedNoSuchMethodInvoc ation, [core.Object]]}),
1702 methods: () => ({invokeOn: [core.Object, [core.Object, core.Invocation]]}) 1748 methods: () => ({invokeOn: [core.Object, [core.Object, core.Invocation]]})
1703 }); 1749 });
1704 class ReflectionInfo extends core.Object { 1750 class ReflectionInfo extends core.Object {
1705 internal(jsFunction, data, isAccessor, requiredParameterCount, optionalParam eterCount, areOptionalParametersNamed, functionType) { 1751 internal(jsFunction, data, isAccessor, requiredParameterCount, optionalParam eterCount, areOptionalParametersNamed, functionType) {
1706 this.jsFunction = jsFunction; 1752 this.jsFunction = jsFunction;
1707 this.data = data; 1753 this.data = data;
1708 this.isAccessor = isAccessor; 1754 this.isAccessor = isAccessor;
1709 this.requiredParameterCount = requiredParameterCount; 1755 this.requiredParameterCount = requiredParameterCount;
1710 this.optionalParameterCount = optionalParameterCount; 1756 this.optionalParameterCount = optionalParameterCount;
1711 this.areOptionalParametersNamed = areOptionalParametersNamed; 1757 this.areOptionalParametersNamed = areOptionalParametersNamed;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
1799 } else { 1845 } else {
1800 throw new RuntimeError('Unexpected function type'); 1846 throw new RuntimeError('Unexpected function type');
1801 } 1847 }
1802 } 1848 }
1803 get reflectionName() { 1849 get reflectionName() {
1804 return this.jsFunction.$reflectionName; 1850 return this.jsFunction.$reflectionName;
1805 } 1851 }
1806 } 1852 }
1807 dart.defineNamedConstructor(ReflectionInfo, 'internal'); 1853 dart.defineNamedConstructor(ReflectionInfo, 'internal');
1808 dart.setSignature(ReflectionInfo, { 1854 dart.setSignature(ReflectionInfo, {
1855 constructors: () => ({
1856 internal: [ReflectionInfo, [core.Object, core.List, core.bool, core.int, c ore.int, core.bool, core.Object]],
1857 ReflectionInfo: [ReflectionInfo, [core.Object]]
1858 }),
1809 methods: () => ({ 1859 methods: () => ({
1810 parameterName: [core.String, [core.int]], 1860 parameterName: [core.String, [core.int]],
1811 parameterMetadataAnnotations: [core.List$(core.int), [core.int]], 1861 parameterMetadataAnnotations: [core.List$(core.int), [core.int]],
1812 defaultValue: [core.int, [core.int]], 1862 defaultValue: [core.int, [core.int]],
1813 defaultValueInOrder: [core.int, [core.int]], 1863 defaultValueInOrder: [core.int, [core.int]],
1814 parameterNameInOrder: [core.String, [core.int]], 1864 parameterNameInOrder: [core.String, [core.int]],
1815 sortedIndex: [core.int, [core.int]], 1865 sortedIndex: [core.int, [core.int]],
1816 computeFunctionRti: [core.Object, [core.Object]] 1866 computeFunctionRti: [core.Object, [core.Object]]
1817 }) 1867 })
1818 }); 1868 });
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
2521 (void 0).$method$; 2571 (void 0).$method$;
2522 } catch (e) { 2572 } catch (e) {
2523 return e.message; 2573 return e.message;
2524 } 2574 }
2525 2575
2526 }; 2576 };
2527 return func(); 2577 return func();
2528 } 2578 }
2529 } 2579 }
2530 dart.setSignature(TypeErrorDecoder, { 2580 dart.setSignature(TypeErrorDecoder, {
2581 constructors: () => ({TypeErrorDecoder: [TypeErrorDecoder, [core.int, core.i nt, core.int, core.int, core.int, core.String]]}),
2531 methods: () => ({matchTypeError: [core.Object, [core.Object]]}), 2582 methods: () => ({matchTypeError: [core.Object, [core.Object]]}),
2532 statics: () => ({ 2583 statics: () => ({
2533 buildJavaScriptObject: [core.Object, []], 2584 buildJavaScriptObject: [core.Object, []],
2534 buildJavaScriptObjectWithNonClosure: [core.Object, []], 2585 buildJavaScriptObjectWithNonClosure: [core.Object, []],
2535 extractPattern: [core.Object, [core.String]], 2586 extractPattern: [core.Object, [core.String]],
2536 provokeCallErrorOn: [core.String, [core.Object]], 2587 provokeCallErrorOn: [core.String, [core.Object]],
2537 provokeCallErrorOnNull: [core.String, []], 2588 provokeCallErrorOnNull: [core.String, []],
2538 provokeCallErrorOnUndefined: [core.String, []], 2589 provokeCallErrorOnUndefined: [core.String, []],
2539 provokePropertyErrorOn: [core.String, [core.Object]], 2590 provokePropertyErrorOn: [core.String, [core.Object]],
2540 provokePropertyErrorOnNull: [core.String, []], 2591 provokePropertyErrorOnNull: [core.String, []],
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
2581 this[_method] = match == null ? null : dart.as(match.method, core.String); 2632 this[_method] = match == null ? null : dart.as(match.method, core.String);
2582 super.Error(); 2633 super.Error();
2583 } 2634 }
2584 toString() { 2635 toString() {
2585 if (this[_method] == null) 2636 if (this[_method] == null)
2586 return `NullError: ${this[_message]}`; 2637 return `NullError: ${this[_message]}`;
2587 return `NullError: Cannot call "${this[_method]}" on null`; 2638 return `NullError: Cannot call "${this[_method]}" on null`;
2588 } 2639 }
2589 } 2640 }
2590 NullError[dart.implements] = () => [core.NoSuchMethodError]; 2641 NullError[dart.implements] = () => [core.NoSuchMethodError];
2642 dart.setSignature(NullError, {
2643 constructors: () => ({NullError: [NullError, [core.String, core.Object]]})
2644 });
2591 class JsNoSuchMethodError extends core.Error { 2645 class JsNoSuchMethodError extends core.Error {
2592 JsNoSuchMethodError(message, match) { 2646 JsNoSuchMethodError(message, match) {
2593 this[_message] = message; 2647 this[_message] = message;
2594 this[_method] = match == null ? null : dart.as(match.method, core.String); 2648 this[_method] = match == null ? null : dart.as(match.method, core.String);
2595 this[_receiver] = match == null ? null : dart.as(match.receiver, core.Stri ng); 2649 this[_receiver] = match == null ? null : dart.as(match.receiver, core.Stri ng);
2596 super.Error(); 2650 super.Error();
2597 } 2651 }
2598 toString() { 2652 toString() {
2599 if (this[_method] == null) 2653 if (this[_method] == null)
2600 return `NoSuchMethodError: ${this[_message]}`; 2654 return `NoSuchMethodError: ${this[_message]}`;
2601 if (this[_receiver] == null) { 2655 if (this[_receiver] == null) {
2602 return `NoSuchMethodError: Cannot call "${this[_method]}" (${this[_messa ge]})`; 2656 return `NoSuchMethodError: Cannot call "${this[_method]}" (${this[_messa ge]})`;
2603 } 2657 }
2604 return `NoSuchMethodError: Cannot call "${this[_method]}" on "${this[_rece iver]}" ` + `(${this[_message]})`; 2658 return `NoSuchMethodError: Cannot call "${this[_method]}" on "${this[_rece iver]}" ` + `(${this[_message]})`;
2605 } 2659 }
2606 } 2660 }
2607 JsNoSuchMethodError[dart.implements] = () => [core.NoSuchMethodError]; 2661 JsNoSuchMethodError[dart.implements] = () => [core.NoSuchMethodError];
2662 dart.setSignature(JsNoSuchMethodError, {
2663 constructors: () => ({JsNoSuchMethodError: [JsNoSuchMethodError, [core.Strin g, core.Object]]})
2664 });
2608 class UnknownJsTypeError extends core.Error { 2665 class UnknownJsTypeError extends core.Error {
2609 UnknownJsTypeError(message) { 2666 UnknownJsTypeError(message) {
2610 this[_message] = message; 2667 this[_message] = message;
2611 super.Error(); 2668 super.Error();
2612 } 2669 }
2613 toString() { 2670 toString() {
2614 return this[_message].isEmpty ? 'Error' : `Error: ${this[_message]}`; 2671 return this[_message].isEmpty ? 'Error' : `Error: ${this[_message]}`;
2615 } 2672 }
2616 } 2673 }
2674 dart.setSignature(UnknownJsTypeError, {
2675 constructors: () => ({UnknownJsTypeError: [UnknownJsTypeError, [core.String] ]})
2676 });
2617 function unwrapException(ex) { 2677 function unwrapException(ex) {
2618 let saveStackTrace = error => { 2678 let saveStackTrace = error => {
2619 if (dart.is(error, core.Error)) { 2679 if (dart.is(error, core.Error)) {
2620 let thrownStackTrace = error.$thrownJsError; 2680 let thrownStackTrace = error.$thrownJsError;
2621 if (thrownStackTrace == null) { 2681 if (thrownStackTrace == null) {
2622 error.$thrownJsError = ex; 2682 error.$thrownJsError = ex;
2623 } 2683 }
2624 } 2684 }
2625 return error; 2685 return error;
2626 }; 2686 };
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
2704 if (this[_trace] != null) 2764 if (this[_trace] != null)
2705 return this[_trace]; 2765 return this[_trace];
2706 let trace = null; 2766 let trace = null;
2707 if (typeof this[_exception] === "object") { 2767 if (typeof this[_exception] === "object") {
2708 trace = dart.as(this[_exception].stack, core.String); 2768 trace = dart.as(this[_exception].stack, core.String);
2709 } 2769 }
2710 return this[_trace] = trace == null ? '' : trace; 2770 return this[_trace] = trace == null ? '' : trace;
2711 } 2771 }
2712 } 2772 }
2713 _StackTrace[dart.implements] = () => [core.StackTrace]; 2773 _StackTrace[dart.implements] = () => [core.StackTrace];
2774 dart.setSignature(_StackTrace, {
2775 constructors: () => ({_StackTrace: [_StackTrace, [core.Object]]})
2776 });
2714 function objectHashCode(object) { 2777 function objectHashCode(object) {
2715 if (dart.notNull(object == null) || typeof object != 'object') { 2778 if (dart.notNull(object == null) || typeof object != 'object') {
2716 return dart.hashCode(object); 2779 return dart.hashCode(object);
2717 } else { 2780 } else {
2718 return Primitives.objectHashCode(object); 2781 return Primitives.objectHashCode(object);
2719 } 2782 }
2720 } 2783 }
2721 dart.fn(objectHashCode, core.int, [core.Object]); 2784 dart.fn(objectHashCode, core.int, [core.Object]);
2722 function fillLiteralMap(keyValuePairs, result) { 2785 function fillLiteralMap(keyValuePairs, result) {
2723 let index = 0; 2786 let index = 0;
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
3012 Closure.functionCounter = dart.notNull(x) + 1; 3075 Closure.functionCounter = dart.notNull(x) + 1;
3013 return x; 3076 return x;
3014 })()}` + '}')(); 3077 })()}` + '}')();
3015 } 3078 }
3016 toString() { 3079 toString() {
3017 return "Closure"; 3080 return "Closure";
3018 } 3081 }
3019 } 3082 }
3020 Closure[dart.implements] = () => [core.Function]; 3083 Closure[dart.implements] = () => [core.Function];
3021 dart.setSignature(Closure, { 3084 dart.setSignature(Closure, {
3085 constructors: () => ({Closure: [Closure, []]}),
3022 statics: () => ({ 3086 statics: () => ({
3023 fromTearOff: [core.Object, [core.Object, core.List, core.List, core.bool, core.Object, core.String]], 3087 fromTearOff: [core.Object, [core.Object, core.List, core.List, core.bool, core.Object, core.String]],
3024 cspForwardCall: [core.Object, [core.int, core.bool, core.String, core.Obje ct]], 3088 cspForwardCall: [core.Object, [core.int, core.bool, core.String, core.Obje ct]],
3025 forwardCallTo: [core.Object, [core.Object, core.Object, core.bool]], 3089 forwardCallTo: [core.Object, [core.Object, core.Object, core.bool]],
3026 cspForwardInterceptedCall: [core.Object, [core.int, core.bool, core.String , core.Object]], 3090 cspForwardInterceptedCall: [core.Object, [core.int, core.bool, core.String , core.Object]],
3027 forwardInterceptedCallTo: [core.Object, [core.Object, core.Object]] 3091 forwardInterceptedCallTo: [core.Object, [core.Object, core.Object]]
3028 }), 3092 }),
3029 names: ['fromTearOff', 'cspForwardCall', 'forwardCallTo', 'cspForwardInterce ptedCall', 'forwardInterceptedCallTo'] 3093 names: ['fromTearOff', 'cspForwardCall', 'forwardCallTo', 'cspForwardInterce ptedCall', 'forwardInterceptedCallTo']
3030 }); 3094 });
3031 Closure.FUNCTION_INDEX = 0; 3095 Closure.FUNCTION_INDEX = 0;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
3101 let names = _interceptors.JSArray.markFixedList(dart.as(Object.getOwnPrope rtyNames(template), core.List)); 3165 let names = _interceptors.JSArray.markFixedList(dart.as(Object.getOwnPrope rtyNames(template), core.List));
3102 for (let i = 0; dart.notNull(i) < dart.notNull(names[core.$length]); i = d art.notNull(i) + 1) { 3166 for (let i = 0; dart.notNull(i) < dart.notNull(names[core.$length]); i = d art.notNull(i) + 1) {
3103 let name = names[core.$get](i); 3167 let name = names[core.$get](i);
3104 if (template[name] === fieldName) { 3168 if (template[name] === fieldName) {
3105 return name; 3169 return name;
3106 } 3170 }
3107 } 3171 }
3108 } 3172 }
3109 } 3173 }
3110 dart.setSignature(BoundClosure, { 3174 dart.setSignature(BoundClosure, {
3175 constructors: () => ({BoundClosure: [BoundClosure, [core.Object, core.Object , core.Object, core.String]]}),
3111 statics: () => ({ 3176 statics: () => ({
3112 selfOf: [core.Object, [BoundClosure]], 3177 selfOf: [core.Object, [BoundClosure]],
3113 targetOf: [core.Object, [BoundClosure]], 3178 targetOf: [core.Object, [BoundClosure]],
3114 receiverOf: [core.Object, [BoundClosure]], 3179 receiverOf: [core.Object, [BoundClosure]],
3115 nameOf: [core.Object, [BoundClosure]], 3180 nameOf: [core.Object, [BoundClosure]],
3116 selfFieldName: [core.String, []], 3181 selfFieldName: [core.String, []],
3117 receiverFieldName: [core.String, []], 3182 receiverFieldName: [core.String, []],
3118 computeFieldNamed: [core.String, [core.String]] 3183 computeFieldNamed: [core.String, [core.String]]
3119 }), 3184 }),
3120 names: ['selfOf', 'targetOf', 'receiverOf', 'nameOf', 'selfFieldName', 'rece iverFieldName', 'computeFieldNamed'] 3185 names: ['selfOf', 'targetOf', 'receiverOf', 'nameOf', 'selfFieldName', 'rece iverFieldName', 'computeFieldNamed']
(...skipping 10 matching lines...) Expand all
3131 dart.fn(jsPropertyAccess, core.Object, [core.Object, core.String]); 3196 dart.fn(jsPropertyAccess, core.Object, [core.Object, core.String]);
3132 function getFallThroughError() { 3197 function getFallThroughError() {
3133 return new FallThroughErrorImplementation(); 3198 return new FallThroughErrorImplementation();
3134 } 3199 }
3135 dart.fn(getFallThroughError); 3200 dart.fn(getFallThroughError);
3136 class Creates extends core.Object { 3201 class Creates extends core.Object {
3137 Creates(types) { 3202 Creates(types) {
3138 this.types = types; 3203 this.types = types;
3139 } 3204 }
3140 } 3205 }
3206 dart.setSignature(Creates, {
3207 constructors: () => ({Creates: [Creates, [core.String]]})
3208 });
3141 class Returns extends core.Object { 3209 class Returns extends core.Object {
3142 Returns(types) { 3210 Returns(types) {
3143 this.types = types; 3211 this.types = types;
3144 } 3212 }
3145 } 3213 }
3214 dart.setSignature(Returns, {
3215 constructors: () => ({Returns: [Returns, [core.String]]})
3216 });
3146 class JSName extends core.Object { 3217 class JSName extends core.Object {
3147 JSName(name) { 3218 JSName(name) {
3148 this.name = name; 3219 this.name = name;
3149 } 3220 }
3150 } 3221 }
3222 dart.setSignature(JSName, {
3223 constructors: () => ({JSName: [JSName, [core.String]]})
3224 });
3151 function boolConversionCheck(value) { 3225 function boolConversionCheck(value) {
3152 if (typeof value == 'boolean') 3226 if (typeof value == 'boolean')
3153 return value; 3227 return value;
3154 boolTypeCheck(value); 3228 boolTypeCheck(value);
3155 dart.assert(value != null); 3229 dart.assert(value != null);
3156 return false; 3230 return false;
3157 } 3231 }
3158 dart.fn(boolConversionCheck); 3232 dart.fn(boolConversionCheck);
3159 function stringTypeCheck(value) { 3233 function stringTypeCheck(value) {
3160 if (value == null) 3234 if (value == null)
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
3425 fromMessage(message) { 3499 fromMessage(message) {
3426 this.message = message; 3500 this.message = message;
3427 super.Error(); 3501 super.Error();
3428 } 3502 }
3429 toString() { 3503 toString() {
3430 return this.message; 3504 return this.message;
3431 } 3505 }
3432 } 3506 }
3433 TypeErrorImplementation[dart.implements] = () => [core.TypeError]; 3507 TypeErrorImplementation[dart.implements] = () => [core.TypeError];
3434 dart.defineNamedConstructor(TypeErrorImplementation, 'fromMessage'); 3508 dart.defineNamedConstructor(TypeErrorImplementation, 'fromMessage');
3509 dart.setSignature(TypeErrorImplementation, {
3510 constructors: () => ({
3511 TypeErrorImplementation: [TypeErrorImplementation, [core.Object, core.Stri ng]],
3512 fromMessage: [TypeErrorImplementation, [core.String]]
3513 })
3514 });
3435 class CastErrorImplementation extends core.Error { 3515 class CastErrorImplementation extends core.Error {
3436 CastErrorImplementation(actualType, expectedType) { 3516 CastErrorImplementation(actualType, expectedType) {
3437 this.message = `CastError: Casting value of type ${actualType} to` + ` inc ompatible type ${expectedType}`; 3517 this.message = `CastError: Casting value of type ${actualType} to` + ` inc ompatible type ${expectedType}`;
3438 super.Error(); 3518 super.Error();
3439 } 3519 }
3440 toString() { 3520 toString() {
3441 return this.message; 3521 return this.message;
3442 } 3522 }
3443 } 3523 }
3444 CastErrorImplementation[dart.implements] = () => [core.CastError]; 3524 CastErrorImplementation[dart.implements] = () => [core.CastError];
3525 dart.setSignature(CastErrorImplementation, {
3526 constructors: () => ({CastErrorImplementation: [CastErrorImplementation, [co re.Object, core.Object]]})
3527 });
3445 class FallThroughErrorImplementation extends core.FallThroughError { 3528 class FallThroughErrorImplementation extends core.FallThroughError {
3446 FallThroughErrorImplementation() { 3529 FallThroughErrorImplementation() {
3447 super.FallThroughError(); 3530 super.FallThroughError();
3448 } 3531 }
3449 toString() { 3532 toString() {
3450 return "Switch case fall-through."; 3533 return "Switch case fall-through.";
3451 } 3534 }
3452 } 3535 }
3536 dart.setSignature(FallThroughErrorImplementation, {
3537 constructors: () => ({FallThroughErrorImplementation: [FallThroughErrorImple mentation, []]})
3538 });
3453 function assertHelper(condition) { 3539 function assertHelper(condition) {
3454 if (!(typeof condition == 'boolean')) { 3540 if (!(typeof condition == 'boolean')) {
3455 if (dart.is(condition, core.Function)) 3541 if (dart.is(condition, core.Function))
3456 condition = dart.dcall(condition); 3542 condition = dart.dcall(condition);
3457 if (!(typeof condition == 'boolean')) { 3543 if (!(typeof condition == 'boolean')) {
3458 throw new TypeErrorImplementation(condition, 'bool'); 3544 throw new TypeErrorImplementation(condition, 'bool');
3459 } 3545 }
3460 } 3546 }
3461 if (!dart.equals(true, condition)) 3547 if (!dart.equals(true, condition))
3462 throw new core.AssertionError(); 3548 throw new core.AssertionError();
(...skipping 10 matching lines...) Expand all
3473 dart.fn(throwCyclicInit, dart.void, [core.String]); 3559 dart.fn(throwCyclicInit, dart.void, [core.String]);
3474 class RuntimeError extends core.Error { 3560 class RuntimeError extends core.Error {
3475 RuntimeError(message) { 3561 RuntimeError(message) {
3476 this.message = message; 3562 this.message = message;
3477 super.Error(); 3563 super.Error();
3478 } 3564 }
3479 toString() { 3565 toString() {
3480 return `RuntimeError: ${this.message}`; 3566 return `RuntimeError: ${this.message}`;
3481 } 3567 }
3482 } 3568 }
3569 dart.setSignature(RuntimeError, {
3570 constructors: () => ({RuntimeError: [RuntimeError, [core.Object]]})
3571 });
3483 class DeferredNotLoadedError extends core.Error { 3572 class DeferredNotLoadedError extends core.Error {
3484 DeferredNotLoadedError(libraryName) { 3573 DeferredNotLoadedError(libraryName) {
3485 this.libraryName = libraryName; 3574 this.libraryName = libraryName;
3486 super.Error(); 3575 super.Error();
3487 } 3576 }
3488 toString() { 3577 toString() {
3489 return `Deferred library ${this.libraryName} was not loaded.`; 3578 return `Deferred library ${this.libraryName} was not loaded.`;
3490 } 3579 }
3491 } 3580 }
3492 DeferredNotLoadedError[dart.implements] = () => [core.NoSuchMethodError]; 3581 DeferredNotLoadedError[dart.implements] = () => [core.NoSuchMethodError];
3582 dart.setSignature(DeferredNotLoadedError, {
3583 constructors: () => ({DeferredNotLoadedError: [DeferredNotLoadedError, [core .String]]})
3584 });
3493 class RuntimeType extends core.Object { 3585 class RuntimeType extends core.Object {
3494 RuntimeType() { 3586 RuntimeType() {
3495 } 3587 }
3496 } 3588 }
3589 dart.setSignature(RuntimeType, {
3590 constructors: () => ({RuntimeType: [RuntimeType, []]})
3591 });
3497 let _isTest = Symbol('_isTest'); 3592 let _isTest = Symbol('_isTest');
3498 let _extractFunctionTypeObjectFrom = Symbol('_extractFunctionTypeObjectFrom'); 3593 let _extractFunctionTypeObjectFrom = Symbol('_extractFunctionTypeObjectFrom');
3499 let _asCheck = Symbol('_asCheck'); 3594 let _asCheck = Symbol('_asCheck');
3500 let _check = Symbol('_check'); 3595 let _check = Symbol('_check');
3501 let _assertCheck = Symbol('_assertCheck'); 3596 let _assertCheck = Symbol('_assertCheck');
3502 class RuntimeFunctionType extends RuntimeType { 3597 class RuntimeFunctionType extends RuntimeType {
3503 RuntimeFunctionType(returnType, parameterTypes, optionalParameterTypes, name dParameters) { 3598 RuntimeFunctionType(returnType, parameterTypes, optionalParameterTypes, name dParameters) {
3504 this.returnType = returnType; 3599 this.returnType = returnType;
3505 this.parameterTypes = parameterTypes; 3600 this.parameterTypes = parameterTypes;
3506 this.optionalParameterTypes = optionalParameterTypes; 3601 this.optionalParameterTypes = optionalParameterTypes;
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
3629 result = dart.notNull(result) + `${rti} ${name}`; 3724 result = dart.notNull(result) + `${rti} ${name}`;
3630 needsComma = true; 3725 needsComma = true;
3631 } 3726 }
3632 result = dart.notNull(result) + '}'; 3727 result = dart.notNull(result) + '}';
3633 } 3728 }
3634 result = dart.notNull(result) + `) -> ${this.returnType}`; 3729 result = dart.notNull(result) + `) -> ${this.returnType}`;
3635 return result; 3730 return result;
3636 } 3731 }
3637 } 3732 }
3638 dart.setSignature(RuntimeFunctionType, { 3733 dart.setSignature(RuntimeFunctionType, {
3734 constructors: () => ({RuntimeFunctionType: [RuntimeFunctionType, [RuntimeTyp e, core.List$(RuntimeType), core.List$(RuntimeType), core.Object]]}),
3639 methods: () => ({ 3735 methods: () => ({
3640 [_isTest]: [core.bool, [core.Object]], 3736 [_isTest]: [core.bool, [core.Object]],
3641 [_asCheck]: [core.Object, [core.Object]], 3737 [_asCheck]: [core.Object, [core.Object]],
3642 [_assertCheck]: [core.Object, [core.Object]], 3738 [_assertCheck]: [core.Object, [core.Object]],
3643 [_check]: [core.Object, [core.Object, core.bool]], 3739 [_check]: [core.Object, [core.Object, core.bool]],
3644 [_extractFunctionTypeObjectFrom]: [core.Object, [core.Object]], 3740 [_extractFunctionTypeObjectFrom]: [core.Object, [core.Object]],
3645 toRti: [core.Object, []] 3741 toRti: [core.Object, []]
3646 }), 3742 }),
3647 statics: () => ({listToRti: [core.Object, [core.Object]]}), 3743 statics: () => ({listToRti: [core.Object, [core.Object]]}),
3648 names: ['listToRti'] 3744 names: ['listToRti']
(...skipping 20 matching lines...) Expand all
3669 super.RuntimeType(); 3765 super.RuntimeType();
3670 } 3766 }
3671 toString() { 3767 toString() {
3672 return 'dynamic'; 3768 return 'dynamic';
3673 } 3769 }
3674 toRti() { 3770 toRti() {
3675 return null; 3771 return null;
3676 } 3772 }
3677 } 3773 }
3678 dart.setSignature(DynamicRuntimeType, { 3774 dart.setSignature(DynamicRuntimeType, {
3775 constructors: () => ({DynamicRuntimeType: [DynamicRuntimeType, []]}),
3679 methods: () => ({toRti: [core.Object, []]}) 3776 methods: () => ({toRti: [core.Object, []]})
3680 }); 3777 });
3681 function getDynamicRuntimeType() { 3778 function getDynamicRuntimeType() {
3682 return dart.const(new DynamicRuntimeType()); 3779 return dart.const(new DynamicRuntimeType());
3683 } 3780 }
3684 dart.fn(getDynamicRuntimeType, RuntimeType, []); 3781 dart.fn(getDynamicRuntimeType, RuntimeType, []);
3685 class VoidRuntimeType extends RuntimeType { 3782 class VoidRuntimeType extends RuntimeType {
3686 VoidRuntimeType() { 3783 VoidRuntimeType() {
3687 super.RuntimeType(); 3784 super.RuntimeType();
3688 } 3785 }
3689 toString() { 3786 toString() {
3690 return 'void'; 3787 return 'void';
3691 } 3788 }
3692 toRti() { 3789 toRti() {
3693 return dart.throw_('internal error'); 3790 return dart.throw_('internal error');
3694 } 3791 }
3695 } 3792 }
3696 dart.setSignature(VoidRuntimeType, { 3793 dart.setSignature(VoidRuntimeType, {
3794 constructors: () => ({VoidRuntimeType: [VoidRuntimeType, []]}),
3697 methods: () => ({toRti: [core.Object, []]}) 3795 methods: () => ({toRti: [core.Object, []]})
3698 }); 3796 });
3699 function getVoidRuntimeType() { 3797 function getVoidRuntimeType() {
3700 return dart.const(new VoidRuntimeType()); 3798 return dart.const(new VoidRuntimeType());
3701 } 3799 }
3702 dart.fn(getVoidRuntimeType, RuntimeType, []); 3800 dart.fn(getVoidRuntimeType, RuntimeType, []);
3703 function functionTypeTestMetaHelper() { 3801 function functionTypeTestMetaHelper() {
3704 let dyn = x; 3802 let dyn = x;
3705 let dyn2 = x; 3803 let dyn2 = x;
3706 let fixedListOrNull = dart.as(x, core.List); 3804 let fixedListOrNull = dart.as(x, core.List);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
3748 let rti = allClasses[this.name]; 3846 let rti = allClasses[this.name];
3749 if (rti == null) 3847 if (rti == null)
3750 throw `no type for '${this.name}'`; 3848 throw `no type for '${this.name}'`;
3751 return rti; 3849 return rti;
3752 } 3850 }
3753 toString() { 3851 toString() {
3754 return this.name; 3852 return this.name;
3755 } 3853 }
3756 } 3854 }
3757 dart.setSignature(RuntimeTypePlain, { 3855 dart.setSignature(RuntimeTypePlain, {
3856 constructors: () => ({RuntimeTypePlain: [RuntimeTypePlain, [core.String]]}),
3758 methods: () => ({toRti: [core.Object, []]}) 3857 methods: () => ({toRti: [core.Object, []]})
3759 }); 3858 });
3760 class RuntimeTypeGeneric extends RuntimeType { 3859 class RuntimeTypeGeneric extends RuntimeType {
3761 RuntimeTypeGeneric(name, arguments$, rti) { 3860 RuntimeTypeGeneric(name, arguments$, rti) {
3762 this.name = name; 3861 this.name = name;
3763 this.arguments = arguments$; 3862 this.arguments = arguments$;
3764 this.rti = rti; 3863 this.rti = rti;
3765 super.RuntimeType(); 3864 super.RuntimeType();
3766 } 3865 }
3767 toRti() { 3866 toRti() {
3768 if (this.rti != null) 3867 if (this.rti != null)
3769 return this.rti; 3868 return this.rti;
3770 let allClasses = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_names .ALL_CLASSES); 3869 let allClasses = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_names .ALL_CLASSES);
3771 let result = [allClasses[this.name]]; 3870 let result = [allClasses[this.name]];
3772 if (dart.dindex(result, 0) == null) { 3871 if (dart.dindex(result, 0) == null) {
3773 throw `no type for '${this.name}<...>'`; 3872 throw `no type for '${this.name}<...>'`;
3774 } 3873 }
3775 for (let argument of this.arguments) { 3874 for (let argument of this.arguments) {
3776 result.push(argument.toRti()); 3875 result.push(argument.toRti());
3777 } 3876 }
3778 return this.rti = result; 3877 return this.rti = result;
3779 } 3878 }
3780 toString() { 3879 toString() {
3781 return `${this.name}<${this.arguments[core.$join](", ")}>`; 3880 return `${this.name}<${this.arguments[core.$join](", ")}>`;
3782 } 3881 }
3783 } 3882 }
3784 dart.setSignature(RuntimeTypeGeneric, { 3883 dart.setSignature(RuntimeTypeGeneric, {
3884 constructors: () => ({RuntimeTypeGeneric: [RuntimeTypeGeneric, [core.String, core.List$(RuntimeType), core.Object]]}),
3785 methods: () => ({toRti: [core.Object, []]}) 3885 methods: () => ({toRti: [core.Object, []]})
3786 }); 3886 });
3787 let _typeData = Symbol('_typeData'); 3887 let _typeData = Symbol('_typeData');
3788 let _cachedToString = Symbol('_cachedToString'); 3888 let _cachedToString = Symbol('_cachedToString');
3789 let _hasReturnType = Symbol('_hasReturnType'); 3889 let _hasReturnType = Symbol('_hasReturnType');
3790 let _returnType = Symbol('_returnType'); 3890 let _returnType = Symbol('_returnType');
3791 let _isVoid = Symbol('_isVoid'); 3891 let _isVoid = Symbol('_isVoid');
3792 let _hasArguments = Symbol('_hasArguments'); 3892 let _hasArguments = Symbol('_hasArguments');
3793 let _hasOptionalArguments = Symbol('_hasOptionalArguments'); 3893 let _hasOptionalArguments = Symbol('_hasOptionalArguments');
3794 let _optionalArguments = Symbol('_optionalArguments'); 3894 let _optionalArguments = Symbol('_optionalArguments');
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
3878 s = dart.notNull(s) + 'void'; 3978 s = dart.notNull(s) + 'void';
3879 } else if (this[_hasReturnType]) { 3979 } else if (this[_hasReturnType]) {
3880 s = dart.notNull(s) + dart.notNull(this[_convert](this[_returnType])); 3980 s = dart.notNull(s) + dart.notNull(this[_convert](this[_returnType]));
3881 } else { 3981 } else {
3882 s = dart.notNull(s) + 'dynamic'; 3982 s = dart.notNull(s) + 'dynamic';
3883 } 3983 }
3884 return this[_cachedToString] = `${s}`; 3984 return this[_cachedToString] = `${s}`;
3885 } 3985 }
3886 } 3986 }
3887 dart.setSignature(FunctionTypeInfoDecoderRing, { 3987 dart.setSignature(FunctionTypeInfoDecoderRing, {
3988 constructors: () => ({FunctionTypeInfoDecoderRing: [FunctionTypeInfoDecoderR ing, [core.Object]]}),
3888 methods: () => ({ 3989 methods: () => ({
3889 toRuntimeType: [RuntimeType, []], 3990 toRuntimeType: [RuntimeType, []],
3890 [_convert]: [core.String, [core.Object]] 3991 [_convert]: [core.String, [core.Object]]
3891 }) 3992 })
3892 }); 3993 });
3893 class UnimplementedNoSuchMethodError extends core.Error { 3994 class UnimplementedNoSuchMethodError extends core.Error {
3894 UnimplementedNoSuchMethodError(message) { 3995 UnimplementedNoSuchMethodError(message) {
3895 this[_message] = message; 3996 this[_message] = message;
3896 super.Error(); 3997 super.Error();
3897 } 3998 }
3898 toString() { 3999 toString() {
3899 return `Unsupported operation: ${this[_message]}`; 4000 return `Unsupported operation: ${this[_message]}`;
3900 } 4001 }
3901 } 4002 }
3902 UnimplementedNoSuchMethodError[dart.implements] = () => [core.NoSuchMethodErro r]; 4003 UnimplementedNoSuchMethodError[dart.implements] = () => [core.NoSuchMethodErro r];
4004 dart.setSignature(UnimplementedNoSuchMethodError, {
4005 constructors: () => ({UnimplementedNoSuchMethodError: [UnimplementedNoSuchMe thodError, [core.String]]})
4006 });
3903 function random64() { 4007 function random64() {
3904 let int32a = Math.random() * 0x100000000 >>> 0; 4008 let int32a = Math.random() * 0x100000000 >>> 0;
3905 let int32b = Math.random() * 0x100000000 >>> 0; 4009 let int32b = Math.random() * 0x100000000 >>> 0;
3906 return dart.notNull(int32a) + dart.notNull(int32b) * 4294967296; 4010 return dart.notNull(int32a) + dart.notNull(int32b) * 4294967296;
3907 } 4011 }
3908 dart.fn(random64, core.int, []); 4012 dart.fn(random64, core.int, []);
3909 function jsonEncodeNative(string) { 4013 function jsonEncodeNative(string) {
3910 return JSON.stringify(string); 4014 return JSON.stringify(string);
3911 } 4015 }
3912 dart.fn(jsonEncodeNative, core.String, [core.String]); 4016 dart.fn(jsonEncodeNative, core.String, [core.String]);
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
4028 class MainError extends core.Error { 4132 class MainError extends core.Error {
4029 MainError(message) { 4133 MainError(message) {
4030 this[_message] = message; 4134 this[_message] = message;
4031 super.Error(); 4135 super.Error();
4032 } 4136 }
4033 toString() { 4137 toString() {
4034 return `NoSuchMethodError: ${this[_message]}`; 4138 return `NoSuchMethodError: ${this[_message]}`;
4035 } 4139 }
4036 } 4140 }
4037 MainError[dart.implements] = () => [core.NoSuchMethodError]; 4141 MainError[dart.implements] = () => [core.NoSuchMethodError];
4142 dart.setSignature(MainError, {
4143 constructors: () => ({MainError: [MainError, [core.String]]})
4144 });
4038 function missingMain() { 4145 function missingMain() {
4039 throw new MainError("No top-level function named 'main'."); 4146 throw new MainError("No top-level function named 'main'.");
4040 } 4147 }
4041 dart.fn(missingMain, dart.void, []); 4148 dart.fn(missingMain, dart.void, []);
4042 function badMain() { 4149 function badMain() {
4043 throw new MainError("'main' is not a function."); 4150 throw new MainError("'main' is not a function.");
4044 } 4151 }
4045 dart.fn(badMain, dart.void, []); 4152 dart.fn(badMain, dart.void, []);
4046 function mainHasTooManyParameters() { 4153 function mainHasTooManyParameters() {
4047 throw new MainError("'main' expects too many parameters."); 4154 throw new MainError("'main' expects too many parameters.");
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
4275 exports.jsonEncodeNative = jsonEncodeNative; 4382 exports.jsonEncodeNative = jsonEncodeNative;
4276 exports.getIsolateAffinityTag = getIsolateAffinityTag; 4383 exports.getIsolateAffinityTag = getIsolateAffinityTag;
4277 exports.LoadLibraryFunctionType = LoadLibraryFunctionType; 4384 exports.LoadLibraryFunctionType = LoadLibraryFunctionType;
4278 exports.DeferredLoadCallback = DeferredLoadCallback; 4385 exports.DeferredLoadCallback = DeferredLoadCallback;
4279 exports.loadDeferredLibrary = loadDeferredLibrary; 4386 exports.loadDeferredLibrary = loadDeferredLibrary;
4280 exports.MainError = MainError; 4387 exports.MainError = MainError;
4281 exports.missingMain = missingMain; 4388 exports.missingMain = missingMain;
4282 exports.badMain = badMain; 4389 exports.badMain = badMain;
4283 exports.mainHasTooManyParameters = mainHasTooManyParameters; 4390 exports.mainHasTooManyParameters = mainHasTooManyParameters;
4284 })(_js_helper, core, collection, _internal, _foreign_helper, _js_embedded_names, _interceptors, _js_names, async, _isolate_helper); 4391 })(_js_helper, core, collection, _internal, _foreign_helper, _js_embedded_names, _interceptors, _js_names, async, _isolate_helper);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698