OLD | NEW |
1 dart_library.library('dart/_js_helper', null, /* Imports */[ | 1 dart_library.library('dart/_js_helper', null, /* Imports */[ |
2 "dart_runtime/dart", | 2 "dart_runtime/dart", |
3 'dart/core', | 3 'dart/core', |
4 'dart/collection', | 4 'dart/collection', |
5 'dart/_interceptors', | 5 'dart/_interceptors', |
6 'dart/_foreign_helper' | 6 'dart/_foreign_helper' |
7 ], /* Lazy imports */[ | 7 ], /* Lazy imports */[ |
8 ], function(exports, dart, core, collection, _interceptors, _foreign_helper) { | 8 ], function(exports, dart, core, collection, _interceptors, _foreign_helper) { |
9 'use strict'; | 9 'use strict'; |
10 let dartx = dart.dartx; | 10 let dartx = dart.dartx; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 class SupportJsExtensionMethods extends core.Object { | 51 class SupportJsExtensionMethods extends core.Object { |
52 SupportJsExtensionMethods() { | 52 SupportJsExtensionMethods() { |
53 } | 53 } |
54 } | 54 } |
55 dart.setSignature(SupportJsExtensionMethods, { | 55 dart.setSignature(SupportJsExtensionMethods, { |
56 constructors: () => ({SupportJsExtensionMethods: [SupportJsExtensionMethods,
[]]}) | 56 constructors: () => ({SupportJsExtensionMethods: [SupportJsExtensionMethods,
[]]}) |
57 }); | 57 }); |
58 function defineProperty(obj, property, value) { | 58 function defineProperty(obj, property, value) { |
59 Object.defineProperty(obj, property, {value: value, enumerable: false, writa
ble: true, configurable: true}); | 59 Object.defineProperty(obj, property, {value: value, enumerable: false, writa
ble: true, configurable: true}); |
60 } | 60 } |
61 dart.fn(defineProperty, dart.void, [core.Object, core.String, core.Object]); | 61 dart.fn(defineProperty, dart.void, [dart.dynamic, core.String, dart.dynamic]); |
62 let _nativeRegExp = Symbol('_nativeRegExp'); | 62 let _nativeRegExp = Symbol('_nativeRegExp'); |
63 function regExpGetNative(regexp) { | 63 function regExpGetNative(regexp) { |
64 return regexp[_nativeRegExp]; | 64 return regexp[_nativeRegExp]; |
65 } | 65 } |
66 dart.fn(regExpGetNative, () => dart.functionType(core.Object, [JSSyntaxRegExp]
)); | 66 dart.fn(regExpGetNative, () => dart.definiteFunctionType(dart.dynamic, [JSSynt
axRegExp])); |
67 let _nativeGlobalVersion = Symbol('_nativeGlobalVersion'); | 67 let _nativeGlobalVersion = Symbol('_nativeGlobalVersion'); |
68 function regExpGetGlobalNative(regexp) { | 68 function regExpGetGlobalNative(regexp) { |
69 let nativeRegexp = regexp[_nativeGlobalVersion]; | 69 let nativeRegexp = regexp[_nativeGlobalVersion]; |
70 nativeRegexp.lastIndex = 0; | 70 nativeRegexp.lastIndex = 0; |
71 return nativeRegexp; | 71 return nativeRegexp; |
72 } | 72 } |
73 dart.fn(regExpGetGlobalNative, () => dart.functionType(core.Object, [JSSyntaxR
egExp])); | 73 dart.fn(regExpGetGlobalNative, () => dart.definiteFunctionType(dart.dynamic, [
JSSyntaxRegExp])); |
74 let _nativeAnchoredVersion = Symbol('_nativeAnchoredVersion'); | 74 let _nativeAnchoredVersion = Symbol('_nativeAnchoredVersion'); |
75 function regExpCaptureCount(regexp) { | 75 function regExpCaptureCount(regexp) { |
76 let nativeAnchoredRegExp = regexp[_nativeAnchoredVersion]; | 76 let nativeAnchoredRegExp = regexp[_nativeAnchoredVersion]; |
77 let match = nativeAnchoredRegExp.exec(''); | 77 let match = nativeAnchoredRegExp.exec(''); |
78 return dart.as(dart.dsend(dart.dload(match, 'length'), '-', 2), core.int); | 78 return dart.as(dart.dsend(dart.dload(match, 'length'), '-', 2), core.int); |
79 } | 79 } |
80 dart.fn(regExpCaptureCount, () => dart.functionType(core.int, [JSSyntaxRegExp]
)); | 80 dart.fn(regExpCaptureCount, () => dart.definiteFunctionType(core.int, [JSSynta
xRegExp])); |
81 let _nativeGlobalRegExp = Symbol('_nativeGlobalRegExp'); | 81 let _nativeGlobalRegExp = Symbol('_nativeGlobalRegExp'); |
82 let _nativeAnchoredRegExp = Symbol('_nativeAnchoredRegExp'); | 82 let _nativeAnchoredRegExp = Symbol('_nativeAnchoredRegExp'); |
83 let _isMultiLine = Symbol('_isMultiLine'); | 83 let _isMultiLine = Symbol('_isMultiLine'); |
84 let _isCaseSensitive = Symbol('_isCaseSensitive'); | 84 let _isCaseSensitive = Symbol('_isCaseSensitive'); |
85 let _execGlobal = Symbol('_execGlobal'); | 85 let _execGlobal = Symbol('_execGlobal'); |
86 let _execAnchored = Symbol('_execAnchored'); | 86 let _execAnchored = Symbol('_execAnchored'); |
87 class JSSyntaxRegExp extends core.Object { | 87 class JSSyntaxRegExp extends core.Object { |
88 toString() { | 88 toString() { |
89 return `RegExp/${this.pattern}/`; | 89 return `RegExp/${this.pattern}/`; |
90 } | 90 } |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 constructors: () => ({JSSyntaxRegExp: [JSSyntaxRegExp, [core.String], {multi
Line: core.bool, caseSensitive: core.bool}]}), | 194 constructors: () => ({JSSyntaxRegExp: [JSSyntaxRegExp, [core.String], {multi
Line: core.bool, caseSensitive: core.bool}]}), |
195 methods: () => ({ | 195 methods: () => ({ |
196 firstMatch: [core.Match, [core.String]], | 196 firstMatch: [core.Match, [core.String]], |
197 hasMatch: [core.bool, [core.String]], | 197 hasMatch: [core.bool, [core.String]], |
198 stringMatch: [core.String, [core.String]], | 198 stringMatch: [core.String, [core.String]], |
199 allMatches: [core.Iterable$(core.Match), [core.String], [core.int]], | 199 allMatches: [core.Iterable$(core.Match), [core.String], [core.int]], |
200 [_execGlobal]: [core.Match, [core.String, core.int]], | 200 [_execGlobal]: [core.Match, [core.String, core.int]], |
201 [_execAnchored]: [core.Match, [core.String, core.int]], | 201 [_execAnchored]: [core.Match, [core.String, core.int]], |
202 matchAsPrefix: [core.Match, [core.String], [core.int]] | 202 matchAsPrefix: [core.Match, [core.String], [core.int]] |
203 }), | 203 }), |
204 statics: () => ({makeNative: [core.Object, [core.String, core.bool, core.boo
l, core.bool]]}), | 204 statics: () => ({makeNative: [dart.dynamic, [core.String, core.bool, core.bo
ol, core.bool]]}), |
205 names: ['makeNative'] | 205 names: ['makeNative'] |
206 }); | 206 }); |
207 dart.defineExtensionMembers(JSSyntaxRegExp, ['allMatches', 'matchAsPrefix']); | 207 dart.defineExtensionMembers(JSSyntaxRegExp, ['allMatches', 'matchAsPrefix']); |
208 let _match = Symbol('_match'); | 208 let _match = Symbol('_match'); |
209 class _MatchImplementation extends core.Object { | 209 class _MatchImplementation extends core.Object { |
210 _MatchImplementation(pattern, match) { | 210 _MatchImplementation(pattern, match) { |
211 this.pattern = pattern; | 211 this.pattern = pattern; |
212 this[_match] = match; | 212 this[_match] = match; |
213 dart.assert(typeof this[_match].input == 'string'); | 213 dart.assert(typeof this[_match].input == 'string'); |
214 dart.assert(typeof this[_match].index == 'number'); | 214 dart.assert(typeof this[_match].index == 'number'); |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 if (dart.notNull(dart.as(dart.dsend(index, '<', 0), core.bool))) | 508 if (dart.notNull(dart.as(dart.dsend(index, '<', 0), core.bool))) |
509 return receiver; | 509 return receiver; |
510 return `${dart.dsend(receiver, 'substring', 0, index)}${to}` + `${dart.dse
nd(receiver, 'substring', dart.dsend(index, '+', dart.dload(from, 'length')))}`; | 510 return `${dart.dsend(receiver, 'substring', 0, index)}${to}` + `${dart.dse
nd(receiver, 'substring', dart.dsend(index, '+', dart.dload(from, 'length')))}`; |
511 } else if (dart.is(from, JSSyntaxRegExp)) { | 511 } else if (dart.is(from, JSSyntaxRegExp)) { |
512 return startIndex == 0 ? stringReplaceJS(receiver, regExpGetNative(dart.as
(from, JSSyntaxRegExp)), to) : stringReplaceFirstRE(receiver, from, to, startInd
ex); | 512 return startIndex == 0 ? stringReplaceJS(receiver, regExpGetNative(dart.as
(from, JSSyntaxRegExp)), to) : stringReplaceFirstRE(receiver, from, to, startInd
ex); |
513 } else { | 513 } else { |
514 checkNull(from); | 514 checkNull(from); |
515 throw "String.replace(Pattern) UNIMPLEMENTED"; | 515 throw "String.replace(Pattern) UNIMPLEMENTED"; |
516 } | 516 } |
517 } | 517 } |
518 dart.fn(stringReplaceFirstUnchecked, core.Object, [core.Object, core.Object, c
ore.Object], [core.int]); | 518 dart.fn(stringReplaceFirstUnchecked, dart.dynamic, [dart.dynamic, dart.dynamic
, dart.dynamic], [core.int]); |
519 function stringJoinUnchecked(array, separator) { | 519 function stringJoinUnchecked(array, separator) { |
520 return array.join(separator); | 520 return array.join(separator); |
521 } | 521 } |
522 dart.fn(stringJoinUnchecked); | 522 dart.fn(stringJoinUnchecked); |
523 function getRuntimeType(object) { | 523 function getRuntimeType(object) { |
524 return dart.as(dart.realRuntimeType(object), core.Type); | 524 return dart.as(dart.realRuntimeType(object), core.Type); |
525 } | 525 } |
526 dart.fn(getRuntimeType, core.Type, [core.Object]); | 526 dart.fn(getRuntimeType, core.Type, [dart.dynamic]); |
527 function getIndex(array, index) { | 527 function getIndex(array, index) { |
528 dart.assert(isJsArray(array)); | 528 dart.assert(isJsArray(array)); |
529 return array[index]; | 529 return array[index]; |
530 } | 530 } |
531 dart.fn(getIndex, core.Object, [core.Object, core.int]); | 531 dart.fn(getIndex, dart.dynamic, [dart.dynamic, core.int]); |
532 function getLength(array) { | 532 function getLength(array) { |
533 dart.assert(isJsArray(array)); | 533 dart.assert(isJsArray(array)); |
534 return array.length; | 534 return array.length; |
535 } | 535 } |
536 dart.fn(getLength, core.int, [core.Object]); | 536 dart.fn(getLength, core.int, [dart.dynamic]); |
537 function isJsArray(value) { | 537 function isJsArray(value) { |
538 return dart.is(value, _interceptors.JSArray); | 538 return dart.is(value, _interceptors.JSArray); |
539 } | 539 } |
540 dart.fn(isJsArray, core.bool, [core.Object]); | 540 dart.fn(isJsArray, core.bool, [dart.dynamic]); |
541 class _Patch extends core.Object { | 541 class _Patch extends core.Object { |
542 _Patch() { | 542 _Patch() { |
543 } | 543 } |
544 } | 544 } |
545 dart.setSignature(_Patch, { | 545 dart.setSignature(_Patch, { |
546 constructors: () => ({_Patch: [_Patch, []]}) | 546 constructors: () => ({_Patch: [_Patch, []]}) |
547 }); | 547 }); |
548 let patch = dart.const(new _Patch()); | 548 let patch = dart.const(new _Patch()); |
549 class InternalMap extends core.Object {} | 549 class InternalMap extends core.Object {} |
550 class Primitives extends core.Object { | 550 class Primitives extends core.Object { |
551 static initializeStatics(id) { | 551 static initializeStatics(id) { |
552 Primitives.mirrorFunctionCacheName = dart.notNull(Primitives.mirrorFunctio
nCacheName) + `_${id}`; | 552 Primitives.mirrorFunctionCacheName = dart.notNull(Primitives.mirrorFunctio
nCacheName) + `_${id}`; |
553 Primitives.mirrorInvokeCacheName = dart.notNull(Primitives.mirrorInvokeCac
heName) + `_${id}`; | 553 Primitives.mirrorInvokeCacheName = dart.notNull(Primitives.mirrorInvokeCac
heName) + `_${id}`; |
554 } | 554 } |
555 static objectHashCode(object) { | 555 static objectHashCode(object) { |
556 let hash = dart.as(object.$identityHash, core.int); | 556 let hash = dart.as(object.$identityHash, core.int); |
557 if (hash == null) { | 557 if (hash == null) { |
558 hash = Math.random() * 0x3fffffff | 0; | 558 hash = Math.random() * 0x3fffffff | 0; |
559 object.$identityHash = hash; | 559 object.$identityHash = hash; |
560 } | 560 } |
561 return hash; | 561 return hash; |
562 } | 562 } |
563 static _throwFormatException(string) { | 563 static _throwFormatException(string) { |
564 throw new core.FormatException(string); | 564 throw new core.FormatException(string); |
565 } | 565 } |
566 static parseInt(source, radix, handleError) { | 566 static parseInt(source, radix, handleError) { |
567 if (handleError == null) | 567 if (handleError == null) |
568 handleError = dart.fn(s => dart.as(Primitives._throwFormatException(dart
.as(s, core.String)), core.int), core.int, [core.Object]); | 568 handleError = dart.fn(s => dart.as(Primitives._throwFormatException(dart
.as(s, core.String)), core.int), core.int, [dart.dynamic]); |
569 checkString(source); | 569 checkString(source); |
570 let match = /^\s*[+-]?((0x[a-f0-9]+)|(\d+)|([a-z0-9]+))\s*$/i.exec(source)
; | 570 let match = /^\s*[+-]?((0x[a-f0-9]+)|(\d+)|([a-z0-9]+))\s*$/i.exec(source)
; |
571 let digitsIndex = 1; | 571 let digitsIndex = 1; |
572 let hexIndex = 2; | 572 let hexIndex = 2; |
573 let decimalIndex = 3; | 573 let decimalIndex = 3; |
574 let nonDecimalHexIndex = 4; | 574 let nonDecimalHexIndex = 4; |
575 if (radix == null) { | 575 if (radix == null) { |
576 radix = 10; | 576 radix = 10; |
577 if (match != null) { | 577 if (match != null) { |
578 if (dart.dindex(match, hexIndex) != null) { | 578 if (dart.dindex(match, hexIndex) != null) { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 } | 610 } |
611 } | 611 } |
612 } | 612 } |
613 if (match == null) | 613 if (match == null) |
614 return handleError(source); | 614 return handleError(source); |
615 return parseInt(source, radix); | 615 return parseInt(source, radix); |
616 } | 616 } |
617 static parseDouble(source, handleError) { | 617 static parseDouble(source, handleError) { |
618 checkString(source); | 618 checkString(source); |
619 if (handleError == null) | 619 if (handleError == null) |
620 handleError = dart.fn(s => dart.as(Primitives._throwFormatException(dart
.as(s, core.String)), core.double), core.double, [core.Object]); | 620 handleError = dart.fn(s => dart.as(Primitives._throwFormatException(dart
.as(s, core.String)), core.double), core.double, [dart.dynamic]); |
621 if (!/^\s*[+-]?(?:Infinity|NaN|(?:\.\d+|\d+(?:\.\d*)?)(?:[eE][+-]?\d+)?)\s
*$/.test(source)) { | 621 if (!/^\s*[+-]?(?:Infinity|NaN|(?:\.\d+|\d+(?:\.\d*)?)(?:[eE][+-]?\d+)?)\s
*$/.test(source)) { |
622 return handleError(source); | 622 return handleError(source); |
623 } | 623 } |
624 let result = parseFloat(source); | 624 let result = parseFloat(source); |
625 if (dart.notNull(result[dartx.isNaN])) { | 625 if (dart.notNull(result[dartx.isNaN])) { |
626 let trimmed = source[dartx.trim](); | 626 let trimmed = source[dartx.trim](); |
627 if (trimmed == 'NaN' || trimmed == '+NaN' || trimmed == '-NaN') { | 627 if (trimmed == 'NaN' || trimmed == '+NaN' || trimmed == '-NaN') { |
628 return result; | 628 return result; |
629 } | 629 } |
630 return handleError(source); | 630 return handleError(source); |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
836 static identicalImplementation(a, b) { | 836 static identicalImplementation(a, b) { |
837 return a == null ? b == null : a === b; | 837 return a == null ? b == null : a === b; |
838 } | 838 } |
839 static extractStackTrace(error) { | 839 static extractStackTrace(error) { |
840 return getTraceFromException(error.$thrownJsError); | 840 return getTraceFromException(error.$thrownJsError); |
841 } | 841 } |
842 } | 842 } |
843 dart.setSignature(Primitives, { | 843 dart.setSignature(Primitives, { |
844 statics: () => ({ | 844 statics: () => ({ |
845 initializeStatics: [dart.void, [core.int]], | 845 initializeStatics: [dart.void, [core.int]], |
846 objectHashCode: [core.int, [core.Object]], | 846 objectHashCode: [core.int, [dart.dynamic]], |
847 _throwFormatException: [core.Object, [core.String]], | 847 _throwFormatException: [dart.dynamic, [core.String]], |
848 parseInt: [core.int, [core.String, core.int, dart.functionType(core.int, [
core.String])]], | 848 parseInt: [core.int, [core.String, core.int, dart.functionType(core.int, [
core.String])]], |
849 parseDouble: [core.double, [core.String, dart.functionType(core.double, [c
ore.String])]], | 849 parseDouble: [core.double, [core.String, dart.functionType(core.double, [c
ore.String])]], |
850 objectTypeName: [core.String, [core.Object]], | 850 objectTypeName: [core.String, [core.Object]], |
851 objectToString: [core.String, [core.Object]], | 851 objectToString: [core.String, [core.Object]], |
852 dateNow: [core.num, []], | 852 dateNow: [core.num, []], |
853 initTicker: [dart.void, []], | 853 initTicker: [dart.void, []], |
854 currentUri: [core.String, []], | 854 currentUri: [core.String, []], |
855 _fromCharCodeApply: [core.String, [core.List$(core.int)]], | 855 _fromCharCodeApply: [core.String, [core.List$(core.int)]], |
856 stringFromCodePoints: [core.String, [core.Object]], | 856 stringFromCodePoints: [core.String, [dart.dynamic]], |
857 stringFromCharCodes: [core.String, [core.Object]], | 857 stringFromCharCodes: [core.String, [dart.dynamic]], |
858 stringFromCharCode: [core.String, [core.Object]], | 858 stringFromCharCode: [core.String, [dart.dynamic]], |
859 stringConcatUnchecked: [core.String, [core.String, core.String]], | 859 stringConcatUnchecked: [core.String, [core.String, core.String]], |
860 flattenString: [core.String, [core.String]], | 860 flattenString: [core.String, [core.String]], |
861 getTimeZoneName: [core.String, [core.Object]], | 861 getTimeZoneName: [core.String, [dart.dynamic]], |
862 getTimeZoneOffsetInMinutes: [core.int, [core.Object]], | 862 getTimeZoneOffsetInMinutes: [core.int, [dart.dynamic]], |
863 valueFromDecomposedDate: [core.Object, [core.Object, core.Object, core.Obj
ect, core.Object, core.Object, core.Object, core.Object, core.Object]], | 863 valueFromDecomposedDate: [dart.dynamic, [dart.dynamic, dart.dynamic, dart.
dynamic, dart.dynamic, dart.dynamic, dart.dynamic, dart.dynamic, dart.dynamic]], |
864 patchUpY2K: [core.Object, [core.Object, core.Object, core.Object]], | 864 patchUpY2K: [dart.dynamic, [dart.dynamic, dart.dynamic, dart.dynamic]], |
865 lazyAsJsDate: [core.Object, [core.Object]], | 865 lazyAsJsDate: [dart.dynamic, [dart.dynamic]], |
866 getYear: [core.Object, [core.Object]], | 866 getYear: [dart.dynamic, [dart.dynamic]], |
867 getMonth: [core.Object, [core.Object]], | 867 getMonth: [dart.dynamic, [dart.dynamic]], |
868 getDay: [core.Object, [core.Object]], | 868 getDay: [dart.dynamic, [dart.dynamic]], |
869 getHours: [core.Object, [core.Object]], | 869 getHours: [dart.dynamic, [dart.dynamic]], |
870 getMinutes: [core.Object, [core.Object]], | 870 getMinutes: [dart.dynamic, [dart.dynamic]], |
871 getSeconds: [core.Object, [core.Object]], | 871 getSeconds: [dart.dynamic, [dart.dynamic]], |
872 getMilliseconds: [core.Object, [core.Object]], | 872 getMilliseconds: [dart.dynamic, [dart.dynamic]], |
873 getWeekday: [core.Object, [core.Object]], | 873 getWeekday: [dart.dynamic, [dart.dynamic]], |
874 valueFromDateString: [core.Object, [core.Object]], | 874 valueFromDateString: [dart.dynamic, [dart.dynamic]], |
875 getProperty: [core.Object, [core.Object, core.Object]], | 875 getProperty: [dart.dynamic, [dart.dynamic, dart.dynamic]], |
876 setProperty: [dart.void, [core.Object, core.Object, core.Object]], | 876 setProperty: [dart.void, [dart.dynamic, dart.dynamic, dart.dynamic]], |
877 identicalImplementation: [core.bool, [core.Object, core.Object]], | 877 identicalImplementation: [core.bool, [dart.dynamic, dart.dynamic]], |
878 extractStackTrace: [core.StackTrace, [core.Error]] | 878 extractStackTrace: [core.StackTrace, [core.Error]] |
879 }), | 879 }), |
880 names: ['initializeStatics', 'objectHashCode', '_throwFormatException', 'par
seInt', 'parseDouble', 'objectTypeName', 'objectToString', 'dateNow', 'initTicke
r', 'currentUri', '_fromCharCodeApply', 'stringFromCodePoints', 'stringFromCharC
odes', 'stringFromCharCode', 'stringConcatUnchecked', 'flattenString', 'getTimeZ
oneName', 'getTimeZoneOffsetInMinutes', 'valueFromDecomposedDate', 'patchUpY2K',
'lazyAsJsDate', 'getYear', 'getMonth', 'getDay', 'getHours', 'getMinutes', 'get
Seconds', 'getMilliseconds', 'getWeekday', 'valueFromDateString', 'getProperty',
'setProperty', 'identicalImplementation', 'extractStackTrace'] | 880 names: ['initializeStatics', 'objectHashCode', '_throwFormatException', 'par
seInt', 'parseDouble', 'objectTypeName', 'objectToString', 'dateNow', 'initTicke
r', 'currentUri', '_fromCharCodeApply', 'stringFromCodePoints', 'stringFromCharC
odes', 'stringFromCharCode', 'stringConcatUnchecked', 'flattenString', 'getTimeZ
oneName', 'getTimeZoneOffsetInMinutes', 'valueFromDecomposedDate', 'patchUpY2K',
'lazyAsJsDate', 'getYear', 'getMonth', 'getDay', 'getHours', 'getMinutes', 'get
Seconds', 'getMilliseconds', 'getWeekday', 'valueFromDateString', 'getProperty',
'setProperty', 'identicalImplementation', 'extractStackTrace'] |
881 }); | 881 }); |
882 Primitives.mirrorFunctionCacheName = '$cachedFunction'; | 882 Primitives.mirrorFunctionCacheName = '$cachedFunction'; |
883 Primitives.mirrorInvokeCacheName = '$cachedInvocation'; | 883 Primitives.mirrorInvokeCacheName = '$cachedInvocation'; |
884 Primitives.DOLLAR_CHAR_VALUE = 36; | 884 Primitives.DOLLAR_CHAR_VALUE = 36; |
885 Primitives.timerFrequency = null; | 885 Primitives.timerFrequency = null; |
886 Primitives.timerTicks = null; | 886 Primitives.timerTicks = null; |
887 function stringLastIndexOfUnchecked(receiver, element, start) { | 887 function stringLastIndexOfUnchecked(receiver, element, start) { |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
939 super.Error(); | 939 super.Error(); |
940 } | 940 } |
941 toString() { | 941 toString() { |
942 if (this[_method] == null) | 942 if (this[_method] == null) |
943 return `NullError: ${this[_message]}`; | 943 return `NullError: ${this[_message]}`; |
944 return `NullError: Cannot call "${this[_method]}" on null`; | 944 return `NullError: Cannot call "${this[_method]}" on null`; |
945 } | 945 } |
946 } | 946 } |
947 NullError[dart.implements] = () => [core.NoSuchMethodError]; | 947 NullError[dart.implements] = () => [core.NoSuchMethodError]; |
948 dart.setSignature(NullError, { | 948 dart.setSignature(NullError, { |
949 constructors: () => ({NullError: [NullError, [core.String, core.Object]]}) | 949 constructors: () => ({NullError: [NullError, [core.String, dart.dynamic]]}) |
950 }); | 950 }); |
951 let _receiver = Symbol('_receiver'); | 951 let _receiver = Symbol('_receiver'); |
952 class JsNoSuchMethodError extends core.Error { | 952 class JsNoSuchMethodError extends core.Error { |
953 JsNoSuchMethodError(message, match) { | 953 JsNoSuchMethodError(message, match) { |
954 this[_message] = message; | 954 this[_message] = message; |
955 this[_method] = match == null ? null : dart.as(match.method, core.String); | 955 this[_method] = match == null ? null : dart.as(match.method, core.String); |
956 this[_receiver] = match == null ? null : dart.as(match.receiver, core.Stri
ng); | 956 this[_receiver] = match == null ? null : dart.as(match.receiver, core.Stri
ng); |
957 super.Error(); | 957 super.Error(); |
958 } | 958 } |
959 toString() { | 959 toString() { |
960 if (this[_method] == null) | 960 if (this[_method] == null) |
961 return `NoSuchMethodError: ${this[_message]}`; | 961 return `NoSuchMethodError: ${this[_message]}`; |
962 if (this[_receiver] == null) { | 962 if (this[_receiver] == null) { |
963 return `NoSuchMethodError: Cannot call "${this[_method]}" (${this[_messa
ge]})`; | 963 return `NoSuchMethodError: Cannot call "${this[_method]}" (${this[_messa
ge]})`; |
964 } | 964 } |
965 return `NoSuchMethodError: Cannot call "${this[_method]}" on "${this[_rece
iver]}" ` + `(${this[_message]})`; | 965 return `NoSuchMethodError: Cannot call "${this[_method]}" on "${this[_rece
iver]}" ` + `(${this[_message]})`; |
966 } | 966 } |
967 } | 967 } |
968 JsNoSuchMethodError[dart.implements] = () => [core.NoSuchMethodError]; | 968 JsNoSuchMethodError[dart.implements] = () => [core.NoSuchMethodError]; |
969 dart.setSignature(JsNoSuchMethodError, { | 969 dart.setSignature(JsNoSuchMethodError, { |
970 constructors: () => ({JsNoSuchMethodError: [JsNoSuchMethodError, [core.Strin
g, core.Object]]}) | 970 constructors: () => ({JsNoSuchMethodError: [JsNoSuchMethodError, [core.Strin
g, dart.dynamic]]}) |
971 }); | 971 }); |
972 class UnknownJsTypeError extends core.Error { | 972 class UnknownJsTypeError extends core.Error { |
973 UnknownJsTypeError(message) { | 973 UnknownJsTypeError(message) { |
974 this[_message] = message; | 974 this[_message] = message; |
975 super.Error(); | 975 super.Error(); |
976 } | 976 } |
977 toString() { | 977 toString() { |
978 return dart.notNull(this[_message][dartx.isEmpty]) ? 'Error' : `Error: ${t
his[_message]}`; | 978 return dart.notNull(this[_message][dartx.isEmpty]) ? 'Error' : `Error: ${t
his[_message]}`; |
979 } | 979 } |
980 } | 980 } |
981 dart.setSignature(UnknownJsTypeError, { | 981 dart.setSignature(UnknownJsTypeError, { |
982 constructors: () => ({UnknownJsTypeError: [UnknownJsTypeError, [core.String]
]}) | 982 constructors: () => ({UnknownJsTypeError: [UnknownJsTypeError, [core.String]
]}) |
983 }); | 983 }); |
984 function getTraceFromException(exception) { | 984 function getTraceFromException(exception) { |
985 return new _StackTrace(exception); | 985 return new _StackTrace(exception); |
986 } | 986 } |
987 dart.fn(getTraceFromException, core.StackTrace, [core.Object]); | 987 dart.fn(getTraceFromException, core.StackTrace, [dart.dynamic]); |
988 let _exception = Symbol('_exception'); | 988 let _exception = Symbol('_exception'); |
989 let _trace = Symbol('_trace'); | 989 let _trace = Symbol('_trace'); |
990 class _StackTrace extends core.Object { | 990 class _StackTrace extends core.Object { |
991 _StackTrace(exception) { | 991 _StackTrace(exception) { |
992 this[_exception] = exception; | 992 this[_exception] = exception; |
993 this[_trace] = null; | 993 this[_trace] = null; |
994 } | 994 } |
995 toString() { | 995 toString() { |
996 if (this[_trace] != null) | 996 if (this[_trace] != null) |
997 return this[_trace]; | 997 return this[_trace]; |
998 let trace = null; | 998 let trace = null; |
999 if (typeof this[_exception] === "object") { | 999 if (typeof this[_exception] === "object") { |
1000 trace = dart.as(this[_exception].stack, core.String); | 1000 trace = dart.as(this[_exception].stack, core.String); |
1001 } | 1001 } |
1002 return this[_trace] = trace == null ? '' : trace; | 1002 return this[_trace] = trace == null ? '' : trace; |
1003 } | 1003 } |
1004 } | 1004 } |
1005 _StackTrace[dart.implements] = () => [core.StackTrace]; | 1005 _StackTrace[dart.implements] = () => [core.StackTrace]; |
1006 dart.setSignature(_StackTrace, { | 1006 dart.setSignature(_StackTrace, { |
1007 constructors: () => ({_StackTrace: [_StackTrace, [core.Object]]}) | 1007 constructors: () => ({_StackTrace: [_StackTrace, [dart.dynamic]]}) |
1008 }); | 1008 }); |
1009 function objectHashCode(object) { | 1009 function objectHashCode(object) { |
1010 if (object == null || typeof object != 'object') { | 1010 if (object == null || typeof object != 'object') { |
1011 return dart.hashCode(object); | 1011 return dart.hashCode(object); |
1012 } else { | 1012 } else { |
1013 return Primitives.objectHashCode(object); | 1013 return Primitives.objectHashCode(object); |
1014 } | 1014 } |
1015 } | 1015 } |
1016 dart.fn(objectHashCode, core.int, [core.Object]); | 1016 dart.fn(objectHashCode, core.int, [dart.dynamic]); |
1017 function fillLiteralMap(keyValuePairs, result) { | 1017 function fillLiteralMap(keyValuePairs, result) { |
1018 let index = 0; | 1018 let index = 0; |
1019 let length = getLength(keyValuePairs); | 1019 let length = getLength(keyValuePairs); |
1020 while (dart.notNull(index) < dart.notNull(length)) { | 1020 while (dart.notNull(index) < dart.notNull(length)) { |
1021 let key = getIndex(keyValuePairs, (() => { | 1021 let key = getIndex(keyValuePairs, (() => { |
1022 let x = index; | 1022 let x = index; |
1023 index = dart.notNull(x) + 1; | 1023 index = dart.notNull(x) + 1; |
1024 return x; | 1024 return x; |
1025 })()); | 1025 })()); |
1026 let value = getIndex(keyValuePairs, (() => { | 1026 let value = getIndex(keyValuePairs, (() => { |
1027 let x = index; | 1027 let x = index; |
1028 index = dart.notNull(x) + 1; | 1028 index = dart.notNull(x) + 1; |
1029 return x; | 1029 return x; |
1030 })()); | 1030 })()); |
1031 result.set(key, value); | 1031 result.set(key, value); |
1032 } | 1032 } |
1033 return result; | 1033 return result; |
1034 } | 1034 } |
1035 dart.fn(fillLiteralMap, core.Object, [core.Object, core.Map]); | 1035 dart.fn(fillLiteralMap, dart.dynamic, [dart.dynamic, core.Map]); |
1036 function convertDartClosureToJS(closure, arity) { | 1036 function convertDartClosureToJS(closure, arity) { |
1037 return closure; | 1037 return closure; |
1038 } | 1038 } |
1039 dart.fn(convertDartClosureToJS, core.Object, [core.Object, core.int]); | 1039 dart.fn(convertDartClosureToJS, dart.dynamic, [dart.dynamic, core.int]); |
1040 function jsHasOwnProperty(jsObject, property) { | 1040 function jsHasOwnProperty(jsObject, property) { |
1041 return jsObject.hasOwnProperty(property); | 1041 return jsObject.hasOwnProperty(property); |
1042 } | 1042 } |
1043 dart.fn(jsHasOwnProperty, core.bool, [core.Object, core.String]); | 1043 dart.fn(jsHasOwnProperty, core.bool, [dart.dynamic, core.String]); |
1044 function jsPropertyAccess(jsObject, property) { | 1044 function jsPropertyAccess(jsObject, property) { |
1045 return jsObject[property]; | 1045 return jsObject[property]; |
1046 } | 1046 } |
1047 dart.fn(jsPropertyAccess, core.Object, [core.Object, core.String]); | 1047 dart.fn(jsPropertyAccess, dart.dynamic, [dart.dynamic, core.String]); |
1048 function getFallThroughError() { | 1048 function getFallThroughError() { |
1049 return new FallThroughErrorImplementation(); | 1049 return new FallThroughErrorImplementation(); |
1050 } | 1050 } |
1051 dart.fn(getFallThroughError); | 1051 dart.fn(getFallThroughError); |
1052 class Creates extends core.Object { | 1052 class Creates extends core.Object { |
1053 Creates(types) { | 1053 Creates(types) { |
1054 this.types = types; | 1054 this.types = types; |
1055 } | 1055 } |
1056 } | 1056 } |
1057 dart.setSignature(Creates, { | 1057 dart.setSignature(Creates, { |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1122 class RuntimeError extends core.Error { | 1122 class RuntimeError extends core.Error { |
1123 RuntimeError(message) { | 1123 RuntimeError(message) { |
1124 this.message = message; | 1124 this.message = message; |
1125 super.Error(); | 1125 super.Error(); |
1126 } | 1126 } |
1127 toString() { | 1127 toString() { |
1128 return `RuntimeError: ${this.message}`; | 1128 return `RuntimeError: ${this.message}`; |
1129 } | 1129 } |
1130 } | 1130 } |
1131 dart.setSignature(RuntimeError, { | 1131 dart.setSignature(RuntimeError, { |
1132 constructors: () => ({RuntimeError: [RuntimeError, [core.Object]]}) | 1132 constructors: () => ({RuntimeError: [RuntimeError, [dart.dynamic]]}) |
1133 }); | 1133 }); |
1134 function random64() { | 1134 function random64() { |
1135 let int32a = Math.random() * 0x100000000 >>> 0; | 1135 let int32a = Math.random() * 0x100000000 >>> 0; |
1136 let int32b = Math.random() * 0x100000000 >>> 0; | 1136 let int32b = Math.random() * 0x100000000 >>> 0; |
1137 return dart.notNull(int32a) + dart.notNull(int32b) * 4294967296; | 1137 return dart.notNull(int32a) + dart.notNull(int32b) * 4294967296; |
1138 } | 1138 } |
1139 dart.fn(random64, core.int, []); | 1139 dart.fn(random64, core.int, []); |
1140 function jsonEncodeNative(string) { | 1140 function jsonEncodeNative(string) { |
1141 return JSON.stringify(string); | 1141 return JSON.stringify(string); |
1142 } | 1142 } |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1195 exports.Returns = Returns; | 1195 exports.Returns = Returns; |
1196 exports.JSName = JSName; | 1196 exports.JSName = JSName; |
1197 exports.JavaScriptIndexingBehavior = JavaScriptIndexingBehavior; | 1197 exports.JavaScriptIndexingBehavior = JavaScriptIndexingBehavior; |
1198 exports.TypeErrorImplementation = TypeErrorImplementation; | 1198 exports.TypeErrorImplementation = TypeErrorImplementation; |
1199 exports.CastErrorImplementation = CastErrorImplementation; | 1199 exports.CastErrorImplementation = CastErrorImplementation; |
1200 exports.FallThroughErrorImplementation = FallThroughErrorImplementation; | 1200 exports.FallThroughErrorImplementation = FallThroughErrorImplementation; |
1201 exports.RuntimeError = RuntimeError; | 1201 exports.RuntimeError = RuntimeError; |
1202 exports.random64 = random64; | 1202 exports.random64 = random64; |
1203 exports.jsonEncodeNative = jsonEncodeNative; | 1203 exports.jsonEncodeNative = jsonEncodeNative; |
1204 }); | 1204 }); |
OLD | NEW |