| OLD | NEW |
| 1 var _js_helper = dart.defineLibrary(_js_helper, {}); | 1 var _js_helper = dart.defineLibrary(_js_helper, {}); |
| 2 var core = dart.import(core); | 2 var core = dart.import(core); |
| 3 var collection = dart.import(collection); | 3 var collection = dart.import(collection); |
| 4 var _internal = dart.import(_internal); | 4 var _internal = dart.import(_internal); |
| 5 var _foreign_helper = dart.import(_foreign_helper); | 5 var _foreign_helper = dart.import(_foreign_helper); |
| 6 var _js_embedded_names = dart.import(_js_embedded_names); | 6 var _js_embedded_names = dart.import(_js_embedded_names); |
| 7 var _interceptors = dart.lazyImport(_interceptors); | 7 var _interceptors = dart.lazyImport(_interceptors); |
| 8 var _js_names = dart.import(_js_names); | 8 var _js_names = dart.import(_js_names); |
| 9 var async = dart.import(async); | 9 var async = dart.import(async); |
| 10 var _isolate_helper = dart.lazyImport(_isolate_helper); | 10 var _isolate_helper = dart.lazyImport(_isolate_helper); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 } | 67 } |
| 68 addAll(other) { | 68 addAll(other) { |
| 69 dart.as(other, core.Map$(K, V)); | 69 dart.as(other, core.Map$(K, V)); |
| 70 return this[_throwUnmodifiable](); | 70 return this[_throwUnmodifiable](); |
| 71 } | 71 } |
| 72 } | 72 } |
| 73 ConstantMap[dart.implements] = () => [core.Map$(K, V)]; | 73 ConstantMap[dart.implements] = () => [core.Map$(K, V)]; |
| 74 dart.defineNamedConstructor(ConstantMap, '_'); | 74 dart.defineNamedConstructor(ConstantMap, '_'); |
| 75 dart.setSignature(ConstantMap, { | 75 dart.setSignature(ConstantMap, { |
| 76 methods: () => ({ | 76 methods: () => ({ |
| 77 [_throwUnmodifiable]: [dart.dynamic, []], | 77 [_throwUnmodifiable]: [core.Object, []], |
| 78 set: [dart.void, [K, V]], | 78 set: [dart.void, [K, V]], |
| 79 putIfAbsent: [V, [K, dart.functionType(V, [])]], | 79 putIfAbsent: [V, [K, dart.functionType(V, [])]], |
| 80 remove: [V, [core.Object]], | 80 remove: [V, [core.Object]], |
| 81 clear: [dart.void, []], | 81 clear: [dart.void, []], |
| 82 addAll: [dart.void, [core.Map$(K, V)]] | 82 addAll: [dart.void, [core.Map$(K, V)]] |
| 83 }) | 83 }) |
| 84 }); | 84 }); |
| 85 return ConstantMap; | 85 return ConstantMap; |
| 86 }); | 86 }); |
| 87 let ConstantMap = ConstantMap$(); | 87 let ConstantMap = ConstantMap$(); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 let keys = this[_keys]; | 119 let keys = this[_keys]; |
| 120 for (let i = 0; dart.notNull(i) < dart.notNull(dart.as(dart.dload(keys,
'length'), core.num)); i = dart.notNull(i) + 1) { | 120 for (let i = 0; dart.notNull(i) < dart.notNull(dart.as(dart.dload(keys,
'length'), core.num)); i = dart.notNull(i) + 1) { |
| 121 let key = dart.dindex(keys, i); | 121 let key = dart.dindex(keys, i); |
| 122 f(dart.as(key, K), dart.as(this[_fetch](key), V)); | 122 f(dart.as(key, K), dart.as(this[_fetch](key), V)); |
| 123 } | 123 } |
| 124 } | 124 } |
| 125 get keys() { | 125 get keys() { |
| 126 return new (_ConstantMapKeyIterable$(K))(this); | 126 return new (_ConstantMapKeyIterable$(K))(this); |
| 127 } | 127 } |
| 128 get values() { | 128 get values() { |
| 129 return new (_internal.MappedIterable$(K, V))(this[_keys], dart.fn((key =
> dart.as(this[_fetch](key), V)).bind(this), V, [dart.dynamic])); | 129 return new (_internal.MappedIterable$(K, V))(this[_keys], dart.fn((key =
> dart.as(this[_fetch](key), V)).bind(this), V, [core.Object])); |
| 130 } | 130 } |
| 131 } | 131 } |
| 132 ConstantStringMap[dart.implements] = () => [_internal.EfficientLength]; | 132 ConstantStringMap[dart.implements] = () => [_internal.EfficientLength]; |
| 133 dart.defineNamedConstructor(ConstantStringMap, '_'); | 133 dart.defineNamedConstructor(ConstantStringMap, '_'); |
| 134 dart.setSignature(ConstantStringMap, { | 134 dart.setSignature(ConstantStringMap, { |
| 135 methods: () => ({ | 135 methods: () => ({ |
| 136 containsValue: [core.bool, [core.Object]], | 136 containsValue: [core.bool, [core.Object]], |
| 137 containsKey: [core.bool, [core.Object]], | 137 containsKey: [core.bool, [core.Object]], |
| 138 get: [V, [core.Object]], | 138 get: [V, [core.Object]], |
| 139 [_fetch]: [dart.dynamic, [dart.dynamic]], | 139 [_fetch]: [core.Object, [core.Object]], |
| 140 forEach: [dart.void, [dart.functionType(dart.void, [K, V])]] | 140 forEach: [dart.void, [dart.functionType(dart.void, [K, V])]] |
| 141 }) | 141 }) |
| 142 }); | 142 }); |
| 143 return ConstantStringMap; | 143 return ConstantStringMap; |
| 144 }); | 144 }); |
| 145 let ConstantStringMap = ConstantStringMap$(); | 145 let ConstantStringMap = ConstantStringMap$(); |
| 146 let _protoValue = Symbol('_protoValue'); | 146 let _protoValue = Symbol('_protoValue'); |
| 147 let ConstantProtoMap$ = dart.generic(function(K, V) { | 147 let ConstantProtoMap$ = dart.generic(function(K, V) { |
| 148 class ConstantProtoMap extends ConstantStringMap$(K, V) { | 148 class ConstantProtoMap extends ConstantStringMap$(K, V) { |
| 149 _(length, jsObject, keys, protoValue) { | 149 _(length, jsObject, keys, protoValue) { |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 return userAgent.indexOf(name) != -1; | 236 return userAgent.indexOf(name) != -1; |
| 237 } | 237 } |
| 238 dart.fn(contains, core.bool, [core.String, core.String]); | 238 dart.fn(contains, core.bool, [core.String, core.String]); |
| 239 function arrayLength(array) { | 239 function arrayLength(array) { |
| 240 return array.length; | 240 return array.length; |
| 241 } | 241 } |
| 242 dart.fn(arrayLength, core.int, [core.List]); | 242 dart.fn(arrayLength, core.int, [core.List]); |
| 243 function arrayGet(array, index) { | 243 function arrayGet(array, index) { |
| 244 return array[index]; | 244 return array[index]; |
| 245 } | 245 } |
| 246 dart.fn(arrayGet, dart.dynamic, [core.List, core.int]); | 246 dart.fn(arrayGet, core.Object, [core.List, core.int]); |
| 247 function arraySet(array, index, value) { | 247 function arraySet(array, index, value) { |
| 248 array[index] = value; | 248 array[index] = value; |
| 249 } | 249 } |
| 250 dart.fn(arraySet, dart.void, [core.List, core.int, dart.dynamic]); | 250 dart.fn(arraySet, dart.void, [core.List, core.int, core.Object]); |
| 251 function propertyGet(object, property) { | 251 function propertyGet(object, property) { |
| 252 return object[property]; | 252 return object[property]; |
| 253 } | 253 } |
| 254 dart.fn(propertyGet, dart.dynamic, [dart.dynamic, core.String]); | 254 dart.fn(propertyGet, core.Object, [core.Object, core.String]); |
| 255 function callHasOwnProperty(func, object, property) { | 255 function callHasOwnProperty(func, object, property) { |
| 256 return func.call(object, property); | 256 return func.call(object, property); |
| 257 } | 257 } |
| 258 dart.fn(callHasOwnProperty, core.bool, [dart.dynamic, dart.dynamic, core.Strin
g]); | 258 dart.fn(callHasOwnProperty, core.bool, [core.Object, core.Object, core.String]
); |
| 259 function propertySet(object, property, value) { | 259 function propertySet(object, property, value) { |
| 260 object[property] = value; | 260 object[property] = value; |
| 261 } | 261 } |
| 262 dart.fn(propertySet, dart.void, [dart.dynamic, core.String, dart.dynamic]); | 262 dart.fn(propertySet, dart.void, [core.Object, core.String, core.Object]); |
| 263 function getPropertyFromPrototype(object, name) { | 263 function getPropertyFromPrototype(object, name) { |
| 264 return Object.getPrototypeOf(object)[name]; | 264 return Object.getPrototypeOf(object)[name]; |
| 265 } | 265 } |
| 266 dart.fn(getPropertyFromPrototype, dart.dynamic, [dart.dynamic, core.String]); | 266 dart.fn(getPropertyFromPrototype, core.Object, [core.Object, core.String]); |
| 267 exports.getTagFunction = null; | 267 exports.getTagFunction = null; |
| 268 exports.alternateTagFunction = null; | 268 exports.alternateTagFunction = null; |
| 269 exports.prototypeForTagFunction = null; | 269 exports.prototypeForTagFunction = null; |
| 270 function toStringForNativeObject(obj) { | 270 function toStringForNativeObject(obj) { |
| 271 let name = exports.getTagFunction == null ? '<Unknown>' : dart.dcall(exports
.getTagFunction, obj); | 271 let name = exports.getTagFunction == null ? '<Unknown>' : dart.dcall(exports
.getTagFunction, obj); |
| 272 return `Instance of ${name}`; | 272 return `Instance of ${name}`; |
| 273 } | 273 } |
| 274 dart.fn(toStringForNativeObject, core.String, [dart.dynamic]); | 274 dart.fn(toStringForNativeObject, core.String, [core.Object]); |
| 275 function hashCodeForNativeObject(object) { | 275 function hashCodeForNativeObject(object) { |
| 276 return Primitives.objectHashCode(object); | 276 return Primitives.objectHashCode(object); |
| 277 } | 277 } |
| 278 dart.fn(hashCodeForNativeObject, core.int, [dart.dynamic]); | 278 dart.fn(hashCodeForNativeObject, core.int, [core.Object]); |
| 279 function defineProperty(obj, property, value) { | 279 function defineProperty(obj, property, value) { |
| 280 Object.defineProperty(obj, property, {value: value, enumerable: false, writa
ble: true, configurable: true}); | 280 Object.defineProperty(obj, property, {value: value, enumerable: false, writa
ble: true, configurable: true}); |
| 281 } | 281 } |
| 282 dart.fn(defineProperty, dart.void, [dart.dynamic, core.String, dart.dynamic]); | 282 dart.fn(defineProperty, dart.void, [core.Object, core.String, core.Object]); |
| 283 function isDartObject(obj) { | 283 function isDartObject(obj) { |
| 284 return obj instanceof _foreign_helper.JS_DART_OBJECT_CONSTRUCTOR(); | 284 return obj instanceof _foreign_helper.JS_DART_OBJECT_CONSTRUCTOR(); |
| 285 } | 285 } |
| 286 dart.fn(isDartObject, core.bool, [dart.dynamic]); | 286 dart.fn(isDartObject, core.bool, [core.Object]); |
| 287 dart.copyProperties(exports, { | 287 dart.copyProperties(exports, { |
| 288 get interceptorsByTag() { | 288 get interceptorsByTag() { |
| 289 return _foreign_helper.JS_EMBEDDED_GLOBAL('=Object', _js_embedded_names.IN
TERCEPTORS_BY_TAG); | 289 return _foreign_helper.JS_EMBEDDED_GLOBAL('=Object', _js_embedded_names.IN
TERCEPTORS_BY_TAG); |
| 290 }, | 290 }, |
| 291 get leafTags() { | 291 get leafTags() { |
| 292 return _foreign_helper.JS_EMBEDDED_GLOBAL('=Object', _js_embedded_names.LE
AF_TAGS); | 292 return _foreign_helper.JS_EMBEDDED_GLOBAL('=Object', _js_embedded_names.LE
AF_TAGS); |
| 293 } | 293 } |
| 294 }); | 294 }); |
| 295 function findDispatchTagForInterceptorClass(interceptorClassConstructor) { | 295 function findDispatchTagForInterceptorClass(interceptorClassConstructor) { |
| 296 return dart.as(interceptorClassConstructor[_js_embedded_names.NATIVE_SUPERCL
ASS_TAG_NAME], core.String); | 296 return dart.as(interceptorClassConstructor[_js_embedded_names.NATIVE_SUPERCL
ASS_TAG_NAME], core.String); |
| 297 } | 297 } |
| 298 dart.fn(findDispatchTagForInterceptorClass, core.String, [dart.dynamic]); | 298 dart.fn(findDispatchTagForInterceptorClass, core.String, [core.Object]); |
| 299 exports.dispatchRecordsForInstanceTags = null; | 299 exports.dispatchRecordsForInstanceTags = null; |
| 300 exports.interceptorsForUncacheableTags = null; | 300 exports.interceptorsForUncacheableTags = null; |
| 301 function lookupInterceptor(tag) { | 301 function lookupInterceptor(tag) { |
| 302 return propertyGet(exports.interceptorsByTag, tag); | 302 return propertyGet(exports.interceptorsByTag, tag); |
| 303 } | 303 } |
| 304 dart.fn(lookupInterceptor, dart.dynamic, [core.String]); | 304 dart.fn(lookupInterceptor, core.Object, [core.String]); |
| 305 let UNCACHED_MARK = '~'; | 305 let UNCACHED_MARK = '~'; |
| 306 let INSTANCE_CACHED_MARK = '!'; | 306 let INSTANCE_CACHED_MARK = '!'; |
| 307 let LEAF_MARK = '-'; | 307 let LEAF_MARK = '-'; |
| 308 let INTERIOR_MARK = '+'; | 308 let INTERIOR_MARK = '+'; |
| 309 let DISCRIMINATED_MARK = '*'; | 309 let DISCRIMINATED_MARK = '*'; |
| 310 function lookupAndCacheInterceptor(obj) { | 310 function lookupAndCacheInterceptor(obj) { |
| 311 dart.assert(!dart.notNull(isDartObject(obj))); | 311 dart.assert(!dart.notNull(isDartObject(obj))); |
| 312 let tag = dart.as(dart.dcall(exports.getTagFunction, obj), core.String); | 312 let tag = dart.as(dart.dcall(exports.getTagFunction, obj), core.String); |
| 313 let record = propertyGet(exports.dispatchRecordsForInstanceTags, tag); | 313 let record = propertyGet(exports.dispatchRecordsForInstanceTags, tag); |
| 314 if (record != null) | 314 if (record != null) |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 } | 393 } |
| 394 } | 394 } |
| 395 dart.fn(makeDefaultDispatchRecord); | 395 dart.fn(makeDefaultDispatchRecord); |
| 396 function setNativeSubclassDispatchRecord(proto, interceptor) { | 396 function setNativeSubclassDispatchRecord(proto, interceptor) { |
| 397 _interceptors.setDispatchProperty(proto, makeLeafDispatchRecord(interceptor)
); | 397 _interceptors.setDispatchProperty(proto, makeLeafDispatchRecord(interceptor)
); |
| 398 } | 398 } |
| 399 dart.fn(setNativeSubclassDispatchRecord); | 399 dart.fn(setNativeSubclassDispatchRecord); |
| 400 function constructorNameFallback(object) { | 400 function constructorNameFallback(object) { |
| 401 return _constructorNameFallback(object); | 401 return _constructorNameFallback(object); |
| 402 } | 402 } |
| 403 dart.fn(constructorNameFallback, core.String, [dart.dynamic]); | 403 dart.fn(constructorNameFallback, core.String, [core.Object]); |
| 404 exports.initNativeDispatchFlag = null; | 404 exports.initNativeDispatchFlag = null; |
| 405 function initNativeDispatch() { | 405 function initNativeDispatch() { |
| 406 if (dart.equals(true, exports.initNativeDispatchFlag)) | 406 if (dart.equals(true, exports.initNativeDispatchFlag)) |
| 407 return; | 407 return; |
| 408 exports.initNativeDispatchFlag = true; | 408 exports.initNativeDispatchFlag = true; |
| 409 initNativeDispatchContinue(); | 409 initNativeDispatchContinue(); |
| 410 } | 410 } |
| 411 dart.fn(initNativeDispatch, dart.void, []); | 411 dart.fn(initNativeDispatch, dart.void, []); |
| 412 function initNativeDispatchContinue() { | 412 function initNativeDispatchContinue() { |
| 413 exports.dispatchRecordsForInstanceTags = Object.create(null); | 413 exports.dispatchRecordsForInstanceTags = Object.create(null); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 if (typeof transformer == "function") { | 466 if (typeof transformer == "function") { |
| 467 hooks = applyHooksTransformer(transformer, hooks); | 467 hooks = applyHooksTransformer(transformer, hooks); |
| 468 } | 468 } |
| 469 } | 469 } |
| 470 } | 470 } |
| 471 } | 471 } |
| 472 let getTag = hooks.getTag; | 472 let getTag = hooks.getTag; |
| 473 let getUnknownTag = hooks.getUnknownTag; | 473 let getUnknownTag = hooks.getUnknownTag; |
| 474 let prototypeForTag = hooks.prototypeForTag; | 474 let prototypeForTag = hooks.prototypeForTag; |
| 475 exports.getTagFunction = dart.fn(o => getTag(o)); | 475 exports.getTagFunction = dart.fn(o => getTag(o)); |
| 476 exports.alternateTagFunction = dart.fn((o, tag) => getUnknownTag(o, tag), da
rt.dynamic, [dart.dynamic, core.String]); | 476 exports.alternateTagFunction = dart.fn((o, tag) => getUnknownTag(o, tag), co
re.Object, [core.Object, core.String]); |
| 477 exports.prototypeForTagFunction = dart.fn(tag => prototypeForTag(tag), dart.
dynamic, [core.String]); | 477 exports.prototypeForTagFunction = dart.fn(tag => prototypeForTag(tag), core.
Object, [core.String]); |
| 478 } | 478 } |
| 479 dart.fn(initHooks, dart.void, []); | 479 dart.fn(initHooks, dart.void, []); |
| 480 function applyHooksTransformer(transformer, hooks) { | 480 function applyHooksTransformer(transformer, hooks) { |
| 481 let newHooks = transformer(hooks); | 481 let newHooks = transformer(hooks); |
| 482 return newHooks || hooks; | 482 return newHooks || hooks; |
| 483 } | 483 } |
| 484 dart.fn(applyHooksTransformer); | 484 dart.fn(applyHooksTransformer); |
| 485 let _baseHooks = dart.const(new _foreign_helper.JS_CONST('function() {\n func
tion typeNameInChrome(o) {\n var constructor = o.constructor;\n if (constr
uctor) {\n var name = constructor.name;\n if (name) return name;\n
}\n var s = Object.prototype.toString.call(o);\n return s.substring(8, s.l
ength - 1);\n }\n function getUnknownTag(object, tag) {\n // This code real
ly belongs in [getUnknownTagGenericBrowser] but having it\n // here allows [g
etUnknownTag] 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 = Obje
ct.prototype.toString.call(object);\n if (name == "[object Object]") return
null;\n return "HTMLElement";\n }\n }\n function getUnknownTagGeneric
Browser(object, tag) {\n if (self.HTMLElement && object instanceof HTMLElemen
t) return "HTMLElement";\n return getUnknownTag(object, tag);\n }\n functio
n prototypeForTag(tag) {\n if (typeof window == "undefined") return null;\n
if (typeof window[tag] == "undefined") return null;\n var constructor = win
dow[tag];\n if (typeof constructor != "function") return null;\n return co
nstructor.prototype;\n }\n function discriminator(tag) { return null; }\n\n v
ar isBrowser = typeof navigator == "object";\n\n return {\n getTag: typeName
InChrome,\n getUnknownTag: isBrowser ? getUnknownTagGenericBrowser : getUnkno
wnTag,\n prototypeForTag: prototypeForTag,\n discriminator: discriminator
};\n}')); | 485 let _baseHooks = dart.const(new _foreign_helper.JS_CONST('function() {\n func
tion typeNameInChrome(o) {\n var constructor = o.constructor;\n if (constr
uctor) {\n var name = constructor.name;\n if (name) return name;\n
}\n var s = Object.prototype.toString.call(o);\n return s.substring(8, s.l
ength - 1);\n }\n function getUnknownTag(object, tag) {\n // This code real
ly belongs in [getUnknownTagGenericBrowser] but having it\n // here allows [g
etUnknownTag] 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 = Obje
ct.prototype.toString.call(object);\n if (name == "[object Object]") return
null;\n return "HTMLElement";\n }\n }\n function getUnknownTagGeneric
Browser(object, tag) {\n if (self.HTMLElement && object instanceof HTMLElemen
t) return "HTMLElement";\n return getUnknownTag(object, tag);\n }\n functio
n prototypeForTag(tag) {\n if (typeof window == "undefined") return null;\n
if (typeof window[tag] == "undefined") return null;\n var constructor = win
dow[tag];\n if (typeof constructor != "function") return null;\n return co
nstructor.prototype;\n }\n function discriminator(tag) { return null; }\n\n v
ar isBrowser = typeof navigator == "object";\n\n return {\n getTag: typeName
InChrome,\n getUnknownTag: isBrowser ? getUnknownTagGenericBrowser : getUnkno
wnTag,\n prototypeForTag: prototypeForTag,\n discriminator: discriminator
};\n}')); |
| 486 let _constructorNameFallback = dart.const(new _foreign_helper.JS_CONST('functi
on getTagFallback(o) {\n var constructor = o.constructor;\n if (typeof constru
ctor == "function") {\n var name = constructor.name;\n // If the name is a
non-empty string, we use that as the type name of this\n // object. There a
re various cases where that does not work, so we have to\n // detect them and
fall through 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 o
bject\n // names have three characters (e.g. URL, CSS).\n name.len
gth > 2 &&\n\n // On Firefox we often get "Object" as the constructor nam
e, even for\n // more specialized DOM objects.\n name !== "Object"
&&\n\n // This can happen in Opera.\n name !== "Function.prototyp
e") {\n return name;\n }\n }\n var s = Object.prototype.toString.call(
o);\n return s.substring(8, s.length - 1);\n}')); | 486 let _constructorNameFallback = dart.const(new _foreign_helper.JS_CONST('functi
on getTagFallback(o) {\n var constructor = o.constructor;\n if (typeof constru
ctor == "function") {\n var name = constructor.name;\n // If the name is a
non-empty string, we use that as the type name of this\n // object. There a
re various cases where that does not work, so we have to\n // detect them and
fall through 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 o
bject\n // names have three characters (e.g. URL, CSS).\n name.len
gth > 2 &&\n\n // On Firefox we often get "Object" as the constructor nam
e, even for\n // more specialized DOM objects.\n name !== "Object"
&&\n\n // This can happen in Opera.\n name !== "Function.prototyp
e") {\n return name;\n }\n }\n var s = Object.prototype.toString.call(
o);\n return s.substring(8, s.length - 1);\n}')); |
| 487 let _fallbackConstructorHooksTransformerGenerator = dart.const(new _foreign_he
lper.JS_CONST('function(getTagFallback) {\n return function(hooks) {\n // If
we are not in a browser, assume we are in d8.\n // TODO(sra): Recognize jssh
ell.\n if (typeof navigator != "object") return hooks;\n\n var ua = naviga
tor.userAgent;\n // TODO(antonm): remove a reference to DumpRenderTree.\n
if (ua.indexOf("DumpRenderTree") >= 0) return hooks;\n if (ua.indexOf("Chrome
") >= 0) {\n // Confirm constructor name is usable for dispatch.\n fun
ction confirm(p) {\n return typeof window == "object" && window[p] && win
dow[p].name == p;\n }\n if (confirm("Window") && confirm("HTMLElement"
)) return hooks;\n }\n\n hooks.getTag = getTagFallback;\n };\n}')); | 487 let _fallbackConstructorHooksTransformerGenerator = dart.const(new _foreign_he
lper.JS_CONST('function(getTagFallback) {\n return function(hooks) {\n // If
we are not in a browser, assume we are in d8.\n // TODO(sra): Recognize jssh
ell.\n if (typeof navigator != "object") return hooks;\n\n var ua = naviga
tor.userAgent;\n // TODO(antonm): remove a reference to DumpRenderTree.\n
if (ua.indexOf("DumpRenderTree") >= 0) return hooks;\n if (ua.indexOf("Chrome
") >= 0) {\n // Confirm constructor name is usable for dispatch.\n fun
ction confirm(p) {\n return typeof window == "object" && window[p] && win
dow[p].name == p;\n }\n if (confirm("Window") && confirm("HTMLElement"
)) return hooks;\n }\n\n hooks.getTag = getTagFallback;\n };\n}')); |
| 488 let _ieHooksTransformer = dart.const(new _foreign_helper.JS_CONST('function(ho
oks) {\n var userAgent = typeof navigator == "object" ? navigator.userAgent : "
";\n if (userAgent.indexOf("Trident/") == -1) return hooks;\n\n var getTag = h
ooks.getTag;\n\n var quickMap = {\n "BeforeUnloadEvent": "Event",\n "Data
Transfer": "Clipboard",\n "HTMLDDElement": "HTMLElement",\n "HTMLDTElement
": "HTMLElement",\n "HTMLPhraseElement": "HTMLElement",\n "Position": "Geo
position"\n };\n\n function getTagIE(o) {\n var tag = getTag(o);\n var n
ewTag = quickMap[tag];\n if (newTag) return newTag;\n // Patches for types
which report themselves as Objects.\n if (tag == "Object") {\n if (wind
ow.DataView && (o instanceof window.DataView)) return "DataView";\n }\n re
turn tag;\n }\n\n function prototypeForTagIE(tag) {\n var constructor = win
dow[tag];\n if (constructor == null) return null;\n return constructor.pro
totype;\n }\n\n hooks.getTag = getTagIE;\n hooks.prototypeForTag = prototypeF
orTagIE;\n}')); | 488 let _ieHooksTransformer = dart.const(new _foreign_helper.JS_CONST('function(ho
oks) {\n var userAgent = typeof navigator == "object" ? navigator.userAgent : "
";\n if (userAgent.indexOf("Trident/") == -1) return hooks;\n\n var getTag = h
ooks.getTag;\n\n var quickMap = {\n "BeforeUnloadEvent": "Event",\n "Data
Transfer": "Clipboard",\n "HTMLDDElement": "HTMLElement",\n "HTMLDTElement
": "HTMLElement",\n "HTMLPhraseElement": "HTMLElement",\n "Position": "Geo
position"\n };\n\n function getTagIE(o) {\n var tag = getTag(o);\n var n
ewTag = quickMap[tag];\n if (newTag) return newTag;\n // Patches for types
which report themselves as Objects.\n if (tag == "Object") {\n if (wind
ow.DataView && (o instanceof window.DataView)) return "DataView";\n }\n re
turn tag;\n }\n\n function prototypeForTagIE(tag) {\n var constructor = win
dow[tag];\n if (constructor == null) return null;\n return constructor.pro
totype;\n }\n\n hooks.getTag = getTagIE;\n hooks.prototypeForTag = prototypeF
orTagIE;\n}')); |
| 489 let _fixDocumentHooksTransformer = dart.const(new _foreign_helper.JS_CONST('fu
nction(hooks) {\n var getTag = hooks.getTag;\n var prototypeForTag = hooks.pro
totypeForTag;\n function getTagFixed(o) {\n var tag = getTag(o);\n if (ta
g == "Document") {\n // Some browsers and the polymer polyfill call both HT
ML and XML documents\n // "Document", so we check for the xmlVersion proper
ty, which is the empty\n // string on HTML documents. Since both dart:html
classes Document and\n // HtmlDocument share the same type, we must patch t
he instances and not\n // the prototype.\n if (!!o.xmlVersion) return
"!Document";\n return "!HTMLDocument";\n }\n return tag;\n }\n\n fu
nction prototypeForTagFixed(tag) {\n if (tag == "Document") return null; //
Do not pre-patch Document.\n return prototypeForTag(tag);\n }\n\n hooks.get
Tag = getTagFixed;\n hooks.prototypeForTag = prototypeForTagFixed;\n}')); | 489 let _fixDocumentHooksTransformer = dart.const(new _foreign_helper.JS_CONST('fu
nction(hooks) {\n var getTag = hooks.getTag;\n var prototypeForTag = hooks.pro
totypeForTag;\n function getTagFixed(o) {\n var tag = getTag(o);\n if (ta
g == "Document") {\n // Some browsers and the polymer polyfill call both HT
ML and XML documents\n // "Document", so we check for the xmlVersion proper
ty, which is the empty\n // string on HTML documents. Since both dart:html
classes Document and\n // HtmlDocument share the same type, we must patch t
he instances and not\n // the prototype.\n if (!!o.xmlVersion) return
"!Document";\n return "!HTMLDocument";\n }\n return tag;\n }\n\n fu
nction prototypeForTagFixed(tag) {\n if (tag == "Document") return null; //
Do not pre-patch Document.\n return prototypeForTag(tag);\n }\n\n hooks.get
Tag = getTagFixed;\n hooks.prototypeForTag = prototypeForTagFixed;\n}')); |
| 490 let _firefoxHooksTransformer = dart.const(new _foreign_helper.JS_CONST('functi
on(hooks) {\n var userAgent = typeof navigator == "object" ? navigator.userAgen
t : "";\n if (userAgent.indexOf("Firefox") == -1) return hooks;\n\n var getTag
= hooks.getTag;\n\n var quickMap = {\n "BeforeUnloadEvent": "Event",\n "
DataTransfer": "Clipboard",\n "GeoGeolocation": "Geolocation",\n "Location
": "!Location", // Fixes issue 18151\n "WorkerMessageEvent": "M
essageEvent",\n "XMLDocument": "!Document"};\n\n function getTagFirefox(o) {
\n var tag = getTag(o);\n return quickMap[tag] || tag;\n }\n\n hooks.get
Tag = getTagFirefox;\n}')); | 490 let _firefoxHooksTransformer = dart.const(new _foreign_helper.JS_CONST('functi
on(hooks) {\n var userAgent = typeof navigator == "object" ? navigator.userAgen
t : "";\n if (userAgent.indexOf("Firefox") == -1) return hooks;\n\n var getTag
= hooks.getTag;\n\n var quickMap = {\n "BeforeUnloadEvent": "Event",\n "
DataTransfer": "Clipboard",\n "GeoGeolocation": "Geolocation",\n "Location
": "!Location", // Fixes issue 18151\n "WorkerMessageEvent": "M
essageEvent",\n "XMLDocument": "!Document"};\n\n function getTagFirefox(o) {
\n var tag = getTag(o);\n return quickMap[tag] || tag;\n }\n\n hooks.get
Tag = getTagFirefox;\n}')); |
| 491 let _operaHooksTransformer = dart.const(new _foreign_helper.JS_CONST('function
(hooks) { return hooks; }\n')); | 491 let _operaHooksTransformer = dart.const(new _foreign_helper.JS_CONST('function
(hooks) { return hooks; }\n')); |
| 492 let _safariHooksTransformer = dart.const(new _foreign_helper.JS_CONST('functio
n(hooks) { return hooks; }\n')); | 492 let _safariHooksTransformer = dart.const(new _foreign_helper.JS_CONST('functio
n(hooks) { return hooks; }\n')); |
| 493 let _dartExperimentalFixupGetTagHooksTransformer = dart.const(new _foreign_hel
per.JS_CONST('function(hooks) {\n if (typeof dartExperimentalFixupGetTag != "fu
nction") return hooks;\n hooks.getTag = dartExperimentalFixupGetTag(hooks.getTa
g);\n}')); | 493 let _dartExperimentalFixupGetTagHooksTransformer = dart.const(new _foreign_hel
per.JS_CONST('function(hooks) {\n if (typeof dartExperimentalFixupGetTag != "fu
nction") return hooks;\n hooks.getTag = dartExperimentalFixupGetTag(hooks.getTa
g);\n}')); |
| 494 let _nativeRegExp = Symbol('_nativeRegExp'); | 494 let _nativeRegExp = Symbol('_nativeRegExp'); |
| 495 function regExpGetNative(regexp) { | 495 function regExpGetNative(regexp) { |
| 496 return regexp[_nativeRegExp]; | 496 return regexp[_nativeRegExp]; |
| 497 } | 497 } |
| 498 dart.fn(regExpGetNative, () => dart.functionType(dart.dynamic, [JSSyntaxRegExp
])); | 498 dart.fn(regExpGetNative, () => dart.functionType(core.Object, [JSSyntaxRegExp]
)); |
| 499 let _nativeGlobalVersion = Symbol('_nativeGlobalVersion'); | 499 let _nativeGlobalVersion = Symbol('_nativeGlobalVersion'); |
| 500 function regExpGetGlobalNative(regexp) { | 500 function regExpGetGlobalNative(regexp) { |
| 501 let nativeRegexp = regexp[_nativeGlobalVersion]; | 501 let nativeRegexp = regexp[_nativeGlobalVersion]; |
| 502 nativeRegexp.lastIndex = 0; | 502 nativeRegexp.lastIndex = 0; |
| 503 return nativeRegexp; | 503 return nativeRegexp; |
| 504 } | 504 } |
| 505 dart.fn(regExpGetGlobalNative, () => dart.functionType(dart.dynamic, [JSSyntax
RegExp])); | 505 dart.fn(regExpGetGlobalNative, () => dart.functionType(core.Object, [JSSyntaxR
egExp])); |
| 506 let _nativeAnchoredVersion = Symbol('_nativeAnchoredVersion'); | 506 let _nativeAnchoredVersion = Symbol('_nativeAnchoredVersion'); |
| 507 function regExpCaptureCount(regexp) { | 507 function regExpCaptureCount(regexp) { |
| 508 let nativeAnchoredRegExp = regexp[_nativeAnchoredVersion]; | 508 let nativeAnchoredRegExp = regexp[_nativeAnchoredVersion]; |
| 509 let match = nativeAnchoredRegExp.exec(''); | 509 let match = nativeAnchoredRegExp.exec(''); |
| 510 return dart.as(dart.dsend(dart.dload(match, 'length'), '-', 2), core.int); | 510 return dart.as(dart.dsend(dart.dload(match, 'length'), '-', 2), core.int); |
| 511 } | 511 } |
| 512 dart.fn(regExpCaptureCount, () => dart.functionType(core.int, [JSSyntaxRegExp]
)); | 512 dart.fn(regExpCaptureCount, () => dart.functionType(core.int, [JSSyntaxRegExp]
)); |
| 513 let _nativeGlobalRegExp = Symbol('_nativeGlobalRegExp'); | 513 let _nativeGlobalRegExp = Symbol('_nativeGlobalRegExp'); |
| 514 let _nativeAnchoredRegExp = Symbol('_nativeAnchoredRegExp'); | 514 let _nativeAnchoredRegExp = Symbol('_nativeAnchoredRegExp'); |
| 515 let _isMultiLine = Symbol('_isMultiLine'); | 515 let _isMultiLine = Symbol('_isMultiLine'); |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 dart.setSignature(JSSyntaxRegExp, { | 625 dart.setSignature(JSSyntaxRegExp, { |
| 626 methods: () => ({ | 626 methods: () => ({ |
| 627 firstMatch: [core.Match, [core.String]], | 627 firstMatch: [core.Match, [core.String]], |
| 628 hasMatch: [core.bool, [core.String]], | 628 hasMatch: [core.bool, [core.String]], |
| 629 stringMatch: [core.String, [core.String]], | 629 stringMatch: [core.String, [core.String]], |
| 630 allMatches: [core.Iterable$(core.Match), [core.String], [core.int]], | 630 allMatches: [core.Iterable$(core.Match), [core.String], [core.int]], |
| 631 [_execGlobal]: [core.Match, [core.String, core.int]], | 631 [_execGlobal]: [core.Match, [core.String, core.int]], |
| 632 [_execAnchored]: [core.Match, [core.String, core.int]], | 632 [_execAnchored]: [core.Match, [core.String, core.int]], |
| 633 matchAsPrefix: [core.Match, [core.String], [core.int]] | 633 matchAsPrefix: [core.Match, [core.String], [core.int]] |
| 634 }), | 634 }), |
| 635 statics: () => ({makeNative: [dart.dynamic, [core.String, core.bool, core.bo
ol, core.bool]]}), | 635 statics: () => ({makeNative: [core.Object, [core.String, core.bool, core.boo
l, core.bool]]}), |
| 636 names: ['makeNative'] | 636 names: ['makeNative'] |
| 637 }); | 637 }); |
| 638 let _match = Symbol('_match'); | 638 let _match = Symbol('_match'); |
| 639 class _MatchImplementation extends core.Object { | 639 class _MatchImplementation extends core.Object { |
| 640 _MatchImplementation(pattern, match) { | 640 _MatchImplementation(pattern, match) { |
| 641 this.pattern = pattern; | 641 this.pattern = pattern; |
| 642 this[_match] = match; | 642 this[_match] = match; |
| 643 dart.assert(typeof this[_match].input == 'string'); | 643 dart.assert(typeof this[_match].input == 'string'); |
| 644 dart.assert(typeof this[_match].index == 'number'); | 644 dart.assert(typeof this[_match].index == 'number'); |
| 645 } | 645 } |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 931 if (dart.dsend(index, '<', 0)) | 931 if (dart.dsend(index, '<', 0)) |
| 932 return receiver; | 932 return receiver; |
| 933 return `${dart.dsend(receiver, 'substring', 0, index)}${to}` + `${dart.dse
nd(receiver, 'substring', dart.dsend(index, '+', dart.dload(from, 'length')))}`; | 933 return `${dart.dsend(receiver, 'substring', 0, index)}${to}` + `${dart.dse
nd(receiver, 'substring', dart.dsend(index, '+', dart.dload(from, 'length')))}`; |
| 934 } else if (dart.is(from, JSSyntaxRegExp)) { | 934 } else if (dart.is(from, JSSyntaxRegExp)) { |
| 935 return startIndex == 0 ? stringReplaceJS(receiver, regExpGetNative(dart.as
(from, JSSyntaxRegExp)), to) : stringReplaceFirstRE(receiver, from, to, startInd
ex); | 935 return startIndex == 0 ? stringReplaceJS(receiver, regExpGetNative(dart.as
(from, JSSyntaxRegExp)), to) : stringReplaceFirstRE(receiver, from, to, startInd
ex); |
| 936 } else { | 936 } else { |
| 937 checkNull(from); | 937 checkNull(from); |
| 938 throw "String.replace(Pattern) UNIMPLEMENTED"; | 938 throw "String.replace(Pattern) UNIMPLEMENTED"; |
| 939 } | 939 } |
| 940 } | 940 } |
| 941 dart.fn(stringReplaceFirstUnchecked, dart.dynamic, [dart.dynamic, dart.dynamic
, dart.dynamic], [core.int]); | 941 dart.fn(stringReplaceFirstUnchecked, core.Object, [core.Object, core.Object, c
ore.Object], [core.int]); |
| 942 function stringJoinUnchecked(array, separator) { | 942 function stringJoinUnchecked(array, separator) { |
| 943 return array.join(separator); | 943 return array.join(separator); |
| 944 } | 944 } |
| 945 dart.fn(stringJoinUnchecked); | 945 dart.fn(stringJoinUnchecked); |
| 946 function createRuntimeType(name) { | 946 function createRuntimeType(name) { |
| 947 return new TypeImpl(name); | 947 return new TypeImpl(name); |
| 948 } | 948 } |
| 949 dart.fn(createRuntimeType, core.Type, [core.String]); | 949 dart.fn(createRuntimeType, core.Type, [core.String]); |
| 950 let _typeName = Symbol('_typeName'); | 950 let _typeName = Symbol('_typeName'); |
| 951 let _unmangledName = Symbol('_unmangledName'); | 951 let _unmangledName = Symbol('_unmangledName'); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 971 class TypeVariable extends core.Object { | 971 class TypeVariable extends core.Object { |
| 972 TypeVariable(owner, name, bound) { | 972 TypeVariable(owner, name, bound) { |
| 973 this.owner = owner; | 973 this.owner = owner; |
| 974 this.name = name; | 974 this.name = name; |
| 975 this.bound = bound; | 975 this.bound = bound; |
| 976 } | 976 } |
| 977 } | 977 } |
| 978 function getMangledTypeName(type) { | 978 function getMangledTypeName(type) { |
| 979 return type[_typeName]; | 979 return type[_typeName]; |
| 980 } | 980 } |
| 981 dart.fn(getMangledTypeName, dart.dynamic, [TypeImpl]); | 981 dart.fn(getMangledTypeName, core.Object, [TypeImpl]); |
| 982 function setRuntimeTypeInfo(target, typeInfo) { | 982 function setRuntimeTypeInfo(target, typeInfo) { |
| 983 dart.assert(dart.notNull(typeInfo == null) || dart.notNull(isJsArray(typeInf
o))); | 983 dart.assert(dart.notNull(typeInfo == null) || dart.notNull(isJsArray(typeInf
o))); |
| 984 if (target != null) | 984 if (target != null) |
| 985 target.$builtinTypeInfo = typeInfo; | 985 target.$builtinTypeInfo = typeInfo; |
| 986 return target; | 986 return target; |
| 987 } | 987 } |
| 988 dart.fn(setRuntimeTypeInfo, core.Object, [core.Object, dart.dynamic]); | 988 dart.fn(setRuntimeTypeInfo, core.Object, [core.Object, core.Object]); |
| 989 function getRuntimeTypeInfo(target) { | 989 function getRuntimeTypeInfo(target) { |
| 990 if (target == null) | 990 if (target == null) |
| 991 return null; | 991 return null; |
| 992 return target.$builtinTypeInfo; | 992 return target.$builtinTypeInfo; |
| 993 } | 993 } |
| 994 dart.fn(getRuntimeTypeInfo, dart.dynamic, [core.Object]); | 994 dart.fn(getRuntimeTypeInfo, core.Object, [core.Object]); |
| 995 function getRuntimeTypeArguments(target, substitutionName) { | 995 function getRuntimeTypeArguments(target, substitutionName) { |
| 996 let substitution = getField(target, `${_foreign_helper.JS_OPERATOR_AS_PREFIX
()}${substitutionName}`); | 996 let substitution = getField(target, `${_foreign_helper.JS_OPERATOR_AS_PREFIX
()}${substitutionName}`); |
| 997 return substitute(substitution, getRuntimeTypeInfo(target)); | 997 return substitute(substitution, getRuntimeTypeInfo(target)); |
| 998 } | 998 } |
| 999 dart.fn(getRuntimeTypeArguments); | 999 dart.fn(getRuntimeTypeArguments); |
| 1000 function getRuntimeTypeArgument(target, substitutionName, index) { | 1000 function getRuntimeTypeArgument(target, substitutionName, index) { |
| 1001 let arguments$ = getRuntimeTypeArguments(target, substitutionName); | 1001 let arguments$ = getRuntimeTypeArguments(target, substitutionName); |
| 1002 return arguments$ == null ? null : getIndex(arguments$, index); | 1002 return arguments$ == null ? null : getIndex(arguments$, index); |
| 1003 } | 1003 } |
| 1004 dart.fn(getRuntimeTypeArgument, dart.dynamic, [core.Object, core.String, core.
int]); | 1004 dart.fn(getRuntimeTypeArgument, core.Object, [core.Object, core.String, core.i
nt]); |
| 1005 function getTypeArgumentByIndex(target, index) { | 1005 function getTypeArgumentByIndex(target, index) { |
| 1006 let rti = getRuntimeTypeInfo(target); | 1006 let rti = getRuntimeTypeInfo(target); |
| 1007 return rti == null ? null : getIndex(rti, index); | 1007 return rti == null ? null : getIndex(rti, index); |
| 1008 } | 1008 } |
| 1009 dart.fn(getTypeArgumentByIndex, dart.dynamic, [core.Object, core.int]); | 1009 dart.fn(getTypeArgumentByIndex, core.Object, [core.Object, core.int]); |
| 1010 function copyTypeArguments(source, target) { | 1010 function copyTypeArguments(source, target) { |
| 1011 target.$builtinTypeInfo = source.$builtinTypeInfo; | 1011 target.$builtinTypeInfo = source.$builtinTypeInfo; |
| 1012 } | 1012 } |
| 1013 dart.fn(copyTypeArguments, dart.void, [core.Object, core.Object]); | 1013 dart.fn(copyTypeArguments, dart.void, [core.Object, core.Object]); |
| 1014 function getClassName(object) { | 1014 function getClassName(object) { |
| 1015 return _interceptors.getInterceptor(object).constructor.builtin$cls; | 1015 return _interceptors.getInterceptor(object).constructor.builtin$cls; |
| 1016 } | 1016 } |
| 1017 dart.fn(getClassName, core.String, [dart.dynamic]); | 1017 dart.fn(getClassName, core.String, [core.Object]); |
| 1018 function getRuntimeTypeAsString(runtimeType, opts) { | 1018 function getRuntimeTypeAsString(runtimeType, opts) { |
| 1019 let onTypeVariable = opts && 'onTypeVariable' in opts ? opts.onTypeVariable
: null; | 1019 let onTypeVariable = opts && 'onTypeVariable' in opts ? opts.onTypeVariable
: null; |
| 1020 dart.assert(isJsArray(runtimeType)); | 1020 dart.assert(isJsArray(runtimeType)); |
| 1021 let className = getConstructorName(getIndex(runtimeType, 0)); | 1021 let className = getConstructorName(getIndex(runtimeType, 0)); |
| 1022 return `${className}` + `${joinArguments(runtimeType, 1, {onTypeVariable: on
TypeVariable})}`; | 1022 return `${className}` + `${joinArguments(runtimeType, 1, {onTypeVariable: on
TypeVariable})}`; |
| 1023 } | 1023 } |
| 1024 dart.fn(getRuntimeTypeAsString, core.String, [dart.dynamic], {nTypeVariabl: da
rt.functionType(core.String, [core.int])}); | 1024 dart.fn(getRuntimeTypeAsString, core.String, [core.Object], {nTypeVariabl: dar
t.functionType(core.String, [core.int])}); |
| 1025 function getConstructorName(type) { | 1025 function getConstructorName(type) { |
| 1026 return type.builtin$cls; | 1026 return type.builtin$cls; |
| 1027 } | 1027 } |
| 1028 dart.fn(getConstructorName, core.String, [dart.dynamic]); | 1028 dart.fn(getConstructorName, core.String, [core.Object]); |
| 1029 function runtimeTypeToString(type, opts) { | 1029 function runtimeTypeToString(type, opts) { |
| 1030 let onTypeVariable = opts && 'onTypeVariable' in opts ? opts.onTypeVariable
: null; | 1030 let onTypeVariable = opts && 'onTypeVariable' in opts ? opts.onTypeVariable
: null; |
| 1031 if (type == null) { | 1031 if (type == null) { |
| 1032 return 'dynamic'; | 1032 return 'dynamic'; |
| 1033 } else if (isJsArray(type)) { | 1033 } else if (isJsArray(type)) { |
| 1034 return getRuntimeTypeAsString(type, {onTypeVariable: onTypeVariable}); | 1034 return getRuntimeTypeAsString(type, {onTypeVariable: onTypeVariable}); |
| 1035 } else if (isJsFunction(type)) { | 1035 } else if (isJsFunction(type)) { |
| 1036 return getConstructorName(type); | 1036 return getConstructorName(type); |
| 1037 } else if (typeof type == 'number') { | 1037 } else if (typeof type == 'number') { |
| 1038 if (onTypeVariable == null) { | 1038 if (onTypeVariable == null) { |
| 1039 return dart.toString(type); | 1039 return dart.toString(type); |
| 1040 } else { | 1040 } else { |
| 1041 return onTypeVariable(dart.as(type, core.int)); | 1041 return onTypeVariable(dart.as(type, core.int)); |
| 1042 } | 1042 } |
| 1043 } else { | 1043 } else { |
| 1044 return null; | 1044 return null; |
| 1045 } | 1045 } |
| 1046 } | 1046 } |
| 1047 dart.fn(runtimeTypeToString, core.String, [dart.dynamic], {nTypeVariabl: dart.
functionType(core.String, [core.int])}); | 1047 dart.fn(runtimeTypeToString, core.String, [core.Object], {nTypeVariabl: dart.f
unctionType(core.String, [core.int])}); |
| 1048 function joinArguments(types, startIndex, opts) { | 1048 function joinArguments(types, startIndex, opts) { |
| 1049 let onTypeVariable = opts && 'onTypeVariable' in opts ? opts.onTypeVariable
: null; | 1049 let onTypeVariable = opts && 'onTypeVariable' in opts ? opts.onTypeVariable
: null; |
| 1050 if (types == null) | 1050 if (types == null) |
| 1051 return ''; | 1051 return ''; |
| 1052 dart.assert(isJsArray(types)); | 1052 dart.assert(isJsArray(types)); |
| 1053 let firstArgument = true; | 1053 let firstArgument = true; |
| 1054 let allDynamic = true; | 1054 let allDynamic = true; |
| 1055 let buffer = new core.StringBuffer(); | 1055 let buffer = new core.StringBuffer(); |
| 1056 for (let index = startIndex; dart.notNull(index) < dart.notNull(getLength(ty
pes)); index = dart.notNull(index) + 1) { | 1056 for (let index = startIndex; dart.notNull(index) < dart.notNull(getLength(ty
pes)); index = dart.notNull(index) + 1) { |
| 1057 if (firstArgument) { | 1057 if (firstArgument) { |
| 1058 firstArgument = false; | 1058 firstArgument = false; |
| 1059 } else { | 1059 } else { |
| 1060 buffer.write(', '); | 1060 buffer.write(', '); |
| 1061 } | 1061 } |
| 1062 let argument = getIndex(types, index); | 1062 let argument = getIndex(types, index); |
| 1063 if (argument != null) { | 1063 if (argument != null) { |
| 1064 allDynamic = false; | 1064 allDynamic = false; |
| 1065 } | 1065 } |
| 1066 buffer.write(runtimeTypeToString(argument, {onTypeVariable: onTypeVariable
})); | 1066 buffer.write(runtimeTypeToString(argument, {onTypeVariable: onTypeVariable
})); |
| 1067 } | 1067 } |
| 1068 return allDynamic ? '' : `<${buffer}>`; | 1068 return allDynamic ? '' : `<${buffer}>`; |
| 1069 } | 1069 } |
| 1070 dart.fn(joinArguments, core.String, [dart.dynamic, core.int], {nTypeVariabl: d
art.functionType(core.String, [core.int])}); | 1070 dart.fn(joinArguments, core.String, [core.Object, core.int], {nTypeVariabl: da
rt.functionType(core.String, [core.int])}); |
| 1071 function getRuntimeTypeString(object) { | 1071 function getRuntimeTypeString(object) { |
| 1072 let className = getClassName(object); | 1072 let className = getClassName(object); |
| 1073 if (object == null) | 1073 if (object == null) |
| 1074 return className; | 1074 return className; |
| 1075 let typeInfo = object.$builtinTypeInfo; | 1075 let typeInfo = object.$builtinTypeInfo; |
| 1076 return `${className}${joinArguments(typeInfo, 0)}`; | 1076 return `${className}${joinArguments(typeInfo, 0)}`; |
| 1077 } | 1077 } |
| 1078 dart.fn(getRuntimeTypeString, core.String, [dart.dynamic]); | 1078 dart.fn(getRuntimeTypeString, core.String, [core.Object]); |
| 1079 function getRuntimeType(object) { | 1079 function getRuntimeType(object) { |
| 1080 let type = getRuntimeTypeString(object); | 1080 let type = getRuntimeTypeString(object); |
| 1081 return new TypeImpl(type); | 1081 return new TypeImpl(type); |
| 1082 } | 1082 } |
| 1083 dart.fn(getRuntimeType, core.Type, [dart.dynamic]); | 1083 dart.fn(getRuntimeType, core.Type, [core.Object]); |
| 1084 function substitute(substitution, arguments$) { | 1084 function substitute(substitution, arguments$) { |
| 1085 dart.assert(dart.notNull(substitution == null) || dart.notNull(isJsFunction(
substitution))); | 1085 dart.assert(dart.notNull(substitution == null) || dart.notNull(isJsFunction(
substitution))); |
| 1086 dart.assert(dart.notNull(arguments$ == null) || dart.notNull(isJsArray(argum
ents$))); | 1086 dart.assert(dart.notNull(arguments$ == null) || dart.notNull(isJsArray(argum
ents$))); |
| 1087 if (isJsFunction(substitution)) { | 1087 if (isJsFunction(substitution)) { |
| 1088 substitution = invoke(substitution, arguments$); | 1088 substitution = invoke(substitution, arguments$); |
| 1089 if (isJsArray(substitution)) { | 1089 if (isJsArray(substitution)) { |
| 1090 arguments$ = substitution; | 1090 arguments$ = substitution; |
| 1091 } else if (isJsFunction(substitution)) { | 1091 } else if (isJsFunction(substitution)) { |
| 1092 arguments$ = invoke(substitution, arguments$); | 1092 arguments$ = invoke(substitution, arguments$); |
| 1093 } | 1093 } |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1127 throw new TypeErrorImplementation(object, typeName); | 1127 throw new TypeErrorImplementation(object, typeName); |
| 1128 } | 1128 } |
| 1129 return object; | 1129 return object; |
| 1130 } | 1130 } |
| 1131 dart.fn(assertSubtype, core.Object, [core.Object, core.String, core.List, core
.String]); | 1131 dart.fn(assertSubtype, core.Object, [core.Object, core.String, core.List, core
.String]); |
| 1132 function assertIsSubtype(subtype, supertype, message) { | 1132 function assertIsSubtype(subtype, supertype, message) { |
| 1133 if (!dart.notNull(isSubtype(subtype, supertype))) { | 1133 if (!dart.notNull(isSubtype(subtype, supertype))) { |
| 1134 throwTypeError(message); | 1134 throwTypeError(message); |
| 1135 } | 1135 } |
| 1136 } | 1136 } |
| 1137 dart.fn(assertIsSubtype, dart.dynamic, [dart.dynamic, dart.dynamic, core.Strin
g]); | 1137 dart.fn(assertIsSubtype, core.Object, [core.Object, core.Object, core.String])
; |
| 1138 function throwTypeError(message) { | 1138 function throwTypeError(message) { |
| 1139 throw new TypeErrorImplementation.fromMessage(dart.as(message, core.String))
; | 1139 throw new TypeErrorImplementation.fromMessage(dart.as(message, core.String))
; |
| 1140 } | 1140 } |
| 1141 dart.fn(throwTypeError); | 1141 dart.fn(throwTypeError); |
| 1142 function checkArguments(substitution, arguments$, checks) { | 1142 function checkArguments(substitution, arguments$, checks) { |
| 1143 return areSubtypes(substitute(substitution, arguments$), checks); | 1143 return areSubtypes(substitute(substitution, arguments$), checks); |
| 1144 } | 1144 } |
| 1145 dart.fn(checkArguments, core.bool, [dart.dynamic, dart.dynamic, dart.dynamic])
; | 1145 dart.fn(checkArguments, core.bool, [core.Object, core.Object, core.Object]); |
| 1146 function areSubtypes(s, t) { | 1146 function areSubtypes(s, t) { |
| 1147 if (dart.notNull(s == null) || dart.notNull(t == null)) | 1147 if (dart.notNull(s == null) || dart.notNull(t == null)) |
| 1148 return true; | 1148 return true; |
| 1149 dart.assert(isJsArray(s)); | 1149 dart.assert(isJsArray(s)); |
| 1150 dart.assert(isJsArray(t)); | 1150 dart.assert(isJsArray(t)); |
| 1151 dart.assert(getLength(s) == getLength(t)); | 1151 dart.assert(getLength(s) == getLength(t)); |
| 1152 let len = getLength(s); | 1152 let len = getLength(s); |
| 1153 for (let i = 0; dart.notNull(i) < dart.notNull(len); i = dart.notNull(i) + 1
) { | 1153 for (let i = 0; dart.notNull(i) < dart.notNull(len); i = dart.notNull(i) + 1
) { |
| 1154 if (!dart.notNull(isSubtype(getIndex(s, i), getIndex(t, i)))) { | 1154 if (!dart.notNull(isSubtype(getIndex(s, i), getIndex(t, i)))) { |
| 1155 return false; | 1155 return false; |
| 1156 } | 1156 } |
| 1157 } | 1157 } |
| 1158 return true; | 1158 return true; |
| 1159 } | 1159 } |
| 1160 dart.fn(areSubtypes, core.bool, [dart.dynamic, dart.dynamic]); | 1160 dart.fn(areSubtypes, core.bool, [core.Object, core.Object]); |
| 1161 function computeSignature(signature, context, contextName) { | 1161 function computeSignature(signature, context, contextName) { |
| 1162 let typeArguments = getRuntimeTypeArguments(context, contextName); | 1162 let typeArguments = getRuntimeTypeArguments(context, contextName); |
| 1163 return invokeOn(signature, context, typeArguments); | 1163 return invokeOn(signature, context, typeArguments); |
| 1164 } | 1164 } |
| 1165 dart.fn(computeSignature); | 1165 dart.fn(computeSignature); |
| 1166 function isSupertypeOfNull(type) { | 1166 function isSupertypeOfNull(type) { |
| 1167 return dart.notNull(type == null) || getConstructorName(type) == _foreign_he
lper.JS_OBJECT_CLASS_NAME() || getConstructorName(type) == _foreign_helper.JS_NU
LL_CLASS_NAME(); | 1167 return dart.notNull(type == null) || getConstructorName(type) == _foreign_he
lper.JS_OBJECT_CLASS_NAME() || getConstructorName(type) == _foreign_helper.JS_NU
LL_CLASS_NAME(); |
| 1168 } | 1168 } |
| 1169 dart.fn(isSupertypeOfNull, core.bool, [dart.dynamic]); | 1169 dart.fn(isSupertypeOfNull, core.bool, [core.Object]); |
| 1170 function checkSubtypeOfRuntimeType(o, t) { | 1170 function checkSubtypeOfRuntimeType(o, t) { |
| 1171 if (o == null) | 1171 if (o == null) |
| 1172 return isSupertypeOfNull(t); | 1172 return isSupertypeOfNull(t); |
| 1173 if (t == null) | 1173 if (t == null) |
| 1174 return true; | 1174 return true; |
| 1175 let rti = getRuntimeTypeInfo(o); | 1175 let rti = getRuntimeTypeInfo(o); |
| 1176 o = _interceptors.getInterceptor(o); | 1176 o = _interceptors.getInterceptor(o); |
| 1177 let type = o.constructor; | 1177 let type = o.constructor; |
| 1178 if (rti != null) { | 1178 if (rti != null) { |
| 1179 rti = rti.slice(); | 1179 rti = rti.slice(); |
| 1180 rti.splice(0, 0, type); | 1180 rti.splice(0, 0, type); |
| 1181 type = rti; | 1181 type = rti; |
| 1182 } else if (hasField(t, `${_foreign_helper.JS_FUNCTION_TYPE_TAG()}`)) { | 1182 } else if (hasField(t, `${_foreign_helper.JS_FUNCTION_TYPE_TAG()}`)) { |
| 1183 let signatureName = `${_foreign_helper.JS_OPERATOR_IS_PREFIX()}_${getField
(t, _foreign_helper.JS_FUNCTION_TYPE_TAG())}`; | 1183 let signatureName = `${_foreign_helper.JS_OPERATOR_IS_PREFIX()}_${getField
(t, _foreign_helper.JS_FUNCTION_TYPE_TAG())}`; |
| 1184 if (hasField(o, signatureName)) | 1184 if (hasField(o, signatureName)) |
| 1185 return true; | 1185 return true; |
| 1186 let targetSignatureFunction = getField(o, `${_foreign_helper.JS_SIGNATURE_
NAME()}`); | 1186 let targetSignatureFunction = getField(o, `${_foreign_helper.JS_SIGNATURE_
NAME()}`); |
| 1187 if (targetSignatureFunction == null) | 1187 if (targetSignatureFunction == null) |
| 1188 return false; | 1188 return false; |
| 1189 type = invokeOn(targetSignatureFunction, o, null); | 1189 type = invokeOn(targetSignatureFunction, o, null); |
| 1190 return isFunctionSubtype(type, t); | 1190 return isFunctionSubtype(type, t); |
| 1191 } | 1191 } |
| 1192 return isSubtype(type, t); | 1192 return isSubtype(type, t); |
| 1193 } | 1193 } |
| 1194 dart.fn(checkSubtypeOfRuntimeType, core.bool, [dart.dynamic, dart.dynamic]); | 1194 dart.fn(checkSubtypeOfRuntimeType, core.bool, [core.Object, core.Object]); |
| 1195 function subtypeOfRuntimeTypeCast(object, type) { | 1195 function subtypeOfRuntimeTypeCast(object, type) { |
| 1196 if (dart.notNull(object != null) && !dart.notNull(checkSubtypeOfRuntimeType(
object, type))) { | 1196 if (dart.notNull(object != null) && !dart.notNull(checkSubtypeOfRuntimeType(
object, type))) { |
| 1197 let actualType = Primitives.objectTypeName(object); | 1197 let actualType = Primitives.objectTypeName(object); |
| 1198 throw new CastErrorImplementation(actualType, runtimeTypeToString(type)); | 1198 throw new CastErrorImplementation(actualType, runtimeTypeToString(type)); |
| 1199 } | 1199 } |
| 1200 return object; | 1200 return object; |
| 1201 } | 1201 } |
| 1202 dart.fn(subtypeOfRuntimeTypeCast, core.Object, [core.Object, dart.dynamic]); | 1202 dart.fn(subtypeOfRuntimeTypeCast, core.Object, [core.Object, core.Object]); |
| 1203 function assertSubtypeOfRuntimeType(object, type) { | 1203 function assertSubtypeOfRuntimeType(object, type) { |
| 1204 if (dart.notNull(object != null) && !dart.notNull(checkSubtypeOfRuntimeType(
object, type))) { | 1204 if (dart.notNull(object != null) && !dart.notNull(checkSubtypeOfRuntimeType(
object, type))) { |
| 1205 throw new TypeErrorImplementation(object, runtimeTypeToString(type)); | 1205 throw new TypeErrorImplementation(object, runtimeTypeToString(type)); |
| 1206 } | 1206 } |
| 1207 return object; | 1207 return object; |
| 1208 } | 1208 } |
| 1209 dart.fn(assertSubtypeOfRuntimeType, core.Object, [core.Object, dart.dynamic]); | 1209 dart.fn(assertSubtypeOfRuntimeType, core.Object, [core.Object, core.Object]); |
| 1210 function getArguments(type) { | 1210 function getArguments(type) { |
| 1211 return isJsArray(type) ? type.slice(1) : null; | 1211 return isJsArray(type) ? type.slice(1) : null; |
| 1212 } | 1212 } |
| 1213 dart.fn(getArguments); | 1213 dart.fn(getArguments); |
| 1214 function isSubtype(s, t) { | 1214 function isSubtype(s, t) { |
| 1215 if (isIdentical(s, t)) | 1215 if (isIdentical(s, t)) |
| 1216 return true; | 1216 return true; |
| 1217 if (dart.notNull(s == null) || dart.notNull(t == null)) | 1217 if (dart.notNull(s == null) || dart.notNull(t == null)) |
| 1218 return true; | 1218 return true; |
| 1219 if (hasField(t, `${_foreign_helper.JS_FUNCTION_TYPE_TAG()}`)) { | 1219 if (hasField(t, `${_foreign_helper.JS_FUNCTION_TYPE_TAG()}`)) { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1232 if (hasNoField(typeOfSPrototype, test)) | 1232 if (hasNoField(typeOfSPrototype, test)) |
| 1233 return false; | 1233 return false; |
| 1234 let field = `${_foreign_helper.JS_OPERATOR_AS_PREFIX()}${runtimeTypeToStri
ng(typeOfT)}`; | 1234 let field = `${_foreign_helper.JS_OPERATOR_AS_PREFIX()}${runtimeTypeToStri
ng(typeOfT)}`; |
| 1235 substitution = getField(typeOfSPrototype, field); | 1235 substitution = getField(typeOfSPrototype, field); |
| 1236 } | 1236 } |
| 1237 if (!dart.notNull(isJsArray(s)) && dart.notNull(substitution == null) || !da
rt.notNull(isJsArray(t))) { | 1237 if (!dart.notNull(isJsArray(s)) && dart.notNull(substitution == null) || !da
rt.notNull(isJsArray(t))) { |
| 1238 return true; | 1238 return true; |
| 1239 } | 1239 } |
| 1240 return checkArguments(substitution, getArguments(s), getArguments(t)); | 1240 return checkArguments(substitution, getArguments(s), getArguments(t)); |
| 1241 } | 1241 } |
| 1242 dart.fn(isSubtype, core.bool, [dart.dynamic, dart.dynamic]); | 1242 dart.fn(isSubtype, core.bool, [core.Object, core.Object]); |
| 1243 function isAssignable(s, t) { | 1243 function isAssignable(s, t) { |
| 1244 return dart.notNull(isSubtype(s, t)) || dart.notNull(isSubtype(t, s)); | 1244 return dart.notNull(isSubtype(s, t)) || dart.notNull(isSubtype(t, s)); |
| 1245 } | 1245 } |
| 1246 dart.fn(isAssignable, core.bool, [dart.dynamic, dart.dynamic]); | 1246 dart.fn(isAssignable, core.bool, [core.Object, core.Object]); |
| 1247 function areAssignable(s, t, allowShorter) { | 1247 function areAssignable(s, t, allowShorter) { |
| 1248 if (dart.notNull(t == null) && dart.notNull(s == null)) | 1248 if (dart.notNull(t == null) && dart.notNull(s == null)) |
| 1249 return true; | 1249 return true; |
| 1250 if (t == null) | 1250 if (t == null) |
| 1251 return allowShorter; | 1251 return allowShorter; |
| 1252 if (s == null) | 1252 if (s == null) |
| 1253 return false; | 1253 return false; |
| 1254 dart.assert(isJsArray(s)); | 1254 dart.assert(isJsArray(s)); |
| 1255 dart.assert(isJsArray(t)); | 1255 dart.assert(isJsArray(t)); |
| 1256 let sLength = getLength(s); | 1256 let sLength = getLength(s); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 1283 if (!Object.hasOwnProperty.call(s, name)) { | 1283 if (!Object.hasOwnProperty.call(s, name)) { |
| 1284 return false; | 1284 return false; |
| 1285 } | 1285 } |
| 1286 let tType = t[name]; | 1286 let tType = t[name]; |
| 1287 let sType = s[name]; | 1287 let sType = s[name]; |
| 1288 if (!dart.notNull(isAssignable(tType, sType))) | 1288 if (!dart.notNull(isAssignable(tType, sType))) |
| 1289 return false; | 1289 return false; |
| 1290 } | 1290 } |
| 1291 return true; | 1291 return true; |
| 1292 } | 1292 } |
| 1293 dart.fn(areAssignableMaps, core.bool, [dart.dynamic, dart.dynamic]); | 1293 dart.fn(areAssignableMaps, core.bool, [core.Object, core.Object]); |
| 1294 function isFunctionSubtype(s, t) { | 1294 function isFunctionSubtype(s, t) { |
| 1295 dart.assert(hasField(t, `${_foreign_helper.JS_FUNCTION_TYPE_TAG()}`)); | 1295 dart.assert(hasField(t, `${_foreign_helper.JS_FUNCTION_TYPE_TAG()}`)); |
| 1296 if (hasNoField(s, `${_foreign_helper.JS_FUNCTION_TYPE_TAG()}`)) | 1296 if (hasNoField(s, `${_foreign_helper.JS_FUNCTION_TYPE_TAG()}`)) |
| 1297 return false; | 1297 return false; |
| 1298 if (hasField(s, `${_foreign_helper.JS_FUNCTION_TYPE_VOID_RETURN_TAG()}`)) { | 1298 if (hasField(s, `${_foreign_helper.JS_FUNCTION_TYPE_VOID_RETURN_TAG()}`)) { |
| 1299 if (dart.notNull(dart.as(hasNoField(t, `${_foreign_helper.JS_FUNCTION_TYPE
_VOID_RETURN_TAG()}`), core.bool)) && dart.notNull(dart.as(hasField(t, `${_forei
gn_helper.JS_FUNCTION_TYPE_RETURN_TYPE_TAG()}`), core.bool))) { | 1299 if (dart.notNull(dart.as(hasNoField(t, `${_foreign_helper.JS_FUNCTION_TYPE
_VOID_RETURN_TAG()}`), core.bool)) && dart.notNull(dart.as(hasField(t, `${_forei
gn_helper.JS_FUNCTION_TYPE_RETURN_TYPE_TAG()}`), core.bool))) { |
| 1300 return false; | 1300 return false; |
| 1301 } | 1301 } |
| 1302 } else if (hasNoField(t, `${_foreign_helper.JS_FUNCTION_TYPE_VOID_RETURN_TAG
()}`)) { | 1302 } else if (hasNoField(t, `${_foreign_helper.JS_FUNCTION_TYPE_VOID_RETURN_TAG
()}`)) { |
| 1303 let sReturnType = getField(s, `${_foreign_helper.JS_FUNCTION_TYPE_RETURN_T
YPE_TAG()}`); | 1303 let sReturnType = getField(s, `${_foreign_helper.JS_FUNCTION_TYPE_RETURN_T
YPE_TAG()}`); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1343 for (; dart.notNull(tPos) < dart.notNull(tOptionalParametersLen); sPos = d
art.notNull(sPos) + 1, tPos = dart.notNull(tPos) + 1) { | 1343 for (; dart.notNull(tPos) < dart.notNull(tOptionalParametersLen); sPos = d
art.notNull(sPos) + 1, tPos = dart.notNull(tPos) + 1) { |
| 1344 if (!dart.notNull(isAssignable(getIndex(sOptionalParameterTypes, sPos),
getIndex(tOptionalParameterTypes, tPos)))) { | 1344 if (!dart.notNull(isAssignable(getIndex(sOptionalParameterTypes, sPos),
getIndex(tOptionalParameterTypes, tPos)))) { |
| 1345 return false; | 1345 return false; |
| 1346 } | 1346 } |
| 1347 } | 1347 } |
| 1348 } | 1348 } |
| 1349 let sNamedParameters = getField(s, `${_foreign_helper.JS_FUNCTION_TYPE_NAMED
_PARAMETERS_TAG()}`); | 1349 let sNamedParameters = getField(s, `${_foreign_helper.JS_FUNCTION_TYPE_NAMED
_PARAMETERS_TAG()}`); |
| 1350 let tNamedParameters = getField(t, `${_foreign_helper.JS_FUNCTION_TYPE_NAMED
_PARAMETERS_TAG()}`); | 1350 let tNamedParameters = getField(t, `${_foreign_helper.JS_FUNCTION_TYPE_NAMED
_PARAMETERS_TAG()}`); |
| 1351 return areAssignableMaps(sNamedParameters, tNamedParameters); | 1351 return areAssignableMaps(sNamedParameters, tNamedParameters); |
| 1352 } | 1352 } |
| 1353 dart.fn(isFunctionSubtype, core.bool, [dart.dynamic, dart.dynamic]); | 1353 dart.fn(isFunctionSubtype, core.bool, [core.Object, core.Object]); |
| 1354 function invoke(func, arguments$) { | 1354 function invoke(func, arguments$) { |
| 1355 return invokeOn(func, null, arguments$); | 1355 return invokeOn(func, null, arguments$); |
| 1356 } | 1356 } |
| 1357 dart.fn(invoke); | 1357 dart.fn(invoke); |
| 1358 function invokeOn(func, receiver, arguments$) { | 1358 function invokeOn(func, receiver, arguments$) { |
| 1359 dart.assert(isJsFunction(func)); | 1359 dart.assert(isJsFunction(func)); |
| 1360 dart.assert(dart.notNull(arguments$ == null) || dart.notNull(isJsArray(argum
ents$))); | 1360 dart.assert(dart.notNull(arguments$ == null) || dart.notNull(isJsArray(argum
ents$))); |
| 1361 return func.apply(receiver, arguments$); | 1361 return func.apply(receiver, arguments$); |
| 1362 } | 1362 } |
| 1363 dart.fn(invokeOn, core.Object, [dart.dynamic, dart.dynamic, dart.dynamic]); | 1363 dart.fn(invokeOn, core.Object, [core.Object, core.Object, core.Object]); |
| 1364 function call(object, name) { | 1364 function call(object, name) { |
| 1365 return object[name](); | 1365 return object[name](); |
| 1366 } | 1366 } |
| 1367 dart.fn(call, dart.dynamic, [dart.dynamic, core.String]); | 1367 dart.fn(call, core.Object, [core.Object, core.String]); |
| 1368 function getField(object, name) { | 1368 function getField(object, name) { |
| 1369 return object[name]; | 1369 return object[name]; |
| 1370 } | 1370 } |
| 1371 dart.fn(getField, dart.dynamic, [dart.dynamic, core.String]); | 1371 dart.fn(getField, core.Object, [core.Object, core.String]); |
| 1372 function getIndex(array, index) { | 1372 function getIndex(array, index) { |
| 1373 dart.assert(isJsArray(array)); | 1373 dart.assert(isJsArray(array)); |
| 1374 return array[index]; | 1374 return array[index]; |
| 1375 } | 1375 } |
| 1376 dart.fn(getIndex, dart.dynamic, [dart.dynamic, core.int]); | 1376 dart.fn(getIndex, core.Object, [core.Object, core.int]); |
| 1377 function getLength(array) { | 1377 function getLength(array) { |
| 1378 dart.assert(isJsArray(array)); | 1378 dart.assert(isJsArray(array)); |
| 1379 return array.length; | 1379 return array.length; |
| 1380 } | 1380 } |
| 1381 dart.fn(getLength, core.int, [dart.dynamic]); | 1381 dart.fn(getLength, core.int, [core.Object]); |
| 1382 function isJsArray(value) { | 1382 function isJsArray(value) { |
| 1383 return dart.is(value, _interceptors.JSArray); | 1383 return dart.is(value, _interceptors.JSArray); |
| 1384 } | 1384 } |
| 1385 dart.fn(isJsArray, core.bool, [dart.dynamic]); | 1385 dart.fn(isJsArray, core.bool, [core.Object]); |
| 1386 function hasField(object, name) { | 1386 function hasField(object, name) { |
| 1387 return name in object; | 1387 return name in object; |
| 1388 } | 1388 } |
| 1389 dart.fn(hasField); | 1389 dart.fn(hasField); |
| 1390 function hasNoField(object, name) { | 1390 function hasNoField(object, name) { |
| 1391 return dart.dsend(hasField(object, name), '!'); | 1391 return dart.dsend(hasField(object, name), '!'); |
| 1392 } | 1392 } |
| 1393 dart.fn(hasNoField); | 1393 dart.fn(hasNoField); |
| 1394 function isJsFunction(o) { | 1394 function isJsFunction(o) { |
| 1395 return typeof o == "function"; | 1395 return typeof o == "function"; |
| 1396 } | 1396 } |
| 1397 dart.fn(isJsFunction, core.bool, [dart.dynamic]); | 1397 dart.fn(isJsFunction, core.bool, [core.Object]); |
| 1398 function isJsObject(o) { | 1398 function isJsObject(o) { |
| 1399 return typeof o == 'object'; | 1399 return typeof o == 'object'; |
| 1400 } | 1400 } |
| 1401 dart.fn(isJsObject, core.bool, [dart.dynamic]); | 1401 dart.fn(isJsObject, core.bool, [core.Object]); |
| 1402 function isIdentical(s, t) { | 1402 function isIdentical(s, t) { |
| 1403 return s === t; | 1403 return s === t; |
| 1404 } | 1404 } |
| 1405 dart.fn(isIdentical, core.bool, [dart.dynamic, dart.dynamic]); | 1405 dart.fn(isIdentical, core.bool, [core.Object, core.Object]); |
| 1406 function isNotIdentical(s, t) { | 1406 function isNotIdentical(s, t) { |
| 1407 return s !== t; | 1407 return s !== t; |
| 1408 } | 1408 } |
| 1409 dart.fn(isNotIdentical, core.bool, [dart.dynamic, dart.dynamic]); | 1409 dart.fn(isNotIdentical, core.bool, [core.Object, core.Object]); |
| 1410 function unmangleGlobalNameIfPreservedAnyways(str) { | 1410 function unmangleGlobalNameIfPreservedAnyways(str) { |
| 1411 return str; | 1411 return str; |
| 1412 } | 1412 } |
| 1413 dart.fn(unmangleGlobalNameIfPreservedAnyways, core.String, [core.String]); | 1413 dart.fn(unmangleGlobalNameIfPreservedAnyways, core.String, [core.String]); |
| 1414 function unmangleAllIdentifiersIfPreservedAnyways(str) { | 1414 function unmangleAllIdentifiersIfPreservedAnyways(str) { |
| 1415 return str; | 1415 return str; |
| 1416 } | 1416 } |
| 1417 dart.fn(unmangleAllIdentifiersIfPreservedAnyways, core.String, [core.String]); | 1417 dart.fn(unmangleAllIdentifiersIfPreservedAnyways, core.String, [core.String]); |
| 1418 class _Patch extends core.Object { | 1418 class _Patch extends core.Object { |
| 1419 _Patch() { | 1419 _Patch() { |
| 1420 } | 1420 } |
| 1421 } | 1421 } |
| 1422 let patch = dart.const(new _Patch()); | 1422 let patch = dart.const(new _Patch()); |
| 1423 class InternalMap extends core.Object {} | 1423 class InternalMap extends core.Object {} |
| 1424 function requiresPreamble() { | 1424 function requiresPreamble() { |
| 1425 } | 1425 } |
| 1426 dart.fn(requiresPreamble); | 1426 dart.fn(requiresPreamble); |
| 1427 function isJsIndexable(object, record) { | 1427 function isJsIndexable(object, record) { |
| 1428 if (record != null) { | 1428 if (record != null) { |
| 1429 let result = _interceptors.dispatchRecordIndexability(record); | 1429 let result = _interceptors.dispatchRecordIndexability(record); |
| 1430 if (result != null) | 1430 if (result != null) |
| 1431 return dart.as(result, core.bool); | 1431 return dart.as(result, core.bool); |
| 1432 } | 1432 } |
| 1433 return dart.is(object, exports.JavaScriptIndexingBehavior); | 1433 return dart.is(object, exports.JavaScriptIndexingBehavior); |
| 1434 } | 1434 } |
| 1435 dart.fn(isJsIndexable, core.bool, [dart.dynamic, dart.dynamic]); | 1435 dart.fn(isJsIndexable, core.bool, [core.Object, core.Object]); |
| 1436 function S(value) { | 1436 function S(value) { |
| 1437 if (typeof value == 'string') | 1437 if (typeof value == 'string') |
| 1438 return dart.as(value, core.String); | 1438 return dart.as(value, core.String); |
| 1439 if (dart.is(value, core.num)) { | 1439 if (dart.is(value, core.num)) { |
| 1440 if (!dart.equals(value, 0)) { | 1440 if (!dart.equals(value, 0)) { |
| 1441 return "" + value; | 1441 return "" + value; |
| 1442 } | 1442 } |
| 1443 } else if (dart.equals(true, value)) { | 1443 } else if (dart.equals(true, value)) { |
| 1444 return 'true'; | 1444 return 'true'; |
| 1445 } else if (dart.equals(false, value)) { | 1445 } else if (dart.equals(false, value)) { |
| 1446 return 'false'; | 1446 return 'false'; |
| 1447 } else if (value == null) { | 1447 } else if (value == null) { |
| 1448 return 'null'; | 1448 return 'null'; |
| 1449 } | 1449 } |
| 1450 let res = dart.toString(value); | 1450 let res = dart.toString(value); |
| 1451 if (!(typeof res == 'string')) | 1451 if (!(typeof res == 'string')) |
| 1452 throw new core.ArgumentError(value); | 1452 throw new core.ArgumentError(value); |
| 1453 return res; | 1453 return res; |
| 1454 } | 1454 } |
| 1455 dart.fn(S, core.String, [dart.dynamic]); | 1455 dart.fn(S, core.String, [core.Object]); |
| 1456 function createInvocationMirror(name, internalName, kind, arguments$, argument
Names) { | 1456 function createInvocationMirror(name, internalName, kind, arguments$, argument
Names) { |
| 1457 return new JSInvocationMirror(name, dart.as(internalName, core.String), dart
.as(kind, core.int), dart.as(arguments$, core.List), dart.as(argumentNames, core
.List)); | 1457 return new JSInvocationMirror(name, dart.as(internalName, core.String), dart
.as(kind, core.int), dart.as(arguments$, core.List), dart.as(argumentNames, core
.List)); |
| 1458 } | 1458 } |
| 1459 dart.fn(createInvocationMirror, dart.dynamic, [core.String, dart.dynamic, dart
.dynamic, dart.dynamic, dart.dynamic]); | 1459 dart.fn(createInvocationMirror, core.Object, [core.String, core.Object, core.O
bject, core.Object, core.Object]); |
| 1460 function createUnmangledInvocationMirror(symbol, internalName, kind, arguments
$, argumentNames) { | 1460 function createUnmangledInvocationMirror(symbol, internalName, kind, arguments
$, argumentNames) { |
| 1461 return new JSInvocationMirror(symbol, dart.as(internalName, core.String), da
rt.as(kind, core.int), dart.as(arguments$, core.List), dart.as(argumentNames, co
re.List)); | 1461 return new JSInvocationMirror(symbol, dart.as(internalName, core.String), da
rt.as(kind, core.int), dart.as(arguments$, core.List), dart.as(argumentNames, co
re.List)); |
| 1462 } | 1462 } |
| 1463 dart.fn(createUnmangledInvocationMirror, dart.dynamic, [core.Symbol, dart.dyna
mic, dart.dynamic, dart.dynamic, dart.dynamic]); | 1463 dart.fn(createUnmangledInvocationMirror, core.Object, [core.Symbol, core.Objec
t, core.Object, core.Object, core.Object]); |
| 1464 function throwInvalidReflectionError(memberName) { | 1464 function throwInvalidReflectionError(memberName) { |
| 1465 throw new core.UnsupportedError(`Can't use '${memberName}' in reflection ` +
"because it is not included in a @MirrorsUsed annotation."); | 1465 throw new core.UnsupportedError(`Can't use '${memberName}' in reflection ` +
"because it is not included in a @MirrorsUsed annotation."); |
| 1466 } | 1466 } |
| 1467 dart.fn(throwInvalidReflectionError, dart.void, [core.String]); | 1467 dart.fn(throwInvalidReflectionError, dart.void, [core.String]); |
| 1468 function traceHelper(method) { | 1468 function traceHelper(method) { |
| 1469 if (!this.cache) { | 1469 if (!this.cache) { |
| 1470 this.cache = Object.create(null); | 1470 this.cache = Object.create(null); |
| 1471 } | 1471 } |
| 1472 if (!this.cache[method]) { | 1472 if (!this.cache[method]) { |
| 1473 console.log(method); | 1473 console.log(method); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1530 } | 1530 } |
| 1531 return dart.as(makeLiteralListConst(list), core.List); | 1531 return dart.as(makeLiteralListConst(list), core.List); |
| 1532 } | 1532 } |
| 1533 get namedArguments() { | 1533 get namedArguments() { |
| 1534 if (this.isAccessor) | 1534 if (this.isAccessor) |
| 1535 return dart.map(); | 1535 return dart.map(); |
| 1536 let namedArgumentCount = this[_namedArgumentNames][core.$length]; | 1536 let namedArgumentCount = this[_namedArgumentNames][core.$length]; |
| 1537 let namedArgumentsStartIndex = dart.notNull(this[_arguments][core.$length]
) - dart.notNull(namedArgumentCount); | 1537 let namedArgumentsStartIndex = dart.notNull(this[_arguments][core.$length]
) - dart.notNull(namedArgumentCount); |
| 1538 if (namedArgumentCount == 0) | 1538 if (namedArgumentCount == 0) |
| 1539 return dart.map(); | 1539 return dart.map(); |
| 1540 let map = new (core.Map$(core.Symbol, dart.dynamic))(); | 1540 let map = new (core.Map$(core.Symbol, core.Object))(); |
| 1541 for (let i = 0; dart.notNull(i) < dart.notNull(namedArgumentCount); i = da
rt.notNull(i) + 1) { | 1541 for (let i = 0; dart.notNull(i) < dart.notNull(namedArgumentCount); i = da
rt.notNull(i) + 1) { |
| 1542 map.set(new _internal.Symbol.unvalidated(dart.as(this[_namedArgumentName
s][core.$get](i), core.String)), this[_arguments][core.$get](dart.notNull(namedA
rgumentsStartIndex) + dart.notNull(i))); | 1542 map.set(new _internal.Symbol.unvalidated(dart.as(this[_namedArgumentName
s][core.$get](i), core.String)), this[_arguments][core.$get](dart.notNull(namedA
rgumentsStartIndex) + dart.notNull(i))); |
| 1543 } | 1543 } |
| 1544 return map; | 1544 return map; |
| 1545 } | 1545 } |
| 1546 [_getCachedInvocation](object) { | 1546 [_getCachedInvocation](object) { |
| 1547 let interceptor = _interceptors.getInterceptor(object); | 1547 let interceptor = _interceptors.getInterceptor(object); |
| 1548 let receiver = object; | 1548 let receiver = object; |
| 1549 let name = this[_internalName]; | 1549 let name = this[_internalName]; |
| 1550 let arguments$ = this[_arguments]; | 1550 let arguments$ = this[_arguments]; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1592 } else { | 1592 } else { |
| 1593 return dart.dsend(cached, 'invokeOn', victim, invocation[_arguments]); | 1593 return dart.dsend(cached, 'invokeOn', victim, invocation[_arguments]); |
| 1594 } | 1594 } |
| 1595 } | 1595 } |
| 1596 static getCachedInvocation(invocation, victim) { | 1596 static getCachedInvocation(invocation, victim) { |
| 1597 return invocation[_getCachedInvocation](victim); | 1597 return invocation[_getCachedInvocation](victim); |
| 1598 } | 1598 } |
| 1599 } | 1599 } |
| 1600 JSInvocationMirror[dart.implements] = () => [core.Invocation]; | 1600 JSInvocationMirror[dart.implements] = () => [core.Invocation]; |
| 1601 dart.setSignature(JSInvocationMirror, { | 1601 dart.setSignature(JSInvocationMirror, { |
| 1602 methods: () => ({[_getCachedInvocation]: [dart.dynamic, [core.Object]]}), | 1602 methods: () => ({[_getCachedInvocation]: [core.Object, [core.Object]]}), |
| 1603 statics: () => ({ | 1603 statics: () => ({ |
| 1604 invokeFromMirror: [dart.dynamic, [JSInvocationMirror, core.Object]], | 1604 invokeFromMirror: [core.Object, [JSInvocationMirror, core.Object]], |
| 1605 getCachedInvocation: [dart.dynamic, [JSInvocationMirror, core.Object]] | 1605 getCachedInvocation: [core.Object, [JSInvocationMirror, core.Object]] |
| 1606 }), | 1606 }), |
| 1607 names: ['invokeFromMirror', 'getCachedInvocation'] | 1607 names: ['invokeFromMirror', 'getCachedInvocation'] |
| 1608 }); | 1608 }); |
| 1609 JSInvocationMirror.METHOD = 0; | 1609 JSInvocationMirror.METHOD = 0; |
| 1610 JSInvocationMirror.GETTER = 1; | 1610 JSInvocationMirror.GETTER = 1; |
| 1611 JSInvocationMirror.SETTER = 2; | 1611 JSInvocationMirror.SETTER = 2; |
| 1612 class CachedInvocation extends core.Object { | 1612 class CachedInvocation extends core.Object { |
| 1613 CachedInvocation(mangledName, jsFunction, isIntercepted, cachedInterceptor)
{ | 1613 CachedInvocation(mangledName, jsFunction, isIntercepted, cachedInterceptor)
{ |
| 1614 this.mangledName = mangledName; | 1614 this.mangledName = mangledName; |
| 1615 this.jsFunction = jsFunction; | 1615 this.jsFunction = jsFunction; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1631 let _ = [victim]; | 1631 let _ = [victim]; |
| 1632 _[core.$addAll](arguments$); | 1632 _[core.$addAll](arguments$); |
| 1633 arguments$ = _; | 1633 arguments$ = _; |
| 1634 if (this.cachedInterceptor != null) | 1634 if (this.cachedInterceptor != null) |
| 1635 receiver = this.cachedInterceptor; | 1635 receiver = this.cachedInterceptor; |
| 1636 } | 1636 } |
| 1637 return this.jsFunction.apply(receiver, arguments$); | 1637 return this.jsFunction.apply(receiver, arguments$); |
| 1638 } | 1638 } |
| 1639 } | 1639 } |
| 1640 dart.setSignature(CachedInvocation, { | 1640 dart.setSignature(CachedInvocation, { |
| 1641 methods: () => ({invokeOn: [dart.dynamic, [core.Object, core.List]]}) | 1641 methods: () => ({invokeOn: [core.Object, [core.Object, core.List]]}) |
| 1642 }); | 1642 }); |
| 1643 class CachedCatchAllInvocation extends CachedInvocation { | 1643 class CachedCatchAllInvocation extends CachedInvocation { |
| 1644 CachedCatchAllInvocation(name, jsFunction, isIntercepted, cachedInterceptor)
{ | 1644 CachedCatchAllInvocation(name, jsFunction, isIntercepted, cachedInterceptor)
{ |
| 1645 this.info = new ReflectionInfo(jsFunction); | 1645 this.info = new ReflectionInfo(jsFunction); |
| 1646 super.CachedInvocation(name, jsFunction, isIntercepted, cachedInterceptor)
; | 1646 super.CachedInvocation(name, jsFunction, isIntercepted, cachedInterceptor)
; |
| 1647 } | 1647 } |
| 1648 get isGetterStub() { | 1648 get isGetterStub() { |
| 1649 return false; | 1649 return false; |
| 1650 } | 1650 } |
| 1651 invokeOn(victim, arguments$) { | 1651 invokeOn(victim, arguments$) { |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1692 } | 1692 } |
| 1693 get isGetterStub() { | 1693 get isGetterStub() { |
| 1694 return false; | 1694 return false; |
| 1695 } | 1695 } |
| 1696 invokeOn(victim, invocation) { | 1696 invokeOn(victim, invocation) { |
| 1697 let receiver = this.interceptor == null ? victim : this.interceptor; | 1697 let receiver = this.interceptor == null ? victim : this.interceptor; |
| 1698 return dart.dsend(receiver, 'noSuchMethod', invocation); | 1698 return dart.dsend(receiver, 'noSuchMethod', invocation); |
| 1699 } | 1699 } |
| 1700 } | 1700 } |
| 1701 dart.setSignature(CachedNoSuchMethodInvocation, { | 1701 dart.setSignature(CachedNoSuchMethodInvocation, { |
| 1702 methods: () => ({invokeOn: [dart.dynamic, [core.Object, core.Invocation]]}) | 1702 methods: () => ({invokeOn: [core.Object, [core.Object, core.Invocation]]}) |
| 1703 }); | 1703 }); |
| 1704 class ReflectionInfo extends core.Object { | 1704 class ReflectionInfo extends core.Object { |
| 1705 internal(jsFunction, data, isAccessor, requiredParameterCount, optionalParam
eterCount, areOptionalParametersNamed, functionType) { | 1705 internal(jsFunction, data, isAccessor, requiredParameterCount, optionalParam
eterCount, areOptionalParametersNamed, functionType) { |
| 1706 this.jsFunction = jsFunction; | 1706 this.jsFunction = jsFunction; |
| 1707 this.data = data; | 1707 this.data = data; |
| 1708 this.isAccessor = isAccessor; | 1708 this.isAccessor = isAccessor; |
| 1709 this.requiredParameterCount = requiredParameterCount; | 1709 this.requiredParameterCount = requiredParameterCount; |
| 1710 this.optionalParameterCount = optionalParameterCount; | 1710 this.optionalParameterCount = optionalParameterCount; |
| 1711 this.areOptionalParametersNamed = areOptionalParametersNamed; | 1711 this.areOptionalParametersNamed = areOptionalParametersNamed; |
| 1712 this.functionType = functionType; | 1712 this.functionType = functionType; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1778 (() => { | 1778 (() => { |
| 1779 let _ = positions.keys[core.$toList](); | 1779 let _ = positions.keys[core.$toList](); |
| 1780 _[core.$sort](); | 1780 _[core.$sort](); |
| 1781 return _; | 1781 return _; |
| 1782 })()[core.$forEach](dart.fn((name => { | 1782 })()[core.$forEach](dart.fn((name => { |
| 1783 this.cachedSortedIndices[core.$set]((() => { | 1783 this.cachedSortedIndices[core.$set]((() => { |
| 1784 let x = index; | 1784 let x = index; |
| 1785 index = dart.notNull(x) + 1; | 1785 index = dart.notNull(x) + 1; |
| 1786 return x; | 1786 return x; |
| 1787 })(), positions.get(name)); | 1787 })(), positions.get(name)); |
| 1788 }).bind(this), dart.dynamic, [core.String])); | 1788 }).bind(this), core.Object, [core.String])); |
| 1789 } | 1789 } |
| 1790 return dart.as(this.cachedSortedIndices[core.$get](unsortedIndex), core.in
t); | 1790 return dart.as(this.cachedSortedIndices[core.$get](unsortedIndex), core.in
t); |
| 1791 } | 1791 } |
| 1792 computeFunctionRti(jsConstructor) { | 1792 computeFunctionRti(jsConstructor) { |
| 1793 if (typeof this.functionType == "number") { | 1793 if (typeof this.functionType == "number") { |
| 1794 return getMetadata(dart.as(this.functionType, core.int)); | 1794 return getMetadata(dart.as(this.functionType, core.int)); |
| 1795 } else if (typeof this.functionType == "function") { | 1795 } else if (typeof this.functionType == "function") { |
| 1796 let fakeInstance = new jsConstructor(); | 1796 let fakeInstance = new jsConstructor(); |
| 1797 setRuntimeTypeInfo(fakeInstance, fakeInstance["<>"]); | 1797 setRuntimeTypeInfo(fakeInstance, fakeInstance["<>"]); |
| 1798 return this.functionType.apply({$receiver: fakeInstance}); | 1798 return this.functionType.apply({$receiver: fakeInstance}); |
| 1799 } else { | 1799 } else { |
| 1800 throw new RuntimeError('Unexpected function type'); | 1800 throw new RuntimeError('Unexpected function type'); |
| 1801 } | 1801 } |
| 1802 } | 1802 } |
| 1803 get reflectionName() { | 1803 get reflectionName() { |
| 1804 return this.jsFunction.$reflectionName; | 1804 return this.jsFunction.$reflectionName; |
| 1805 } | 1805 } |
| 1806 } | 1806 } |
| 1807 dart.defineNamedConstructor(ReflectionInfo, 'internal'); | 1807 dart.defineNamedConstructor(ReflectionInfo, 'internal'); |
| 1808 dart.setSignature(ReflectionInfo, { | 1808 dart.setSignature(ReflectionInfo, { |
| 1809 methods: () => ({ | 1809 methods: () => ({ |
| 1810 parameterName: [core.String, [core.int]], | 1810 parameterName: [core.String, [core.int]], |
| 1811 parameterMetadataAnnotations: [core.List$(core.int), [core.int]], | 1811 parameterMetadataAnnotations: [core.List$(core.int), [core.int]], |
| 1812 defaultValue: [core.int, [core.int]], | 1812 defaultValue: [core.int, [core.int]], |
| 1813 defaultValueInOrder: [core.int, [core.int]], | 1813 defaultValueInOrder: [core.int, [core.int]], |
| 1814 parameterNameInOrder: [core.String, [core.int]], | 1814 parameterNameInOrder: [core.String, [core.int]], |
| 1815 sortedIndex: [core.int, [core.int]], | 1815 sortedIndex: [core.int, [core.int]], |
| 1816 computeFunctionRti: [dart.dynamic, [dart.dynamic]] | 1816 computeFunctionRti: [core.Object, [core.Object]] |
| 1817 }) | 1817 }) |
| 1818 }); | 1818 }); |
| 1819 ReflectionInfo.REQUIRED_PARAMETERS_INFO = 0; | 1819 ReflectionInfo.REQUIRED_PARAMETERS_INFO = 0; |
| 1820 ReflectionInfo.OPTIONAL_PARAMETERS_INFO = 1; | 1820 ReflectionInfo.OPTIONAL_PARAMETERS_INFO = 1; |
| 1821 ReflectionInfo.FUNCTION_TYPE_INDEX = 2; | 1821 ReflectionInfo.FUNCTION_TYPE_INDEX = 2; |
| 1822 ReflectionInfo.FIRST_DEFAULT_ARGUMENT = 3; | 1822 ReflectionInfo.FIRST_DEFAULT_ARGUMENT = 3; |
| 1823 function getMetadata(index) { | 1823 function getMetadata(index) { |
| 1824 let metadata = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_names.MET
ADATA); | 1824 let metadata = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_names.MET
ADATA); |
| 1825 return metadata[index]; | 1825 return metadata[index]; |
| 1826 } | 1826 } |
| 1827 dart.fn(getMetadata, dart.dynamic, [core.int]); | 1827 dart.fn(getMetadata, core.Object, [core.int]); |
| 1828 class Primitives extends core.Object { | 1828 class Primitives extends core.Object { |
| 1829 static initializeStatics(id) { | 1829 static initializeStatics(id) { |
| 1830 Primitives.mirrorFunctionCacheName = dart.notNull(Primitives.mirrorFunctio
nCacheName) + `_${id}`; | 1830 Primitives.mirrorFunctionCacheName = dart.notNull(Primitives.mirrorFunctio
nCacheName) + `_${id}`; |
| 1831 Primitives.mirrorInvokeCacheName = dart.notNull(Primitives.mirrorInvokeCac
heName) + `_${id}`; | 1831 Primitives.mirrorInvokeCacheName = dart.notNull(Primitives.mirrorInvokeCac
heName) + `_${id}`; |
| 1832 } | 1832 } |
| 1833 static objectHashCode(object) { | 1833 static objectHashCode(object) { |
| 1834 let hash = dart.as(object.$identityHash, core.int); | 1834 let hash = dart.as(object.$identityHash, core.int); |
| 1835 if (hash == null) { | 1835 if (hash == null) { |
| 1836 hash = Math.random() * 0x3fffffff | 0; | 1836 hash = Math.random() * 0x3fffffff | 0; |
| 1837 object.$identityHash = hash; | 1837 object.$identityHash = hash; |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2130 argumentCount = dart.notNull(argumentCount) + dart.notNull(positionalArg
uments[core.$length]); | 2130 argumentCount = dart.notNull(argumentCount) + dart.notNull(positionalArg
uments[core.$length]); |
| 2131 arguments$[core.$addAll](positionalArguments); | 2131 arguments$[core.$addAll](positionalArguments); |
| 2132 } | 2132 } |
| 2133 let names = ''; | 2133 let names = ''; |
| 2134 if (dart.notNull(namedArguments != null) && !dart.notNull(namedArguments.i
sEmpty)) { | 2134 if (dart.notNull(namedArguments != null) && !dart.notNull(namedArguments.i
sEmpty)) { |
| 2135 namedArguments.forEach(dart.fn((name, argument) => { | 2135 namedArguments.forEach(dart.fn((name, argument) => { |
| 2136 names = `${names}$${name}`; | 2136 names = `${names}$${name}`; |
| 2137 namedArgumentList[core.$add](name); | 2137 namedArgumentList[core.$add](name); |
| 2138 arguments$[core.$add](argument); | 2138 arguments$[core.$add](argument); |
| 2139 argumentCount = dart.notNull(argumentCount) + 1; | 2139 argumentCount = dart.notNull(argumentCount) + 1; |
| 2140 }, dart.dynamic, [core.String, dart.dynamic])); | 2140 }, core.Object, [core.String, core.Object])); |
| 2141 } | 2141 } |
| 2142 let selectorName = `${_foreign_helper.JS_GET_NAME("CALL_PREFIX")}$${argume
ntCount}${names}`; | 2142 let selectorName = `${_foreign_helper.JS_GET_NAME("CALL_PREFIX")}$${argume
ntCount}${names}`; |
| 2143 return dart.dsend(func, 'noSuchMethod', createUnmangledInvocationMirror(da
rt.const(new core.Symbol('call')), selectorName, JSInvocationMirror.METHOD, argu
ments$, namedArgumentList)); | 2143 return dart.dsend(func, 'noSuchMethod', createUnmangledInvocationMirror(da
rt.const(new core.Symbol('call')), selectorName, JSInvocationMirror.METHOD, argu
ments$, namedArgumentList)); |
| 2144 } | 2144 } |
| 2145 static applyFunction(func, positionalArguments, namedArguments) { | 2145 static applyFunction(func, positionalArguments, namedArguments) { |
| 2146 return namedArguments == null ? Primitives.applyFunctionWithPositionalArgu
ments(func, positionalArguments) : Primitives.applyFunctionWithNamedArguments(fu
nc, positionalArguments, namedArguments); | 2146 return namedArguments == null ? Primitives.applyFunctionWithPositionalArgu
ments(func, positionalArguments) : Primitives.applyFunctionWithNamedArguments(fu
nc, positionalArguments, namedArguments); |
| 2147 } | 2147 } |
| 2148 static applyFunctionWithPositionalArguments(func, positionalArguments) { | 2148 static applyFunctionWithPositionalArguments(func, positionalArguments) { |
| 2149 let argumentCount = 0; | 2149 let argumentCount = 0; |
| 2150 let arguments$ = null; | 2150 let arguments$ = null; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2194 let defaultValue = getMetadata(value); | 2194 let defaultValue = getMetadata(value); |
| 2195 defaultArguments.set(parameterName, defaultValue); | 2195 defaultArguments.set(parameterName, defaultValue); |
| 2196 } | 2196 } |
| 2197 let bad = false; | 2197 let bad = false; |
| 2198 namedArguments.forEach(dart.fn((parameter, value) => { | 2198 namedArguments.forEach(dart.fn((parameter, value) => { |
| 2199 if (defaultArguments.containsKey(parameter)) { | 2199 if (defaultArguments.containsKey(parameter)) { |
| 2200 defaultArguments.set(parameter, value); | 2200 defaultArguments.set(parameter, value); |
| 2201 } else { | 2201 } else { |
| 2202 bad = true; | 2202 bad = true; |
| 2203 } | 2203 } |
| 2204 }, dart.dynamic, [core.String, dart.dynamic])); | 2204 }, core.Object, [core.String, core.Object])); |
| 2205 if (bad) { | 2205 if (bad) { |
| 2206 return Primitives.functionNoSuchMethod(func, positionalArguments, namedA
rguments); | 2206 return Primitives.functionNoSuchMethod(func, positionalArguments, namedA
rguments); |
| 2207 } | 2207 } |
| 2208 positionalArguments[core.$addAll](defaultArguments.values); | 2208 positionalArguments[core.$addAll](defaultArguments.values); |
| 2209 return jsFunction.apply(func, positionalArguments); | 2209 return jsFunction.apply(func, positionalArguments); |
| 2210 } | 2210 } |
| 2211 static _mangledNameMatchesType(mangledName, type) { | 2211 static _mangledNameMatchesType(mangledName, type) { |
| 2212 return mangledName == type[_typeName]; | 2212 return mangledName == type[_typeName]; |
| 2213 } | 2213 } |
| 2214 static identicalImplementation(a, b) { | 2214 static identicalImplementation(a, b) { |
| 2215 return a == null ? b == null : a === b; | 2215 return a == null ? b == null : a === b; |
| 2216 } | 2216 } |
| 2217 static extractStackTrace(error) { | 2217 static extractStackTrace(error) { |
| 2218 return getTraceFromException(error.$thrownJsError); | 2218 return getTraceFromException(error.$thrownJsError); |
| 2219 } | 2219 } |
| 2220 } | 2220 } |
| 2221 dart.setSignature(Primitives, { | 2221 dart.setSignature(Primitives, { |
| 2222 statics: () => ({ | 2222 statics: () => ({ |
| 2223 initializeStatics: [dart.void, [core.int]], | 2223 initializeStatics: [dart.void, [core.int]], |
| 2224 objectHashCode: [core.int, [dart.dynamic]], | 2224 objectHashCode: [core.int, [core.Object]], |
| 2225 _throwFormatException: [dart.dynamic, [core.String]], | 2225 _throwFormatException: [core.Object, [core.String]], |
| 2226 parseInt: [core.int, [core.String, core.int, dart.functionType(core.int, [
core.String])]], | 2226 parseInt: [core.int, [core.String, core.int, dart.functionType(core.int, [
core.String])]], |
| 2227 parseDouble: [core.double, [core.String, dart.functionType(core.double, [c
ore.String])]], | 2227 parseDouble: [core.double, [core.String, dart.functionType(core.double, [c
ore.String])]], |
| 2228 formatType: [core.String, [core.String, core.List]], | 2228 formatType: [core.String, [core.String, core.List]], |
| 2229 objectTypeName: [core.String, [core.Object]], | 2229 objectTypeName: [core.String, [core.Object]], |
| 2230 objectToString: [core.String, [core.Object]], | 2230 objectToString: [core.String, [core.Object]], |
| 2231 dateNow: [core.num, []], | 2231 dateNow: [core.num, []], |
| 2232 initTicker: [dart.void, []], | 2232 initTicker: [dart.void, []], |
| 2233 currentUri: [core.String, []], | 2233 currentUri: [core.String, []], |
| 2234 _fromCharCodeApply: [core.String, [core.List$(core.int)]], | 2234 _fromCharCodeApply: [core.String, [core.List$(core.int)]], |
| 2235 stringFromCodePoints: [core.String, [dart.dynamic]], | 2235 stringFromCodePoints: [core.String, [core.Object]], |
| 2236 stringFromCharCodes: [core.String, [dart.dynamic]], | 2236 stringFromCharCodes: [core.String, [core.Object]], |
| 2237 stringFromCharCode: [core.String, [dart.dynamic]], | 2237 stringFromCharCode: [core.String, [core.Object]], |
| 2238 stringConcatUnchecked: [core.String, [core.String, core.String]], | 2238 stringConcatUnchecked: [core.String, [core.String, core.String]], |
| 2239 flattenString: [core.String, [core.String]], | 2239 flattenString: [core.String, [core.String]], |
| 2240 getTimeZoneName: [core.String, [dart.dynamic]], | 2240 getTimeZoneName: [core.String, [core.Object]], |
| 2241 getTimeZoneOffsetInMinutes: [core.int, [dart.dynamic]], | 2241 getTimeZoneOffsetInMinutes: [core.int, [core.Object]], |
| 2242 valueFromDecomposedDate: [dart.dynamic, [dart.dynamic, dart.dynamic, dart.
dynamic, dart.dynamic, dart.dynamic, dart.dynamic, dart.dynamic, dart.dynamic]], | 2242 valueFromDecomposedDate: [core.Object, [core.Object, core.Object, core.Obj
ect, core.Object, core.Object, core.Object, core.Object, core.Object]], |
| 2243 patchUpY2K: [dart.dynamic, [dart.dynamic, dart.dynamic, dart.dynamic]], | 2243 patchUpY2K: [core.Object, [core.Object, core.Object, core.Object]], |
| 2244 lazyAsJsDate: [dart.dynamic, [dart.dynamic]], | 2244 lazyAsJsDate: [core.Object, [core.Object]], |
| 2245 getYear: [dart.dynamic, [dart.dynamic]], | 2245 getYear: [core.Object, [core.Object]], |
| 2246 getMonth: [dart.dynamic, [dart.dynamic]], | 2246 getMonth: [core.Object, [core.Object]], |
| 2247 getDay: [dart.dynamic, [dart.dynamic]], | 2247 getDay: [core.Object, [core.Object]], |
| 2248 getHours: [dart.dynamic, [dart.dynamic]], | 2248 getHours: [core.Object, [core.Object]], |
| 2249 getMinutes: [dart.dynamic, [dart.dynamic]], | 2249 getMinutes: [core.Object, [core.Object]], |
| 2250 getSeconds: [dart.dynamic, [dart.dynamic]], | 2250 getSeconds: [core.Object, [core.Object]], |
| 2251 getMilliseconds: [dart.dynamic, [dart.dynamic]], | 2251 getMilliseconds: [core.Object, [core.Object]], |
| 2252 getWeekday: [dart.dynamic, [dart.dynamic]], | 2252 getWeekday: [core.Object, [core.Object]], |
| 2253 valueFromDateString: [dart.dynamic, [dart.dynamic]], | 2253 valueFromDateString: [core.Object, [core.Object]], |
| 2254 getProperty: [dart.dynamic, [dart.dynamic, dart.dynamic]], | 2254 getProperty: [core.Object, [core.Object, core.Object]], |
| 2255 setProperty: [dart.void, [dart.dynamic, dart.dynamic, dart.dynamic]], | 2255 setProperty: [dart.void, [core.Object, core.Object, core.Object]], |
| 2256 functionNoSuchMethod: [dart.dynamic, [dart.dynamic, core.List, core.Map$(c
ore.String, dart.dynamic)]], | 2256 functionNoSuchMethod: [core.Object, [core.Object, core.List, core.Map$(cor
e.String, core.Object)]], |
| 2257 applyFunction: [dart.dynamic, [core.Function, core.List, core.Map$(core.St
ring, dart.dynamic)]], | 2257 applyFunction: [core.Object, [core.Function, core.List, core.Map$(core.Str
ing, core.Object)]], |
| 2258 applyFunctionWithPositionalArguments: [dart.dynamic, [core.Function, core.
List]], | 2258 applyFunctionWithPositionalArguments: [core.Object, [core.Function, core.L
ist]], |
| 2259 applyFunctionWithNamedArguments: [dart.dynamic, [core.Function, core.List,
core.Map$(core.String, dart.dynamic)]], | 2259 applyFunctionWithNamedArguments: [core.Object, [core.Function, core.List,
core.Map$(core.String, core.Object)]], |
| 2260 _mangledNameMatchesType: [dart.dynamic, [core.String, TypeImpl]], | 2260 _mangledNameMatchesType: [core.Object, [core.String, TypeImpl]], |
| 2261 identicalImplementation: [core.bool, [dart.dynamic, dart.dynamic]], | 2261 identicalImplementation: [core.bool, [core.Object, core.Object]], |
| 2262 extractStackTrace: [core.StackTrace, [core.Error]] | 2262 extractStackTrace: [core.StackTrace, [core.Error]] |
| 2263 }), | 2263 }), |
| 2264 names: ['initializeStatics', 'objectHashCode', '_throwFormatException', 'par
seInt', 'parseDouble', 'formatType', 'objectTypeName', 'objectToString', 'dateNo
w', 'initTicker', 'currentUri', '_fromCharCodeApply', 'stringFromCodePoints', 's
tringFromCharCodes', 'stringFromCharCode', 'stringConcatUnchecked', 'flattenStri
ng', 'getTimeZoneName', 'getTimeZoneOffsetInMinutes', 'valueFromDecomposedDate',
'patchUpY2K', 'lazyAsJsDate', 'getYear', 'getMonth', 'getDay', 'getHours', 'get
Minutes', 'getSeconds', 'getMilliseconds', 'getWeekday', 'valueFromDateString',
'getProperty', 'setProperty', 'functionNoSuchMethod', 'applyFunction', 'applyFun
ctionWithPositionalArguments', 'applyFunctionWithNamedArguments', '_mangledNameM
atchesType', 'identicalImplementation', 'extractStackTrace'] | 2264 names: ['initializeStatics', 'objectHashCode', '_throwFormatException', 'par
seInt', 'parseDouble', 'formatType', 'objectTypeName', 'objectToString', 'dateNo
w', 'initTicker', 'currentUri', '_fromCharCodeApply', 'stringFromCodePoints', 's
tringFromCharCodes', 'stringFromCharCode', 'stringConcatUnchecked', 'flattenStri
ng', 'getTimeZoneName', 'getTimeZoneOffsetInMinutes', 'valueFromDecomposedDate',
'patchUpY2K', 'lazyAsJsDate', 'getYear', 'getMonth', 'getDay', 'getHours', 'get
Minutes', 'getSeconds', 'getMilliseconds', 'getWeekday', 'valueFromDateString',
'getProperty', 'setProperty', 'functionNoSuchMethod', 'applyFunction', 'applyFun
ctionWithPositionalArguments', 'applyFunctionWithNamedArguments', '_mangledNameM
atchesType', 'identicalImplementation', 'extractStackTrace'] |
| 2265 }); | 2265 }); |
| 2266 Primitives.mirrorFunctionCacheName = '$cachedFunction'; | 2266 Primitives.mirrorFunctionCacheName = '$cachedFunction'; |
| 2267 Primitives.mirrorInvokeCacheName = '$cachedInvocation'; | 2267 Primitives.mirrorInvokeCacheName = '$cachedInvocation'; |
| 2268 Primitives.DOLLAR_CHAR_VALUE = 36; | 2268 Primitives.DOLLAR_CHAR_VALUE = 36; |
| 2269 Primitives.timerFrequency = null; | 2269 Primitives.timerFrequency = null; |
| 2270 Primitives.timerTicks = null; | 2270 Primitives.timerTicks = null; |
| 2271 dart.defineLazyProperties(Primitives, { | 2271 dart.defineLazyProperties(Primitives, { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 2293 } | 2293 } |
| 2294 static fetch(cache, key) { | 2294 static fetch(cache, key) { |
| 2295 return cache[key]; | 2295 return cache[key]; |
| 2296 } | 2296 } |
| 2297 static update(cache, key, value) { | 2297 static update(cache, key, value) { |
| 2298 cache[key] = value; | 2298 cache[key] = value; |
| 2299 } | 2299 } |
| 2300 } | 2300 } |
| 2301 dart.setSignature(JsCache, { | 2301 dart.setSignature(JsCache, { |
| 2302 statics: () => ({ | 2302 statics: () => ({ |
| 2303 allocate: [dart.dynamic, []], | 2303 allocate: [core.Object, []], |
| 2304 fetch: [dart.dynamic, [dart.dynamic, core.String]], | 2304 fetch: [core.Object, [core.Object, core.String]], |
| 2305 update: [dart.void, [dart.dynamic, core.String, dart.dynamic]] | 2305 update: [dart.void, [core.Object, core.String, core.Object]] |
| 2306 }), | 2306 }), |
| 2307 names: ['allocate', 'fetch', 'update'] | 2307 names: ['allocate', 'fetch', 'update'] |
| 2308 }); | 2308 }); |
| 2309 function iae(argument) { | 2309 function iae(argument) { |
| 2310 throw new core.ArgumentError(argument); | 2310 throw new core.ArgumentError(argument); |
| 2311 } | 2311 } |
| 2312 dart.fn(iae); | 2312 dart.fn(iae); |
| 2313 function ioore(receiver, index) { | 2313 function ioore(receiver, index) { |
| 2314 if (receiver == null) | 2314 if (receiver == null) |
| 2315 dart.dload(receiver, 'length'); | 2315 dart.dload(receiver, 'length'); |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2521 (void 0).$method$; | 2521 (void 0).$method$; |
| 2522 } catch (e) { | 2522 } catch (e) { |
| 2523 return e.message; | 2523 return e.message; |
| 2524 } | 2524 } |
| 2525 | 2525 |
| 2526 }; | 2526 }; |
| 2527 return func(); | 2527 return func(); |
| 2528 } | 2528 } |
| 2529 } | 2529 } |
| 2530 dart.setSignature(TypeErrorDecoder, { | 2530 dart.setSignature(TypeErrorDecoder, { |
| 2531 methods: () => ({matchTypeError: [dart.dynamic, [dart.dynamic]]}), | 2531 methods: () => ({matchTypeError: [core.Object, [core.Object]]}), |
| 2532 statics: () => ({ | 2532 statics: () => ({ |
| 2533 buildJavaScriptObject: [dart.dynamic, []], | 2533 buildJavaScriptObject: [core.Object, []], |
| 2534 buildJavaScriptObjectWithNonClosure: [dart.dynamic, []], | 2534 buildJavaScriptObjectWithNonClosure: [core.Object, []], |
| 2535 extractPattern: [dart.dynamic, [core.String]], | 2535 extractPattern: [core.Object, [core.String]], |
| 2536 provokeCallErrorOn: [core.String, [dart.dynamic]], | 2536 provokeCallErrorOn: [core.String, [core.Object]], |
| 2537 provokeCallErrorOnNull: [core.String, []], | 2537 provokeCallErrorOnNull: [core.String, []], |
| 2538 provokeCallErrorOnUndefined: [core.String, []], | 2538 provokeCallErrorOnUndefined: [core.String, []], |
| 2539 provokePropertyErrorOn: [core.String, [dart.dynamic]], | 2539 provokePropertyErrorOn: [core.String, [core.Object]], |
| 2540 provokePropertyErrorOnNull: [core.String, []], | 2540 provokePropertyErrorOnNull: [core.String, []], |
| 2541 provokePropertyErrorOnUndefined: [core.String, []] | 2541 provokePropertyErrorOnUndefined: [core.String, []] |
| 2542 }), | 2542 }), |
| 2543 names: ['buildJavaScriptObject', 'buildJavaScriptObjectWithNonClosure', 'ext
ractPattern', 'provokeCallErrorOn', 'provokeCallErrorOnNull', 'provokeCallErrorO
nUndefined', 'provokePropertyErrorOn', 'provokePropertyErrorOnNull', 'provokePro
pertyErrorOnUndefined'] | 2543 names: ['buildJavaScriptObject', 'buildJavaScriptObjectWithNonClosure', 'ext
ractPattern', 'provokeCallErrorOn', 'provokeCallErrorOnNull', 'provokeCallErrorO
nUndefined', 'provokePropertyErrorOn', 'provokePropertyErrorOnNull', 'provokePro
pertyErrorOnUndefined'] |
| 2544 }); | 2544 }); |
| 2545 dart.defineLazyProperties(TypeErrorDecoder, { | 2545 dart.defineLazyProperties(TypeErrorDecoder, { |
| 2546 get noSuchMethodPattern() { | 2546 get noSuchMethodPattern() { |
| 2547 return dart.as(TypeErrorDecoder.extractPattern(TypeErrorDecoder.provokeCal
lErrorOn(TypeErrorDecoder.buildJavaScriptObject())), TypeErrorDecoder); | 2547 return dart.as(TypeErrorDecoder.extractPattern(TypeErrorDecoder.provokeCal
lErrorOn(TypeErrorDecoder.buildJavaScriptObject())), TypeErrorDecoder); |
| 2548 }, | 2548 }, |
| 2549 get notClosurePattern() { | 2549 get notClosurePattern() { |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2685 if (typeof message == 'string' && dart.notNull(dart.equals(message, 'too m
uch recursion'))) { | 2685 if (typeof message == 'string' && dart.notNull(dart.equals(message, 'too m
uch recursion'))) { |
| 2686 return new core.StackOverflowError(); | 2686 return new core.StackOverflowError(); |
| 2687 } | 2687 } |
| 2688 } | 2688 } |
| 2689 return ex; | 2689 return ex; |
| 2690 } | 2690 } |
| 2691 dart.fn(unwrapException); | 2691 dart.fn(unwrapException); |
| 2692 function getTraceFromException(exception) { | 2692 function getTraceFromException(exception) { |
| 2693 return new _StackTrace(exception); | 2693 return new _StackTrace(exception); |
| 2694 } | 2694 } |
| 2695 dart.fn(getTraceFromException, core.StackTrace, [dart.dynamic]); | 2695 dart.fn(getTraceFromException, core.StackTrace, [core.Object]); |
| 2696 let _exception = Symbol('_exception'); | 2696 let _exception = Symbol('_exception'); |
| 2697 let _trace = Symbol('_trace'); | 2697 let _trace = Symbol('_trace'); |
| 2698 class _StackTrace extends core.Object { | 2698 class _StackTrace extends core.Object { |
| 2699 _StackTrace(exception) { | 2699 _StackTrace(exception) { |
| 2700 this[_exception] = exception; | 2700 this[_exception] = exception; |
| 2701 this[_trace] = null; | 2701 this[_trace] = null; |
| 2702 } | 2702 } |
| 2703 toString() { | 2703 toString() { |
| 2704 if (this[_trace] != null) | 2704 if (this[_trace] != null) |
| 2705 return this[_trace]; | 2705 return this[_trace]; |
| 2706 let trace = null; | 2706 let trace = null; |
| 2707 if (typeof this[_exception] === "object") { | 2707 if (typeof this[_exception] === "object") { |
| 2708 trace = dart.as(this[_exception].stack, core.String); | 2708 trace = dart.as(this[_exception].stack, core.String); |
| 2709 } | 2709 } |
| 2710 return this[_trace] = trace == null ? '' : trace; | 2710 return this[_trace] = trace == null ? '' : trace; |
| 2711 } | 2711 } |
| 2712 } | 2712 } |
| 2713 _StackTrace[dart.implements] = () => [core.StackTrace]; | 2713 _StackTrace[dart.implements] = () => [core.StackTrace]; |
| 2714 function objectHashCode(object) { | 2714 function objectHashCode(object) { |
| 2715 if (dart.notNull(object == null) || typeof object != 'object') { | 2715 if (dart.notNull(object == null) || typeof object != 'object') { |
| 2716 return dart.hashCode(object); | 2716 return dart.hashCode(object); |
| 2717 } else { | 2717 } else { |
| 2718 return Primitives.objectHashCode(object); | 2718 return Primitives.objectHashCode(object); |
| 2719 } | 2719 } |
| 2720 } | 2720 } |
| 2721 dart.fn(objectHashCode, core.int, [dart.dynamic]); | 2721 dart.fn(objectHashCode, core.int, [core.Object]); |
| 2722 function fillLiteralMap(keyValuePairs, result) { | 2722 function fillLiteralMap(keyValuePairs, result) { |
| 2723 let index = 0; | 2723 let index = 0; |
| 2724 let length = getLength(keyValuePairs); | 2724 let length = getLength(keyValuePairs); |
| 2725 while (dart.notNull(index) < dart.notNull(length)) { | 2725 while (dart.notNull(index) < dart.notNull(length)) { |
| 2726 let key = getIndex(keyValuePairs, (() => { | 2726 let key = getIndex(keyValuePairs, (() => { |
| 2727 let x = index; | 2727 let x = index; |
| 2728 index = dart.notNull(x) + 1; | 2728 index = dart.notNull(x) + 1; |
| 2729 return x; | 2729 return x; |
| 2730 })()); | 2730 })()); |
| 2731 let value = getIndex(keyValuePairs, (() => { | 2731 let value = getIndex(keyValuePairs, (() => { |
| 2732 let x = index; | 2732 let x = index; |
| 2733 index = dart.notNull(x) + 1; | 2733 index = dart.notNull(x) + 1; |
| 2734 return x; | 2734 return x; |
| 2735 })()); | 2735 })()); |
| 2736 result.set(key, value); | 2736 result.set(key, value); |
| 2737 } | 2737 } |
| 2738 return result; | 2738 return result; |
| 2739 } | 2739 } |
| 2740 dart.fn(fillLiteralMap, dart.dynamic, [dart.dynamic, core.Map]); | 2740 dart.fn(fillLiteralMap, core.Object, [core.Object, core.Map]); |
| 2741 function invokeClosure(closure, isolate, numberOfArguments, arg1, arg2, arg3,
arg4) { | 2741 function invokeClosure(closure, isolate, numberOfArguments, arg1, arg2, arg3,
arg4) { |
| 2742 if (numberOfArguments == 0) { | 2742 if (numberOfArguments == 0) { |
| 2743 return _foreign_helper.JS_CALL_IN_ISOLATE(isolate, dart.fn(() => dart.dcal
l(closure))); | 2743 return _foreign_helper.JS_CALL_IN_ISOLATE(isolate, dart.fn(() => dart.dcal
l(closure))); |
| 2744 } else if (numberOfArguments == 1) { | 2744 } else if (numberOfArguments == 1) { |
| 2745 return _foreign_helper.JS_CALL_IN_ISOLATE(isolate, dart.fn(() => dart.dcal
l(closure, arg1))); | 2745 return _foreign_helper.JS_CALL_IN_ISOLATE(isolate, dart.fn(() => dart.dcal
l(closure, arg1))); |
| 2746 } else if (numberOfArguments == 2) { | 2746 } else if (numberOfArguments == 2) { |
| 2747 return _foreign_helper.JS_CALL_IN_ISOLATE(isolate, dart.fn(() => dart.dcal
l(closure, arg1, arg2))); | 2747 return _foreign_helper.JS_CALL_IN_ISOLATE(isolate, dart.fn(() => dart.dcal
l(closure, arg1, arg2))); |
| 2748 } else if (numberOfArguments == 3) { | 2748 } else if (numberOfArguments == 3) { |
| 2749 return _foreign_helper.JS_CALL_IN_ISOLATE(isolate, dart.fn(() => dart.dcal
l(closure, arg1, arg2, arg3))); | 2749 return _foreign_helper.JS_CALL_IN_ISOLATE(isolate, dart.fn(() => dart.dcal
l(closure, arg1, arg2, arg3))); |
| 2750 } else if (numberOfArguments == 4) { | 2750 } else if (numberOfArguments == 4) { |
| 2751 return _foreign_helper.JS_CALL_IN_ISOLATE(isolate, dart.fn(() => dart.dcal
l(closure, arg1, arg2, arg3, arg4))); | 2751 return _foreign_helper.JS_CALL_IN_ISOLATE(isolate, dart.fn(() => dart.dcal
l(closure, arg1, arg2, arg3, arg4))); |
| 2752 } else { | 2752 } else { |
| 2753 throw new core.Exception('Unsupported number of arguments for wrapped clos
ure'); | 2753 throw new core.Exception('Unsupported number of arguments for wrapped clos
ure'); |
| 2754 } | 2754 } |
| 2755 } | 2755 } |
| 2756 dart.fn(invokeClosure, dart.dynamic, [core.Function, dart.dynamic, core.int, d
art.dynamic, dart.dynamic, dart.dynamic, dart.dynamic]); | 2756 dart.fn(invokeClosure, core.Object, [core.Function, core.Object, core.int, cor
e.Object, core.Object, core.Object, core.Object]); |
| 2757 function convertDartClosureToJS(closure, arity) { | 2757 function convertDartClosureToJS(closure, arity) { |
| 2758 return closure; | 2758 return closure; |
| 2759 } | 2759 } |
| 2760 dart.fn(convertDartClosureToJS, dart.dynamic, [dart.dynamic, core.int]); | 2760 dart.fn(convertDartClosureToJS, core.Object, [core.Object, core.int]); |
| 2761 class Closure extends core.Object { | 2761 class Closure extends core.Object { |
| 2762 Closure() { | 2762 Closure() { |
| 2763 } | 2763 } |
| 2764 static fromTearOff(receiver, functions, reflectionInfo, isStatic, jsArgument
s, propertyName) { | 2764 static fromTearOff(receiver, functions, reflectionInfo, isStatic, jsArgument
s, propertyName) { |
| 2765 _foreign_helper.JS_EFFECT(dart.fn(() => { | 2765 _foreign_helper.JS_EFFECT(dart.fn(() => { |
| 2766 BoundClosure.receiverOf(dart.as(void 0, BoundClosure)); | 2766 BoundClosure.receiverOf(dart.as(void 0, BoundClosure)); |
| 2767 BoundClosure.selfOf(dart.as(void 0, BoundClosure)); | 2767 BoundClosure.selfOf(dart.as(void 0, BoundClosure)); |
| 2768 })); | 2768 })); |
| 2769 let func = functions[0]; | 2769 let func = functions[0]; |
| 2770 let name = dart.as(func.$stubName, core.String); | 2770 let name = dart.as(func.$stubName, core.String); |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3013 return x; | 3013 return x; |
| 3014 })()}` + '}')(); | 3014 })()}` + '}')(); |
| 3015 } | 3015 } |
| 3016 toString() { | 3016 toString() { |
| 3017 return "Closure"; | 3017 return "Closure"; |
| 3018 } | 3018 } |
| 3019 } | 3019 } |
| 3020 Closure[dart.implements] = () => [core.Function]; | 3020 Closure[dart.implements] = () => [core.Function]; |
| 3021 dart.setSignature(Closure, { | 3021 dart.setSignature(Closure, { |
| 3022 statics: () => ({ | 3022 statics: () => ({ |
| 3023 fromTearOff: [dart.dynamic, [dart.dynamic, core.List, core.List, core.bool
, dart.dynamic, core.String]], | 3023 fromTearOff: [core.Object, [core.Object, core.List, core.List, core.bool,
core.Object, core.String]], |
| 3024 cspForwardCall: [dart.dynamic, [core.int, core.bool, core.String, dart.dyn
amic]], | 3024 cspForwardCall: [core.Object, [core.int, core.bool, core.String, core.Obje
ct]], |
| 3025 forwardCallTo: [dart.dynamic, [dart.dynamic, dart.dynamic, core.bool]], | 3025 forwardCallTo: [core.Object, [core.Object, core.Object, core.bool]], |
| 3026 cspForwardInterceptedCall: [dart.dynamic, [core.int, core.bool, core.Strin
g, dart.dynamic]], | 3026 cspForwardInterceptedCall: [core.Object, [core.int, core.bool, core.String
, core.Object]], |
| 3027 forwardInterceptedCallTo: [dart.dynamic, [dart.dynamic, dart.dynamic]] | 3027 forwardInterceptedCallTo: [core.Object, [core.Object, core.Object]] |
| 3028 }), | 3028 }), |
| 3029 names: ['fromTearOff', 'cspForwardCall', 'forwardCallTo', 'cspForwardInterce
ptedCall', 'forwardInterceptedCallTo'] | 3029 names: ['fromTearOff', 'cspForwardCall', 'forwardCallTo', 'cspForwardInterce
ptedCall', 'forwardInterceptedCallTo'] |
| 3030 }); | 3030 }); |
| 3031 Closure.FUNCTION_INDEX = 0; | 3031 Closure.FUNCTION_INDEX = 0; |
| 3032 Closure.NAME_INDEX = 1; | 3032 Closure.NAME_INDEX = 1; |
| 3033 Closure.CALL_NAME_INDEX = 2; | 3033 Closure.CALL_NAME_INDEX = 2; |
| 3034 Closure.REQUIRED_PARAMETER_INDEX = 3; | 3034 Closure.REQUIRED_PARAMETER_INDEX = 3; |
| 3035 Closure.OPTIONAL_PARAMETER_INDEX = 4; | 3035 Closure.OPTIONAL_PARAMETER_INDEX = 4; |
| 3036 Closure.DEFAULT_ARGUMENTS_INDEX = 5; | 3036 Closure.DEFAULT_ARGUMENTS_INDEX = 5; |
| 3037 Closure.functionCounter = 0; | 3037 Closure.functionCounter = 0; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3102 for (let i = 0; dart.notNull(i) < dart.notNull(names[core.$length]); i = d
art.notNull(i) + 1) { | 3102 for (let i = 0; dart.notNull(i) < dart.notNull(names[core.$length]); i = d
art.notNull(i) + 1) { |
| 3103 let name = names[core.$get](i); | 3103 let name = names[core.$get](i); |
| 3104 if (template[name] === fieldName) { | 3104 if (template[name] === fieldName) { |
| 3105 return name; | 3105 return name; |
| 3106 } | 3106 } |
| 3107 } | 3107 } |
| 3108 } | 3108 } |
| 3109 } | 3109 } |
| 3110 dart.setSignature(BoundClosure, { | 3110 dart.setSignature(BoundClosure, { |
| 3111 statics: () => ({ | 3111 statics: () => ({ |
| 3112 selfOf: [dart.dynamic, [BoundClosure]], | 3112 selfOf: [core.Object, [BoundClosure]], |
| 3113 targetOf: [dart.dynamic, [BoundClosure]], | 3113 targetOf: [core.Object, [BoundClosure]], |
| 3114 receiverOf: [dart.dynamic, [BoundClosure]], | 3114 receiverOf: [core.Object, [BoundClosure]], |
| 3115 nameOf: [dart.dynamic, [BoundClosure]], | 3115 nameOf: [core.Object, [BoundClosure]], |
| 3116 selfFieldName: [core.String, []], | 3116 selfFieldName: [core.String, []], |
| 3117 receiverFieldName: [core.String, []], | 3117 receiverFieldName: [core.String, []], |
| 3118 computeFieldNamed: [core.String, [core.String]] | 3118 computeFieldNamed: [core.String, [core.String]] |
| 3119 }), | 3119 }), |
| 3120 names: ['selfOf', 'targetOf', 'receiverOf', 'nameOf', 'selfFieldName', 'rece
iverFieldName', 'computeFieldNamed'] | 3120 names: ['selfOf', 'targetOf', 'receiverOf', 'nameOf', 'selfFieldName', 'rece
iverFieldName', 'computeFieldNamed'] |
| 3121 }); | 3121 }); |
| 3122 BoundClosure.selfFieldNameCache = null; | 3122 BoundClosure.selfFieldNameCache = null; |
| 3123 BoundClosure.receiverFieldNameCache = null; | 3123 BoundClosure.receiverFieldNameCache = null; |
| 3124 function jsHasOwnProperty(jsObject, property) { | 3124 function jsHasOwnProperty(jsObject, property) { |
| 3125 return jsObject.hasOwnProperty(property); | 3125 return jsObject.hasOwnProperty(property); |
| 3126 } | 3126 } |
| 3127 dart.fn(jsHasOwnProperty, core.bool, [dart.dynamic, core.String]); | 3127 dart.fn(jsHasOwnProperty, core.bool, [core.Object, core.String]); |
| 3128 function jsPropertyAccess(jsObject, property) { | 3128 function jsPropertyAccess(jsObject, property) { |
| 3129 return jsObject[property]; | 3129 return jsObject[property]; |
| 3130 } | 3130 } |
| 3131 dart.fn(jsPropertyAccess, dart.dynamic, [dart.dynamic, core.String]); | 3131 dart.fn(jsPropertyAccess, core.Object, [core.Object, core.String]); |
| 3132 function getFallThroughError() { | 3132 function getFallThroughError() { |
| 3133 return new FallThroughErrorImplementation(); | 3133 return new FallThroughErrorImplementation(); |
| 3134 } | 3134 } |
| 3135 dart.fn(getFallThroughError); | 3135 dart.fn(getFallThroughError); |
| 3136 class Creates extends core.Object { | 3136 class Creates extends core.Object { |
| 3137 Creates(types) { | 3137 Creates(types) { |
| 3138 this.types = types; | 3138 this.types = types; |
| 3139 } | 3139 } |
| 3140 } | 3140 } |
| 3141 class Returns extends core.Object { | 3141 class Returns extends core.Object { |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3223 function intTypeCast(value) { | 3223 function intTypeCast(value) { |
| 3224 if (typeof value == 'number' || dart.notNull(value == null)) | 3224 if (typeof value == 'number' || dart.notNull(value == null)) |
| 3225 return value; | 3225 return value; |
| 3226 throw new CastErrorImplementation(Primitives.objectTypeName(value), 'int'); | 3226 throw new CastErrorImplementation(Primitives.objectTypeName(value), 'int'); |
| 3227 } | 3227 } |
| 3228 dart.fn(intTypeCast); | 3228 dart.fn(intTypeCast); |
| 3229 function propertyTypeError(value, property) { | 3229 function propertyTypeError(value, property) { |
| 3230 let name = dart.as(dart.dsend(property, 'substring', 3, dart.dload(property,
'length')), core.String); | 3230 let name = dart.as(dart.dsend(property, 'substring', 3, dart.dload(property,
'length')), core.String); |
| 3231 throw new TypeErrorImplementation(value, name); | 3231 throw new TypeErrorImplementation(value, name); |
| 3232 } | 3232 } |
| 3233 dart.fn(propertyTypeError, dart.void, [dart.dynamic, dart.dynamic]); | 3233 dart.fn(propertyTypeError, dart.void, [core.Object, core.Object]); |
| 3234 function propertyTypeCastError(value, property) { | 3234 function propertyTypeCastError(value, property) { |
| 3235 let actualType = Primitives.objectTypeName(value); | 3235 let actualType = Primitives.objectTypeName(value); |
| 3236 let expectedType = dart.as(dart.dsend(property, 'substring', 3, dart.dload(p
roperty, 'length')), core.String); | 3236 let expectedType = dart.as(dart.dsend(property, 'substring', 3, dart.dload(p
roperty, 'length')), core.String); |
| 3237 throw new CastErrorImplementation(actualType, expectedType); | 3237 throw new CastErrorImplementation(actualType, expectedType); |
| 3238 } | 3238 } |
| 3239 dart.fn(propertyTypeCastError, dart.void, [dart.dynamic, dart.dynamic]); | 3239 dart.fn(propertyTypeCastError, dart.void, [core.Object, core.Object]); |
| 3240 function propertyTypeCheck(value, property) { | 3240 function propertyTypeCheck(value, property) { |
| 3241 if (value == null) | 3241 if (value == null) |
| 3242 return value; | 3242 return value; |
| 3243 if (!!value[property]) | 3243 if (!!value[property]) |
| 3244 return value; | 3244 return value; |
| 3245 propertyTypeError(value, property); | 3245 propertyTypeError(value, property); |
| 3246 } | 3246 } |
| 3247 dart.fn(propertyTypeCheck); | 3247 dart.fn(propertyTypeCheck); |
| 3248 function propertyTypeCast(value, property) { | 3248 function propertyTypeCast(value, property) { |
| 3249 if (dart.notNull(value == null) || !!value[property]) | 3249 if (dart.notNull(value == null) || !!value[property]) |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3454 if (!(typeof condition == 'boolean')) { | 3454 if (!(typeof condition == 'boolean')) { |
| 3455 if (dart.is(condition, core.Function)) | 3455 if (dart.is(condition, core.Function)) |
| 3456 condition = dart.dcall(condition); | 3456 condition = dart.dcall(condition); |
| 3457 if (!(typeof condition == 'boolean')) { | 3457 if (!(typeof condition == 'boolean')) { |
| 3458 throw new TypeErrorImplementation(condition, 'bool'); | 3458 throw new TypeErrorImplementation(condition, 'bool'); |
| 3459 } | 3459 } |
| 3460 } | 3460 } |
| 3461 if (!dart.equals(true, condition)) | 3461 if (!dart.equals(true, condition)) |
| 3462 throw new core.AssertionError(); | 3462 throw new core.AssertionError(); |
| 3463 } | 3463 } |
| 3464 dart.fn(assertHelper, dart.void, [dart.dynamic]); | 3464 dart.fn(assertHelper, dart.void, [core.Object]); |
| 3465 function throwNoSuchMethod(obj, name, arguments$, expectedArgumentNames) { | 3465 function throwNoSuchMethod(obj, name, arguments$, expectedArgumentNames) { |
| 3466 let memberName = new _internal.Symbol.unvalidated(dart.as(name, core.String)
); | 3466 let memberName = new _internal.Symbol.unvalidated(dart.as(name, core.String)
); |
| 3467 throw new core.NoSuchMethodError(obj, memberName, dart.as(arguments$, core.L
ist), new (core.Map$(core.Symbol, dart.dynamic))(), dart.as(expectedArgumentName
s, core.List)); | 3467 throw new core.NoSuchMethodError(obj, memberName, dart.as(arguments$, core.L
ist), new (core.Map$(core.Symbol, core.Object))(), dart.as(expectedArgumentNames
, core.List)); |
| 3468 } | 3468 } |
| 3469 dart.fn(throwNoSuchMethod, dart.void, [dart.dynamic, dart.dynamic, dart.dynami
c, dart.dynamic]); | 3469 dart.fn(throwNoSuchMethod, dart.void, [core.Object, core.Object, core.Object,
core.Object]); |
| 3470 function throwCyclicInit(staticName) { | 3470 function throwCyclicInit(staticName) { |
| 3471 throw new core.CyclicInitializationError(`Cyclic initialization for static $
{staticName}`); | 3471 throw new core.CyclicInitializationError(`Cyclic initialization for static $
{staticName}`); |
| 3472 } | 3472 } |
| 3473 dart.fn(throwCyclicInit, dart.void, [core.String]); | 3473 dart.fn(throwCyclicInit, dart.void, [core.String]); |
| 3474 class RuntimeError extends core.Error { | 3474 class RuntimeError extends core.Error { |
| 3475 RuntimeError(message) { | 3475 RuntimeError(message) { |
| 3476 this.message = message; | 3476 this.message = message; |
| 3477 super.Error(); | 3477 super.Error(); |
| 3478 } | 3478 } |
| 3479 toString() { | 3479 toString() { |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3630 needsComma = true; | 3630 needsComma = true; |
| 3631 } | 3631 } |
| 3632 result = dart.notNull(result) + '}'; | 3632 result = dart.notNull(result) + '}'; |
| 3633 } | 3633 } |
| 3634 result = dart.notNull(result) + `) -> ${this.returnType}`; | 3634 result = dart.notNull(result) + `) -> ${this.returnType}`; |
| 3635 return result; | 3635 return result; |
| 3636 } | 3636 } |
| 3637 } | 3637 } |
| 3638 dart.setSignature(RuntimeFunctionType, { | 3638 dart.setSignature(RuntimeFunctionType, { |
| 3639 methods: () => ({ | 3639 methods: () => ({ |
| 3640 [_isTest]: [core.bool, [dart.dynamic]], | 3640 [_isTest]: [core.bool, [core.Object]], |
| 3641 [_asCheck]: [dart.dynamic, [dart.dynamic]], | 3641 [_asCheck]: [core.Object, [core.Object]], |
| 3642 [_assertCheck]: [dart.dynamic, [dart.dynamic]], | 3642 [_assertCheck]: [core.Object, [core.Object]], |
| 3643 [_check]: [dart.dynamic, [dart.dynamic, core.bool]], | 3643 [_check]: [core.Object, [core.Object, core.bool]], |
| 3644 [_extractFunctionTypeObjectFrom]: [dart.dynamic, [dart.dynamic]], | 3644 [_extractFunctionTypeObjectFrom]: [core.Object, [core.Object]], |
| 3645 toRti: [dart.dynamic, []] | 3645 toRti: [core.Object, []] |
| 3646 }), | 3646 }), |
| 3647 statics: () => ({listToRti: [dart.dynamic, [dart.dynamic]]}), | 3647 statics: () => ({listToRti: [core.Object, [core.Object]]}), |
| 3648 names: ['listToRti'] | 3648 names: ['listToRti'] |
| 3649 }); | 3649 }); |
| 3650 RuntimeFunctionType.inAssert = false; | 3650 RuntimeFunctionType.inAssert = false; |
| 3651 function buildFunctionType(returnType, parameterTypes, optionalParameterTypes)
{ | 3651 function buildFunctionType(returnType, parameterTypes, optionalParameterTypes)
{ |
| 3652 return new RuntimeFunctionType(dart.as(returnType, RuntimeType), dart.as(par
ameterTypes, core.List$(RuntimeType)), dart.as(optionalParameterTypes, core.List
$(RuntimeType)), null); | 3652 return new RuntimeFunctionType(dart.as(returnType, RuntimeType), dart.as(par
ameterTypes, core.List$(RuntimeType)), dart.as(optionalParameterTypes, core.List
$(RuntimeType)), null); |
| 3653 } | 3653 } |
| 3654 dart.fn(buildFunctionType, RuntimeFunctionType, [dart.dynamic, dart.dynamic, d
art.dynamic]); | 3654 dart.fn(buildFunctionType, RuntimeFunctionType, [core.Object, core.Object, cor
e.Object]); |
| 3655 function buildNamedFunctionType(returnType, parameterTypes, namedParameters) { | 3655 function buildNamedFunctionType(returnType, parameterTypes, namedParameters) { |
| 3656 return new RuntimeFunctionType(dart.as(returnType, RuntimeType), dart.as(par
ameterTypes, core.List$(RuntimeType)), null, namedParameters); | 3656 return new RuntimeFunctionType(dart.as(returnType, RuntimeType), dart.as(par
ameterTypes, core.List$(RuntimeType)), null, namedParameters); |
| 3657 } | 3657 } |
| 3658 dart.fn(buildNamedFunctionType, RuntimeFunctionType, [dart.dynamic, dart.dynam
ic, dart.dynamic]); | 3658 dart.fn(buildNamedFunctionType, RuntimeFunctionType, [core.Object, core.Object
, core.Object]); |
| 3659 function buildInterfaceType(rti, typeArguments) { | 3659 function buildInterfaceType(rti, typeArguments) { |
| 3660 let name = dart.as(rti.name, core.String); | 3660 let name = dart.as(rti.name, core.String); |
| 3661 if (dart.notNull(typeArguments == null) || dart.notNull(dart.as(dart.dload(t
ypeArguments, 'isEmpty'), core.bool))) { | 3661 if (dart.notNull(typeArguments == null) || dart.notNull(dart.as(dart.dload(t
ypeArguments, 'isEmpty'), core.bool))) { |
| 3662 return new RuntimeTypePlain(name); | 3662 return new RuntimeTypePlain(name); |
| 3663 } | 3663 } |
| 3664 return new RuntimeTypeGeneric(name, dart.as(typeArguments, core.List$(Runtim
eType)), null); | 3664 return new RuntimeTypeGeneric(name, dart.as(typeArguments, core.List$(Runtim
eType)), null); |
| 3665 } | 3665 } |
| 3666 dart.fn(buildInterfaceType, RuntimeType, [dart.dynamic, dart.dynamic]); | 3666 dart.fn(buildInterfaceType, RuntimeType, [core.Object, core.Object]); |
| 3667 class DynamicRuntimeType extends RuntimeType { | 3667 class DynamicRuntimeType extends RuntimeType { |
| 3668 DynamicRuntimeType() { | 3668 DynamicRuntimeType() { |
| 3669 super.RuntimeType(); | 3669 super.RuntimeType(); |
| 3670 } | 3670 } |
| 3671 toString() { | 3671 toString() { |
| 3672 return 'dynamic'; | 3672 return 'dynamic'; |
| 3673 } | 3673 } |
| 3674 toRti() { | 3674 toRti() { |
| 3675 return null; | 3675 return null; |
| 3676 } | 3676 } |
| 3677 } | 3677 } |
| 3678 dart.setSignature(DynamicRuntimeType, { | 3678 dart.setSignature(DynamicRuntimeType, { |
| 3679 methods: () => ({toRti: [dart.dynamic, []]}) | 3679 methods: () => ({toRti: [core.Object, []]}) |
| 3680 }); | 3680 }); |
| 3681 function getDynamicRuntimeType() { | 3681 function getDynamicRuntimeType() { |
| 3682 return dart.const(new DynamicRuntimeType()); | 3682 return dart.const(new DynamicRuntimeType()); |
| 3683 } | 3683 } |
| 3684 dart.fn(getDynamicRuntimeType, RuntimeType, []); | 3684 dart.fn(getDynamicRuntimeType, RuntimeType, []); |
| 3685 class VoidRuntimeType extends RuntimeType { | 3685 class VoidRuntimeType extends RuntimeType { |
| 3686 VoidRuntimeType() { | 3686 VoidRuntimeType() { |
| 3687 super.RuntimeType(); | 3687 super.RuntimeType(); |
| 3688 } | 3688 } |
| 3689 toString() { | 3689 toString() { |
| 3690 return 'void'; | 3690 return 'void'; |
| 3691 } | 3691 } |
| 3692 toRti() { | 3692 toRti() { |
| 3693 return dart.throw_('internal error'); | 3693 return dart.throw_('internal error'); |
| 3694 } | 3694 } |
| 3695 } | 3695 } |
| 3696 dart.setSignature(VoidRuntimeType, { | 3696 dart.setSignature(VoidRuntimeType, { |
| 3697 methods: () => ({toRti: [dart.dynamic, []]}) | 3697 methods: () => ({toRti: [core.Object, []]}) |
| 3698 }); | 3698 }); |
| 3699 function getVoidRuntimeType() { | 3699 function getVoidRuntimeType() { |
| 3700 return dart.const(new VoidRuntimeType()); | 3700 return dart.const(new VoidRuntimeType()); |
| 3701 } | 3701 } |
| 3702 dart.fn(getVoidRuntimeType, RuntimeType, []); | 3702 dart.fn(getVoidRuntimeType, RuntimeType, []); |
| 3703 function functionTypeTestMetaHelper() { | 3703 function functionTypeTestMetaHelper() { |
| 3704 let dyn = x; | 3704 let dyn = x; |
| 3705 let dyn2 = x; | 3705 let dyn2 = x; |
| 3706 let fixedListOrNull = dart.as(x, core.List); | 3706 let fixedListOrNull = dart.as(x, core.List); |
| 3707 let fixedListOrNull2 = dart.as(x, core.List); | 3707 let fixedListOrNull2 = dart.as(x, core.List); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 3730 for (let i = 1; dart.notNull(i) < dart.notNull(list[core.$length]); i = da
rt.notNull(i) + 1) { | 3730 for (let i = 1; dart.notNull(i) < dart.notNull(list[core.$length]); i = da
rt.notNull(i) + 1) { |
| 3731 arguments$[core.$add](convertRtiToRuntimeType(list[core.$get](i))); | 3731 arguments$[core.$add](convertRtiToRuntimeType(list[core.$get](i))); |
| 3732 } | 3732 } |
| 3733 return new RuntimeTypeGeneric(name, dart.as(arguments$, core.List$(Runtime
Type)), rti); | 3733 return new RuntimeTypeGeneric(name, dart.as(arguments$, core.List$(Runtime
Type)), rti); |
| 3734 } else if ("func" in rti) { | 3734 } else if ("func" in rti) { |
| 3735 return new FunctionTypeInfoDecoderRing(rti).toRuntimeType(); | 3735 return new FunctionTypeInfoDecoderRing(rti).toRuntimeType(); |
| 3736 } else { | 3736 } else { |
| 3737 throw new RuntimeError("Cannot convert " + `'${JSON.stringify(rti)}' to Ru
ntimeType.`); | 3737 throw new RuntimeError("Cannot convert " + `'${JSON.stringify(rti)}' to Ru
ntimeType.`); |
| 3738 } | 3738 } |
| 3739 } | 3739 } |
| 3740 dart.fn(convertRtiToRuntimeType, RuntimeType, [dart.dynamic]); | 3740 dart.fn(convertRtiToRuntimeType, RuntimeType, [core.Object]); |
| 3741 class RuntimeTypePlain extends RuntimeType { | 3741 class RuntimeTypePlain extends RuntimeType { |
| 3742 RuntimeTypePlain(name) { | 3742 RuntimeTypePlain(name) { |
| 3743 this.name = name; | 3743 this.name = name; |
| 3744 super.RuntimeType(); | 3744 super.RuntimeType(); |
| 3745 } | 3745 } |
| 3746 toRti() { | 3746 toRti() { |
| 3747 let allClasses = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_names
.ALL_CLASSES); | 3747 let allClasses = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_names
.ALL_CLASSES); |
| 3748 let rti = allClasses[this.name]; | 3748 let rti = allClasses[this.name]; |
| 3749 if (rti == null) | 3749 if (rti == null) |
| 3750 throw `no type for '${this.name}'`; | 3750 throw `no type for '${this.name}'`; |
| 3751 return rti; | 3751 return rti; |
| 3752 } | 3752 } |
| 3753 toString() { | 3753 toString() { |
| 3754 return this.name; | 3754 return this.name; |
| 3755 } | 3755 } |
| 3756 } | 3756 } |
| 3757 dart.setSignature(RuntimeTypePlain, { | 3757 dart.setSignature(RuntimeTypePlain, { |
| 3758 methods: () => ({toRti: [dart.dynamic, []]}) | 3758 methods: () => ({toRti: [core.Object, []]}) |
| 3759 }); | 3759 }); |
| 3760 class RuntimeTypeGeneric extends RuntimeType { | 3760 class RuntimeTypeGeneric extends RuntimeType { |
| 3761 RuntimeTypeGeneric(name, arguments$, rti) { | 3761 RuntimeTypeGeneric(name, arguments$, rti) { |
| 3762 this.name = name; | 3762 this.name = name; |
| 3763 this.arguments = arguments$; | 3763 this.arguments = arguments$; |
| 3764 this.rti = rti; | 3764 this.rti = rti; |
| 3765 super.RuntimeType(); | 3765 super.RuntimeType(); |
| 3766 } | 3766 } |
| 3767 toRti() { | 3767 toRti() { |
| 3768 if (this.rti != null) | 3768 if (this.rti != null) |
| 3769 return this.rti; | 3769 return this.rti; |
| 3770 let allClasses = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_names
.ALL_CLASSES); | 3770 let allClasses = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_names
.ALL_CLASSES); |
| 3771 let result = [allClasses[this.name]]; | 3771 let result = [allClasses[this.name]]; |
| 3772 if (dart.dindex(result, 0) == null) { | 3772 if (dart.dindex(result, 0) == null) { |
| 3773 throw `no type for '${this.name}<...>'`; | 3773 throw `no type for '${this.name}<...>'`; |
| 3774 } | 3774 } |
| 3775 for (let argument of this.arguments) { | 3775 for (let argument of this.arguments) { |
| 3776 result.push(argument.toRti()); | 3776 result.push(argument.toRti()); |
| 3777 } | 3777 } |
| 3778 return this.rti = result; | 3778 return this.rti = result; |
| 3779 } | 3779 } |
| 3780 toString() { | 3780 toString() { |
| 3781 return `${this.name}<${this.arguments[core.$join](", ")}>`; | 3781 return `${this.name}<${this.arguments[core.$join](", ")}>`; |
| 3782 } | 3782 } |
| 3783 } | 3783 } |
| 3784 dart.setSignature(RuntimeTypeGeneric, { | 3784 dart.setSignature(RuntimeTypeGeneric, { |
| 3785 methods: () => ({toRti: [dart.dynamic, []]}) | 3785 methods: () => ({toRti: [core.Object, []]}) |
| 3786 }); | 3786 }); |
| 3787 let _typeData = Symbol('_typeData'); | 3787 let _typeData = Symbol('_typeData'); |
| 3788 let _cachedToString = Symbol('_cachedToString'); | 3788 let _cachedToString = Symbol('_cachedToString'); |
| 3789 let _hasReturnType = Symbol('_hasReturnType'); | 3789 let _hasReturnType = Symbol('_hasReturnType'); |
| 3790 let _returnType = Symbol('_returnType'); | 3790 let _returnType = Symbol('_returnType'); |
| 3791 let _isVoid = Symbol('_isVoid'); | 3791 let _isVoid = Symbol('_isVoid'); |
| 3792 let _hasArguments = Symbol('_hasArguments'); | 3792 let _hasArguments = Symbol('_hasArguments'); |
| 3793 let _hasOptionalArguments = Symbol('_hasOptionalArguments'); | 3793 let _hasOptionalArguments = Symbol('_hasOptionalArguments'); |
| 3794 let _optionalArguments = Symbol('_optionalArguments'); | 3794 let _optionalArguments = Symbol('_optionalArguments'); |
| 3795 let _hasNamedArguments = Symbol('_hasNamedArguments'); | 3795 let _hasNamedArguments = Symbol('_hasNamedArguments'); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3880 s = dart.notNull(s) + dart.notNull(this[_convert](this[_returnType])); | 3880 s = dart.notNull(s) + dart.notNull(this[_convert](this[_returnType])); |
| 3881 } else { | 3881 } else { |
| 3882 s = dart.notNull(s) + 'dynamic'; | 3882 s = dart.notNull(s) + 'dynamic'; |
| 3883 } | 3883 } |
| 3884 return this[_cachedToString] = `${s}`; | 3884 return this[_cachedToString] = `${s}`; |
| 3885 } | 3885 } |
| 3886 } | 3886 } |
| 3887 dart.setSignature(FunctionTypeInfoDecoderRing, { | 3887 dart.setSignature(FunctionTypeInfoDecoderRing, { |
| 3888 methods: () => ({ | 3888 methods: () => ({ |
| 3889 toRuntimeType: [RuntimeType, []], | 3889 toRuntimeType: [RuntimeType, []], |
| 3890 [_convert]: [core.String, [dart.dynamic]] | 3890 [_convert]: [core.String, [core.Object]] |
| 3891 }) | 3891 }) |
| 3892 }); | 3892 }); |
| 3893 class UnimplementedNoSuchMethodError extends core.Error { | 3893 class UnimplementedNoSuchMethodError extends core.Error { |
| 3894 UnimplementedNoSuchMethodError(message) { | 3894 UnimplementedNoSuchMethodError(message) { |
| 3895 this[_message] = message; | 3895 this[_message] = message; |
| 3896 super.Error(); | 3896 super.Error(); |
| 3897 } | 3897 } |
| 3898 toString() { | 3898 toString() { |
| 3899 return `Unsupported operation: ${this[_message]}`; | 3899 return `Unsupported operation: ${this[_message]}`; |
| 3900 } | 3900 } |
| (...skipping 29 matching lines...) Expand all Loading... |
| 3930 }); | 3930 }); |
| 3931 let DeferredLoadCallback = dart.typedef('DeferredLoadCallback', () => dart.fun
ctionType(dart.void, [])); | 3931 let DeferredLoadCallback = dart.typedef('DeferredLoadCallback', () => dart.fun
ctionType(dart.void, [])); |
| 3932 exports.deferredLoadHook = null; | 3932 exports.deferredLoadHook = null; |
| 3933 function loadDeferredLibrary(loadId) { | 3933 function loadDeferredLibrary(loadId) { |
| 3934 let urisMap = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_names.DEFE
RRED_LIBRARY_URIS); | 3934 let urisMap = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_names.DEFE
RRED_LIBRARY_URIS); |
| 3935 let uris = dart.as(urisMap[loadId], core.List$(core.String)); | 3935 let uris = dart.as(urisMap[loadId], core.List$(core.String)); |
| 3936 let hashesMap = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_names.DE
FERRED_LIBRARY_HASHES); | 3936 let hashesMap = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_names.DE
FERRED_LIBRARY_HASHES); |
| 3937 let hashes = dart.as(hashesMap[loadId], core.List$(core.String)); | 3937 let hashes = dart.as(hashesMap[loadId], core.List$(core.String)); |
| 3938 if (uris == null) | 3938 if (uris == null) |
| 3939 return new (async.Future$(core.Null)).value(null); | 3939 return new (async.Future$(core.Null)).value(null); |
| 3940 let indices = new (core.List$(core.int)).generate(uris[core.$length], dart.f
n(i => dart.as(i, core.int), core.int, [dart.dynamic])); | 3940 let indices = new (core.List$(core.int)).generate(uris[core.$length], dart.f
n(i => dart.as(i, core.int), core.int, [core.Object])); |
| 3941 let isHunkLoaded = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_names
.IS_HUNK_LOADED); | 3941 let isHunkLoaded = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_names
.IS_HUNK_LOADED); |
| 3942 let isHunkInitialized = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_
names.IS_HUNK_INITIALIZED); | 3942 let isHunkInitialized = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_
names.IS_HUNK_INITIALIZED); |
| 3943 let indicesToLoad = indices[core.$where](dart.fn(i => !isHunkLoaded(hashes[c
ore.$get](i)), core.bool, [core.int]))[core.$toList](); | 3943 let indicesToLoad = indices[core.$where](dart.fn(i => !isHunkLoaded(hashes[c
ore.$get](i)), core.bool, [core.int]))[core.$toList](); |
| 3944 return dart.as(async.Future.wait(dart.as(indicesToLoad[core.$map](dart.fn(i
=> _loadHunk(uris[core.$get](i)), async.Future$(core.Null), [core.int])), core.I
terable$(async.Future))).then(dart.fn(_ => { | 3944 return dart.as(async.Future.wait(dart.as(indicesToLoad[core.$map](dart.fn(i
=> _loadHunk(uris[core.$get](i)), async.Future$(core.Null), [core.int])), core.I
terable$(async.Future))).then(dart.fn(_ => { |
| 3945 let indicesToInitialize = indices[core.$where](dart.fn(i => !isHunkInitial
ized(hashes[core.$get](i)), core.bool, [core.int]))[core.$toList](); | 3945 let indicesToInitialize = indices[core.$where](dart.fn(i => !isHunkInitial
ized(hashes[core.$get](i)), core.bool, [core.int]))[core.$toList](); |
| 3946 for (let i of indicesToInitialize) { | 3946 for (let i of indicesToInitialize) { |
| 3947 let initializer = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_na
mes.INITIALIZE_LOADED_HUNK); | 3947 let initializer = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_na
mes.INITIALIZE_LOADED_HUNK); |
| 3948 initializer(hashes[core.$get](i)); | 3948 initializer(hashes[core.$get](i)); |
| 3949 } | 3949 } |
| 3950 let updated = exports._loadedLibraries.add(loadId); | 3950 let updated = exports._loadedLibraries.add(loadId); |
| 3951 if (dart.notNull(updated) && dart.notNull(exports.deferredLoadHook != null
)) { | 3951 if (dart.notNull(updated) && dart.notNull(exports.deferredLoadHook != null
)) { |
| 3952 exports.deferredLoadHook(); | 3952 exports.deferredLoadHook(); |
| 3953 } | 3953 } |
| 3954 })), async.Future$(core.Null)); | 3954 })), async.Future$(core.Null)); |
| 3955 } | 3955 } |
| 3956 dart.fn(loadDeferredLibrary, async.Future$(core.Null), [core.String]); | 3956 dart.fn(loadDeferredLibrary, async.Future$(core.Null), [core.String]); |
| 3957 function _loadHunk(hunkName) { | 3957 function _loadHunk(hunkName) { |
| 3958 let future = exports._loadingLibraries.get(hunkName); | 3958 let future = exports._loadingLibraries.get(hunkName); |
| 3959 if (future != null) { | 3959 if (future != null) { |
| 3960 return dart.as(future.then(dart.fn(_ => null, dart.bottom, [dart.dynamic])
), async.Future$(core.Null)); | 3960 return dart.as(future.then(dart.fn(_ => null, dart.bottom, [core.Object]))
, async.Future$(core.Null)); |
| 3961 } | 3961 } |
| 3962 let uri = _isolate_helper.IsolateNatives.thisScript; | 3962 let uri = _isolate_helper.IsolateNatives.thisScript; |
| 3963 let index = uri.lastIndexOf('/'); | 3963 let index = uri.lastIndexOf('/'); |
| 3964 uri = `${uri.substring(0, dart.notNull(index) + 1)}${hunkName}`; | 3964 uri = `${uri.substring(0, dart.notNull(index) + 1)}${hunkName}`; |
| 3965 if (dart.notNull(Primitives.isJsshell) || dart.notNull(Primitives.isD8)) { | 3965 if (dart.notNull(Primitives.isJsshell) || dart.notNull(Primitives.isD8)) { |
| 3966 return exports._loadingLibraries.set(hunkName, new (async.Future$(core.Nul
l))(dart.fn(() => { | 3966 return exports._loadingLibraries.set(hunkName, new (async.Future$(core.Nul
l))(dart.fn(() => { |
| 3967 try { | 3967 try { |
| 3968 new Function(`load("${uri}")`)(); | 3968 new Function(`load("${uri}")`)(); |
| 3969 } catch (error) { | 3969 } catch (error) { |
| 3970 let stackTrace = dart.stackTrace(error); | 3970 let stackTrace = dart.stackTrace(error); |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4275 exports.jsonEncodeNative = jsonEncodeNative; | 4275 exports.jsonEncodeNative = jsonEncodeNative; |
| 4276 exports.getIsolateAffinityTag = getIsolateAffinityTag; | 4276 exports.getIsolateAffinityTag = getIsolateAffinityTag; |
| 4277 exports.LoadLibraryFunctionType = LoadLibraryFunctionType; | 4277 exports.LoadLibraryFunctionType = LoadLibraryFunctionType; |
| 4278 exports.DeferredLoadCallback = DeferredLoadCallback; | 4278 exports.DeferredLoadCallback = DeferredLoadCallback; |
| 4279 exports.loadDeferredLibrary = loadDeferredLibrary; | 4279 exports.loadDeferredLibrary = loadDeferredLibrary; |
| 4280 exports.MainError = MainError; | 4280 exports.MainError = MainError; |
| 4281 exports.missingMain = missingMain; | 4281 exports.missingMain = missingMain; |
| 4282 exports.badMain = badMain; | 4282 exports.badMain = badMain; |
| 4283 exports.mainHasTooManyParameters = mainHasTooManyParameters; | 4283 exports.mainHasTooManyParameters = mainHasTooManyParameters; |
| 4284 })(_js_helper, core, collection, _internal, _foreign_helper, _js_embedded_names,
_interceptors, _js_names, async, _isolate_helper); | 4284 })(_js_helper, core, collection, _internal, _foreign_helper, _js_embedded_names,
_interceptors, _js_names, async, _isolate_helper); |
| OLD | NEW |