| OLD | NEW |
| 1 var _js_helper; | 1 var _js_helper; |
| 2 (function(exports) { | 2 (function(exports) { |
| 3 'use strict'; | 3 'use strict'; |
| 4 class _Patch extends dart.Object { | 4 class _Patch extends dart.Object { |
| 5 _Patch() { | 5 _Patch() { |
| 6 } | 6 } |
| 7 } | 7 } |
| 8 let patch = new _Patch(); | 8 let patch = new _Patch(); |
| 9 class InternalMap extends dart.Object { | 9 class InternalMap extends dart.Object { |
| 10 } | 10 } |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // Function traceHelper: (String) → void | 55 // Function traceHelper: (String) → void |
| 56 function traceHelper(method) { | 56 function traceHelper(method) { |
| 57 if (!this.cache) { | 57 if (!this.cache) { |
| 58 this.cache = Object.create(null); | 58 this.cache = Object.create(null); |
| 59 } | 59 } |
| 60 if (!this.cache[method]) { | 60 if (!this.cache[method]) { |
| 61 console.log(method); | 61 console.log(method); |
| 62 this.cache[method] = true; | 62 this.cache[method] = true; |
| 63 } | 63 } |
| 64 } | 64 } |
| 65 let _memberName = Symbol('_memberName'); |
| 66 let _internalName = Symbol('_internalName'); |
| 67 let _kind = Symbol('_kind'); |
| 68 let _arguments = Symbol('_arguments'); |
| 69 let _namedArgumentNames = Symbol('_namedArgumentNames'); |
| 70 let _namedIndices = Symbol('_namedIndices'); |
| 71 let _getCachedInvocation = Symbol('_getCachedInvocation'); |
| 65 class JSInvocationMirror extends dart.Object { | 72 class JSInvocationMirror extends dart.Object { |
| 66 JSInvocationMirror(_memberName, _internalName, _kind, _arguments, _namedArgu
mentNames) { | 73 JSInvocationMirror($_memberName, $_internalName, $_kind, $_arguments, $_name
dArgumentNames) { |
| 67 this._memberName = _memberName; | 74 this[_memberName] = $_memberName; |
| 68 this._internalName = _internalName; | 75 this[_internalName] = $_internalName; |
| 69 this._kind = _kind; | 76 this[_kind] = $_kind; |
| 70 this._arguments = _arguments; | 77 this[_arguments] = $_arguments; |
| 71 this._namedArgumentNames = _namedArgumentNames; | 78 this[_namedArgumentNames] = $_namedArgumentNames; |
| 72 this._namedIndices = null; | 79 this[_namedIndices] = null; |
| 73 } | 80 } |
| 74 get memberName() { | 81 get memberName() { |
| 75 if (dart.is(this._memberName, core.Symbol)) | 82 if (dart.is(this[_memberName], core.Symbol)) |
| 76 return dart.as(this._memberName, core.Symbol); | 83 return dart.as(this[_memberName], core.Symbol); |
| 77 let name = dart.as(this._memberName, core.String); | 84 let name = dart.as(this[_memberName], core.String); |
| 78 let unmangledName = _js_names.mangledNames.get(name); | 85 let unmangledName = _js_names.mangledNames.get(name); |
| 79 if (unmangledName !== null) { | 86 if (unmangledName !== null) { |
| 80 name = unmangledName.split(':').get(0); | 87 name = unmangledName.split(':').get(0); |
| 81 } else { | 88 } else { |
| 82 if (_js_names.mangledNames.get(this._internalName) === null) { | 89 if (_js_names.mangledNames.get(this[_internalName]) === null) { |
| 83 core.print(`Warning: '${name}' is used reflectively but not in Mirrors
Used. ` + "This will break minified code."); | 90 core.print(`Warning: '${name}' is used reflectively but not in Mirrors
Used. ` + "This will break minified code."); |
| 84 } | 91 } |
| 85 } | 92 } |
| 86 this._memberName = new _internal.Symbol.unvalidated(name); | 93 this[_memberName] = new _internal.Symbol.unvalidated(name); |
| 87 return dart.as(this._memberName, core.Symbol); | 94 return dart.as(this[_memberName], core.Symbol); |
| 88 } | 95 } |
| 89 get isMethod() { | 96 get isMethod() { |
| 90 return this._kind === METHOD; | 97 return this[_kind] === METHOD; |
| 91 } | 98 } |
| 92 get isGetter() { | 99 get isGetter() { |
| 93 return this._kind === GETTER; | 100 return this[_kind] === GETTER; |
| 94 } | 101 } |
| 95 get isSetter() { | 102 get isSetter() { |
| 96 return this._kind === SETTER; | 103 return this[_kind] === SETTER; |
| 97 } | 104 } |
| 98 get isAccessor() { | 105 get isAccessor() { |
| 99 return this._kind !== METHOD; | 106 return this[_kind] !== METHOD; |
| 100 } | 107 } |
| 101 get positionalArguments() { | 108 get positionalArguments() { |
| 102 if (this.isGetter) | 109 if (this.isGetter) |
| 103 return /* Unimplemented const */new List.from([]); | 110 return /* Unimplemented const */new List.from([]); |
| 104 let argumentCount = this._arguments.length - this._namedArgumentNames.leng
th; | 111 let argumentCount = this[_arguments].length - this[_namedArgumentNames].le
ngth; |
| 105 if (argumentCount === 0) | 112 if (argumentCount === 0) |
| 106 return /* Unimplemented const */new List.from([]); | 113 return /* Unimplemented const */new List.from([]); |
| 107 let list = new List.from([]); | 114 let list = new List.from([]); |
| 108 for (let index = 0; index < argumentCount; index++) { | 115 for (let index = 0; index < argumentCount; index++) { |
| 109 list.add(this._arguments.get(index)); | 116 list.add(this[_arguments].get(index)); |
| 110 } | 117 } |
| 111 return dart.as(makeLiteralListConst(list), core.List); | 118 return dart.as(makeLiteralListConst(list), core.List); |
| 112 } | 119 } |
| 113 get namedArguments() { | 120 get namedArguments() { |
| 114 if (this.isAccessor) | 121 if (this.isAccessor) |
| 115 return dart.map(); | 122 return dart.map(); |
| 116 let namedArgumentCount = this._namedArgumentNames.length; | 123 let namedArgumentCount = this[_namedArgumentNames].length; |
| 117 let namedArgumentsStartIndex = this._arguments.length - namedArgumentCount
; | 124 let namedArgumentsStartIndex = this[_arguments].length - namedArgumentCoun
t; |
| 118 if (namedArgumentCount === 0) | 125 if (namedArgumentCount === 0) |
| 119 return dart.map(); | 126 return dart.map(); |
| 120 let map = new core.Map(); | 127 let map = new core.Map(); |
| 121 for (let i = 0; i < namedArgumentCount; i++) { | 128 for (let i = 0; i < namedArgumentCount; i++) { |
| 122 map.set(new _internal.Symbol.unvalidated(dart.as(this._namedArgumentName
s.get(i), core.String)), this._arguments.get(namedArgumentsStartIndex + i)); | 129 map.set(new _internal.Symbol.unvalidated(dart.as(this[_namedArgumentName
s].get(i), core.String)), this[_arguments].get(namedArgumentsStartIndex + i)); |
| 123 } | 130 } |
| 124 return map; | 131 return map; |
| 125 } | 132 } |
| 126 _getCachedInvocation(object) { | 133 [_getCachedInvocation](object) { |
| 127 let interceptor = _interceptors.getInterceptor(object); | 134 let interceptor = _interceptors.getInterceptor(object); |
| 128 let receiver = object; | 135 let receiver = object; |
| 129 let name = this._internalName; | 136 let name = this[_internalName]; |
| 130 let arguments = this._arguments; | 137 let arguments = this[_arguments]; |
| 131 let interceptedNames = _foreign_helper.JS_EMBEDDED_GLOBAL('', dart.as(_js_
embedded_names.INTERCEPTED_NAMES, core.String)); | 138 let interceptedNames = _foreign_helper.JS_EMBEDDED_GLOBAL('', dart.as(_js_
embedded_names.INTERCEPTED_NAMES, core.String)); |
| 132 let isIntercepted = Object.prototype.hasOwnProperty.call(interceptedNames,
name); | 139 let isIntercepted = Object.prototype.hasOwnProperty.call(interceptedNames,
name); |
| 133 if (isIntercepted) { | 140 if (isIntercepted) { |
| 134 receiver = interceptor; | 141 receiver = interceptor; |
| 135 if (object === interceptor) { | 142 if (object === interceptor) { |
| 136 interceptor = null; | 143 interceptor = null; |
| 137 } | 144 } |
| 138 } else { | 145 } else { |
| 139 interceptor = null; | 146 interceptor = null; |
| 140 } | 147 } |
| (...skipping 22 matching lines...) Expand all Loading... |
| 163 } | 170 } |
| 164 } else { | 171 } else { |
| 165 return new CachedNoSuchMethodInvocation(interceptor); | 172 return new CachedNoSuchMethodInvocation(interceptor); |
| 166 } | 173 } |
| 167 } | 174 } |
| 168 static invokeFromMirror(invocation, victim) { | 175 static invokeFromMirror(invocation, victim) { |
| 169 let cached = invocation._getCachedInvocation(victim); | 176 let cached = invocation._getCachedInvocation(victim); |
| 170 if (dart.dload(cached, 'isNoSuchMethod')) { | 177 if (dart.dload(cached, 'isNoSuchMethod')) { |
| 171 return dart.dinvoke(cached, 'invokeOn', victim, invocation); | 178 return dart.dinvoke(cached, 'invokeOn', victim, invocation); |
| 172 } else { | 179 } else { |
| 173 return dart.dinvoke(cached, 'invokeOn', victim, invocation._arguments); | 180 return dart.dinvoke(cached, 'invokeOn', victim, invocation[_arguments]); |
| 174 } | 181 } |
| 175 } | 182 } |
| 176 static getCachedInvocation(invocation, victim) { | 183 static getCachedInvocation(invocation, victim) { |
| 177 return invocation._getCachedInvocation(victim); | 184 return invocation._getCachedInvocation(victim); |
| 178 } | 185 } |
| 179 } | 186 } |
| 180 JSInvocationMirror.METHOD = 0; | 187 JSInvocationMirror.METHOD = 0; |
| 181 JSInvocationMirror.GETTER = 1; | 188 JSInvocationMirror.GETTER = 1; |
| 182 JSInvocationMirror.SETTER = 2; | 189 JSInvocationMirror.SETTER = 2; |
| 183 class CachedInvocation extends dart.Object { | 190 class CachedInvocation extends dart.Object { |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 dart.defineNamedConstructor(ReflectionInfo, 'internal'); | 372 dart.defineNamedConstructor(ReflectionInfo, 'internal'); |
| 366 ReflectionInfo.REQUIRED_PARAMETERS_INFO = 0; | 373 ReflectionInfo.REQUIRED_PARAMETERS_INFO = 0; |
| 367 ReflectionInfo.OPTIONAL_PARAMETERS_INFO = 1; | 374 ReflectionInfo.OPTIONAL_PARAMETERS_INFO = 1; |
| 368 ReflectionInfo.FUNCTION_TYPE_INDEX = 2; | 375 ReflectionInfo.FUNCTION_TYPE_INDEX = 2; |
| 369 ReflectionInfo.FIRST_DEFAULT_ARGUMENT = 3; | 376 ReflectionInfo.FIRST_DEFAULT_ARGUMENT = 3; |
| 370 // Function getMetadata: (int) → dynamic | 377 // Function getMetadata: (int) → dynamic |
| 371 function getMetadata(index) { | 378 function getMetadata(index) { |
| 372 let metadata = _foreign_helper.JS_EMBEDDED_GLOBAL('', dart.as(_js_embedded_n
ames.METADATA, core.String)); | 379 let metadata = _foreign_helper.JS_EMBEDDED_GLOBAL('', dart.as(_js_embedded_n
ames.METADATA, core.String)); |
| 373 return metadata[index]; | 380 return metadata[index]; |
| 374 } | 381 } |
| 382 let _throwFormatException = Symbol('_throwFormatException'); |
| 383 let _fromCharCodeApply = Symbol('_fromCharCodeApply'); |
| 384 let _mangledNameMatchesType = Symbol('_mangledNameMatchesType'); |
| 385 let _typeName = Symbol('_typeName'); |
| 375 class Primitives extends dart.Object { | 386 class Primitives extends dart.Object { |
| 376 static initializeStatics(id) { | 387 static initializeStatics(id) { |
| 377 mirrorFunctionCacheName = `_${id}`; | 388 mirrorFunctionCacheName = `_${id}`; |
| 378 mirrorInvokeCacheName = `_${id}`; | 389 mirrorInvokeCacheName = `_${id}`; |
| 379 } | 390 } |
| 380 static objectHashCode(object) { | 391 static objectHashCode(object) { |
| 381 let hash = dart.as(object.$identityHash, core.int); | 392 let hash = dart.as(object.$identityHash, core.int); |
| 382 if (hash === null) { | 393 if (hash === null) { |
| 383 hash = Math.random() * 0x3fffffff | 0; | 394 hash = Math.random() * 0x3fffffff | 0; |
| 384 object.$identityHash = hash; | 395 object.$identityHash = hash; |
| 385 } | 396 } |
| 386 return hash; | 397 return hash; |
| 387 } | 398 } |
| 388 static _throwFormatException(string) { | 399 static [_throwFormatException](string) { |
| 389 throw new core.FormatException(string); | 400 throw new core.FormatException(string); |
| 390 } | 401 } |
| 391 static parseInt(source, radix, handleError) { | 402 static parseInt(source, radix, handleError) { |
| 392 if (handleError === null) | 403 if (handleError === null) |
| 393 handleError = dart.as(_throwFormatException, dart.throw_("Unimplemented
type (String) → int")); | 404 handleError = dart.as(_throwFormatException, dart.throw_("Unimplemented
type (String) → int")); |
| 394 checkString(source); | 405 checkString(source); |
| 395 let match = /^\s*[+-]?((0x[a-f0-9]+)|(\d+)|([a-z0-9]+))\s*$/i.exec(source)
; | 406 let match = /^\s*[+-]?((0x[a-f0-9]+)|(\d+)|([a-z0-9]+))\s*$/i.exec(source)
; |
| 396 let digitsIndex = 1; | 407 let digitsIndex = 1; |
| 397 let hexIndex = 2; | 408 let hexIndex = 2; |
| 398 let decimalIndex = 3; | 409 let decimalIndex = 3; |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 static get isJsshell() { | 514 static get isJsshell() { |
| 504 return typeof version == "function" && typeof system == "function"; | 515 return typeof version == "function" && typeof system == "function"; |
| 505 } | 516 } |
| 506 static currentUri() { | 517 static currentUri() { |
| 507 requiresPreamble(); | 518 requiresPreamble(); |
| 508 if (!!self.location) { | 519 if (!!self.location) { |
| 509 return self.location.href; | 520 return self.location.href; |
| 510 } | 521 } |
| 511 return null; | 522 return null; |
| 512 } | 523 } |
| 513 static _fromCharCodeApply(array) { | 524 static [_fromCharCodeApply](array) { |
| 514 let result = ""; | 525 let result = ""; |
| 515 let kMaxApply = 500; | 526 let kMaxApply = 500; |
| 516 let end = array.length; | 527 let end = array.length; |
| 517 for (let i = 0; i < end; i = kMaxApply) { | 528 for (let i = 0; i < end; i = kMaxApply) { |
| 518 let subarray = null; | 529 let subarray = null; |
| 519 if (end <= kMaxApply) { | 530 if (end <= kMaxApply) { |
| 520 subarray = array; | 531 subarray = array; |
| 521 } else { | 532 } else { |
| 522 subarray = array.slice(i, i + kMaxApply < end ? i + kMaxApply : end); | 533 subarray = array.slice(i, i + kMaxApply < end ? i + kMaxApply : end); |
| 523 } | 534 } |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 751 } else { | 762 } else { |
| 752 bad = true; | 763 bad = true; |
| 753 } | 764 } |
| 754 }).bind(this)); | 765 }).bind(this)); |
| 755 if (bad) { | 766 if (bad) { |
| 756 return functionNoSuchMethod(function, positionalArguments, namedArgument
s); | 767 return functionNoSuchMethod(function, positionalArguments, namedArgument
s); |
| 757 } | 768 } |
| 758 positionalArguments.addAll(defaultArguments.values); | 769 positionalArguments.addAll(defaultArguments.values); |
| 759 return jsFunction.apply(function, positionalArguments); | 770 return jsFunction.apply(function, positionalArguments); |
| 760 } | 771 } |
| 761 static _mangledNameMatchesType(mangledName, type) { | 772 static [_mangledNameMatchesType](mangledName, type) { |
| 762 return mangledName == type._typeName; | 773 return mangledName == type[_typeName]; |
| 763 } | 774 } |
| 764 static identicalImplementation(a, b) { | 775 static identicalImplementation(a, b) { |
| 765 return a == null ? b == null : a === b; | 776 return a == null ? b == null : a === b; |
| 766 } | 777 } |
| 767 static extractStackTrace(error) { | 778 static extractStackTrace(error) { |
| 768 return getTraceFromException(error.$thrownJsError); | 779 return getTraceFromException(error.$thrownJsError); |
| 769 } | 780 } |
| 770 } | 781 } |
| 771 Primitives.mirrorFunctionCacheName = '$cachedFunction'; | 782 Primitives.mirrorFunctionCacheName = '$cachedFunction'; |
| 772 Primitives.mirrorInvokeCacheName = '$cachedInvocation'; | 783 Primitives.mirrorInvokeCacheName = '$cachedInvocation'; |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 866 return list; | 877 return list; |
| 867 } | 878 } |
| 868 // Function throwRuntimeError: (dynamic) → dynamic | 879 // Function throwRuntimeError: (dynamic) → dynamic |
| 869 function throwRuntimeError(message) { | 880 function throwRuntimeError(message) { |
| 870 throw new RuntimeError(message); | 881 throw new RuntimeError(message); |
| 871 } | 882 } |
| 872 // Function throwAbstractClassInstantiationError: (dynamic) → dynamic | 883 // Function throwAbstractClassInstantiationError: (dynamic) → dynamic |
| 873 function throwAbstractClassInstantiationError(className) { | 884 function throwAbstractClassInstantiationError(className) { |
| 874 throw new core.AbstractClassInstantiationError(dart.as(className, core.Strin
g)); | 885 throw new core.AbstractClassInstantiationError(dart.as(className, core.Strin
g)); |
| 875 } | 886 } |
| 887 let _argumentsExpr = Symbol('_argumentsExpr'); |
| 888 let _expr = Symbol('_expr'); |
| 889 let _method = Symbol('_method'); |
| 890 let _receiver = Symbol('_receiver'); |
| 891 let _pattern = Symbol('_pattern'); |
| 876 class TypeErrorDecoder extends dart.Object { | 892 class TypeErrorDecoder extends dart.Object { |
| 877 TypeErrorDecoder(_arguments, _argumentsExpr, _expr, _method, _receiver, _pat
tern) { | 893 TypeErrorDecoder($_arguments, $_argumentsExpr, $_expr, $_method, $_receiver,
$_pattern) { |
| 878 this._arguments = _arguments; | 894 this[_arguments] = $_arguments; |
| 879 this._argumentsExpr = _argumentsExpr; | 895 this[_argumentsExpr] = $_argumentsExpr; |
| 880 this._expr = _expr; | 896 this[_expr] = $_expr; |
| 881 this._method = _method; | 897 this[_method] = $_method; |
| 882 this._receiver = _receiver; | 898 this[_receiver] = $_receiver; |
| 883 this._pattern = _pattern; | 899 this[_pattern] = $_pattern; |
| 884 } | 900 } |
| 885 matchTypeError(message) { | 901 matchTypeError(message) { |
| 886 let match = new RegExp(this._pattern).exec(message); | 902 let match = new RegExp(this[_pattern]).exec(message); |
| 887 if (match === null) | 903 if (match === null) |
| 888 return null; | 904 return null; |
| 889 let result = Object.create(null); | 905 let result = Object.create(null); |
| 890 if (this._arguments !== -1) { | 906 if (this[_arguments] !== -1) { |
| 891 result.arguments = match[this._arguments + 1]; | 907 result.arguments = match[this[_arguments] + 1]; |
| 892 } | 908 } |
| 893 if (this._argumentsExpr !== -1) { | 909 if (this[_argumentsExpr] !== -1) { |
| 894 result.argumentsExpr = match[this._argumentsExpr + 1]; | 910 result.argumentsExpr = match[this[_argumentsExpr] + 1]; |
| 895 } | 911 } |
| 896 if (this._expr !== -1) { | 912 if (this[_expr] !== -1) { |
| 897 result.expr = match[this._expr + 1]; | 913 result.expr = match[this[_expr] + 1]; |
| 898 } | 914 } |
| 899 if (this._method !== -1) { | 915 if (this[_method] !== -1) { |
| 900 result.method = match[this._method + 1]; | 916 result.method = match[this[_method] + 1]; |
| 901 } | 917 } |
| 902 if (this._receiver !== -1) { | 918 if (this[_receiver] !== -1) { |
| 903 result.receiver = match[this._receiver + 1]; | 919 result.receiver = match[this[_receiver] + 1]; |
| 904 } | 920 } |
| 905 return result; | 921 return result; |
| 906 } | 922 } |
| 907 static buildJavaScriptObject() { | 923 static buildJavaScriptObject() { |
| 908 return { | 924 return { |
| 909 toString: function() { | 925 toString: function() { |
| 910 return "$receiver$"; | 926 return "$receiver$"; |
| 911 } | 927 } |
| 912 }; | 928 }; |
| 913 } | 929 } |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1028 get nullLiteralPropertyPattern() { | 1044 get nullLiteralPropertyPattern() { |
| 1029 return dart.as(extractPattern(provokePropertyErrorOnNull()), TypeErrorDeco
der); | 1045 return dart.as(extractPattern(provokePropertyErrorOnNull()), TypeErrorDeco
der); |
| 1030 }, | 1046 }, |
| 1031 get undefinedPropertyPattern() { | 1047 get undefinedPropertyPattern() { |
| 1032 return dart.as(extractPattern(provokePropertyErrorOn(void 0)), TypeErrorDe
coder); | 1048 return dart.as(extractPattern(provokePropertyErrorOn(void 0)), TypeErrorDe
coder); |
| 1033 }, | 1049 }, |
| 1034 get undefinedLiteralPropertyPattern() { | 1050 get undefinedLiteralPropertyPattern() { |
| 1035 return dart.as(extractPattern(provokePropertyErrorOnUndefined()), TypeErro
rDecoder); | 1051 return dart.as(extractPattern(provokePropertyErrorOnUndefined()), TypeErro
rDecoder); |
| 1036 } | 1052 } |
| 1037 }); | 1053 }); |
| 1054 let _message = Symbol('_message'); |
| 1038 class NullError extends core.Error { | 1055 class NullError extends core.Error { |
| 1039 NullError(_message, match) { | 1056 NullError($_message, match) { |
| 1040 this._message = _message; | 1057 this[_message] = $_message; |
| 1041 this._method = dart.as(match === null ? null : match.method, core.String); | 1058 this[_method] = dart.as(match === null ? null : match.method, core.String)
; |
| 1042 super.Error(); | 1059 super.Error(); |
| 1043 } | 1060 } |
| 1044 toString() { | 1061 toString() { |
| 1045 if (this._method === null) | 1062 if (this[_method] === null) |
| 1046 return `NullError: ${this._message}`; | 1063 return `NullError: ${this[_message]}`; |
| 1047 return `NullError: Cannot call "${this._method}" on null`; | 1064 return `NullError: Cannot call "${this[_method]}" on null`; |
| 1048 } | 1065 } |
| 1049 } | 1066 } |
| 1050 class JsNoSuchMethodError extends core.Error { | 1067 class JsNoSuchMethodError extends core.Error { |
| 1051 JsNoSuchMethodError(_message, match) { | 1068 JsNoSuchMethodError($_message, match) { |
| 1052 this._message = _message; | 1069 this[_message] = $_message; |
| 1053 this._method = dart.as(match === null ? null : match.method, core.String); | 1070 this[_method] = dart.as(match === null ? null : match.method, core.String)
; |
| 1054 this._receiver = dart.as(match === null ? null : match.receiver, core.Stri
ng); | 1071 this[_receiver] = dart.as(match === null ? null : match.receiver, core.Str
ing); |
| 1055 super.Error(); | 1072 super.Error(); |
| 1056 } | 1073 } |
| 1057 toString() { | 1074 toString() { |
| 1058 if (this._method === null) | 1075 if (this[_method] === null) |
| 1059 return `NoSuchMethodError: ${this._message}`; | 1076 return `NoSuchMethodError: ${this[_message]}`; |
| 1060 if (this._receiver === null) { | 1077 if (this[_receiver] === null) { |
| 1061 return `NoSuchMethodError: Cannot call "${this._method}" (${this._messag
e})`; | 1078 return `NoSuchMethodError: Cannot call "${this[_method]}" (${this[_messa
ge]})`; |
| 1062 } | 1079 } |
| 1063 return `NoSuchMethodError: Cannot call "${this._method}" on "${this._recei
ver}" ` + `(${this._message})`; | 1080 return `NoSuchMethodError: Cannot call "${this[_method]}" on "${this[_rece
iver]}" ` + `(${this[_message]})`; |
| 1064 } | 1081 } |
| 1065 } | 1082 } |
| 1066 class UnknownJsTypeError extends core.Error { | 1083 class UnknownJsTypeError extends core.Error { |
| 1067 UnknownJsTypeError(_message) { | 1084 UnknownJsTypeError($_message) { |
| 1068 this._message = _message; | 1085 this[_message] = $_message; |
| 1069 super.Error(); | 1086 super.Error(); |
| 1070 } | 1087 } |
| 1071 toString() { | 1088 toString() { |
| 1072 return this._message.isEmpty ? 'Error' : `Error: ${this._message}`; | 1089 return this[_message].isEmpty ? 'Error' : `Error: ${this[_message]}`; |
| 1073 } | 1090 } |
| 1074 } | 1091 } |
| 1075 // Function unwrapException: (dynamic) → dynamic | 1092 // Function unwrapException: (dynamic) → dynamic |
| 1076 function unwrapException(ex) { | 1093 function unwrapException(ex) { |
| 1077 // Function saveStackTrace: (dynamic) → dynamic | 1094 // Function saveStackTrace: (dynamic) → dynamic |
| 1078 function saveStackTrace(error) { | 1095 function saveStackTrace(error) { |
| 1079 if (dart.is(error, core.Error)) { | 1096 if (dart.is(error, core.Error)) { |
| 1080 let thrownStackTrace = error.$thrownJsError; | 1097 let thrownStackTrace = error.$thrownJsError; |
| 1081 if (thrownStackTrace === null) { | 1098 if (thrownStackTrace === null) { |
| 1082 error.$thrownJsError = ex; | 1099 error.$thrownJsError = ex; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1140 if (dart.notNull(typeof message == string) && dart.notNull(dart.equals(mes
sage, 'too much recursion'))) { | 1157 if (dart.notNull(typeof message == string) && dart.notNull(dart.equals(mes
sage, 'too much recursion'))) { |
| 1141 return new core.StackOverflowError(); | 1158 return new core.StackOverflowError(); |
| 1142 } | 1159 } |
| 1143 } | 1160 } |
| 1144 return ex; | 1161 return ex; |
| 1145 } | 1162 } |
| 1146 // Function getTraceFromException: (dynamic) → StackTrace | 1163 // Function getTraceFromException: (dynamic) → StackTrace |
| 1147 function getTraceFromException(exception) { | 1164 function getTraceFromException(exception) { |
| 1148 return new _StackTrace(exception); | 1165 return new _StackTrace(exception); |
| 1149 } | 1166 } |
| 1167 let _exception = Symbol('_exception'); |
| 1168 let _trace = Symbol('_trace'); |
| 1150 class _StackTrace extends dart.Object { | 1169 class _StackTrace extends dart.Object { |
| 1151 _StackTrace(_exception) { | 1170 _StackTrace($_exception) { |
| 1152 this._exception = _exception; | 1171 this[_exception] = $_exception; |
| 1153 this._trace = null; | 1172 this[_trace] = null; |
| 1154 } | 1173 } |
| 1155 toString() { | 1174 toString() { |
| 1156 if (this._trace !== null) | 1175 if (this[_trace] !== null) |
| 1157 return this._trace; | 1176 return this[_trace]; |
| 1158 let trace = null; | 1177 let trace = null; |
| 1159 if (typeof this._exception === "object") { | 1178 if (typeof this[_exception] === "object") { |
| 1160 trace = dart.as(this._exception.stack, core.String); | 1179 trace = dart.as(this[_exception].stack, core.String); |
| 1161 } | 1180 } |
| 1162 return this._trace = trace === null ? '' : trace; | 1181 return this[_trace] = trace === null ? '' : trace; |
| 1163 } | 1182 } |
| 1164 } | 1183 } |
| 1165 // Function objectHashCode: (dynamic) → int | 1184 // Function objectHashCode: (dynamic) → int |
| 1166 function objectHashCode(object) { | 1185 function objectHashCode(object) { |
| 1167 if (dart.notNull(object === null) || dart.notNull(typeof object != 'object')
) { | 1186 if (dart.notNull(object === null) || dart.notNull(typeof object != 'object')
) { |
| 1168 return dart.as(dart.dload(object, 'hashCode'), core.int); | 1187 return dart.as(dart.dload(object, 'hashCode'), core.int); |
| 1169 } else { | 1188 } else { |
| 1170 return Primitives.objectHashCode(object); | 1189 return Primitives.objectHashCode(object); |
| 1171 } | 1190 } |
| 1172 } | 1191 } |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1427 Closure.REQUIRED_PARAMETER_INDEX = 3; | 1446 Closure.REQUIRED_PARAMETER_INDEX = 3; |
| 1428 Closure.OPTIONAL_PARAMETER_INDEX = 4; | 1447 Closure.OPTIONAL_PARAMETER_INDEX = 4; |
| 1429 Closure.DEFAULT_ARGUMENTS_INDEX = 5; | 1448 Closure.DEFAULT_ARGUMENTS_INDEX = 5; |
| 1430 Closure.functionCounter = 0; | 1449 Closure.functionCounter = 0; |
| 1431 // Function closureFromTearOff: (dynamic, dynamic, dynamic, dynamic, dynamic,
dynamic) → dynamic | 1450 // Function closureFromTearOff: (dynamic, dynamic, dynamic, dynamic, dynamic,
dynamic) → dynamic |
| 1432 function closureFromTearOff(receiver, functions, reflectionInfo, isStatic, jsA
rguments, name) { | 1451 function closureFromTearOff(receiver, functions, reflectionInfo, isStatic, jsA
rguments, name) { |
| 1433 return Closure.fromTearOff(receiver, _interceptors.JSArray.markFixedList(dar
t.as(functions, core.List)), _interceptors.JSArray.markFixedList(dart.as(reflect
ionInfo, core.List)), !!isStatic, jsArguments, name); | 1452 return Closure.fromTearOff(receiver, _interceptors.JSArray.markFixedList(dar
t.as(functions, core.List)), _interceptors.JSArray.markFixedList(dart.as(reflect
ionInfo, core.List)), !!isStatic, jsArguments, name); |
| 1434 } | 1453 } |
| 1435 class TearOffClosure extends Closure { | 1454 class TearOffClosure extends Closure { |
| 1436 } | 1455 } |
| 1456 let _self = Symbol('_self'); |
| 1457 let _target = Symbol('_target'); |
| 1458 let _name = Symbol('_name'); |
| 1437 class BoundClosure extends TearOffClosure { | 1459 class BoundClosure extends TearOffClosure { |
| 1438 BoundClosure(_self, _target, _receiver, _name) { | 1460 BoundClosure($_self, $_target, $_receiver, $_name) { |
| 1439 this._self = _self; | 1461 this[_self] = $_self; |
| 1440 this._target = _target; | 1462 this[_target] = $_target; |
| 1441 this._receiver = _receiver; | 1463 this[_receiver] = $_receiver; |
| 1442 this._name = _name; | 1464 this[_name] = $_name; |
| 1443 super.TearOffClosure(); | 1465 super.TearOffClosure(); |
| 1444 } | 1466 } |
| 1445 ['=='](other) { | 1467 ['=='](other) { |
| 1446 if (core.identical(this, other)) | 1468 if (core.identical(this, other)) |
| 1447 return true; | 1469 return true; |
| 1448 if (!dart.is(other, BoundClosure)) | 1470 if (!dart.is(other, BoundClosure)) |
| 1449 return false; | 1471 return false; |
| 1450 return this._self === dart.dload(other, '_self') && this._target === dart.
dload(other, '_target') && this._receiver === dart.dload(other, '_receiver'); | 1472 return this[_self] === dart.dload(other, '_self') && this[_target] === dar
t.dload(other, '_target') && this[_receiver] === dart.dload(other, '_receiver'); |
| 1451 } | 1473 } |
| 1452 get hashCode() { | 1474 get hashCode() { |
| 1453 let receiverHashCode = null; | 1475 let receiverHashCode = null; |
| 1454 if (this._receiver === null) { | 1476 if (this[_receiver] === null) { |
| 1455 receiverHashCode = Primitives.objectHashCode(this._self); | 1477 receiverHashCode = Primitives.objectHashCode(this[_self]); |
| 1456 } else if (!dart.equals(typeof this._receiver, 'object')) { | 1478 } else if (!dart.equals(typeof this[_receiver], 'object')) { |
| 1457 receiverHashCode = dart.as(dart.dload(this._receiver, 'hashCode'), core.
int); | 1479 receiverHashCode = dart.as(dart.dload(this[_receiver], 'hashCode'), core
.int); |
| 1458 } else { | 1480 } else { |
| 1459 receiverHashCode = Primitives.objectHashCode(this._receiver); | 1481 receiverHashCode = Primitives.objectHashCode(this[_receiver]); |
| 1460 } | 1482 } |
| 1461 return receiverHashCode ^ Primitives.objectHashCode(this._target); | 1483 return receiverHashCode ^ Primitives.objectHashCode(this[_target]); |
| 1462 } | 1484 } |
| 1463 static selfOf(closure) { | 1485 static selfOf(closure) { |
| 1464 return closure._self; | 1486 return closure[_self]; |
| 1465 } | 1487 } |
| 1466 static targetOf(closure) { | 1488 static targetOf(closure) { |
| 1467 return closure._target; | 1489 return closure[_target]; |
| 1468 } | 1490 } |
| 1469 static receiverOf(closure) { | 1491 static receiverOf(closure) { |
| 1470 return closure._receiver; | 1492 return closure[_receiver]; |
| 1471 } | 1493 } |
| 1472 static nameOf(closure) { | 1494 static nameOf(closure) { |
| 1473 return closure._name; | 1495 return closure[_name]; |
| 1474 } | 1496 } |
| 1475 static selfFieldName() { | 1497 static selfFieldName() { |
| 1476 if (selfFieldNameCache === null) { | 1498 if (selfFieldNameCache === null) { |
| 1477 selfFieldNameCache = computeFieldNamed('self'); | 1499 selfFieldNameCache = computeFieldNamed('self'); |
| 1478 } | 1500 } |
| 1479 return selfFieldNameCache; | 1501 return selfFieldNameCache; |
| 1480 } | 1502 } |
| 1481 static receiverFieldName() { | 1503 static receiverFieldName() { |
| 1482 if (receiverFieldNameCache === null) { | 1504 if (receiverFieldNameCache === null) { |
| 1483 receiverFieldNameCache = computeFieldNamed('receiver'); | 1505 receiverFieldNameCache = computeFieldNamed('receiver'); |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1856 super.Error(); | 1878 super.Error(); |
| 1857 } | 1879 } |
| 1858 toString() { | 1880 toString() { |
| 1859 return `Deferred library ${this.libraryName} was not loaded.`; | 1881 return `Deferred library ${this.libraryName} was not loaded.`; |
| 1860 } | 1882 } |
| 1861 } | 1883 } |
| 1862 class RuntimeType extends dart.Object { | 1884 class RuntimeType extends dart.Object { |
| 1863 RuntimeType() { | 1885 RuntimeType() { |
| 1864 } | 1886 } |
| 1865 } | 1887 } |
| 1888 let _isTest = Symbol('_isTest'); |
| 1889 let _extractFunctionTypeObjectFrom = Symbol('_extractFunctionTypeObjectFrom'); |
| 1890 let _asCheck = Symbol('_asCheck'); |
| 1891 let _check = Symbol('_check'); |
| 1892 let _assertCheck = Symbol('_assertCheck'); |
| 1866 class RuntimeFunctionType extends RuntimeType { | 1893 class RuntimeFunctionType extends RuntimeType { |
| 1867 RuntimeFunctionType(returnType, parameterTypes, optionalParameterTypes, name
dParameters) { | 1894 RuntimeFunctionType(returnType, parameterTypes, optionalParameterTypes, name
dParameters) { |
| 1868 this.returnType = returnType; | 1895 this.returnType = returnType; |
| 1869 this.parameterTypes = parameterTypes; | 1896 this.parameterTypes = parameterTypes; |
| 1870 this.optionalParameterTypes = optionalParameterTypes; | 1897 this.optionalParameterTypes = optionalParameterTypes; |
| 1871 this.namedParameters = namedParameters; | 1898 this.namedParameters = namedParameters; |
| 1872 super.RuntimeType(); | 1899 super.RuntimeType(); |
| 1873 } | 1900 } |
| 1874 get isVoid() { | 1901 get isVoid() { |
| 1875 return dart.is(this.returnType, VoidRuntimeType); | 1902 return dart.is(this.returnType, VoidRuntimeType); |
| 1876 } | 1903 } |
| 1877 _isTest(expression) { | 1904 [_isTest](expression) { |
| 1878 let functionTypeObject = this._extractFunctionTypeObjectFrom(expression); | 1905 let functionTypeObject = this[_extractFunctionTypeObjectFrom](expression); |
| 1879 return functionTypeObject === null ? false : isFunctionSubtype(functionTyp
eObject, this.toRti()); | 1906 return functionTypeObject === null ? false : isFunctionSubtype(functionTyp
eObject, this.toRti()); |
| 1880 } | 1907 } |
| 1881 _asCheck(expression) { | 1908 [_asCheck](expression) { |
| 1882 return this._check(expression, true); | 1909 return this[_check](expression, true); |
| 1883 } | 1910 } |
| 1884 _assertCheck(expression) { | 1911 [_assertCheck](expression) { |
| 1885 if (inAssert) | 1912 if (inAssert) |
| 1886 return null; | 1913 return null; |
| 1887 inAssert = true; | 1914 inAssert = true; |
| 1888 try { | 1915 try { |
| 1889 return this._check(expression, false); | 1916 return this[_check](expression, false); |
| 1890 } finally { | 1917 } finally { |
| 1891 inAssert = false; | 1918 inAssert = false; |
| 1892 } | 1919 } |
| 1893 } | 1920 } |
| 1894 _check(expression, isCast) { | 1921 [_check](expression, isCast) { |
| 1895 if (expression === null) | 1922 if (expression === null) |
| 1896 return null; | 1923 return null; |
| 1897 if (this._isTest(expression)) | 1924 if (this[_isTest](expression)) |
| 1898 return expression; | 1925 return expression; |
| 1899 let self = new FunctionTypeInfoDecoderRing(this.toRti()).toString(); | 1926 let self = new FunctionTypeInfoDecoderRing(this.toRti()).toString(); |
| 1900 if (isCast) { | 1927 if (isCast) { |
| 1901 let functionTypeObject = this._extractFunctionTypeObjectFrom(expression)
; | 1928 let functionTypeObject = this[_extractFunctionTypeObjectFrom](expression
); |
| 1902 let pretty = null; | 1929 let pretty = null; |
| 1903 if (functionTypeObject !== null) { | 1930 if (functionTypeObject !== null) { |
| 1904 pretty = new FunctionTypeInfoDecoderRing(functionTypeObject).toString(
); | 1931 pretty = new FunctionTypeInfoDecoderRing(functionTypeObject).toString(
); |
| 1905 } else { | 1932 } else { |
| 1906 pretty = Primitives.objectTypeName(expression); | 1933 pretty = Primitives.objectTypeName(expression); |
| 1907 } | 1934 } |
| 1908 throw new CastErrorImplementation(pretty, self); | 1935 throw new CastErrorImplementation(pretty, self); |
| 1909 } else { | 1936 } else { |
| 1910 throw new TypeErrorImplementation(expression, self); | 1937 throw new TypeErrorImplementation(expression, self); |
| 1911 } | 1938 } |
| 1912 } | 1939 } |
| 1913 _extractFunctionTypeObjectFrom(o) { | 1940 [_extractFunctionTypeObjectFrom](o) { |
| 1914 let interceptor = _interceptors.getInterceptor(o); | 1941 let interceptor = _interceptors.getInterceptor(o); |
| 1915 return _foreign_helper.JS_SIGNATURE_NAME() in interceptor ? interceptor[_f
oreign_helper.JS_SIGNATURE_NAME()]() : null; | 1942 return _foreign_helper.JS_SIGNATURE_NAME() in interceptor ? interceptor[_f
oreign_helper.JS_SIGNATURE_NAME()]() : null; |
| 1916 } | 1943 } |
| 1917 toRti() { | 1944 toRti() { |
| 1918 let result = {[_foreign_helper.JS_FUNCTION_TYPE_TAG()]: "dynafunc"}; | 1945 let result = {[_foreign_helper.JS_FUNCTION_TYPE_TAG()]: "dynafunc"}; |
| 1919 if (this.isVoid) { | 1946 if (this.isVoid) { |
| 1920 result[_foreign_helper.JS_FUNCTION_TYPE_VOID_RETURN_TAG()] = true; | 1947 result[_foreign_helper.JS_FUNCTION_TYPE_VOID_RETURN_TAG()] = true; |
| 1921 } else { | 1948 } else { |
| 1922 if (!dart.is(this.returnType, DynamicRuntimeType)) { | 1949 if (!dart.is(this.returnType, DynamicRuntimeType)) { |
| 1923 result[_foreign_helper.JS_FUNCTION_TYPE_RETURN_TYPE_TAG()] = this.retu
rnType.toRti(); | 1950 result[_foreign_helper.JS_FUNCTION_TYPE_RETURN_TYPE_TAG()] = this.retu
rnType.toRti(); |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2112 } | 2139 } |
| 2113 for (let argument of this.arguments) { | 2140 for (let argument of this.arguments) { |
| 2114 result.push(argument.toRti()); | 2141 result.push(argument.toRti()); |
| 2115 } | 2142 } |
| 2116 return this.rti = result; | 2143 return this.rti = result; |
| 2117 } | 2144 } |
| 2118 toString() { | 2145 toString() { |
| 2119 return `${this.name}<${this.arguments.join(", ")}>`; | 2146 return `${this.name}<${this.arguments.join(", ")}>`; |
| 2120 } | 2147 } |
| 2121 } | 2148 } |
| 2149 let _typeData = Symbol('_typeData'); |
| 2150 let _cachedToString = Symbol('_cachedToString'); |
| 2151 let _hasReturnType = Symbol('_hasReturnType'); |
| 2152 let _returnType = Symbol('_returnType'); |
| 2153 let _isVoid = Symbol('_isVoid'); |
| 2154 let _hasArguments = Symbol('_hasArguments'); |
| 2155 let _hasOptionalArguments = Symbol('_hasOptionalArguments'); |
| 2156 let _optionalArguments = Symbol('_optionalArguments'); |
| 2157 let _hasNamedArguments = Symbol('_hasNamedArguments'); |
| 2158 let _namedArguments = Symbol('_namedArguments'); |
| 2159 let _convert = Symbol('_convert'); |
| 2122 class FunctionTypeInfoDecoderRing extends dart.Object { | 2160 class FunctionTypeInfoDecoderRing extends dart.Object { |
| 2123 FunctionTypeInfoDecoderRing(_typeData) { | 2161 FunctionTypeInfoDecoderRing($_typeData) { |
| 2124 this._typeData = _typeData; | 2162 this[_typeData] = $_typeData; |
| 2125 this._cachedToString = null; | 2163 this[_cachedToString] = null; |
| 2126 } | 2164 } |
| 2127 get _hasReturnType() { | 2165 get [_hasReturnType]() { |
| 2128 return "ret" in this._typeData; | 2166 return "ret" in this[_typeData]; |
| 2129 } | 2167 } |
| 2130 get _returnType() { | 2168 get [_returnType]() { |
| 2131 return this._typeData.ret; | 2169 return this[_typeData].ret; |
| 2132 } | 2170 } |
| 2133 get _isVoid() { | 2171 get [_isVoid]() { |
| 2134 return !!this._typeData["void"]; | 2172 return !!this[_typeData]["void"]; |
| 2135 } | 2173 } |
| 2136 get _hasArguments() { | 2174 get [_hasArguments]() { |
| 2137 return "args" in this._typeData; | 2175 return "args" in this[_typeData]; |
| 2138 } | 2176 } |
| 2139 get _arguments() { | 2177 get [_arguments]() { |
| 2140 return dart.as(this._typeData.args, core.List); | 2178 return dart.as(this[_typeData].args, core.List); |
| 2141 } | 2179 } |
| 2142 get _hasOptionalArguments() { | 2180 get [_hasOptionalArguments]() { |
| 2143 return "opt" in this._typeData; | 2181 return "opt" in this[_typeData]; |
| 2144 } | 2182 } |
| 2145 get _optionalArguments() { | 2183 get [_optionalArguments]() { |
| 2146 return dart.as(this._typeData.opt, core.List); | 2184 return dart.as(this[_typeData].opt, core.List); |
| 2147 } | 2185 } |
| 2148 get _hasNamedArguments() { | 2186 get [_hasNamedArguments]() { |
| 2149 return "named" in this._typeData; | 2187 return "named" in this[_typeData]; |
| 2150 } | 2188 } |
| 2151 get _namedArguments() { | 2189 get [_namedArguments]() { |
| 2152 return this._typeData.named; | 2190 return this[_typeData].named; |
| 2153 } | 2191 } |
| 2154 toRuntimeType() { | 2192 toRuntimeType() { |
| 2155 return new DynamicRuntimeType(); | 2193 return new DynamicRuntimeType(); |
| 2156 } | 2194 } |
| 2157 _convert(type) { | 2195 [_convert](type) { |
| 2158 let result = runtimeTypeToString(type); | 2196 let result = runtimeTypeToString(type); |
| 2159 if (result !== null) | 2197 if (result !== null) |
| 2160 return result; | 2198 return result; |
| 2161 if ("func" in type) { | 2199 if ("func" in type) { |
| 2162 return new FunctionTypeInfoDecoderRing(type).toString(); | 2200 return new FunctionTypeInfoDecoderRing(type).toString(); |
| 2163 } else { | 2201 } else { |
| 2164 throw 'bad type'; | 2202 throw 'bad type'; |
| 2165 } | 2203 } |
| 2166 } | 2204 } |
| 2167 toString() { | 2205 toString() { |
| 2168 if (this._cachedToString !== null) | 2206 if (this[_cachedToString] !== null) |
| 2169 return this._cachedToString; | 2207 return this[_cachedToString]; |
| 2170 let s = "("; | 2208 let s = "("; |
| 2171 let sep = ''; | 2209 let sep = ''; |
| 2172 if (this._hasArguments) { | 2210 if (this[_hasArguments]) { |
| 2173 for (let argument of this._arguments) { | 2211 for (let argument of this[_arguments]) { |
| 2174 s = sep; | 2212 s = sep; |
| 2175 s = this._convert(argument); | 2213 s = this[_convert](argument); |
| 2176 sep = ', '; | 2214 sep = ', '; |
| 2177 } | 2215 } |
| 2178 } | 2216 } |
| 2179 if (this._hasOptionalArguments) { | 2217 if (this[_hasOptionalArguments]) { |
| 2180 s = `${sep}[`; | 2218 s = `${sep}[`; |
| 2181 sep = ''; | 2219 sep = ''; |
| 2182 for (let argument of this._optionalArguments) { | 2220 for (let argument of this[_optionalArguments]) { |
| 2183 s = sep; | 2221 s = sep; |
| 2184 s = this._convert(argument); | 2222 s = this[_convert](argument); |
| 2185 sep = ', '; | 2223 sep = ', '; |
| 2186 } | 2224 } |
| 2187 s = ']'; | 2225 s = ']'; |
| 2188 } | 2226 } |
| 2189 if (this._hasNamedArguments) { | 2227 if (this[_hasNamedArguments]) { |
| 2190 s = `${sep}{`; | 2228 s = `${sep}{`; |
| 2191 sep = ''; | 2229 sep = ''; |
| 2192 for (let name of _js_names.extractKeys(this._namedArguments)) { | 2230 for (let name of _js_names.extractKeys(this[_namedArguments])) { |
| 2193 s = sep; | 2231 s = sep; |
| 2194 s = `${name}: `; | 2232 s = `${name}: `; |
| 2195 s = this._convert(this._namedArguments[name]); | 2233 s = this[_convert](this[_namedArguments][name]); |
| 2196 sep = ', '; | 2234 sep = ', '; |
| 2197 } | 2235 } |
| 2198 s = '}'; | 2236 s = '}'; |
| 2199 } | 2237 } |
| 2200 s = ') -> '; | 2238 s = ') -> '; |
| 2201 if (this._isVoid) { | 2239 if (this[_isVoid]) { |
| 2202 s = 'void'; | 2240 s = 'void'; |
| 2203 } else if (this._hasReturnType) { | 2241 } else if (this[_hasReturnType]) { |
| 2204 s = this._convert(this._returnType); | 2242 s = this[_convert](this[_returnType]); |
| 2205 } else { | 2243 } else { |
| 2206 s = 'dynamic'; | 2244 s = 'dynamic'; |
| 2207 } | 2245 } |
| 2208 return this._cachedToString = `${s}`; | 2246 return this[_cachedToString] = `${s}`; |
| 2209 } | 2247 } |
| 2210 } | 2248 } |
| 2211 class UnimplementedNoSuchMethodError extends core.Error { | 2249 class UnimplementedNoSuchMethodError extends core.Error { |
| 2212 UnimplementedNoSuchMethodError(_message) { | 2250 UnimplementedNoSuchMethodError($_message) { |
| 2213 this._message = _message; | 2251 this[_message] = $_message; |
| 2214 super.Error(); | 2252 super.Error(); |
| 2215 } | 2253 } |
| 2216 toString() { | 2254 toString() { |
| 2217 return `Unsupported operation: ${this._message}`; | 2255 return `Unsupported operation: ${this[_message]}`; |
| 2218 } | 2256 } |
| 2219 } | 2257 } |
| 2220 // Function random64: () → int | 2258 // Function random64: () → int |
| 2221 function random64() { | 2259 function random64() { |
| 2222 let int32a = Math.random() * 0x100000000 >>> 0; | 2260 let int32a = Math.random() * 0x100000000 >>> 0; |
| 2223 let int32b = Math.random() * 0x100000000 >>> 0; | 2261 let int32b = Math.random() * 0x100000000 >>> 0; |
| 2224 return int32a + int32b * 4294967296; | 2262 return int32a + int32b * 4294967296; |
| 2225 } | 2263 } |
| 2226 // Function jsonEncodeNative: (String) → String | 2264 // Function jsonEncodeNative: (String) → String |
| 2227 function jsonEncodeNative(string) { | 2265 function jsonEncodeNative(string) { |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2334 completer.complete(null); | 2372 completer.complete(null); |
| 2335 }, 1), false); | 2373 }, 1), false); |
| 2336 script.addEventListener("error", convertDartClosureToJS((event) => { | 2374 script.addEventListener("error", convertDartClosureToJS((event) => { |
| 2337 completer.completeError(new async.DeferredLoadException(`Loading ${uri}
failed.`)); | 2375 completer.completeError(new async.DeferredLoadException(`Loading ${uri}
failed.`)); |
| 2338 }, 1), false); | 2376 }, 1), false); |
| 2339 document.body.appendChild(script); | 2377 document.body.appendChild(script); |
| 2340 return completer.future; | 2378 return completer.future; |
| 2341 })); | 2379 })); |
| 2342 } | 2380 } |
| 2343 class MainError extends core.Error { | 2381 class MainError extends core.Error { |
| 2344 MainError(_message) { | 2382 MainError($_message) { |
| 2345 this._message = _message; | 2383 this[_message] = $_message; |
| 2346 super.Error(); | 2384 super.Error(); |
| 2347 } | 2385 } |
| 2348 toString() { | 2386 toString() { |
| 2349 return `NoSuchMethodError: ${this._message}`; | 2387 return `NoSuchMethodError: ${this[_message]}`; |
| 2350 } | 2388 } |
| 2351 } | 2389 } |
| 2352 // Function missingMain: () → void | 2390 // Function missingMain: () → void |
| 2353 function missingMain() { | 2391 function missingMain() { |
| 2354 throw new MainError("No top-level function named 'main'."); | 2392 throw new MainError("No top-level function named 'main'."); |
| 2355 } | 2393 } |
| 2356 // Function badMain: () → void | 2394 // Function badMain: () → void |
| 2357 function badMain() { | 2395 function badMain() { |
| 2358 throw new MainError("'main' is not a function."); | 2396 throw new MainError("'main' is not a function."); |
| 2359 } | 2397 } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 2376 class IrRepresentation extends dart.Object { | 2414 class IrRepresentation extends dart.Object { |
| 2377 IrRepresentation(value) { | 2415 IrRepresentation(value) { |
| 2378 this.value = value; | 2416 this.value = value; |
| 2379 } | 2417 } |
| 2380 } | 2418 } |
| 2381 class Native extends dart.Object { | 2419 class Native extends dart.Object { |
| 2382 Native(name) { | 2420 Native(name) { |
| 2383 this.name = name; | 2421 this.name = name; |
| 2384 } | 2422 } |
| 2385 } | 2423 } |
| 2424 let _throwUnmodifiable = Symbol('_throwUnmodifiable'); |
| 2386 let ConstantMap$ = dart.generic(function(K, V) { | 2425 let ConstantMap$ = dart.generic(function(K, V) { |
| 2387 class ConstantMap extends dart.Object { | 2426 class ConstantMap extends dart.Object { |
| 2388 ConstantMap$_() { | 2427 ConstantMap$_() { |
| 2389 } | 2428 } |
| 2390 get isEmpty() { | 2429 get isEmpty() { |
| 2391 return this.length === 0; | 2430 return this.length === 0; |
| 2392 } | 2431 } |
| 2393 get isNotEmpty() { | 2432 get isNotEmpty() { |
| 2394 return !dart.notNull(this.isEmpty); | 2433 return !dart.notNull(this.isEmpty); |
| 2395 } | 2434 } |
| 2396 toString() { | 2435 toString() { |
| 2397 return collection.Maps.mapToString(this); | 2436 return collection.Maps.mapToString(this); |
| 2398 } | 2437 } |
| 2399 _throwUnmodifiable() { | 2438 [_throwUnmodifiable]() { |
| 2400 throw new core.UnsupportedError("Cannot modify unmodifiable Map"); | 2439 throw new core.UnsupportedError("Cannot modify unmodifiable Map"); |
| 2401 } | 2440 } |
| 2402 set(key, val) { | 2441 set(key, val) { |
| 2403 return this._throwUnmodifiable(); | 2442 return this[_throwUnmodifiable](); |
| 2404 } | 2443 } |
| 2405 putIfAbsent(key, ifAbsent) { | 2444 putIfAbsent(key, ifAbsent) { |
| 2406 return dart.as(this._throwUnmodifiable(), V); | 2445 return dart.as(this[_throwUnmodifiable](), V); |
| 2407 } | 2446 } |
| 2408 remove(key) { | 2447 remove(key) { |
| 2409 return dart.as(this._throwUnmodifiable(), V); | 2448 return dart.as(this[_throwUnmodifiable](), V); |
| 2410 } | 2449 } |
| 2411 clear() { | 2450 clear() { |
| 2412 return this._throwUnmodifiable(); | 2451 return this[_throwUnmodifiable](); |
| 2413 } | 2452 } |
| 2414 addAll(other) { | 2453 addAll(other) { |
| 2415 return this._throwUnmodifiable(); | 2454 return this[_throwUnmodifiable](); |
| 2416 } | 2455 } |
| 2417 } | 2456 } |
| 2418 dart.defineNamedConstructor(ConstantMap, '_'); | 2457 dart.defineNamedConstructor(ConstantMap, '_'); |
| 2419 return ConstantMap; | 2458 return ConstantMap; |
| 2420 }); | 2459 }); |
| 2421 let ConstantMap = ConstantMap$(dynamic, dynamic); | 2460 let ConstantMap = ConstantMap$(dynamic, dynamic); |
| 2461 let _jsObject = Symbol('_jsObject'); |
| 2462 let _keys = Symbol('_keys'); |
| 2463 let _fetch = Symbol('_fetch'); |
| 2422 let ConstantStringMap$ = dart.generic(function(K, V) { | 2464 let ConstantStringMap$ = dart.generic(function(K, V) { |
| 2423 class ConstantStringMap extends ConstantMap$(K, V) { | 2465 class ConstantStringMap extends ConstantMap$(K, V) { |
| 2424 ConstantStringMap$_(length, _jsObject, _keys) { | 2466 ConstantStringMap$_(length, $_jsObject, $_keys) { |
| 2425 this.length = length; | 2467 this.length = length; |
| 2426 this._jsObject = _jsObject; | 2468 this[_jsObject] = $_jsObject; |
| 2427 this._keys = _keys; | 2469 this[_keys] = $_keys; |
| 2428 super.ConstantMap$_(); | 2470 super.ConstantMap$_(); |
| 2429 } | 2471 } |
| 2430 containsValue(needle) { | 2472 containsValue(needle) { |
| 2431 return this.values.any((value) => dart.equals(value, needle)); | 2473 return this.values.any((value) => dart.equals(value, needle)); |
| 2432 } | 2474 } |
| 2433 containsKey(key) { | 2475 containsKey(key) { |
| 2434 if (!(typeof key == string)) | 2476 if (!(typeof key == string)) |
| 2435 return false; | 2477 return false; |
| 2436 if (dart.equals('__proto__', key)) | 2478 if (dart.equals('__proto__', key)) |
| 2437 return false; | 2479 return false; |
| 2438 return jsHasOwnProperty(this._jsObject, dart.as(key, core.String)); | 2480 return jsHasOwnProperty(this[_jsObject], dart.as(key, core.String)); |
| 2439 } | 2481 } |
| 2440 get(key) { | 2482 get(key) { |
| 2441 if (!dart.notNull(this.containsKey(key))) | 2483 if (!dart.notNull(this.containsKey(key))) |
| 2442 return dart.as(null, V); | 2484 return dart.as(null, V); |
| 2443 return dart.as(this._fetch(key), V); | 2485 return dart.as(this[_fetch](key), V); |
| 2444 } | 2486 } |
| 2445 _fetch(key) { | 2487 [_fetch](key) { |
| 2446 return jsPropertyAccess(this._jsObject, dart.as(key, core.String)); | 2488 return jsPropertyAccess(this[_jsObject], dart.as(key, core.String)); |
| 2447 } | 2489 } |
| 2448 forEach(f) { | 2490 forEach(f) { |
| 2449 let keys = this._keys; | 2491 let keys = this[_keys]; |
| 2450 for (let i = 0; i['<'](dart.dload(keys, 'length')); i++) { | 2492 for (let i = 0; i['<'](dart.dload(keys, 'length')); i++) { |
| 2451 let key = dart.dindex(keys, i); | 2493 let key = dart.dindex(keys, i); |
| 2452 f(dart.as(key, K), dart.as(this._fetch(key), V)); | 2494 f(dart.as(key, K), dart.as(this[_fetch](key), V)); |
| 2453 } | 2495 } |
| 2454 } | 2496 } |
| 2455 get keys() { | 2497 get keys() { |
| 2456 return new _ConstantMapKeyIterable(this); | 2498 return new _ConstantMapKeyIterable(this); |
| 2457 } | 2499 } |
| 2458 get values() { | 2500 get values() { |
| 2459 return new _internal.MappedIterable(this._keys, dart.as(((key) => this._
fetch(key)).bind(this), dart.throw_("Unimplemented type (K) → V"))); | 2501 return new _internal.MappedIterable(this[_keys], dart.as(((key) => this[
_fetch](key)).bind(this), dart.throw_("Unimplemented type (K) → V"))); |
| 2460 } | 2502 } |
| 2461 } | 2503 } |
| 2462 dart.defineNamedConstructor(ConstantStringMap, '_'); | 2504 dart.defineNamedConstructor(ConstantStringMap, '_'); |
| 2463 return ConstantStringMap; | 2505 return ConstantStringMap; |
| 2464 }); | 2506 }); |
| 2465 let ConstantStringMap = ConstantStringMap$(dynamic, dynamic); | 2507 let ConstantStringMap = ConstantStringMap$(dynamic, dynamic); |
| 2508 let _protoValue = Symbol('_protoValue'); |
| 2466 let ConstantProtoMap$ = dart.generic(function(K, V) { | 2509 let ConstantProtoMap$ = dart.generic(function(K, V) { |
| 2467 class ConstantProtoMap extends ConstantStringMap$(K, V) { | 2510 class ConstantProtoMap extends ConstantStringMap$(K, V) { |
| 2468 ConstantProtoMap$_(length, jsObject, keys, _protoValue) { | 2511 ConstantProtoMap$_(length, jsObject, keys, $_protoValue) { |
| 2469 this._protoValue = _protoValue; | 2512 this[_protoValue] = $_protoValue; |
| 2470 super.ConstantStringMap$_(dart.as(length, core.int), jsObject, dart.as(k
eys, core.List$(K))); | 2513 super.ConstantStringMap$_(dart.as(length, core.int), jsObject, dart.as(k
eys, core.List$(K))); |
| 2471 } | 2514 } |
| 2472 containsKey(key) { | 2515 containsKey(key) { |
| 2473 if (!(typeof key == string)) | 2516 if (!(typeof key == string)) |
| 2474 return false; | 2517 return false; |
| 2475 if (dart.equals('__proto__', key)) | 2518 if (dart.equals('__proto__', key)) |
| 2476 return true; | 2519 return true; |
| 2477 return jsHasOwnProperty(this._jsObject, dart.as(key, core.String)); | 2520 return jsHasOwnProperty(this[_jsObject], dart.as(key, core.String)); |
| 2478 } | 2521 } |
| 2479 _fetch(key) { | 2522 [_fetch](key) { |
| 2480 return dart.equals('__proto__', key) ? this._protoValue : jsPropertyAcce
ss(this._jsObject, dart.as(key, core.String)); | 2523 return dart.equals('__proto__', key) ? this[_protoValue] : jsPropertyAcc
ess(this[_jsObject], dart.as(key, core.String)); |
| 2481 } | 2524 } |
| 2482 } | 2525 } |
| 2483 dart.defineNamedConstructor(ConstantProtoMap, '_'); | 2526 dart.defineNamedConstructor(ConstantProtoMap, '_'); |
| 2484 return ConstantProtoMap; | 2527 return ConstantProtoMap; |
| 2485 }); | 2528 }); |
| 2486 let ConstantProtoMap = ConstantProtoMap$(dynamic, dynamic); | 2529 let ConstantProtoMap = ConstantProtoMap$(dynamic, dynamic); |
| 2530 let _map = Symbol('_map'); |
| 2487 let _ConstantMapKeyIterable$ = dart.generic(function(K) { | 2531 let _ConstantMapKeyIterable$ = dart.generic(function(K) { |
| 2488 class _ConstantMapKeyIterable extends collection.IterableBase$(K) { | 2532 class _ConstantMapKeyIterable extends collection.IterableBase$(K) { |
| 2489 _ConstantMapKeyIterable(_map) { | 2533 _ConstantMapKeyIterable($_map) { |
| 2490 this._map = _map; | 2534 this[_map] = $_map; |
| 2491 super.IterableBase(); | 2535 super.IterableBase(); |
| 2492 } | 2536 } |
| 2493 get iterator() { | 2537 get iterator() { |
| 2494 return this._map._keys.iterator; | 2538 return this[_map][_keys].iterator; |
| 2495 } | 2539 } |
| 2496 get length() { | 2540 get length() { |
| 2497 return this._map._keys.length; | 2541 return this[_map][_keys].length; |
| 2498 } | 2542 } |
| 2499 } | 2543 } |
| 2500 return _ConstantMapKeyIterable; | 2544 return _ConstantMapKeyIterable; |
| 2501 }); | 2545 }); |
| 2502 let _ConstantMapKeyIterable = _ConstantMapKeyIterable$(dynamic); | 2546 let _ConstantMapKeyIterable = _ConstantMapKeyIterable$(dynamic); |
| 2547 let _jsData = Symbol('_jsData'); |
| 2548 let _getMap = Symbol('_getMap'); |
| 2503 let GeneralConstantMap$ = dart.generic(function(K, V) { | 2549 let GeneralConstantMap$ = dart.generic(function(K, V) { |
| 2504 class GeneralConstantMap extends ConstantMap$(K, V) { | 2550 class GeneralConstantMap extends ConstantMap$(K, V) { |
| 2505 GeneralConstantMap(_jsData) { | 2551 GeneralConstantMap($_jsData) { |
| 2506 this._jsData = _jsData; | 2552 this[_jsData] = $_jsData; |
| 2507 super.ConstantMap$_(); | 2553 super.ConstantMap$_(); |
| 2508 } | 2554 } |
| 2509 _getMap() { | 2555 [_getMap]() { |
| 2510 if (!this.$map) { | 2556 if (!this.$map) { |
| 2511 let backingMap = new collection.LinkedHashMap(); | 2557 let backingMap = new collection.LinkedHashMap(); |
| 2512 this.$map = fillLiteralMap(this._jsData, backingMap); | 2558 this.$map = fillLiteralMap(this[_jsData], backingMap); |
| 2513 } | 2559 } |
| 2514 return this.$map; | 2560 return this.$map; |
| 2515 } | 2561 } |
| 2516 containsValue(needle) { | 2562 containsValue(needle) { |
| 2517 return this._getMap().containsValue(needle); | 2563 return this[_getMap]().containsValue(needle); |
| 2518 } | 2564 } |
| 2519 containsKey(key) { | 2565 containsKey(key) { |
| 2520 return this._getMap().containsKey(key); | 2566 return this[_getMap]().containsKey(key); |
| 2521 } | 2567 } |
| 2522 get(key) { | 2568 get(key) { |
| 2523 return this._getMap().get(key); | 2569 return this[_getMap]().get(key); |
| 2524 } | 2570 } |
| 2525 forEach(f) { | 2571 forEach(f) { |
| 2526 this._getMap().forEach(f); | 2572 this[_getMap]().forEach(f); |
| 2527 } | 2573 } |
| 2528 get keys() { | 2574 get keys() { |
| 2529 return this._getMap().keys; | 2575 return this[_getMap]().keys; |
| 2530 } | 2576 } |
| 2531 get values() { | 2577 get values() { |
| 2532 return this._getMap().values; | 2578 return this[_getMap]().values; |
| 2533 } | 2579 } |
| 2534 get length() { | 2580 get length() { |
| 2535 return this._getMap().length; | 2581 return this[_getMap]().length; |
| 2536 } | 2582 } |
| 2537 } | 2583 } |
| 2538 return GeneralConstantMap; | 2584 return GeneralConstantMap; |
| 2539 }); | 2585 }); |
| 2540 let GeneralConstantMap = GeneralConstantMap$(dynamic, dynamic); | 2586 let GeneralConstantMap = GeneralConstantMap$(dynamic, dynamic); |
| 2541 // Function contains: (String, String) → bool | 2587 // Function contains: (String, String) → bool |
| 2542 function contains(userAgent, name) { | 2588 function contains(userAgent, name) { |
| 2543 return userAgent.indexOf(name) !== -1; | 2589 return userAgent.indexOf(name) !== -1; |
| 2544 } | 2590 } |
| 2545 // Function arrayLength: (List<dynamic>) → int | 2591 // Function arrayLength: (List<dynamic>) → int |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2790 } | 2836 } |
| 2791 let _baseHooks = new _foreign_helper.JS_CONST('\nfunction() {\n function type
NameInChrome(o) {\n var constructor = o.constructor;\n if (constructor) {\
n var name = constructor.name;\n if (name) return name;\n }\n va
r s = Object.prototype.toString.call(o);\n return s.substring(8, s.length - 1
);\n }\n function getUnknownTag(object, tag) {\n // This code really belong
s in [getUnknownTagGenericBrowser] but having it\n // here allows [getUnknown
Tag] to be tested on d8.\n if (/^HTML[A-Z].*Element$/.test(tag)) {\n //
Check that it is not a simple JavaScript object.\n var name = Object.protot
ype.toString.call(object);\n if (name == "[object Object]") return null;\n
return "HTMLElement";\n }\n }\n function getUnknownTagGenericBrowser(o
bject, tag) {\n if (self.HTMLElement && object instanceof HTMLElement) return
"HTMLElement";\n return getUnknownTag(object, tag);\n }\n function prototy
peForTag(tag) {\n if (typeof window == "undefined") return null;\n if (typ
eof window[tag] == "undefined") return null;\n var constructor = window[tag];
\n if (typeof constructor != "function") return null;\n return constructor
.prototype;\n }\n function discriminator(tag) { return null; }\n\n var isBrow
ser = typeof navigator == "object";\n\n return {\n getTag: typeNameInChrome,
\n getUnknownTag: isBrowser ? getUnknownTagGenericBrowser : getUnknownTag,\n
prototypeForTag: prototypeForTag,\n discriminator: discriminator };\n}'); | 2837 let _baseHooks = new _foreign_helper.JS_CONST('\nfunction() {\n function type
NameInChrome(o) {\n var constructor = o.constructor;\n if (constructor) {\
n var name = constructor.name;\n if (name) return name;\n }\n va
r s = Object.prototype.toString.call(o);\n return s.substring(8, s.length - 1
);\n }\n function getUnknownTag(object, tag) {\n // This code really belong
s in [getUnknownTagGenericBrowser] but having it\n // here allows [getUnknown
Tag] to be tested on d8.\n if (/^HTML[A-Z].*Element$/.test(tag)) {\n //
Check that it is not a simple JavaScript object.\n var name = Object.protot
ype.toString.call(object);\n if (name == "[object Object]") return null;\n
return "HTMLElement";\n }\n }\n function getUnknownTagGenericBrowser(o
bject, tag) {\n if (self.HTMLElement && object instanceof HTMLElement) return
"HTMLElement";\n return getUnknownTag(object, tag);\n }\n function prototy
peForTag(tag) {\n if (typeof window == "undefined") return null;\n if (typ
eof window[tag] == "undefined") return null;\n var constructor = window[tag];
\n if (typeof constructor != "function") return null;\n return constructor
.prototype;\n }\n function discriminator(tag) { return null; }\n\n var isBrow
ser = typeof navigator == "object";\n\n return {\n getTag: typeNameInChrome,
\n getUnknownTag: isBrowser ? getUnknownTagGenericBrowser : getUnknownTag,\n
prototypeForTag: prototypeForTag,\n discriminator: discriminator };\n}'); |
| 2792 let _constructorNameFallback = new _foreign_helper.JS_CONST('\nfunction getTag
Fallback(o) {\n var constructor = o.constructor;\n if (typeof constructor == "
function") {\n var name = constructor.name;\n // If the name is a non-empt
y string, we use that as the type name of this\n // object. There are variou
s cases where that does not work, so we have to\n // detect them and fall thr
ough to the toString() based implementation.\n\n if (typeof name == "string"
&&\n\n // Sometimes the string is empty. This test also catches minified
\n // shadow dom polyfil wrapper for Window on Firefox where the faked\n
// constructor name does not \'stick\'. The shortest real DOM object\n
// names have three characters (e.g. URL, CSS).\n name.length > 2 &
&\n\n // On Firefox we often get "Object" as the constructor name, even f
or\n // more specialized DOM objects.\n name !== "Object" &&\n\n
// This can happen in Opera.\n name !== "Function.prototype") {\n
return name;\n }\n }\n var s = Object.prototype.toString.call(o);\n re
turn s.substring(8, s.length - 1);\n}'); | 2838 let _constructorNameFallback = new _foreign_helper.JS_CONST('\nfunction getTag
Fallback(o) {\n var constructor = o.constructor;\n if (typeof constructor == "
function") {\n var name = constructor.name;\n // If the name is a non-empt
y string, we use that as the type name of this\n // object. There are variou
s cases where that does not work, so we have to\n // detect them and fall thr
ough to the toString() based implementation.\n\n if (typeof name == "string"
&&\n\n // Sometimes the string is empty. This test also catches minified
\n // shadow dom polyfil wrapper for Window on Firefox where the faked\n
// constructor name does not \'stick\'. The shortest real DOM object\n
// names have three characters (e.g. URL, CSS).\n name.length > 2 &
&\n\n // On Firefox we often get "Object" as the constructor name, even f
or\n // more specialized DOM objects.\n name !== "Object" &&\n\n
// This can happen in Opera.\n name !== "Function.prototype") {\n
return name;\n }\n }\n var s = Object.prototype.toString.call(o);\n re
turn s.substring(8, s.length - 1);\n}'); |
| 2793 let _fallbackConstructorHooksTransformerGenerator = new _foreign_helper.JS_CON
ST('\nfunction(getTagFallback) {\n return function(hooks) {\n // If we are n
ot in a browser, assume we are in d8.\n // TODO(sra): Recognize jsshell.\n
if (typeof navigator != "object") return hooks;\n\n var ua = navigator.userA
gent;\n // TODO(antonm): remove a reference to DumpRenderTree.\n if (ua.in
dexOf("DumpRenderTree") >= 0) return hooks;\n if (ua.indexOf("Chrome") >= 0)
{\n // Confirm constructor name is usable for dispatch.\n function con
firm(p) {\n return typeof window == "object" && window[p] && window[p].na
me == p;\n }\n if (confirm("Window") && confirm("HTMLElement")) return
hooks;\n }\n\n hooks.getTag = getTagFallback;\n };\n}'); | 2839 let _fallbackConstructorHooksTransformerGenerator = new _foreign_helper.JS_CON
ST('\nfunction(getTagFallback) {\n return function(hooks) {\n // If we are n
ot in a browser, assume we are in d8.\n // TODO(sra): Recognize jsshell.\n
if (typeof navigator != "object") return hooks;\n\n var ua = navigator.userA
gent;\n // TODO(antonm): remove a reference to DumpRenderTree.\n if (ua.in
dexOf("DumpRenderTree") >= 0) return hooks;\n if (ua.indexOf("Chrome") >= 0)
{\n // Confirm constructor name is usable for dispatch.\n function con
firm(p) {\n return typeof window == "object" && window[p] && window[p].na
me == p;\n }\n if (confirm("Window") && confirm("HTMLElement")) return
hooks;\n }\n\n hooks.getTag = getTagFallback;\n };\n}'); |
| 2794 let _ieHooksTransformer = new _foreign_helper.JS_CONST('\nfunction(hooks) {\n
var userAgent = typeof navigator == "object" ? navigator.userAgent : "";\n if
(userAgent.indexOf("Trident/") == -1) return hooks;\n\n var getTag = hooks.getT
ag;\n\n var quickMap = {\n "BeforeUnloadEvent": "Event",\n "DataTransfer"
: "Clipboard",\n "HTMLDDElement": "HTMLElement",\n "HTMLDTElement": "HTMLE
lement",\n "HTMLPhraseElement": "HTMLElement",\n "Position": "Geoposition"
\n };\n\n function getTagIE(o) {\n var tag = getTag(o);\n var newTag = q
uickMap[tag];\n if (newTag) return newTag;\n // Patches for types which re
port themselves as Objects.\n if (tag == "Object") {\n if (window.DataVi
ew && (o instanceof window.DataView)) return "DataView";\n }\n return tag;
\n }\n\n function prototypeForTagIE(tag) {\n var constructor = window[tag];
\n if (constructor == null) return null;\n return constructor.prototype;\n
}\n\n hooks.getTag = getTagIE;\n hooks.prototypeForTag = prototypeForTagIE;\
n}'); | 2840 let _ieHooksTransformer = new _foreign_helper.JS_CONST('\nfunction(hooks) {\n
var userAgent = typeof navigator == "object" ? navigator.userAgent : "";\n if
(userAgent.indexOf("Trident/") == -1) return hooks;\n\n var getTag = hooks.getT
ag;\n\n var quickMap = {\n "BeforeUnloadEvent": "Event",\n "DataTransfer"
: "Clipboard",\n "HTMLDDElement": "HTMLElement",\n "HTMLDTElement": "HTMLE
lement",\n "HTMLPhraseElement": "HTMLElement",\n "Position": "Geoposition"
\n };\n\n function getTagIE(o) {\n var tag = getTag(o);\n var newTag = q
uickMap[tag];\n if (newTag) return newTag;\n // Patches for types which re
port themselves as Objects.\n if (tag == "Object") {\n if (window.DataVi
ew && (o instanceof window.DataView)) return "DataView";\n }\n return tag;
\n }\n\n function prototypeForTagIE(tag) {\n var constructor = window[tag];
\n if (constructor == null) return null;\n return constructor.prototype;\n
}\n\n hooks.getTag = getTagIE;\n hooks.prototypeForTag = prototypeForTagIE;\
n}'); |
| 2795 let _fixDocumentHooksTransformer = new _foreign_helper.JS_CONST('\nfunction(ho
oks) {\n var getTag = hooks.getTag;\n var prototypeForTag = hooks.prototypeFor
Tag;\n function getTagFixed(o) {\n var tag = getTag(o);\n if (tag == "Doc
ument") {\n // Some browsers and the polymer polyfill call both HTML and XM
L documents\n // "Document", so we check for the xmlVersion property, which
is the empty\n // string on HTML documents. Since both dart:html classes D
ocument and\n // HtmlDocument share the same type, we must patch the instan
ces and not\n // the prototype.\n if (!!o.xmlVersion) return "!Documen
t";\n return "!HTMLDocument";\n }\n return tag;\n }\n\n function pr
ototypeForTagFixed(tag) {\n if (tag == "Document") return null; // Do not pr
e-patch Document.\n return prototypeForTag(tag);\n }\n\n hooks.getTag = get
TagFixed;\n hooks.prototypeForTag = prototypeForTagFixed;\n}'); | 2841 let _fixDocumentHooksTransformer = new _foreign_helper.JS_CONST('\nfunction(ho
oks) {\n var getTag = hooks.getTag;\n var prototypeForTag = hooks.prototypeFor
Tag;\n function getTagFixed(o) {\n var tag = getTag(o);\n if (tag == "Doc
ument") {\n // Some browsers and the polymer polyfill call both HTML and XM
L documents\n // "Document", so we check for the xmlVersion property, which
is the empty\n // string on HTML documents. Since both dart:html classes D
ocument and\n // HtmlDocument share the same type, we must patch the instan
ces and not\n // the prototype.\n if (!!o.xmlVersion) return "!Documen
t";\n return "!HTMLDocument";\n }\n return tag;\n }\n\n function pr
ototypeForTagFixed(tag) {\n if (tag == "Document") return null; // Do not pr
e-patch Document.\n return prototypeForTag(tag);\n }\n\n hooks.getTag = get
TagFixed;\n hooks.prototypeForTag = prototypeForTagFixed;\n}'); |
| 2796 let _firefoxHooksTransformer = new _foreign_helper.JS_CONST('\nfunction(hooks)
{\n var userAgent = typeof navigator == "object" ? navigator.userAgent : "";\n
if (userAgent.indexOf("Firefox") == -1) return hooks;\n\n var getTag = hooks.
getTag;\n\n var quickMap = {\n "BeforeUnloadEvent": "Event",\n "DataTrans
fer": "Clipboard",\n "GeoGeolocation": "Geolocation",\n "Location": "!Loca
tion", // Fixes issue 18151\n "WorkerMessageEvent": "MessageEve
nt",\n "XMLDocument": "!Document"};\n\n function getTagFirefox(o) {\n var
tag = getTag(o);\n return quickMap[tag] || tag;\n }\n\n hooks.getTag = get
TagFirefox;\n}'); | 2842 let _firefoxHooksTransformer = new _foreign_helper.JS_CONST('\nfunction(hooks)
{\n var userAgent = typeof navigator == "object" ? navigator.userAgent : "";\n
if (userAgent.indexOf("Firefox") == -1) return hooks;\n\n var getTag = hooks.
getTag;\n\n var quickMap = {\n "BeforeUnloadEvent": "Event",\n "DataTrans
fer": "Clipboard",\n "GeoGeolocation": "Geolocation",\n "Location": "!Loca
tion", // Fixes issue 18151\n "WorkerMessageEvent": "MessageEve
nt",\n "XMLDocument": "!Document"};\n\n function getTagFirefox(o) {\n var
tag = getTag(o);\n return quickMap[tag] || tag;\n }\n\n hooks.getTag = get
TagFirefox;\n}'); |
| 2797 let _operaHooksTransformer = new _foreign_helper.JS_CONST('\nfunction(hooks) {
return hooks; }\n'); | 2843 let _operaHooksTransformer = new _foreign_helper.JS_CONST('\nfunction(hooks) {
return hooks; }\n'); |
| 2798 let _safariHooksTransformer = new _foreign_helper.JS_CONST('\nfunction(hooks)
{ return hooks; }\n'); | 2844 let _safariHooksTransformer = new _foreign_helper.JS_CONST('\nfunction(hooks)
{ return hooks; }\n'); |
| 2799 let _dartExperimentalFixupGetTagHooksTransformer = new _foreign_helper.JS_CONS
T('\nfunction(hooks) {\n if (typeof dartExperimentalFixupGetTag != "function")
return hooks;\n hooks.getTag = dartExperimentalFixupGetTag(hooks.getTag);\n}'); | 2845 let _dartExperimentalFixupGetTagHooksTransformer = new _foreign_helper.JS_CONS
T('\nfunction(hooks) {\n if (typeof dartExperimentalFixupGetTag != "function")
return hooks;\n hooks.getTag = dartExperimentalFixupGetTag(hooks.getTag);\n}'); |
| 2846 let _nativeRegExp = Symbol('_nativeRegExp'); |
| 2800 // Function regExpGetNative: (JSSyntaxRegExp) → dynamic | 2847 // Function regExpGetNative: (JSSyntaxRegExp) → dynamic |
| 2801 function regExpGetNative(regexp) { | 2848 function regExpGetNative(regexp) { |
| 2802 return regexp._nativeRegExp; | 2849 return regexp[_nativeRegExp]; |
| 2803 } | 2850 } |
| 2851 let _nativeGlobalVersion = Symbol('_nativeGlobalVersion'); |
| 2804 // Function regExpGetGlobalNative: (JSSyntaxRegExp) → dynamic | 2852 // Function regExpGetGlobalNative: (JSSyntaxRegExp) → dynamic |
| 2805 function regExpGetGlobalNative(regexp) { | 2853 function regExpGetGlobalNative(regexp) { |
| 2806 let nativeRegexp = regexp._nativeGlobalVersion; | 2854 let nativeRegexp = regexp[_nativeGlobalVersion]; |
| 2807 nativeRegexp.lastIndex = 0; | 2855 nativeRegexp.lastIndex = 0; |
| 2808 return nativeRegexp; | 2856 return nativeRegexp; |
| 2809 } | 2857 } |
| 2858 let _nativeAnchoredVersion = Symbol('_nativeAnchoredVersion'); |
| 2810 // Function regExpCaptureCount: (JSSyntaxRegExp) → int | 2859 // Function regExpCaptureCount: (JSSyntaxRegExp) → int |
| 2811 function regExpCaptureCount(regexp) { | 2860 function regExpCaptureCount(regexp) { |
| 2812 let nativeAnchoredRegExp = regexp._nativeAnchoredVersion; | 2861 let nativeAnchoredRegExp = regexp[_nativeAnchoredVersion]; |
| 2813 let match = nativeAnchoredRegExp.exec(''); | 2862 let match = nativeAnchoredRegExp.exec(''); |
| 2814 return dart.as(dart.dbinary(dart.dload(match, 'length'), '-', 2), core.int); | 2863 return dart.as(dart.dbinary(dart.dload(match, 'length'), '-', 2), core.int); |
| 2815 } | 2864 } |
| 2865 let _nativeGlobalRegExp = Symbol('_nativeGlobalRegExp'); |
| 2866 let _nativeAnchoredRegExp = Symbol('_nativeAnchoredRegExp'); |
| 2867 let _isMultiLine = Symbol('_isMultiLine'); |
| 2868 let _isCaseSensitive = Symbol('_isCaseSensitive'); |
| 2869 let _execGlobal = Symbol('_execGlobal'); |
| 2870 let _execAnchored = Symbol('_execAnchored'); |
| 2816 class JSSyntaxRegExp extends dart.Object { | 2871 class JSSyntaxRegExp extends dart.Object { |
| 2817 toString() { | 2872 toString() { |
| 2818 return `RegExp/${this.pattern}/`; | 2873 return `RegExp/${this.pattern}/`; |
| 2819 } | 2874 } |
| 2820 JSSyntaxRegExp(source, opt$) { | 2875 JSSyntaxRegExp(source, opt$) { |
| 2821 let multiLine = opt$.multiLine === void 0 ? false : opt$.multiLine; | 2876 let multiLine = opt$.multiLine === void 0 ? false : opt$.multiLine; |
| 2822 let caseSensitive = opt$.caseSensitive === void 0 ? true : opt$.caseSensit
ive; | 2877 let caseSensitive = opt$.caseSensitive === void 0 ? true : opt$.caseSensit
ive; |
| 2823 this.pattern = source; | 2878 this.pattern = source; |
| 2824 this._nativeRegExp = makeNative(source, multiLine, caseSensitive, false); | 2879 this[_nativeRegExp] = makeNative(source, multiLine, caseSensitive, false); |
| 2825 this._nativeGlobalRegExp = null; | 2880 this[_nativeGlobalRegExp] = null; |
| 2826 this._nativeAnchoredRegExp = null; | 2881 this[_nativeAnchoredRegExp] = null; |
| 2827 } | 2882 } |
| 2828 get _nativeGlobalVersion() { | 2883 get [_nativeGlobalVersion]() { |
| 2829 if (this._nativeGlobalRegExp !== null) | 2884 if (this[_nativeGlobalRegExp] !== null) |
| 2830 return this._nativeGlobalRegExp; | 2885 return this[_nativeGlobalRegExp]; |
| 2831 return this._nativeGlobalRegExp = makeNative(this.pattern, this._isMultiLi
ne, this._isCaseSensitive, true); | 2886 return this[_nativeGlobalRegExp] = makeNative(this.pattern, this[_isMultiL
ine], this[_isCaseSensitive], true); |
| 2832 } | 2887 } |
| 2833 get _nativeAnchoredVersion() { | 2888 get [_nativeAnchoredVersion]() { |
| 2834 if (this._nativeAnchoredRegExp !== null) | 2889 if (this[_nativeAnchoredRegExp] !== null) |
| 2835 return this._nativeAnchoredRegExp; | 2890 return this[_nativeAnchoredRegExp]; |
| 2836 return this._nativeAnchoredRegExp = makeNative(`${this.pattern}|()`, this.
_isMultiLine, this._isCaseSensitive, true); | 2891 return this[_nativeAnchoredRegExp] = makeNative(`${this.pattern}|()`, this
[_isMultiLine], this[_isCaseSensitive], true); |
| 2837 } | 2892 } |
| 2838 get _isMultiLine() { | 2893 get [_isMultiLine]() { |
| 2839 return this._nativeRegExp.multiline; | 2894 return this[_nativeRegExp].multiline; |
| 2840 } | 2895 } |
| 2841 get _isCaseSensitive() { | 2896 get [_isCaseSensitive]() { |
| 2842 return !this._nativeRegExp.ignoreCase; | 2897 return !this[_nativeRegExp].ignoreCase; |
| 2843 } | 2898 } |
| 2844 static makeNative(source, multiLine, caseSensitive, global) { | 2899 static makeNative(source, multiLine, caseSensitive, global) { |
| 2845 checkString(source); | 2900 checkString(source); |
| 2846 let m = multiLine ? 'm' : ''; | 2901 let m = multiLine ? 'm' : ''; |
| 2847 let i = caseSensitive ? '' : 'i'; | 2902 let i = caseSensitive ? '' : 'i'; |
| 2848 let g = global ? 'g' : ''; | 2903 let g = global ? 'g' : ''; |
| 2849 let regexp = function() { | 2904 let regexp = function() { |
| 2850 try { | 2905 try { |
| 2851 return new RegExp(source, m + i + g); | 2906 return new RegExp(source, m + i + g); |
| 2852 } catch (e) { | 2907 } catch (e) { |
| 2853 return e; | 2908 return e; |
| 2854 } | 2909 } |
| 2855 | 2910 |
| 2856 }(); | 2911 }(); |
| 2857 if (regexp instanceof RegExp) | 2912 if (regexp instanceof RegExp) |
| 2858 return regexp; | 2913 return regexp; |
| 2859 let errorMessage = String(regexp); | 2914 let errorMessage = String(regexp); |
| 2860 throw new core.FormatException(`Illegal RegExp pattern: ${source}, ${error
Message}`); | 2915 throw new core.FormatException(`Illegal RegExp pattern: ${source}, ${error
Message}`); |
| 2861 } | 2916 } |
| 2862 firstMatch(string) { | 2917 firstMatch(string) { |
| 2863 let m = dart.as(this._nativeRegExp.exec(checkString(string)), core.List$(c
ore.String)); | 2918 let m = dart.as(this[_nativeRegExp].exec(checkString(string)), core.List$(
core.String)); |
| 2864 if (m === null) | 2919 if (m === null) |
| 2865 return null; | 2920 return null; |
| 2866 return new _MatchImplementation(this, m); | 2921 return new _MatchImplementation(this, m); |
| 2867 } | 2922 } |
| 2868 hasMatch(string) { | 2923 hasMatch(string) { |
| 2869 return this._nativeRegExp.test(checkString(string)); | 2924 return this[_nativeRegExp].test(checkString(string)); |
| 2870 } | 2925 } |
| 2871 stringMatch(string) { | 2926 stringMatch(string) { |
| 2872 let match = this.firstMatch(string); | 2927 let match = this.firstMatch(string); |
| 2873 if (match !== null) | 2928 if (match !== null) |
| 2874 return match.group(0); | 2929 return match.group(0); |
| 2875 return null; | 2930 return null; |
| 2876 } | 2931 } |
| 2877 allMatches(string, start) { | 2932 allMatches(string, start) { |
| 2878 if (start === void 0) | 2933 if (start === void 0) |
| 2879 start = 0; | 2934 start = 0; |
| 2880 checkString(string); | 2935 checkString(string); |
| 2881 checkInt(start); | 2936 checkInt(start); |
| 2882 if (dart.notNull(start < 0) || dart.notNull(start > string.length)) { | 2937 if (dart.notNull(start < 0) || dart.notNull(start > string.length)) { |
| 2883 throw new core.RangeError.range(start, 0, string.length); | 2938 throw new core.RangeError.range(start, 0, string.length); |
| 2884 } | 2939 } |
| 2885 return new _AllMatchesIterable(this, string, start); | 2940 return new _AllMatchesIterable(this, string, start); |
| 2886 } | 2941 } |
| 2887 _execGlobal(string, start) { | 2942 [_execGlobal](string, start) { |
| 2888 let regexp = this._nativeGlobalVersion; | 2943 let regexp = this[_nativeGlobalVersion]; |
| 2889 regexp.lastIndex = start; | 2944 regexp.lastIndex = start; |
| 2890 let match = dart.as(regexp.exec(string), core.List); | 2945 let match = dart.as(regexp.exec(string), core.List); |
| 2891 if (match === null) | 2946 if (match === null) |
| 2892 return null; | 2947 return null; |
| 2893 return new _MatchImplementation(this, dart.as(match, core.List$(core.Strin
g))); | 2948 return new _MatchImplementation(this, dart.as(match, core.List$(core.Strin
g))); |
| 2894 } | 2949 } |
| 2895 _execAnchored(string, start) { | 2950 [_execAnchored](string, start) { |
| 2896 let regexp = this._nativeAnchoredVersion; | 2951 let regexp = this[_nativeAnchoredVersion]; |
| 2897 regexp.lastIndex = start; | 2952 regexp.lastIndex = start; |
| 2898 let match = dart.as(regexp.exec(string), core.List); | 2953 let match = dart.as(regexp.exec(string), core.List); |
| 2899 if (match === null) | 2954 if (match === null) |
| 2900 return null; | 2955 return null; |
| 2901 if (match.get(match.length - 1) !== null) | 2956 if (match.get(match.length - 1) !== null) |
| 2902 return null; | 2957 return null; |
| 2903 match.length = 1; | 2958 match.length = 1; |
| 2904 return new _MatchImplementation(this, dart.as(match, core.List$(core.Strin
g))); | 2959 return new _MatchImplementation(this, dart.as(match, core.List$(core.Strin
g))); |
| 2905 } | 2960 } |
| 2906 matchAsPrefix(string, start) { | 2961 matchAsPrefix(string, start) { |
| 2907 if (start === void 0) | 2962 if (start === void 0) |
| 2908 start = 0; | 2963 start = 0; |
| 2909 if (dart.notNull(start < 0) || dart.notNull(start > string.length)) { | 2964 if (dart.notNull(start < 0) || dart.notNull(start > string.length)) { |
| 2910 throw new core.RangeError.range(start, 0, string.length); | 2965 throw new core.RangeError.range(start, 0, string.length); |
| 2911 } | 2966 } |
| 2912 return this._execAnchored(string, start); | 2967 return this[_execAnchored](string, start); |
| 2913 } | 2968 } |
| 2914 get isMultiLine() { | 2969 get isMultiLine() { |
| 2915 return this._isMultiLine; | 2970 return this[_isMultiLine]; |
| 2916 } | 2971 } |
| 2917 get isCaseSensitive() { | 2972 get isCaseSensitive() { |
| 2918 return this._isCaseSensitive; | 2973 return this[_isCaseSensitive]; |
| 2919 } | 2974 } |
| 2920 } | 2975 } |
| 2976 let _match = Symbol('_match'); |
| 2921 class _MatchImplementation extends dart.Object { | 2977 class _MatchImplementation extends dart.Object { |
| 2922 _MatchImplementation(pattern, _match) { | 2978 _MatchImplementation(pattern, $_match) { |
| 2923 this.pattern = pattern; | 2979 this.pattern = pattern; |
| 2924 this._match = _match; | 2980 this[_match] = $_match; |
| 2925 dart.assert(typeof this._match.input == string); | 2981 dart.assert(typeof this[_match].input == string); |
| 2926 dart.assert(typeof this._match.index == number); | 2982 dart.assert(typeof this[_match].index == number); |
| 2927 } | 2983 } |
| 2928 get input() { | 2984 get input() { |
| 2929 return this._match.input; | 2985 return this[_match].input; |
| 2930 } | 2986 } |
| 2931 get start() { | 2987 get start() { |
| 2932 return this._match.index; | 2988 return this[_match].index; |
| 2933 } | 2989 } |
| 2934 get end() { | 2990 get end() { |
| 2935 return this.start + this._match.get(0).length; | 2991 return this.start + this[_match].get(0).length; |
| 2936 } | 2992 } |
| 2937 group(index) { | 2993 group(index) { |
| 2938 return this._match.get(index); | 2994 return this[_match].get(index); |
| 2939 } | 2995 } |
| 2940 get(index) { | 2996 get(index) { |
| 2941 return this.group(index); | 2997 return this.group(index); |
| 2942 } | 2998 } |
| 2943 get groupCount() { | 2999 get groupCount() { |
| 2944 return this._match.length - 1; | 3000 return this[_match].length - 1; |
| 2945 } | 3001 } |
| 2946 groups(groups) { | 3002 groups(groups) { |
| 2947 let out = dart.as(new List.from([]), core.List$(core.String)); | 3003 let out = dart.as(new List.from([]), core.List$(core.String)); |
| 2948 for (let i of groups) { | 3004 for (let i of groups) { |
| 2949 out.add(this.group(i)); | 3005 out.add(this.group(i)); |
| 2950 } | 3006 } |
| 2951 return out; | 3007 return out; |
| 2952 } | 3008 } |
| 2953 } | 3009 } |
| 3010 let _re = Symbol('_re'); |
| 3011 let _string = Symbol('_string'); |
| 3012 let _start = Symbol('_start'); |
| 2954 class _AllMatchesIterable extends collection.IterableBase$(core.Match) { | 3013 class _AllMatchesIterable extends collection.IterableBase$(core.Match) { |
| 2955 _AllMatchesIterable(_re, _string, _start) { | 3014 _AllMatchesIterable($_re, $_string, $_start) { |
| 2956 this._re = _re; | 3015 this[_re] = $_re; |
| 2957 this._string = _string; | 3016 this[_string] = $_string; |
| 2958 this._start = _start; | 3017 this[_start] = $_start; |
| 2959 super.IterableBase(); | 3018 super.IterableBase(); |
| 2960 } | 3019 } |
| 2961 get iterator() { | 3020 get iterator() { |
| 2962 return new _AllMatchesIterator(this._re, this._string, this._start); | 3021 return new _AllMatchesIterator(this[_re], this[_string], this[_start]); |
| 2963 } | 3022 } |
| 2964 } | 3023 } |
| 3024 let _regExp = Symbol('_regExp'); |
| 3025 let _nextIndex = Symbol('_nextIndex'); |
| 3026 let _current = Symbol('_current'); |
| 2965 class _AllMatchesIterator extends dart.Object { | 3027 class _AllMatchesIterator extends dart.Object { |
| 2966 _AllMatchesIterator(_regExp, _string, _nextIndex) { | 3028 _AllMatchesIterator($_regExp, $_string, $_nextIndex) { |
| 2967 this._regExp = _regExp; | 3029 this[_regExp] = $_regExp; |
| 2968 this._string = _string; | 3030 this[_string] = $_string; |
| 2969 this._nextIndex = _nextIndex; | 3031 this[_nextIndex] = $_nextIndex; |
| 2970 this._current = null; | 3032 this[_current] = null; |
| 2971 } | 3033 } |
| 2972 get current() { | 3034 get current() { |
| 2973 return this._current; | 3035 return this[_current]; |
| 2974 } | 3036 } |
| 2975 moveNext() { | 3037 moveNext() { |
| 2976 if (this._string === null) | 3038 if (this[_string] === null) |
| 2977 return false; | 3039 return false; |
| 2978 if (this._nextIndex <= this._string.length) { | 3040 if (this[_nextIndex] <= this[_string].length) { |
| 2979 let match = this._regExp._execGlobal(this._string, this._nextIndex); | 3041 let match = this[_regExp]._execGlobal(this[_string], this[_nextIndex]); |
| 2980 if (match !== null) { | 3042 if (match !== null) { |
| 2981 this._current = match; | 3043 this[_current] = match; |
| 2982 let nextIndex = match.end; | 3044 let nextIndex = match.end; |
| 2983 if (match.start === nextIndex) { | 3045 if (match.start === nextIndex) { |
| 2984 nextIndex++; | 3046 nextIndex++; |
| 2985 } | 3047 } |
| 2986 this._nextIndex = nextIndex; | 3048 this[_nextIndex] = nextIndex; |
| 2987 return true; | 3049 return true; |
| 2988 } | 3050 } |
| 2989 } | 3051 } |
| 2990 this._current = null; | 3052 this[_current] = null; |
| 2991 this._string = null; | 3053 this[_string] = null; |
| 2992 return false; | 3054 return false; |
| 2993 } | 3055 } |
| 2994 } | 3056 } |
| 2995 // Function firstMatchAfter: (JSSyntaxRegExp, String, int) → Match | 3057 // Function firstMatchAfter: (JSSyntaxRegExp, String, int) → Match |
| 2996 function firstMatchAfter(regExp, string, start) { | 3058 function firstMatchAfter(regExp, string, start) { |
| 2997 return regExp._execGlobal(string, start); | 3059 return regExp._execGlobal(string, start); |
| 2998 } | 3060 } |
| 2999 class StringMatch extends dart.Object { | 3061 class StringMatch extends dart.Object { |
| 3000 StringMatch(start, input, pattern) { | 3062 StringMatch(start, input, pattern) { |
| 3001 this.start = start; | 3063 this.start = start; |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3196 } | 3258 } |
| 3197 } | 3259 } |
| 3198 // Function stringJoinUnchecked: (dynamic, dynamic) → dynamic | 3260 // Function stringJoinUnchecked: (dynamic, dynamic) → dynamic |
| 3199 function stringJoinUnchecked(array, separator) { | 3261 function stringJoinUnchecked(array, separator) { |
| 3200 return array.join(separator); | 3262 return array.join(separator); |
| 3201 } | 3263 } |
| 3202 // Function createRuntimeType: (String) → Type | 3264 // Function createRuntimeType: (String) → Type |
| 3203 function createRuntimeType(name) { | 3265 function createRuntimeType(name) { |
| 3204 return new TypeImpl(name); | 3266 return new TypeImpl(name); |
| 3205 } | 3267 } |
| 3268 let _unmangledName = Symbol('_unmangledName'); |
| 3206 class TypeImpl extends dart.Object { | 3269 class TypeImpl extends dart.Object { |
| 3207 TypeImpl(_typeName) { | 3270 TypeImpl($_typeName) { |
| 3208 this._typeName = _typeName; | 3271 this[_typeName] = $_typeName; |
| 3209 this._unmangledName = null; | 3272 this[_unmangledName] = null; |
| 3210 } | 3273 } |
| 3211 toString() { | 3274 toString() { |
| 3212 if (this._unmangledName !== null) | 3275 if (this[_unmangledName] !== null) |
| 3213 return this._unmangledName; | 3276 return this[_unmangledName]; |
| 3214 let unmangledName = _js_names.unmangleAllIdentifiersIfPreservedAnyways(thi
s._typeName); | 3277 let unmangledName = _js_names.unmangleAllIdentifiersIfPreservedAnyways(thi
s[_typeName]); |
| 3215 return this._unmangledName = unmangledName; | 3278 return this[_unmangledName] = unmangledName; |
| 3216 } | 3279 } |
| 3217 get hashCode() { | 3280 get hashCode() { |
| 3218 return this._typeName.hashCode; | 3281 return this[_typeName].hashCode; |
| 3219 } | 3282 } |
| 3220 ['=='](other) { | 3283 ['=='](other) { |
| 3221 return dart.notNull(dart.is(other, TypeImpl)) && dart.notNull(dart.equals(
this._typeName, dart.dload(other, '_typeName'))); | 3284 return dart.notNull(dart.is(other, TypeImpl)) && dart.notNull(dart.equals(
this[_typeName], dart.dload(other, '_typeName'))); |
| 3222 } | 3285 } |
| 3223 } | 3286 } |
| 3224 class TypeVariable extends dart.Object { | 3287 class TypeVariable extends dart.Object { |
| 3225 TypeVariable(owner, name, bound) { | 3288 TypeVariable(owner, name, bound) { |
| 3226 this.owner = owner; | 3289 this.owner = owner; |
| 3227 this.name = name; | 3290 this.name = name; |
| 3228 this.bound = bound; | 3291 this.bound = bound; |
| 3229 } | 3292 } |
| 3230 } | 3293 } |
| 3231 // Function getMangledTypeName: (TypeImpl) → dynamic | 3294 // Function getMangledTypeName: (TypeImpl) → dynamic |
| 3232 function getMangledTypeName(type) { | 3295 function getMangledTypeName(type) { |
| 3233 return type._typeName; | 3296 return type[_typeName]; |
| 3234 } | 3297 } |
| 3235 // Function setRuntimeTypeInfo: (Object, dynamic) → Object | 3298 // Function setRuntimeTypeInfo: (Object, dynamic) → Object |
| 3236 function setRuntimeTypeInfo(target, typeInfo) { | 3299 function setRuntimeTypeInfo(target, typeInfo) { |
| 3237 dart.assert(dart.notNull(typeInfo === null) || dart.notNull(isJsArray(typeIn
fo))); | 3300 dart.assert(dart.notNull(typeInfo === null) || dart.notNull(isJsArray(typeIn
fo))); |
| 3238 if (target !== null) | 3301 if (target !== null) |
| 3239 target.$builtinTypeInfo = typeInfo; | 3302 target.$builtinTypeInfo = typeInfo; |
| 3240 return target; | 3303 return target; |
| 3241 } | 3304 } |
| 3242 // Function getRuntimeTypeInfo: (Object) → dynamic | 3305 // Function getRuntimeTypeInfo: (Object) → dynamic |
| 3243 function getRuntimeTypeInfo(target) { | 3306 function getRuntimeTypeInfo(target) { |
| (...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3885 exports.getIndex = getIndex; | 3948 exports.getIndex = getIndex; |
| 3886 exports.getLength = getLength; | 3949 exports.getLength = getLength; |
| 3887 exports.isJsArray = isJsArray; | 3950 exports.isJsArray = isJsArray; |
| 3888 exports.hasField = hasField; | 3951 exports.hasField = hasField; |
| 3889 exports.hasNoField = hasNoField; | 3952 exports.hasNoField = hasNoField; |
| 3890 exports.isJsFunction = isJsFunction; | 3953 exports.isJsFunction = isJsFunction; |
| 3891 exports.isJsObject = isJsObject; | 3954 exports.isJsObject = isJsObject; |
| 3892 exports.isIdentical = isIdentical; | 3955 exports.isIdentical = isIdentical; |
| 3893 exports.isNotIdentical = isNotIdentical; | 3956 exports.isNotIdentical = isNotIdentical; |
| 3894 })(_js_helper || (_js_helper = {})); | 3957 })(_js_helper || (_js_helper = {})); |
| OLD | NEW |